mirror of
https://github.com/penpot/penpot.git
synced 2026-01-10 15:29:05 -05:00
Compare commits
6 Commits
mavalroot-
...
eva-replac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35a8901d31 | ||
|
|
52ed5fb242 | ||
|
|
de9a21121a | ||
|
|
cea10308b7 | ||
|
|
5223c9c881 | ||
|
|
be62fa10c4 |
2
.github/workflows/build-tag.yml
vendored
2
.github/workflows/build-tag.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
||||
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK }}
|
||||
MATTERMOST_CHANNEL: bot-alerts-cicd
|
||||
TEXT: |
|
||||
🐳 *[PENPOT] Docker image available: {{ github.ref_name }}*
|
||||
🐳 *[PENPOT] Docker image available: ${{ github.ref_name }}*
|
||||
🔗 Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
@infra
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,7 +5,6 @@
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
.pnpm-store
|
||||
*-init.clj
|
||||
*.css.json
|
||||
*.jar
|
||||
|
||||
20
CHANGES.md
20
CHANGES.md
@@ -1,5 +1,18 @@
|
||||
# CHANGELOG
|
||||
|
||||
## 2.14.0 (Unreleased)
|
||||
|
||||
### :boom: Breaking changes & Deprecations
|
||||
|
||||
### :rocket: Epics and highlights
|
||||
|
||||
### :heart: Community contributions (Thank you!)
|
||||
|
||||
### :sparkles: New features & Enhancements
|
||||
|
||||
### :bug: Bugs fixed
|
||||
|
||||
|
||||
## 2.13.0 (Unreleased)
|
||||
|
||||
### :boom: Breaking changes & Deprecations
|
||||
@@ -22,13 +35,6 @@
|
||||
- Fix problem when pasting elements in reverse flex layout [Taiga #12460](https://tree.taiga.io/project/penpot/issue/12460)
|
||||
- Fix wrong board size presets in Android [Taiga #12339](https://tree.taiga.io/project/penpot/issue/12339)
|
||||
- Fix problem with grid layout components and auto sizing [Github #7797](https://github.com/penpot/penpot/issues/7797)
|
||||
- Fix some alignments on inspect tab [Taiga #12915](https://tree.taiga.io/project/penpot/issue/12915)
|
||||
- Fix color assets from shared libraries not appearing as assets in Selected colors panel [Taiga #12957](https://tree.taiga.io/project/penpot/issue/12957)
|
||||
- Fix CSS generated box-shadow property [Taiga #12997](https://tree.taiga.io/project/penpot/issue/12997)
|
||||
- Fix inner shadow selector on shadow token [Taiga #12951](https://tree.taiga.io/project/penpot/issue/12951)
|
||||
- Fix missing text color token from selected shapes in selected colors list [Taiga #12956](https://tree.taiga.io/project/penpot/issue/12956)
|
||||
- Fix dropdown option width in Guides columns dropdown [Taiga #12959](https://tree.taiga.io/project/penpot/issue/12959)
|
||||
- Fix typos on download modal [Taiga #12865](https://tree.taiga.io/project/penpot/issue/12865)
|
||||
|
||||
|
||||
## 2.12.1
|
||||
|
||||
@@ -97,8 +97,8 @@
|
||||
|
||||
:jmx-remote
|
||||
{:jvm-opts ["-Dcom.sun.management.jmxremote"
|
||||
"-Dcom.sun.management.jmxremote.port=9000"
|
||||
"-Dcom.sun.management.jmxremote.rmi.port=9000"
|
||||
"-Dcom.sun.management.jmxremote.port=9090"
|
||||
"-Dcom.sun.management.jmxremote.rmi.port=9090"
|
||||
"-Dcom.sun.management.jmxremote.local.only=false"
|
||||
"-Dcom.sun.management.jmxremote.authenticate=false"
|
||||
"-Dcom.sun.management.jmxremote.ssl=false"
|
||||
|
||||
@@ -36,6 +36,17 @@
|
||||
[integrant.core :as ig]
|
||||
[yetti.response :as-alias yres]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; HELPERS
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defn obfuscate-string
|
||||
[s]
|
||||
(if (< (count s) 10)
|
||||
(apply str (take (count s) (repeat "*")))
|
||||
(str (subs s 0 5)
|
||||
(apply str (take (- (count s) 5) (repeat "*"))))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; OIDC PROVIDER (GENERIC)
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -166,7 +177,7 @@
|
||||
(l/inf :hint "provider initialized"
|
||||
:provider (:id provider)
|
||||
:client-id (:client-id provider)
|
||||
:client-secret (d/obfuscate-string (:client-secret provider)))
|
||||
:client-secret (obfuscate-string (:client-secret provider)))
|
||||
provider)
|
||||
|
||||
(catch Throwable cause
|
||||
@@ -211,7 +222,7 @@
|
||||
(l/inf :hint "provider initialized"
|
||||
:provider (:id provider)
|
||||
:client-id (:client-id provider)
|
||||
:client-secret (d/obfuscate-string (:client-secret provider)))
|
||||
:client-secret (obfuscate-string (:client-secret provider)))
|
||||
provider)
|
||||
|
||||
(catch Throwable cause
|
||||
@@ -288,7 +299,7 @@
|
||||
(l/inf :hint "provider initialized"
|
||||
:provider (:id provider)
|
||||
:client-id (:client-id provider)
|
||||
:client-secret (d/obfuscate-string (:client-secret provider)))
|
||||
:client-secret (obfuscate-string (:client-secret provider)))
|
||||
provider)
|
||||
|
||||
(catch Throwable cause
|
||||
@@ -330,7 +341,7 @@
|
||||
:provider "gitlab"
|
||||
:base-uri (:base-uri provider)
|
||||
:client-id (:client-id provider)
|
||||
:client-secret (d/obfuscate-string (:client-secret provider)))
|
||||
:client-secret (obfuscate-string (:client-secret provider)))
|
||||
provider)
|
||||
(catch Throwable cause
|
||||
(ex/raise :type ::internal
|
||||
@@ -350,7 +361,7 @@
|
||||
(l/inf :hint "provider initialized"
|
||||
:provider (:id provider)
|
||||
:client-id (:client-id provider)
|
||||
:client-secret (d/obfuscate-string (:client-secret provider)))
|
||||
:client-secret (obfuscate-string (:client-secret provider)))
|
||||
provider)
|
||||
|
||||
(catch Throwable cause
|
||||
@@ -448,7 +459,7 @@
|
||||
(l/trc :hint "fetch access token"
|
||||
:provider (:id provider)
|
||||
:client-id (:client-id provider)
|
||||
:client-secret (d/obfuscate-string (:client-secret provider))
|
||||
:client-secret (obfuscate-string (:client-secret provider))
|
||||
:grant-type (:grant_type params)
|
||||
:redirect-uri (:redirect_uri params))
|
||||
|
||||
@@ -501,7 +512,7 @@
|
||||
[cfg provider tdata]
|
||||
(l/trc :hint "fetch user info"
|
||||
:uri (:user-uri provider)
|
||||
:token (d/obfuscate-string (:token/access tdata)))
|
||||
:token (obfuscate-string (:token/access tdata)))
|
||||
|
||||
(let [params {:uri (:user-uri provider)
|
||||
:headers {"Authorization" (str (:token/type tdata) " " (:token/access tdata))}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
inner join team_profile_rel as tpr on (tpr.team_id = p.team_id)
|
||||
where tpr.profile_id = ?
|
||||
and p.team_id = ?
|
||||
and (p.deleted_at is null)
|
||||
and (p.deleted_at is null or p.deleted_at > now())
|
||||
and (tpr.is_admin = true or
|
||||
tpr.is_owner = true or
|
||||
tpr.can_edit = true)
|
||||
@@ -29,7 +29,7 @@
|
||||
inner join project_profile_rel as ppr on (ppr.project_id = p.id)
|
||||
where ppr.profile_id = ?
|
||||
and p.team_id = ?
|
||||
and (p.deleted_at is null)
|
||||
and (p.deleted_at is null or p.deleted_at > now())
|
||||
and (ppr.is_admin = true or
|
||||
ppr.is_owner = true or
|
||||
ppr.can_edit = true)
|
||||
@@ -47,7 +47,7 @@
|
||||
left join file_thumbnail as ft on (ft.file_id = f.id and ft.revn = f.revn)
|
||||
inner join projects as pr on (f.project_id = pr.id)
|
||||
where f.name ilike ('%' || ? || '%')
|
||||
and (f.deleted_at is null)
|
||||
and (f.deleted_at is null or f.deleted_at > now())
|
||||
order by f.created_at asc")
|
||||
|
||||
(defn search-files
|
||||
|
||||
@@ -1024,26 +1024,6 @@
|
||||
:clj
|
||||
(sort comp-fn items))))
|
||||
|
||||
(defn obfuscate-string
|
||||
"Obfuscates potentially sensitive values.
|
||||
|
||||
- One-arg arity:
|
||||
* For strings shorter than 10 characters, all characters are replaced by `*`.
|
||||
* For longer strings, the first 5 characters are preserved and the rest obfuscated.
|
||||
- Two-arg arity accepts a boolean `full?` that, when true, replaces the whole value
|
||||
by `*`, preserving only the length."
|
||||
([v]
|
||||
(obfuscate-string v false))
|
||||
([v full?]
|
||||
(let [s (str v)
|
||||
n (count s)]
|
||||
(cond
|
||||
(zero? n) s
|
||||
full? (apply str (repeat n "*"))
|
||||
(< n 10) (apply str (repeat n "*"))
|
||||
:else (str (subs s 0 5)
|
||||
(apply str (repeat (- n 5) "*")))))))
|
||||
|
||||
(defn reorder
|
||||
"Reorder a vector by moving one of their items from some position to some space between positions.
|
||||
It clamps the position numbers to a valid range."
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
(:refer-clojure :exclude [instance?])
|
||||
(:require
|
||||
#?(:clj [clojure.stacktrace :as strace])
|
||||
[app.common.data :refer [obfuscate-string]]
|
||||
[app.common.pprint :as pp]
|
||||
[app.common.schema :as sm]
|
||||
[clojure.core :as c]
|
||||
@@ -20,10 +19,6 @@
|
||||
(:import
|
||||
clojure.lang.IPersistentMap)))
|
||||
|
||||
(def ^:private sensitive-fields
|
||||
"Keys whose values must be obfuscated in validation explains."
|
||||
#{:password :old-password :token :invitation-token})
|
||||
|
||||
#?(:clj (set! *warn-on-reflection* true))
|
||||
|
||||
(def ^:dynamic *data-length* 8)
|
||||
@@ -115,25 +110,7 @@
|
||||
(explain (:explain data) opts)
|
||||
|
||||
(contains? data ::sm/explain)
|
||||
(let [exp (::sm/explain data)
|
||||
sanitize-map (fn sanitize-map [m]
|
||||
(reduce-kv
|
||||
(fn [acc k v]
|
||||
(let [k* (if (string? k) (keyword k) k)]
|
||||
(cond
|
||||
(contains? sensitive-fields k*)
|
||||
(assoc acc k (if (map? v)
|
||||
(sanitize-map v)
|
||||
(obfuscate-string v true)))
|
||||
|
||||
(map? v) (assoc acc k (sanitize-map v))
|
||||
:else (assoc acc k v))))
|
||||
{}
|
||||
m))
|
||||
sanitize-explain (fn [exp]
|
||||
(cond-> exp
|
||||
(:value exp) (update :value sanitize-map)))]
|
||||
(sm/humanize-explain (sanitize-explain exp) opts))))
|
||||
(sm/humanize-explain (::sm/explain data) opts)))
|
||||
|
||||
#?(:clj
|
||||
(defn format-throwable
|
||||
|
||||
@@ -132,3 +132,94 @@ Some naming conventions:
|
||||
(if-let [last-period (str/last-index-of s ".")]
|
||||
[(subs s 0 (inc last-period)) (subs s (inc last-period))]
|
||||
[s ""]))
|
||||
|
||||
;; Tree building functions --------------------------------------------------
|
||||
|
||||
"Build tree structure from flat list of paths"
|
||||
|
||||
"`build-tree-root` is the main function to build the tree."
|
||||
|
||||
"Receives a list of segments with 'name' properties representing paths,
|
||||
and a separator string."
|
||||
"E.g segments = [{... :name 'one/two/three'} {... :name 'one/two/four'} {... :name 'one/five'}]"
|
||||
|
||||
"Transforms into a tree structure like:
|
||||
[{:name 'one'
|
||||
:path 'one'
|
||||
:depth 0
|
||||
:leaf nil
|
||||
:children-fn (fn [] [{:name 'two'
|
||||
:path 'one.two'
|
||||
:depth 1
|
||||
:leaf nil
|
||||
:children-fn (fn [] [{... :name 'three'} {... :name 'four'}])}
|
||||
{:name 'five'
|
||||
:path 'one.five'
|
||||
:depth 1
|
||||
:leaf {... :name 'five'}
|
||||
...}])}]"
|
||||
|
||||
(defn- sort-by-children
|
||||
"Sorts segments so that those with children come first."
|
||||
[segments separator]
|
||||
(sort-by (fn [segment]
|
||||
(let [path (split-path (:name segment) :separator separator)
|
||||
path-length (count path)]
|
||||
(if (= path-length 1)
|
||||
1
|
||||
0)))
|
||||
segments))
|
||||
|
||||
(defn- group-by-first-segment
|
||||
"Groups segments by their first path segment and update segment name."
|
||||
[segments separator]
|
||||
(reduce (fn [acc segment]
|
||||
(let [[first-segment & remaining-segments] (split-path (:name segment) :separator separator)
|
||||
rest-path (when (seq remaining-segments) (join-path remaining-segments :separator separator :with-spaces? false))]
|
||||
(update acc first-segment (fnil conj [])
|
||||
(if rest-path
|
||||
(assoc segment :name rest-path)
|
||||
segment))))
|
||||
{}
|
||||
segments))
|
||||
|
||||
(defn- sort-and-group-segments
|
||||
"Sorts elements and groups them by their first path segment."
|
||||
[segments separator]
|
||||
(let [sorted (sort-by-children segments separator)
|
||||
grouped (group-by-first-segment sorted separator)]
|
||||
grouped))
|
||||
|
||||
(defn- build-tree-node
|
||||
"Builds a single tree node with lazy children."
|
||||
[segment-name remaining-segments separator parent-path depth]
|
||||
(let [current-path (if parent-path
|
||||
(str parent-path "." segment-name)
|
||||
segment-name)
|
||||
|
||||
is-leaf? (and (seq remaining-segments)
|
||||
(every? (fn [segment]
|
||||
(let [remaining-segment-name (first (split-path (:name segment) :separator separator))]
|
||||
(= segment-name remaining-segment-name)))
|
||||
remaining-segments))
|
||||
|
||||
leaf-segment (when is-leaf? (first remaining-segments))
|
||||
node {:name segment-name
|
||||
:path current-path
|
||||
:depth depth
|
||||
:leaf leaf-segment
|
||||
:children-fn (when-not is-leaf?
|
||||
(fn []
|
||||
(let [grouped-elements (sort-and-group-segments remaining-segments separator)]
|
||||
(mapv (fn [[child-segment-name remaining-child-segments]]
|
||||
(build-tree-node child-segment-name remaining-child-segments separator current-path (inc depth)))
|
||||
grouped-elements))))}]
|
||||
node))
|
||||
|
||||
(defn build-tree-root
|
||||
"Builds the root level of the tree."
|
||||
[segments separator]
|
||||
(let [grouped-elements (sort-and-group-segments segments separator)]
|
||||
(mapv (fn [[segment-name remaining-segments]]
|
||||
(build-tree-node segment-name remaining-segments separator nil 0))
|
||||
grouped-elements)))
|
||||
|
||||
@@ -112,10 +112,8 @@
|
||||
(:c2y params) (update-in [index :params :c2y] + (:c2y params)))
|
||||
content))]
|
||||
|
||||
(if (some? modifiers)
|
||||
(impl/path-data
|
||||
(reduce apply-to-index (vec content) modifiers))
|
||||
content)))
|
||||
(impl/path-data
|
||||
(reduce apply-to-index (vec content) modifiers))))
|
||||
|
||||
(defn transform-content
|
||||
"Applies a transformation matrix over content and returns a new
|
||||
|
||||
@@ -41,10 +41,7 @@ services:
|
||||
- 6062:6062
|
||||
- 6063:6063
|
||||
- 6064:6064
|
||||
- 9000:9000
|
||||
- 9001:9001
|
||||
- 9090:9090
|
||||
- 9091:9091
|
||||
|
||||
environment:
|
||||
- EXTERNAL_UID=${CURRENT_USER_ID}
|
||||
|
||||
@@ -145,8 +145,8 @@ http {
|
||||
proxy_pass http://127.0.0.1:3000/;
|
||||
}
|
||||
|
||||
location /wasm-playground {
|
||||
alias /home/penpot/penpot/frontend/resources/public/wasm-playground/;
|
||||
location /playground {
|
||||
alias /home/penpot/penpot/experiments/;
|
||||
add_header Cache-Control "no-cache, max-age=0";
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,14 @@ source ~/.bashrc
|
||||
|
||||
echo "[start-tmux.sh] Installing node dependencies"
|
||||
pushd ~/penpot/frontend/
|
||||
./scripts/setup;
|
||||
corepack install;
|
||||
yarn install;
|
||||
yarn playwright install chromium
|
||||
popd
|
||||
pushd ~/penpot/exporter/
|
||||
./scripts/setup;
|
||||
corepack install;
|
||||
yarn install
|
||||
yarn playwright install chromium
|
||||
popd
|
||||
|
||||
tmux -2 new-session -d -s penpot
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e;
|
||||
|
||||
corepack enable;
|
||||
corepack install;
|
||||
yarn install;
|
||||
yarn playwright install chromium
|
||||
@@ -20,7 +20,12 @@ test.describe("Dashboard Deleted Page", () => {
|
||||
// Navigate directly to deleted page
|
||||
await dashboardPage.goToDeleted();
|
||||
|
||||
// Check for the delete-page-section element
|
||||
await expect(page.getByTestId("deleted-page-section")).toBeVisible();
|
||||
// Check for the restore all and clear trash buttons
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Restore All" }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole("button", { name: "Clear trash" }),
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -305,7 +305,7 @@ test.describe("Inspect tab - Styles", () => {
|
||||
);
|
||||
await openInspectTab(workspacePage);
|
||||
|
||||
const panel = await getPanelByTitle(workspacePage, "Size and position");
|
||||
const panel = await getPanelByTitle(workspacePage, "Size & position");
|
||||
await expect(panel).toBeVisible();
|
||||
|
||||
const propertyRow = panel.getByTestId("property-row");
|
||||
@@ -335,7 +335,7 @@ test.describe("Inspect tab - Styles", () => {
|
||||
);
|
||||
await openInspectTab(workspacePage);
|
||||
|
||||
const panel = await getPanelByTitle(workspacePage, "Size and position");
|
||||
const panel = await getPanelByTitle(workspacePage, "Size & position");
|
||||
await expect(panel).toBeVisible();
|
||||
|
||||
const propertyRow = panel.getByTestId("property-row");
|
||||
@@ -375,7 +375,7 @@ test.describe("Inspect tab - Styles", () => {
|
||||
);
|
||||
await openInspectTab(workspacePage);
|
||||
|
||||
const panel = await getPanelByTitle(workspacePage, "Size and position");
|
||||
const panel = await getPanelByTitle(workspacePage, "Size & position");
|
||||
await expect(panel).toBeVisible();
|
||||
|
||||
const propertyRow = panel.getByTestId("property-row");
|
||||
|
||||
@@ -40,6 +40,7 @@ const setupEmptyTokensFile = async (page, options = {}) => {
|
||||
tokensUpdateCreateModal: workspacePage.tokensUpdateCreateModal,
|
||||
tokenThemesSetsSidebar: workspacePage.tokenThemesSetsSidebar,
|
||||
tokenSetItems: workspacePage.tokenSetItems,
|
||||
tokensSidebar: workspacePage.tokensSidebar,
|
||||
tokenSetGroupItems: workspacePage.tokenSetGroupItems,
|
||||
tokenContextMenuForSet: workspacePage.tokenContextMenuForSet,
|
||||
};
|
||||
@@ -110,15 +111,12 @@ const checkInputFieldWithError = async (
|
||||
).toBeVisible();
|
||||
};
|
||||
|
||||
const checkInputFieldWithoutError = async (
|
||||
tokenThemeUpdateCreateModal,
|
||||
inputLocator,
|
||||
) => {
|
||||
const checkInputFieldWithoutError = async (inputLocator) => {
|
||||
expect(await inputLocator.getAttribute("aria-invalid")).toBeNull();
|
||||
expect(await inputLocator.getAttribute("aria-describedby")).toBeNull();
|
||||
};
|
||||
|
||||
async function testTokenCreationFlow(
|
||||
const testTokenCreationFlow = async (
|
||||
page,
|
||||
{
|
||||
tokenLabel,
|
||||
@@ -132,7 +130,7 @@ async function testTokenCreationFlow(
|
||||
resolvedValueText,
|
||||
secondResolvedValueText,
|
||||
},
|
||||
) {
|
||||
) => {
|
||||
const invalidValueError = "Invalid token value";
|
||||
const emptyNameError = "Name should be at least 1 character";
|
||||
const selfReferenceError = "Token has self reference";
|
||||
@@ -242,7 +240,45 @@ async function testTokenCreationFlow(
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", { name: "my-token-2" }),
|
||||
).toBeEnabled();
|
||||
}
|
||||
};
|
||||
|
||||
const unfoldTokenTree = async (tokensTabPanel, type, tokenName) => {
|
||||
const tokenSegments = tokenName.split(".");
|
||||
const tokenFolderTree = tokenSegments.slice(0, -1);
|
||||
const tokenLeafName = tokenSegments.pop();
|
||||
|
||||
const typeParentWrapper = tokensTabPanel.getByTestId(`section-${type}`);
|
||||
const typeSectionButton = typeParentWrapper
|
||||
.getByRole("button", {
|
||||
name: type,
|
||||
})
|
||||
.first();
|
||||
|
||||
const isSectionExpanded =
|
||||
await typeSectionButton.getAttribute("aria-expanded");
|
||||
|
||||
if (isSectionExpanded === "false") {
|
||||
await typeSectionButton.click();
|
||||
}
|
||||
|
||||
for (const segment of tokenFolderTree) {
|
||||
const segmentButton = typeParentWrapper
|
||||
.getByRole("listitem")
|
||||
.getByRole("button", { name: segment })
|
||||
.first();
|
||||
|
||||
const isExpanded = await segmentButton.getAttribute("aria-expanded");
|
||||
if (isExpanded === "false") {
|
||||
await segmentButton.click();
|
||||
}
|
||||
}
|
||||
|
||||
await expect(
|
||||
typeParentWrapper.getByRole("button", {
|
||||
name: tokenLeafName,
|
||||
}),
|
||||
).toBeEnabled();
|
||||
};
|
||||
|
||||
test.describe("Tokens: Tokens Tab", () => {
|
||||
test("Clicking tokens tab button opens tokens sidebar tab", async ({
|
||||
@@ -398,15 +434,12 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
const emptyNameError = "Name should be at least 1 character";
|
||||
const selfReferenceError = "Token has self reference";
|
||||
const missingReferenceError = "Missing token references";
|
||||
const { tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
const { tokensUpdateCreateModal, tokenThemesSetsSidebar, tokensSidebar } =
|
||||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
const addTokenButton = tokensTabPanel.getByRole("button", {
|
||||
name: `Add Token: Color`,
|
||||
});
|
||||
|
||||
await addTokenButton.click();
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
// Placeholder checks
|
||||
@@ -471,38 +504,34 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await submitButton.click();
|
||||
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", {
|
||||
name: "color.primary",
|
||||
}),
|
||||
).toBeEnabled();
|
||||
await unfoldTokenTree(tokensSidebar, "color", "color.primary");
|
||||
|
||||
// Create token referencing the previous one with keyboard
|
||||
|
||||
await tokensTabPanel
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
await nameField.click();
|
||||
await nameField.fill("color.secondary");
|
||||
await nameField.fill("secondary");
|
||||
await nameField.press("Tab");
|
||||
|
||||
await valueField.click();
|
||||
await valueField.fill("{color.primary}");
|
||||
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await nameField.press("Enter");
|
||||
await submitButton.press("Enter");
|
||||
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", {
|
||||
name: "color.secondary",
|
||||
tokensSidebar.getByRole("button", {
|
||||
name: "secondary",
|
||||
}),
|
||||
).toBeEnabled();
|
||||
|
||||
// Tokens tab panel should have two tokens with the color red / #ff0000
|
||||
await expect(
|
||||
tokensTabPanel.getByRole("button", { name: "#ff0000" }),
|
||||
tokensSidebar.getByRole("button", { name: "#ff0000" }),
|
||||
).toHaveCount(2);
|
||||
|
||||
// Global set has been auto created and is active
|
||||
@@ -518,7 +547,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
).toHaveAttribute("aria-checked", "true");
|
||||
|
||||
// Check color picker
|
||||
await tokensTabPanel
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
@@ -1079,7 +1108,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
const emptyNameError = "Name should be at least 1 character";
|
||||
|
||||
const { tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
await setupEmptyTokensFile(page, {flags: ["enable-token-shadow"]});
|
||||
await setupEmptyTokensFile(page, { flags: ["enable-token-shadow"] });
|
||||
|
||||
// Open modal
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
@@ -1507,24 +1536,15 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
test("User edits token and auto created set show up in the sidebar", async ({
|
||||
page,
|
||||
}) => {
|
||||
const {
|
||||
workspacePage,
|
||||
tokensUpdateCreateModal,
|
||||
tokenThemesSetsSidebar,
|
||||
tokensSidebar,
|
||||
tokenContextMenuForToken,
|
||||
} = await setupTokensFile(page);
|
||||
const { tokensUpdateCreateModal, tokensSidebar, tokenContextMenuForToken } =
|
||||
await setupTokensFile(page);
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
const tokensColorGroup = tokensSidebar.getByRole("button", {
|
||||
name: "Color 92",
|
||||
});
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
await unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
await expect(colorToken).toBeVisible();
|
||||
await colorToken.click({ button: "right" });
|
||||
@@ -1541,8 +1561,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
await expect(tokensUpdateCreateModal).not.toBeVisible();
|
||||
|
||||
await unfoldTokenTree(tokensSidebar, "color", "colors.blue.100.changed");
|
||||
|
||||
const colorTokenChanged = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100.changed",
|
||||
name: "changed",
|
||||
});
|
||||
await expect(colorTokenChanged).toBeVisible();
|
||||
});
|
||||
@@ -1633,11 +1655,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
});
|
||||
|
||||
test("User creates grouped color token", async ({ page }) => {
|
||||
const { workspacePage, tokensUpdateCreateModal, tokenThemesSetsSidebar } =
|
||||
const { workspacePage, tokensUpdateCreateModal, tokensSidebar } =
|
||||
await setupEmptyTokensFile(page);
|
||||
|
||||
const tokensTabPanel = page.getByRole("tabpanel", { name: "tokens" });
|
||||
await tokensTabPanel
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "Add Token: Color" })
|
||||
.click();
|
||||
|
||||
@@ -1649,7 +1670,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
const valueField = tokensUpdateCreateModal.getByLabel("Value");
|
||||
|
||||
await nameField.click();
|
||||
await nameField.fill("color.dark.primary");
|
||||
await nameField.fill("dark.primary");
|
||||
|
||||
await valueField.click();
|
||||
await valueField.fill("red");
|
||||
@@ -1660,7 +1681,9 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(submitButton).toBeEnabled();
|
||||
await submitButton.click();
|
||||
|
||||
await expect(tokensTabPanel.getByLabel("color.dark.primary")).toBeEnabled();
|
||||
await unfoldTokenTree(tokensSidebar, "color", "dark.primary");
|
||||
|
||||
await expect(tokensSidebar.getByLabel("primary")).toBeEnabled();
|
||||
});
|
||||
|
||||
test("User cant create regular token with value missing", async ({
|
||||
@@ -1676,7 +1699,6 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
const valueField = tokensUpdateCreateModal.getByLabel("Value");
|
||||
const submitButton = tokensUpdateCreateModal.getByRole("button", {
|
||||
name: "Save",
|
||||
});
|
||||
@@ -1686,7 +1708,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
// Fill in name but leave value empty
|
||||
await nameField.click();
|
||||
await nameField.fill("color.primary");
|
||||
await nameField.fill("primary");
|
||||
|
||||
// Submit button should remain disabled when value is empty
|
||||
await expect(submitButton).toBeDisabled();
|
||||
@@ -1704,7 +1726,6 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
.click();
|
||||
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
const valueField = tokensUpdateCreateModal.getByLabel("Value");
|
||||
|
||||
await valueField.click();
|
||||
@@ -1754,15 +1775,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
const tokensColorGroup = tokensSidebar.getByRole("button", {
|
||||
name: "Color 92",
|
||||
});
|
||||
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
|
||||
await colorToken.click({ button: "right" });
|
||||
@@ -1782,15 +1798,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
const tokensColorGroup = tokensSidebar.getByRole("button", {
|
||||
name: "Color 92",
|
||||
});
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
|
||||
await tokensColorGroup.click();
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
await expect(colorToken).toBeVisible();
|
||||
await colorToken.click({ button: "right" });
|
||||
@@ -1803,8 +1814,7 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
});
|
||||
|
||||
test("User fold/unfold color tokens", async ({ page }) => {
|
||||
const { tokensSidebar, tokenContextMenuForToken } =
|
||||
await setupTokensFile(page);
|
||||
const { tokensSidebar } = await setupTokensFile(page);
|
||||
|
||||
await expect(tokensSidebar).toBeVisible();
|
||||
|
||||
@@ -1814,8 +1824,10 @@ test.describe("Tokens: Tokens Tab", () => {
|
||||
await expect(tokensColorGroup).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.blue.100");
|
||||
|
||||
const colorToken = tokensSidebar.getByRole("button", {
|
||||
name: "colors.blue.100",
|
||||
name: "100",
|
||||
});
|
||||
await expect(colorToken).toBeVisible();
|
||||
await tokensColorGroup.click();
|
||||
@@ -2218,13 +2230,10 @@ test.describe("Tokens: Apply token", () => {
|
||||
const tokensTabButton = page.getByRole("tab", { name: "Tokens" });
|
||||
await tokensTabButton.click();
|
||||
|
||||
await tokensSidebar
|
||||
.getByRole("button")
|
||||
.filter({ hasText: "Color" })
|
||||
.click();
|
||||
unfoldTokenTree(tokensSidebar, "color", "colors.black");
|
||||
|
||||
await tokensSidebar
|
||||
.getByRole("button", { name: "colors.black" })
|
||||
.getByRole("button", { name: "black" })
|
||||
.click({ button: "right" });
|
||||
await tokenContextMenuForToken.getByText("Fill").click();
|
||||
|
||||
@@ -2462,7 +2471,7 @@ test.describe("Tokens: Apply token", () => {
|
||||
await expect(tokensUpdateCreateModal).toBeVisible();
|
||||
|
||||
const nameField = tokensUpdateCreateModal.getByLabel("Name");
|
||||
await nameField.fill("shadow.primary");
|
||||
await nameField.fill("primary");
|
||||
|
||||
// User adds first shadow with a color from the color ramp
|
||||
const firstShadowFields = tokensUpdateCreateModal.getByTestId(
|
||||
@@ -2709,9 +2718,11 @@ test.describe("Tokens: Apply token", () => {
|
||||
await submitButton.click();
|
||||
await expect(tokensUpdateCreateModal).not.toBeVisible();
|
||||
|
||||
unfoldTokenTree(tokensSidebar, "shadow", "primary");
|
||||
|
||||
// Verify token appears in sidebar
|
||||
const shadowToken = tokensSidebar.getByRole("button", {
|
||||
name: "shadow.primary",
|
||||
name: "primary",
|
||||
});
|
||||
await expect(shadowToken).toBeEnabled();
|
||||
|
||||
|
||||
@@ -667,9 +667,6 @@
|
||||
}
|
||||
|
||||
// UI ELEMENTS
|
||||
|
||||
// FIXME: This is used multiple times accross the app. We should design this in
|
||||
// the DS and create a proper component for it.
|
||||
.asset-element {
|
||||
@include bodySmallTypography;
|
||||
display: flex;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
corepack enable;
|
||||
corepack install;
|
||||
yarn install;
|
||||
yarn playwright install chromium;
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR=$(dirname $0);
|
||||
|
||||
set -ex
|
||||
corepack enable;
|
||||
corepack install;
|
||||
yarn install;
|
||||
|
||||
$SCRIPT_DIR/setup;
|
||||
|
||||
yarn run playwright install chromium --with-deps;
|
||||
yarn run build:storybook
|
||||
yarn run test:storybook
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SCRIPT_DIR=$(dirname $0);
|
||||
|
||||
set -ex
|
||||
|
||||
$SCRIPT_DIR/setup;
|
||||
|
||||
corepack enable;
|
||||
corepack install;
|
||||
yarn install;
|
||||
yarn run playwright install chromium --with-deps;
|
||||
yarn run test:e2e -x --workers=2 --reporter=list "$@";
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
Uses `font-size-value` to calculate the relative line-height value.
|
||||
Returns an error for an invalid font-size value."
|
||||
[line-height-value font-size-value font-size-errors]
|
||||
(let [missing-references (seq (cto/find-token-value-references line-height-value))
|
||||
(let [missing-references (seq (some cto/find-token-value-references line-height-value))
|
||||
error
|
||||
(cond
|
||||
missing-references
|
||||
|
||||
@@ -1122,7 +1122,7 @@
|
||||
ref-id (:stroke-color-ref-id stroke)
|
||||
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
shared? (contains? colors ref-id)
|
||||
@@ -1167,7 +1167,7 @@
|
||||
ref-file (get color :ref-file)
|
||||
ref-id (get color :ref-id)
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
shared? (contains? colors ref-id)
|
||||
@@ -1180,20 +1180,19 @@
|
||||
:index (:index shadow)}))
|
||||
|
||||
(defn- text->color-att
|
||||
[fill file-id libraries & {:keys [has-token-applied token-name]}]
|
||||
[fill file-id libraries]
|
||||
(let [ref-file (:fill-color-ref-file fill)
|
||||
ref-id (:fill-color-ref-id fill)
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
|
||||
shared? (contains? colors ref-id)
|
||||
base-attrs (cond-> (types.fills/fill->color fill)
|
||||
(not (or shared? (= ref-file file-id)))
|
||||
(dissoc :ref-file :ref-id))
|
||||
attrs (cond-> base-attrs
|
||||
has-token-applied (assoc :has-token-applied true)
|
||||
token-name (assoc :token-name token-name))]
|
||||
attrs (cond-> (types.fills/fill->color fill)
|
||||
(not (or shared? (= ref-file file-id)))
|
||||
(dissoc :ref-file :ref-id))]
|
||||
|
||||
{:attrs attrs
|
||||
:prop :content
|
||||
:shape-id (:shape-id fill)
|
||||
@@ -1201,18 +1200,13 @@
|
||||
|
||||
(defn- extract-text-colors
|
||||
[text file-id libraries]
|
||||
(let [applied-fill-token (get-in text [:applied-tokens :fill])
|
||||
treat-node
|
||||
(let [treat-node
|
||||
(fn [node shape-id]
|
||||
(map-indexed (fn [idx fill]
|
||||
(let [args (cond-> []
|
||||
(and (= idx 0) applied-fill-token)
|
||||
(conj :has-token-applied true :token-name applied-fill-token))]
|
||||
(apply text->color-att (assoc fill :shape-id shape-id :index idx) file-id libraries args)))
|
||||
node))]
|
||||
(map-indexed #(assoc %2 :shape-id shape-id :index %1) node))]
|
||||
(->> (txt/node-seq txt/is-text-node? (:content text))
|
||||
(map :fills)
|
||||
(mapcat #(treat-node % (:id text))))))
|
||||
(mapcat #(treat-node % (:id text)))
|
||||
(map #(text->color-att % file-id libraries)))))
|
||||
|
||||
(defn- fill->color-att
|
||||
"Given a fill map enriched with :shape-id, :index, and optionally
|
||||
@@ -1238,7 +1232,7 @@
|
||||
ref-id (:fill-color-ref-id fill)
|
||||
|
||||
colors (-> libraries
|
||||
(get ref-file)
|
||||
(get ref-id)
|
||||
(get :data)
|
||||
(ctl/get-colors))
|
||||
shared? (contains? colors ref-id)
|
||||
|
||||
@@ -47,31 +47,32 @@
|
||||
(ptk/reify ::apply-content-modifiers
|
||||
ptk/WatchEvent
|
||||
(watch [it state _]
|
||||
(let [id (st/get-path-id state)
|
||||
shape (st/get-path state)
|
||||
(let [page-id (get state :current-page-id state)
|
||||
objects (dsh/lookup-page-objects state)
|
||||
|
||||
id (st/get-path-id state)
|
||||
|
||||
shape
|
||||
(st/get-path state)
|
||||
|
||||
content-modifiers
|
||||
(dm/get-in state [:workspace-local :edit-path id :content-modifiers])]
|
||||
(if (or (nil? shape) (nil? content-modifiers))
|
||||
(rx/of (dwe/clear-edition-mode))
|
||||
(let [page-id (get state :current-page-id state)
|
||||
objects (dsh/lookup-page-objects state)
|
||||
(dm/get-in state [:workspace-local :edit-path id :content-modifiers])
|
||||
|
||||
content (get shape :content)
|
||||
new-content (path/apply-content-modifiers content content-modifiers)
|
||||
content (get shape :content)
|
||||
new-content (path/apply-content-modifiers content content-modifiers)
|
||||
|
||||
old-points (path.segment/get-points content)
|
||||
new-points (path.segment/get-points new-content)
|
||||
point-change (->> (map hash-map old-points new-points) (reduce merge))]
|
||||
old-points (path.segment/get-points content)
|
||||
new-points (path.segment/get-points new-content)
|
||||
point-change (->> (map hash-map old-points new-points) (reduce merge))]
|
||||
|
||||
(when (and (some? new-content) (some? shape))
|
||||
(let [changes (changes/generate-path-changes it objects page-id shape (:content shape) new-content)]
|
||||
(if (empty? new-content)
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(dwe/clear-edition-mode))
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(selection/update-selection point-change)
|
||||
(fn [state] (update-in state [:workspace-local :edit-path id] dissoc :content-modifiers :moving-nodes :moving-handler))))))))))))
|
||||
(when (and (some? new-content) (some? shape))
|
||||
(let [changes (changes/generate-path-changes it objects page-id shape (:content shape) new-content)]
|
||||
(if (empty? new-content)
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(dwe/clear-edition-mode))
|
||||
(rx/of (dch/commit-changes changes)
|
||||
(selection/update-selection point-change)
|
||||
(fn [state] (update-in state [:workspace-local :edit-path id] dissoc :content-modifiers :moving-nodes :moving-handler))))))))))
|
||||
|
||||
(defn modify-content-point
|
||||
[content {dx :x dy :y} modifiers point]
|
||||
|
||||
@@ -4,29 +4,22 @@
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
// FIXME: we need this import for .asset-element
|
||||
@use "refactor/basic-rules.scss" as deprecated;
|
||||
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/_utils.scss" as *;
|
||||
@use "ds/spacing.scss" as *;
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
|
||||
.editable-select {
|
||||
@extend .asset-element;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: $b-1 solid var(--input-border-color);
|
||||
border: deprecated.$s-1 solid var(--input-border-color);
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: $sz-32;
|
||||
height: deprecated.$s-32;
|
||||
width: 100%;
|
||||
padding: var(--sp-s);
|
||||
border-radius: $br-8;
|
||||
padding: deprecated.$s-8;
|
||||
border-radius: deprecated.$br-8;
|
||||
cursor: pointer;
|
||||
.dropdown-button {
|
||||
display: flex;
|
||||
place-content: center;
|
||||
@include deprecated.flexCenter;
|
||||
svg {
|
||||
@extend .button-icon-small;
|
||||
transform: rotate(90deg);
|
||||
@@ -36,11 +29,10 @@
|
||||
|
||||
.custom-select-dropdown {
|
||||
@extend .dropdown-wrapper;
|
||||
width: fit-content;
|
||||
max-height: px2rem(320); // TODO: when this gets addressed in the DS, use a token
|
||||
max-height: deprecated.$s-320;
|
||||
.separator {
|
||||
margin: 0;
|
||||
height: $sz-12;
|
||||
height: deprecated.$s-12;
|
||||
}
|
||||
.dropdown-element {
|
||||
@extend .dropdown-element-base;
|
||||
@@ -51,8 +43,7 @@
|
||||
}
|
||||
|
||||
.check-icon {
|
||||
display: flex;
|
||||
place-content: center;
|
||||
@include deprecated.flexCenter;
|
||||
svg {
|
||||
@extend .button-icon-small;
|
||||
visibility: hidden;
|
||||
|
||||
@@ -53,6 +53,6 @@
|
||||
|
||||
|
||||
(mf/defc inspect-title-bar*
|
||||
[{:keys [class title title-class]}]
|
||||
[{:keys [class title]}]
|
||||
[:div {:class [(stl/css :title-bar) class]}
|
||||
[:div {:class [title-class (stl/css :title-only :inspect-title)]} title]])
|
||||
[:div {:class (stl/css :title-only :inspect-title)} title]])
|
||||
|
||||
@@ -32,27 +32,6 @@
|
||||
(def ^:private menu-icon
|
||||
(deprecated-icon/icon-xref :menu (stl/css :menu-icon)))
|
||||
|
||||
(defn- on-restore-project
|
||||
[project]
|
||||
(let [on-accept #(st/emit! (dd/restore-project-immediately project))]
|
||||
(st/emit! (modal/show
|
||||
{:type :confirm
|
||||
:title (tr "dashboard.restore-project-confirmation.title")
|
||||
:message (tr "dashboard.restore-project-confirmation.description" (:name project))
|
||||
:accept-style :primary
|
||||
:accept-label (tr "labels.continue")
|
||||
:on-accept on-accept}))))
|
||||
|
||||
(defn- on-delete-project
|
||||
[project]
|
||||
(let [accept-fn #(st/emit! (dd/delete-project-immediately project))]
|
||||
(st/emit! (modal/show
|
||||
{:type :confirm
|
||||
:title (tr "dashboard.delete-forever-confirmation.title")
|
||||
:message (tr "dashboard.delete-project-forever-confirmation.description" (:name project))
|
||||
:accept-label (tr "dashboard.delete-forever-confirmation.title")
|
||||
:on-accept accept-fn}))))
|
||||
|
||||
(mf/defc header*
|
||||
{::mf/props :obj
|
||||
::mf/private true}
|
||||
@@ -62,7 +41,6 @@
|
||||
[:h1 (tr "dashboard.projects-title")]]])
|
||||
|
||||
(mf/defc deleted-project-menu*
|
||||
{::mf/private true}
|
||||
[{:keys [project show on-close top left]}]
|
||||
(let [top (d/nilv top 0)
|
||||
left (d/nilv left 0)
|
||||
@@ -70,13 +48,25 @@
|
||||
on-restore-project
|
||||
(mf/use-fn
|
||||
(mf/deps project)
|
||||
(partial on-restore-project project))
|
||||
(fn []
|
||||
(let [on-accept #(st/emit! (dd/restore-project-immediately project))]
|
||||
(st/emit! (modal/show {:type :confirm
|
||||
:title (tr "dashboard.restore-project-confirmation.title")
|
||||
:message (tr "dashboard.restore-project-confirmation.description" (:name project))
|
||||
:accept-style :primary
|
||||
:accept-label (tr "labels.continue")
|
||||
:on-accept on-accept})))))
|
||||
|
||||
on-delete-project
|
||||
(mf/use-fn
|
||||
(mf/deps project)
|
||||
(partial on-delete-project project))
|
||||
|
||||
(fn []
|
||||
(let [accept-fn #(st/emit! (dd/delete-project-immediately project))]
|
||||
(st/emit! (modal/show {:type :confirm
|
||||
:title (tr "dashboard.delete-forever-confirmation.title")
|
||||
:message (tr "dashboard.delete-project-forever-confirmation.description" (:name project))
|
||||
:accept-label (tr "dashboard.delete-forever-confirmation.title")
|
||||
:on-accept accept-fn})))))
|
||||
options
|
||||
(mf/with-memo [on-restore-project on-delete-project]
|
||||
[{:name (tr "dashboard.restore-project-button")
|
||||
@@ -184,8 +174,8 @@
|
||||
:limit limit
|
||||
:selected-files selected-files}])]]))
|
||||
|
||||
|
||||
(mf/defc menu*
|
||||
{::mf/private true}
|
||||
[{:keys [team-id section]}]
|
||||
(let [on-recent-click
|
||||
(mf/use-fn
|
||||
@@ -232,8 +222,7 @@
|
||||
(some #(= (:id project) (:project-id %))
|
||||
(vals deleted-map)))))
|
||||
(sort-by :modified-at)
|
||||
(reverse)
|
||||
(not-empty)))
|
||||
(reverse)))
|
||||
|
||||
team-id
|
||||
(get team :id)
|
||||
@@ -284,44 +273,37 @@
|
||||
|
||||
[:*
|
||||
[:> header* {:team team}]
|
||||
[:section {:class (stl/css :dashboard-container :no-bg)
|
||||
:data-testid "deleted-page-section"}
|
||||
[:section {:class (stl/css :dashboard-container :no-bg)}
|
||||
[:*
|
||||
[:div {:class (stl/css :no-bg)}
|
||||
|
||||
[:> menu* {:team-id team-id :section :dashboard-deleted}]
|
||||
|
||||
(if (seq projects)
|
||||
[:*
|
||||
[:div {:class (stl/css :deleted-info-content)}
|
||||
[:p {:class (stl/css :deleted-info)}
|
||||
(tr "dashboard.trash-info-text-part1")
|
||||
[:span {:class (stl/css :info-text-highlight)}
|
||||
(tr "dashboard.trash-info-text-part2" deletion-days)]
|
||||
(tr "dashboard.trash-info-text-part3")
|
||||
[:br]
|
||||
(tr "dashboard.trash-info-text-part4")]
|
||||
[:div {:class (stl/css :deleted-options)}
|
||||
[:> button* {:variant "ghost"
|
||||
:type "button"
|
||||
:on-click on-restore-all}
|
||||
(tr "dashboard.restore-all-deleted-button")]
|
||||
[:> button* {:variant "destructive"
|
||||
:type "button"
|
||||
:icon "delete"
|
||||
:on-click on-delete-all}
|
||||
(tr "dashboard.clear-trash-button")]]]
|
||||
[:div {:class (stl/css :deleted-info-content)}
|
||||
[:p {:class (stl/css :deleted-info)}
|
||||
(tr "dashboard.trash-info-text-part1")
|
||||
[:span {:class (stl/css :info-text-highlight)}
|
||||
(tr "dashboard.trash-info-text-part2" deletion-days)]
|
||||
(tr "dashboard.trash-info-text-part3")
|
||||
[:br]
|
||||
(tr "dashboard.trash-info-text-part4")]
|
||||
[:div {:class (stl/css :deleted-options)}
|
||||
[:> button* {:variant "ghost"
|
||||
:type "button"
|
||||
:on-click on-restore-all}
|
||||
(tr "dashboard.restore-all-deleted-button")]
|
||||
[:> button* {:variant "destructive"
|
||||
:type "button"
|
||||
:icon "delete"
|
||||
:on-click on-delete-all}
|
||||
(tr "dashboard.clear-trash-button")]]]
|
||||
|
||||
(for [{:keys [id] :as project} projects]
|
||||
(let [files (when deleted-map
|
||||
(->> (vals deleted-map)
|
||||
(filterv #(= id (:project-id %)))
|
||||
(sort-by :modified-at #(compare %2 %1))))]
|
||||
[:> deleted-project-item* {:project project
|
||||
:files files
|
||||
:key id}]))]
|
||||
|
||||
;; when no deleted projects
|
||||
[:div {:class (stl/css :deleted-info-content)}
|
||||
[:p {:class (stl/css :deleted-info)}
|
||||
(tr "dashboard.trash-info-text-no-projects")]])]]]]))
|
||||
(when (seq projects)
|
||||
(for [{:keys [id] :as project} projects]
|
||||
(let [files (when deleted-map
|
||||
(->> (vals deleted-map)
|
||||
(filterv #(= id (:project-id %)))
|
||||
(sort-by :modified-at #(compare %2 %1))))]
|
||||
[:> deleted-project-item* {:project project
|
||||
:files files
|
||||
:key id}])))]]]]))
|
||||
|
||||
@@ -4,36 +4,35 @@
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "common/refactor/common-refactor.scss" as deprecated;
|
||||
@use "common/refactor/common-dashboard";
|
||||
@use "ds/typography.scss" as t;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/spacing.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/z-index.scss" as *;
|
||||
@use "ds/mixins.scss" as *;
|
||||
@use "ds/_utils.scss" as *;
|
||||
@use "../ds/typography.scss" as t;
|
||||
@use "../ds/_borders.scss" as *;
|
||||
@use "../ds/spacing.scss" as *;
|
||||
@use "../ds/_sizes.scss" as *;
|
||||
@use "../ds/z-index.scss" as *;
|
||||
|
||||
.dashboard-container {
|
||||
flex: 1 0 0;
|
||||
inline-size: 100%;
|
||||
width: 100%;
|
||||
margin-inline-end: var(--sp-l);
|
||||
border-block-start: $b-1 solid var(--panel-border-color);
|
||||
border-top: $b-1 solid var(--panel-border-color);
|
||||
overflow-y: auto;
|
||||
padding-block-end: var(--sp-xxxl);
|
||||
padding-bottom: var(--sp-xxxl);
|
||||
}
|
||||
|
||||
.dashboard-projects {
|
||||
user-select: none;
|
||||
block-size: calc(100vh - px2rem(64));
|
||||
height: calc(100vh - deprecated.$s-64);
|
||||
}
|
||||
|
||||
.with-team-hero {
|
||||
block-size: calc(100vh - px2rem(280));
|
||||
height: calc(100vh - deprecated.$s-280);
|
||||
}
|
||||
|
||||
.dashboard-shared {
|
||||
inline-size: calc(100vw - px2rem(320));
|
||||
margin-inline-end: px2rem(52);
|
||||
width: calc(100vw - deprecated.$s-320);
|
||||
margin-inline-end: deprecated.$s-52;
|
||||
}
|
||||
|
||||
.search {
|
||||
@@ -67,8 +66,8 @@
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--sp-s);
|
||||
inline-size: 99%;
|
||||
max-block-size: $sz-40;
|
||||
width: 99%;
|
||||
max-height: $sz-40;
|
||||
padding: var(--sp-s) var(--sp-s) var(--sp-s) var(--sp-l);
|
||||
margin-block-start: var(--sp-l);
|
||||
border-radius: $br-4;
|
||||
@@ -78,19 +77,19 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
inline-size: 100%;
|
||||
min-block-size: $sz-32;
|
||||
width: 100%;
|
||||
min-height: var(--sp-xxxl);
|
||||
margin-inline-start: var(--sp-s);
|
||||
}
|
||||
|
||||
.project-name {
|
||||
@include textEllipsis;
|
||||
@include t.use-typography("body-large");
|
||||
width: fit-content;
|
||||
margin-inline-end: var(--sp-m);
|
||||
line-height: 0.8;
|
||||
color: var(--title-foreground-color-hover);
|
||||
cursor: pointer;
|
||||
block-size: $sz-16;
|
||||
line-height: 0.8;
|
||||
margin-inline-end: var(--sp-m);
|
||||
height: var(--sp-l);
|
||||
}
|
||||
|
||||
.info-wrapper {
|
||||
@@ -117,8 +116,8 @@
|
||||
.add-file-btn,
|
||||
.options-btn {
|
||||
@extend .button-tertiary;
|
||||
block-size: $sz-32;
|
||||
inline-size: $sz-32;
|
||||
height: var(--sp-xxxl);
|
||||
width: var(--sp-xxxl);
|
||||
margin: 0 var(--sp-s);
|
||||
padding: var(--sp-s);
|
||||
}
|
||||
@@ -130,7 +129,7 @@
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
inline-size: 100%;
|
||||
width: 100%;
|
||||
padding: 0 var(--sp-xs);
|
||||
}
|
||||
|
||||
@@ -140,13 +139,11 @@
|
||||
|
||||
.show-more {
|
||||
--show-more-color: var(--button-secondary-foreground-color-rest);
|
||||
@include deprecated.buttonStyle;
|
||||
@include t.use-typography("body-medium");
|
||||
border: none;
|
||||
background: none;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
inset-block-start: var(--sp-s);
|
||||
inset-inline-end: px2rem(52);
|
||||
top: var(--sp-s);
|
||||
right: deprecated.$s-52;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
@@ -159,8 +156,8 @@
|
||||
}
|
||||
|
||||
.show-more-icon {
|
||||
block-size: $sz-16;
|
||||
inline-size: $sz-16;
|
||||
height: var(--sp-l);
|
||||
width: var(--sp-l);
|
||||
fill: none;
|
||||
stroke: var(--show-more-color);
|
||||
}
|
||||
@@ -168,7 +165,7 @@
|
||||
// Team hero
|
||||
.team-hero {
|
||||
background-color: var(--color-background-tertiary);
|
||||
border-radius: $br-8;
|
||||
border-radius: deprecated.$br-8;
|
||||
border: none;
|
||||
display: flex;
|
||||
margin: var(--sp-l);
|
||||
@@ -177,11 +174,12 @@
|
||||
|
||||
img {
|
||||
border-radius: $br-4;
|
||||
inline-size: auto;
|
||||
height: var(--sp-xl) 0;
|
||||
width: auto;
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
display: none;
|
||||
inline-size: 0;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -195,8 +193,9 @@
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: $sz-24;
|
||||
color: var(--color-foreground-primary);
|
||||
font-size: px2rem(24);
|
||||
font-weight: deprecated.$fw400;
|
||||
}
|
||||
|
||||
.info {
|
||||
@@ -216,8 +215,8 @@
|
||||
--close-icon-foreground-color: var(--icon-foreground);
|
||||
position: absolute;
|
||||
top: var(--sp-xl);
|
||||
inset-inline-end: var(--sp-xxl);
|
||||
inline-size: var(--sp-xxl);
|
||||
right: var(--sp-xxl);
|
||||
width: var(--sp-xxl);
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
@@ -232,20 +231,20 @@
|
||||
}
|
||||
|
||||
.invite {
|
||||
block-size: $sz-32;
|
||||
inline-size: px2rem(180);
|
||||
height: var(--sp-xxxl);
|
||||
width: deprecated.$s-180;
|
||||
}
|
||||
|
||||
.img-wrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
inline-size: var(--sp-xl) 0;
|
||||
block-size: var(--sp-xl) 0;
|
||||
width: var(--sp-xl) 0;
|
||||
height: var(--sp-xl) 0;
|
||||
overflow: hidden;
|
||||
border-radius: $br-4;
|
||||
border-radius: deprecated.$br-4;
|
||||
@media (max-width: 1200px) {
|
||||
display: none;
|
||||
inline-size: 0;
|
||||
width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,6 +183,7 @@
|
||||
[:map
|
||||
[:id {:optional true} :string]
|
||||
[:class {:optional true} :string]
|
||||
[:inner-class {:optional true} :string]
|
||||
[:value {:optional true} [:maybe [:or
|
||||
:int
|
||||
:float
|
||||
@@ -205,11 +206,12 @@
|
||||
[:on-focus {:optional true} fn?]
|
||||
[:on-detach {:optional true} fn?]
|
||||
[:property {:optional true} :string]
|
||||
[:align {:optional true} [:maybe [:enum :left :right]]]])
|
||||
[:align {:optional true} [:maybe [:enum :left :right :right-adjust]]]])
|
||||
|
||||
(mf/defc numeric-input*
|
||||
{::mf/schema schema:numeric-input}
|
||||
[{:keys [id class value default placeholder icon disabled
|
||||
[{:keys [id class value default placeholder
|
||||
icon disabled inner-class
|
||||
min max max-length step
|
||||
is-selected-on-focus nillable
|
||||
tokens applied-token empty-to-end
|
||||
@@ -624,6 +626,7 @@
|
||||
(mf/spread-props props {:ref ref
|
||||
:type "text"
|
||||
:id id
|
||||
:class inner-class
|
||||
:placeholder (if is-multiple?
|
||||
(tr "labels.mixed-values")
|
||||
placeholder)
|
||||
@@ -669,6 +672,7 @@
|
||||
:on-token-key-down on-token-key-down
|
||||
:disabled disabled
|
||||
:on-blur on-blur
|
||||
:class inner-class
|
||||
:slot-start (when icon
|
||||
(mf/html [:> tooltip*
|
||||
{:content property
|
||||
|
||||
@@ -32,13 +32,19 @@
|
||||
min-width: var(--sp-l);
|
||||
}
|
||||
|
||||
// TODO: Review if we need other type of button, so we don't need important here
|
||||
.invisible-button {
|
||||
position: absolute;
|
||||
right: 4px;
|
||||
top: 4px;
|
||||
opacity: var(--opacity-button);
|
||||
|
||||
background-color: var(--color-background-quaternary) !important;
|
||||
&:hover {
|
||||
background-color: var(--color-background-quaternary);
|
||||
--opacity-button: 1;
|
||||
}
|
||||
&:focus {
|
||||
background-color: var(--color-background-quaternary);
|
||||
--opacity-button: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
[:map
|
||||
[:id {:optional true} :string]
|
||||
[:resolved-value {:optional true}
|
||||
[:or :int :string]]
|
||||
[:or :int :string :float]]
|
||||
[:name {:optional true} :string]
|
||||
[:icon {:optional true} schema:icon-list]
|
||||
[:label {:optional true} :string]
|
||||
@@ -40,7 +40,7 @@
|
||||
[:selected {:optional true} :any]
|
||||
[:focused {:optional true} :any]
|
||||
[:empty-to-end {:optional true} [:maybe :boolean]]
|
||||
[:align {:optional true} [:maybe [:enum :left :right]]]])
|
||||
[:align {:optional true} [:maybe [:enum :left :right :right-adjust]]]])
|
||||
|
||||
(def ^:private
|
||||
xf:filter-blank-id
|
||||
@@ -109,7 +109,8 @@
|
||||
(mf/spread-props props
|
||||
{:class (stl/css-case :option-list true
|
||||
:left-align (= align :left)
|
||||
:right-align (= align :right))
|
||||
:right-align (= align :right)
|
||||
:adjust-align (= align :right-adjust))
|
||||
:tab-index "-1"
|
||||
:role "listbox"})
|
||||
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.adjust-align {
|
||||
right: var(--dropdown-adjustment);
|
||||
}
|
||||
|
||||
.option-separator {
|
||||
border: $b-1 solid var(--options-dropdown-border-color);
|
||||
margin-top: var(--sp-xs);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
[:map
|
||||
[:id {:optiona true} :string]
|
||||
[:ref some?]
|
||||
[:resolved {:optional true} [:or :int :string]]
|
||||
[:resolved {:optional true} [:or :int :string :float]]
|
||||
[:name {:optional true} :string]
|
||||
[:on-click {:optional true} fn?]
|
||||
[:selected {:optional true} :boolean]
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
(def ^:private schema:input-field
|
||||
[:map
|
||||
[:class {:optional true} :string]
|
||||
[:class {:optional true} [:maybe :string]]
|
||||
[:aria-label {:optional true} [:maybe :string]]
|
||||
[:id :string]
|
||||
[:icon {:optional true}
|
||||
@@ -44,9 +44,10 @@
|
||||
tooltip-id (mf/use-id)
|
||||
|
||||
props (mf/spread-props props
|
||||
{:class (stl/css-case
|
||||
:input true
|
||||
:input-with-icon (some? icon))
|
||||
{:class [class
|
||||
(stl/css-case
|
||||
:input true
|
||||
:input-with-icon (some? icon))]
|
||||
:ref (or ref input-ref)
|
||||
:aria-invalid (when (and has-hint
|
||||
(= hint-type "error"))
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
(def ^:private schema:token-field
|
||||
[:map
|
||||
[:class {:optional true} [:maybe :string]]
|
||||
[:id {:optional true} [:maybe :string]]
|
||||
[:label {:optional true} [:maybe :string]]
|
||||
[:value :any]
|
||||
@@ -32,7 +33,7 @@
|
||||
|
||||
(mf/defc token-field*
|
||||
{::mf/schema schema:token-field}
|
||||
[{:keys [id label value slot-start disabled
|
||||
[{:keys [id label value slot-start disabled class
|
||||
on-click on-token-key-down on-blur detach-token
|
||||
token-wrapper-ref token-detach-btn-ref on-focus]}]
|
||||
(let [set-active? (some? id)
|
||||
@@ -48,14 +49,11 @@
|
||||
(fn [event]
|
||||
(when-not ^boolean disabled
|
||||
(dom/prevent-default event)
|
||||
(dom/focus! (mf/ref-val token-wrapper-ref)))))
|
||||
(dom/focus! (mf/ref-val token-wrapper-ref)))))]
|
||||
|
||||
class
|
||||
(stl/css-case :token-field true
|
||||
:with-icon (some? slot-start)
|
||||
:token-field-disabled disabled)]
|
||||
|
||||
[:div {:class class
|
||||
[:div {:class [class (stl/css-case :token-field true
|
||||
:with-icon (some? slot-start)
|
||||
:token-field-disabled disabled)]
|
||||
:on-click focus-wrapper
|
||||
:disabled disabled
|
||||
:on-key-down on-token-key-down
|
||||
@@ -80,7 +78,7 @@
|
||||
[:div {:class (stl/css :pill-dot)}])]]
|
||||
|
||||
(when-not ^boolean disabled
|
||||
[:> icon-button* {:variant "action"
|
||||
[:> icon-button* {:variant "ghost"
|
||||
:class (stl/css :invisible-button)
|
||||
:icon i/broken-link
|
||||
:ref token-detach-btn-ref
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/typography.scss" as t;
|
||||
@use "ds/colors.scss" as *;
|
||||
@use "ds/mixins.scss" as *;
|
||||
|
||||
.token-field {
|
||||
--token-field-bg-color: var(--color-background-tertiary);
|
||||
@@ -16,9 +17,8 @@
|
||||
--token-field-outline-color: none;
|
||||
--token-field-height: var(--sp-xxxl);
|
||||
--token-field-margin: unset;
|
||||
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto;
|
||||
width: inherit;
|
||||
column-gap: var(--sp-xs);
|
||||
align-items: center;
|
||||
position: relative;
|
||||
@@ -27,6 +27,7 @@
|
||||
border-radius: $br-8;
|
||||
padding: var(--sp-xs);
|
||||
outline: $b-1 solid var(--token-field-outline-color);
|
||||
position: relative;
|
||||
|
||||
&:hover {
|
||||
--token-field-bg-color: var(--color-background-quaternary);
|
||||
@@ -39,7 +40,7 @@
|
||||
}
|
||||
|
||||
.with-icon {
|
||||
grid-template-columns: auto 1fr auto;
|
||||
grid-template-columns: auto 1fr;
|
||||
}
|
||||
|
||||
.token-field-disabled {
|
||||
@@ -57,6 +58,8 @@
|
||||
--pill-bg-color: var(--color-background-tertiary);
|
||||
--pill-fg-color: var(--color-token-foreground);
|
||||
@include t.use-typography("code-font");
|
||||
@include textEllipsis;
|
||||
display: block;
|
||||
height: var(--sp-xxl);
|
||||
width: fit-content;
|
||||
background: var(--pill-bg-color);
|
||||
@@ -65,6 +68,7 @@
|
||||
color: var(--pill-fg-color);
|
||||
border-radius: $br-6;
|
||||
padding-inline: $sz-6;
|
||||
max-width: 100%;
|
||||
&:hover {
|
||||
--pill-bg-color: var(--color-token-background);
|
||||
--pill-fg-color: var(--color-foreground-primary);
|
||||
@@ -115,6 +119,9 @@
|
||||
}
|
||||
|
||||
.invisible-button {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
opacity: var(--opacity-button);
|
||||
|
||||
&:hover {
|
||||
|
||||
49
frontend/src/app/main/ui/ds/layers/layer_button.cljs
Normal file
49
frontend/src/app/main/ui/ds/layers/layer_button.cljs
Normal file
@@ -0,0 +1,49 @@
|
||||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
|
||||
(ns app.main.ui.ds.layers.layer-button
|
||||
(:require-macros
|
||||
[app.main.style :as stl])
|
||||
(:require
|
||||
[app.main.ui.ds.foundations.assets.icon :as i :refer [icon*]]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def ^:private schema:layer-button
|
||||
[:map
|
||||
[:label :string]
|
||||
[:description {:optional true} [:maybe :string]]
|
||||
[:class {:optional true} :string]
|
||||
[:expandable {:optional true} :boolean]
|
||||
[:expanded {:optional true} :boolean]
|
||||
[:icon {:optional true} :string]
|
||||
[:on-toggle-expand fn?]])
|
||||
|
||||
(mf/defc layer-button*
|
||||
{::mf/schema schema:layer-button}
|
||||
[{:keys [label description class is-expandable expanded icon on-toggle-expand children] :rest props}]
|
||||
(let [button-props (mf/spread-props props
|
||||
{:class [class (stl/css-case :layer-button true
|
||||
:layer-button--expandable is-expandable
|
||||
:layer-button--expanded expanded)]
|
||||
:type "button"
|
||||
:on-click on-toggle-expand})]
|
||||
[:div {:class (stl/css :layer-button-wrapper)}
|
||||
[:> "button" button-props
|
||||
[:div {:class (stl/css :layer-button-content)}
|
||||
(when is-expandable
|
||||
(if expanded
|
||||
[:> icon* {:icon-id i/arrow-down :class (stl/css :folder-node-icon)}]
|
||||
[:> icon* {:icon-id i/arrow-right :class (stl/css :folder-node-icon)}]))
|
||||
(when icon
|
||||
[:> icon* {:icon-id icon :class (stl/css :layer-button-icon)}])
|
||||
[:span {:class (stl/css :layer-button-name)}
|
||||
label]
|
||||
(when description
|
||||
[:span {:class (stl/css :layer-button-description)}
|
||||
description])
|
||||
[:span {:class (stl/css :layer-button-quantity)}]]]
|
||||
[:div {:class (stl/css :layer-button-actions)}
|
||||
children]]))
|
||||
56
frontend/src/app/main/ui/ds/layers/layer_button.scss
Normal file
56
frontend/src/app/main/ui/ds/layers/layer_button.scss
Normal file
@@ -0,0 +1,56 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/typography.scss" as *;
|
||||
@use "ds/colors.scss" as *;
|
||||
|
||||
.layer-button-wrapper {
|
||||
--layer-button-block-size: #{$sz-32};
|
||||
--layer-button-background: var(--color-background-primary);
|
||||
--layer-button-text: var(--color-foreground-secondary);
|
||||
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
block-size: var(--layer-button-block-size);
|
||||
|
||||
background: var(--layer-button-background);
|
||||
color: var(--layer-button-text);
|
||||
}
|
||||
|
||||
.layer-button {
|
||||
@include use-typography("body-small");
|
||||
|
||||
appearance: none;
|
||||
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
border: none;
|
||||
background: none;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.layer-button--expanded {
|
||||
& .layer-button-name {
|
||||
color: var(--color-foreground-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.layer-button-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--sp-xs);
|
||||
}
|
||||
|
||||
.layer-button-description {
|
||||
padding: var(--sp-xs);
|
||||
background-color: var(--color-background-tertiary);
|
||||
border-radius: $br-6;
|
||||
}
|
||||
@@ -159,4 +159,6 @@ $arrow-side: 12px;
|
||||
block-size: fit-content;
|
||||
inline-size: fit-content;
|
||||
line-height: 0;
|
||||
display: grid;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
[:div {:class (stl/css :modal-container)}
|
||||
[:div {:class (stl/css :modal-header)}
|
||||
[:h2 {:class (stl/css :modal-title)}
|
||||
(tr "files-download-modal.title")]
|
||||
(tr "dashboard.export.title")]
|
||||
[:button {:class (stl/css :modal-close-btn)
|
||||
:on-click on-cancel} deprecated-icon/close]]
|
||||
|
||||
@@ -129,8 +129,8 @@
|
||||
(= status :prepare)
|
||||
[:*
|
||||
[:div {:class (stl/css :modal-content)}
|
||||
[:p {:class (stl/css :modal-msg)} (tr "files-download-modal.description-1")]
|
||||
[:p {:class (stl/css :modal-scd-msg)} (tr "files-download-modal.description-2")]
|
||||
[:p {:class (stl/css :modal-msg)} (tr "dashboard.export.explain")]
|
||||
[:p {:class (stl/css :modal-scd-msg)} (tr "dashboard.export.detail")]
|
||||
|
||||
(for [type fexp/valid-types]
|
||||
[:div {:class (stl/css :export-option true)
|
||||
@@ -138,20 +138,20 @@
|
||||
[:label {:for (str "export-" type)
|
||||
:class (stl/css-case :global/checked (= selected type))}
|
||||
;; Execution time translation strings:
|
||||
;; (tr "files-download-modal.options.all.message")
|
||||
;; (tr "files-download-modal.options.all.title")
|
||||
;; (tr "files-download-modal.options.detach.message")
|
||||
;; (tr "files-download-modal.options.detach.title")
|
||||
;; (tr "files-download-modal.options.merge.message")
|
||||
;; (tr "files-download-modal.options.merge.title")
|
||||
;; (tr "dashboard.export.options.all.message")
|
||||
;; (tr "dashboard.export.options.all.title")
|
||||
;; (tr "dashboard.export.options.detach.message")
|
||||
;; (tr "dashboard.export.options.detach.title")
|
||||
;; (tr "dashboard.export.options.merge.message")
|
||||
;; (tr "dashboard.export.options.merge.title")
|
||||
[:span {:class (stl/css-case :global/checked (= selected type))}
|
||||
(when (= selected type)
|
||||
deprecated-icon/status-tick)]
|
||||
[:div {:class (stl/css :option-content)}
|
||||
[:h3 {:class (stl/css :modal-subtitle)}
|
||||
(tr (dm/str "files-download-modal.options." (d/name type) ".title"))]
|
||||
(tr (dm/str "dashboard.export.options." (d/name type) ".title"))]
|
||||
[:p {:class (stl/css :modal-msg)}
|
||||
(tr (dm/str "files-download-modal.options." (d/name type) ".message"))]]
|
||||
(tr (dm/str "dashboard.export.options." (d/name type) ".message"))]]
|
||||
|
||||
[:input {:type "radio"
|
||||
:class (stl/css :option-input)
|
||||
|
||||
@@ -12,17 +12,14 @@
|
||||
flex-direction: column;
|
||||
gap: var(--sp-l);
|
||||
width: 100%;
|
||||
max-height: calc(100vh - px2rem(128)); // TODO: Fix this hardcoded value
|
||||
height: calc(100vh - px2rem(128)); // TODO: Fix this hardcoded value
|
||||
padding-top: var(--sp-s);
|
||||
padding-inline: var(--sp-m);
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-gutter: stable;
|
||||
background-color: var(--low-emphasis-background);
|
||||
}
|
||||
|
||||
.workspace-element-options {
|
||||
max-height: calc(100vh - px2rem(180)); // TODO: Fix this hardcoded value
|
||||
height: calc(100vh - px2rem(200)); // TODO: Fix this hardcoded value
|
||||
padding-inline: var(--sp-m);
|
||||
background-color: var(--low-emphasis-background);
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (tr "inspect.attributes.blur")
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :blur-attr-title)}
|
||||
:class (stl/css :title-spacing-blur)}
|
||||
(when (= (count shapes) 1)
|
||||
[:> copy-button* {:data (css/get-css-property objects (first shapes) :filter)
|
||||
:class (stl/css :copy-btn-title)}])]
|
||||
|
||||
@@ -5,28 +5,17 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.blur-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-blur {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.blur-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
@@ -34,5 +23,5 @@
|
||||
}
|
||||
|
||||
.copy-btn-title {
|
||||
max-inline-size: $sz-28;
|
||||
max-width: deprecated.$s-28;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (tr "inspect.attributes.fill")
|
||||
:class (stl/css :title-wrapper)
|
||||
:class-title (stl/css :fill-attr-title)}]
|
||||
:class (stl/css :title-spacing-fill)}]
|
||||
|
||||
[:div {:class (stl/css :attributes-content)}
|
||||
(for [shape shapes]
|
||||
|
||||
@@ -5,30 +5,16 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.fill-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-fill {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.attributes-content {
|
||||
display: grid;
|
||||
gap: deprecated.$s-4;
|
||||
}
|
||||
|
||||
.attributes-fill-block {
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
@@ -44,8 +44,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (tr "inspect.attributes.size")
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :geometry-attr-title)}
|
||||
:class (stl/css :title-spacing-geometry)}
|
||||
|
||||
(when (= (count shapes) 1)
|
||||
[:> copy-button* {:data (css/get-shape-properties-css objects (first shapes) properties)
|
||||
|
||||
@@ -5,28 +5,17 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.geometry-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-geometry {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.geometry-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
@@ -34,5 +23,5 @@
|
||||
}
|
||||
|
||||
.copy-btn-title {
|
||||
max-inline-size: $sz-28;
|
||||
max-width: deprecated.$s-28;
|
||||
}
|
||||
|
||||
@@ -57,8 +57,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title "Layout"
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :layout-attr-title)}
|
||||
:class (stl/css :title-spacing-layout)}
|
||||
|
||||
(when (= (count shapes) 1)
|
||||
[:> copy-button* {:data (css/get-shape-properties-css objects (first shapes) properties)
|
||||
|
||||
@@ -5,28 +5,17 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.layout-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-layout {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.layout-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
@@ -34,5 +23,5 @@
|
||||
}
|
||||
|
||||
.copy-btn-title {
|
||||
max-inline-size: $sz-28;
|
||||
max-width: deprecated.$s-28;
|
||||
}
|
||||
|
||||
@@ -69,8 +69,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> title-bar* {:collapsable false
|
||||
:title menu-title
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :layout-element-attr-title)}
|
||||
:class (stl/css :title-spacing-layout-element)}
|
||||
(when (= (count shapes) 1)
|
||||
[:> copy-button* {:data (css/get-shape-properties-css objects (first shapes) properties)
|
||||
:class (stl/css :copy-btn-title)}])]
|
||||
|
||||
@@ -5,28 +5,17 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.layout-element-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-layout-element {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.layout-element-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
@@ -34,6 +23,5 @@
|
||||
}
|
||||
|
||||
.copy-btn-title {
|
||||
max-inline-size: $sz-28;
|
||||
max-inline-size: $sz-28;
|
||||
max-width: deprecated.$s-28;
|
||||
}
|
||||
|
||||
@@ -63,8 +63,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (tr "inspect.attributes.shadow")
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :shadow-attr-title)}]
|
||||
:class (stl/css :title-spacing-shadow)}]
|
||||
|
||||
[:div {:class (stl/css :attributes-content)}
|
||||
(for [shape shapes]
|
||||
|
||||
@@ -5,28 +5,17 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.shadow-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-shadow {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.shadow-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
|
||||
@@ -88,8 +88,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (tr "inspect.attributes.stroke")
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :stroke-attr-title)}]
|
||||
:class (stl/css :title-spacing-stroke)}]
|
||||
|
||||
[:div {:class (stl/css :attributes-content)}
|
||||
(for [shape shapes]
|
||||
|
||||
@@ -5,34 +5,21 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.stroke-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-stroke {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.attributes-stroke-block {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-xs);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.stroke-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
@@ -41,5 +28,5 @@
|
||||
|
||||
.attributes-content {
|
||||
display: grid;
|
||||
gap: var(--sp-xs);
|
||||
gap: deprecated.$s-4;
|
||||
}
|
||||
|
||||
@@ -54,6 +54,5 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (tr "workspace.sidebar.options.svg-attrs.title")
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :svg-attr-title)}]
|
||||
:class (stl/css :title-spacing-svg)}]
|
||||
[:& svg-block {:shape shape}]])))
|
||||
|
||||
@@ -5,29 +5,17 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/typography.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.svg-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-svg {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.svg-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
@@ -35,12 +23,12 @@
|
||||
}
|
||||
|
||||
.attributes-subtitle {
|
||||
@include use-typography("headline-small");
|
||||
@include deprecated.uppercaseTitleTipography;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
block-size: $sz-32;
|
||||
height: deprecated.$s-32;
|
||||
span {
|
||||
block-size: $sz-32;
|
||||
height: deprecated.$s-32;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@@ -157,8 +157,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (tr "inspect.attributes.typography")
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :text-atrr-title)}]
|
||||
:class (stl/css :title-spacing-text)}]
|
||||
|
||||
(for [shape shapes]
|
||||
[:& text-block {:shape shape
|
||||
|
||||
@@ -5,37 +5,23 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
@use "ds/_utils.scss" as *;
|
||||
@use "ds/typography.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.text-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-text {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.attributes-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: var(--sp-xs);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.text-row {
|
||||
@extend .attr-row;
|
||||
block-size: unset;
|
||||
min-block-size: $sz-36;
|
||||
height: unset;
|
||||
min-height: deprecated.$s-32;
|
||||
:global(.attr-value) {
|
||||
align-items: center;
|
||||
}
|
||||
@@ -46,20 +32,20 @@
|
||||
}
|
||||
|
||||
.attributes-content-row {
|
||||
max-inline-size: px2rem(240);
|
||||
min-block-size: px2rem(34);
|
||||
border-radius: $br-8;
|
||||
border: $b-1 solid var(--menu-border-color-disabled);
|
||||
margin-block-start: var(--sp-xs);
|
||||
max-width: deprecated.$s-240;
|
||||
min-height: calc(deprecated.$s-2 + deprecated.$s-32);
|
||||
border-radius: deprecated.$br-8;
|
||||
border: deprecated.$s-1 solid var(--menu-border-color-disabled);
|
||||
margin-top: deprecated.$s-4;
|
||||
.content {
|
||||
@include use-typography("body-small");
|
||||
@include deprecated.bodySmallTypography;
|
||||
width: 100%;
|
||||
padding: var(--sp-xs) 0;
|
||||
padding: deprecated.$s-4 0;
|
||||
color: var(--color-foreground-secondary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border: $b-1 solid var(--color-background-tertiary);
|
||||
border: deprecated.$s-1 solid var(--color-background-tertiary);
|
||||
background-color: var(--menu-background-color);
|
||||
.content {
|
||||
color: var(--menu-foreground-color-hover);
|
||||
|
||||
@@ -42,8 +42,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title (if is-container? (tr "inspect.attributes.variants") (tr "inspect.attributes.variant"))
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :variant-attr-title)}]
|
||||
:class (stl/css :title-spacing-variant)}]
|
||||
|
||||
(for [[pos property] (map-indexed vector properties)]
|
||||
[:> variant-block* {:key (dm/str "variant-property-" pos) :name (:name property) :value (:value property)}])]))
|
||||
|
||||
@@ -5,29 +5,18 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.variant-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-variant {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.variant-row {
|
||||
@extend .attr-row;
|
||||
block-size: fit-content;
|
||||
min-block-size: $sz-36;
|
||||
height: fit-content;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
|
||||
@@ -51,8 +51,7 @@
|
||||
[:div {:class (stl/css :attributes-block)}
|
||||
[:> inspect-title-bar*
|
||||
{:title "Visibility"
|
||||
:class (stl/css :title-wrapper)
|
||||
:title-class (stl/css :visibility-attr-title)}
|
||||
:class (stl/css :title-spacing-visibility)}
|
||||
|
||||
(when (= (count shapes) 1)
|
||||
[:> copy-button* {:data (css/get-shape-properties-css objects (first shapes) properties)
|
||||
|
||||
@@ -5,28 +5,17 @@
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "ds/_borders.scss" as *;
|
||||
@use "ds/_sizes.scss" as *;
|
||||
|
||||
.attributes-block {
|
||||
--box-border-color: var(--color-background-primary);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-block-end: $b-2 solid var(--box-border-color);
|
||||
@include deprecated.flexColumn;
|
||||
}
|
||||
|
||||
.title-wrapper {
|
||||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
.visibility-attr-title {
|
||||
color: var(--entry-foreground-color-hover);
|
||||
padding-block: var(--sp-s);
|
||||
.title-spacing-visibility {
|
||||
@extend .attr-title;
|
||||
}
|
||||
|
||||
.visibility-row {
|
||||
@extend .attr-row;
|
||||
block-size: $sz-36;
|
||||
}
|
||||
|
||||
.button-children {
|
||||
@@ -34,5 +23,5 @@
|
||||
}
|
||||
|
||||
.copy-btn-title {
|
||||
max-inline-size: $sz-28;
|
||||
max-width: deprecated.$s-28;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,6 @@
|
||||
[:> styles-tab* {:color-space color-space
|
||||
:objects objects
|
||||
:shapes shapes
|
||||
:from from
|
||||
:libraries libraries
|
||||
:file-id file-id}]
|
||||
:computed
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.viewer-code {
|
||||
padding-inline-start: var(--sp-s);
|
||||
}
|
||||
|
||||
.tool-windows {
|
||||
block-size: 100%;
|
||||
display: grid;
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
:multiple))
|
||||
|
||||
(mf/defc styles-tab*
|
||||
[{:keys [color-space shapes libraries objects file-id from]}]
|
||||
[{:keys [color-space shapes libraries objects file-id]}]
|
||||
(let [data (dm/get-in libraries [file-id :data])
|
||||
first-shape (first shapes)
|
||||
first-component (ctkl/get-component data (:component-id first-shape))
|
||||
@@ -131,8 +131,7 @@
|
||||
(mf/deps shorthands*)
|
||||
(fn [shorthand]
|
||||
(swap! shorthands* assoc (:panel shorthand) (:property shorthand))))]
|
||||
[:ol {:class (stl/css-case :styles-tab true
|
||||
:styles-tab-workspace (= from :workspace)) :aria-label (tr "labels.styles")}
|
||||
[:ol {:class (stl/css :styles-tab) :aria-label (tr "labels.styles")}
|
||||
;; TOKENS PANEL
|
||||
(when (or (seq active-themes) (seq active-sets))
|
||||
[:li
|
||||
|
||||
@@ -7,9 +7,5 @@
|
||||
@use "ds/_utils.scss" as *;
|
||||
|
||||
.styles-tab {
|
||||
block-size: calc(100vh - px2rem(140)); // TODO: Fix this hardcoded value
|
||||
}
|
||||
|
||||
.styles-tab-workspace {
|
||||
block-size: calc(100vh - px2rem(180)); // TODO: Fix this hardcoded value
|
||||
block-size: calc(100vh - px2rem(200)); // TODO: Fix this hardcoded value
|
||||
}
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
}
|
||||
|
||||
.property-detail-text {
|
||||
@include use-typography("body-small");
|
||||
color: var(--detail-color);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
(case type
|
||||
:variant (tr "inspect.tabs.styles.variants-panel")
|
||||
:token (tr "inspect.tabs.styles.token-panel")
|
||||
:geometry (tr "inspect.attributes.size")
|
||||
:geometry (tr "inspect.tabs.styles.geometry-panel")
|
||||
:fill (tr "labels.fill")
|
||||
:stroke (tr "labels.stroke")
|
||||
:text (tr "labels.text")
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: var(--title-gap);
|
||||
padding-block: var(--title-padding);
|
||||
}
|
||||
|
||||
.disclosure-button {
|
||||
@@ -51,5 +52,4 @@
|
||||
@include use-typography("headline-small");
|
||||
flex: 1;
|
||||
color: var(--title-color);
|
||||
padding-block: var(--title-padding);
|
||||
}
|
||||
|
||||
@@ -148,12 +148,11 @@
|
||||
(mf/use-fn
|
||||
(mf/deps index prefix is-move)
|
||||
(fn [event]
|
||||
(when (dom/left-mouse? event)
|
||||
(dom/stop-propagation event)
|
||||
(dom/prevent-default event)
|
||||
(dom/stop-propagation event)
|
||||
(dom/prevent-default event)
|
||||
|
||||
(when ^boolean is-move
|
||||
(st/emit! (drp/start-move-handler index prefix))))))]
|
||||
(when ^boolean is-move
|
||||
(st/emit! (drp/start-move-handler index prefix)))))]
|
||||
|
||||
[:g.handler {:pointer-events (if ^boolean is-draw "none" "visible")}
|
||||
[:line
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
modifiers (dm/get-in modifiers [shape-id :modifiers])
|
||||
|
||||
shape (gsh/transform-shape shape modifiers)
|
||||
props (mf/spread-props props {:shape shape :file-id file-id :page-id page-id :libraries libraries})]
|
||||
props (mf/spread-props props {:shape shape :file-id file-id :page-id page-id})]
|
||||
|
||||
(case shape-type
|
||||
:frame [:> frame/options* props]
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
(:require
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.types.shape.radius :as ctsr]
|
||||
[app.common.types.token :as tk]
|
||||
[app.main.data.workspace.shapes :as dwsh]
|
||||
[app.main.data.workspace.tokens.application :as dwta]
|
||||
[app.main.features :as features]
|
||||
[app.main.store :as st]
|
||||
[app.main.ui.components.numeric-input :as deprecated-input]
|
||||
[app.main.ui.context :as muc]
|
||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||
[app.main.ui.ds.controls.numeric-input :refer [numeric-input*]]
|
||||
[app.main.ui.ds.foundations.assets.icon :refer [icon*] :as i]
|
||||
[app.main.ui.hooks :as hooks]
|
||||
[app.util.i18n :as i18n :refer [tr]]
|
||||
@@ -21,11 +26,17 @@
|
||||
(defn- check-border-radius-menu-props
|
||||
[old-props new-props]
|
||||
(let [old-values (unchecked-get old-props "values")
|
||||
new-values (unchecked-get new-props "values")]
|
||||
new-values (unchecked-get new-props "values")
|
||||
old-applied-tokens (unchecked-get old-props "applied-tokens")
|
||||
new-applied-tokens (unchecked-get new-props "applied-tokens")]
|
||||
(and (identical? (unchecked-get old-props "class")
|
||||
(unchecked-get new-props "class"))
|
||||
(identical? (unchecked-get old-props "ids")
|
||||
(unchecked-get new-props "ids"))
|
||||
(identical? (unchecked-get old-props "shapes")
|
||||
(unchecked-get new-props "shapes"))
|
||||
(identical? old-applied-tokens
|
||||
new-applied-tokens)
|
||||
(identical? (get old-values :r1)
|
||||
(get new-values :r1))
|
||||
(identical? (get old-values :r2)
|
||||
@@ -35,13 +46,101 @@
|
||||
(identical? (get old-values :r4)
|
||||
(get new-values :r4)))))
|
||||
|
||||
(mf/defc numeric-input-wrapper*
|
||||
{::mf/private true}
|
||||
[{:keys [values name applied-tokens align on-detach radius] :rest props}]
|
||||
(let [tokens (mf/use-ctx muc/active-tokens-by-type)
|
||||
tokens (mf/with-memo [tokens name]
|
||||
(delay
|
||||
(-> (deref tokens)
|
||||
(select-keys (get tk/tokens-by-input name))
|
||||
(not-empty))))
|
||||
|
||||
on-detach-attr
|
||||
(mf/use-fn
|
||||
(mf/deps on-detach name)
|
||||
#(on-detach % name))
|
||||
|
||||
r1-value (get applied-tokens :r1)
|
||||
all-token-equal? (all-equal? applied-tokens)
|
||||
all-values-equal? (all-equal? values)
|
||||
|
||||
applied-token (cond
|
||||
(not (seq applied-tokens))
|
||||
nil
|
||||
|
||||
(and (= radius :all) (or (not all-values-equal?) (not all-token-equal?)))
|
||||
:multiple
|
||||
|
||||
(and all-token-equal? all-values-equal? (= radius :all))
|
||||
r1-value
|
||||
|
||||
:else
|
||||
(get applied-tokens radius))
|
||||
|
||||
|
||||
props (mf/spread-props props
|
||||
{:placeholder (if (or (= :multiple (:applied-tokens values))
|
||||
(= :multiple (get values name)))
|
||||
(tr "settings.multiple")
|
||||
"--")
|
||||
:applied-token applied-token
|
||||
:tokens (if (delay? tokens) @tokens tokens)
|
||||
:align align
|
||||
:on-detach on-detach-attr
|
||||
:value values})]
|
||||
[:> numeric-input* props]))
|
||||
|
||||
(mf/defc border-radius-menu*
|
||||
{::mf/wrap [#(mf/memo' % check-border-radius-menu-props)]}
|
||||
[{:keys [class ids values]}]
|
||||
(let [all-equal? (all-equal? values)
|
||||
[{:keys [class ids values applied-tokens shapes shape]}]
|
||||
(let [token-numeric-inputs
|
||||
(features/use-feature "tokens/numeric-input")
|
||||
|
||||
all-values-equal? (all-equal? values)
|
||||
|
||||
radius-expanded* (mf/use-state false)
|
||||
radius-expanded (deref radius-expanded*)
|
||||
|
||||
;; DETACH
|
||||
on-detach-token
|
||||
(mf/use-fn
|
||||
(mf/deps ids)
|
||||
(fn [token attr]
|
||||
(st/emit! (dwta/unapply-token {:token (first token)
|
||||
:attributes #{attr}
|
||||
:shape-ids ids}))))
|
||||
|
||||
on-detach-all
|
||||
(mf/use-fn
|
||||
(mf/deps on-detach-token)
|
||||
(fn [token]
|
||||
(run! #(on-detach-token token %) [:r1 :r2 :r3 :r4])))
|
||||
|
||||
on-detach-r1
|
||||
(mf/use-fn
|
||||
(mf/deps on-detach-token)
|
||||
(fn [token]
|
||||
(on-detach-token token :r1)))
|
||||
|
||||
on-detach-r2
|
||||
(mf/use-fn
|
||||
(mf/deps on-detach-token)
|
||||
(fn [token]
|
||||
(on-detach-token token :r2)))
|
||||
|
||||
on-detach-r3
|
||||
(mf/use-fn
|
||||
(mf/deps on-detach-token)
|
||||
(fn [token]
|
||||
(on-detach-token token :r3)))
|
||||
|
||||
on-detach-r4
|
||||
(mf/use-fn
|
||||
(mf/deps on-detach-token)
|
||||
(fn [token]
|
||||
(on-detach-token token :r4)))
|
||||
|
||||
change-radius
|
||||
(mf/use-fn
|
||||
(mf/deps ids)
|
||||
@@ -53,6 +152,18 @@
|
||||
shape))
|
||||
{:reg-objects? true
|
||||
:attrs [:r1 :r2 :r3 :r4]})))
|
||||
|
||||
change-one-radius
|
||||
(mf/use-fn
|
||||
(mf/deps ids)
|
||||
(fn [update-fn attr]
|
||||
(dwsh/update-shapes ids
|
||||
(fn [shape]
|
||||
(if (ctsr/has-radius? shape)
|
||||
(update-fn shape)
|
||||
shape))
|
||||
{:reg-objects? true
|
||||
:attrs [attr]})))
|
||||
|
||||
toggle-radius-mode
|
||||
(mf/use-fn
|
||||
@@ -60,25 +171,53 @@
|
||||
(fn []
|
||||
(swap! radius-expanded* not)))
|
||||
|
||||
on-single-radius-change
|
||||
do-all-radius-change
|
||||
(mf/use-fn
|
||||
(mf/deps ids change-radius)
|
||||
(mf/deps change-radius)
|
||||
(fn [value]
|
||||
(st/emit!
|
||||
(change-radius (fn [shape]
|
||||
(ctsr/set-radius-to-all-corners shape value))))))
|
||||
|
||||
|
||||
on-radius-4-change
|
||||
on-all-radius-change
|
||||
(mf/use-fn
|
||||
(mf/deps ids change-radius)
|
||||
(fn [value attr]
|
||||
(st/emit! (change-radius #(ctsr/set-radius-to-single-corner % attr value)))))
|
||||
(mf/deps do-all-radius-change ids)
|
||||
(fn [value]
|
||||
(prn "entro en el all?")
|
||||
(if (or (string? value) (number? value))
|
||||
(do-all-radius-change value)
|
||||
(do
|
||||
(let [resolved-value (:resolved-value (first value))]
|
||||
(st/emit! (dwta/toggle-token {:token (first value)
|
||||
:attrs #{:r1 :r2 :r3 :r4}
|
||||
:shape-ids ids}))
|
||||
(do-all-radius-change resolved-value))))))
|
||||
|
||||
on-radius-r1-change #(on-radius-4-change % :r1)
|
||||
on-radius-r2-change #(on-radius-4-change % :r2)
|
||||
on-radius-r3-change #(on-radius-4-change % :r3)
|
||||
on-radius-r4-change #(on-radius-4-change % :r4)
|
||||
do-single-radius-change
|
||||
(mf/use-fn
|
||||
(mf/deps change-radius)
|
||||
(fn [value attr]
|
||||
(prn "entro")
|
||||
(st/emit! (change-one-radius #(ctsr/set-radius-to-single-corner % attr value) attr))))
|
||||
|
||||
on-single-radius-change
|
||||
(mf/use-fn
|
||||
(mf/deps do-all-radius-change ids)
|
||||
(fn [value attr]
|
||||
(prn "entro por on-sigle-change" attr)
|
||||
(if (or (string? value) (number? value))
|
||||
(do-single-radius-change value attr)
|
||||
(do
|
||||
(let [resolved-value (:resolved-value (first value))]
|
||||
(st/emit! (dwta/toggle-token {:token (first value)
|
||||
:attrs #{attr}
|
||||
:shape-ids ids}))
|
||||
(do-single-radius-change resolved-value attr))))))
|
||||
|
||||
on-radius-r1-change #(on-single-radius-change % :r1)
|
||||
on-radius-r2-change #(on-single-radius-change % :r2)
|
||||
on-radius-r3-change #(on-single-radius-change % :r3)
|
||||
on-radius-r4-change #(on-single-radius-change % :r4)
|
||||
|
||||
expand-stream
|
||||
(mf/with-memo []
|
||||
@@ -94,56 +233,136 @@
|
||||
|
||||
[:div {:class (dm/str class " " (stl/css :radius))}
|
||||
(if (not radius-expanded)
|
||||
[:div {:class (stl/css :radius-1)
|
||||
:title (tr "workspace.options.radius")}
|
||||
[:> icon* {:icon-id i/corner-radius
|
||||
:size "s"
|
||||
:class (stl/css :icon)}]
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder (cond
|
||||
(not all-equal?)
|
||||
(tr "settings.multiple")
|
||||
(= :multiple (:r1 values))
|
||||
(tr "settings.multiple")
|
||||
:else
|
||||
"--")
|
||||
:min 0
|
||||
:nillable true
|
||||
:on-change on-single-radius-change
|
||||
:value (if all-equal? (:r1 values) nil)}]]
|
||||
|
||||
[:div {:class (stl/css :radius-4)}
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-top-left")
|
||||
(if token-numeric-inputs
|
||||
[:> numeric-input-wrapper*
|
||||
{:on-change on-all-radius-change
|
||||
:on-detach on-detach-all
|
||||
:icon i/corner-radius
|
||||
:min 0
|
||||
:on-change on-radius-r1-change
|
||||
:value (:r1 values)}]]
|
||||
:name :border-radius
|
||||
:nillable true
|
||||
:property (tr "workspace.options.radius")
|
||||
:class (stl/css :radius-wrapper)
|
||||
:applied-tokens applied-tokens
|
||||
:radius :all
|
||||
:align :right
|
||||
:values (if all-values-equal?
|
||||
(if (nil? (:r1 values))
|
||||
0
|
||||
(:r1 values))
|
||||
nil)}]
|
||||
|
||||
[:div {:class (stl/css :radius-1)
|
||||
:title (tr "workspace.options.radius")}
|
||||
[:> icon* {:icon-id i/corner-radius
|
||||
:size "s"
|
||||
:class (stl/css :icon)}]
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder (cond
|
||||
(not all-values-equal?)
|
||||
(tr "settings.multiple")
|
||||
(= :multiple (:r1 values))
|
||||
(tr "settings.multiple")
|
||||
:else
|
||||
"--")
|
||||
:min 0
|
||||
:nillable true
|
||||
:on-change on-all-radius-change
|
||||
:value (if all-values-equal?
|
||||
(if (nil? (:r1 values))
|
||||
0
|
||||
(:r1 values))
|
||||
nil)}]])
|
||||
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-top-right")
|
||||
:min 0
|
||||
:on-change on-radius-r2-change
|
||||
:value (:r2 values)}]]
|
||||
(if token-numeric-inputs
|
||||
[:div {:class (stl/css :radius-4)}
|
||||
[:> numeric-input-wrapper*
|
||||
{:on-change on-radius-r1-change
|
||||
:on-detach on-detach-r1
|
||||
:min 0
|
||||
:name :border-radius
|
||||
:property (tr "workspace.options.radius-top-left")
|
||||
:applied-tokens applied-tokens
|
||||
:radius :r1
|
||||
:align :right-adjust
|
||||
:class (stl/css :radius-wrapper :dropdown-adjustment)
|
||||
:inner-class (stl/css :no-icon-input)
|
||||
:values (:r1 values)}]
|
||||
|
||||
[:> numeric-input-wrapper*
|
||||
{:on-change on-radius-r2-change
|
||||
:on-detach on-detach-r2
|
||||
:min 0
|
||||
:name :border-radius
|
||||
:nillable true
|
||||
:property (tr "workspace.options.radius-top-right")
|
||||
:applied-tokens applied-tokens
|
||||
:align :right
|
||||
:class (stl/css :radius-wrapper)
|
||||
:inner-class (stl/css :no-icon-input)
|
||||
:radius :r2
|
||||
:values (:r2 values)}]
|
||||
|
||||
[:> numeric-input-wrapper*
|
||||
{:on-change on-radius-r4-change
|
||||
:on-detach on-detach-r4
|
||||
:min 0
|
||||
:name :border-radius
|
||||
:nillable true
|
||||
:property (tr "workspace.options.radius-bottom-left")
|
||||
:applied-tokens applied-tokens
|
||||
:class (stl/css :radius-wrapper :dropdown-adjustment)
|
||||
:inner-class (stl/css :no-icon-input)
|
||||
:radius :r4
|
||||
:align :right-adjust
|
||||
:values (:r4 values)}]
|
||||
|
||||
[:> numeric-input-wrapper*
|
||||
{:on-change on-radius-r3-change
|
||||
:on-detach on-detach-r3
|
||||
:min 0
|
||||
:name :border-radius
|
||||
:nillable true
|
||||
:property (tr "workspace.options.radius-bottom-right")
|
||||
:applied-tokens applied-tokens
|
||||
:radius :r3
|
||||
:align :right
|
||||
:class (stl/css :radius-wrapper)
|
||||
:inner-class (stl/css :no-icon-input)
|
||||
:values (:r3 values)}]]
|
||||
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-bottom-left")
|
||||
:min 0
|
||||
:on-change on-radius-r4-change
|
||||
:value (:r4 values)}]]
|
||||
[:div {:class (stl/css :radius-4)}
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-top-left")
|
||||
:min 0
|
||||
:on-change on-radius-r1-change
|
||||
:value (:r1 values)}]]
|
||||
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-bottom-right")
|
||||
:min 0
|
||||
:on-change on-radius-r3-change
|
||||
:value (:r3 values)}]]])
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-top-right")
|
||||
:min 0
|
||||
:on-change on-radius-r2-change
|
||||
:value (:r2 values)}]]
|
||||
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-bottom-left")
|
||||
:min 0
|
||||
:on-change on-radius-r4-change
|
||||
:value (:r4 values)}]]
|
||||
|
||||
[:div {:class (stl/css :small-input)}
|
||||
[:> deprecated-input/numeric-input*
|
||||
{:placeholder "--"
|
||||
:title (tr "workspace.options.radius-bottom-right")
|
||||
:min 0
|
||||
:on-change on-radius-r3-change
|
||||
:value (:r3 values)}]]]))
|
||||
|
||||
[:> icon-button* {:class (stl/css-case :selected radius-expanded)
|
||||
:variant "ghost"
|
||||
|
||||
@@ -37,3 +37,15 @@
|
||||
.icon {
|
||||
margin-inline: deprecated.$s-4;
|
||||
}
|
||||
|
||||
.radius-wrapper {
|
||||
--dropdown-width: var(--7-columns-dropdown-width);
|
||||
}
|
||||
|
||||
.no-icon-input {
|
||||
padding-inline-start: 6px;
|
||||
}
|
||||
|
||||
.dropdown-adjustment {
|
||||
--dropdown-adjustment: -68px;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
(nil? (get values name)))
|
||||
(tr "settings.multiple")
|
||||
"--")
|
||||
:class (stl/css :numeric-input-measures)
|
||||
:class (stl/css :numeric-input-layout)
|
||||
:applied-token (get applied-tokens name)
|
||||
:tokens tokens
|
||||
:align align
|
||||
|
||||
@@ -433,6 +433,6 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.numeric-input-measures {
|
||||
.numeric-input-layout {
|
||||
--dropdown-width: var(--7-columns-dropdown-width);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
@use "refactor/common-refactor.scss" as deprecated;
|
||||
@use "../../../sidebar/common/sidebar.scss" as sidebar;
|
||||
@use "ds/_utils.scss" as *;
|
||||
|
||||
.element-set {
|
||||
display: grid;
|
||||
@@ -188,7 +189,6 @@
|
||||
@extend .button-icon;
|
||||
}
|
||||
|
||||
// TODO: Add a proper variable to this sizing
|
||||
.numeric-input-measures {
|
||||
--dropdown-width: var(--7-columns-dropdown-width);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,39 @@
|
||||
[(seq (array/sort! empty))
|
||||
(seq (array/sort! filled))]))))
|
||||
|
||||
(mf/defc selected-set-info*
|
||||
{::mf/private true}
|
||||
[{:keys [tokens-lib selected-token-set-id]}]
|
||||
(let [selected-token-set
|
||||
(mf/with-memo [tokens-lib]
|
||||
(when selected-token-set-id
|
||||
(some-> tokens-lib (ctob/get-set selected-token-set-id))))
|
||||
|
||||
active-token-sets-names
|
||||
(mf/with-memo [tokens-lib]
|
||||
(some-> tokens-lib (ctob/get-active-themes-set-names)))
|
||||
|
||||
token-set-active?
|
||||
(mf/use-fn
|
||||
(mf/deps active-token-sets-names)
|
||||
(fn [name]
|
||||
(contains? active-token-sets-names name)))]
|
||||
[:div {:class (stl/css :sets-header-container)}
|
||||
[:> text* {:as "span"
|
||||
:typography "headline-small"
|
||||
:class (stl/css :sets-header)}
|
||||
(tr "workspace.tokens.tokens-section-title" (ctob/get-name selected-token-set))]
|
||||
[:div {:class (stl/css :sets-header-status) :title (tr "workspace.tokens.inactive-set-description")}
|
||||
;; NOTE: when no set in tokens-lib, the selected-token-set-id
|
||||
;; will be `nil`, so for properly hide the inactive message we
|
||||
;; check that at least `selected-token-set-id` has a value
|
||||
(when (and (some? selected-token-set-id)
|
||||
(not (token-set-active? (ctob/get-name selected-token-set))))
|
||||
[:*
|
||||
[:> icon* {:class (stl/css :sets-header-status-icon) :icon-id i/eye-off}]
|
||||
[:> text* {:as "span" :typography "body-small" :class (stl/css :sets-header-status-text)}
|
||||
(tr "workspace.tokens.inactive-set")]])]]))
|
||||
|
||||
(mf/defc tokens-section*
|
||||
{::mf/private true}
|
||||
[{:keys [tokens-lib active-tokens resolved-active-tokens]}]
|
||||
@@ -65,9 +98,7 @@
|
||||
selected-token-set-id
|
||||
(mf/deref refs/selected-token-set-id)
|
||||
|
||||
selected-token-set
|
||||
(when selected-token-set-id
|
||||
(some-> tokens-lib (ctob/get-set selected-token-set-id)))
|
||||
|
||||
|
||||
;; If we have not selected any set explicitly we just
|
||||
;; select the first one from the list of sets
|
||||
@@ -92,15 +123,9 @@
|
||||
tokens)]
|
||||
(ctob/group-by-type tokens)))
|
||||
|
||||
active-token-sets-names
|
||||
(mf/with-memo [tokens-lib]
|
||||
(some-> tokens-lib (ctob/get-active-themes-set-names)))
|
||||
|
||||
token-set-active?
|
||||
(mf/use-fn
|
||||
(mf/deps active-token-sets-names)
|
||||
(fn [name]
|
||||
(contains? active-token-sets-names name)))
|
||||
|
||||
|
||||
|
||||
[empty-group filled-group]
|
||||
(mf/with-memo [tokens-by-type]
|
||||
@@ -118,34 +143,27 @@
|
||||
|
||||
[:*
|
||||
[:& token-context-menu]
|
||||
[:div {:class (stl/css :sets-header-container)}
|
||||
[:> text* {:as "span" :typography "headline-small" :class (stl/css :sets-header)} (tr "workspace.tokens.tokens-section-title" (ctob/get-name selected-token-set))]
|
||||
[:div {:class (stl/css :sets-header-status) :title (tr "workspace.tokens.inactive-set-description")}
|
||||
;; NOTE: when no set in tokens-lib, the selected-token-set-id
|
||||
;; will be `nil`, so for properly hide the inactive message we
|
||||
;; check that at least `selected-token-set-id` has a value
|
||||
(when (and (some? selected-token-set-id)
|
||||
(not (token-set-active? (ctob/get-name selected-token-set))))
|
||||
[:*
|
||||
[:> icon* {:class (stl/css :sets-header-status-icon) :icon-id i/eye-off}]
|
||||
[:> text* {:as "span" :typography "body-small" :class (stl/css :sets-header-status-text)}
|
||||
(tr "workspace.tokens.inactive-set")]])]]
|
||||
|
||||
[:& selected-set-info* {:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}]
|
||||
|
||||
(for [type filled-group]
|
||||
(let [tokens (get tokens-by-type type)]
|
||||
[:> token-group* {:key (name type)
|
||||
:is-open (get open-status type false)
|
||||
:tokens tokens
|
||||
:is-expanded (get open-status type false)
|
||||
:type type
|
||||
:selected-ids selected
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens resolved-active-tokens
|
||||
:tokens tokens}]))
|
||||
:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}]))
|
||||
|
||||
(for [type empty-group]
|
||||
[:> token-group* {:key (name type)
|
||||
:tokens []
|
||||
:type type
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout :is-selected-inside-layout
|
||||
:active-theme-tokens resolved-active-tokens
|
||||
:tokens []}])]))
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens resolved-active-tokens}])]))
|
||||
|
||||
@@ -349,7 +349,6 @@
|
||||
(let [form (mf/use-ctx fc/context)
|
||||
input-name name
|
||||
|
||||
|
||||
error
|
||||
(get-in @form [:errors :value value-subfield index input-name])
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
on-change
|
||||
(mf/use-fn
|
||||
(mf/deps input-name)
|
||||
(fn [id]
|
||||
(let [is-inner? (= id "inner")]
|
||||
(fn [type]
|
||||
(let [is-inner? (= type "inner")]
|
||||
(swap! form assoc-in [:data :value indexed-type index input-name] is-inner?))))
|
||||
|
||||
props (mf/spread-props props {:default-selected (if value "inner" "drop")
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
[token index prop value-subfield]
|
||||
(let [value (get-in token [:value value-subfield index prop])]
|
||||
(d/without-nils
|
||||
{:type (if (= prop :color) :color :dimensions)
|
||||
{:type (if (= prop :color) :color :number)
|
||||
:value value})))
|
||||
|
||||
(mf/defc shadow-formset*
|
||||
@@ -114,7 +114,7 @@
|
||||
:token inset-token
|
||||
:tokens tokens
|
||||
:index index
|
||||
:indexed-type value-subfield
|
||||
:value-subfield value-subfield
|
||||
:name :inset}]
|
||||
(when show-button
|
||||
[:> icon-button* {:variant "ghost"
|
||||
@@ -269,25 +269,13 @@
|
||||
|
||||
[:value
|
||||
[:map
|
||||
[:shadow {:optional true}
|
||||
[:shadow {:optinal true}
|
||||
[:vector
|
||||
[:map
|
||||
[:offset-x {:optional true} [:maybe :string]]
|
||||
[:offset-y {:optional true} [:maybe :string]]
|
||||
[:blur {:optional true}
|
||||
[:and
|
||||
[:maybe :string]
|
||||
[:fn {:error/fn #(tr "workspace.tokens.shadow-token-blur-value-error")}
|
||||
(fn [blur]
|
||||
(let [n (d/parse-double blur)]
|
||||
(or (nil? n) (not (< n 0)))))]]]
|
||||
[:spread {:optional true}
|
||||
[:and
|
||||
[:maybe :string]
|
||||
[:fn {:error/fn #(tr "workspace.tokens.shadow-token-spread-value-error")}
|
||||
(fn [spread]
|
||||
(let [n (d/parse-double spread)]
|
||||
(or (nil? n) (not (< n 0)))))]]]
|
||||
[:blur {:optional true} [:maybe :string]]
|
||||
[:spread {:optional true} [:maybe :string]]
|
||||
[:color {:optional true} [:maybe :string]]
|
||||
[:color-result {:optional true} ::sm/any]
|
||||
[:inset {:optional true} [:maybe :boolean]]]]]
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
(ns app.main.ui.workspace.tokens.management.group
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.data :as d]
|
||||
[app.common.data.macros :as dm]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.data.modal :as modal]
|
||||
[app.main.data.workspace.tokens.application :as dwta]
|
||||
[app.main.data.workspace.tokens.library-edit :as dwtl]
|
||||
@@ -16,51 +19,70 @@
|
||||
[app.main.ui.context :as ctx]
|
||||
[app.main.ui.ds.buttons.icon-button :refer [icon-button*]]
|
||||
[app.main.ui.ds.foundations.assets.icon :as i]
|
||||
[app.main.ui.workspace.sidebar.assets.common :as cmm]
|
||||
[app.main.ui.workspace.tokens.management.token-pill :refer [token-pill*]]
|
||||
[app.main.ui.ds.layers.layer-button :refer [layer-button*]]
|
||||
[app.main.ui.workspace.tokens.management.token-tree :refer [token-tree*]]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.i18n :refer [tr]]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
|
||||
(defn token-section-icon
|
||||
[type]
|
||||
(case type
|
||||
:border-radius "corner-radius"
|
||||
:color "drop"
|
||||
:boolean "boolean-difference"
|
||||
:font-family "text-font-family"
|
||||
:font-size "text-font-size"
|
||||
:letter-spacing "text-letterspacing"
|
||||
:text-case "text-mixed"
|
||||
:text-decoration "text-underlined"
|
||||
:font-weight "text-font-weight"
|
||||
:typography "text-typography"
|
||||
:opacity "percentage"
|
||||
:number "number"
|
||||
:rotation "rotation"
|
||||
:spacing "padding-extended"
|
||||
:string "text-mixed"
|
||||
:stroke-width "stroke-size"
|
||||
:dimensions "expand"
|
||||
:sizing "expand"
|
||||
:shadow "drop-shadow"
|
||||
:border-radius i/corner-radius
|
||||
:color i/drop
|
||||
:boolean i/boolean-difference
|
||||
:font-family i/text-font-family
|
||||
:font-size i/text-font-size
|
||||
:letter-spacing i/text-letterspacing
|
||||
:text-case i/text-mixed
|
||||
:text-decoration i/text-underlined
|
||||
:font-weight i/text-font-weight
|
||||
:typography i/text-typography
|
||||
:opacity i/percentage
|
||||
:number i/number
|
||||
:rotation i/rotation
|
||||
:spacing i/padding-extended
|
||||
:string i/text-mixed
|
||||
:stroke-width i/stroke-size
|
||||
:dimensions i/expand
|
||||
:sizing i/expand
|
||||
:shadow i/drop-shadow
|
||||
"add"))
|
||||
|
||||
(def ^:private schema:token-group
|
||||
[:map
|
||||
[:type :keyword]
|
||||
[:tokens :any]
|
||||
[:selected-shapes :any]
|
||||
[:is-selected-inside-layout {:optional true} [:maybe :boolean]]
|
||||
[:active-theme-tokens {:optional true} :any]
|
||||
[:selected-token-set-id {:optional true} :any]
|
||||
[:tokens-lib {:optional true} :any]
|
||||
[:on-token-pill-click {:optional true} fn?]
|
||||
[:on-context-menu {:optional true} fn?]])
|
||||
|
||||
(mf/defc token-group*
|
||||
{::mf/private true}
|
||||
[{:keys [type tokens selected-shapes is-selected-inside-layout active-theme-tokens is-open selected-ids]}]
|
||||
{::mf/schema schema:token-group}
|
||||
[{:keys [type tokens selected-shapes is-selected-inside-layout active-theme-tokens selected-token-set-id tokens-lib is-expanded selected-ids]}]
|
||||
(let [{:keys [modal title]}
|
||||
(get dwta/token-properties type)
|
||||
editing-ref (mf/deref refs/workspace-editor-state)
|
||||
not-editing? (empty? editing-ref)
|
||||
|
||||
is-expanded (d/nilv is-expanded false)
|
||||
|
||||
can-edit?
|
||||
(mf/use-ctx ctx/can-edit?)
|
||||
|
||||
is-selected-inside-layout (d/nilv is-selected-inside-layout false)
|
||||
|
||||
tokens
|
||||
(mf/with-memo [tokens]
|
||||
(vec (sort-by :name tokens)))
|
||||
|
||||
expandable? (d/nilv (seq tokens) false)
|
||||
|
||||
on-context-menu
|
||||
(mf/use-fn
|
||||
(fn [event token]
|
||||
@@ -73,8 +95,8 @@
|
||||
|
||||
on-toggle-open-click
|
||||
(mf/use-fn
|
||||
(mf/deps is-open type)
|
||||
#(st/emit! (dwtl/set-token-type-section-open type (not is-open))))
|
||||
(mf/deps is-expanded type)
|
||||
#(st/emit! (dwtl/set-token-type-section-open type (not is-expanded))))
|
||||
|
||||
on-popover-open-click
|
||||
(mf/use-fn
|
||||
@@ -96,33 +118,36 @@
|
||||
(mf/use-fn
|
||||
(mf/deps not-editing? selected-ids)
|
||||
(fn [event token]
|
||||
(dom/stop-propagation event)
|
||||
(when (and not-editing? (seq selected-shapes) (not= (:type token) :number))
|
||||
(st/emit! (dwta/toggle-token {:token token
|
||||
:shape-ids selected-ids})))))]
|
||||
(let [token (ctob/get-token tokens-lib selected-token-set-id (:id token))]
|
||||
(dom/stop-propagation event)
|
||||
(when (and not-editing? (seq selected-shapes) (not= (:type token) :number))
|
||||
(st/emit! (dwta/toggle-token {:token token
|
||||
:shape-ids selected-ids}))))))]
|
||||
|
||||
[:div {:on-click on-toggle-open-click :class (stl/css :token-section-wrapper)}
|
||||
[:> cmm/asset-section* {:icon (token-section-icon type)
|
||||
:title title
|
||||
:section :tokens
|
||||
:assets-count (count tokens)
|
||||
:is-open is-open}
|
||||
[:> cmm/asset-section-block* {:role :title-button}
|
||||
(when can-edit?
|
||||
[:> icon-button* {:on-click on-popover-open-click
|
||||
:variant "ghost"
|
||||
:icon i/add
|
||||
:id (str "add-token-button-" title)
|
||||
:aria-label (tr "workspace.tokens.add-token" title)}])]
|
||||
(when is-open
|
||||
[:> cmm/asset-section-block* {:role :content}
|
||||
[:div {:class (stl/css :token-pills-wrapper)}
|
||||
(for [token tokens]
|
||||
[:> token-pill*
|
||||
{:key (:name token)
|
||||
:token token
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])]])]]))
|
||||
[:div {:class (stl/css :token-section-wrapper)
|
||||
:data-testid (dm/str "section-" (name type))}
|
||||
[:> layer-button* {:label title
|
||||
:expanded is-expanded
|
||||
:description (when expandable? (dm/str (count tokens)))
|
||||
:is-expandable expandable?
|
||||
:aria-expanded is-expanded
|
||||
:aria-controls (dm/str "token-tree-" (name type))
|
||||
:on-toggle-expand on-toggle-open-click
|
||||
:icon (token-section-icon type)}
|
||||
(when can-edit?
|
||||
[:> icon-button* {:id (str "add-token-button-" title)
|
||||
:icon "add"
|
||||
:aria-label (tr "workspace.tokens.add-token" title)
|
||||
:variant "ghost"
|
||||
:on-click on-popover-open-click
|
||||
:class (stl/css :token-section-icon)}])]
|
||||
(when is-expanded
|
||||
[:> token-tree* {:tokens tokens
|
||||
:id (dm/str "token-tree-" (name type))
|
||||
:tokens-lib tokens-lib
|
||||
:selected-shapes selected-shapes
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:selected-token-set-id selected-token-set-id
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:on-token-pill-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])]))
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
.token-pills-wrapper {
|
||||
display: flex;
|
||||
gap: var(--sp-xs);
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@@ -307,10 +307,9 @@
|
||||
:class (stl/css :token-pill-icon)}])
|
||||
|
||||
(if contains-path?
|
||||
(let [[first-part last-part] (cpn/split-by-last-period name)]
|
||||
(let [[_ last-part] (cpn/split-by-last-period name)]
|
||||
[:span {:class (stl/css :divided-name-wrapper)
|
||||
:aria-label name}
|
||||
[:span {:class (stl/css :first-name-wrapper)} first-part]
|
||||
[:span {:class (stl/css :last-name-wrapper)} last-part]])
|
||||
[:span {:class (stl/css :name-wrapper)
|
||||
:aria-label name}
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
|
||||
(ns app.main.ui.workspace.tokens.management.token-tree
|
||||
(:require-macros [app.main.style :as stl])
|
||||
(:require
|
||||
[app.common.path-names :as cpn]
|
||||
[app.common.types.tokens-lib :as ctob]
|
||||
[app.main.ui.ds.layers.layer-button :refer [layer-button*]]
|
||||
[app.main.ui.workspace.tokens.management.token-pill :refer [token-pill*]]
|
||||
[rumext.v2 :as mf]))
|
||||
|
||||
(def ^:private schema:folder-node
|
||||
[:map
|
||||
[:node :any]
|
||||
[:selected-shapes :any]
|
||||
[:is-selected-inside-layout {:optional true} :boolean]
|
||||
[:active-theme-tokens {:optional true} :any]
|
||||
[:selected-token-set-id {:optional true} :any]
|
||||
[:tokens-lib {:optional true} :any]
|
||||
[:on-token-pill-click {:optional true} fn?]
|
||||
[:on-context-menu {:optional true} fn?]])
|
||||
|
||||
(mf/defc folder-node*
|
||||
{::mf/schema schema:folder-node}
|
||||
[{:keys [node selected-shapes is-selected-inside-layout active-theme-tokens selected-token-set-id tokens-lib on-token-pill-click on-context-menu]}]
|
||||
(let [expanded* (mf/use-state false)
|
||||
expanded (deref expanded*)
|
||||
swap-folder-expanded #(swap! expanded* not)]
|
||||
[:li {:class (stl/css :folder-node)}
|
||||
[:> layer-button* {:label (:name node)
|
||||
:expanded expanded
|
||||
:aria-expanded expanded
|
||||
:aria-controls (str "folder-children-" (:path node))
|
||||
:is-expandable (not (:leaf node))
|
||||
:on-toggle-expand swap-folder-expanded}]
|
||||
(when expanded
|
||||
(let [children-fn (:children-fn node)]
|
||||
[:div {:class (stl/css :folder-children-wrapper)
|
||||
:id (str "folder-children-" (:path node))}
|
||||
(when children-fn
|
||||
(let [children (children-fn)]
|
||||
(for [child children]
|
||||
(if (not (:leaf child))
|
||||
[:ul {:class (stl/css :node-parent)}
|
||||
[:> folder-node* {:key (:path child)
|
||||
:node child
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-token-pill-click on-token-pill-click
|
||||
:on-context-menu on-context-menu
|
||||
:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}]]
|
||||
(let [id (:id (:leaf child))
|
||||
token (ctob/get-token tokens-lib selected-token-set-id id)]
|
||||
[:> token-pill*
|
||||
{:key id
|
||||
:token token
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])))))]))]))
|
||||
|
||||
(def ^:private schema:token-tree
|
||||
[:map
|
||||
[:tokens :any]
|
||||
[:selected-shapes :any]
|
||||
[:is-selected-inside-layout {:optional true} :boolean]
|
||||
[:active-theme-tokens {:optional true} :any]
|
||||
[:selected-token-set-id {:optional true} :any]
|
||||
[:tokens-lib {:optional true} :any]
|
||||
[:on-token-pill-click {:optional true} fn?]
|
||||
[:on-context-menu {:optional true} fn?]])
|
||||
|
||||
(mf/defc token-tree*
|
||||
{::mf/schema schema:token-tree}
|
||||
[{:keys [tokens selected-shapes is-selected-inside-layout active-theme-tokens tokens-lib selected-token-set-id on-token-pill-click on-context-menu]}]
|
||||
(let [separator "."
|
||||
tree (mf/use-memo
|
||||
(mf/deps tokens)
|
||||
(fn []
|
||||
(cpn/build-tree-root tokens separator)))]
|
||||
[:div {:class (stl/css :token-tree-wrapper)}
|
||||
(for [node tree]
|
||||
[:ul {:class (stl/css :node-parent)
|
||||
:key (:path node)
|
||||
:style {:--node-depth (inc (:depth node))}}
|
||||
(if (:leaf node)
|
||||
(let [token (ctob/get-token tokens-lib selected-token-set-id (get-in node [:leaf :id]))]
|
||||
[:> token-pill*
|
||||
{:token token
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-click on-token-pill-click
|
||||
:on-context-menu on-context-menu}])
|
||||
;; Render segment folder
|
||||
[:> folder-node* {:node node
|
||||
:selected-shapes selected-shapes
|
||||
:is-selected-inside-layout is-selected-inside-layout
|
||||
:active-theme-tokens active-theme-tokens
|
||||
:on-token-pill-click on-token-pill-click
|
||||
:on-context-menu on-context-menu
|
||||
:tokens-lib tokens-lib
|
||||
:selected-token-set-id selected-token-set-id}])])]))
|
||||
@@ -0,0 +1,39 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
//
|
||||
// Copyright (c) KALEIDOS INC
|
||||
|
||||
@use "ds/_borders.scss" as *;
|
||||
|
||||
.token-tree-wrapper {
|
||||
padding-block-end: var(--sp-s);
|
||||
}
|
||||
|
||||
.node-parent {
|
||||
--node-spacing: var(--sp-l);
|
||||
--node-depth: 0;
|
||||
|
||||
margin-block-end: 0;
|
||||
padding-inline-start: calc(var(--node-spacing) * var(--node-depth));
|
||||
}
|
||||
|
||||
.folder-children-wrapper:has(> button) {
|
||||
margin-inline-start: var(--sp-s);
|
||||
padding-inline-start: var(--sp-s);
|
||||
border-inline-start: $b-2 solid var(--color-background-quaternary);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
column-gap: var(--sp-xs);
|
||||
|
||||
& .node-parent {
|
||||
flex: 1 0 100%;
|
||||
|
||||
&:last-of-type {
|
||||
margin-block-end: var(--sp-s);
|
||||
}
|
||||
}
|
||||
& .token-pill {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@
|
||||
:string-or-size-array (format-string-or-size-array value)
|
||||
:keyword (format-keyword value)
|
||||
:tracks (format-tracks value)
|
||||
:shadows (format-shadow value options)
|
||||
:shadow (format-shadow value options)
|
||||
:blur (format-blur value)
|
||||
:matrix (format-matrix value)
|
||||
(if (keyword? value) (d/name value) value))))
|
||||
|
||||
@@ -47,18 +47,17 @@
|
||||
[acc {:keys [schema in value type] :as problem}]
|
||||
(let [props (m/properties schema)
|
||||
tprops (m/type-properties schema)
|
||||
field (or (:error/field props)
|
||||
in)
|
||||
field (or (first in)
|
||||
(:error/field props))
|
||||
|
||||
field (if (vector? field)
|
||||
field
|
||||
[field])]
|
||||
|
||||
(if (and (= 1 (count field))
|
||||
(contains? acc (first field)))
|
||||
(if (contains? acc field)
|
||||
acc
|
||||
(cond
|
||||
(or (nil? field)
|
||||
(empty? field))
|
||||
(nil? field)
|
||||
acc
|
||||
|
||||
(or (= type :malli.core/missing-key)
|
||||
|
||||
@@ -37,7 +37,7 @@ This command is going to search for the file located in `frontend/src/app/main/u
|
||||
|
||||
## How it works?
|
||||
|
||||
The text editor divides the content in three elements: `root`, `paragraph` and `textSpan`. In terms of content, a `textSpan` is a styled element displayed on a line within a block. A `textSpan` can only have one child (a Text node). A `paragraph` is a **block** element that can contain multiple `textSpan`s (**textSpan** elements).
|
||||
The text editor divides the content in three elements: `root`, `paragraph` and `inline`. An `inline` in terms of content is a styled element that it is displayed in a line inside a block and an `inline` only can have one child (a Text node). A `paragraph` is a **block** element that can contain multiple `inline`s (**inline** elements).
|
||||
|
||||
```html
|
||||
<div data-itype="root">
|
||||
@@ -53,10 +53,10 @@ This way we only need to deal with a structure like this, where circular nodes a
|
||||
```mermaid
|
||||
flowchart TB
|
||||
root((root)) --> paragraph((paragraph))
|
||||
paragraph --> text_span_1((textSpan))
|
||||
paragraph --> text_span_2((textSpan))
|
||||
text_span_1 --> text_1[Hello, ]
|
||||
text_span_2 --> text_2[World!]
|
||||
paragraph --> inline_1((inline))
|
||||
paragraph --> inline_2((inline))
|
||||
inline_1 --> text_1[Hello, ]
|
||||
inline_2 --> text_2[World!]
|
||||
```
|
||||
|
||||
This is compatible with the way Penpot stores text content.
|
||||
@@ -68,26 +68,6 @@ flowchart TB
|
||||
paragraph --> text((text))
|
||||
```
|
||||
|
||||
## How the TextEditor works?
|
||||
|
||||
```mermaid
|
||||
flowchart TB
|
||||
TextEditor -->|handles `selectionchange` events| SelectionController
|
||||
TextEditor -->|handles how the editor dispatches changes| ChangeController
|
||||
```
|
||||
|
||||
The `TextEditor` contains a series of references to DOM elements, one of them is a `contenteditable` element that keeps the sub-elements explained before (root, paragraphs and textspans).
|
||||
|
||||
`SelectionController` listens to the `document` event called `selectionchange`. This event is triggered everytime the focus/selection of the browser changes.
|
||||
|
||||
`ChangeController` is called by the `TextEditor` instance everytime a change is performed on the content of the `contenteditable` element.
|
||||
|
||||
### Events
|
||||
|
||||
- `change`: This event is dispatched every time a change is made in the editor. All changes are debounced to prevent dispatching too many change events. This event is also dispatched when there are pending change events and the user blurs the textarea element.
|
||||
|
||||
- `stylechange`: This event is dispatched every time the `currentStyle` changes. This normally happens when the user changes the caret position or the selection and the `currentStyle` is re-computed.
|
||||
|
||||
## How the code is organized?
|
||||
|
||||
- `editor`: contains everything related to the TextEditor. Where `TextEditor.js` is the main file where all the basic code of the editor is handled. This has been designed so that in the future, when the Web Components API is more stable and has features such as handling selection events within shadow roots we will be able to update this class with little effort.
|
||||
|
||||
@@ -392,7 +392,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "تحميل %s ملفات أساسية (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* ربما يحتوي على مكوّنات، رسوميات والوان و/أو خطوط."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -403,30 +403,30 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"سيتم ادراج الملفات التي لها مكتبات مشتركة في التصدير، مع الحفاظ على روابطهم."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "صدّر المكتبات المشتركة"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"لن يتم تضمين المكتبات المشتركة في التصدير ولن يتم إضافة أي أصول إلى "
|
||||
"المكتبة. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "عامل أصول المكتبة المشتركة كعناصر بسيطة"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr "سيتم تصدير ملفك مع دمج جميع الأصول الخارجية في مكتبة الملفات."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "تضمين أصول المكتبة المشتركة في مكتبات الملفات"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -380,7 +380,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Baixa %s fitxers estàndard (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Pot incloure components, gràfics, colors i/o tipografies."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -390,33 +390,33 @@ msgstr ""
|
||||
"voleu fer amb els seus recursos*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Els fitxers amb biblioteques compartides s’inclouran a l’exportació, "
|
||||
"mantenint la vinculació."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exporta les biblioteques compartides"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Les biblioteques compartides no s'inclouran en l'exportació i no s'afegiran "
|
||||
"recursos a la biblioteca. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Tracta els recursos de la biblioteca compartida com a objectes bàsics"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"El fitxer s'exportarà amb tots els recursos externs fusionats a la "
|
||||
"biblioteca de fitxers."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr ""
|
||||
"Inclou els recursos de la biblioteca compartida a les biblioteques del "
|
||||
"fitxer"
|
||||
|
||||
@@ -530,7 +530,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Stáhnout %s soubory (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Může obsahovat komponenty, grafiku, barvy a/nebo typografii."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -540,33 +540,33 @@ msgstr ""
|
||||
"Co chcete dělat s jejich položkami*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Soubory se sdílenými knihovnami budou zahrnuty do exportu, čímž se zachová "
|
||||
"jejich propojení."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exportovat sdílené knihovny"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Sdílené knihovny nebudou zahrnuty do exportu a do knihovny nebudou přidány "
|
||||
"žádné položky. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Zacházet s položkami sdílené knihovny jako se základními objekty"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Váš soubor bude exportován se všemi externími položkami sloučenými do "
|
||||
"knihovny souborů."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Zahrnout sdílené položky knihovny do knihoven souborů"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
@@ -6456,6 +6456,10 @@ msgstr "Nástroje"
|
||||
msgid "workspace.tokens.value-not-valid"
|
||||
msgstr "Hodnota není platná"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Přejmenováním tohoto tokenu se přeruší jakýkoli odkaz na jeho starý název."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Položky"
|
||||
|
||||
@@ -573,7 +573,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "%s Standarddateien herunterladen (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* kann Komponenten, Grafiken, Farben und/oder Textstile enthalten."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -585,33 +585,33 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Dateien mit geteilten Bibliotheken werden exportiert, und ihre Verknüpfungen "
|
||||
"bleiben erhalten."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Geteilte Bibliotheken exportieren"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Geteilte Bibliotheken werden nicht exportiert und der Bibliothek werden "
|
||||
"keine Assets hinzugefügt. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Assets aus geteilten Bibliotheken als gewöhnliche Objekte behandeln"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Ihre Datei wird exportiert, und alle externen Assets werden der "
|
||||
"Dateibibliothek hinzugefügt."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Assets aus geteilten Bibliotheken in die Dateibibliothek aufnehmen"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
@@ -7175,6 +7175,12 @@ msgstr "Der Wert ist nicht gültig"
|
||||
msgid "workspace.tokens.value-with-percent"
|
||||
msgstr "Ungültiger Wert: % ist nicht zulässig."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr ""
|
||||
"Die Umbenennung dieses Tokens macht jeden Verweis auf seinen alten Namen "
|
||||
"kaputt."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Assets"
|
||||
|
||||
@@ -564,48 +564,48 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Download %s standard files (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Might include components, graphics, colors and/or typographies."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
msgid "dashboard.export.explain"
|
||||
msgstr ""
|
||||
"One or more files that you want to download are using shared libraries. What "
|
||||
"One or more files that you want to export are using shared libraries. What "
|
||||
"do you want to do with their assets*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Files with shared libraries will be included in the export, maintaining "
|
||||
"their linkage."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Export shared libraries"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Shared libraries will not be included in the export and no assets will be "
|
||||
"added to the library. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Treat shared library assets as basic objects"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Your file will be exported with all external assets merged into the file "
|
||||
"library."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Include shared library assets in file libraries"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
msgid "files-download-modal.title"
|
||||
msgstr "Download files"
|
||||
msgid "dashboard.export.title"
|
||||
msgstr "Export files"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:317
|
||||
msgid "dashboard.fonts.deleted-placeholder"
|
||||
@@ -7543,42 +7543,6 @@ msgstr "Color"
|
||||
msgid "workspace.tokens.composite-line-height-needs-font-size"
|
||||
msgstr "Line Height depends on Font Size. Add a Font Size to get the resolved value."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-token-references"
|
||||
msgstr "Remap Token References"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.renaming-token-from-to"
|
||||
msgstr "Renaming token from '%s' to '%s'"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.references-found"
|
||||
msgstr "%s references found in your design"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-explanation"
|
||||
msgstr "All references to this token will be automatically updated to use the new name."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-references-found"
|
||||
msgstr "No references found"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-remap-needed"
|
||||
msgstr "This token is not currently used in your design, so no remapping is needed."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remapping-in-progress"
|
||||
msgstr "Remapping token references..."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-and-rename"
|
||||
msgstr "Remap & Rename"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.rename-only"
|
||||
msgstr "Rename"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/themes/create_modal.cljs:78
|
||||
msgid "workspace.tokens.create-new-theme"
|
||||
msgstr "Create your first theme now."
|
||||
@@ -8068,14 +8032,6 @@ msgstr "Name"
|
||||
msgid "workspace.tokens.token-name-duplication-validation-error"
|
||||
msgstr "A token already exists at the path: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-blur-value-error"
|
||||
msgstr "Blur value cannot be negative"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-spread-value-error"
|
||||
msgstr "Spread value cannot be negative"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:42, src/app/main/ui/workspace/tokens/management/create/form.cljs:68
|
||||
msgid "workspace.tokens.token-name-length-validation-error"
|
||||
msgstr "Name should be at least 1 character"
|
||||
@@ -8120,7 +8076,7 @@ msgstr "Type '%s' is not supported (%s)\n"
|
||||
msgid "workspace.tokens.use-reference"
|
||||
msgstr "Use a reference"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/token_pill.cljs:133
|
||||
#: src/app/main/ui/workspace/tokens/management/token_pill.cljs:131
|
||||
msgid "workspace.tokens.value-not-valid"
|
||||
msgstr "The value is not valid"
|
||||
|
||||
@@ -8132,6 +8088,10 @@ msgstr "Invalid value: % is not allowed."
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "Invalid value: Units are not allowed."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Renaming this token will break any reference to its old name."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Assets"
|
||||
@@ -8489,9 +8449,6 @@ msgstr "Restore project"
|
||||
msgid "dashboard.delete-project-button"
|
||||
msgstr "Delete project"
|
||||
|
||||
msgid "dashboard.trash-info-text-no-projects"
|
||||
msgstr "Your trash is empty. Deleted files and projects will appear here."
|
||||
|
||||
msgid "dashboard.trash-info-text-part1"
|
||||
msgstr "Deleted files will remain in the trash for"
|
||||
|
||||
|
||||
@@ -573,48 +573,48 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Descargar %s archivos estándar (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Pueden incluir components, gráficos, colores y/o tipografias."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
msgid "dashboard.export.explain"
|
||||
msgstr ""
|
||||
"Uno o mas ficheros que quieres descargar usan librerias compartidas. ¿Qué "
|
||||
"Uno o mas ficheros que quieres exportar usan librerias compartidas. ¿Qué "
|
||||
"quieres hacer con los recursos*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Ficheros con librerias compartidas se inclurán en el paquete de exportación "
|
||||
"y mantendrán los enlaces."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exportar librerias compartidas"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Las biblioteca compartidas no se incluirán en la exportación y ningún "
|
||||
"recurso será incluido en la biblioteca. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Usar los recursos como objetos básicos"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Tu fichero será exportado con todos los recursos dentro de la libreria del "
|
||||
"propio fichero."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Incluir librerias compartidas dentro de las librerias del fichero"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
msgid "files-download-modal.title"
|
||||
msgstr "Descargar ficheros"
|
||||
msgid "dashboard.export.title"
|
||||
msgstr "Exportar ficheros"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/options/menus/typography.cljs:317
|
||||
msgid "dashboard.fonts.deleted-placeholder"
|
||||
@@ -4420,42 +4420,6 @@ msgstr "Mostrar/ocultar recursos"
|
||||
msgid "shortcuts.toggle-colorpalette"
|
||||
msgstr "Mostrar/ocultar paleta de colores"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-token-references"
|
||||
msgstr "Actualizar referencias de token"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.renaming-token-from-to"
|
||||
msgstr "Renombrando el token de '%s' a '%s'"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.references-found"
|
||||
msgstr "%s referencias encontradas en tu diseño"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-explanation"
|
||||
msgstr "Todas las referencias a este token se actualizarán automáticamente para usar el nuevo nombre."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-references-found"
|
||||
msgstr "No se encontraron referencias"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.no-remap-needed"
|
||||
msgstr "Este token no se utiliza actualmente en tu diseño, por lo que no es necesario actualizar referencias."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remapping-in-progress"
|
||||
msgstr "Actualizando referencias de token..."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.remap-and-rename"
|
||||
msgstr "Actualizar referencias y renombrar"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/remapping_modal.cljs
|
||||
msgid "workspace.tokens.rename-only"
|
||||
msgstr "Renombrar"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar/shortcuts.cljs:185
|
||||
msgid "shortcuts.toggle-focus-mode"
|
||||
msgstr "Mostrar/ocultar focus mode"
|
||||
@@ -7944,14 +7908,6 @@ msgstr "Nombre"
|
||||
msgid "workspace.tokens.token-name-duplication-validation-error"
|
||||
msgstr "Ya existe un token en la ruta: %s"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-blur-value-error"
|
||||
msgstr "El valor de blur no puede ser negativo"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/forms/shadow.cljs
|
||||
msgid "workspace.tokens.shadow-token-spread-value-error"
|
||||
msgstr "El valor de spread no puede ser negativo"
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:42, src/app/main/ui/workspace/tokens/management/create/form.cljs:68
|
||||
msgid "workspace.tokens.token-name-length-validation-error"
|
||||
msgstr "El nombre debería ser de al menos 1 caracter"
|
||||
@@ -8002,6 +7958,10 @@ msgstr "El valor no es válido"
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "Valor no válido: No se permiten unidades."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Al renombrar este token se romperán las referencias al nombre anterior"
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Recursos"
|
||||
@@ -8342,9 +8302,6 @@ msgstr "Restaurar proyecto"
|
||||
msgid "dashboard.delete-project-button"
|
||||
msgstr "Eliminar proyecto"
|
||||
|
||||
msgid "dashboard.trash-info-text-no-projects"
|
||||
msgstr "Tu papelera está vacía. Los archivos y proyectos eliminados aparecerán aquí."
|
||||
|
||||
msgid "dashboard.trash-info-text-part1"
|
||||
msgstr "Los archivos eliminados permanecerán en la papelera durante"
|
||||
|
||||
@@ -8357,6 +8314,9 @@ msgstr "Después de eso, serán eliminados permanentemente."
|
||||
msgid "dashboard.trash-info-text-part4"
|
||||
msgstr "Si cambias de opinión, puedes restaurarlos o eliminarlos permanentemente desde el menú de cada archivo."
|
||||
|
||||
msgid "dashboard.deleted.delete-forever"
|
||||
msgstr "Eliminar para siempre"
|
||||
|
||||
msgid "dashboard.restore-all-confirmation.title"
|
||||
msgstr "Restaurar todos los proyectos y archivos"
|
||||
|
||||
@@ -8405,6 +8365,9 @@ msgstr "Hubo un error al restaurar los archivos."
|
||||
msgid "dashboard.errors.error-on-restore-file"
|
||||
msgstr "Hubo un error al restaurar el archivo %s."
|
||||
|
||||
msgid "dashboard.errors.error-on-restoring-files"
|
||||
msgstr "Hubo un error al restaurar archivos."
|
||||
|
||||
msgid "dashboard.errors.error-on-delete-files"
|
||||
msgstr "Hubo un error al eliminar archivos."
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Descargar %s archivos estándar (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Puede incluir componentes, gráficos, colores y/o tipografías."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -455,33 +455,33 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Los archivos con bibliotecas compartidas se incluirán en la exportación, "
|
||||
"manteniendo su vinculación."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exportar bibliotecas compartidas"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Las bibliotecas compartidas no se incluirán en la exportación y no se "
|
||||
"agregarán activos a la biblioteca. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Trate los activos de biblioteca compartidos como objetos básicos"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Su archivo se exportará con todos los activos externos combinados en la "
|
||||
"biblioteca de archivos."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Incluir recursos de biblioteca compartidos en bibliotecas de archivos"
|
||||
|
||||
#: src/app/main/ui/dashboard/import.cljs:131
|
||||
|
||||
@@ -358,7 +358,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Deskargatu %s fitxategi estandar (.svn + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* Osagaiak, grafikoak, koloreak edo/eta tipografiak izan ditzakete."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -368,31 +368,31 @@ msgstr ""
|
||||
"darabiltzate. Zer egin nahi duzu baliabideekin*?"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Partekatutako liburutegiak dituzten fitxategiak esportazio paketean sartuko "
|
||||
"dira eta loturak mantenduko dituzte."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Esportatu partekatutako liburutegiak"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Partekatutako liburutegiak ez dira esportazioan sartuko eta baliabide bat "
|
||||
"ere ez da liburutegian sartuko. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "Erabili baliabideak oinarrizko objektu bezala"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr "Zure fitxategia baliabide guztiak bere baitan dituela esportatuko da."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "Sartu partekatutako liburutegiak fitxategiaren liburutegietan"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -491,7 +491,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "دانلود %s عدد فایل های استاندارد (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr "* ممکن است شامل کامپوننتها، گرافیک، رنگها و/یا تایپوگرافی باشد."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:155
|
||||
@@ -502,33 +502,33 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"فایلهای دارای کتابخانههای مشترک در اکسپورت گنجانده میشوند و پیوند خود را حفظ "
|
||||
"میکنند."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "اکسپورت کتابخانههای مشترک"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"کتابخانههای مشترک در صادرات گنجانده نخواهند شد و هیچ دارایی به کتابخانه "
|
||||
"اضافه نخواهد شد. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr "داراییهای کتابخانه مشترک را به عنوان اشیاء اساسی در نظر بگیرید"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"فایل شما با تمام داراییهای خارجی که در کتابخانه فایل ادغام شدهاند اکسپورت "
|
||||
"میشود."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr "داراییهای کتابخانه مشترک را در کتابخانههای فایل قرار دهید"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -381,7 +381,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Heinta %s standarafílur (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Útflyt deild søvn"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:147
|
||||
|
||||
@@ -573,7 +573,7 @@ msgid "dashboard.export-standard-multi"
|
||||
msgstr "Télécharger %s fichiers standard (.svg + .json)"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:156
|
||||
msgid "files-download-modal.description-2"
|
||||
msgid "dashboard.export.detail"
|
||||
msgstr ""
|
||||
"* Peut inclure les composants, les éléments graphiques, les couleurs et/ou "
|
||||
"les polices de caractère."
|
||||
@@ -586,35 +586,35 @@ msgstr ""
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:164
|
||||
#, fuzzy
|
||||
msgid "files-download-modal.options.all.message"
|
||||
msgid "dashboard.export.options.all.message"
|
||||
msgstr ""
|
||||
"Les fichiers avec des bibliothèques partagées seront inclus dans "
|
||||
"l'exportation, en maintenant leur liaison."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:165
|
||||
msgid "files-download-modal.options.all.title"
|
||||
msgid "dashboard.export.options.all.title"
|
||||
msgstr "Exporter les bibliothèques partagées"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:166
|
||||
msgid "files-download-modal.options.detach.message"
|
||||
msgid "dashboard.export.options.detach.message"
|
||||
msgstr ""
|
||||
"Les bibliothèques partagées ne seront pas incluses dans l'exportation et "
|
||||
"aucune ressource ne sera ajoutée à la bibliothèque. "
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:167
|
||||
msgid "files-download-modal.options.detach.title"
|
||||
msgid "dashboard.export.options.detach.title"
|
||||
msgstr ""
|
||||
"Considérer les ressources des bibliothèques partagées comme des objets "
|
||||
"basiques"
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:168
|
||||
msgid "files-download-modal.options.merge.message"
|
||||
msgid "dashboard.export.options.merge.message"
|
||||
msgstr ""
|
||||
"Votre fichier sera exporté avec toutes les ressources externes fusionnées "
|
||||
"dans la bibliothèque de fichiers."
|
||||
|
||||
#: src/app/main/ui/exports/files.cljs:169
|
||||
msgid "files-download-modal.options.merge.title"
|
||||
msgid "dashboard.export.options.merge.title"
|
||||
msgstr ""
|
||||
"Inclure les ressources des bibliothèques partagées dans les bibliothèques "
|
||||
"de fichiers"
|
||||
@@ -7893,6 +7893,10 @@ msgstr "Valeur non valide : % n'est pas autorisé."
|
||||
msgid "workspace.tokens.value-with-units"
|
||||
msgstr "Valeur non valide : les unités ne sont pas autorisées."
|
||||
|
||||
#: src/app/main/ui/workspace/tokens/management/create/border_radius.cljs:181, src/app/main/ui/workspace/tokens/management/create/form.cljs:602
|
||||
msgid "workspace.tokens.warning-name-change"
|
||||
msgstr "Si vous renommez ce token, toute référence à son ancien nom sera incorrecte."
|
||||
|
||||
#: src/app/main/ui/workspace/sidebar.cljs:139, src/app/main/ui/workspace/sidebar.cljs:146
|
||||
msgid "workspace.toolbar.assets"
|
||||
msgstr "Ressources"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user