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

2025 release #1869

Merged
merged 237 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
237 commits
Select commit Hold shift + click to select a range
cb53c73
feat: introduce o-private-foundation (#1863)
frshwtr Nov 7, 2024
03add22
feat: Add public function to get the current brand.
notlee Nov 7, 2024
a419dab
backstage: Map tokens to o2 brand pattern
notlee Nov 7, 2024
f10fb52
backstage: Remove stories
notlee Nov 7, 2024
eb20054
docs: Remove misleading SassDoc
notlee Nov 7, 2024
78736f0
backstage: Remove example css
notlee Nov 7, 2024
9d8d795
feat: introduce o-normalise to o-private-foundation (#1864)
frshwtr Nov 13, 2024
55bdd32
backstage: Add initial buttons support to o-private-foundations
notlee Nov 13, 2024
4122a55
backstage: Replace o-buttons with o-private-foundation in o-table
notlee Nov 13, 2024
4ca26b4
backstage: fix private button force-colors and family
notlee Nov 13, 2024
339ab49
backstage: Update private buttons to actually use type/theme argument
notlee Nov 13, 2024
ddbc4cf
docs: Update components/o-private-foundation/src/scss/o-buttons/main.…
notlee Nov 14, 2024
a39eef2
backstage: Reduce use of Sass modules to prevent errors when importin…
notlee Nov 21, 2024
c4375dd
backstage: Update o-table to use latest o-private-foundation changes.
notlee Nov 21, 2024
34fa4b7
backstage: Remove o-buttons as an o-tabs dependency
notlee Nov 21, 2024
988ec35
backstage: Remove o-buttons as an o-header dependency
notlee Nov 21, 2024
370babb
backstage: Remove o-buttons as an o-forms peer dependency
notlee Nov 21, 2024
7e59a7f
backstage: Throw in o-private-foundation if a token is not found
notlee Nov 21, 2024
ec9c02e
backstage: Remove o-buttons as an o-comments dependency
notlee Nov 21, 2024
2026d8c
backstage: Remove o-buttons Sass import from o-header
notlee Nov 22, 2024
6c0edbf
Remove o-buttons as an o-message dependency (#1882)
notlee Nov 25, 2024
09ae7fd
chore: remove private-foundations
frshwtr Nov 25, 2024
3a2b910
chore: align o-private-foundation/o-normalise directory structure (#1…
frshwtr Nov 26, 2024
198c976
feat: introduce o visual effects (#1877)
frshwtr Nov 26, 2024
401589b
backstage: Remove o-buttons Sass import from o-banner
notlee Nov 26, 2024
17a8651
backstage: Remove o-buttons Sass import from o-header-services
notlee Nov 26, 2024
5ffe211
backstage: Map previous professional theme to token sub-brand in buttons
notlee Nov 26, 2024
ae52e55
backstage: Remove o-buttons Sass from o-top-banner
notlee Nov 26, 2024
ee7feb0
docs: Remove oButton reference from Sass comment
notlee Nov 26, 2024
60a7e5a
backstage: Remove o-buttons Sass from o-cookie-message
notlee Nov 26, 2024
4f4f632
backstage: Remove o-buttons Sass from o-subs-card
notlee Nov 26, 2024
cb6d8d9
chore: Remove o-visual-effects deps that I put back in a bad rebase
notlee Nov 27, 2024
d64fd2d
chore: Generate Sass tokens with missing whitelabel inverse button co…
notlee Nov 27, 2024
1ec2f91
chore: Ensure no CSS is output without calling a primary mixin in o2 …
notlee Nov 27, 2024
52542f6
chore: Remove o-button devDeps where a mixin is used in demos without…
notlee Nov 27, 2024
4a446fc
chore: correct mixin name
notlee Nov 27, 2024
879a4a7
chore: Apply suggestions from code review
notlee Nov 27, 2024
383e805
feat: introduce o-grid to o-private-foundation (#1875)
frshwtr Nov 27, 2024
53f16aa
chore: Remove selector-no-qualifying-type linting (#1886)
notlee Nov 27, 2024
de25b28
Merge branch 'main' into 2025-release
frshwtr Nov 28, 2024
382129d
feat: introduce o-spacing to o-private-foundation (#1867)
frshwtr Dec 2, 2024
fa68019
chore: Remove o-typography as a dependency of o-table
notlee Dec 3, 2024
66d62f6
chore: Remove o-typography as a dependency of ft-concept-button
notlee Dec 3, 2024
9e728d2
chore: Remove o-typography as a dependency of o-video
notlee Dec 3, 2024
7710f8c
chore: Remove o-typography as a dependency of o-banner
notlee Dec 3, 2024
d5b516f
chore: Remove o-typography as a dependency of o-autocomplete
notlee Dec 3, 2024
89228d5
chore: Remove o-typography as a dependency of o-big-number
notlee Dec 3, 2024
9ae5290
chore: Remove o-typography as a dependency of o-footer
notlee Dec 3, 2024
f3806be
chore: Remove o-typography as a dependency of o-editorial-typography
notlee Dec 3, 2024
0587f0b
chore: Remove o-typography as a dependency of o-video
notlee Dec 3, 2024
2118541
chore: Remove o-typography as a dependency of n-notification
notlee Dec 3, 2024
9adff46
chore: Remove o-typography as a dependency of o-comments
notlee Dec 3, 2024
de37659
chore: Remove o-typography as a dependency of o-editorial-layout
notlee Dec 3, 2024
bc98484
chore: Remove o-typography as a dependency of everything else.
notlee Dec 3, 2024
3b5bbf4
chore: Ensure correct link colours and scale sizes
notlee Dec 5, 2024
1b0a11f
chore: Correct implicit o-icons dependency
notlee Dec 5, 2024
efc2ff7
chore: Remove o-type from o-banner demos to fix issue with them building
notlee Dec 5, 2024
d2b1bc8
chore: Remove o-type from o-header-services demos to fix issue with t…
notlee Dec 5, 2024
8902099
chore: Remove o-type from o-labels demos to fix demo build issue
notlee Dec 5, 2024
4e8b750
chore: Correct o-private-foundation import in o-meter
notlee Dec 5, 2024
4e87e80
chore: Remove o-buttons use in o-subs-card
notlee Dec 5, 2024
14bf8ce
chore: Add missing normalise import to o-teaser demos
notlee Dec 5, 2024
bb2c718
chore: Fix o-teaser-collection demo
notlee Dec 5, 2024
8876241
chore: Ensure all components output new fonts with oPrivateFoundation
notlee Dec 5, 2024
7b063a3
chore: Remove deprecated imports from o-topper
notlee Dec 5, 2024
7a5ae10
chore: Remove o-typography as a dependency of o-table
notlee Dec 3, 2024
28cf958
chore: Remove o-typography as a dependency of ft-concept-button
notlee Dec 3, 2024
c803578
chore: Remove o-typography as a dependency of o-video
notlee Dec 3, 2024
a21ae8c
chore: Remove o-typography as a dependency of o-banner
notlee Dec 3, 2024
a1b4715
chore: Remove todo about italic font faces
notlee Dec 5, 2024
b74942c
Merge branch '2025-release' into 2025-release-typography-everything-else
notlee Dec 5, 2024
4ef5e01
chore: Remove missed use of oSpacingByName in o-header-services
notlee Dec 5, 2024
a3e4528
chore: Remove renaming o-spacing references
notlee Dec 5, 2024
c32e5b3
Merge pull request #1891 from Financial-Times/2025-release-typography…
notlee Dec 5, 2024
b960df4
feat: replace usages of oIconsContent
frshwtr Dec 11, 2024
4e21bbf
fix: undo multiline formatting
frshwtr Dec 12, 2024
73cd36f
Merge pull request #1894 from Financial-Times/2025-release-o-icons
notlee Dec 12, 2024
e43d4e4
chore: Delete o-overlay test
notlee Dec 12, 2024
3af85c7
chore: Merge branch 'main' into 2025-release
frshwtr Dec 17, 2024
3a0daa5
chore: Merge branch 'main' into 2025-release
frshwtr Dec 17, 2024
5601f2e
backstage: New icons for o3 (#1906)
notlee Dec 18, 2024
422306e
chore: fix o-header Sass build since decoupling from o-grid
notlee Dec 12, 2024
f3a97e8
chore: Always build o2 components before tests, to ensure demo tests …
notlee Dec 12, 2024
f6ea7e5
chore: Remove o-message pa11y demos
notlee Dec 12, 2024
07d09d8
chore: Correct CI template
notlee Dec 12, 2024
9cb4271
chore: Prettier on o-private-foudnation, no linting
notlee Dec 12, 2024
2543c3b
chore: Fix private-foundation linting, no .stylelintrc
notlee Dec 12, 2024
a45cf91
chore: o-private-foundations engines
notlee Dec 13, 2024
27b996e
chore: introduce o-colors to private foundation (#1888)
frshwtr Dec 18, 2024
da76dfd
feat: type tokens (#1893)
itsdeyan Dec 30, 2024
d2e156d
feat: introduce radius tokens (#1901)
MaryGodservant Dec 30, 2024
28f1792
fix: treat typography as enabled token sets
frshwtr Jan 3, 2025
8591fad
chore: make o3 icon naming less verbose
notlee Jan 3, 2025
fbb4022
chore: Remove components/o3-tooltip/browser/index.js
notlee Jan 3, 2025
e1df720
chore: Update o3-button to use the latest icon naming
notlee Jan 3, 2025
df539ee
chore: Update for everyone website to use the latest icon naming
notlee Jan 3, 2025
aba3801
chore: Add o3-button migration guide
notlee Jan 3, 2025
5b2323d
docs: make migration titles actions/tasks
notlee Jan 3, 2025
f6d7521
docs: correct version reference
notlee Jan 3, 2025
7b1d112
feat: remove visual discrepancies after updating o-table to new butto…
frshwtr Jan 7, 2025
569a649
fix: preserve square buttons
frshwtr Jan 7, 2025
f917fed
fix: hide disabled button
frshwtr Jan 7, 2025
f202d72
chore: Make base type tokens tokens.
notlee Jan 7, 2025
cac2a4b
fix: restore o-header buttons to design (#1916)
frshwtr Jan 8, 2025
032f285
chore: use sass instead of node-sass
j-mes Jan 10, 2025
f5d2712
chore: change from node-sass to sass in sh script
j-mes Jan 10, 2025
c2ada98
revert: going back to node-sass
j-mes Jan 10, 2025
3e91195
chore: remove node-sass from test.sh
j-mes Jan 10, 2025
c775af7
chore: update sass-true in math to use 6.1.0
j-mes Jan 10, 2025
b3400ce
chore: revert to node 22.2.0 for volta
j-mes Jan 10, 2025
adbcb95
chore: Add token attributes to the tooling export
notlee Jan 9, 2025
e1f6a83
chore: Add a utility class for display typography usecases
notlee Jan 9, 2025
12adcdf
chore: Refactor the Preview component
notlee Jan 9, 2025
f1b6b44
chore: Add display type usecase docs to the website
notlee Jan 9, 2025
47fed51
chore: Add further new type usecases
notlee Jan 10, 2025
76e3653
docs: Update apps/for-everyone-website/src/content/docs/guides/typogr…
notlee Jan 13, 2025
04b3618
chore: Update components/o3-foundation/src/css/components/Typography/…
notlee Jan 13, 2025
0b58645
chore: Remove stray console log
notlee Jan 13, 2025
8bd84c8
chore: Fix file case sensitivity issue
notlee Jan 13, 2025
df443c4
chore: correct case in git
notlee Jan 14, 2025
c999de2
chore: correct big number token use
notlee Jan 14, 2025
20eef3f
chore: correct editorial body token use
notlee Jan 14, 2025
737a0dd
chore: Correct byline tokens
notlee Jan 14, 2025
4705164
chore: correct caption type tokens
notlee Jan 14, 2025
a32a868
chore: correct headline-large
notlee Jan 14, 2025
5d13dcc
chore: Correct story name
notlee Jan 14, 2025
ad73c1d
chore: Remove remaining headline-large references
notlee Jan 14, 2025
fea6d1e
chore: Rename headlines to headings internally
notlee Jan 14, 2025
b1949a7
feat: align text input (#1918)
frshwtr Jan 15, 2025
f5b3d47
fix: introduce error icon to o3-form (#1924)
frshwtr Jan 15, 2025
b45d301
chore: Correct headline tokens
notlee Jan 14, 2025
fcb5810
chore: Correct remaining heading tokens
notlee Jan 14, 2025
773f7e9
chore: Correct tokens for editorial quotes
notlee Jan 14, 2025
536e81d
chore: Remove use of an undefined token
notlee Jan 15, 2025
f0d5824
chore: Correct topic tag tokens
notlee Jan 14, 2025
301948e
chore: Correct standfirst tokens
notlee Jan 14, 2025
092ec6d
chore: Correct drop cap tokens
notlee Jan 14, 2025
9d260a5
chore: Enable drop-cap for all editorial brands
notlee Jan 14, 2025
9b98413
chore: Enable dropCap in Storybook
notlee Jan 15, 2025
3caf962
chore: Enable dropCap in Storybook for SV
notlee Jan 15, 2025
0bcc2b5
docs: add deprecation notice to o-quote
frshwtr Jan 17, 2025
c4d18d4
feat: use typography use cases in o3-forms. (#1928)
frshwtr Jan 20, 2025
f964497
chore: deleted link body-link and body-content-link tokens for all li…
itsdeyan Jan 20, 2025
4464573
chore: Rebuilt tokens without removed link use-cases
notlee Jan 20, 2025
b4cefde
feat: use typography use case tokens in o message (#1930)
frshwtr Jan 21, 2025
1e71614
chore: Use standard type usecases within o-forms
notlee Jan 20, 2025
0167a77
chore: Upgrade o-teaser-collection to o3 type usecases
notlee Jan 20, 2025
45f3fb7
chore: Delete Heading (UI) component
notlee Jan 16, 2025
d7f8919
chore: Delete Body/Link (UI) components
notlee Jan 16, 2025
b49bf2f
chore: Remove editorial link component
notlee Jan 16, 2025
1c990ac
chore: Remove iu footer component
notlee Jan 16, 2025
4ceca3c
chore: Remove ui caption component
notlee Jan 16, 2025
d1db3f6
chore: Remove editorial body component
notlee Jan 16, 2025
c97afd6
chore: Delete missed css styles no longer used
notlee Jan 16, 2025
2c31a58
docs: headings
notlee Jan 16, 2025
be91b8a
chore: Restore editorial caption component
notlee Jan 20, 2025
0b9d6e9
docs: Update type docs
notlee Jan 20, 2025
16d6637
docs: Update type docs
notlee Jan 20, 2025
33f372f
chore: Add default colour to usecase types
notlee Jan 20, 2025
cb3a743
chore: correct pull quote token
notlee Jan 20, 2025
1d9f0e7
docs: Update o3 editorial body readme
notlee Jan 21, 2025
4d19494
docs: Update components/o3-editorial-typography/README.md
notlee Jan 21, 2025
d63f4d0
chore: Rebuild dictionary, remove unused Preview
notlee Jan 21, 2025
012f1a7
chore: replaced missed oPrivateTypography usages
frshwtr Jan 22, 2025
91eed58
chore: use label use case on timestamp
frshwtr Jan 22, 2025
871df64
chore: Apply type usecases to o-stepped-progress
notlee Jan 22, 2025
f728e77
chore: Apply standard type and space tokens to o-tooltip
notlee Jan 22, 2025
410e757
chore: Apply type usecases to o3-tooltip
notlee Jan 22, 2025
20c7ea2
chore: apply radius to o-forms checkboxes
notlee Jan 22, 2025
a588a15
chore: Correct o-forms date input width
notlee Jan 22, 2025
401e5de
chore: Correct o-message token use, we removed link tokens
notlee Jan 22, 2025
9a8a883
chore: Update o-forms demos to show visually updated buttons given o-…
notlee Jan 22, 2025
7225fd5
chore: Remove duplicate line-height declaration within o-forms
notlee Jan 22, 2025
9e1c21b
Chore: radius token updated across all brands
MaryGodservant Jan 22, 2025
42f2a2f
chore: Rebuild tokens
notlee Jan 22, 2025
7d202b9
chore: Reduce checkbox / radio label type size to body base
notlee Jan 22, 2025
9e02fa8
chore: Correct tense in show password field
notlee Jan 22, 2025
8762c08
chore: Ensure o-forms label is body-text colour, not black
notlee Jan 22, 2025
3c49ab7
chore: fix merge conflicts
j-mes Jan 23, 2025
1d8be13
chore: up the limit to 3 seconds
j-mes Jan 27, 2025
f008a97
chore: tidy up my own mess
j-mes Jan 27, 2025
ea171a7
chore: add concurrency to test config and revert timeout on test
j-mes Jan 27, 2025
f9caa0b
chore: use stylelint-disable selector-max-id on #add-mix
j-mes Jan 27, 2025
d5944a3
fix: change from edit-filled to edit
j-mes Jan 27, 2025
298ce20
fix: add browser: main.js to package.json
j-mes Jan 27, 2025
2058488
fix: add includes before declarations
j-mes Jan 27, 2025
cd160d4
fix: use oColorsByName for failing tests
j-mes Jan 27, 2025
9a385cf
fix: add timeout for overflow hidden
j-mes Jan 27, 2025
507c3ba
fix: update output for tests to pass
j-mes Jan 27, 2025
8bd41ee
fix: a slight hack - time sensitive…
j-mes Jan 28, 2025
23eaed7
fix: remove unneeded test for o-footer-services
j-mes Jan 28, 2025
c864f3c
docs: Correct demo for small inputs (o2)
notlee Jan 22, 2025
0981fbc
chore: Increase size of standard button type
notlee Jan 22, 2025
f17013a
revert: back to original o2 for editorial typography
j-mes Jan 28, 2025
fcd3737
chore: remove metric2-negative-3 sizing
frshwtr Jan 27, 2025
821ebb4
chore: update migration guide
frshwtr Jan 27, 2025
b275eb9
chore: replace negative-2 usages with negative-1
frshwtr Jan 27, 2025
a452663
chore: Update o-share custom demo to be representative
notlee Jan 29, 2025
b294ab8
chore: Remove o-share label margin when vertical
notlee Jan 29, 2025
1737a57
fix: use // not /* */ for sass comments people
j-mes Jan 30, 2025
32a4270
Merge branch '2025-release' into 2025-release-test-branch-with-merge-…
j-mes Jan 30, 2025
134eb47
fix: change from 10px to 12px in tests for o-labels
j-mes Jan 30, 2025
f618fb8
chore: Remove o-editorial-typography from o-editorial-layout
notlee Jan 29, 2025
3fb5d40
chore: update to include test and lint script for all components
j-mes Jan 30, 2025
deb6284
fix: remove unneeded testframework object and update comment for conc…
j-mes Jan 30, 2025
afb3672
Merge pull request #1949 from Financial-Times/2025-release-test-branc…
notlee Jan 30, 2025
9bcf2ef
chore: Correct o-header font size
notlee Jan 28, 2025
950e742
chore: correct o2 focus ring [OR-1206]
notlee Jan 30, 2025
3279736
chore: Apply type usecases to o-banner
notlee Jan 29, 2025
ede0eb9
Merge branch 'main' into 2025-release
notlee Jan 31, 2025
428eb8d
feat: use typography tokens in o-topper and o-teaser (#1938)
frshwtr Jan 31, 2025
db4e1ea
chore: Shorten type use-case tokens
notlee Feb 10, 2025
eb55090
chore: fix topper linting error
notlee Feb 10, 2025
ec46db7
chore: correct linting error for o-header
notlee Feb 10, 2025
e0c2550
feat: use o-private-foundation/o-colors in o-subs-card (#1959)
frshwtr Feb 10, 2025
f37dbb1
fix: remove text underline on footer links (#1960)
frshwtr Feb 10, 2025
3f1c48d
feat: introduce Bluesky icon (#1962)
frshwtr Feb 11, 2025
bd27cfd
fix: revert changes to components not being upgraded (#1963)
frshwtr Feb 12, 2025
d448acc
docs: add migration guide to migrated components (#1961)
frshwtr Feb 17, 2025
4e52bbc
feat: add fallback fonts for FT fonts
frshwtr Feb 17, 2025
e0550a3
feat: apply fallback fonts to all brands
frshwtr Feb 17, 2025
d223edc
chore: fix dot
frshwtr Feb 17, 2025
efbfdfd
chore: Correct CSS syntax
notlee Feb 17, 2025
589a1ae
feat: remove bold and italic o3-typography classes
frshwtr Feb 17, 2025
dd4bec2
fix: override scss/map-flat with fix for font family tokens
frshwtr Feb 17, 2025
5b67828
chore: generate tokens
frshwtr Feb 17, 2025
c07dfe0
fix: revert o3 changes to o-normalise (#1968)
frshwtr Feb 18, 2025
5895414
fix: remove existing fallbacks
frshwtr Feb 18, 2025
bbde69e
fix: remove existing fallbacks
frshwtr Feb 18, 2025
b22a992
fix: use sass list for font families
frshwtr Feb 18, 2025
24aa587
fix: 🚓
frshwtr Feb 18, 2025
4dc8e7f
Merge branch '2025-release' into 2025-release-add-fallback-fonts
frshwtr Feb 18, 2025
5f0f71b
Merge pull request #1966 from Financial-Times/2025-release-add-fallba…
j-mes Feb 19, 2025
d13d872
fix: remove Sass interpolation #{} from font-family
j-mes Feb 19, 2025
bab38c1
Merge pull request #1969 from Financial-Times/2025-release-o-labels-t…
j-mes Feb 19, 2025
9ae6f52
chore: Reverse o3 migration changes in o-quote and o-big-number
notlee Feb 20, 2025
464350f
chore: Ensure social-sign-in button copy matches o3-button
notlee Feb 20, 2025
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ o-normalise:
- components/o-normalise/**/*
o-overlay:
- components/o-overlay/**/*
o-private-foundation:
- components/o-private-foundation/**/*
o-quote:
- components/o-quote/**/*
o-share:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ jobs:
- 'components/o-normalise/**'
components/o-overlay:
- 'components/o-overlay/**'
components/o-private-foundation:
- 'components/o-private-foundation/**'
components/o-quote:
- 'components/o-quote/**'
components/o-share:
Expand Down Expand Up @@ -236,7 +238,6 @@ jobs:
- name: Install node modules
run: npm ci
- run: npm run -w ${{ matrix.component }} lint --if-present
- run: npm run -w ${{ matrix.component }} build --if-present
- run: npm run -w ${{ matrix.component }} test --if-present
test-results:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ tools/*
!tools/create-component
!tools/o3-chrome-extension
apps/website/_emails/
apps/dictionary/tokens
apps/dictionary/tokens
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"components/o-multi-select": "2.2.7",
"components/o-normalise": "3.3.2",
"components/o-overlay": "4.2.13",
"components/o-private-foundation": "0.0.0",
"components/o-quote": "5.3.4",
"components/o-share": "10.0.3",
"components/o-social-follow": "1.0.11",
Expand Down
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ brew install rg

```shell
npm run build-storybook -w apps/o3-storybook/
npm run storybook -w apps/o3-storybook/
npm run storybook -w apps/o3-storybook/
```

- For Origami Design System website, run the following command:
Expand All @@ -137,7 +137,6 @@ Follow the [quick start guide](#quick-start) to get started developing component

Storybook can be run locally with the `storybook` command.


```shell
npm run storybook
```
Expand Down Expand Up @@ -207,6 +206,14 @@ Run tests for a given component with the npm `test` script.
npm run test -w components/o-example
```

Run tests for all components with the npm `test` script.

```shell
npm run test -w components
```

_Note: This will take a good amount of time when running on localhost._

Run JavaScript tests in a browser using the `debug:js` script.

```shell
Expand All @@ -219,6 +226,14 @@ Lint the code of a given component with the npm `lint` script.
npm run lint -w components/o-example
```

Run linting for all components with the npm `test` script.

```shell
npm run lint -w components
```

_Note: This will take a good amount of time when running on localhost._

### Tips

- If you're working on the storybook configuration and it starts acting weird
Expand Down
2 changes: 1 addition & 1 deletion apps/dictionary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"devDependencies": {
"@tokens-studio/sd-transforms": "^1.2.3",
"style-dictionary": "^4.1.0"
"style-dictionary": "^4.1.3"
},
"volta": {
"node": "22.11.0"
Expand Down
2 changes: 2 additions & 0 deletions apps/dictionary/src/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {StyleDictionaryPackageWithTransforms} from './config/styledictionary.js';
import {getBrandSourcesAndIncludes, getBrandNames} from './utils.js';
import {cssConfigForBrand} from './config/platforms/css.js';
import {sassConfigForBrand} from './config/platforms/sass.js';
import {toolingConfigForBrand} from './config/platforms/tooling.js';

const brands = getBrandNames();
Expand Down Expand Up @@ -32,6 +33,7 @@ export async function buildForBrand(brand) {
},
platforms: {
css: cssConfigForBrand(brand),
sass: sassConfigForBrand(brand),
tooling: toolingConfigForBrand(brand),
},
};
Expand Down
5 changes: 2 additions & 3 deletions apps/dictionary/src/config/platforms/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ function cssConfigForBrand(brand) {
return false;
}
return (
!token.filePath.includes(`/components/`) &&
token.path[1] !== 'icons'
!token.filePath.includes(`/components/`) && token.path[1] !== 'icon'
);
},
destination: `o3-foundation/src/css/tokens/${brand}/_variables.css`,
Expand All @@ -36,7 +35,7 @@ function cssConfigForBrand(brand) {
},
{
filter: token => {
return token.path[1] === 'icons';
return token.path[1] === 'icon';
},
destination: `o3-foundation/src/css/tokens/_icons.css`,
format: 'css/variables',
Expand Down
26 changes: 26 additions & 0 deletions apps/dictionary/src/config/platforms/sass.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import path from 'node:path';
import {sharedTransformers} from '../transformers.js';

function sassConfigForBrand(brand) {
const parentBrand = brand.split('/').slice(-1);
return {
transformGroup: 'scss',
transforms: [
...sharedTransformers,
'value/figma-shadow-shorthand',
'value/transformSVG',
],
buildPath: path.join(process.cwd(), '../../components/'),
files: [
{
destination: `o-private-foundation/src/scss/tokens/${parentBrand}.scss`,
format: 'origami/scss/map-flat',
options: {
outputReferences: false,
},
},
],
};
}

export {sassConfigForBrand};
4 changes: 2 additions & 2 deletions apps/dictionary/src/config/platforms/tooling.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ function toolingConfigForBrand(brand) {
files: [
{
filter: token => {
token.path[1] === 'icons';
return token.path[1] === 'icon';
},
destination: 'icons/_variables.js',
format: 'tooling/esm',
},
{
filter: token => {
return (
token.path[1] !== 'icons' &&
token.path[1] !== 'icon' &&
!token.filePath.includes(`/components/`) &&
token.original.value !== '{DO-NOT-USE}' &&
token.path[0] !== 'DO-NOT-USE'
Expand Down
22 changes: 22 additions & 0 deletions apps/dictionary/src/config/styledictionary.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import {privatePrefix} from '../transforms/private-prefix.js';

register(StyleDictionaryPackage);

StyleDictionaryPackage.format

const originalScssMapFlat = StyleDictionaryPackage.hooks.formats['scss/map-flat'];

StyleDictionaryPackage.registerTransform({
name: 'name/origamiPrivatePrefix',
type: 'name',
Expand Down Expand Up @@ -44,6 +48,24 @@ StyleDictionaryPackage.registerTransform({
transform: tintGroup,
});

// Workaround to allow font families to be processed correctly by map-flat. From https://github.com/amzn/style-dictionary/issues/298#issuecomment-2173382666
StyleDictionaryPackage.registerFormat({
name: 'origami/scss/map-flat',
format: (args) => {
const { dictionary } = args;
const fontFamilyTokens =
dictionary.allTokens.filter(({ type }) => type === 'fontFamily');
fontFamilyTokens.forEach((token) => {
const { value } = token;
// encase in interpolation so map value is treated as singular value
token.value = `(${value})`;
});

return originalScssMapFlat(args);
},
});


StyleDictionaryPackage.registerTransform({
name: 'value/figma-shadow-shorthand',
type: 'value',
Expand Down
5 changes: 5 additions & 0 deletions apps/dictionary/src/formatters/js/tooling.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ const toolingFormat = ({dictionary}) => {
originalValue: token.original.value,
type,
description: token.description,
attributes: {
item: token.attributes.item,
subitem: token.attributes.subitem,
state: token.attributes.state,
},
origamiKeys: token.origamiKeys,
path: token.path,
origamiTint: token.origamiTint,
Expand Down
15 changes: 14 additions & 1 deletion apps/dictionary/src/transforms/private-prefix.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
import {tokenStudioThemeToBrand, getTokenStudioThemes} from '../utils.js';

const sourceExceptions = ['base/typography', 'base/border-radius']

const privatePrefix = token => {
return isTokenStudioSource(token) ? `_${token.name}` : token.name;
const isSourceExceptionForEngineering = token => {
// We do not want to export our typography scale and border radius in Figma for end users.
// However, to support migration efforts we want it to still be available in the engineering token set.
if (sourceExceptions.find((sourceException) => token.filePath.includes(sourceException))) {
return true;
}
return false;
};

return isTokenStudioSource(token) && !isSourceExceptionForEngineering(token)
? `_${token.name}`
: token.name;
};

/*Get token theme from brand in token set file path.*/
Expand Down
25 changes: 13 additions & 12 deletions apps/dictionary/tokens/$metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,14 @@
"core/components/o3-form/use-case",
"core/professional/base/color",
"core/professional/use-case/color",
"core/professional/use-case/typography",
"core/professional/components/o3-form",
"core/professional/components/o3-form/use-case",
"core/professional/components/o3-button",
"core/professional/components/o3-tooltip",
"sustainable-views/base/spacing",
"sustainable-views/base/typography",
"sustainable-views/base/color",
"sustainable-views/use-case/color",
"sustainable-views/use-case/focus",
"sustainable-views/use-case/typography",
"sustainable-views/components/o3-editorial-typography",
"sustainable-views/components/o3-button",
"sustainable-views/components/o3-tooltip",
"sustainable-views/components/o3-form",
"sustainable-views/components/o3-form/use-case",
"internal/base/color",
"internal/base/typography",
"internal/base/spacing",
"internal/base/border-radius",
"internal/use-case/color",
"internal/use-case/focus",
"internal/use-case/typography",
Expand All @@ -52,6 +41,18 @@
"whitelabel/components/o3-form",
"whitelabel/components/o3-form/use-case",
"whitelabel/components/o3-editorial-typography",
"sustainable-views/base/border-radius",
"sustainable-views/base/spacing",
"sustainable-views/base/typography",
"sustainable-views/base/color",
"sustainable-views/use-case/color",
"sustainable-views/use-case/focus",
"sustainable-views/use-case/typography",
"sustainable-views/components/o3-editorial-typography",
"sustainable-views/components/o3-button",
"sustainable-views/components/o3-tooltip",
"sustainable-views/components/o3-form",
"sustainable-views/components/o3-form/use-case",
"utility-tokens",
"icons/icons"
]
Expand Down
Loading
Loading