* feat: Add new icons * Revert "feat: Add new icons" This reverts commit 0acb403fe846dbb2e48fd22de35c3568c3cb4453. * feat: Add new icons for account menu * feat: Add new Icons * feat: Add "currentPane" state to prefs view * feat: Update account menu to new design * feat: Add input component with icon & toggle * fix: sync icon & function * fix: Fix eye icon * feat: Create re-usable checkbox feat: Add "merge local" option * feat: Allow using className on IconButton * feat: Add disabled state on input feat: Make toggle circle * refactor: Move checkbox to components * feat: Handle invalid email/password error * feat: Implement new design for Create Account * feat: Implement new account menu design * feat: Add disabled option to IconButton * feat: Set account menu pane from other component * feat: Add 2fa account menu pane feat: Add lock icon * feat: Remove unnecessary 2FA menu pane feat: Reset current menu pane on clickOutside * feat: Change "Log in" to "Sign in" * feat: Remove sync from footer * feat: Change "Login" to "Sign in" feat: Add spinner to "Syncing..." refactor: Use then-catch-finally for sync * feat: Use common enableCustomServer state * feat: Animate account menu closing * fix: Reset menu pane only after it's closed * feat: Add keyDown handler to InputWithIcon * feat: Handle Enter press in inputs * Update app/assets/javascripts/components/InputWithIcon.tsx Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com> * Update app/assets/javascripts/components/InputWithIcon.tsx Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com> * refactor: Use server state from AccountMenuState * Update app/assets/javascripts/components/AccountMenu/CreateAccount.tsx Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com> * Update app/assets/javascripts/components/AccountMenu/ConfirmPassword.tsx Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com> * feat: Use common AdvancedOptions * feat: Add "eye-off" icon and toggle state * feat: Allow undefined values * refactor: Remove enableCustomServer state * feat: Persist server option state * feat: Add bottom-100 and cursor-auto util classes refactor: Use bottom-100 and cursor-auto classes * refactor: Invert ternary operator * refactor: Remove unused imports * refactor: Use toggled as prop instead of state * refactor: Change "Log in/out" to "Sign in/out" * refactor: Change "Login" to "Sign in" * refactor: Remove hardcoded width/height * refactor: Use success class * feat: Remove hardcoded width & height from svg * fix: Fix chevron-down icon Co-authored-by: Antonella Sgarlatta <antsgar@gmail.com> Co-authored-by: Antonella Sgarlatta <antonella@standardnotes.org>
382 lines
5.6 KiB
SCSS
382 lines
5.6 KiB
SCSS
/* Components and utilities that are good candidates for extraction to StyleKit. */
|
|
|
|
.h-90vh {
|
|
height: 90vh;
|
|
}
|
|
|
|
.h-33 {
|
|
height: 8.25rem;
|
|
}
|
|
|
|
.hidden {
|
|
display: none;
|
|
}
|
|
|
|
.hover\:underline:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.sn-icon {
|
|
@extend .h-5;
|
|
@extend .w-5;
|
|
@extend .fill-current;
|
|
|
|
&.sn-icon--small {
|
|
@extend .h-3\.5;
|
|
@extend .w-3\.5;
|
|
}
|
|
}
|
|
|
|
.sn-dropdown {
|
|
@extend .bg-default;
|
|
@extend .rounded;
|
|
@extend .box-shadow;
|
|
|
|
z-index: $z-index-dropdown-menu;
|
|
|
|
&.sn-dropdown--anchor-right {
|
|
right: 0;
|
|
}
|
|
|
|
&[data-state='collapsed'] {
|
|
display: none;
|
|
}
|
|
|
|
&.sn-dropdown--animated {
|
|
@extend .transition-transform;
|
|
@extend .duration-150;
|
|
@extend .slide-down-animation;
|
|
}
|
|
|
|
&.sn-dropdown--small {
|
|
@extend .min-w-40;
|
|
}
|
|
}
|
|
|
|
.sn-dropdown-popover {
|
|
z-index: 3001;
|
|
|
|
&[data-reach-listbox-popover] {
|
|
background: var(--sn-stylekit-background-color);
|
|
}
|
|
}
|
|
|
|
.sn-dropdown-button {
|
|
@extend .rounded;
|
|
@extend .px-3\.5;
|
|
@extend .py-1\.75;
|
|
@extend .fit-content;
|
|
@extend .bg-default;
|
|
@extend .text-input;
|
|
@extend .color-text;
|
|
@extend .border-solid;
|
|
@extend .border-gray-300;
|
|
@extend .border-1;
|
|
@extend .min-w-55;
|
|
}
|
|
|
|
.sn-dropdown-button-label {
|
|
@extend .flex;
|
|
@extend .items-center;
|
|
}
|
|
|
|
.sn-dropdown-arrow {
|
|
@extend .flex;
|
|
|
|
&.sn-dropdown-arrow-flipped {
|
|
transform: rotate(180deg);
|
|
}
|
|
}
|
|
|
|
/** Lesser specificity will give priority to reach's styles */
|
|
[data-reach-custom-checkbox-container].sn-switch {
|
|
@extend .duration-150;
|
|
@extend .ease-out;
|
|
@extend .rounded-full;
|
|
@extend .transition-background;
|
|
@extend .bg-clip-padding;
|
|
@extend .cursor-pointer;
|
|
@extend .border-transparent;
|
|
@extend .w-8;
|
|
@extend .h-4\.5;
|
|
@extend .border-2;
|
|
@extend .border-solid;
|
|
@extend .focus-within\:ring-info;
|
|
@extend .focus-within\:outline-none;
|
|
@extend .focus-within\:border-background;
|
|
box-sizing: content-box;
|
|
}
|
|
|
|
.sn-switch-handle {
|
|
@extend .absolute;
|
|
@extend .block;
|
|
@extend .bg-default;
|
|
@extend .rounded-full;
|
|
|
|
@extend .ease-out;
|
|
@extend .transition-transform;
|
|
@extend .duration-150;
|
|
|
|
left: 2px;
|
|
@extend .w-3\.5;
|
|
@extend .h-3\.5;
|
|
top: 50%;
|
|
transform: translate(0px, -50%);
|
|
|
|
&.sn-switch-handle--right {
|
|
transform: translate(calc(2rem - 1.125rem), -50%);
|
|
}
|
|
}
|
|
|
|
.sn-component .sk-app-bar .sk-app-bar-item {
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.sn-dropdown-item {
|
|
@extend .flex;
|
|
@extend .items-center;
|
|
@extend .border-0;
|
|
@extend .focus\:inner-ring-info;
|
|
@extend .cursor-pointer;
|
|
@extend .hover\:bg-contrast;
|
|
@extend .color-text;
|
|
@extend .bg-transparent;
|
|
@extend .px-3;
|
|
@extend .py-1\.5;
|
|
@extend .text-left;
|
|
@extend .w-full;
|
|
|
|
&.sn-dropdown-item--no-icon {
|
|
@extend .py-2;
|
|
}
|
|
|
|
.sn-dropdown-popover & {
|
|
@extend .bg-default;
|
|
}
|
|
|
|
&[data-current-nav] {
|
|
color: var(--sn-stylekit-contrast-foreground-color);
|
|
@extend .bg-contrast;
|
|
@extend .hover\:color-text;
|
|
}
|
|
|
|
.sn-dropdown-popover &[data-current-selected] {
|
|
background-color: var(--sn-stylekit-info-backdrop-color);
|
|
@extend .color-info;
|
|
}
|
|
}
|
|
|
|
.sn-tag {
|
|
@extend .h-6;
|
|
@extend .bg-contrast;
|
|
@extend .border-0;
|
|
@extend .rounded;
|
|
@extend .text-xs;
|
|
@extend .color-text;
|
|
@extend .py-1;
|
|
@extend .py-2;
|
|
@extend .pr-2;
|
|
@extend .flex;
|
|
@extend .items-center;
|
|
@extend .mt-2;
|
|
@extend .cursor-pointer;
|
|
@extend .hover\:bg-secondary-contrast;
|
|
@extend .focus\:bg-secondary-contrast;
|
|
}
|
|
|
|
.sn-titlebar {
|
|
@extend .w-full;
|
|
@extend .bg-default;
|
|
@extend .h-14;
|
|
|
|
@extend .border-bottom-solid;
|
|
@extend .border-b-1;
|
|
@extend .border-gray-300;
|
|
|
|
@extend .py-3;
|
|
@extend .px-3;
|
|
|
|
@extend .flex;
|
|
@extend .flex-row;
|
|
}
|
|
|
|
.sn-title {
|
|
@extend .font-bold;
|
|
}
|
|
|
|
.ml-0-important {
|
|
margin-left: 0rem !important;
|
|
}
|
|
|
|
.ml-3 {
|
|
margin-left: 0.75rem;
|
|
}
|
|
.ml-4 {
|
|
margin-left: 1rem;
|
|
}
|
|
|
|
.mr-3 {
|
|
margin-right: 0.75rem;
|
|
}
|
|
|
|
.my-1\.5 {
|
|
margin-top: 0.375rem;
|
|
margin-bottom: 0.375rem;
|
|
}
|
|
|
|
.my-4 {
|
|
margin-top: 1rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.mb-2 {
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.max-w-89 {
|
|
max-width: 22.25rem;
|
|
}
|
|
|
|
.w-92 {
|
|
width: 23rem;
|
|
}
|
|
|
|
.min-w-1 {
|
|
min-width: 0.25rem;
|
|
}
|
|
|
|
.min-w-2 {
|
|
min-width: 0.5rem;
|
|
}
|
|
|
|
.min-w-3 {
|
|
min-width: 0.75rem;
|
|
}
|
|
|
|
.min-w-5 {
|
|
min-width: 1.25rem;
|
|
}
|
|
|
|
.min-w-6 {
|
|
min-width: 1.5rem;
|
|
}
|
|
|
|
.min-w-7 {
|
|
min-width: 1.75rem;
|
|
}
|
|
|
|
.min-w-15 {
|
|
min-width: 3.75rem;
|
|
}
|
|
|
|
.min-h-1 {
|
|
min-height: 0.25rem;
|
|
}
|
|
|
|
.min-h-2 {
|
|
min-height: 0.5rem;
|
|
}
|
|
|
|
.min-h-3 {
|
|
min-height: 0.75rem;
|
|
}
|
|
|
|
.min-h-4 {
|
|
min-height: 1rem;
|
|
}
|
|
|
|
.min-h-6 {
|
|
min-height: 1.5rem;
|
|
}
|
|
|
|
.max-h-5 {
|
|
max-height: 1.25rem;
|
|
}
|
|
|
|
.border-danger {
|
|
border-color: var(--sn-stylekit-danger-color);
|
|
}
|
|
|
|
.bg-inverted-default {
|
|
background-color: var(--sn-stylekit-contrast-foreground-color);
|
|
}
|
|
|
|
.color-inverted-default {
|
|
color: var(--sn-stylekit-background-color);
|
|
}
|
|
|
|
.pt-1 {
|
|
padding-top: 0.25rem;
|
|
}
|
|
|
|
.pt-1\.5 {
|
|
padding-top: 0.375rem;
|
|
}
|
|
|
|
.pt-2 {
|
|
padding-top: 0.5rem;
|
|
}
|
|
|
|
.pb-1 {
|
|
padding-bottom: 0.25rem;
|
|
}
|
|
|
|
.px-9 {
|
|
padding-left: 2.25rem;
|
|
padding-right: 2.25rem;
|
|
}
|
|
|
|
.px-12 {
|
|
padding-left: 3rem;
|
|
padding-right: 3rem;
|
|
}
|
|
|
|
.py-9 {
|
|
padding-top: 2.25rem;
|
|
padding-bottom: 2.25rem;
|
|
}
|
|
|
|
.select-none {
|
|
user-select: none;
|
|
}
|
|
|
|
.sn-component .btn-w-full {
|
|
width: 100%;
|
|
}
|
|
|
|
.cursor-not-allowed {
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.hover\:bg-grey-4:hover {
|
|
background: var(--sn-stylekit-grey-4);
|
|
}
|
|
|
|
.sn-component .spinner-info {
|
|
border-color: var(--sn-stylekit-info-color);
|
|
border-right-color: transparent;
|
|
}
|
|
|
|
@keyframes slide-up {
|
|
0% {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
100% {
|
|
opacity: 0;
|
|
transform: translateY(-10px);
|
|
}
|
|
}
|
|
|
|
.slide-up-animation {
|
|
animation: slide-up 0.2s ease;
|
|
}
|
|
|
|
.bottom-100 {
|
|
bottom: 100%;
|
|
}
|
|
|
|
.cursor-auto {
|
|
cursor: auto;
|
|
}
|