Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
fdd263c
fix(tags): harmonize compact interactive states
agarrone Nov 13, 2026
5a24cee
docs(design): add tags and labels gallery
agarrone Nov 13, 2026
ca8d74b
fix(design): align tags and badges with design lab
agarrone Nov 13, 2026
d99420b
fix(tags): keep a visible stroke on metadata tags
agarrone Nov 14, 2026
9fc97b7
fix(design): compare card labels and simplify tag examples
agarrone Nov 14, 2026
11349eb
feat(design): show table status badges
agarrone Nov 14, 2026
549dcc8
fix(badges): center compact table statuses
agarrone Nov 14, 2026
5ecee9e
fix(badges): optically center table status content
agarrone Nov 14, 2026
7b173e8
fix(badges): align card and HVD status palette
agarrone Nov 14, 2026
ac241b0
fix(badges): preserve account access yellow tone
agarrone Nov 14, 2026
8ef5dc2
docs(design): expand tag and badge gallery
agarrone Nov 14, 2026
ed02ddc
fix(access): align badges with card labels
agarrone Nov 14, 2026
73271a8
docs(design): refine tag gallery examples
agarrone Nov 14, 2026
94b89cb
fix(design): align tag toggletip and icon order
agarrone Nov 14, 2026
9301e61
fix(tags): align icons optically
agarrone Nov 15, 2026
29320d7
fix(tags): normalize icon geometry
agarrone Nov 15, 2026
dd1aa66
fix(tags): center icons without offsets
agarrone Nov 15, 2026
0f358a4
fix(tags): tune optical icon alignment
agarrone Nov 15, 2026
98ee36e
fix(tags): unify compact typography
agarrone Nov 16, 2026
0a39c3c
fix(tags): keep all compact icons at 14px
agarrone Nov 16, 2026
d9d56cf
fix(tags): remove neutral pill backgrounds
agarrone Nov 16, 2026
062b0a3
fix(tags): align tooltip content styling
agarrone Nov 16, 2026
f3bc430
fix(badges): apply per-icon optical alignment
agarrone Nov 16, 2026
20202bd
fix(badges): lift compact labels optically
agarrone Nov 16, 2026
95a5165
fix(badges): center compact content geometrically
agarrone Nov 16, 2026
1f81ade
fix(badges): lift compact labels optically
agarrone Nov 16, 2026
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
232 changes: 232 additions & 0 deletions assets/css/overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,238 @@
@apply w-10 leading-0 text-lg;
}

/*
* Compact tags and interaction states owned by cdata.
*
* Consumer implementation of the Component Design Lab proposal. Static tags
* stay neutral; interactive tags use DSFR action colours and selected filters
* keep the high blue state.
*/
.fr-tag {
box-sizing: border-box;
gap: 0.25rem;
font-size: 0.75rem;
font-weight: 400;
line-height: 1.5rem;
height: 1.5rem;
min-height: 1.5rem;
padding: 0.125rem 0.5rem;
border: 1px solid var(--border-default-grey);
border-radius: 0.75rem;
color: var(--text-label-grey);
background-color: transparent;
}

/*
* Keep one 14 px icon frame. The text line box fills the 24 px tag and flex
* alignment centres the icon inside that same box, without vertical offsets.
*/
.fr-tag:has(> svg:first-child) {
padding-inline-start: 0.375rem;
}

.fr-tag > svg:first-child {
display: block;
flex: none;
width: 0.875rem !important;
height: 0.875rem !important;
}

.fr-tag > .cdata-tag__label {
transform: translateY(-0.0625rem);
}

@layer utilities {
.cdata-tag:has(> svg:first-child) {
padding-inline-start: 0.375rem !important;
}

.cdata-tag > svg:first-child {
display: block;
flex: none;
width: 0.875rem !important;
height: 0.875rem !important;
}

/* The shared Tag's -1 px label offset is the optical alignment used by cdata. */
}

/*
* @datagouv/components-next Tag does not expose a bordered variant yet.
* cdata adds the Design Lab stroke to its direct examples and to the tags
* rendered by DatasetInformationSection without changing the shared package.
*/
@layer utilities {
.cdata-tag,
.cdata-dataset-information .fr-raw-link > span {
box-sizing: border-box;
height: 1.5rem;
min-height: 1.5rem;
border: 1px solid var(--border-default-grey) !important;
font-weight: 400 !important;
line-height: 1.5rem !important;
background-color: transparent !important;
}

.cdata-tag-link:hover > .cdata-tag,
.cdata-tag-link:focus-visible > .cdata-tag,
.cdata-dataset-information .fr-raw-link:hover > span,
.cdata-dataset-information .fr-raw-link:focus-visible > span {
color: var(--text-action-high-blue-france) !important;
border-color: var(--border-action-high-blue-france) !important;
background-color: var(--background-action-low-blue-france) !important;
}
}

.cdata-tag-link:focus-visible,
.cdata-dataset-information .fr-raw-link:focus-visible {
border-radius: 0.75rem;
outline: 2px solid var(--border-active-blue-france);
outline-offset: 2px;
}

:is(a[href], button:not(:disabled), input[type="button"]:not(:disabled)).fr-tag:not([aria-pressed="true"]) {
color: var(--text-label-grey);
background-color: transparent;
--hover: var(--background-action-low-blue-france);
--active: var(--background-action-low-blue-france-active);
--hover-tint: var(--background-action-low-blue-france);
--active-tint: var(--background-action-low-blue-france-active);
}

:is(a[href], button:not(:disabled), input[type="button"]:not(:disabled)).fr-tag:not([aria-pressed="true"]):focus-visible {
color: var(--text-action-high-blue-france);
background-color: var(--background-action-low-blue-france);
outline: 2px solid var(--border-active-blue-france);
outline-offset: 2px;
}

:is(a[href], button:not(:disabled), input[type="button"]:not(:disabled)).fr-tag:not([aria-pressed="true"]):is(:hover, :active) {
color: var(--text-action-high-blue-france);
}

:is(a[href], button:not(:disabled), input[type="button"]:not(:disabled)).fr-tag:not([aria-pressed="true"]):hover {
background-color: var(--background-action-low-blue-france) !important;
}

:is(a[href], button:not(:disabled), input[type="button"]:not(:disabled)).fr-tag:not([aria-pressed="true"]):active {
background-color: var(--background-action-low-blue-france-active) !important;
}

:is(button, input[type="button"]).fr-tag[aria-pressed="true"]:not(:disabled) {
color: var(--text-inverted-blue-france);
background-color: var(--background-action-high-blue-france);
--hover: var(--background-action-high-blue-france);
--active: var(--background-action-high-blue-france-active);
--hover-tint: var(--background-action-high-blue-france);
--active-tint: var(--background-action-high-blue-france-active);
}

:is(button, input[type="button"]).fr-tag[aria-pressed="true"]:not(:disabled):focus-visible {
outline: 2px solid var(--border-active-blue-france);
outline-offset: 2px;
}

:is(button, input[type="button"]).fr-tag[aria-pressed="true"]:not(:disabled),
:is(button, input[type="button"]).fr-tag[aria-pressed="true"]:not(:disabled):hover {
background-color: var(--background-action-high-blue-france) !important;
background-image: none !important;
}

:is(button, input[type="button"]).fr-tag[aria-pressed="true"]::after {
content: none !important;
}

:is(button, input[type="button"]).fr-tag:disabled {
color: var(--text-disabled-grey);
background-color: var(--background-disabled-grey);
--hover: var(--background-disabled-grey);
--active: var(--background-disabled-grey);
--hover-tint: var(--background-disabled-grey);
--active-tint: var(--background-disabled-grey);
}

/*
* DatasetLabelTag belongs to @datagouv/components-next. The consumer class keeps
* cdata's linked instance neutral at rest and preserves the SVG's native pixels.
* `!important` is required because the package ships Tailwind in important mode.
*/
@layer utilities {
.cdata-dataset-label-tag {
box-sizing: border-box;
min-height: 1.5rem;
padding: 0.0625rem 0.5rem 0.1875rem !important;
border: 1px solid var(--border-default-grey) !important;
border-radius: 999px !important;
font-size: 0.75rem !important;
font-weight: 400 !important;
line-height: 1.125rem !important;
text-transform: none !important;
color: var(--text-label-grey) !important;
background-color: transparent !important;
gap: 0.25rem !important;
}

a.cdata-dataset-label-tag:hover,
a.cdata-dataset-label-tag:focus-visible {
color: var(--text-action-high-blue-france) !important;
background-color: var(--background-action-low-blue-france) !important;
}

a.cdata-dataset-label-tag:active {
background-color: var(--background-action-low-blue-france-active) !important;
}

.datagouv-components .cdata-dataset-label-tag > img {
width: 0.875rem;
height: 0.875rem;
object-fit: contain;
flex-shrink: 0;
transform: translateY(0.0625rem);
}

.datagouv-components .cdata-dataset-label-tag > img.bg-white {
background-color: transparent !important;
border-radius: 0 !important;
}
}

a.cdata-dataset-label-tag:focus-visible {
outline: 2px solid var(--border-active-blue-france);
outline-offset: 2px;
}

/* The business badge keeps its semantic colour; only its label is underlined. */
.hvd-status-badge-link {
display: inline-flex;
border-radius: 0.25rem;
background-color: transparent !important;
background-image: none !important;
--hover-tint: transparent;
--active-tint: transparent;
}

.hvd-status-badge-link::after {
content: none !important;
}

.hvd-status-badge-link:hover,
.hvd-status-badge-link:active,
.hvd-status-badge-link:focus-visible {
background-color: transparent !important;
}

.hvd-status-badge-link:hover > span > span {
text-decoration-line: underline;
text-decoration-thickness: 1px;
text-underline-offset: 2px;
}

.hvd-status-badge-link:focus-visible {
outline: 2px solid var(--border-active-blue-france);
outline-offset: 2px;
}

/* Breadcrumb placed on a coloured hero background (OnboardingHero, EditoHeader).
Links inherit the container colour and the separator chevrons use currentColor,
so a single white colour covers the whole breadcrumb. The hero owns the
Expand Down
35 changes: 21 additions & 14 deletions components/AccessTypes/AccessTypeBadge.vue
Original file line number Diff line number Diff line change
@@ -1,33 +1,40 @@
<template>
<AdminBadge
class="!font-medium"
size="sm"
:type
:type="display.type"
:icon="display.icon"
>
{{ label }}
{{ display.label }}
</AdminBadge>
</template>

<script setup lang="ts">
import type { AccessType } from '@datagouv/components-next'
import { RiLockLine, RiPassValidLine } from '@remixicon/vue'
import type { Component } from 'vue'
import type { AdminBadgeType } from '~/types/types'

const props = defineProps<{ accessType: AccessType }>()

const { t } = useTranslation()

const label = computed(() => {
const display = computed<{ label: string, type: AdminBadgeType, icon?: Component }>(() => {
return {
open: t('Ouvert'),
open_with_account: t('Ouvert avec compte'),
restricted: t('Restreint'),
}[props.accessType]
})

const type = computed(() => {
return {
open: 'success' as AdminBadgeType,
open_with_account: 'warning' as AdminBadgeType,
restricted: 'warning' as AdminBadgeType,
open: {
label: t('Ouvert'),
type: 'success' as const,
},
open_with_account: {
label: t('Ouvert avec un compte'),
type: 'yellow' as const,
icon: RiPassValidLine,
},
restricted: {
label: t('Accès restreint'),
type: 'warning' as const,
icon: RiLockLine,
},
}[props.accessType]
})
</script>
Loading
Loading