-
Notifications
You must be signed in to change notification settings - Fork 1
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 #356 from delta10/style/purmerend
refactor: move almost everything out of `globals.css`
- Loading branch information
Showing
23 changed files
with
406 additions
and
331 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
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,31 @@ | ||
.signalen-progress-bar { | ||
box-sizing: border-box; | ||
display: inline-flex; | ||
background-color: var( | ||
--signalen-progress-bar-background-color, | ||
var(--basis-color-disabled-fill-1) | ||
); | ||
block-size: var(--signalen-progress-bar-block-size, 0.5rem); | ||
border-radius: var(--signalen-progress-bar-border-radius); | ||
overflow: hidden; | ||
} | ||
|
||
.signalen-progress-bar__complete { | ||
display: block; | ||
background-color: var( | ||
--signalen-progress-bar-complete-background-color, | ||
var(--basis-color-primary-fill-1) | ||
); | ||
} | ||
|
||
@media screen and (forced-colors: active) { | ||
.signalen-progress-bar { | ||
border-width: 1px; | ||
border-style: solid; | ||
border-color: CanvasText; | ||
background-color: Canvas; | ||
} | ||
.signalen-progress-bar__complete { | ||
background-color: CanvasText; | ||
} | ||
} |
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 './ProgressBar.css' | ||
|
||
export interface ProgressBarProps { | ||
value: number | ||
} | ||
|
||
export const ProgressBar = ({ value }: ProgressBarProps) => ( | ||
<data value={value} className="signalen-progress-bar"> | ||
<span | ||
className="signalen-progress-bar__complete" | ||
style={{ | ||
inlineSize: `${Math.min(value * 100, 100)}%`, | ||
}} | ||
/> | ||
</data> | ||
) |
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,64 @@ | ||
/* map */ | ||
.map-location-group { | ||
position: absolute; | ||
left: 1em; | ||
top: 1em; | ||
display: flex; | ||
gap: 8px; | ||
} | ||
|
||
.map-location-alert { | ||
padding: 12px 16px !important; | ||
} | ||
|
||
.map-button { | ||
padding-bottom: 16px !important; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.map-close-button { | ||
position: absolute; | ||
right: 1em; | ||
top: 1em; | ||
gap: 0 !important; | ||
} | ||
|
||
.map-zoom-button-group { | ||
position: absolute; | ||
right: 1em; | ||
bottom: 1em; | ||
gap: 0.5rem !important; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.map-alert-dialog__content { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 12px; | ||
} | ||
|
||
.focused-map-marker { | ||
width: 42px; | ||
height: 42px; | ||
border-radius: 999px; | ||
background-color: red; | ||
} | ||
|
||
.signalen-modal-dialog { | ||
background-color: var(--signalen-modal-dialog-background-color, Canvas); | ||
color: var(--signalen-modal-dialog-color, CanvasText); | ||
z-index: var(--signalen-modal-z-index, 1); | ||
} | ||
|
||
.signalen-modal-dialog--cover-viewport { | ||
position: fixed; | ||
inset-inline-end: 0; | ||
inset-inline-start: 0; | ||
inset-block-end: 0; | ||
inset-block-start: 0; | ||
overflow-block: auto; | ||
} |
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,4 @@ | ||
/* spinner */ | ||
.signalen-loading-icon { | ||
--utrecht-icon-size: var(--basis-size-icon-4xl, 4em); | ||
} |
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,9 @@ | ||
import { IconLoader2 } from '@tabler/icons-react' | ||
import { Icon } from '@/components' | ||
import './Spinner.css' | ||
|
||
export const Spinner = () => ( | ||
<Icon className="signalen-loading-icon"> | ||
<IconLoader2 className="animate-spin" /> | ||
</Icon> | ||
) |
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
31 changes: 31 additions & 0 deletions
31
src/app/[locale]/incident/summary/components/SummaryGrid.css
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,31 @@ | ||
/* summary page grid */ | ||
.summary-grid { | ||
display: grid; | ||
grid-template-areas: | ||
'summary-heading summary-link' | ||
'summary-body summary-body'; | ||
grid-template-columns: 1fr auto; | ||
gap: 1rem; | ||
} | ||
|
||
/* 640px is the "SM" breakpoint in tailwind */ | ||
@media only screen and (max-width: 640px) { | ||
.summary-grid { | ||
grid-template-areas: | ||
'summary-heading summary-heading' | ||
'summary-body summary-body' | ||
'summary-link summary-link'; | ||
} | ||
} | ||
|
||
.summary-grid__heading { | ||
grid-area: summary-heading; | ||
} | ||
|
||
.summary-grid__main { | ||
grid-area: summary-body; | ||
} | ||
|
||
.summary-grid__link { | ||
grid-area: summary-link; | ||
} |
31 changes: 31 additions & 0 deletions
31
src/app/[locale]/incident/summary/components/SummaryGrid.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { HTMLAttributes, PropsWithChildren } from 'react' | ||
import { clsx } from 'clsx' | ||
import './SummaryGrid.css' | ||
|
||
export const SummaryGrid = ({ | ||
children, | ||
className, | ||
}: PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => ( | ||
<div className={clsx('summary-grid', className)}>{children}</div> | ||
) | ||
|
||
export const SummaryGridMain = ({ | ||
children, | ||
className, | ||
}: PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => ( | ||
<div className={clsx('summary-grid__main', className)}>{children}</div> | ||
) | ||
|
||
export const SummaryGridLink = ({ | ||
children, | ||
className, | ||
}: PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => ( | ||
<div className={clsx('summary-grid__link', className)}>{children}</div> | ||
) | ||
|
||
export const SummaryGridHeading = ({ | ||
children, | ||
className, | ||
}: PropsWithChildren<HTMLAttributes<HTMLDivElement>>) => ( | ||
<div className={clsx('summary-grid__heading', className)}>{children}</div> | ||
) |
Oops, something went wrong.