create-nexaui-electron
Version:
Create Nexa App - Tool untuk membuat aplikasi Nexa Electron
1,099 lines (918 loc) • 21.8 kB
CSS
/* Base styles untuk semua button */
[class*="nx-btn-"] {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 16px;
text-align: center;
font-weight: 500;
line-height: 1.4;
border: none;
border-radius: 6px;
cursor: pointer;
/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); */
position: relative;
overflow: hidden;
margin-left: 0px;
margin-right: 0px;
}
/*button {
margin-left: 5px;
margin-right: 5px;
}*/
/* Ripple effect - efek unik saat diklik */
[class*="nx-btn-"]::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background: rgba(255, 255, 255, 0.2);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.3s ease-out, height 0.3s ease-out;
}
/*[class*="nx-btn-"]:active::before {
width: 200%;
height: 200%;
}
*/
/* Color variations dengan gradien halus */
.nx-btn-primary {
background: linear-gradient(135deg, #3B82F6, #2563EB);
color: white;
--btn-focus-color: 59, 130, 246;
}
/*.nx-btn-primary:hover {
background: linear-gradient(135deg, #2563EB, #1D4ED8);
}
*/
.nx-btn-danger {
background-color:#E81123;
/* background: linear-gradient(135deg, #FF4081 0%, #F50057 100%);*/
color: white;
--btn-focus-color: 255, 64, 129;
border: none;
border-radius: 6px;
padding: 8px 16px;
font-size: 14px;
font-weight: 500;
display: inline-flex;
align-items: center;
gap: 8px;
cursor: pointer;
transition: none;
}
/* Loading state yang modern */
.nx-btn-loading {
position: relative;
cursor: wait;
}
.nx-btn-loading::after {
content: '';
position: absolute;
width: 16px;
height: 16px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: white;
animation: nexa-spin 0.6s linear infinite;
}
@keyframes nexa-spin {
to { transform: rotate(360deg); }
}
/* Icon integration yang dinamis */
.icon-button {
gap: 8px;
}
/* Ghost button dengan efek hover yang unik */
.nx-btn-ghost {
background: transparent;
border: 1.5px solid currentColor;
color: #00E5BE;
}
.nx-btn-ghost:hover {
background: rgba(0, 229, 190, 0.1);
border-color: #00E5BE;
}
/* Color variations */
.nx-btn-white {
background: linear-gradient(to bottom, #ffffff, #f8f9fa);
color: #000000;
border: 1px solid #e9ecef;
}
.nx-btn-light {
background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
color: #495057;
}
.nx-btn-dark {
background: linear-gradient(135deg, #495057, #343a40);
color: #fff;
}
.nx-btn-black {
background: linear-gradient(135deg, #212529, #000000);
color: #fff;
}
.nx-btn-text {
background: transparent;
color: #00E5BE;
padding: 0;
text-decoration: none;
position: relative;
}
.nx-btn-text::after {
content: '';
position: absolute;
width: 100%;
height: 1px;
bottom: -2px;
left: 0;
background-color: currentColor;
transform: scaleX(0);
transition: transform 0.2s ease;
}
.nx-btn-text:hover::after {
transform: scaleX(1);
}
.nx-btn-ghost {
background-color: transparent;
color: #485fc7;
text-decoration: none;
border: 1px solid #485fc7;
}
.nx-btn-primary {
background-color: #00d1b2;
color: #fff;
}
.nx-btn-link {
background: linear-gradient(135deg, #6366F1, #4F46E5);
color: white;
--btn-focus-color: 99, 102, 241;
}
.nx-btn-link:hover {
background: linear-gradient(135deg, #4F46E5, #4338CA);
}
.nx-btn-info {
background: linear-gradient(135deg, #0EA5E9, #0284C7);
color: white;
--btn-focus-color: 14, 165, 233;
}
.nx-btn-info:hover {
background: linear-gradient(135deg, #0284C7, #0369A1);
}
.nx-btn-success {
background: linear-gradient(135deg, #10B981, #059669);
color: white;
--btn-focus-color: 16, 185, 129;
}
.nx-btn-success:hover {
background: linear-gradient(135deg, #059669, #047857);
}
.nx-btn-warning {
background: linear-gradient(135deg, #FCC419, #F59F00);
color: #000;
}
.nx-btn-danger:active {
transform: none;
}
.nx-btn-danger:focus {
outline: none;
box-shadow: none;
}
/* Hover effects */
/*[class*="nx-btn-"]:hover:not(.nx-btn-text):not(.nx-btn-ghost) {
opacity: 0.9;
}*/
.nx-btn-text:hover {
color: #000000;
}
.nx-btn-ghost:hover {
background-color: #485fc7;
color: #fff;
}
.mt-4 {
margin-top: 2rem;
}
/* Button types styling */
.example-buttons {
margin: 1.5rem 0;
}
/* Make input buttons look consistent with other buttons */
input[type="submit"].nx-btn-primary,
input[type="reset"].nx-btn-primary {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: none;
}
/* Make sure anchor buttons have proper alignment */
a[class*="nx-btn-"] {
text-decoration: none;
}
/* Ensure all button types have same height */
[class*="nx-btn-"] {
/* height: 2.5rem;
line-height: 1.8;*/
box-sizing: border-box;
}
/* Ensure input buttons have proper padding */
input[type="submit"][class*="nx-btn-"],
input[type="reset"][class*="nx-btn-"] {
padding-left: 1rem;
padding-right: 1rem;
}
/* Button sizes */
.nx-btn-primary.is-small {
font-size: 0.75rem;
height: 2rem;
padding: 0 0.75rem;
}
.nx-btn-primary.is-normal {
font-size: 1rem;
height: 2.5rem;
padding: 0 1.25rem;
}
.nx-btn-primary.is-medium {
font-size: 1.25rem;
height: 3rem;
padding: 0 1.5rem;
}
.nx-btn-primary.is-large {
font-size: 1.5rem;
height: 3.5rem;
padding: 0 2rem;
}
/* Make sure all sizes work with all button types */
[class*="nx-btn-"].is-small {
font-size: 0.75rem;
height: 2rem;
padding: 0 0.75rem;
}
[class*="nx-btn-"].is-normal {
font-size: 1rem;
height: 2.5rem;
padding: 0 1.25rem;
}
[class*="nx-btn-"].is-medium {
font-size: 1.25rem;
height: 3rem;
padding: 0 1.5rem;
}
[class*="nx-btn-"].is-large {
font-size: 1.5rem;
height: 3.5rem;
padding: 0 2rem;
}
/* Base button style */
.nx-btn {
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid #e4e4e7;
border-radius: 8px;
background-color: white;
color: #18181b;
cursor: pointer;
font-weight: 500;
text-align: center;
white-space: nowrap;
line-height: 1.5;
position: relative;
vertical-align: top;
/* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
transition: all 0.15s ease;*/
}
/* Button sizes */
.nx-btn.is-small {
font-size: 0.875rem;
height: 2.25rem;
padding: 0.375rem 0.875rem;
border-radius: 6px;
}
.nx-btn {
font-size: 0.9375rem;
height: 2.5rem;
padding: 0.5rem 1rem;
}
.nx-btn.is-normal {
font-size: 1rem;
height: 2.75rem;
padding: 0.625rem 1.25rem;
}
.nx-btn.is-medium {
font-size: 1.125rem;
height: 3rem;
padding: 0.75rem 1.5rem;
border-radius: 10px;
}
.nx-btn.is-large {
font-size: 1.25rem;
height: 3.5rem;
padding: 0.875rem 1.75rem;
border-radius: 12px;
}
/* Focus state */
.nx-btn:focus {
outline: none;
box-shadow: none;
}
/* Active state */
.nx-btn:active {
background-color: #f4f4f5;
border-color: #e4e4e7;
transform: none;
box-shadow: none;
}
/* Spacing between buttons in demo */
.example-buttons .nx-btn {
margin-right: 0.75rem;
margin-bottom: 0.75rem;
}
/* Icon styling */
.nx-btn-success i,
.nx-btn-danger i {
font-size: 16px;
}
/* Active state */
.nx-btn-success:active,
.nx-btn-danger:active {
transform: none;
}
/* Focus state */
.nx-btn-success:focus,
.nx-btn-danger:focus {
outline: none;
box-shadow: none;
}
.nx-btn-danger:focus {
box-shadow: none;
}
/* Loading States */
.nx-btn-primary.loading {
position: relative;
cursor: wait;
opacity: 0.8;
}
.spinner {
display: inline-block;
width: 1em;
height: 1em;
border: 2px solid #fff;
border-radius: 50%;
border-top-color: transparent;
animation: spin 1s linear infinite;
margin-right: 0.5rem;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Custom Buttons */
.nx-btn-custom {
background-color: var(--button-color);
color: white;
border: none;
padding: 0.5rem 1rem;
border-radius: 0.375rem;
cursor: pointer;
}
.nx-btn-custom.gradient {
background: linear-gradient(45deg, #667eea, #764ba2);
}
.nx-btn-custom.outline {
background: transparent;
border: 2px solid var(--button-color);
color: var(--button-color);
}
/* Responsive Button */
@media (max-width: 768px) {
.nx-btn-primary.responsive {
width: 100%;
margin-bottom: 0.5rem;
}
}
/* Button dengan icon */
.nx-btn-success.with-icon {
display: inline-flex;
align-items: center;
gap: 8px; /* Menambah jarak antara icon dan text */
}
.nx-btn-success.with-icon i {
font-size: 16px;
margin-right: 4px; /* Backup spacing jika gap tidak didukung */
}
.nx-btn-success.with-icon span {
line-height: 1;
}
/* Button dengan icon styling */
.icon-button {
display: inline-flex;
align-items: center;
gap: 4px; /* Mengurangi jarak antara icon dan text */
padding: 8px 16px;
height: 32px; /* Mengurangi tinggi button */
border-radius: 4px; /* Mengurangi border radius */
}
.icon-button i {
font-size: 14px; /* Mengurangi ukuran icon */
}
.icon-button span {
line-height: 1;
font-size: 14px;
}
/* Success button dengan icon */
.nx-btn-success.icon-button {
background-color: #00E5BE;
color: white;
box-shadow: none;
transition: none;
}
/* Danger button dengan icon */
.nx-btn-danger.icon-button {
color: white;
box-shadow: none;
transition: none;
}
/* Hover effects dengan shadow */
.nx-btn-success.icon-button:hover,
.nx-btn-danger.icon-button:hover {
transform: none;
box-shadow: none;
}
/* Active state dengan shadow */
.nx-btn-success.icon-button:active,
.nx-btn-danger.icon-button:active {
transform: none;
box-shadow: none;
}
/* Custom buttons */
.nx-btn-custom {
box-shadow: none;
transition: none;
}
/* Loading state buttons */
.nx-btn-primary.loading,
.nx-btn-primary.loading-text {
box-shadow: none;
transition: none;
}
/* Menghapus style yang tidak diperlukan */
.nx-btn-success.with-icon,
.nx-btn-danger.with-icon,
.nx-btn-success i,
.nx-btn-danger i {
gap: 4px;
font-size: 14px;
}
/* Color variations dengan gradien modern */
.nx-btn-white {
background: linear-gradient(to bottom, #ffffff, #f8f9fa);
color: #000000;
border: 1px solid #e9ecef;
}
.nx-btn-light {
background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
color: #495057;
}
.nx-btn-dark {
background: linear-gradient(135deg, #495057, #343a40);
color: #fff;
}
.nx-btn-black {
background: linear-gradient(135deg, #212529, #000000);
color: #fff;
}
.nx-btn-text {
background: transparent;
color: #00E5BE;
padding: 0;
text-decoration: none;
position: relative;
}
.nx-btn-text::after {
content: '';
position: absolute;
width: 100%;
height: 1px;
bottom: -2px;
left: 0;
background-color: currentColor;
transform: scaleX(0);
transition: transform 0.2s ease;
}
.nx-btn-text:hover::after {
transform: scaleX(1);
}
.nx-btn-link {
background: linear-gradient(135deg, #6366F1, #4F46E5);
color: white;
--btn-focus-color: 99, 102, 241;
}
.nx-btn-link:hover {
background: linear-gradient(135deg, #4F46E5, #4338CA);
}
.nx-btn-info {
background: linear-gradient(135deg, #0EA5E9, #0284C7);
color: white;
--btn-focus-color: 14, 165, 233;
}
.nx-btn-info:hover {
background: linear-gradient(135deg, #0284C7, #0369A1);
}
.nx-btn-warning {
background: linear-gradient(135deg, #FCC419, #F59F00);
color: #000;
}
/* Loading states yang lebih modern */
.nx-btn-loading {
position: relative;
cursor: wait;
}
.nx-btn-loading .spinner {
position: relative;
display: inline-block;
width: 16px;
height: 16px;
}
.nx-btn-loading .spinner::before,
.nx-btn-loading .spinner::after {
content: '';
position: absolute;
border-radius: 50%;
animation: pulse 1.8s ease-in-out infinite;
}
.nx-btn-loading .spinner::before {
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.5);
}
.nx-btn-loading .spinner::after {
width: 75%;
height: 75%;
background-color: rgba(255, 255, 255, 0.7);
top: 12.5%;
left: 12.5%;
animation-delay: 0.2s;
}
@keyframes pulse {
0% { transform: scale(0.8); opacity: 0.5; }
50% { transform: scale(1.2); opacity: 1; }
100% { transform: scale(0.8); opacity: 0.5; }
}
/* Disabled state yang lebih modern */
[class*="nx-btn-"]:disabled {
opacity: 0.6;
cursor: not-allowed;
position: relative;
overflow: hidden;
}
[class*="nx-btn-"]:disabled::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 200%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.2),
transparent
);
animation: shine 1.5s infinite;
}
@keyframes shine {
to { transform: translateX(100%); }
}
/* Custom size variations */
.nx-btn-custom.size-xs {
padding: 4px 8px;
font-size: 12px;
height: 24px;
}
.nx-btn-custom.size-xl {
padding: 16px 32px;
font-size: 18px;
height: 56px;
}
/* Outline variations */
[class*="nx-btn-"].outline {
background: transparent;
border: 2px solid currentColor;
}
.nx-btn-primary.outline {
color: #00E5BE;
}
.nx-btn-danger.outline {
color: #FF4081;
}
/* Icon only buttons */
.nx-btn-icon-only {
width: 36px;
height: 36px;
padding: 0;
border-radius: 50%;
display: inline-flex;
align-items: center;
justify-content: center;
}
.nx-btn-icon-only i {
font-size: 18px;
}
/* Responsive adjustments */
@media (max-width: 768px) {
[class*="nx-btn-"] {
padding: 8px 16px;
}
.nx-btn-icon-only {
width: 32px;
height: 32px;
}
}
/* Focus visible untuk aksesibilitas */
[class*="nx-btn-"]:focus-visible {
outline: none;
box-shadow: none;
}
/* Active state yang lebih responsif */
[class*="nx-btn-"]:active {
transform: none;
}
/* Full Width Button Styles */
[class*="nx-btn-"].full-width {
width: 100%;
display: flex;
justify-content: center;
margin-bottom: 0.75rem;
}
/* Rounded Corner Variations */
[class*="nx-btn-"].rounded-xl {
border-radius: 1rem;
}
[class*="nx-btn-"].rounded-full {
border-radius: 9999px;
}
/* Full Width dengan Icon */
[class*="nx-btn-"].full-width.icon-button {
justify-content: center;
gap: 0.75rem;
}
[class*="nx-btn-"].full-width.icon-button i {
transition: transform 0.2s ease;
}
[class*="nx-btn-"].full-width.icon-button:hover i {
transform: translateX(4px);
}
/* Responsive adjustments */
@media (max-width: 768px) {
[class*="nx-btn-"].full-width {
padding-left: 1rem;
padding-right: 1rem;
}
[class*="nx-btn-"].full-width.icon-button {
gap: 0.5rem;
}
}
/* Hover effect khusus untuk full width */
[class*="nx-btn-"].full-width:hover {
transform: none;
box-shadow: none;
}
[class*="nx-btn-"].full-width:active {
transform: none;
box-shadow: none;
}
/* Windows Button Styles */
[class*="nx-btn-win-"] {
font-family: "Segoe UI", system-ui, sans-serif;
font-weight: 400;
letter-spacing: 0;
border-radius: 4px;
transition: none;
}
/* Windows Basic Colors */
.nx-btn-win-blue {
background-color: #0078D4;
color: white;
}
.nx-btn-win-purple {
background-color: #5C2D91;
color: white;
}
.nx-btn-win-teal {
background-color: #00B294;
color: white;
}
.nx-btn-win-green {
background-color: #107C10;
color: white;
}
/* Windows System Colors */
.nx-btn-win-system {
background-color: #E6E6E6;
color: #000000;
border: 1px solid #CCCCCC;
}
.nx-btn-win-error {
background-color: #E81123;
color: white;
}
.nx-btn-win-warning {
background-color: #FFB900;
color: black;
}
.nx-btn-win-success {
background-color: #107C10;
color: white;
}
/* Windows Accent Buttons */
.nx-btn-win-accent {
background-color: #0078D4;
color: white;
font-weight: 500;
}
.nx-btn-win-accent-light {
background-color: #F0F0F0;
color: #0078D4;
border: 1px solid #0078D4;
}
/* Windows Modern Style */
.nx-btn-win-modern {
background-color: #333333;
color: white;
padding: 8px 20px;
border-radius: 2px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* Menghapus hover states */
[class*="nx-btn-win-"]:hover {
filter: none;
transform: none;
}
/* Menghapus active states */
[class*="nx-btn-win-"]:active {
filter: none;
transform: none;
}
/* Menghapus focus states */
[class*="nx-btn-win-"]:focus {
outline: none;
outline-offset: 0;
}
/* Menghapus disabled states yang tidak perlu */
[class*="nx-btn-win-"]:disabled {
opacity: 0.6;
cursor: not-allowed;
background-color: inherit;
color: inherit;
border-color: inherit;
}
/* Icon Styling */
[class*="nx-btn-win-"].icon-button {
display: inline-flex;
align-items: center;
gap: 8px;
}
[class*="nx-btn-win-"].icon-button i {
font-size: 16px;
}
/* Responsive Adjustments */
@media (max-width: 768px) {
[class*="nx-btn-win-"] {
padding: 6px 16px;
font-size: 14px;
}
}
/* Secondary Button Styles */
.nx-btn-secondary {
background: linear-gradient(135deg, #64748B, #475569);
color: white;
border: none;
}
.nx-btn-secondary:hover {
background: linear-gradient(135deg, #64748B, #475569);
transform: none;
}
.nx-btn-secondary:active {
background: linear-gradient(135deg, #64748B, #475569);
transform: none;
}
.nx-btn-secondary-light {
background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
color: #475569;
border: 1px solid #CBD5E1;
}
.nx-btn-secondary-light:hover {
background: linear-gradient(135deg, #F1F5F9, #E2E8F0);
color: #475569;
}
.nx-btn-secondary-dark {
background: linear-gradient(135deg, #334155, #1E293B);
color: white;
border: none;
}
.nx-btn-secondary-dark:hover {
background: linear-gradient(135deg, #334155, #1E293B);
}
.nx-btn-secondary-outline {
background: transparent;
color: #64748B;
border: 2px solid #64748B;
}
.nx-btn-secondary-outline:hover {
background: transparent;
border-color: #64748B;
}
/* Menghapus focus states */
[class*="nx-btn-secondary"]:focus {
outline: none;
box-shadow: none;
}
/* Menghapus active states */
[class*="nx-btn-secondary"]:active {
transform: none;
}
/* Loading states untuk secondary buttons */
[class*="nx-btn-secondary"].loading {
position: relative;
color: transparent;
}
[class*="nx-btn-secondary"].loading::after {
content: '';
position: absolute;
width: 16px;
height: 16px;
top: 50%;
left: 50%;
margin: -8px 0 0 -8px;
border: 2px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: white;
animation: spin 0.8s linear infinite;
}
/* Size variations untuk secondary buttons */
[class*="nx-btn-secondary"].is-small {
font-size: 0.75rem;
height: 2rem;
padding: 0 0.75rem;
}
[class*="nx-btn-secondary"].is-medium {
font-size: 1.25rem;
height: 3rem;
padding: 0 1.5rem;
}
[class*="nx-btn-secondary"].is-large {
font-size: 1.5rem;
height: 3.5rem;
padding: 0 2rem;
}
/* Default style */
.nx-btn-dark.responsive {
padding: 0.75rem 1.5rem;
font-size: 1rem;
}
/* Tablet */
@media (max-width: 768px) {
.nx-btn-dark.responsive {
padding: 0.5rem 1rem;
font-size: 0.875rem;
width: 100%;
}
}
/* Mobile */
@media (max-width: 480px) {
.nx-btn-dark.responsive {
padding: 0.5rem;
font-size: 0.75rem;
width: 100%;
display: block;
margin-bottom: 0.5rem;
}
}
@media (forced-colors: active) {
.nx-btn-dark.high-contrast {
border: 2px solid currentColor;
}
}
@media (prefers-contrast: high) {
.nx-btn-dark.high-contrast {
border: 2px solid currentColor;
background: transparent;
color: currentColor;
}
}
.custom-size-sm {
font-size: 0.75rem;
padding: 0.25rem 0.5rem;
height: 24px;
}
.custom-size-xl {
font-size: 1.25rem;
padding: 0.75rem 1.5rem;
height: 48px;
}
.nx-btn-error {
border: 1px solid #ff4444 ;
position: relative;
}