diff --git a/.storybook/storybook.scss b/.storybook/storybook.scss index 076eb4d4..787604bb 100644 --- a/.storybook/storybook.scss +++ b/.storybook/storybook.scss @@ -252,13 +252,11 @@ margin-top: 0.5rem; } - .tna-chip-list { + .tna-dl-chips { margin-top: 1rem; - - flex-wrap: nowrap; } - .fa-solid { + p .fa-solid { // margin-left: 0.5rem; &.light-icon { diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d893c23..ebfdf95e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Theme selector is hidden when forced colors mode is enabled +- The markup for a chip list has been updated ### Deprecated ### Removed diff --git a/src/nationalarchives/components/card/card.stories.js b/src/nationalarchives/components/card/card.stories.js index 9da9d52c..2dfd57a4 100644 --- a/src/nationalarchives/components/card/card.stories.js +++ b/src/nationalarchives/components/card/card.stories.js @@ -157,9 +157,9 @@ Meta.args = { label: "New", labelColour: "green", meta: [ - { text: "24th September 2023", icon: "calendar" }, - { text: "From £16", icon: "ticket" }, - { text: "Online", icon: "location-dot" }, + { title: "Event date", text: "24th September 2023", icon: "calendar" }, + { title: "Cost", text: "From £16", icon: "ticket" }, + { title: "Location", text: "Online", icon: "location-dot" }, ], body: "

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vel tincidunt velit, a molestie turpis.

", htmlElement: "article", diff --git a/src/nationalarchives/components/card/fixtures.json b/src/nationalarchives/components/card/fixtures.json index fd8528eb..14af6586 100644 --- a/src/nationalarchives/components/card/fixtures.json +++ b/src/nationalarchives/components/card/fixtures.json @@ -18,7 +18,7 @@ "headingLevel": 3, "body": "

Card body

" }, - "html": "

Card supertitleCard title

Card body

" + "html": "

Card supertitle

Card title

Card body

" }, { "name": "heading size", @@ -70,7 +70,7 @@ ], "body": "

Card body

" }, - "html": "

Card title

  • 24th September 2023
  • From £16
  • Online

Card body

" + "html": "

Card title

24th September 2023
From £16
Online

Card body

" }, { "name": "with text", diff --git a/src/nationalarchives/components/card/template.njk b/src/nationalarchives/components/card/template.njk index 8692281a..8e93e133 100644 --- a/src/nationalarchives/components/card/template.njk +++ b/src/nationalarchives/components/card/template.njk @@ -15,8 +15,8 @@
{%- if params.supertitle %}
+

{{ params.supertitle }}

- {{ params.supertitle }} {%- if params.href %} {{ params.title }} {%- else %} @@ -61,18 +61,19 @@ {%- endif %}
{%- if params.meta %} -
    +
    {%- for item in params.meta %} -
  • -
    +
    {{ item.title }}
    +
    + {%- if item.icon %} {%- endif %} {{ item.text }} -
    -
  • + + {%- endfor %} -
+ {%- endif %} {%- if params.text %}

{{ params.text }}

diff --git a/src/nationalarchives/components/checkboxes/fixtures.json b/src/nationalarchives/components/checkboxes/fixtures.json index 2f8ce3db..795489ec 100644 --- a/src/nationalarchives/components/checkboxes/fixtures.json +++ b/src/nationalarchives/components/checkboxes/fixtures.json @@ -24,7 +24,7 @@ } ] }, - "html": "

Categories

" + "html": "

Categories

" }, { "name": "small checkboxes", @@ -78,7 +78,7 @@ ], "small": true }, - "html": "

Categories

" + "html": "

Categories

" }, { "name": "checkboxes with a preselected value", @@ -104,7 +104,7 @@ } ] }, - "html": "

Categories

" + "html": "

Categories

" }, { "name": "checkboxes with a hint", @@ -130,7 +130,7 @@ } ] }, - "html": "

Categories

Select all that apply.

" + "html": "

Categories

Select all that apply.

" }, { "name": "checkboxes with an error", @@ -158,7 +158,7 @@ } ] }, - "html": "

Categories

Error: You must select a category

" + "html": "

Categories

Error: You must select a category

" }, { "name": "inline checkboxes", diff --git a/src/nationalarchives/components/checkboxes/template.njk b/src/nationalarchives/components/checkboxes/template.njk index 49a5c84d..645d0451 100644 --- a/src/nationalarchives/components/checkboxes/template.njk +++ b/src/nationalarchives/components/checkboxes/template.njk @@ -4,7 +4,8 @@ {%- if params.inline -%} {%- set containerClasses = containerClasses.concat('tna-form__group--inline') -%} {%- endif -%} -
+{%- set classes = containerClasses | join(' ') -%} +
diff --git a/src/nationalarchives/components/compound-filters/fixtures.json b/src/nationalarchives/components/compound-filters/fixtures.json index ddf1c17b..ea6769e8 100644 --- a/src/nationalarchives/components/compound-filters/fixtures.json +++ b/src/nationalarchives/components/compound-filters/fixtures.json @@ -39,7 +39,7 @@ } ] }, - "html": "" + "html": "" } ] } diff --git a/src/nationalarchives/components/compound-filters/template.njk b/src/nationalarchives/components/compound-filters/template.njk index 4c843a76..f5e63be0 100644 --- a/src/nationalarchives/components/compound-filters/template.njk +++ b/src/nationalarchives/components/compound-filters/template.njk @@ -1,5 +1,6 @@ {%- set containerClasses = [params.classes] if params.classes else [] -%} -
    +{%- set classes = containerClasses | join(' ') -%} +
      {%- for item in params.items %}
    • {{ item.label }} diff --git a/src/nationalarchives/components/cookie-banner/fixtures.json b/src/nationalarchives/components/cookie-banner/fixtures.json index f4ba6bbb..460392e2 100644 --- a/src/nationalarchives/components/cookie-banner/fixtures.json +++ b/src/nationalarchives/components/cookie-banner/fixtures.json @@ -7,7 +7,7 @@ "serviceName": "My service", "cookiesUrl": "/cookies" }, - "html": "" + "html": "" }, { "name": "custom preferences set key", @@ -16,7 +16,7 @@ "cookiesUrl": "/cookies", "cookiesPreferencesSetKey": "custom" }, - "html": "" + "html": "" }, { "name": "custom policies", @@ -25,7 +25,7 @@ "cookiesUrl": "/cookies", "policies": "custom" }, - "html": "" + "html": "" }, { "name": "custom policies key", @@ -34,7 +34,7 @@ "cookiesUrl": "/cookies", "policiesKey": "custom_key" }, - "html": "" + "html": "" }, { "name": "with domain", @@ -43,7 +43,7 @@ "cookiesUrl": "/cookies", "cookiesDomain": "nationalarchives.gov.uk" }, - "html": "" + "html": "" }, { "name": "with path", @@ -52,7 +52,7 @@ "cookiesUrl": "/cookies", "cookiesPath": "/my-service" }, - "html": "" + "html": "" }, { "name": "with preferences set key", @@ -61,7 +61,7 @@ "cookiesUrl": "/cookies", "preferencesSetKey": "custom_preferences_set_key" }, - "html": "" + "html": "" }, { "name": "insecure", @@ -70,7 +70,7 @@ "cookiesUrl": "/cookies", "allowInsecure": true }, - "html": "" + "html": "" }, { "name": "with classes", @@ -90,7 +90,7 @@ "data-fixturetest": "pass" } }, - "html": "" + "html": "" } ] } diff --git a/src/nationalarchives/components/cookie-banner/template.njk b/src/nationalarchives/components/cookie-banner/template.njk index 03d7c5a6..3f2d2526 100644 --- a/src/nationalarchives/components/cookie-banner/template.njk +++ b/src/nationalarchives/components/cookie-banner/template.njk @@ -8,7 +8,8 @@ {%- elseif params.style == "tint" -%} {%- set containerClasses = containerClasses.concat('tna-cookie-banner--tint') -%} {%- endif -%} -