Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/InseeFr/Lunatic-DSFR into f…
Browse files Browse the repository at this point in the history
…eat/use-classnames-and-fr-cx
  • Loading branch information
Maaliciaa committed Sep 25, 2023
2 parents ee29a70 + 3a648ae commit b7b2a16
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@inseefr/lunatic-dsfr",
"version": "0.0.35",
"version": "0.0.36",
"description": "Couche graphique pour Lunatic reposant sur le Système de Design de l'État (DSFR)",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion src/Datepicker/DatepickerInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function DatepickerInput({
<InputDSFR
disabled={disabled}
label="Mois"
hintText="Exemple: 7"
hintText="Exemple: 07"
className={state ? `fr-input-group--${state}` : ""}
nativeInputProps={{
id: `${id}-month`,
Expand Down
49 changes: 27 additions & 22 deletions src/Suggester/elements/ComboBoxPanelContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ type Props = PropsWithChildren<{
const useStyles = makeStyles()(theme => ({
root: {
maxHeight: "20rem",
overflow: "scroll",
overflowX: "hidden",
overflowY: "scroll",
"> li": {
listStyle: "none",
boxSizing: "border-box",
Expand All @@ -34,25 +35,29 @@ const useStyles = makeStyles()(theme => ({

export function ComboboxPanelContainer({ children, focused, expanded, id }: Props) {
const { classes, cx } = useStyles();
return (
<ul
id={`lunatic-combo-box-panel-${id}`}
aria-label="suggestions"
className={classnames(
"lunatic-combo-box-panel",
"fr-select",
"fr-p-0",
"fr-mb-0",
"fr-mt-0",
{
focused,
expanded,
},
cx(classes.root),
)}
role="listbox"
>
{children}
</ul>
);

if (Array.isArray(children) && children.length > 0) {
return (
<ul
id={`lunatic-combo-box-panel-${id}`}
aria-label="suggestions"
className={classnames(
"lunatic-combo-box-panel",
"fr-select",
"fr-p-0",
"fr-mb-0",
"fr-mt-0",
{
focused,
expanded,
},
cx(classes.root),
)}
role="listbox"
>
{children}
</ul>
);
}
return null;
}
3 changes: 0 additions & 3 deletions src/stories/modal/modal.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import Orchestrator from "../utils/Orchestrator";
import source from "./source.json";
import * as custom from "../..";

// eslint-disable-next-line no-undef
console.log(custom);

const stories = {
title: "Components/Modal",
component: Orchestrator,
Expand Down

0 comments on commit b7b2a16

Please sign in to comment.