aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): rewrite BackToTop componentArmand Philippot2023-11-1110-115/+143
| | | | | * replace `link` prop with `anchor` prop * add a `label` prop to let consumer handle the accessible name
* feat(components): add a VisuallyHidden componentArmand Philippot2023-11-117-2/+98
|
* refactor(components): rewrite SocialLink componentArmand Philippot2023-11-1110-111/+159
| | | | | * replace default label with a label prop * rename name prop to icon prop
* refactor(components): rewrite SharingLink componentArmand Philippot2023-11-1110-319/+359
| | | | | * replace default label with label prop * simplify CSS rules
* refactor(components): rewrite Link componentArmand Philippot2023-11-1124-402/+523
| | | | | | | | | * rename `external` prop to `isExternal` * rename `download` prop to `isDownload` * rewrite CSS to reduce code length and complexity * move link styles in Sass placeholders to avoid repeats because of WordPress articles * move NavLink component to molecules
* refactor(components): rewrite Notice componentArmand Philippot2023-11-119-48/+71
| | | | * Rename message prop to children prop and set ReactNode as type
* refactor(components): remove Column and NoScript from atomsArmand Philippot2023-11-1120-197/+60
| | | | | | | * Column is a simple div meant to be used inside Columns component so they should live together. * NoScript is only used in Layout component and its name does not make sense since it needs to be used inside a `noscript` element.
* refactor(components): rewrite DescriptionList componentArmand Philippot2023-11-1132-697/+575
| | | | | | | | | | | | | * add a `spacing` prop * replace `layout` prop with `isInline` prop * remove `items` prop (and classNames props) in favor of new components: Description, Group, Term * remove `withSeparator` prop (CSS content is announced by screen readers and Firefox/Safari have no support for alternative text so the consumer should add itself an element with `aria-hidden` if it need a separator) Be aware, Meta component and its consumers can be visually broken, they should be refactored before using them in production.
* refactor(components): rewrite List componentArmand Philippot2023-11-1139-527/+725
| | | | | | | | | * change `items` prop to children * replace `kind` prop with `isHierarchical`, `isOrdered` & `isInline` props * add `hideMarker` prop * add `spacing` prop to control item spacing * move lists styles to Sass placeholders to avoid repeats because of headless WordPress
* refactor(components): rewrite ProgressBar componentArmand Philippot2023-11-1111-155/+256
| | | | | | | * Avoid browser vendors by adding an extra div * Add a loading state * Add an option to center the progress bar (no longer the default) * Remove min since it is always 0
* refactor(components): rewrite Spinner componentArmand Philippot2023-10-2412-172/+252
| | | | | | | * Message should be set as children * Default message is no longer available (depending on use case, the consumer might prefer aria-label instead) * It is now possible to define the message position
* refactor(components): make Logo component ESlint compliantArmand Philippot2023-10-248-66/+78
| | | | | I also renamed the title prop to heading because title already exists as HTML attribute.
* feat(components): replace icons with a generic Icon componentArmand Philippot2023-10-24117-2025/+1497
| | | | | Sizes are also predefined and can be set using the `size` prop, so the consumers should no longer adjust the size in CSS.
* feat(components): add Article, Aside, Footer, Header, Main & NavArmand Philippot2023-10-2453-208/+572
| | | | | Some components have been renamed to be able to create Footer, Header and Nav.
* refactor(components): rewrite Heading componentArmand Philippot2023-10-2423-463/+408
| | | | | | | | | * remove `alignment` and `withMargin` props (consumer should handle that) * move styles to Sass placeholders to avoid repeats with headings coming from WordPress * refactor some other components that depend on Heading to avoid ESlint errors
* refactor(components): rewrite Section componentArmand Philippot2023-10-2411-186/+187
| | | | | | * Make it compliant with ESlint rules * Remove mandatory heading, it now depends on the consumer * Change defaults for hasBorder and variant
* refactor(components): rewrite Button and ButtonLink componentsArmand Philippot2023-10-2426-514/+639
| | | | | | | | | | | | | | Both: * move styles to Sass placeholders Button: * add `isPressed` prop to Button * add `isLoading` prop to Button (to differentiate state from disabled) ButtonLink: * replace `external` prop with `isExternal` prop * replace `href` prop with `to` prop
* refactor(routes): replace hardcoded routes with constantsArmand Philippot2023-10-241-23/+37
| | | | | | | | It makes it easier to change a route if needed and it avoid typo mistakes. I also refactored a bit the concerned files to be complient with the new ESlint config. However, I should rewrite the pages to reduce the number of statements.
* build: convert project to esmArmand Philippot2023-10-2498-2/+100
|
* refactor(components): rewrite form componentsArmand Philippot2023-10-24172-4061/+3194
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-20315-1380/+1115
| | | | | | Next expect a default export for pages so only those components should use default exports. Everything else should use named exports to reduce the number of import statements.
* build(deps): bump all dependenciesArmand Philippot2023-09-191-1/+4
| | | | | * MDX type has changed so some components props had to be updated * Since Storybook now supports TS, I renamed the main/preview files
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-19234-455/+436
| | | | | | Using paths aliases starting with "@" can be confusing and can lead to conflict with existings modules. I prefer to use relative paths to avoid extra configuration in tools because of these aliases.
* chore: make Links and Images compliant with Next.js 13Armand Philippot2023-01-2316-77/+60
|
* build(storybook): fix loading errors due to updated depsArmand Philippot2022-09-211-1/+1
|
* fix(comments): load all comments on a postArmand Philippot2022-08-213-10/+10
| | | | | | | | | Previously, only the first 10 comments was loaded. So I update the fetching method to retrieve all the comments on a post. Also, I choose to order comments on client side because of a bug with WPGraphQL. Finally, I renamed the Comment type to SingleComment to avoid conflict with existing types.
* refactor(types): move and rename GraphQL typesArmand Philippot2022-08-201-2/+2
| | | | | | | The api file in services was not really readable. So I move the types and I also rewrite a little the fetch function. I also rename most of the type to avoid conflict with preexisting types (like Node) and to keep consistency.
* chore(toolbar): add missing animation on medium and large devicesArmand Philippot2022-06-091-0/+4
|
* fix(media-queries): use pixel based media queriesArmand Philippot2022-06-091-1/+4
| | | | | | | | Everything was working fine with Firefox but it seems Chromium still has issues with `em` unit in media queries. The toolbar modals (search, settings and also main nav) was not displaying correctly on small devices. Some styles was missing. By switching to pixels based media queries, the bug seems fixed.
* fix(settings): avoid cropped tooltip on small devicesArmand Philippot2022-06-0923-404/+246
| | | | | | I changed the settings disposition to make tooltip positioning easier. Jest complains about ref passed but everything seems to work as expected so I'm not sure it is relevant. Maybe a bug with cloneElement.
* fix(settings): close tooltip when modal is closingArmand Philippot2022-06-085-27/+31
| | | | | The event was not captured so the tooltip remained open when the settings was closed. It prevented to click on the toolbar buttons.
* chore: add a label to progress barArmand Philippot2022-06-076-49/+58
| | | | | | The progress element is a form element, so a label is required to be accessible. Since I'm not using it without label, I transform the optional info parameter to a mandatory label parameter.
* chore: add an aria label to code blocksArmand Philippot2022-06-072-0/+19
| | | | | Prism is adding a tabindex to code blocks, so I think an aria label can help screen reader users to identify the tabbed content.
* chore(cards): use post title as link labelArmand Philippot2022-06-078-49/+90
|
* chore: use image title as figure label if no caption is providedArmand Philippot2022-06-071-2/+6
|
* chore: add aria hidden attribute to SVG iconsArmand Philippot2022-06-0731-23/+272
|
* test(unit): fix Jest errors due to images importArmand Philippot2022-06-033-1/+6
| | | | | I mocked some SVG files and moves the branding photo to public directory. It is more a workaround than a real fix but it works so...
* test: install and configure cypressArmand Philippot2022-06-0296-96/+96
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* fix: improve help button accessibility with aria-pressedArmand Philippot2022-06-023-5/+13
|
* fix: ensure radio buttons are accessibleArmand Philippot2022-06-022-4/+24
| | | | | It seems I cannot use the SVG title as label. So I removed the title and added a visually hidden span to set the radio buttons label.
* chore: replace the Ackee select by a toggle componentArmand Philippot2022-06-0138-745/+716
|
* chore: replace the toggle componentArmand Philippot2022-06-0126-496/+515
|
* chore: add a RadioGroup componentArmand Philippot2022-05-316-2/+348
|
* chore: add a Fieldset componentArmand Philippot2022-05-315-0/+216
|
* chore: replace Checkbox component with a BooleanField componentArmand Philippot2022-05-3121-211/+774
| | | | | Checkbox and radio buttons are working the same way so I decided to group them in a same component.
* fix(settings): reduce font-size on small devicesArmand Philippot2022-05-2515-12/+142
| | | | | With French translation, words are a little longer so I reduce the font size on small devices to avoid line breaking.
* fix: reset focus to top of the page on route changeArmand Philippot2022-05-251-2/+8
|
* build(deps): bump all dependenciesArmand Philippot2022-05-252-5/+5
| | | | | | | I moved the website picture from useSettings to the layout component since it is only used here. This reduce the number of Jest errors. However, there's still some issues with some images import...
* chore: close search form when launching searchArmand Philippot2022-05-241-0/+2
|
* chore: give autofocus to the toolbar search formArmand Philippot2022-05-245-48/+59
|