Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: changed default font size from 13px to 16px #2601

Merged
merged 3 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/real-ravens-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@undp-data/svelte-undp-design": patch
---

fix: adjust font size option. now normal is 1rem, small is 0.75rem and medium is 1.5rem.
5 changes: 5 additions & 0 deletions .changeset/spicy-needles-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"geohub": patch
---

fix: changed default font size from 13px to 16px
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ const meta = {
fontSize: {
type: 'string',
description: 'Font size of the accordion header title.',
defaultValue: 'medium',
defaultValue: 'normal',
control: { type: 'select' },
options: ['small', 'medium']
options: ['small', 'normal', 'medium']
},
headerIcon: {
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
export let headerTitle: string;
export let isExpanded = false;
export let fontSize: 'small' | 'medium' = 'medium';
export let fontSize: 'small' | 'normal' | 'medium' = 'normal';
export let headerIcon = '';
</script>

Expand All @@ -16,7 +16,10 @@
isExpanded = !isExpanded;
}}
>
<p class="accordion-header" style="font-size:{fontSize === 'small' ? 1 : 1.5}rem">
<p
class="accordion-header"
style="font-size:{fontSize === 'small' ? 0.75 : fontSize === 'medium' ? 1.5 : 1}rem"
>
{#if headerIcon}
<i class={headerIcon} />
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
}

.tooltip {
font-size: 13px;
z-index: 10;
min-width: 350px;
max-width: 400px;
Expand Down
26 changes: 5 additions & 21 deletions sites/geohub/src/components/maplibre/circle/VectorCircle.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@
{#if !$legendReadonly}
<VectorSimulationAccordion {layerId} {tags} bind:expanded />

<Accordion
headerTitle="Circle radius"
fontSize="medium"
bind:isExpanded={expanded['circle-radius']}
>
<Accordion headerTitle="Circle radius" bind:isExpanded={expanded['circle-radius']}>
<div class="pb-2" slot="content">
<CircleRadius {layerId} bind:readonly={$legendReadonly} />
</div>
Expand All @@ -77,11 +73,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Circle color"
fontSize="medium"
bind:isExpanded={expanded['circle-color']}
>
<Accordion headerTitle="Circle color" bind:isExpanded={expanded['circle-color']}>
<div class="pb-2" slot="content">
<CircleColor {layerId} {metadata} />
</div>
Expand All @@ -90,11 +82,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Circle stroke color"
fontSize="medium"
bind:isExpanded={expanded['circle-stroke-color']}
>
<Accordion headerTitle="Circle stroke color" bind:isExpanded={expanded['circle-stroke-color']}>
<div class="pb-2" slot="content">
<CircleStrokeColor {layerId} />
</div>
Expand All @@ -103,11 +91,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Circle stroke width"
fontSize="medium"
bind:isExpanded={expanded['circle-stroke-width']}
>
<Accordion headerTitle="Circle stroke width" bind:isExpanded={expanded['circle-stroke-width']}>
<div class="pb-2" slot="content">
<CircleStrokeWidth {layerId} />
</div>
Expand All @@ -117,7 +101,7 @@
</div>
</Accordion>

<Accordion headerTitle="Opacity" fontSize="medium" bind:isExpanded={expanded['opacity']}>
<Accordion headerTitle="Opacity" bind:isExpanded={expanded['opacity']}>
<div class="pb-2" slot="content">
<OpacitySlider bind:layerId />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@
{#if !$legendReadonly}
<VectorSimulationAccordion {layerId} {tags} bind:expanded />

<Accordion
headerTitle="3D polygon color"
fontSize="medium"
bind:isExpanded={expanded['fill-extrusion-color']}
>
<Accordion headerTitle="3D polygon color" bind:isExpanded={expanded['fill-extrusion-color']}>
<div class="pb-2" slot="content">
<FillExtrusionColor {layerId} {metadata} />
</div>
Expand All @@ -75,11 +71,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Height of 3D polygon"
fontSize="medium"
bind:isExpanded={expanded['fill-extrusion-height']}
>
<Accordion headerTitle="Height of 3D polygon" bind:isExpanded={expanded['fill-extrusion-height']}>
<div class="pb-2" slot="content">
<FillExtrusionHeight {layerId} {metadata} />>
</div>
Expand All @@ -88,11 +80,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Base height"
fontSize="medium"
bind:isExpanded={expanded['fill-extrusion-base']}
>
<Accordion headerTitle="Base height" bind:isExpanded={expanded['fill-extrusion-base']}>
<div class="pb-2" slot="content">
<FillExtrusionBase {layerId} />
</div>
Expand All @@ -106,7 +94,6 @@

<Accordion
headerTitle="Vertical gradient to the sides"
fontSize="medium"
bind:isExpanded={expanded['fill-extrusion-vertical-gradient']}
>
<div class="pb-2" slot="content">
Expand All @@ -120,7 +107,7 @@
</div>
</Accordion>

<Accordion headerTitle="Opacity" fontSize="medium" bind:isExpanded={expanded['opacity']}>
<Accordion headerTitle="Opacity" bind:isExpanded={expanded['opacity']}>
<div class="pb-2" slot="content">
<OpacitySlider bind:layerId />
</div>
Expand Down
10 changes: 3 additions & 7 deletions sites/geohub/src/components/maplibre/fill/VectorPolygon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
{#if !$legendReadonly}
<VectorSimulationAccordion {layerId} {tags} bind:expanded />

<Accordion headerTitle="Fill color" fontSize="medium" bind:isExpanded={expanded['fill-color']}>
<Accordion headerTitle="Fill color" bind:isExpanded={expanded['fill-color']}>
<div class="pb-2" slot="content">
<FillColor {layerId} {metadata} />
</div>
Expand All @@ -69,11 +69,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Fill outline color"
fontSize="medium"
bind:isExpanded={expanded['fill-outline-color']}
>
<Accordion headerTitle="Fill outline color" bind:isExpanded={expanded['fill-outline-color']}>
<div class="pb-2" slot="content">
<FillOutlineColor {layerId} />
</div>
Expand All @@ -82,7 +78,7 @@
</div>
</Accordion>

<Accordion headerTitle="Opacity" fontSize="medium" bind:isExpanded={expanded['opacity']}>
<Accordion headerTitle="Opacity" bind:isExpanded={expanded['opacity']}>
<div class="pb-2" slot="content">
<OpacitySlider bind:layerId />
</div>
Expand Down
26 changes: 5 additions & 21 deletions sites/geohub/src/components/maplibre/heatmap/VectorHeatmap.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@
{#if !$legendReadonly}
<VectorSimulationAccordion {layerId} {tags} bind:expanded />

<Accordion
headerTitle="Heatmap color"
fontSize="medium"
bind:isExpanded={expanded['heatmap-color']}
>
<Accordion headerTitle="Heatmap color" bind:isExpanded={expanded['heatmap-color']}>
<div class="pb-2" slot="content">
<HeatmapColor {layerId} />
</div>
Expand All @@ -52,11 +48,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Heatmap Intensity"
fontSize="medium"
bind:isExpanded={expanded['heatmap-intensity']}
>
<Accordion headerTitle="Heatmap Intensity" bind:isExpanded={expanded['heatmap-intensity']}>
<div class="pb-2" slot="content">
<HeatmapIntensity {layerId} />
</div>
Expand All @@ -68,11 +60,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Heatmap Radius"
fontSize="medium"
bind:isExpanded={expanded['heatmap-radius']}
>
<Accordion headerTitle="Heatmap Radius" bind:isExpanded={expanded['heatmap-radius']}>
<div class="pb-2" slot="content">
<HeatmapRadius {layerId} />
</div>
Expand All @@ -84,11 +72,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Heatmap Weight"
fontSize="medium"
bind:isExpanded={expanded['heatmap-weight']}
>
<Accordion headerTitle="Heatmap Weight" bind:isExpanded={expanded['heatmap-weight']}>
<div class="pb-2" slot="content">
<HeatmapWeight {layerId} />
</div>
Expand All @@ -101,7 +85,7 @@
</div>
</Accordion>

<Accordion headerTitle="Opacity" fontSize="medium" bind:isExpanded={expanded['opacity']}>
<Accordion headerTitle="Opacity" bind:isExpanded={expanded['opacity']}>
<div class="pb-2" slot="content">
<OpacitySlider bind:layerId />
</div>
Expand Down
12 changes: 4 additions & 8 deletions sites/geohub/src/components/maplibre/line/VectorLine.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
{#if !$legendReadonly}
<VectorSimulationAccordion {layerId} {tags} bind:expanded />

<Accordion headerTitle="Line color" fontSize="medium" bind:isExpanded={expanded['line-color']}>
<Accordion headerTitle="Line color" bind:isExpanded={expanded['line-color']}>
<div class="pb-2" slot="content">
<LineColor {layerId} {metadata} />
</div>
Expand All @@ -72,7 +72,7 @@
</div>
</Accordion>

<Accordion headerTitle="Line width" fontSize="medium" bind:isExpanded={expanded['line-width']}>
<Accordion headerTitle="Line width" bind:isExpanded={expanded['line-width']}>
<div class="pb-2" slot="content">
<LineWidth {layerId} {metadata} />
</div>
Expand All @@ -81,11 +81,7 @@
</div>
</Accordion>

<Accordion
headerTitle="Line pattern"
fontSize="medium"
bind:isExpanded={expanded['line-pattern']}
>
<Accordion headerTitle="Line pattern" bind:isExpanded={expanded['line-pattern']}>
<div class="pb-2" slot="content">
<LinePattern {layerId} />
</div>
Expand All @@ -94,7 +90,7 @@
</div>
</Accordion>

<Accordion headerTitle="Opacity" fontSize="medium" bind:isExpanded={expanded['opacity']}>
<Accordion headerTitle="Opacity" bind:isExpanded={expanded['opacity']}>
<div class="pb-2" slot="content">
<OpacitySlider bind:layerId />
</div>
Expand Down
Loading
Loading