-
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #853 from acelaya-forks/feature/shlink-web-component
Split reusable content into separated components
- Loading branch information
Showing
429 changed files
with
2,934 additions
and
2,594 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './Message'; | ||
export * from './Result'; | ||
export * from './SimpleCard'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/utils/forms/InputFormGroup.tsx → ...-frontend-kit/src/form/InputFormGroup.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/utils/SearchField.scss → ...nk-frontend-kit/src/form/SearchField.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export * from './Checkbox'; | ||
export * from './ToggleSwitch'; | ||
export * from './InputFormGroup'; | ||
export * from './LabeledFormGroup'; | ||
export * from './SearchField'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useRef, useState } from 'react'; | ||
import { v4 as uuid } from 'uuid'; | ||
|
||
type ToggleResult = [boolean, () => void, () => void, () => void]; | ||
|
||
export const useToggle = (initialValue = false): ToggleResult => { | ||
const [flag, setFlag] = useState<boolean>(initialValue); | ||
return [flag, () => setFlag(!flag), () => setFlag(true), () => setFlag(false)]; | ||
}; | ||
|
||
export const useDomId = (): string => { | ||
const { current: id } = useRef(`dom-${uuid()}`); | ||
return id; | ||
}; | ||
|
||
export const useElementRef = <T>() => useRef<T | null>(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
@import './utils/ResponsiveTable'; | ||
@import './theme/theme'; | ||
|
||
/* stylelint-disable no-descending-specificity */ | ||
|
||
a, | ||
.btn-link { | ||
text-decoration: none; | ||
} | ||
|
||
/* stylelint-disable-next-line selector-max-pseudo-class */ | ||
a:not(.nav-link):not(.navbar-brand):not(.page-link):not(.highlight-card):not(.btn):not(.dropdown-item):hover, | ||
.btn-link:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
.bg-main { | ||
background-color: $mainColor !important; | ||
} | ||
|
||
.bg-warning { | ||
color: $lightTextColor; | ||
} | ||
|
||
.card-body, | ||
.card-header, | ||
.list-group-item { | ||
background-color: transparent; | ||
} | ||
|
||
.card-footer { | ||
background-color: var(--primary-color-alfa); | ||
} | ||
|
||
.card { | ||
box-shadow: 0 .125rem .25rem rgb(0 0 0 / .075); | ||
background-color: var(--primary-color); | ||
border-color: var(--border-color); | ||
} | ||
|
||
.list-group { | ||
background-color: var(--primary-color); | ||
} | ||
|
||
.modal-content, | ||
.page-link, | ||
.page-item.disabled .page-link, | ||
.dropdown-menu { | ||
background-color: var(--primary-color); | ||
} | ||
|
||
.modal-header, | ||
.modal-footer, | ||
.card-header, | ||
.card-footer, | ||
.table thead th, | ||
.table th, | ||
.table td, | ||
.page-link, | ||
.page-link:hover, | ||
.page-item.disabled .page-link, | ||
.dropdown-divider, | ||
.dropdown-menu, | ||
.list-group-item, | ||
.modal-content, | ||
hr { | ||
border-color: var(--border-color); | ||
} | ||
|
||
.table-bordered, | ||
.table-bordered thead th, | ||
.table-bordered thead td { | ||
border-color: var(--table-border-color); | ||
} | ||
|
||
.page-link:hover, | ||
.page-link:focus { | ||
background-color: var(--secondary-color); | ||
} | ||
|
||
.page-item.active .page-link { | ||
background-color: var(--brand-color); | ||
border-color: var(--brand-color); | ||
} | ||
|
||
.pagination .page-link { | ||
cursor: pointer; | ||
} | ||
|
||
.container-xl { | ||
@media (min-width: $xlgMin) { | ||
max-width: 1320px; | ||
} | ||
|
||
@media (max-width: $smMax) { | ||
padding-right: 0; | ||
padding-left: 0; | ||
} | ||
} | ||
|
||
/* Deprecated. Brought from bootstrap 4 */ | ||
.btn-block { | ||
display: block; | ||
width: 100%; | ||
} | ||
|
||
.btn-primary, | ||
.btn-primary:hover, | ||
.btn-primary:active, | ||
.btn-primary.active, | ||
.btn-outline-primary:hover, | ||
.btn-outline-primary:active, | ||
.btn-outline-primary.active, { | ||
color: #ffffff; | ||
} | ||
|
||
.dropdown-item, | ||
.dropdown-item-text { | ||
color: var(--text-color); | ||
} | ||
|
||
.dropdown-item:not(:disabled) { | ||
cursor: pointer; | ||
} | ||
|
||
.dropdown-item:focus:not(:disabled), | ||
.dropdown-item:hover:not(:disabled), | ||
.dropdown-item.active:not(:disabled), | ||
.dropdown-item:active:not(:disabled) { | ||
background-color: var(--active-color) !important; | ||
color: var(--text-color) !important; | ||
} | ||
|
||
.dropdown-item--danger.dropdown-item--danger { | ||
color: $dangerColor; | ||
|
||
&:hover, | ||
&:active, | ||
&.active { | ||
color: $dangerColor !important; | ||
} | ||
} | ||
|
||
.badge-main { | ||
color: #ffffff; | ||
background-color: var(--brand-color); | ||
} | ||
|
||
.close, | ||
.close:hover, | ||
.table, | ||
.table-hover > tbody > tr:hover > *, | ||
.table-hover > tbody > tr > * { | ||
color: var(--text-color); | ||
} | ||
|
||
.btn-close { | ||
filter: var(--btn-close-filter); | ||
} | ||
|
||
.table-hover tbody tr:hover { | ||
background-color: var(--secondary-color); | ||
} | ||
|
||
.form-control, | ||
.form-control:focus { | ||
background-color: var(--primary-color); | ||
border-color: var(--input-border-color); | ||
color: var(--input-text-color); | ||
} | ||
|
||
.form-control.disabled, | ||
.form-control:disabled { | ||
background-color: var(--input-disabled-color); | ||
cursor: not-allowed; | ||
} | ||
|
||
.card .form-control:not(:disabled), | ||
.card .form-control:not(:disabled):hover { | ||
background-color: var(--input-color); | ||
} | ||
|
||
.table-active, | ||
.table-active > th, | ||
.table-active > td { | ||
background-color: var(--table-highlight-color) !important; | ||
} | ||
|
||
.navbar-brand { | ||
@media (max-width: $smMax) { | ||
margin: 0 auto !important; | ||
} | ||
} | ||
|
||
.indivisible { | ||
white-space: nowrap; | ||
} | ||
|
||
.pointer { | ||
cursor: pointer; | ||
} | ||
|
||
.progress-bar { | ||
background-color: $mainColor; | ||
} | ||
|
||
.btn-xs-block { | ||
@media (max-width: $xsMax) { | ||
width: 100%; | ||
display: block; | ||
} | ||
} | ||
|
||
.btn-md-block { | ||
@media (max-width: $mdMax) { | ||
width: 100%; | ||
display: block; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export * from './block'; | ||
export * from './form'; | ||
export * from './hooks'; | ||
export * from './navigation'; | ||
export * from './ordering'; | ||
export * from './theme'; | ||
export * from './utils'; |
2 changes: 1 addition & 1 deletion
2
src/utils/DropdownBtn.scss → ...ntend-kit/src/navigation/DropdownBtn.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/utils/NavPills.scss → ...frontend-kit/src/navigation/NavPills.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@import './base'; | ||
@import '../base'; | ||
|
||
.nav-pills__nav { | ||
position: sticky !important; | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from './DropdownBtn'; | ||
export * from './RowDropdownBtn'; | ||
export * from './NavPills'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './ordering'; | ||
export * from './OrderingDropdown'; |
Oops, something went wrong.