aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules
Commit message (Collapse)AuthorAgeFilesLines
* refactor(components): rewrite Breadcrumbs componentArmand Philippot2023-11-115-238/+0
|
* refactor(components): rewrite Pagination componentArmand Philippot2023-11-115-458/+0
|
* feat(components): add a Colophon componentArmand Philippot2023-11-116-0/+201
|
* refactor(components): rewrite Copyright componentArmand Philippot2023-11-116-0/+142
| | | | | | | | | * remove `icon` prop (it is confusing because a copyright should have the copyright symbol, the license is not part of the copyright) * reorganize copyright informations I also updated the CC BY SA icon because the elements was in the wrong order.
* refactor(components): rewrite NavList componentArmand Philippot2023-11-1113-230/+178
| | | | | | | * extract NavItem from NavList * remove `kind` and `listClassName` props (since the consumer has control over NavList, NavItem and NavLink components these props are obsolete)
* refactor(components): rewrite NavLink componentArmand Philippot2023-11-116-73/+190
| | | | * handle style variants to avoid declaring the styles in consumers
* feat(components): add a generic Grid componentArmand Philippot2023-11-1111-248/+368
| | | | | * merge Columns, Gallery and CardsList into Grid component * add more options to control the grid
* refactor(components): rewrite Card componentArmand Philippot2023-11-1122-456/+1414
| | | | | | | | | | | | | * make the component more generic * merge `<Summary />` and `<Comment />` styles into card component to avoid repeating the same structure * remove most of the props to use composition However the CSS is a bit complex because of the two variants... Also, the component should be refactored when the CSS pseudo-class `:has` has enough support: the provider and the `cover` and `meta` props should be removed.
* refactor(components): rewrite Code component and usePrism hookArmand Philippot2023-11-1110-505/+396
| | | | | | | | | | | | * move Prism styles to Sass placeholders to avoid repeats * let usePrism consumer define its plugins (remove default ones) * remove `plugins` prop from Code component * add new props to Code component to let consumer configure plugins (and handle plugin list from the given options) However there are some problems with Prism plugins: line-highlight and treeview does not seems to be loaded. I don't want to use Babel instead of SWC so I have no solution for now.
* refactor(components): replace Meta component with MetaListArmand Philippot2023-11-1125-540/+736
| | | | | | It removes items complexity by allowing consumers to use any label/value association. Translations should also be defined by the consumer. Each item can now be configured separately (borders, layout...).
* refactor(components): replace ResponsiveImage with Figure componentArmand Philippot2023-11-118-413/+8
| | | | | | | | The styles applied to ResponsiveImage are related to the figure and figcaption elements. Those elements could be use with other contents than images. So I extracted them in a Figure component. The ResponsiveImage component is no longer useful: the consumer should use the Image component from `next` and wrap it in a link if needed.
* refactor(components): rewrite Branding componentArmand Philippot2023-11-1111-421/+308
| | | | | | The component should only be responsible of the layout for the logo, the name and the optional baseline. Also, the homepage url could be different from `/` so the consumer should give the right url.
* refactor(components): extract FlippingLogo from Branding componentArmand Philippot2023-11-118-33/+143
|
* feat(components): add a generic Flip componentArmand Philippot2023-11-1113-352/+186
| | | | | | The flipping animation is used at several places so it makes sense to use a single component to handle the animation. It will avoid styles duplication.
* refactor(components): merge HeadingButton and Widget componentsArmand Philippot2023-11-1116-513/+365
| | | | | | The HeadingButton component was only used inside Widget component and it is not very useful on its own so I merge the two components in a new Collapsible component.
* refactor(components): make form components compliant with Eslint rulesArmand Philippot2023-11-1110-61/+94
|
* refactor(components): rewrite HelpButton componentArmand Philippot2023-11-1110-91/+104
|
* refactor(components): rewrite BackToTop componentArmand Philippot2023-11-118-113/+131
| | | | | * replace `link` prop with `anchor` prop * add a `label` prop to let consumer handle the accessible name
* refactor(components): rewrite Link componentArmand Philippot2023-11-1110-5/+229
| | | | | | | | | * 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): remove Column and NoScript from atomsArmand Philippot2023-11-113-15/+33
| | | | | | | * 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-117-104/+81
| | | | | | | | | | | | | * 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-116-51/+31
| | | | | | | | | * 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): make Logo component ESlint compliantArmand Philippot2023-10-241-8/+15
| | | | | 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-248-29/+34
| | | | | 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-247-51/+41
| | | | | Some components have been renamed to be able to create Footer, Header and Nav.
* refactor(components): rewrite Heading componentArmand Philippot2023-10-245-45/+41
| | | | | | | | | * 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 Button and ButtonLink componentsArmand Philippot2023-10-247-56/+69
| | | | | | | | | | | | | | 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
* build: convert project to esmArmand Philippot2023-10-2421-1/+22
|
* refactor(components): rewrite form componentsArmand Philippot2023-10-2474-3428/+1092
|
* refactor: use named export for everything except pagesArmand Philippot2023-09-2091-325/+288
| | | | | | 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.
* refactor(build): replace paths aliases with relative pathsArmand Philippot2023-09-1978-127/+126
| | | | | | 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-237-35/+23
|
* fix(settings): avoid cropped tooltip on small devicesArmand Philippot2022-06-0912-19/+69
| | | | | | 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-082-15/+20
| | | | | 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 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-074-48/+69
|
* 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-073-3/+3
|
* test: install and configure cypressArmand Philippot2022-06-0228-28/+28
| | | | I also configure Jest to avoid conflicts between Cypress and Jest.
* fix: improve help button accessibility with aria-pressedArmand Philippot2022-06-022-1/+5
|
* 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-0128-586/+780
|
* chore: replace the toggle componentArmand Philippot2022-06-0120-472/+431
|
* chore: add a RadioGroup componentArmand Philippot2022-05-316-2/+348
|
* chore: replace Checkbox component with a BooleanField componentArmand Philippot2022-05-316-7/+408
| | | | | 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-2512-7/+105
| | | | | With French translation, words are a little longer so I reduce the font size on small devices to avoid line breaking.
* chore: give autofocus to the toolbar search formArmand Philippot2022-05-241-11/+10
|
* test: fix theme toggle and comment testsArmand Philippot2022-05-242-4/+4
|
* chore(toolbar): change icons to close button when activatedArmand Philippot2022-05-244-0/+213
|
* chore: adjust cards list spacingArmand Philippot2022-05-231-1/+1
|