Add library tools to local toolboxes
This commit is contained in:
parent
daa5eba8bd
commit
ec7a4a4c1d
15 changed files with 650 additions and 9 deletions
108
website/src/components/LibraryCopyModal.jsx
Normal file
108
website/src/components/LibraryCopyModal.jsx
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
// Rôle : choisit la destination et le contenu lors de la copie d'un exemple de la librairie.
|
||||
import { useId, useState } from "react";
|
||||
import { Modal } from "./Modal.jsx";
|
||||
|
||||
export function LibraryCopyModal({ content, toolTitle, toolboxes, hasDependency, onClose, onConfirm }) {
|
||||
const titleId = useId();
|
||||
const descriptionId = useId();
|
||||
const [toolboxId, setToolboxId] = useState(toolboxes[0]?.id || "");
|
||||
const initialToolbox = toolboxes.find((toolbox) => toolbox.id === toolboxId);
|
||||
const [spaceId, setSpaceId] = useState(initialToolbox?.activeSpaceId || initialToolbox?.defaultSpaceId || "");
|
||||
const [newToolboxName, setNewToolboxName] = useState("");
|
||||
const [copyData, setCopyData] = useState(true);
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [error, setError] = useState("");
|
||||
const selectedToolbox = toolboxes.find((toolbox) => toolbox.id === toolboxId);
|
||||
const createsToolbox = toolboxes.length === 0;
|
||||
|
||||
async function submit(event) {
|
||||
event.preventDefault();
|
||||
setBusy(true);
|
||||
setError("");
|
||||
const success = await onConfirm({ toolboxId, spaceId, newToolboxName: newToolboxName.trim(), copyData });
|
||||
if (!success) {
|
||||
setError(content.failure);
|
||||
setBusy(false);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal
|
||||
rootClassName="confirm-modal-root library-copy-modal-root"
|
||||
dialogClassName="confirm-modal nds-modal library-copy-modal"
|
||||
labelledBy={titleId}
|
||||
describedBy={descriptionId}
|
||||
onRequestClose={onClose}
|
||||
canClose={!busy}
|
||||
>
|
||||
<header>
|
||||
<p className="eyebrow">{content.eyebrow}</p>
|
||||
<h2 id={titleId}>{content.title.replace("{tool}", toolTitle)}</h2>
|
||||
</header>
|
||||
<p id={descriptionId} className="library-copy-description">{content.description}</p>
|
||||
<form onSubmit={submit}>
|
||||
{createsToolbox ? (
|
||||
<label className="field library-copy-field">
|
||||
<span>{content.newToolboxLabel}</span>
|
||||
<input
|
||||
className="nds-input"
|
||||
data-size="sm"
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
placeholder={content.newToolboxPlaceholder}
|
||||
required
|
||||
value={newToolboxName}
|
||||
onChange={(event) => setNewToolboxName(event.target.value)}
|
||||
data-modal-initial-focus=""
|
||||
/>
|
||||
<small>{content.newToolboxHelp}</small>
|
||||
</label>
|
||||
) : (
|
||||
<div className="library-copy-destination">
|
||||
<label className="field library-copy-field">
|
||||
<span>{content.toolboxLabel}</span>
|
||||
<select
|
||||
className="nds-select"
|
||||
data-size="sm"
|
||||
value={toolboxId}
|
||||
onChange={(event) => {
|
||||
const nextToolbox = toolboxes.find((toolbox) => toolbox.id === event.target.value);
|
||||
setToolboxId(event.target.value);
|
||||
setSpaceId(nextToolbox?.activeSpaceId || nextToolbox?.defaultSpaceId || "");
|
||||
}}
|
||||
data-modal-initial-focus=""
|
||||
>
|
||||
{toolboxes.map((toolbox) => <option key={toolbox.id} value={toolbox.id}>{toolbox.name}</option>)}
|
||||
</select>
|
||||
</label>
|
||||
<label className="field library-copy-field">
|
||||
<span>{content.spaceLabel}</span>
|
||||
<select className="nds-select" data-size="sm" value={spaceId} onChange={(event) => setSpaceId(event.target.value)}>
|
||||
{(selectedToolbox?.spaces || []).map((space) => <option key={space.id} value={space.id}>{space.name}</option>)}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
)}
|
||||
<fieldset className="library-copy-mode">
|
||||
<legend>{content.modeLabel}</legend>
|
||||
<label className={copyData ? "is-selected" : ""}>
|
||||
<input type="radio" name="copy-mode" value="current" checked={copyData} onChange={() => setCopyData(true)} />
|
||||
<span><strong>{content.currentLabel}</strong><small>{content.currentHelp}</small></span>
|
||||
</label>
|
||||
<label className={!copyData ? "is-selected" : ""}>
|
||||
<input type="radio" name="copy-mode" value="empty" checked={!copyData} onChange={() => setCopyData(false)} />
|
||||
<span><strong>{content.emptyLabel}</strong><small>{content.emptyHelp}</small></span>
|
||||
</label>
|
||||
</fieldset>
|
||||
{copyData && hasDependency && <p className="nds-inline-notice" data-variant="info">{content.dependencyNotice}</p>}
|
||||
{error && <p className="nds-inline-notice" data-variant="danger" role="alert">{error}</p>}
|
||||
<footer className="nds-modal-footer">
|
||||
<button className="nds-button" data-size="sm" type="button" disabled={busy} onClick={onClose}>{content.cancelLabel}</button>
|
||||
<button className="nds-button" data-size="sm" data-variant="primary" type="submit" disabled={busy || (createsToolbox ? !newToolboxName.trim() : !toolboxId || !spaceId)}>
|
||||
{busy ? content.savingLabel : createsToolbox ? content.createAndAddLabel : content.addLabel}
|
||||
</button>
|
||||
</footer>
|
||||
</form>
|
||||
</Modal>
|
||||
);
|
||||
}
|
||||
|
|
@ -476,6 +476,10 @@ function remapModuleDataForExport(type, data, nextId, moduleIdMap) {
|
|||
return compact;
|
||||
}
|
||||
|
||||
export function copyModuleDataWithFreshIds(type, data, moduleIdMap = new Map()) {
|
||||
return remapModuleDataForExport(type, data, uid, moduleIdMap);
|
||||
}
|
||||
|
||||
export function createToolboxExportPayload(toolbox, moduleData) {
|
||||
const source = normalizeToolbox(toolbox);
|
||||
const nextId = createExportIdFactory();
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export const TOOLBOX_MODULE_DEFINITIONS = {
|
|||
icon: "memos",
|
||||
editable: true,
|
||||
scrollable: true,
|
||||
copyDependency: { type: "taskPlanner", dataField: "plannerLink" },
|
||||
libraryCategory: "notesTracking"
|
||||
},
|
||||
checklist: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
// Rôle : regroupe les actions métier de création, import/export, lien et édition toolbox.
|
||||
import {
|
||||
compactModuleDataForStorage,
|
||||
copyModuleDataWithFreshIds,
|
||||
createGlobalExportPayload,
|
||||
createToolboxExportPayload,
|
||||
globalModuleKey,
|
||||
|
|
@ -55,8 +56,7 @@ export function useToolboxActions({ store, notify, creationTemplate, importConte
|
|||
});
|
||||
}
|
||||
|
||||
function createToolbox(name, gameId = "", options = {}) {
|
||||
if (!store.ready) return null;
|
||||
function buildToolboxCreation(name, options = {}) {
|
||||
const now = new Date().toISOString();
|
||||
const memosModuleId = uid("mod");
|
||||
const linksModuleId = uid("mod");
|
||||
|
|
@ -78,16 +78,101 @@ export function useToolboxActions({ store, notify, creationTemplate, importConte
|
|||
if (options.tutorial === true) toolbox.tutorial = true;
|
||||
const memos = compactModuleDataForStorage("memos", { items: [{ id: uid("memo"), text: welcomeText, color: "#f6c453", updatedAt: now }] });
|
||||
const links = compactModuleDataForStorage("links", { links: [libraryLink] });
|
||||
void store.persistToolboxSnapshot((current) => ({
|
||||
toolboxes: [toolbox, ...current.toolboxes],
|
||||
links: gameId ? { ...current.links, [gameId]: toolbox.id } : current.links,
|
||||
return {
|
||||
toolbox,
|
||||
moduleData: {
|
||||
...current.moduleData,
|
||||
[globalModuleKey(toolbox.id, memosModuleId)]: memos,
|
||||
[globalModuleKey(toolbox.id, linksModuleId)]: links
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function createToolbox(name, gameId = "", options = {}) {
|
||||
if (!store.ready) return null;
|
||||
const creation = buildToolboxCreation(name, options);
|
||||
void store.persistToolboxSnapshot((current) => ({
|
||||
toolboxes: [creation.toolbox, ...current.toolboxes],
|
||||
links: gameId ? { ...current.links, [gameId]: creation.toolbox.id } : current.links,
|
||||
moduleData: { ...current.moduleData, ...creation.moduleData }
|
||||
}));
|
||||
return toolbox;
|
||||
return creation.toolbox;
|
||||
}
|
||||
|
||||
async function addLibraryToolToToolbox({
|
||||
sourceModule,
|
||||
sourceData,
|
||||
dependencyModules = [],
|
||||
copyData = true,
|
||||
toolboxId = "",
|
||||
spaceId = "",
|
||||
newToolboxName = ""
|
||||
}) {
|
||||
if (!store.ready || !sourceModule?.type) return null;
|
||||
|
||||
const sources = [sourceModule, ...dependencyModules]
|
||||
.filter((module, index, modules) => module?.id && module?.type && modules.findIndex((item) => item.id === module.id) === index);
|
||||
const moduleIdMap = new Map(sources.map((module) => [module.id, uid("mod")]));
|
||||
if (copyData && sourceModule.type === "memos") {
|
||||
const plannerLink = String(sourceData?.plannerLink || "");
|
||||
if (plannerLink && plannerLink !== "all" && !moduleIdMap.has(plannerLink)) return null;
|
||||
}
|
||||
|
||||
const modulesToAdd = sources.map((module) => {
|
||||
const copiedModule = { id: moduleIdMap.get(module.id), type: module.type };
|
||||
if (module.title) copiedModule.title = module.title;
|
||||
return copiedModule;
|
||||
});
|
||||
const copiedData = copyData
|
||||
? Object.fromEntries(sources.map((module) => [
|
||||
moduleIdMap.get(module.id),
|
||||
copyModuleDataWithFreshIds(module.type, module.data, moduleIdMap)
|
||||
]).filter(([, data]) => data != null))
|
||||
: {};
|
||||
const requestedToolboxId = String(toolboxId || "");
|
||||
const requestedSpaceId = String(spaceId || "");
|
||||
const createNew = !requestedToolboxId && Boolean(String(newToolboxName || "").trim());
|
||||
const creation = createNew ? buildToolboxCreation(newToolboxName) : null;
|
||||
let result = null;
|
||||
|
||||
try {
|
||||
const saved = await store.persistToolboxSnapshot((current) => {
|
||||
const destination = creation?.toolbox || current.toolboxes.find((toolbox) => toolbox.id === requestedToolboxId);
|
||||
if (!destination) return current;
|
||||
const destinationSpaceId = creation
|
||||
? destination.defaultSpaceId
|
||||
: destination.spaces.some((space) => space.id === requestedSpaceId) ? requestedSpaceId : "";
|
||||
if (!destinationSpaceId) return current;
|
||||
|
||||
const updatedAt = new Date().toISOString();
|
||||
const updatedToolbox = {
|
||||
...modulesToAdd.reduce(
|
||||
(toolbox, module) => addModuleToToolboxSpace(toolbox, module, destinationSpaceId),
|
||||
destination
|
||||
),
|
||||
activeSpaceId: destinationSpaceId
|
||||
};
|
||||
const nextModuleData = { ...(creation?.moduleData || {}) };
|
||||
Object.entries(copiedData).forEach(([moduleId, data]) => {
|
||||
nextModuleData[globalModuleKey(destination.id, moduleId)] = data;
|
||||
});
|
||||
result = {
|
||||
toolboxId: destination.id,
|
||||
toolboxName: destination.name,
|
||||
spaceId: destinationSpaceId,
|
||||
moduleIds: modulesToAdd.map((module) => module.id)
|
||||
};
|
||||
return {
|
||||
...current,
|
||||
toolboxes: creation
|
||||
? [{ ...updatedToolbox, updatedAt }, ...current.toolboxes]
|
||||
: current.toolboxes.map((toolbox) => toolbox.id === destination.id ? { ...updatedToolbox, updatedAt } : toolbox),
|
||||
moduleData: { ...current.moduleData, ...nextModuleData }
|
||||
};
|
||||
});
|
||||
return saved ? result : null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function updateToolbox(nextToolbox) {
|
||||
|
|
@ -301,6 +386,7 @@ export function useToolboxActions({ store, notify, creationTemplate, importConte
|
|||
|
||||
return {
|
||||
createToolbox,
|
||||
addLibraryToolToToolbox,
|
||||
updateToolbox,
|
||||
deleteToolbox,
|
||||
linkToolboxToGame,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
// Rôle : affiche la librairie des outils avec des exemples locaux non persistés.
|
||||
import { Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { Icon } from "../components/Icon.jsx";
|
||||
import { LibraryCopyModal } from "../components/LibraryCopyModal.jsx";
|
||||
import { LIBRARY_CATEGORY_DEFINITIONS, getToolboxModuleDefinition } from "../features/toolboxes/toolboxModuleRegistry.js";
|
||||
import { MODULE_COMPONENTS } from "../features/toolboxes/modules/toolboxModuleComponents.jsx";
|
||||
import { navigate } from "../router/hashRouter.js";
|
||||
import {
|
||||
clampQty,
|
||||
hostnameFromUrl,
|
||||
|
|
@ -116,11 +118,12 @@ function getLibraryCategories(modules, content) {
|
|||
})).filter((category) => category.modules.length);
|
||||
}
|
||||
|
||||
export function LibraryPage({ siteContent, actions }) {
|
||||
export function LibraryPage({ siteContent, actions, toolboxes = [], storageReady = true }) {
|
||||
const content = siteContent.library;
|
||||
const [libraryPayload, setLibraryPayload] = useState(null);
|
||||
const [libraryError, setLibraryError] = useState("");
|
||||
const [moduleData, setModuleData] = useState({});
|
||||
const [copyRequest, setCopyRequest] = useState(null);
|
||||
const [navigation, setNavigation] = useState(() => ({ anchorId: getCurrentLibraryAnchor(), behavior: "auto" }));
|
||||
const libraryCategories = useMemo(() => getLibraryCategories(libraryPayload?.toolbox?.modules || [], content), [content, libraryPayload]);
|
||||
const activeCategory = findCategoryForAnchor(libraryCategories, navigation.anchorId) || libraryCategories[0] || null;
|
||||
|
|
@ -216,6 +219,29 @@ export function LibraryPage({ siteContent, actions }) {
|
|||
}
|
||||
}), [actions, libraryPayload, moduleData, selectAnchor, siteContent.toolboxes.modules]);
|
||||
|
||||
const openCopyModal = useCallback((module) => {
|
||||
const sourceData = cloneData(moduleData[`${LIBRARY_TOOLBOX_ID}:${module.id}`] || libraryPayload?.modules?.[module.id] || {});
|
||||
const dependencyDefinition = getToolboxModuleDefinition(module.type).copyDependency;
|
||||
const dependencyId = dependencyDefinition && sourceData[dependencyDefinition.dataField] && sourceData[dependencyDefinition.dataField] !== "all"
|
||||
? sourceData[dependencyDefinition.dataField]
|
||||
: "";
|
||||
const dependency = dependencyId
|
||||
? libraryPayload?.toolbox?.modules?.find((item) => item.id === dependencyId && item.type === dependencyDefinition.type)
|
||||
: null;
|
||||
setCopyRequest({
|
||||
toolTitle: module.title || getToolboxModuleDefinition(module.type).label || "Outil",
|
||||
sourceModule: { id: module.id, type: module.type, title: module.title || "", data: sourceData },
|
||||
sourceData,
|
||||
dependencyModules: dependency ? [{
|
||||
id: dependency.id,
|
||||
type: dependency.type,
|
||||
title: dependency.title || "",
|
||||
data: cloneData(moduleData[`${LIBRARY_TOOLBOX_ID}:${dependency.id}`] || libraryPayload?.modules?.[dependency.id] || {})
|
||||
}] : [],
|
||||
missingDependency: Boolean(dependencyId && !dependency)
|
||||
});
|
||||
}, [libraryPayload, moduleData]);
|
||||
|
||||
return (
|
||||
<div className="library-page">
|
||||
<section className="page-hero nds-page-hero library-hero">
|
||||
|
|
@ -279,6 +305,9 @@ export function LibraryPage({ siteContent, actions }) {
|
|||
advancedCopySuccess={content.copyExampleSuccess}
|
||||
controlLegendHeading={content.controlLegendHeading}
|
||||
context={moduleContext}
|
||||
copyContent={content.copyToToolbox}
|
||||
storageReady={storageReady}
|
||||
onCopy={() => openCopyModal(module)}
|
||||
/>
|
||||
))}
|
||||
</section>
|
||||
|
|
@ -287,6 +316,29 @@ export function LibraryPage({ siteContent, actions }) {
|
|||
</div>
|
||||
</>
|
||||
)}
|
||||
{copyRequest && <LibraryCopyModal
|
||||
content={content.copyToToolbox}
|
||||
toolTitle={copyRequest.toolTitle}
|
||||
toolboxes={toolboxes}
|
||||
hasDependency={copyRequest.dependencyModules.length > 0}
|
||||
onClose={() => setCopyRequest(null)}
|
||||
onConfirm={async (selection) => {
|
||||
if (copyRequest.missingDependency) return false;
|
||||
const result = await actions.addLibraryToolToToolbox({
|
||||
sourceModule: copyRequest.sourceModule,
|
||||
sourceData: copyRequest.sourceData,
|
||||
dependencyModules: selection.copyData ? copyRequest.dependencyModules : [],
|
||||
...selection
|
||||
});
|
||||
if (!result) return false;
|
||||
setCopyRequest(null);
|
||||
actions.notify(content.copyToToolbox.success.replace("{toolbox}", result.toolboxName), {
|
||||
actionLabel: content.copyToToolbox.openLabel,
|
||||
onAction: () => navigate(`/toolbox/${result.toolboxId}`)
|
||||
});
|
||||
return true;
|
||||
}}
|
||||
/>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -335,7 +387,7 @@ function LibraryDocNav({ content, categories, activeCategoryKey, onSelectCategor
|
|||
);
|
||||
}
|
||||
|
||||
function LibraryToolExample({ module, sourceData, description, categoryTitle, docs, featureHeading, advancedHeading, advancedCopyLabel, advancedCopySuccess, controlLegendHeading, context }) {
|
||||
function LibraryToolExample({ module, sourceData, description, categoryTitle, docs, featureHeading, advancedHeading, advancedCopyLabel, advancedCopySuccess, controlLegendHeading, context, copyContent, storageReady, onCopy }) {
|
||||
const definition = getToolboxModuleDefinition(module.type);
|
||||
const { Component } = MODULE_COMPONENTS[module.type] || MODULE_COMPONENTS.notepad;
|
||||
const [scrollable, setScrollable] = useState(false);
|
||||
|
|
@ -354,6 +406,13 @@ function LibraryToolExample({ module, sourceData, description, categoryTitle, do
|
|||
</div>
|
||||
<span className="library-tool-badge nds-badge">{categoryTitle}</span>
|
||||
{description && <p>{description}</p>}
|
||||
<div className="library-tool-copy-action">
|
||||
<p>{copyContent.isolationHelp}</p>
|
||||
<button className="nds-button" data-size="sm" data-variant="primary" type="button" disabled={!storageReady} onClick={onCopy}>
|
||||
<Icon name="add" />
|
||||
{copyContent.triggerLabel}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className={`library-example-layout ${Array.isArray(docs?.controls) && docs.controls.length ? "has-legend" : ""}`}>
|
||||
|
|
|
|||
|
|
@ -5,3 +5,4 @@
|
|||
@use "library/tool-cards";
|
||||
@use "library/examples";
|
||||
@use "library/previews";
|
||||
@use "library/copy";
|
||||
|
|
|
|||
127
website/src/styles/home/library/_copy.scss
Normal file
127
website/src/styles/home/library/_copy.scss
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
// Rôle : met en page l'action et la modale de copie des exemples de la librairie.
|
||||
.library-tool-copy-action {
|
||||
display: flex;
|
||||
max-width: 860px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--space-4);
|
||||
margin-top: var(--space-4);
|
||||
padding-top: var(--space-3);
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.library-tool-copy-action p {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
.library-tool-copy-action .nds-button {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.library-copy-modal {
|
||||
width: min(580px, calc(100vw - var(--space-6)));
|
||||
}
|
||||
|
||||
.library-copy-modal header .eyebrow,
|
||||
.library-copy-modal header h2,
|
||||
.library-copy-description {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.library-copy-modal header {
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.library-copy-description {
|
||||
color: var(--color-text-secondary);
|
||||
}
|
||||
|
||||
.library-copy-modal form {
|
||||
display: grid;
|
||||
gap: var(--space-4);
|
||||
}
|
||||
|
||||
.library-copy-destination {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
||||
gap: var(--space-3);
|
||||
}
|
||||
|
||||
.library-copy-field {
|
||||
display: grid;
|
||||
gap: var(--space-2);
|
||||
}
|
||||
|
||||
.library-copy-field > span,
|
||||
.library-copy-mode legend {
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--font-size-sm);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.library-copy-field small,
|
||||
.library-copy-mode small {
|
||||
color: var(--color-text-muted);
|
||||
font-size: var(--font-size-xs);
|
||||
line-height: 1.35;
|
||||
}
|
||||
|
||||
.library-copy-mode {
|
||||
display: grid;
|
||||
min-width: 0;
|
||||
gap: var(--space-2);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.library-copy-mode legend {
|
||||
margin-bottom: var(--space-2);
|
||||
}
|
||||
|
||||
.library-copy-mode label {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
align-items: start;
|
||||
gap: var(--space-3);
|
||||
padding: var(--space-3);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-md);
|
||||
background: var(--color-bg-surface);
|
||||
cursor: pointer;
|
||||
transition: border-color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard);
|
||||
}
|
||||
|
||||
.library-copy-mode label:hover,
|
||||
.library-copy-mode label.is-selected {
|
||||
border-color: var(--color-primary-border);
|
||||
background: var(--color-primary-soft);
|
||||
}
|
||||
|
||||
.library-copy-mode input {
|
||||
margin-top: 3px;
|
||||
accent-color: var(--color-primary);
|
||||
}
|
||||
|
||||
.library-copy-mode label > span {
|
||||
display: grid;
|
||||
gap: var(--space-1);
|
||||
}
|
||||
|
||||
.library-copy-mode strong {
|
||||
color: var(--color-text-primary);
|
||||
font-size: var(--font-size-sm);
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.library-tool-copy-action {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.library-copy-destination {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue