@egen-civitas/esm-styleguide 5.0.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/ui/accordion.d.ts +8 -0
- package/dist/ui/accordion.d.ts.map +1 -0
- package/dist/ui/accordion.js +48 -0
- package/dist/ui/checkbox.d.ts +5 -0
- package/dist/ui/checkbox.d.ts.map +1 -0
- package/dist/ui/checkbox.js +22 -0
- package/dist/ui/index.d.ts +8 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +8 -0
- package/dist/ui/menu-list.d.ts +14 -0
- package/dist/ui/menu-list.d.ts.map +1 -0
- package/dist/ui/menu-list.js +45 -0
- package/dist/ui/password-input.d.ts +11 -0
- package/dist/ui/password-input.d.ts.map +1 -0
- package/dist/ui/password-input.js +35 -0
- package/dist/ui/radio-group.d.ts +6 -0
- package/dist/ui/radio-group.d.ts.map +1 -0
- package/dist/ui/radio-group.js +29 -0
- package/dist/ui/search-input.d.ts +16 -0
- package/dist/ui/search-input.d.ts.map +1 -0
- package/dist/ui/search-input.js +51 -0
- package/dist/ui/skeleton.d.ts +4 -0
- package/dist/ui/skeleton.d.ts.map +1 -0
- package/dist/ui/skeleton.js +13 -0
- package/dist/ui/structured-list.d.ts +10 -0
- package/dist/ui/structured-list.d.ts.map +1 -0
- package/dist/ui/structured-list.js +46 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @egen-civitas/esm-styleguide
|
|
2
2
|
|
|
3
|
+
## 5.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c995661: Nouveaux composants de base 100 % Tailwind : `RadioGroup` / `RadioGroupItem` (copiés de shadcn/ui, MIT ; accessibilité via Radix) et `SearchInput` (champ de recherche avec loupe, bouton « effacer » et `Échap` pour vider).
|
|
8
|
+
|
|
9
|
+
## 5.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 03dcc6f: Nouveaux composants de base 100 % Tailwind, pour finir le retrait de Carbon dans le core : `Checkbox`, `Accordion` (+ `AccordionItem`, `AccordionTrigger`, `AccordionContent`), `Skeleton` (copiés de shadcn/ui, MIT), `PasswordInput` (champ mot de passe avec bouton œil), `MenuList` / `MenuItem` / `MenuDivider` (liste d'actions d'un panneau, remplace `Switcher`) et `StructuredList` (+ `StructuredListHead`, `StructuredListBody`, `StructuredListRow`, `StructuredListCell`).
|
|
14
|
+
|
|
3
15
|
## 5.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
3
|
+
declare function Accordion({ ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
8
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/ui/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAE1D,iBAAS,SAAS,CAAC,EACjB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAEtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,qBAQtD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAgBzD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,qBAUzD;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Copié puis adapté de shadcn/ui (MIT, © 2023 shadcn) — https://github.com/shadcn-ui/ui (accordion.tsx, registre new-york-v4).
|
|
3
|
+
// Ce fichier appartient désormais à EGEN : le modifier librement. Avis de licence : THIRD_PARTY_NOTICES.md à la racine du dépôt.
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "./cn.js";
|
|
6
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
7
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
8
|
+
function Accordion({ ...props }) {
|
|
9
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Root, {
|
|
10
|
+
"data-slot": "accordion",
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function AccordionItem({ className, ...props }) {
|
|
15
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Item, {
|
|
16
|
+
"data-slot": "accordion-item",
|
|
17
|
+
className: cn("border-b last:border-b-0", className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
22
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Header, {
|
|
23
|
+
className: "flex",
|
|
24
|
+
children: /*#__PURE__*/ _jsxs(AccordionPrimitive.Trigger, {
|
|
25
|
+
"data-slot": "accordion-trigger",
|
|
26
|
+
className: cn("flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180", className),
|
|
27
|
+
...props,
|
|
28
|
+
children: [
|
|
29
|
+
children,
|
|
30
|
+
/*#__PURE__*/ _jsx(ChevronDownIcon, {
|
|
31
|
+
className: "pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function AccordionContent({ className, children, ...props }) {
|
|
38
|
+
return /*#__PURE__*/ _jsx(AccordionPrimitive.Content, {
|
|
39
|
+
"data-slot": "accordion-content",
|
|
40
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
41
|
+
...props,
|
|
42
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
43
|
+
className: cn("pt-0 pb-4", className),
|
|
44
|
+
children: children
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
3
|
+
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
export { Checkbox };
|
|
5
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/ui/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAExD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,qBAkBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copié puis adapté de shadcn/ui (MIT, © 2023 shadcn) — https://github.com/shadcn-ui/ui (checkbox.tsx, registre new-york-v4).
|
|
3
|
+
// Ce fichier appartient désormais à EGEN : le modifier librement. Avis de licence : THIRD_PARTY_NOTICES.md à la racine du dépôt.
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "./cn.js";
|
|
6
|
+
import { CheckIcon } from "lucide-react";
|
|
7
|
+
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
8
|
+
function Checkbox({ className, ...props }) {
|
|
9
|
+
return /*#__PURE__*/ _jsx(CheckboxPrimitive.Root, {
|
|
10
|
+
"data-slot": "checkbox",
|
|
11
|
+
className: cn("peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary", className),
|
|
12
|
+
...props,
|
|
13
|
+
children: /*#__PURE__*/ _jsx(CheckboxPrimitive.Indicator, {
|
|
14
|
+
"data-slot": "checkbox-indicator",
|
|
15
|
+
className: "grid place-content-center text-current transition-none",
|
|
16
|
+
children: /*#__PURE__*/ _jsx(CheckIcon, {
|
|
17
|
+
className: "size-3.5"
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { Checkbox };
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -20,4 +20,12 @@ export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableC
|
|
|
20
20
|
export { ModalHeader, ModalBody, ModalFooter, type ModalHeaderProps } from './modal.js';
|
|
21
21
|
export { NotificationBanner, type NotificationBannerProps, type NotificationKind } from './notification-banner.js';
|
|
22
22
|
export { AppHeader, AppHeaderName, AppHeaderBar, AppHeaderAction } from './app-header.js';
|
|
23
|
+
export { Checkbox } from './checkbox.js';
|
|
24
|
+
export { Skeleton } from './skeleton.js';
|
|
25
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from './accordion.js';
|
|
26
|
+
export { PasswordInput, type PasswordInputProps } from './password-input.js';
|
|
27
|
+
export { MenuList, MenuItem, MenuDivider, type MenuItemProps } from './menu-list.js';
|
|
28
|
+
export { StructuredList, StructuredListHead, StructuredListBody, StructuredListRow, StructuredListCell, } from './structured-list.js';
|
|
29
|
+
export { RadioGroup, RadioGroupItem } from './radio-group.js';
|
|
30
|
+
export { SearchInput, type SearchInputProps } from './search-input.js';
|
|
23
31
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,KAA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OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/ui/index.js
CHANGED
|
@@ -23,3 +23,11 @@ export { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableC
|
|
|
23
23
|
export { ModalHeader, ModalBody, ModalFooter } from "./modal.js";
|
|
24
24
|
export { NotificationBanner } from "./notification-banner.js";
|
|
25
25
|
export { AppHeader, AppHeaderName, AppHeaderBar, AppHeaderAction } from "./app-header.js";
|
|
26
|
+
export { Checkbox } from "./checkbox.js";
|
|
27
|
+
export { Skeleton } from "./skeleton.js";
|
|
28
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } from "./accordion.js";
|
|
29
|
+
export { PasswordInput } from "./password-input.js";
|
|
30
|
+
export { MenuList, MenuItem, MenuDivider } from "./menu-list.js";
|
|
31
|
+
export { StructuredList, StructuredListHead, StructuredListBody, StructuredListRow, StructuredListCell } from "./structured-list.js";
|
|
32
|
+
export { RadioGroup, RadioGroupItem } from "./radio-group.js";
|
|
33
|
+
export { SearchInput } from "./search-input.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function MenuList({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
3
|
+
type MenuItemProps = React.ComponentProps<'button'> & {
|
|
4
|
+
/** Rend un lien (`<a>`) vers cette adresse au lieu d'un bouton. */
|
|
5
|
+
href?: string;
|
|
6
|
+
target?: string;
|
|
7
|
+
rel?: string;
|
|
8
|
+
/** Élément actuellement choisi (`aria-current`). */
|
|
9
|
+
selected?: boolean;
|
|
10
|
+
};
|
|
11
|
+
declare function MenuItem({ className, href, target, rel, selected, children, type, ...props }: MenuItemProps): React.JSX.Element;
|
|
12
|
+
declare function MenuDivider({ className, ...props }: React.ComponentProps<'li'>): React.JSX.Element;
|
|
13
|
+
export { MenuList, MenuItem, MenuDivider, type MenuItemProps };
|
|
14
|
+
//# sourceMappingURL=menu-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu-list.d.ts","sourceRoot":"","sources":["../../src/ui/menu-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAEpE;AAKD,KAAK,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IACpD,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAe,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBA2B/G;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,qBAEvE;AAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "./cn.js";
|
|
4
|
+
// Liste d'actions d'un panneau (menu utilisateur, langue, outils hors ligne…) : remplace `Switcher` / `SwitcherItem` de Carbon.
|
|
5
|
+
// Pour un menu qui s'ouvre au clic sur un bouton, utiliser `DropdownMenu` (gestion du focus et du clavier incluse).
|
|
6
|
+
function MenuList({ className, ...props }) {
|
|
7
|
+
return /*#__PURE__*/ _jsx("ul", {
|
|
8
|
+
"data-slot": "menu-list",
|
|
9
|
+
role: "menu",
|
|
10
|
+
className: cn('m-0 flex list-none flex-col p-0', className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
const itemClass = 'flex min-h-10 w-full cursor-pointer items-center gap-2 border-0 bg-transparent px-4 py-2 text-left text-sm text-foreground no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset disabled:pointer-events-none disabled:opacity-50';
|
|
15
|
+
function MenuItem({ className, href, target, rel, selected, children, type = 'button', ...props }) {
|
|
16
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
17
|
+
role: "none",
|
|
18
|
+
"data-slot": "menu-item",
|
|
19
|
+
children: href ? /*#__PURE__*/ _jsx("a", {
|
|
20
|
+
role: "menuitem",
|
|
21
|
+
href: href,
|
|
22
|
+
target: target,
|
|
23
|
+
rel: rel ?? (target === '_blank' ? 'noopener noreferrer' : undefined),
|
|
24
|
+
"aria-current": selected || undefined,
|
|
25
|
+
className: cn(itemClass, selected && 'font-semibold', className),
|
|
26
|
+
children: children
|
|
27
|
+
}) : /*#__PURE__*/ _jsx("button", {
|
|
28
|
+
role: "menuitem",
|
|
29
|
+
type: type,
|
|
30
|
+
"aria-current": selected || undefined,
|
|
31
|
+
className: cn(itemClass, selected && 'font-semibold', className),
|
|
32
|
+
...props,
|
|
33
|
+
children: children
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function MenuDivider({ className, ...props }) {
|
|
38
|
+
return /*#__PURE__*/ _jsx("li", {
|
|
39
|
+
role: "separator",
|
|
40
|
+
"data-slot": "menu-divider",
|
|
41
|
+
className: cn('my-1 h-px bg-border', className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export { MenuList, MenuItem, MenuDivider };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type TextInputProps } from './text-input.js';
|
|
3
|
+
type PasswordInputProps = Omit<TextInputProps, 'type'> & {
|
|
4
|
+
/** Libellés (déjà traduits) du bouton qui affiche / masque le mot de passe. */
|
|
5
|
+
showPasswordLabel?: string;
|
|
6
|
+
hidePasswordLabel?: string;
|
|
7
|
+
};
|
|
8
|
+
/** Champ mot de passe : `TextInput` avec un bouton œil pour afficher ou masquer la saisie. */
|
|
9
|
+
declare function PasswordInput({ showPasswordLabel, hidePasswordLabel, containerClassName, className, ...props }: PasswordInputProps): React.JSX.Element;
|
|
10
|
+
export { PasswordInput, type PasswordInputProps };
|
|
11
|
+
//# sourceMappingURL=password-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"password-input.d.ts","sourceRoot":"","sources":["../../src/ui/password-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjE,KAAK,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,GAAG;IACvD,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,8FAA8F;AAC9F,iBAAS,aAAa,CAAC,EACrB,iBAAmC,EACnC,iBAAmC,EACnC,kBAAkB,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,kBAAkB,qBAiBpB;AAED,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
4
|
+
import { cn } from "./cn.js";
|
|
5
|
+
import { TextInput } from "./text-input.js";
|
|
6
|
+
/** Champ mot de passe : `TextInput` avec un bouton œil pour afficher ou masquer la saisie. */ function PasswordInput({ showPasswordLabel = 'Show password', hidePasswordLabel = 'Hide password', containerClassName, className, ...props }) {
|
|
7
|
+
const [visible, setVisible] = React.useState(false);
|
|
8
|
+
const toggleLabel = visible ? hidePasswordLabel : showPasswordLabel;
|
|
9
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
10
|
+
className: cn('relative', containerClassName),
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ _jsx(TextInput, {
|
|
13
|
+
...props,
|
|
14
|
+
containerClassName: "w-full",
|
|
15
|
+
type: visible ? 'text' : 'password',
|
|
16
|
+
className: cn('pr-10', className)
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsx("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
"aria-label": toggleLabel,
|
|
21
|
+
title: toggleLabel,
|
|
22
|
+
onClick: ()=>setVisible((value)=>!value),
|
|
23
|
+
className: "absolute right-1 bottom-0 inline-flex size-9 items-center justify-center rounded-md text-muted-foreground outline-none hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
24
|
+
children: visible ? /*#__PURE__*/ _jsx(EyeOffIcon, {
|
|
25
|
+
className: "size-4",
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
}) : /*#__PURE__*/ _jsx(EyeIcon, {
|
|
28
|
+
className: "size-4",
|
|
29
|
+
"aria-hidden": "true"
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
]
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
export { PasswordInput };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
3
|
+
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): React.JSX.Element;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
6
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../src/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,EAAE,UAAU,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE5D,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAQvD;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,qBAkBvD;AAED,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copié puis adapté de shadcn/ui (MIT, © 2023 shadcn) — https://github.com/shadcn-ui/ui (radio-group.tsx, registre new-york-v4).
|
|
3
|
+
// Ce fichier appartient désormais à EGEN : le modifier librement. Avis de licence : THIRD_PARTY_NOTICES.md à la racine du dépôt.
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "./cn.js";
|
|
6
|
+
import { CircleIcon } from "lucide-react";
|
|
7
|
+
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
8
|
+
function RadioGroup({ className, ...props }) {
|
|
9
|
+
return /*#__PURE__*/ _jsx(RadioGroupPrimitive.Root, {
|
|
10
|
+
"data-slot": "radio-group",
|
|
11
|
+
className: cn("grid gap-3", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function RadioGroupItem({ className, ...props }) {
|
|
16
|
+
return /*#__PURE__*/ _jsx(RadioGroupPrimitive.Item, {
|
|
17
|
+
"data-slot": "radio-group-item",
|
|
18
|
+
className: cn("aspect-square size-4 shrink-0 rounded-full border border-input text-primary shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:ring-destructive/40", className),
|
|
19
|
+
...props,
|
|
20
|
+
children: /*#__PURE__*/ _jsx(RadioGroupPrimitive.Indicator, {
|
|
21
|
+
"data-slot": "radio-group-indicator",
|
|
22
|
+
className: "relative flex items-center justify-center",
|
|
23
|
+
children: /*#__PURE__*/ _jsx(CircleIcon, {
|
|
24
|
+
className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-primary"
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type SearchInputProps = Omit<React.ComponentProps<'input'>, 'type' | 'value' | 'defaultValue' | 'onChange'> & {
|
|
3
|
+
/** Libellé accessible du champ (obligatoire : pas de libellé visible). */
|
|
4
|
+
label: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
/** Reçoit la valeur saisie (pas l'événement). */
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
9
|
+
/** Libellé du bouton qui vide le champ. */
|
|
10
|
+
clearLabel?: string;
|
|
11
|
+
containerClassName?: string;
|
|
12
|
+
};
|
|
13
|
+
/** Champ de recherche : icône loupe, bouton « effacer » dès qu'il y a une saisie, `Échap` vide le champ. */
|
|
14
|
+
declare function SearchInput({ label, value, defaultValue, onValueChange, clearLabel, className, containerClassName, onKeyDown, ...props }: SearchInputProps): React.JSX.Element;
|
|
15
|
+
export { SearchInput, type SearchInputProps };
|
|
16
|
+
//# sourceMappingURL=search-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-input.d.ts","sourceRoot":"","sources":["../../src/ui/search-input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,KAAK,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc,GAAG,UAAU,CAAC,GAAG;IAC5G,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,4GAA4G;AAC5G,iBAAS,WAAW,CAAC,EACnB,KAAK,EACL,KAAK,EACL,YAAiB,EACjB,aAAa,EACb,UAA2B,EAC3B,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,qBA2ClB;AAED,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { SearchIcon, XIcon } from "lucide-react";
|
|
4
|
+
import { cn } from "./cn.js";
|
|
5
|
+
/** Champ de recherche : icône loupe, bouton « effacer » dès qu'il y a une saisie, `Échap` vide le champ. */ function SearchInput({ label, value, defaultValue = '', onValueChange, clearLabel = 'Clear search', className, containerClassName, onKeyDown, ...props }) {
|
|
6
|
+
const [inner, setInner] = React.useState(defaultValue);
|
|
7
|
+
const controlled = value !== undefined;
|
|
8
|
+
const current = controlled ? value : inner;
|
|
9
|
+
const update = (next)=>{
|
|
10
|
+
if (!controlled) setInner(next);
|
|
11
|
+
onValueChange?.(next);
|
|
12
|
+
};
|
|
13
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
14
|
+
"data-slot": "search-input",
|
|
15
|
+
className: cn('relative flex items-center', containerClassName),
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsx(SearchIcon, {
|
|
18
|
+
className: "pointer-events-none absolute left-3 size-4 text-muted-foreground",
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ _jsx("input", {
|
|
22
|
+
type: "search",
|
|
23
|
+
role: "searchbox",
|
|
24
|
+
"aria-label": label,
|
|
25
|
+
value: current,
|
|
26
|
+
onChange: (event)=>update(event.target.value),
|
|
27
|
+
onKeyDown: (event)=>{
|
|
28
|
+
onKeyDown?.(event);
|
|
29
|
+
if (event.key === 'Escape' && current) {
|
|
30
|
+
event.stopPropagation();
|
|
31
|
+
update('');
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
className: cn('h-9 w-full min-w-0 rounded-md border border-input bg-transparent pr-9 pl-9 text-sm shadow-xs outline-none transition-[color,box-shadow] placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&::-webkit-search-cancel-button]:hidden', className),
|
|
35
|
+
...props
|
|
36
|
+
}),
|
|
37
|
+
current ? /*#__PURE__*/ _jsx("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
"aria-label": clearLabel,
|
|
40
|
+
title: clearLabel,
|
|
41
|
+
onClick: ()=>update(''),
|
|
42
|
+
className: "absolute right-1 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground outline-none hover:text-foreground focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
43
|
+
children: /*#__PURE__*/ _jsx(XIcon, {
|
|
44
|
+
className: "size-4",
|
|
45
|
+
"aria-hidden": "true"
|
|
46
|
+
})
|
|
47
|
+
}) : null
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export { SearchInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.d.ts","sourceRoot":"","sources":["../../src/ui/skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAQrE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// Copié puis adapté de shadcn/ui (MIT, © 2023 shadcn) — https://github.com/shadcn-ui/ui (skeleton.tsx, registre new-york-v4).
|
|
3
|
+
// Ce fichier appartient désormais à EGEN : le modifier librement. Avis de licence : THIRD_PARTY_NOTICES.md à la racine du dépôt.
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "./cn.js";
|
|
6
|
+
function Skeleton({ className, ...props }) {
|
|
7
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
8
|
+
"data-slot": "skeleton",
|
|
9
|
+
className: cn("animate-pulse rounded-md bg-accent", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export { Skeleton };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare function StructuredList({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
3
|
+
declare function StructuredListHead({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
4
|
+
declare function StructuredListBody({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
5
|
+
declare function StructuredListRow({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
6
|
+
declare function StructuredListCell({ className, head, ...props }: React.ComponentProps<'div'> & {
|
|
7
|
+
head?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export { StructuredList, StructuredListHead, StructuredListBody, StructuredListRow, StructuredListCell };
|
|
10
|
+
//# sourceMappingURL=structured-list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-list.d.ts","sourceRoot":"","sources":["../../src/ui/structured-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAE3E;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAS/E;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAE/E;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAS9E;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,IAAY,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,qBASlH;AAED,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "./cn.js";
|
|
4
|
+
// Liste structurée (lignes de cellules alignées, ex. l'arbre de configuration) : remplace `StructuredList*` de Carbon.
|
|
5
|
+
// Sémantique « tableau » par rôles ARIA : `StructuredList` > `StructuredListRow` > `StructuredListCell`.
|
|
6
|
+
function StructuredList({ className, ...props }) {
|
|
7
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
8
|
+
"data-slot": "structured-list",
|
|
9
|
+
role: "table",
|
|
10
|
+
className: cn('flex w-full flex-col', className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function StructuredListHead({ className, ...props }) {
|
|
15
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
16
|
+
"data-slot": "structured-list-head",
|
|
17
|
+
role: "rowgroup",
|
|
18
|
+
className: cn('border-b text-xs font-semibold text-muted-foreground', className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function StructuredListBody({ className, ...props }) {
|
|
23
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
24
|
+
"data-slot": "structured-list-body",
|
|
25
|
+
role: "rowgroup",
|
|
26
|
+
className: cn('flex flex-col', className),
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function StructuredListRow({ className, ...props }) {
|
|
31
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
32
|
+
"data-slot": "structured-list-row",
|
|
33
|
+
role: "row",
|
|
34
|
+
className: cn('flex items-center border-b border-border last:border-b-0', className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function StructuredListCell({ className, head = false, ...props }) {
|
|
39
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
40
|
+
"data-slot": "structured-list-cell",
|
|
41
|
+
role: head ? 'columnheader' : 'cell',
|
|
42
|
+
className: cn('min-w-0 flex-1 px-3 py-2 text-sm', className),
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
export { StructuredList, StructuredListHead, StructuredListBody, StructuredListRow, StructuredListCell };
|