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

✨ Charm Release (v3) #1774

Merged
merged 129 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
0662a8b
BREAKING CHANGE(design-tokens): Introduce new design tokens structure…
crishpeen Aug 16, 2024
4484ba8
Style(design-tokens): Disable `operator-linebreak` to comply with exp…
crishpeen Nov 12, 2024
9764769
Feat(web-react): Rename spaces token object
crishpeen Oct 31, 2024
96a37c0
Test: Temporarily disable all visual tests and SCSS loading
crishpeen Aug 16, 2024
52431f4
BREAKING CHANGE(web): Introduce themes and use new design tokens for …
crishpeen Aug 18, 2024
61d0cc6
Feat(web): Switch Demo styles to v3 design tokens structure #DS-1430
crishpeen Aug 19, 2024
9b88a6b
Feat(web-twig): Switch Demo styles to v3 design tokens structure #DS-…
crishpeen Aug 27, 2024
8681e34
Feat(web): Switch Container and Grid styles to v3 design tokens struc…
crishpeen Aug 19, 2024
855b0e7
Docs(web,web-react,web-twig): Switch Grid spacing tokens to v3 structure
crishpeen Aug 19, 2024
635f019
Feat(web): Switch Collapse, Divider, Stack, ActionLayout & EmptyState…
crishpeen Aug 27, 2024
c628863
Docs(web,web-react,web-twig): Switch to v3 spacings in Tabs #DS-1444
crishpeen Aug 27, 2024
e43d885
Feat(web): Switch Tabs to v3 design tokens #DS-1444
crishpeen Aug 27, 2024
17b382e
Feat(web): Switch `Breadcrumbs` component to v3 design tokens #DS-1450
adamkudrna Aug 29, 2024
0f1e2b7
Feat(web): Switch PartnerLogo component to v3 design tokens #DS-1450
crishpeen Aug 29, 2024
ec68f61
Feat(storybook): Add themes to Storybook
crishpeen Aug 30, 2024
50fb656
Feat(web): Switch Flex component to v3 design tokens #DS-1444
crishpeen Aug 28, 2024
a7ef324
Docs(web-react): Use correct typography helper and spacings in Flex #…
crishpeen Sep 5, 2024
99f967c
BREAKING CHANGE(web): Remove inverted variant of `ProductLogo` #DS-1450
adamkudrna Aug 29, 2024
b94ec64
BREAKING CHANGE(web-react): Remove inverted variant of `ProductLogo` …
adamkudrna Aug 29, 2024
6e19bfa
Feat(web): Switch Dropdown component to v3 design tokens #DS-1450
crishpeen Aug 30, 2024
e7aa154
Feat(web): Switch Avatar component to v3 design tokens #DS-1450
crishpeen Aug 29, 2024
00a75c4
Docs(web-react): Switch Avatar demo spacings to v3 design token value…
crishpeen Aug 29, 2024
aa1d2fa
Docs: Set default background color to main element in demos
crishpeen Aug 27, 2024
246c08a
BREAKING CHANGE(web): Switch Button to v3 design tokens and remove in…
crishpeen Aug 27, 2024
f4e8e1f
BREAKING CHANGE(web-react): Remove inverted variant from Button and B…
crishpeen Aug 27, 2024
ec5ffab
BREAKING CHANGE(web-twig): Remove inverted variant from Button and Bu…
crishpeen Aug 27, 2024
d379eaf
Test: Enable visual testing of components and pages with Button
crishpeen Aug 31, 2024
9cd556d
Feat(web): Switch Alert component to v3 design tokens #DS-1446
crishpeen Aug 28, 2024
08e4eec
Feat(web): Stabilization of ProductLogo component #DS-1374
pavelklibani Sep 5, 2024
83ee4c9
Feat(web-react): Stabilization of ProductLogo component #DS-1374
pavelklibani Sep 5, 2024
3cd9f93
Feat(e2e): Update visual tests for ProductLogo #DS-1374
pavelklibani Sep 5, 2024
e4bb6ce
Feat(web): Switch Pagination component to v3 design tokens #DS-1450
crishpeen Sep 3, 2024
b9cad90
Feat(web): Switch ScrollView component to v3 design tokens #DS-1451
crishpeen Sep 2, 2024
c7974fd
Docs(web-react,web-twig): Use new spacing tokens values in ScrollView…
crishpeen Sep 2, 2024
059ce11
Feat(web): Switch Accordion component to v3 design tokens #DS-1451
crishpeen Sep 3, 2024
b4e2d05
Feat(web): Class modifier `hasSafeAreaDisabled` changed to `safeArea`…
pavelklibani Sep 6, 2024
1ee299c
Feat(web-react): Prop `hasSafeAreaDisabled` changed to `hasSafeArea` …
pavelklibani Sep 6, 2024
7260745
Feat(web): Switch Tag component to v3 design tokens #DS-1445
crishpeen Sep 5, 2024
52b6d13
Test: Update visual tests of Section and Collapse
crishpeen Sep 10, 2024
95c4fd3
Feat(web): Switch Modal component to v3 design tokens #DS-1452
crishpeen Sep 5, 2024
8a66345
Feat(web-react): Stabilization of PartnerLogo component #DS-1443
curdaj Sep 13, 2024
ee69796
Feat(web): Stabilization of PartnerLogo component #DS-1443
curdaj Sep 13, 2024
84599c3
Feat(web): Introduce background image urls generator to themes #DS-1447
crishpeen Aug 31, 2024
85b6c57
Feat(web): Switch Checkbox component to v3 design tokens #DS-1447
crishpeen Aug 31, 2024
848d9d6
BREAKING CHANGE(web): Switch TextField component to v3 design tokens …
crishpeen Sep 10, 2024
b386da9
Feat(web): Switch Radio component to v3 design tokens #DS-1447
crishpeen Sep 2, 2024
6e70e13
Feat(web): Switch Select component to v3 design tokens #DS-1447
crishpeen Sep 12, 2024
e824439
Feat(web): Switch TextArea component to v3 design tokens #DS-1447
crishpeen Sep 12, 2024
94cd88b
BREAKING CHANGE(web): Remove action colors from Pill and switch it to…
crishpeen Sep 7, 2024
f45baf9
BREAKING CHANGE(web-react): Remove action colors from Pill #DS-1446
crishpeen Sep 7, 2024
69cc2d0
BREAKING CHANGE(web-twig): Remove action colors from Pill #DS-1446
crishpeen Sep 7, 2024
7a0f684
Feat(web): Switch Tooltip component to v3 design tokens #DS-1451
crishpeen Sep 3, 2024
5767425
Docs(web-react,web-twig): Use new spacing tokens values in Tooltip #D…
crishpeen Sep 3, 2024
2addc50
BREAKING CHANGE(web): Switch FieldGroup component to v3 design tokens…
crishpeen Sep 12, 2024
b67ef67
BREAKING CHANGE(web): Switch Link and typography helpers to v3 design…
crishpeen Nov 5, 2024
1bae0ae
BREAKING CHANGE(web-react): Switch Link, Heading and Text to v3 desig…
crishpeen Sep 7, 2024
427c9e6
BREAKING CHANGE(web-twig): Switch Link, Heading and Text to v3 design…
crishpeen Sep 7, 2024
30d9c38
Feat(web): Switch FileUploader component to v3 design tokens #DS-1448
crishpeen Sep 12, 2024
b34b62c
Feat(web): Switch Item component to v3 design tokens #DS-1451
crishpeen Sep 17, 2024
cf0449b
Feat(web): Switch Footer component to v3 design tokens
crishpeen Sep 19, 2024
cec9980
Feat(web-react): Switch Footer component to v3 design tokens
crishpeen Oct 1, 2024
2250ed7
Feat(web): Switch Slider component to v3 design tokens #DS-1449
crishpeen Sep 17, 2024
e04534a
Test(e2e): Enable visual testing of rest of the components
crishpeen Sep 17, 2024
72119cc
BREAKING CHANGE(web): Switch Toast component to v3 design tokens #DS-…
crishpeen Sep 19, 2024
5e17ab3
BREAKING CHANGE(web-twig): Rename `inverted` variant of `Toast` to `n…
crishpeen Sep 24, 2024
c5f8f42
BREAKING CHANGE(web-react): Rename `inverted` variant of `Toast` to `…
crishpeen Sep 24, 2024
51a1adf
Feat(web): Switch Toggle component to v3 design tokens #DS-1449
crishpeen Sep 24, 2024
929af7c
Docs(web-react): Add more disabled combinations to Toggle demo #DS-1449
crishpeen Sep 24, 2024
0c70426
BREAKING CHANGE(web): Switch `Header` component to v3 design tokens #…
adamkudrna Sep 19, 2024
9d4e319
BREAKING CHANGE(web-react): Switch `Header` component to v3 design to…
adamkudrna Sep 19, 2024
0413771
BREAKING CHANGE(web-twig): Switch `Header` component to v3 design tok…
adamkudrna Sep 19, 2024
30b1521
Test(e2e): Enable Modal visual testing using v3 tokens
crishpeen Oct 1, 2024
eeb2326
Docs(form-validations,web,web-react): Redesign the demo app #DS-1479
adamkudrna Oct 1, 2024
477551f
Docs(web-twig): Redesign the demo app #DS-1479
adamkudrna Oct 1, 2024
7ee97bc
Test(web): Allow SASS Unit tests to run again
crishpeen Sep 26, 2024
aa5cd1c
Docs(form-validations,web,web-react): Add theme switcher to the demo …
adamkudrna Oct 1, 2024
22594a2
Docs(web-twig): Add theme switcher to the demo app #DS-1479
adamkudrna Oct 1, 2024
c3b7f5e
Test(web,web-react): Update visual snapshots after demo apps redesign…
adamkudrna Oct 1, 2024
f78c5a4
Feat(demo): Update demo CSS variables
crishpeen Oct 22, 2024
c00cabb
BREAKING CHANGE(web-react): Button/ButtonLink have isSymmetrical prop…
curdaj Oct 2, 2024
c0f8a27
BREAKING CHANGE(web): Button has isSymmetrical prop instead of isSqua…
curdaj Oct 2, 2024
5aeb9f4
BREAKING CHANGE(web-twig): Button/ButtonLink have isSymmetrical prop …
curdaj Oct 2, 2024
a713fbc
Feat(codemods): Button and ButtonLink have isSymmetrical prop instead…
curdaj Oct 3, 2024
7fb6522
Docs: Button and ButtonLink have isSymmetrical prop instead of isSqua…
curdaj Oct 4, 2024
5c76b66
BREAKING CHANGE(web-react): Remove default elementType value for Head…
pavelklibani Oct 8, 2024
e586cf5
Feat(codemods): Add elementType prop to Heading component
pavelklibani Oct 8, 2024
8e45d17
BREAKING CHANGE(web-twig): Remove default elementType value for Headi…
pavelklibani Oct 8, 2024
65833da
Docs(v3): Add migration guide for Heading elementType prop
pavelklibani Oct 8, 2024
9d45ba2
BREAKING CHANGE(web-twig): Remove isUnderlined prop from Link component
pavelklibani Oct 9, 2024
f882691
BREAKING CHANGE(web-react): Remove isUnderlined prop from Link component
pavelklibani Oct 9, 2024
4ca2e35
Docs(v3): Add migration guide for Link isUnderlined prop deprecation
pavelklibani Oct 9, 2024
faaac13
Style(web): Fix selector order and undefined check in Toast component
literat Oct 15, 2024
ac03866
BREAKING CHANGE(web): Toast JS plugin linkProps changed to underlined
pavelklibani Oct 16, 2024
e7f0e1e
BREAKING CHANGE(web-twig): Toast JS Plugin docs updated
pavelklibani Oct 16, 2024
94585f0
Chore(release): Publish
literat Oct 17, 2024
2ef80fc
Docs(web): Introduce General Changes into the Migration Guide #DS-1489
crishpeen Oct 10, 2024
b10a2bc
Docs(web): Document component changes into the Migration Guide #DS-1489
crishpeen Oct 10, 2024
75ee2e3
Feat(web): Remove `spirit-` prefix from themes
crishpeen Oct 17, 2024
55167ed
Feat(web-twig): Remove `spirit-` prefix from themes
crishpeen Oct 17, 2024
af1e9b3
BREAKING CHANGE(web-react): Add the option to allow visited state in …
curdaj Oct 23, 2024
03672fd
BREAKING CHANGE(web): Add the option to allow visited state in Link #…
curdaj Oct 23, 2024
03a2788
BREAKING CHANGE(web-twig): Add the option to allow visited state in L…
curdaj Oct 23, 2024
21006c2
Docs: Add the option to allow visited state in Link #DS-1501
curdaj Oct 24, 2024
9da61f6
Feat(codemods): Add the option to allow visited state in Link #DS-1501
curdaj Oct 29, 2024
7e7bf9c
Feat(codemods): Introduce ToastBar color inverted to neutral codemod
crishpeen Oct 22, 2024
ad3c121
Docs(web-react): Introduce Migration Guide to version 3
crishpeen Oct 22, 2024
233b874
Docs(web-twig): Introduce Migration Guide to version 4
crishpeen Oct 29, 2024
e0a5620
Docs(web): Document usage of the updated design tokens and themes #DS…
adamkudrna Oct 29, 2024
62d7fb5
Refactor(web): Unify generation of responsive spacing and alignment i…
adamkudrna Oct 29, 2024
fc8924f
Chore(release): Publish
literat Nov 6, 2024
a229966
Chore(release): Publish
literat Nov 6, 2024
1005644
Feat(web-react): Add spacingX and spacingY to Flex #DS-1427
curdaj Oct 21, 2024
cc24f54
BREAKING CHANGE(web): Replace spacing with spacing-x and spacing-y pr…
curdaj Oct 31, 2024
f991e5f
Docs(web): Replace spacing with spacing-x and spacing-y property in F…
curdaj Nov 6, 2024
8213dee
Refactor(web): Abstract spacing tools to generate any custom properti…
adamkudrna Oct 31, 2024
f9fbc6f
Fix(web-react): Unsupported export in client boundary #DS-1549
curdaj Nov 8, 2024
c721ee5
Fix(web-react): Unwanted Link hasVisitedStyleAllowed prop on a DOM el…
curdaj Nov 12, 2024
f6290a3
Fix(web-react): Unwanted Heading elementType prop on a DOM element #D…
curdaj Nov 12, 2024
7c5b4dd
Chore(release): Publish
literat Nov 13, 2024
1fead0b
Chore(release): Publish
literat Nov 13, 2024
d124c80
BREAKING CHANGE(web): Wrap list with validation text
pavelklibani Nov 7, 2024
4486006
Refactor(form-validations): Update form validations error lists
pavelklibani Nov 7, 2024
c5c083e
Refactor(web-twig): Wrap ValidationText list in div
pavelklibani Nov 7, 2024
51ecc21
Refactor(web-react): Wrap ValidationText list in div and dynamical role
pavelklibani Nov 12, 2024
48d9db9
Feat(web): Introduce Plain Button #DS-1454
crishpeen Nov 5, 2024
3ea4030
Feat(web-react): Introduce Plain Button #DS-1454
crishpeen Nov 5, 2024
c08e8fa
Feat(web-twig): Introduce Plain Button #DS-1454
crishpeen Nov 5, 2024
021932c
Fix(examples): Add mandatory elementType to examples
curdaj Nov 19, 2024
2c09d62
Chore(release): Publish
literat Nov 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,39 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

<a name="1.0.0-alpha.1"></a>

# [1.0.0-alpha.1](https://github.com/lmc-eu/spirit-design-system/compare/@lmc-eu/[email protected]...@lmc-eu/[email protected]) (2024-11-06)

### Features

- **web:** Remove `spirit-` prefix from themes ([29ededb](https://github.com/lmc-eu/spirit-design-system/commit/29ededb))

**Note:** Version bump only for package @lmc-eu/spirit-demo-app

<a name="1.0.0-alpha.0"></a>

# [1.0.0-alpha.0](https://github.com/lmc-eu/spirit-design-system/compare/@lmc-eu/[email protected]...@lmc-eu/[email protected]) (2024-10-17)

### BREAKING CHANGES

- **web:** Switch `Header` component to v3 design tokens [#DS-1453](https://github.com/lmc-eu/spirit-design-system/issues/DS-1453) ([840c28a](https://github.com/lmc-eu/spirit-design-system/commit/840c28a))

### Documentation

- **form-validations,web,web-react:** Add theme switcher to the demo app [#DS-1479](https://github.com/lmc-eu/spirit-design-system/issues/DS-1479) ([02381f2](https://github.com/lmc-eu/spirit-design-system/commit/02381f2))
- **form-validations,web,web-react:** Redesign the demo app [#DS-1479](https://github.com/lmc-eu/spirit-design-system/issues/DS-1479) ([2a2e309](https://github.com/lmc-eu/spirit-design-system/commit/2a2e309))
- Set default background color to main element in demos ([ed4d322](https://github.com/lmc-eu/spirit-design-system/commit/ed4d322))
- **web-twig:** Redesign the demo app [#DS-1479](https://github.com/lmc-eu/spirit-design-system/issues/DS-1479) ([18f7fe0](https://github.com/lmc-eu/spirit-design-system/commit/18f7fe0))

### Features

- **web:** Switch Demo styles to v3 design tokens structure [#DS-1430](https://github.com/lmc-eu/spirit-design-system/issues/DS-1430) ([8f27889](https://github.com/lmc-eu/spirit-design-system/commit/8f27889))

### Tests

- **web,web-react:** Update visual snapshots after demo apps redesign [#DS-1479](https://github.com/lmc-eu/spirit-design-system/issues/DS-1479) ([b9b23e5](https://github.com/lmc-eu/spirit-design-system/commit/b9b23e5))

<a name="0.0.9"></a>

## [0.0.9](https://github.com/lmc-eu/spirit-design-system/compare/@lmc-eu/[email protected]...@lmc-eu/[email protected]) (2024-11-22)
Expand Down
11 changes: 11 additions & 0 deletions apps/demo/config/vite/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ export default defineConfig({
},
runtimeOptions: {
data: {
themes: [
{
id: 'light-default',
name: 'Light Default',
},
{
id: 'light-on-brand',
name: 'Light on Brand',
},
],
is_development: process.env.NODE_ENV === 'development',
// Get the list of components directories and pass their names to the data
web_components: getListOfNestedDirectories('../../packages/web/src/scss/components', 'index.html'),
// Get the list of helpers directories and pass their names to the data
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lmc-eu/spirit-demo-app",
"version": "0.0.9",
"version": "1.0.0-alpha.1",
"description": "Demo platform of the Spirit Design System",
"license": "MIT",
"private": true,
Expand Down
5 changes: 0 additions & 5 deletions apps/demo/partials/boxList.hbs

This file was deleted.

5 changes: 5 additions & 0 deletions apps/demo/partials/card.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<li class="d-grid">
<a href="{{path}}/{{urlname}}/" class="docs-Card text-truncate">
{{content}}
</a>
</li>
5 changes: 5 additions & 0 deletions apps/demo/partials/cardList.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ul class="Grid Grid--cols-2 Grid--tablet--cols-3">

{{> @partial-block}}

</ul>
3 changes: 0 additions & 3 deletions apps/demo/partials/component.hbs

This file was deleted.

50 changes: 50 additions & 0 deletions apps/demo/partials/cover.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<div class="theme-light-on-brand bg-primary mb-tablet-1200 py-1200 py-tablet-1700 {{#unless (eq page 'components')}}hide-from-visual-tests{{/unless}}">
<div class="Container">

<h1
class="Flex Flex--noWrap Flex--alignmentXStretch Flex--alignmentYCenter Flex--row typography-heading-xlarge-bold"
style="--flex-spacing: var(--spirit-space-1000)"
>
{{title}}

{{#if isUnstable}}
<span class="Tag Tag--large Tag--warning">Unstable</span>
{{/if}}
</h1>

<nav aria-label="Breadcrumbs" class="Breadcrumbs">
<ol>
<li class="d-flex">
<a href="/" class="link-primary link-underlined">Spirit</a>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-right" />
</svg>
</li>
{{#if package}}
<li class="d-flex">
<a href="{{packageUrl}}" class="link-primary link-underlined">{{package}}</a>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-right" />
</svg>
</li>
{{/if}}
{{#if parentPageName}}
<li class="d-flex">
<a href="{{#if (eq parentPageName 'Components') }}{{packageUrl}}{{else}}..{{/if}}" class="link-primary link-underlined">
{{parentPageName}}
</a>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#chevron-right" />
</svg>
</li>
{{/if}}
{{#if title}}
<li class="d-flex">
<a href="" aria-current="page" class="link-secondary">{{title}}</a>
</li>
{{/if}}
</ol>
</nav>

</div>
</div>
7 changes: 7 additions & 0 deletions apps/demo/partials/footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<footer class="bg-secondary mt-1200 mt-tablet-1700 pt-1400 pb-1200 text-center {{#unless (eq page 'components')}}hide-from-visual-tests{{/unless}}">
<div class="Container">

© Alma Career Oy and its subsidiaries

</div>
</footer>
16 changes: 16 additions & 0 deletions apps/demo/partials/form-validations/layout/default.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{{#> layout/base package="Form Validations" packageUrl="/packages/form-validations/" title=title}}

{{> header}}
{{> cover}}

<main class="py-1000">
<div class="Container">

{{> @partial-block}}

</div>
</main>

{{> footer}}

{{/layout/base}}
159 changes: 144 additions & 15 deletions apps/demo/partials/header.hbs
Original file line number Diff line number Diff line change
@@ -1,20 +1,149 @@
<header class='bg-inverted text-secondary-inverted py-1000 py-tablet-1100'>
<div class='Container'>
<header class="Header theme-light-on-brand {{#unless (eq page 'components')}}hide-from-visual-tests{{/unless}}">
<a href="/" aria-label="Spirit Development Preview">
{{> web/assets/spiritLogoInverted }}
</a>

<h1 class='typography-heading-xlarge-text'>Spirit Design System</h1>
<h2 class='typography-heading-medium-text text-secondary-inverted-disabled mb-900'>{{#if package}}{{package}} - {{/if}}Development Preview</h2>
<!-- HeaderMobileActions: start -->
<div class="HeaderMobileActions">
<button
type="button"
class="Button Button--secondary Button--medium Button--square"
data-spirit-toggle="offcanvas"
data-spirit-target="#off-canvas-navigation"
aria-controls="off-canvas-navigation"
aria-expanded="false"
>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#hamburger" />
</svg>
<span class="accessibility-hidden">Menu</span>
</button>
</div>
<!-- HeaderMobileActions: end -->

<!-- HeaderDesktopActions: start -->
<nav class="HeaderDesktopActions" aria-label="Main navigation">
<!-- HeaderNav: start -->
<ul class="HeaderNav">
<li class="HeaderNavItem">
<a
href="/packages/web/"
class="HeaderLink {{# if (eq package 'Web')}}HeaderLink--current{{/if}}"
{{# if (eq package 'Web')}}aria-current="page"{{/if}}
>
Web
</a>
</li>
<li class="HeaderNavItem">
<a
href="/packages/web-react/"
class="HeaderLink {{# if (eq package 'Web React')}}HeaderLink--current{{/if}}"
{{# if (eq package 'Web React')}}aria-current="page"{{/if}}
>
Web React
</a>
</li>
{{!-- Hide link to the Twig implementation in production. Twig demo app only runs on localhost, we don't deploy it anywhere. --}}
{{!-- For the same reason, we don't include the link in the visual tests. --}}
{{#if @is_development}}
<li class="HeaderNavItem hide-from-visual-tests">
<a href="https://localhost:4443" class="HeaderLink">Web Twig</a>
</li>
{{/if}}
<li class="HeaderNavItem">
<a
href="/packages/form-validations/"
class="HeaderLink {{# if (eq package 'Form Validations')}}HeaderLink--current{{/if}}"
{{# if (eq package 'Form Validations')}}aria-current="page"{{/if}}
>
Form Validations
</a>
</li>
</ul>
<!-- HeaderNav: end -->
</nav>
<!-- HeaderDesktopActions: end -->

<!-- HeaderDesktopActions: start -->
<nav class="HeaderDesktopActions HeaderDesktopActions--end">

{{> themeSwitcher isLabelHidden=true}}

<div class='d-grid d-tablet-block'>
<a
href='https://github.com/lmc-eu/spirit-design-system'
class='Button Button--inverted Button--large mb-400 mb-tablet-0 mr-tablet-400'
</nav>
<!-- HeaderDesktopActions: end -->
</header>

<!-- HeaderDialog: start -->
<dialog id="off-canvas-navigation" class="HeaderDialog" aria-label="Menu">
<div class="HeaderDialog__panel">
<div class="HeaderDialog__content">

<!-- HeaderDialogCloseButton: start -->
<button
type="button"
class="HeaderDialogCloseButton"
data-spirit-dismiss="off-canvas-navigation"
data-spirit-target="#off-canvas-navigation"
aria-controls="off-canvas-navigation"
aria-expanded="false"
>
GitHub Project
</a>
<a href='https://spirit.supernova-docs.io/spirit/' class='Button Button--inverted Button--large'>
Spirit Docs →
</a>
</div>
<svg width="24" height="24" aria-hidden="true">
<use xlink:href="/assets/icons/svg/sprite.svg#close" />
</svg>
<span class="accessibility-hidden">Close</span>
</button>
<!-- HeaderDialogCloseButton: end -->

<!-- HeaderDialogActions: start -->
<nav class="HeaderDialogActions HeaderDialogActions--primary" aria-label="Main navigation">

<!-- HeaderDialogNav: start -->
<ul class="HeaderDialogNav">
<li class="HeaderDialogNavItem">
<a
href="/packages/web/"
class="HeaderDialogLink {{# if (eq package 'Web')}}HeaderDialogLink--current{{/if}}"
{{# if (eq package 'Web')}}aria-current="page"{{/if}}
>
Web
</a>
</li>
<li class="HeaderDialogNavItem">
<a
href="/packages/web-react/"
class="HeaderDialogLink {{# if (eq package 'Web React')}}HeaderDialogLink--current{{/if}}"
{{# if (eq package 'Web React')}}aria-current="page"{{/if}}
>
Web React
</a>
</li>
{{!-- Hide link to the Twig implementation in production. Twig demo app only runs on localhost, we don't deploy it anywhere. --}}
{{#if @is_development}}
<li class="HeaderDialogNavItem">
<a href="https://localhost:4443" class="HeaderDialogLink">Web Twig</a>
</li>
{{/if}}
<li class="HeaderDialogNavItem">
<a
href="/packages/form-validations/"
class="HeaderDialogLink {{# if (eq package 'Form Validations')}}HeaderDialogLink--current{{/if}}"
{{# if (eq package 'Form Validations')}}aria-current="page"{{/if}}
>
Form Validations
</a>
</li>
</ul>
<!-- HeaderDialogNav: end -->

</nav>
<nav class="HeaderDialogActions HeaderDialogActions--secondary" aria-label="Secondary navigation">

{{> themeSwitcher isLabelHidden=false}}

</nav>
<!-- HeaderDialogActions: end -->

</div>
</div>
</header>
</dialog>
<!-- HeaderDialog: end -->
33 changes: 31 additions & 2 deletions apps/demo/partials/layout/base.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>{{#if package}}{{package}} - {{/if}}Development Preview</title>
<title>
{{#if title}}
{{title}} —
{{#if package}}{{package}} —{{/if}}
Spirit Design System
{{else}}
Spirit Design System — Development preview
{{/if}}
</title>

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
Expand All @@ -19,11 +27,32 @@
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=block">
<link rel="stylesheet" href="/apps/demo/assets/index.scss">

<script src="/packages/web/src/js/index.esm.ts" type="module"></script>

<!-- Theme switcher -->
<script>
const themes = [];

{{#each @themes as |theme|}}
themes.push('{{theme.id}}');
{{/each}}

const switchTheme = (event) => {
const targetElement = document.body;
const theme = event.target.value;

themes.forEach((theme) => {
targetElement.classList.remove(`theme-${theme}`);
});
targetElement.classList.add(`theme-${theme}`);
};
</script>

{{#> scripts}}
{{/scripts}}

</head>
<body>
<body class="bg-primary">

{{> @partial-block}}

Expand Down
Loading
Loading