@bythium/unisson 0.0.0-stage → 0.1.1-rc.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.
Files changed (92) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +28 -0
  3. package/README.md +145 -2
  4. package/dist/CHANGELOG.md +22 -0
  5. package/dist/button-group.d.ts +29 -0
  6. package/dist/button-group.js +1 -0
  7. package/dist/button.d.ts +37 -0
  8. package/dist/button.js +1 -0
  9. package/dist/chunks/chunk-4GXKKP4T.js +460 -0
  10. package/dist/chunks/chunk-5TUKFRTD.js +376 -0
  11. package/dist/chunks/chunk-5VNPX7DT.js +1 -0
  12. package/dist/chunks/chunk-6TMCYM5S.js +436 -0
  13. package/dist/chunks/chunk-BAYUYXVR.js +1 -0
  14. package/dist/chunks/chunk-FGJHPGJI.js +1 -0
  15. package/dist/chunks/chunk-JOXL2SMV.js +373 -0
  16. package/dist/chunks/chunk-MWNIQCR3.js +298 -0
  17. package/dist/chunks/chunk-MYB6FQX2.js +394 -0
  18. package/dist/chunks/chunk-W3ASGVKH.js +1 -0
  19. package/dist/chunks/chunk-WKXQ2JMZ.js +557 -0
  20. package/dist/confirm-button.d.ts +37 -0
  21. package/dist/confirm-button.js +1 -0
  22. package/dist/copy-button.d.ts +25 -0
  23. package/dist/copy-button.js +1 -0
  24. package/dist/custom-elements.json +1480 -0
  25. package/dist/define.d.ts +8 -0
  26. package/dist/define.js +1 -0
  27. package/dist/icon-button.d.ts +33 -0
  28. package/dist/icon-button.js +1 -0
  29. package/dist/index.d.ts +7 -0
  30. package/dist/index.js +1 -0
  31. package/dist/react/attributes.d.ts +10 -0
  32. package/dist/react/attributes.js +25 -0
  33. package/dist/react/button-group.d.ts +27 -0
  34. package/dist/react/button-group.js +7 -0
  35. package/dist/react/button.d.ts +35 -0
  36. package/dist/react/button.js +7 -0
  37. package/dist/react/confirm-button.d.ts +35 -0
  38. package/dist/react/confirm-button.js +7 -0
  39. package/dist/react/copy-button.d.ts +23 -0
  40. package/dist/react/copy-button.js +7 -0
  41. package/dist/react/icon-button.d.ts +31 -0
  42. package/dist/react/icon-button.js +7 -0
  43. package/dist/react/index.d.ts +8 -0
  44. package/dist/react/index.js +9 -0
  45. package/dist/react/runtime.js +11 -0
  46. package/dist/react/split-button.d.ts +31 -0
  47. package/dist/react/split-button.js +7 -0
  48. package/dist/react/toggle-button.d.ts +27 -0
  49. package/dist/react/toggle-button.js +7 -0
  50. package/dist/split-button.d.ts +33 -0
  51. package/dist/split-button.js +1 -0
  52. package/dist/svelte/OButton.svelte +14 -0
  53. package/dist/svelte/OButton.svelte.d.ts +36 -0
  54. package/dist/svelte/OButtonGroup.svelte +14 -0
  55. package/dist/svelte/OButtonGroup.svelte.d.ts +28 -0
  56. package/dist/svelte/OConfirmButton.svelte +14 -0
  57. package/dist/svelte/OConfirmButton.svelte.d.ts +36 -0
  58. package/dist/svelte/OCopyButton.svelte +14 -0
  59. package/dist/svelte/OCopyButton.svelte.d.ts +24 -0
  60. package/dist/svelte/OIconButton.svelte +14 -0
  61. package/dist/svelte/OIconButton.svelte.d.ts +32 -0
  62. package/dist/svelte/OSplitButton.svelte +14 -0
  63. package/dist/svelte/OSplitButton.svelte.d.ts +32 -0
  64. package/dist/svelte/OToggleButton.svelte +14 -0
  65. package/dist/svelte/OToggleButton.svelte.d.ts +28 -0
  66. package/dist/svelte/attributes.d.ts +10 -0
  67. package/dist/svelte/attributes.js +25 -0
  68. package/dist/svelte/index.d.ts +8 -0
  69. package/dist/svelte/index.js +8 -0
  70. package/dist/toggle-button.d.ts +29 -0
  71. package/dist/toggle-button.js +1 -0
  72. package/dist/tokens.css +200 -0
  73. package/dist/vue/attributes.d.ts +10 -0
  74. package/dist/vue/attributes.js +25 -0
  75. package/dist/vue/button-group.d.ts +27 -0
  76. package/dist/vue/button-group.js +6 -0
  77. package/dist/vue/button.d.ts +35 -0
  78. package/dist/vue/button.js +6 -0
  79. package/dist/vue/confirm-button.d.ts +35 -0
  80. package/dist/vue/confirm-button.js +6 -0
  81. package/dist/vue/copy-button.d.ts +23 -0
  82. package/dist/vue/copy-button.js +6 -0
  83. package/dist/vue/icon-button.d.ts +31 -0
  84. package/dist/vue/icon-button.js +6 -0
  85. package/dist/vue/index.d.ts +8 -0
  86. package/dist/vue/index.js +8 -0
  87. package/dist/vue/runtime.js +31 -0
  88. package/dist/vue/split-button.d.ts +31 -0
  89. package/dist/vue/split-button.js +6 -0
  90. package/dist/vue/toggle-button.d.ts +27 -0
  91. package/dist/vue/toggle-button.js +6 -0
  92. package/package.json +199 -4
@@ -0,0 +1,36 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import type { Component, Snippet } from 'svelte';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { BythiumConfirmButton, BythiumConfirmButtonEventMap } from '../confirm-button.js';
5
+
6
+ export interface OConfirmButtonOwnProps {
7
+ /** Libellé du déclencheur, repris dans le titre du dialogue : il donne le nom accessible. Valeur par défaut : « Supprimer » (ou « Delete » selon locale). Attribute `label`. */
8
+ label?: string;
9
+ /** Refuse l’ouverture et ferme un dialogue ouvert ; aucune confirmation possible. Attribute `disabled`. */
10
+ disabled?: boolean;
11
+ /** Confirmation par saisie du texte exact (typed) ou par maintien du bouton ou de la touche Espace (hold). Attribute `mode`. */
12
+ mode?: 'typed' | 'hold';
13
+ /** Texte à saisir à l’identique (casse comprise) en mode typed ; vide : confirmation impossible. Attribute `confirmation-text`. */
14
+ confirmationText?: string;
15
+ /** Durée du maintien en millisecondes en mode hold ; 500 au moins (une valeur plus courte vaut 500). Attribute `hold-duration`. */
16
+ holdDuration?: number;
17
+ /** Texte d’explication du dialogue, relié par aria-describedby. Valeur par défaut : « Cette action nécessite une confirmation explicite. » (ou « This action needs an explicit confirmation. » selon locale). Attribute `description`. */
18
+ description?: string;
19
+ /** Niveau du titre du dialogue (h1 à h6), fixé par la page (WC-N03). Attribute `heading-level`. */
20
+ headingLevel?: number;
21
+ /** Langue des textes intégrés (BCP 47) : titre, consigne de saisie ou de maintien, boutons, progression, et libellé ou explication par défaut. Toute balise en vaut en, le reste vaut fr. Un texte que la page écrit, quand l’attribut existe, l’emporte. Attribute `locale`. */
22
+ locale?: string;
23
+ /** Émis quand la confirmation aboutit (texte exact puis Confirmer, ou maintien complet). La balise n’exécute jamais l’action : la page s’en charge. Event `bythium-confirm`. */
24
+ 'onbythium-confirm'?: (event: BythiumConfirmButtonEventMap['bythium-confirm']) => void;
25
+ /** Émis quand l’utilisateur ferme le dialogue sans confirmer (Annuler, Échap). Event `bythium-cancel`. */
26
+ 'onbythium-cancel'?: (event: BythiumConfirmButtonEventMap['bythium-cancel']) => void;
27
+ }
28
+
29
+ export interface OConfirmButtonProps extends OConfirmButtonOwnProps, Omit<HTMLAttributes<BythiumConfirmButton>, keyof OConfirmButtonOwnProps | 'children'> {
30
+ /** Default slot; an element with `slot="<name>"` fills a named slot. */
31
+ children?: Snippet;
32
+ }
33
+
34
+ /** Action destructive à double confirmation (texte exact ou maintien au clavier et au pointeur), annulable, focus rendu au déclencheur. Renders `<bythium-confirm-button>`. */
35
+ declare const OConfirmButton: Component<OConfirmButtonProps>;
36
+ export default OConfirmButton;
@@ -0,0 +1,14 @@
1
+ <!-- Generated from the contract of bythium-copy-button (packages/unisson/available.json). Do not edit. -->
2
+ <script module>
3
+ if (typeof customElements !== 'undefined') import('../copy-button.js');
4
+ </script>
5
+
6
+ <script>
7
+ import { elementAttributes } from './attributes.js';
8
+
9
+ const spec = {"tag":"bythium-copy-button","attributes":{"locale":["locale","string"],"value":["value","string"],"disabled":["disabled","boolean"]},"events":{}};
10
+ // Every prop the parent passes, without Svelte's own keys ($$slots, $$scope, children).
11
+ $: attributes = elementAttributes(spec, Object.fromEntries(Object.entries($$props).filter(([key]) => !key.startsWith('$$') && key !== 'children')));
12
+ </script>
13
+
14
+ <bythium-copy-button {...attributes}><slot /></bythium-copy-button>
@@ -0,0 +1,24 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import type { Component, Snippet } from 'svelte';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { BythiumCopyButton, BythiumCopyButtonEventMap } from '../copy-button.js';
5
+
6
+ export interface OCopyButtonOwnProps {
7
+ /** Langue du texte par défaut et du message de copie (BCP 47) : toute balise en vaut en, le reste vaut fr. Attribute `locale`. */
8
+ locale?: string;
9
+ /** Texte copié dans le presse-papiers ; vide par défaut. Attribute `value`. */
10
+ value?: string;
11
+ /** Refuse la copie et sort de l’ordre de tabulation. Attribute `disabled`. */
12
+ disabled?: boolean;
13
+ /** Émis après chaque tentative de copie : success vaut false quand le presse-papiers est indisponible ou refusé. Event `bythium-copy`. */
14
+ 'onbythium-copy'?: (event: BythiumCopyButtonEventMap['bythium-copy']) => void;
15
+ }
16
+
17
+ export interface OCopyButtonProps extends OCopyButtonOwnProps, Omit<HTMLAttributes<BythiumCopyButton>, keyof OCopyButtonOwnProps | 'children'> {
18
+ /** Default slot; an element with `slot="<name>"` fills a named slot. */
19
+ children?: Snippet;
20
+ }
21
+
22
+ /** Bouton qui copie une valeur dans le presse-papiers et confirme le résultat pendant deux secondes, annoncé par une région d’état. Renders `<bythium-copy-button>`. */
23
+ declare const OCopyButton: Component<OCopyButtonProps>;
24
+ export default OCopyButton;
@@ -0,0 +1,14 @@
1
+ <!-- Generated from the contract of bythium-icon-button (packages/unisson/available.json). Do not edit. -->
2
+ <script module>
3
+ if (typeof customElements !== 'undefined') import('../icon-button.js');
4
+ </script>
5
+
6
+ <script>
7
+ import { elementAttributes } from './attributes.js';
8
+
9
+ const spec = {"tag":"bythium-icon-button","attributes":{"label":["label","string"],"variant":["variant","string"],"size":["size","string"],"loading":["loading","boolean"],"disabled":["disabled","boolean"],"expanded":["expanded","string"],"hint":["hint","string"]},"events":{}};
10
+ // Every prop the parent passes, without Svelte's own keys ($$slots, $$scope, children).
11
+ $: attributes = elementAttributes(spec, Object.fromEntries(Object.entries($$props).filter(([key]) => !key.startsWith('$$') && key !== 'children')));
12
+ </script>
13
+
14
+ <bythium-icon-button {...attributes}><slot /></bythium-icon-button>
@@ -0,0 +1,32 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import type { Component, Snippet } from 'svelte';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { BythiumIconButton, BythiumIconButtonEventMap } from '../icon-button.js';
5
+
6
+ export interface OIconButtonOwnProps {
7
+ /** Nom accessible du bouton (aria-label) : l’icône n’a pas de texte visible. Attribute `label`. */
8
+ label?: string;
9
+ /** Apparence : primary (défaut), secondary, ghost ou danger. Attribute `variant`. */
10
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
11
+ /** Côté visuel : 24, 28 ou 36 px. La cible tactile garde 44 px. Attribute `size`. */
12
+ size?: 'sm' | 'md' | 'lg';
13
+ /** Action en cours : l’anneau remplace l’icône, le bouton est occupé (aria-busy) et refuse l’activation. Attribute `loading`. */
14
+ loading?: boolean;
15
+ /** Refuse l’activation et sort de l’ordre de tabulation. Attribute `disabled`. */
16
+ disabled?: boolean;
17
+ /** Divulgation : none (défaut) n’annonce rien ; false annonce replié (aria-expanded=false) ; toute autre valeur, attribut vide compris, annonce déplié. La propriété accepte aussi true et false. Attribute `expanded`. */
18
+ expanded?: string;
19
+ /** Infobulle du bouton, montrée au survol et au focus clavier, masquée par Échap ; elle décrit le bouton (aria-describedby). Vide : aucune infobulle. Attribute `hint`. */
20
+ hint?: string;
21
+ /** Émis au clic ou au clavier sur un bouton actif. Rien n’est émis désactivé ou en chargement. Event `bythium-action`. */
22
+ 'onbythium-action'?: (event: BythiumIconButtonEventMap['bythium-action']) => void;
23
+ }
24
+
25
+ export interface OIconButtonProps extends OIconButtonOwnProps, Omit<HTMLAttributes<BythiumIconButton>, keyof OIconButtonOwnProps | 'children'> {
26
+ /** Default slot; an element with `slot="<name>"` fills a named slot. */
27
+ children?: Snippet;
28
+ }
29
+
30
+ /** Bouton carré à icône, nommé par label, avec variantes, tailles, chargement, désactivation et état de divulgation facultatif ; infobulle facultative. Renders `<bythium-icon-button>`. */
31
+ declare const OIconButton: Component<OIconButtonProps>;
32
+ export default OIconButton;
@@ -0,0 +1,14 @@
1
+ <!-- Generated from the contract of bythium-split-button (packages/unisson/available.json). Do not edit. -->
2
+ <script module>
3
+ if (typeof customElements !== 'undefined') import('../split-button.js');
4
+ </script>
5
+
6
+ <script>
7
+ import { elementAttributes } from './attributes.js';
8
+
9
+ const spec = {"tag":"bythium-split-button","attributes":{"label":["label","string"],"variant":["variant","string"],"items":["items","string"],"open":["open","boolean"],"disabled":["disabled","boolean"],"menuLabel":["menu-label","string"]},"events":{}};
10
+ // Every prop the parent passes, without Svelte's own keys ($$slots, $$scope, children).
11
+ $: attributes = elementAttributes(spec, Object.fromEntries(Object.entries($$props).filter(([key]) => !key.startsWith('$$') && key !== 'children')));
12
+ </script>
13
+
14
+ <bythium-split-button {...attributes}><slot /></bythium-split-button>
@@ -0,0 +1,32 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import type { Component, Snippet } from 'svelte';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { BythiumSplitButton, BythiumSplitButtonEventMap } from '../split-button.js';
5
+
6
+ export interface OSplitButtonOwnProps {
7
+ /** Libellé visible de l’action principale ; il nomme aussi le chevron. Défaut générique « Action » : le libellé réel vient de la page. Attribute `label`. */
8
+ label?: string;
9
+ /** Apparence : primary (aplat de marque, défaut) ou secondary (fond relevé). Toute autre valeur vaut primary. Attribute `variant`. */
10
+ variant?: 'primary' | 'secondary';
11
+ /** Liste JSON des variantes : [{"value","label","disabled"?}]. Vide (défaut) ou invalide : bouton simple, sans chevron. value vaut label s’il manque ; une entrée sans libellé est ignorée. Attribute `items`. */
12
+ items?: string;
13
+ /** Menu ouvert ; réfléchi. Sans effet quand la balise est désactivée ou sans variante. Attribute `open`. */
14
+ open?: boolean;
15
+ /** Désactive les deux boutons et empêche l’ouverture du menu. Attribute `disabled`. */
16
+ disabled?: boolean;
17
+ /** Nom du menu et début du nom du chevron (« Autres actions : Action »). Attribute `menu-label`. */
18
+ menuLabel?: string;
19
+ /** Émis au clic ou au clavier sur l’action principale active. Rien n’est émis quand la balise est désactivée. Event `bythium-action`. */
20
+ 'onbythium-action'?: (event: BythiumSplitButtonEventMap['bythium-action']) => void;
21
+ /** Émis au choix d’une variante active du menu (clic, Entrée ou Espace) ; le menu se ferme et le focus revient au chevron. index : rang dans items, à partir de 0. Event `bythium-select`. */
22
+ 'onbythium-select'?: (event: BythiumSplitButtonEventMap['bythium-select']) => void;
23
+ }
24
+
25
+ export interface OSplitButtonProps extends OSplitButtonOwnProps, Omit<HTMLAttributes<BythiumSplitButton>, keyof OSplitButtonOwnProps | 'children'> {
26
+ /** Default slot; an element with `slot="<name>"` fills a named slot. */
27
+ children?: Snippet;
28
+ }
29
+
30
+ /** Bouton fractionné : action principale et chevron accolé qui ouvre un menu de variantes de la même action, en superposition. Renders `<bythium-split-button>`. */
31
+ declare const OSplitButton: Component<OSplitButtonProps>;
32
+ export default OSplitButton;
@@ -0,0 +1,14 @@
1
+ <!-- Generated from the contract of bythium-toggle-button (packages/unisson/available.json). Do not edit. -->
2
+ <script module>
3
+ if (typeof customElements !== 'undefined') import('../toggle-button.js');
4
+ </script>
5
+
6
+ <script>
7
+ import { elementAttributes } from './attributes.js';
8
+
9
+ const spec = {"tag":"bythium-toggle-button","attributes":{"pressed":["pressed","boolean"],"disabled":["disabled","boolean"],"disabledFocusable":["disabled-focusable","boolean"],"label":["label","string"],"hint":["hint","string"]},"events":{}};
10
+ // Every prop the parent passes, without Svelte's own keys ($$slots, $$scope, children).
11
+ $: attributes = elementAttributes(spec, Object.fromEntries(Object.entries($$props).filter(([key]) => !key.startsWith('$$') && key !== 'children')));
12
+ </script>
13
+
14
+ <bythium-toggle-button {...attributes}><slot /></bythium-toggle-button>
@@ -0,0 +1,28 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import type { Component, Snippet } from 'svelte';
3
+ import type { HTMLAttributes } from 'svelte/elements';
4
+ import type { BythiumToggleButton, BythiumToggleButtonEventMap } from '../toggle-button.js';
5
+
6
+ export interface OToggleButtonOwnProps {
7
+ /** État enfoncé, reflété par aria-pressed sur le bouton interne ; une écriture par la page n’émet rien. Attribute `pressed`. */
8
+ pressed?: boolean;
9
+ /** Refuse l’activation et sort de l’ordre de tabulation ; le texte reste lisible (atténué), sans opacité globale. Attribute `disabled`. */
10
+ disabled?: boolean;
11
+ /** Désactivé mais focalisable (aria-disabled) : reste dans l’ordre de tabulation, annoncé désactivé, refuse l’activation (rien n’est émis) ; l’infobulle peut dire pourquoi. Attribute `disabled-focusable`. */
12
+ disabledFocusable?: boolean;
13
+ /** Nom accessible (aria-label) quand le texte visible est une abréviation ou une icône (FR, EN, un pictogramme) ; vide : le texte du slot nomme le bouton. Attribute `label`. */
14
+ label?: string;
15
+ /** Infobulle du bouton, montrée au survol et au focus clavier, masquée par Échap ; elle décrit le bouton (aria-describedby). Vide : aucune infobulle. Attribute `hint`. */
16
+ hint?: string;
17
+ /** Émis après chaque activation par l’utilisateur (clic, Entrée, Espace), avec le nouvel état. Rien n’est émis désactivé. Event `bythium-toggle`. */
18
+ 'onbythium-toggle'?: (event: BythiumToggleButtonEventMap['bythium-toggle']) => void;
19
+ }
20
+
21
+ export interface OToggleButtonProps extends OToggleButtonOwnProps, Omit<HTMLAttributes<BythiumToggleButton>, keyof OToggleButtonOwnProps | 'children'> {
22
+ /** Default slot; an element with `slot="<name>"` fills a named slot. */
23
+ children?: Snippet;
24
+ }
25
+
26
+ /** Bouton bascule natif à deux états (aria-pressed) : chaque activation inverse pressed et émet bythium-toggle ; nom et infobulle facultatifs. Renders `<bythium-toggle-button>`. */
27
+ declare const OToggleButton: Component<OToggleButtonProps>;
28
+ export default OToggleButton;
@@ -0,0 +1,10 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ export interface WrapperSpec {
3
+ readonly tag: string;
4
+ /** Prop name to [attribute name, attribute type]. */
5
+ readonly attributes: Readonly<Record<string, readonly [string, 'string' | 'boolean' | 'number']>>;
6
+ /** Listener prop to DOM event name. */
7
+ readonly events: Readonly<Record<string, string>>;
8
+ }
9
+ export declare function attributeValue(type: 'string' | 'boolean' | 'number', value: unknown): string | number | true | null | undefined;
10
+ export declare function elementAttributes(spec: WrapperSpec, props: Readonly<Record<string, unknown>>): Record<string, unknown>;
@@ -0,0 +1,25 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ /** One prop value as its attribute value: undefined leaves the attribute out. */
3
+ export function attributeValue(type, value) {
4
+ if (value === undefined || value === null) return undefined;
5
+ if (type === 'boolean') return value === false ? null : true;
6
+ if (type === 'number') return Number(value);
7
+ return String(value);
8
+ }
9
+
10
+ /** The props of a wrapper as the attributes and listeners of its tag. */
11
+ export function elementAttributes(spec, props) {
12
+ const out = {};
13
+ for (const key of Object.keys(props)) {
14
+ const value = props[key];
15
+ const attribute = Object.hasOwn(spec.attributes, key) ? spec.attributes[key] : undefined;
16
+ const event = Object.hasOwn(spec.events, key) ? spec.events[key] : undefined;
17
+ if (attribute) {
18
+ const written = attributeValue(attribute[1], value);
19
+ if (written !== undefined) out[attribute[0]] = written;
20
+ } else if (event) {
21
+ if (typeof value === 'function') out[`on${event}`] = value;
22
+ } else out[key] = value;
23
+ }
24
+ return out;
25
+ }
@@ -0,0 +1,8 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ export { default as OButton, type OButtonProps, type OButtonOwnProps } from './OButton.svelte';
3
+ export { default as OIconButton, type OIconButtonProps, type OIconButtonOwnProps } from './OIconButton.svelte';
4
+ export { default as OToggleButton, type OToggleButtonProps, type OToggleButtonOwnProps } from './OToggleButton.svelte';
5
+ export { default as OButtonGroup, type OButtonGroupProps, type OButtonGroupOwnProps } from './OButtonGroup.svelte';
6
+ export { default as OCopyButton, type OCopyButtonProps, type OCopyButtonOwnProps } from './OCopyButton.svelte';
7
+ export { default as OSplitButton, type OSplitButtonProps, type OSplitButtonOwnProps } from './OSplitButton.svelte';
8
+ export { default as OConfirmButton, type OConfirmButtonProps, type OConfirmButtonOwnProps } from './OConfirmButton.svelte';
@@ -0,0 +1,8 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ export { default as OButton } from './OButton.svelte';
3
+ export { default as OIconButton } from './OIconButton.svelte';
4
+ export { default as OToggleButton } from './OToggleButton.svelte';
5
+ export { default as OButtonGroup } from './OButtonGroup.svelte';
6
+ export { default as OCopyButton } from './OCopyButton.svelte';
7
+ export { default as OSplitButton } from './OSplitButton.svelte';
8
+ export { default as OConfirmButton } from './OConfirmButton.svelte';
@@ -0,0 +1,29 @@
1
+ // Generated from the contract of bythium-toggle-button. Do not edit.
2
+ export interface BythiumToggleButtonEventMap extends HTMLElementEventMap {
3
+ /** Émis après chaque activation par l’utilisateur (clic, Entrée, Espace), avec le nouvel état. Rien n’est émis désactivé. */
4
+ 'bythium-toggle': CustomEvent<{ pressed: boolean }>;
5
+ }
6
+
7
+ /** Bouton bascule natif à deux états (aria-pressed) : chaque activation inverse pressed et émet bythium-toggle ; nom et infobulle facultatifs. */
8
+ export declare class BythiumToggleButton extends HTMLElement {
9
+ /** État enfoncé, reflété par aria-pressed sur le bouton interne ; une écriture par la page n’émet rien. Attribute `pressed`. */
10
+ pressed: boolean;
11
+ /** Refuse l’activation et sort de l’ordre de tabulation ; le texte reste lisible (atténué), sans opacité globale. Attribute `disabled`. */
12
+ disabled: boolean;
13
+ /** Désactivé mais focalisable (aria-disabled) : reste dans l’ordre de tabulation, annoncé désactivé, refuse l’activation (rien n’est émis) ; l’infobulle peut dire pourquoi. Attribute `disabled-focusable`. */
14
+ disabledFocusable: boolean;
15
+ /** Nom accessible (aria-label) quand le texte visible est une abréviation ou une icône (FR, EN, un pictogramme) ; vide : le texte du slot nomme le bouton. Attribute `label`. */
16
+ label: string;
17
+ /** Infobulle du bouton, montrée au survol et au focus clavier, masquée par Échap ; elle décrit le bouton (aria-describedby). Vide : aucune infobulle. Attribute `hint`. */
18
+ hint: string;
19
+ addEventListener<K extends keyof BythiumToggleButtonEventMap>(type: K, listener: (this: BythiumToggleButton, event: BythiumToggleButtonEventMap[K]) => unknown, options?: boolean | AddEventListenerOptions): void;
20
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
21
+ removeEventListener<K extends keyof BythiumToggleButtonEventMap>(type: K, listener: (this: BythiumToggleButton, event: BythiumToggleButtonEventMap[K]) => unknown, options?: boolean | EventListenerOptions): void;
22
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
23
+ }
24
+
25
+ declare global {
26
+ interface HTMLElementTagNameMap {
27
+ 'bythium-toggle-button': BythiumToggleButton;
28
+ }
29
+ }
@@ -0,0 +1 @@
1
+ import{a}from"./chunks/chunk-JOXL2SMV.js";import"./chunks/chunk-FGJHPGJI.js";import"./chunks/chunk-W3ASGVKH.js";export{a as BythiumToggleButton};
@@ -0,0 +1,200 @@
1
+ /* GÉNÉRÉ par tools/tokens.ts depuis tools/tokens/palette.json. Ne pas modifier à la main.
2
+ Valeurs : palette Orchestre du 10 novembre 2026 (contraste fort), thèmes clair et sombre par light-dark().
3
+ Le thème suit le système ; data-theme="light" ou "dark" le force sur la racine ou sur un sous-arbre. */
4
+ :root {
5
+ color-scheme: light dark;
6
+ /* Couleurs à thème : light-dark(clair, sombre). */
7
+ --bythium-surface-page: light-dark(oklch(0.9819 0.0029 264.54), oklch(0.1723 0.0026 247.98));
8
+ --bythium-surface-base: light-dark(oklch(1 0 0), oklch(0.2048 0.0061 271.11));
9
+ --bythium-surface-card: light-dark(oklch(1 0 0), oklch(0.2271 0.0079 274.58));
10
+ --bythium-surface-raised: light-dark(oklch(0.9582 0.0041 271.37), oklch(0.253 0.0095 276.71));
11
+ --bythium-surface-overlay: light-dark(oklch(1 0 0), oklch(0.253 0.0095 276.71));
12
+ --bythium-surface-sidebar: light-dark(oklch(0.964 0.0029 264.54), oklch(0.1536 0.0027 248));
13
+ --bythium-surface-elevated: light-dark(oklch(1 0 0), oklch(0.253 0.0095 276.71));
14
+ --bythium-state-hover: light-dark(oklch(0 0 0 / 0.039), oklch(1 0 0 / 0.039));
15
+ --bythium-state-selected: light-dark(oklch(0 0 0 / 0.071), oklch(1 0 0 / 0.078));
16
+ --bythium-track: light-dark(oklch(0 0 0 / 0.11), oklch(1 0 0 / 0.09));
17
+ --bythium-text-primary: light-dark(oklch(0.2686 0.0097 268.31), oklch(0.947 0.004 286.32));
18
+ --bythium-text-secondary: light-dark(oklch(0.4559 0.0175 264.39), oklch(0.7789 0.0091 264.51));
19
+ --bythium-text-muted: light-dark(oklch(0.519 0.0208 261.3), oklch(0.6488 0.0146 262.36));
20
+ --bythium-border-subtle: light-dark(oklch(0.9157 0.0071 268.54), oklch(0.2733 0.0075 274.68));
21
+ --bythium-border-strong: light-dark(oklch(0.6354 0.0179 262.72), oklch(0.5103 0.0165 268.35));
22
+ --bythium-border-focus: light-dark(oklch(0.4884 0.0892 220.43), oklch(0.8216 0.1277 212.37));
23
+ --bythium-accent: light-dark(oklch(0.4884 0.0892 220.43), oklch(0.8216 0.1277 212.37));
24
+ --bythium-accent-secondary: light-dark(oklch(0.4884 0.0892 220.43), oklch(0.8216 0.1277 212.37));
25
+ --bythium-accent-brand: light-dark(oklch(0.8216 0.1277 212.37), oklch(0.8216 0.1277 212.37));
26
+ --bythium-on-accent: light-dark(oklch(1 0 0), oklch(0.1845 0.0101 285.36));
27
+ --bythium-link: light-dark(oklch(0.4818 0.1887 300.03), oklch(0.6929 0.2018 306.83));
28
+ --bythium-brand-primary: light-dark(oklch(0.4944 0.1932 299.27), oklch(0.4944 0.1932 299.27));
29
+ --bythium-brand-primary-hover: light-dark(oklch(0.428 0.1781 301.81), oklch(0.428 0.1781 301.81));
30
+ --bythium-on-brand-primary: light-dark(oklch(1 0 0), oklch(1 0 0));
31
+ --bythium-brand-vivid: light-dark(oklch(0.6929 0.2018 306.83), oklch(0.6929 0.2018 306.83));
32
+ --bythium-brand-primary-text: light-dark(oklch(0.4818 0.1887 300.03), oklch(0.6929 0.2018 306.83));
33
+ --bythium-status-success: light-dark(oklch(0.5036 0.0991 157.99), oklch(0.7527 0.0743 162.61));
34
+ --bythium-status-warning: light-dark(oklch(0.4989 0.093 82.27), oklch(0.8068 0.0946 86.15));
35
+ --bythium-status-danger: light-dark(oklch(0.5044 0.1499 18.44), oklch(0.7399 0.0911 14.28));
36
+ --bythium-status-info: light-dark(oklch(0.4762 0.089 251.61), oklch(0.7607 0.0638 250.13));
37
+ --bythium-chart-1: light-dark(oklch(0.6289 0.1421 304.99), oklch(0.6712 0.1396 306.02));
38
+ --bythium-chart-2: light-dark(oklch(0.6195 0.0839 214.21), oklch(0.7556 0.0971 212.58));
39
+ --bythium-chart-3: light-dark(oklch(0.6284 0.0799 84.86), oklch(0.7846 0.0971 84.35));
40
+ --bythium-chart-4: light-dark(oklch(0.6154 0.1019 164.68), oklch(0.7372 0.1163 164.58));
41
+ --bythium-chart-5: light-dark(oklch(0.6337 0.1193 17.7), oklch(0.6773 0.1174 18.63));
42
+ --bythium-chart-6: light-dark(oklch(0.5807 0.1342 260.06), oklch(0.6249 0.1295 259.68));
43
+ --pack-bg: light-dark(oklch(0.971 0.0108 297.63), oklch(0.1305 0.0143 275.32));
44
+ --pack-ink: light-dark(oklch(0.2132 0.0468 279.84), oklch(0.958 0.0202 279.94));
45
+ --pack-mut: light-dark(oklch(0.4291 0.0465 279.5), oklch(0.7557 0.039 277.13));
46
+ --pack-line: light-dark(oklch(0.332 0.1164 284.62 / 0.141), oklch(1 0 0 / 0.11));
47
+ --pack-line2: light-dark(oklch(0.332 0.1164 284.62 / 0.259), oklch(1 0 0 / 0.2));
48
+ --pack-panel: light-dark(oklch(1 0 0 / 0.78), oklch(0.1846 0.0328 277.25 / 0.78));
49
+ --pack-panel2: light-dark(oklch(1 0 0 / 0.6), oklch(1 0 0 / 0.043));
50
+ --pack-code: light-dark(oklch(0.9873 0.0067 295.45), oklch(0.159 0.0257 275.87));
51
+ --pack-codeink: light-dark(oklch(0.2979 0.0581 276.86), oklch(0.9018 0.033 278.19));
52
+ --pack-c1: light-dark(oklch(0.5288 0.0923 216.92), oklch(0.7971 0.1339 211.53));
53
+ --pack-c2: light-dark(oklch(0.5489 0.2341 285.4), oklch(0.709 0.1592 293.54));
54
+ --pack-c3: light-dark(oklch(0.5188 0.1146 159.19), oklch(0.7729 0.1535 163.22));
55
+ --pack-c4: light-dark(oklch(0.5561 0.2005 353.63), oklch(0.7253 0.1752 349.76));
56
+ --pack-focus: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.8651 0.1153 207.08));
57
+ --pack-link: light-dark(oklch(0.4754 0.2328 281.48), oklch(0.8764 0.1019 209.64));
58
+ --pack-btn1: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.7971 0.1339 211.53));
59
+ --pack-btn2: light-dark(oklch(0.5106 0.2301 276.97), oklch(0.709 0.1592 293.54));
60
+ --pack-btn3: light-dark(oklch(0.5198 0.0936 223.13), oklch(0.7729 0.1535 163.22));
61
+ --pack-btnink: light-dark(oklch(1 0 0), oklch(0.1334 0.0183 283.64));
62
+ --pack-a1: light-dark(oklch(0.8276 0.1013 230.32 / 0.549), oklch(0.7971 0.1339 211.53 / 0.298));
63
+ --pack-a2: light-dark(oklch(0.8112 0.1013 293.57 / 0.6), oklch(0.6056 0.2189 292.72 / 0.341));
64
+ --pack-a3: light-dark(oklch(0.9049 0.0895 164.15 / 0.502), oklch(0.7729 0.1535 163.22 / 0.22));
65
+ --pack-tok-t: light-dark(oklch(0.4882 0.0851 218.24), oklch(0.8764 0.1019 209.64));
66
+ --pack-tok-s: light-dark(oklch(0.5125 0.1148 158.3), oklch(0.8712 0.1363 154.45));
67
+ --pack-tok-c: light-dark(oklch(0.5362 0.052 277.79), oklch(0.6696 0.0478 276.7));
68
+ --pack-tok-k: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.8112 0.1013 293.57));
69
+ --pack-wm1: light-dark(oklch(0.5516 0.0972 218.48), oklch(0.8651 0.1153 207.08));
70
+ --pack-wm2: light-dark(oklch(0.5225 0.2549 280.33), oklch(0.8112 0.1013 293.57));
71
+ --pack-wm3: light-dark(oklch(0.559 0.1284 157.89), oklch(0.8452 0.1299 164.98));
72
+ /* Ombres : la couleur de chaque couche suit le thème. */
73
+ --shadow-sm: 0px 1px 2px 0px light-dark(oklch(0 0 0 / 0.059), oklch(0 0 0 / 0.22));
74
+ --shadow-overlay: 0px 0px 0px 1px light-dark(oklch(0 0 0 / 0.039), oklch(0 0 0 / 0.4)), 0px 8px 28px 0px light-dark(oklch(0 0 0 / 0.122), oklch(0 0 0 / 0.451)), 0px 2px 6px 0px light-dark(oklch(0 0 0 / 0.059), oklch(0 0 0 / 0.251));
75
+ --shadow-window: 0px 30px 70px -40px light-dark(oklch(0 0 0 / 0.6), oklch(0 0 0 / 0.6));
76
+ --shadow-glow: 0px 30px 80px -40px light-dark(oklch(0.6929 0.2018 306.83), oklch(0.6929 0.2018 306.83));
77
+ --pack-shadow: 0px 24px 60px -24px light-dark(oklch(0.436 0.1547 287.36 / 0.349), oklch(0 0 0 / 0.8));
78
+ /* Couleurs de marque, identiques dans les deux thèmes (logo, dégradé). */
79
+ --bythium-brand-cyan: oklch(0.8216 0.1277 212.37);
80
+ --bythium-brand-violet: oklch(0.6929 0.2018 306.83);
81
+ --bythium-brand-milieu: oklch(0.7104 0.1558 288.52);
82
+ --bythium-brand-sphere: oklch(0.7413 0.1239 259.16);
83
+ --bythium-brand-blanc-casse: oklch(0.9604 0.0107 286.2);
84
+ --bythium-brand-marine: oklch(0.2253 0.05 262.93);
85
+ --bythium-brand-blanc: oklch(1 0 0);
86
+ --bythium-brand-noir: oklch(0 0 0);
87
+ --bythium-brand-gradient: linear-gradient(135deg in oklch, oklch(0.8216 0.1277 212.37) 0%, oklch(0.7104 0.1558 288.52) 50%, oklch(0.6929 0.2018 306.83) 100%);
88
+ /* Typographie (base Orchestre : 13 px, légende 12 px, titre 22 px ; en rem pour le zoom du texte, WC-R08). */
89
+ --font-sans: Inter, ui-sans-serif, system-ui, sans-serif;
90
+ --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
91
+ --font-features: "cv01", "ss03";
92
+ --font-size-base: 0.8125rem;
93
+ --font-size-caption: 0.75rem;
94
+ --font-size-title: 1.375rem;
95
+ --font-weight-medium: 500;
96
+ --font-weight-semibold: 600;
97
+ --line-height-base: 1.4;
98
+ /* Espacement : échelle de 4 px (--space-2 = 8 px). */
99
+ --space-0: 0;
100
+ --space-0-5: 0.125rem;
101
+ --space-1: 0.25rem;
102
+ --space-1-5: 0.375rem;
103
+ --space-2: 0.5rem;
104
+ --space-2-5: 0.625rem;
105
+ --space-3: 0.75rem;
106
+ --space-4: 1rem;
107
+ --space-5: 1.25rem;
108
+ --space-6: 1.5rem;
109
+ --space-8: 2rem;
110
+ --space-10: 2.5rem;
111
+ --space-12: 3rem;
112
+ /* Site du pack : un seul conteneur pour toutes les pages, largeur maximale et gouttière (min(--pack-max, 100 % - 2 gouttières)), et la mesure des paragraphes d’introduction (56ch, environ 70 caractères par ligne en Inter). */
113
+ --pack-max: 1200px;
114
+ --pack-gutter: 16px;
115
+ --pack-measure: 56ch;
116
+ /* Rayons. */
117
+ --radius-sm: 4px;
118
+ --radius-control: 6px;
119
+ --radius-card: 8px;
120
+ --radius-lg: 12px;
121
+ --radius-full: 999px;
122
+ /* Contrôles : hauteur visuelle Orchestre 30 px ; la cible tactile reste 44 px (WC-D03). */
123
+ --control-height: 30px;
124
+ --target-touch-min: 44px;
125
+ --target-min: 24px;
126
+ --focus-ring-width: 2px;
127
+ --focus-ring-offset: 2px;
128
+ /* Mouvement (WC-N11 : 300 ms au plus). */
129
+ --duration-fast: 120ms;
130
+ --duration-base: 200ms;
131
+ --duration-slow: 300ms;
132
+ --ease-standard: cubic-bezier(0.25, 0.46, 0.45, 0.94);
133
+ --ease-kinetic: cubic-bezier(0.2, 0, 0, 1);
134
+ /* Deceleration: a fast start that settles (the glide of the pack hero cards, a progress bar, a screen that settles in). */
135
+ --ease-decelerate: cubic-bezier(0.22, 1, 0.36, 1);
136
+ /* Empilement (WC-N05 : échelle de 1 à 50). */
137
+ --z-base: 1;
138
+ --z-raised: 10;
139
+ --z-sticky: 20;
140
+ --z-dropdown: 30;
141
+ --z-overlay: 40;
142
+ --z-toast: 45;
143
+ --z-skip: 50;
144
+ /* Thème résolu, en mot, pour une requête de style : @container style(--bythium-scheme: light). */
145
+ --bythium-scheme: light;
146
+ }
147
+ @media (prefers-color-scheme: dark) {
148
+ :root {
149
+ --bythium-scheme: dark;
150
+ }
151
+ }
152
+ :root[data-theme="dark"],
153
+ [data-theme="dark"] {
154
+ color-scheme: dark;
155
+ --bythium-scheme: dark;
156
+ }
157
+ :root[data-theme="light"],
158
+ [data-theme="light"] {
159
+ color-scheme: light;
160
+ --bythium-scheme: light;
161
+ }
162
+ /* La seule règle universelle du paquet (section 5.4). */
163
+ *,
164
+ *::before,
165
+ *::after {
166
+ box-sizing: border-box;
167
+ }
168
+ body {
169
+ margin: 0;
170
+ padding: var(--space-4);
171
+ background: var(--bythium-surface-page);
172
+ color: var(--bythium-text-primary);
173
+ font-family: var(--font-sans);
174
+ font-size: var(--font-size-base);
175
+ line-height: var(--line-height-base);
176
+ }
177
+ bythium-surface {
178
+ display: block;
179
+ min-inline-size: 0;
180
+ }
181
+ /* Page transitions (cross-document View Transitions), on screen and only when the reader accepts motion. The
182
+ names are set from the document: a name set inside a shadow root does not take part. The pack header and the
183
+ page title keep their place from one page to the next; a name is unique in a page. */
184
+ @media screen and (prefers-reduced-motion: no-preference) {
185
+ @view-transition {
186
+ navigation: auto;
187
+ }
188
+ bythium-pack-header::part(root) {
189
+ view-transition-name: site-header;
190
+ }
191
+ bythium-pack-hero::part(title),
192
+ bythium-pack-doc-head::part(heading),
193
+ bythium-pack-intro::part(heading) {
194
+ view-transition-name: page-title;
195
+ }
196
+ ::view-transition-group(*) {
197
+ animation-duration: var(--duration-slow);
198
+ animation-timing-function: var(--ease-standard);
199
+ }
200
+ }
@@ -0,0 +1,10 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ export interface WrapperSpec {
3
+ readonly tag: string;
4
+ /** Prop name to [attribute name, attribute type]. */
5
+ readonly attributes: Readonly<Record<string, readonly [string, 'string' | 'boolean' | 'number']>>;
6
+ /** Listener prop to DOM event name. */
7
+ readonly events: Readonly<Record<string, string>>;
8
+ }
9
+ export declare function attributeValue(type: 'string' | 'boolean' | 'number', value: unknown): string | number | true | null | undefined;
10
+ export declare function elementAttributes(spec: WrapperSpec, props: Readonly<Record<string, unknown>>): Record<string, unknown>;
@@ -0,0 +1,25 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ /** One prop value as its attribute value: undefined leaves the attribute out. */
3
+ export function attributeValue(type, value) {
4
+ if (value === undefined || value === null) return undefined;
5
+ if (type === 'boolean') return value === false ? null : true;
6
+ if (type === 'number') return Number(value);
7
+ return String(value);
8
+ }
9
+
10
+ /** The props of a wrapper as the attributes and listeners of its tag. */
11
+ export function elementAttributes(spec, props) {
12
+ const out = {};
13
+ for (const key of Object.keys(props)) {
14
+ const value = props[key];
15
+ const attribute = Object.hasOwn(spec.attributes, key) ? spec.attributes[key] : undefined;
16
+ const event = Object.hasOwn(spec.events, key) ? spec.events[key] : undefined;
17
+ if (attribute) {
18
+ const written = attributeValue(attribute[1], value);
19
+ if (written !== undefined) out[attribute[0]] = written;
20
+ } else if (event) {
21
+ if (typeof value === 'function') out[`on${event}`] = value;
22
+ } else out[key] = value;
23
+ }
24
+ return out;
25
+ }
@@ -0,0 +1,27 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import type { DefineSetupFnComponent, SlotsType, VNode } from 'vue';
3
+ import type { BythiumButtonGroup, BythiumButtonGroupEventMap } from '../button-group.js';
4
+
5
+ export interface OButtonGroupProps {
6
+ /** Nom accessible du groupe (aria-label). À renseigner. Attribute `label`. */
7
+ label?: string;
8
+ /** Liste JSON [{"value","label","disabled"?}]. Absente, vide ou invalide : le slot par défaut est rendu. value vaut label s’il manque ; une entrée sans libellé est ignorée. Attribute `items`. */
9
+ items?: string;
10
+ /** Sens d’accolement : côte à côte (horizontal) ou empilé (vertical). Attribute `orientation`. */
11
+ orientation?: 'horizontal' | 'vertical';
12
+ /** Hauteur visuelle : 24, 30 ou 36 px (44 px au pointeur grossier). Attribute `size`. */
13
+ size?: 'sm' | 'md' | 'lg';
14
+ /** Désactive tout le groupe ; des boutons slottés deviennent inertes. Attribute `disabled`. */
15
+ disabled?: boolean;
16
+ }
17
+
18
+ export type OButtonGroupEmits = {
19
+ /** Émis au clic ou au clavier sur un bouton actif : value (ou le libellé), libellé et rang. Rien n'est émis pour un bouton ou un groupe désactivé. */
20
+ 'bythium-action': (event: BythiumButtonGroupEventMap['bythium-action']) => void;
21
+ };
22
+
23
+ /** Boutons accolés sous un seul contour : groupe nommé d'actions voisines, décrites en JSON ou slottées, sans état sélectionné. Renders `<bythium-button-group>`. */
24
+ export declare const OButtonGroup: DefineSetupFnComponent<OButtonGroupProps, OButtonGroupEmits, SlotsType<{ "default"?: () => VNode[] }>>;
25
+
26
+ /** The element the wrapper renders. */
27
+ export type OButtonGroupElement = BythiumButtonGroup;
@@ -0,0 +1,6 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import { wrapper } from './runtime.js';
3
+
4
+ if (typeof customElements !== 'undefined') import('../button-group.js');
5
+
6
+ export const OButtonGroup = wrapper('OButtonGroup', {"tag":"bythium-button-group","attributes":{"label":["label","string"],"items":["items","string"],"orientation":["orientation","string"],"size":["size","string"],"disabled":["disabled","boolean"]},"events":{}}, ["bythium-action"], []);
@@ -0,0 +1,35 @@
1
+ // Generated from the contracts of the available tags (packages/unisson/available.json). Do not edit.
2
+ import type { DefineSetupFnComponent, SlotsType, VNode } from 'vue';
3
+ import type { BythiumButton, BythiumButtonEventMap } from '../button.js';
4
+
5
+ export interface OButtonProps {
6
+ /** Nom accessible de la variante icône, qui n’a pas de texte visible. Attribute `label`. */
7
+ label?: string;
8
+ /** Apparence : primary (défaut), secondary, ghost, danger, ou icon (carré, nommé par label). Attribute `variant`. */
9
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'icon';
10
+ /** Hauteur visuelle : 24, 30 ou 36 px. La cible tactile garde 44 px. Attribute `size`. */
11
+ size?: 'sm' | 'md' | 'lg';
12
+ /** Action en cours : le bouton est occupé (aria-busy) et refuse l’activation. Attribute `loading`. */
13
+ loading?: boolean;
14
+ /** Refuse l’activation et sort de l’ordre de tabulation. Attribute `disabled`. */
15
+ disabled?: boolean;
16
+ /** Désactivé mais focalisable (aria-disabled) : reste dans l’ordre de tabulation, annoncé désactivé, refuse l’activation (ni bythium-action ni envoi). Pour un bouton qui doit garder le focus après une décision. Attribute `disabled-focusable`. */
17
+ disabledFocusable?: boolean;
18
+ /** Rôle dans un formulaire : button (défaut, aucun effet), submit (envoie le formulaire qui contient la balise) ou reset (le réinitialise). Attribute `type`. */
19
+ type?: 'button' | 'submit' | 'reset';
20
+ /** Langue du libellé de repli (BCP 47), écrit seulement quand la fente par défaut est vide : « Exécuter » en français, « Run » en anglais. Toute balise en vaut en, le reste vaut fr. Un libellé écrit par la page l’emporte. Attribute `locale`. */
21
+ locale?: string;
22
+ /** Infobulle du bouton, montrée au survol et au focus clavier, masquée par Échap ; elle décrit le bouton (aria-describedby). Vide : aucune infobulle. Sans effet sur un bouton natif du slot control. Attribute `hint`. */
23
+ hint?: string;
24
+ }
25
+
26
+ export type OButtonEmits = {
27
+ /** Émis au clic ou au clavier sur un bouton actif. Rien n’est émis désactivé ou en chargement. */
28
+ 'bythium-action': (event: BythiumButtonEventMap['bythium-action']) => void;
29
+ };
30
+
31
+ /** Bouton natif avec variantes, tailles, chargement, désactivation (focalisable ou non) et rôle de formulaire (submit, reset). Renders `<bythium-button>`. */
32
+ export declare const OButton: DefineSetupFnComponent<OButtonProps, OButtonEmits, SlotsType<{ "default"?: () => VNode[]; "control"?: () => VNode[] }>>;
33
+
34
+ /** The element the wrapper renders. */
35
+ export type OButtonElement = BythiumButton;