Migrate site controls to Nebula design system
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s
This commit is contained in:
parent
e3d0925eb1
commit
817e21567b
127 changed files with 5380 additions and 2363 deletions
|
|
@ -356,7 +356,8 @@ function LibraryToolExample({ module, sourceData, description, categoryTitle, do
|
|||
<div className="library-example-actions">
|
||||
{definition.scrollable && (
|
||||
<button
|
||||
className={`module-scroll-button ${scrollable ? "active" : ""}`}
|
||||
className={`module-scroll-button nds-switch ${scrollable ? "active" : ""}`}
|
||||
data-size="md"
|
||||
type="button"
|
||||
onClick={() => setScrollable((value) => !value)}
|
||||
aria-label={`${scrollable ? "Désactiver" : "Activer"} le scroll de ${title}`}
|
||||
|
|
@ -369,7 +370,8 @@ function LibraryToolExample({ module, sourceData, description, categoryTitle, do
|
|||
)}
|
||||
{definition.editable && definition.addable !== false && (
|
||||
<button
|
||||
className={`module-edit-button ${editing ? "active" : ""}`}
|
||||
className={`module-edit-button nds-icon-button ${editing ? "active" : ""}`}
|
||||
data-size="sm"
|
||||
type="button"
|
||||
onClick={() => setEditing((value) => !value)}
|
||||
aria-label={`${editing ? "Masquer" : "Afficher"} l'ajout de ${title}`}
|
||||
|
|
@ -379,7 +381,7 @@ function LibraryToolExample({ module, sourceData, description, categoryTitle, do
|
|||
<Icon name="add" />
|
||||
</button>
|
||||
)}
|
||||
<button className="library-reset-button" type="button" onClick={() => context.setModuleData(LIBRARY_TOOLBOX_ID, module.id, cloneData(sourceData))} aria-label={`Réinitialiser ${title}`} title="Réinitialiser l'exemple">
|
||||
<button className="library-reset-button nds-icon-button" data-size="sm" type="button" onClick={() => context.setModuleData(LIBRARY_TOOLBOX_ID, module.id, cloneData(sourceData))} aria-label={`Réinitialiser ${title}`} title="Réinitialiser l'exemple">
|
||||
<Icon name="refresh" />
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -506,7 +508,12 @@ function ControlPreview({ item }) {
|
|||
return (
|
||||
<span className="library-control-preview" aria-hidden="true">
|
||||
{buttons.map((button, index) => (
|
||||
<span className={`notepad-toolbar-button ${button.label && String(button.label).length > 2 ? "is-wide" : ""} ${button.active ? "active" : ""} ${button.danger ? "danger" : ""}`} key={`${button.label || button.icon || index}-${index}`}>
|
||||
<span
|
||||
className={`notepad-toolbar-button nds-icon-button ${button.label && String(button.label).length > 2 ? "is-wide" : ""} ${button.active ? "active" : ""}`.trim()}
|
||||
data-size="sm"
|
||||
data-variant={button.danger ? "danger" : undefined}
|
||||
key={`${button.label || button.icon || index}-${index}`}
|
||||
>
|
||||
{button.icon ? <Icon name={button.icon} /> : button.label}
|
||||
</span>
|
||||
))}
|
||||
|
|
@ -516,7 +523,7 @@ function ControlPreview({ item }) {
|
|||
|
||||
return (
|
||||
<span className="library-control-preview" aria-hidden="true">
|
||||
<span className={`notepad-toolbar-button ${preview.active ? "active" : ""} ${preview.danger ? "danger" : ""}`}>
|
||||
<span className={`notepad-toolbar-button nds-icon-button ${preview.active ? "active" : ""}`.trim()} data-size="sm" data-variant={preview.danger ? "danger" : undefined}>
|
||||
<Icon name={preview.icon || item.icon || "settings"} />
|
||||
</span>
|
||||
</span>
|
||||
|
|
@ -582,7 +589,7 @@ function ToolAdvancedFeatureList({ docs, heading, copyLabel, copySuccess, contex
|
|||
<p>{docs.importFormat.text}</p>
|
||||
<div className="library-tool-import-example">
|
||||
<pre><code>{docs.importFormat.example}</code></pre>
|
||||
<button type="button" onClick={copyExample} title={copyLabel || "Copier l'exemple"}>
|
||||
<button className="nds-button" data-size="sm" type="button" onClick={copyExample} title={copyLabel || "Copier l'exemple"}>
|
||||
<Icon name="copy" />
|
||||
<span>{copied ? copySuccess || "Exemple copié." : copyLabel || "Copier l'exemple"}</span>
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue