mirror of
https://github.com/penpot/penpot.git
synced 2025-05-20 22:16:10 +02:00
Merge remote-tracking branch 'origin/staging'
This commit is contained in:
commit
36e66c4dd9
6 changed files with 59 additions and 22 deletions
|
@ -21,6 +21,10 @@
|
|||
flex-direction: column;
|
||||
}
|
||||
|
||||
.public-DraftStyleDefault-block {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
&.align-top {
|
||||
.DraftEditor-root {
|
||||
justify-content: flex-start;
|
||||
|
|
|
@ -1711,8 +1711,14 @@
|
|||
(process-entry [[type data]]
|
||||
(case type
|
||||
:text
|
||||
(if (str/empty? data)
|
||||
(cond
|
||||
(str/empty? data)
|
||||
(rx/empty)
|
||||
|
||||
(re-find #"<svg\s" data)
|
||||
(rx/of (paste-svg-text data))
|
||||
|
||||
:else
|
||||
(rx/of (paste-text data)))
|
||||
|
||||
:transit
|
||||
|
@ -1757,8 +1763,7 @@
|
|||
text-data (some-> pdata wapi/extract-text)
|
||||
transit-data (ex/ignoring (some-> text-data t/decode-str))]
|
||||
(cond
|
||||
(and (string? text-data)
|
||||
(str/includes? text-data "<svg "))
|
||||
(and (string? text-data) (re-find #"<svg\s" text-data))
|
||||
(rx/of (paste-svg-text text-data))
|
||||
|
||||
(seq image-data)
|
||||
|
|
|
@ -1491,9 +1491,22 @@
|
|||
container
|
||||
{:type :reg-objects
|
||||
:shapes all-parents})]))))
|
||||
(let [roperation {:type :set
|
||||
(let [;; position-data is a special case because can be affected by :geometry-group and :content-group
|
||||
;; so, if the position-data changes but the geometry is touched we need to reset the position-data
|
||||
;; so it's calculated again
|
||||
reset-pos-data?
|
||||
(and (cfh/text-shape? origin-shape)
|
||||
(= attr :position-data)
|
||||
(not= (get origin-shape attr) (get dest-shape attr))
|
||||
(touched :geometry-group))
|
||||
|
||||
roperation {:type :set
|
||||
:attr attr
|
||||
:val (get origin-shape attr)
|
||||
:val (cond
|
||||
;; If position data changes and the geometry group is touched
|
||||
;; we need to put to nil so we can regenerate it
|
||||
reset-pos-data? nil
|
||||
:else (get origin-shape attr))
|
||||
:ignore-touched true}
|
||||
uoperation {:type :set
|
||||
:attr attr
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
@extend .button-icon;
|
||||
stroke: var(--tab-foreground-color);
|
||||
}
|
||||
|
||||
.content {
|
||||
@include headlineSmallTypography;
|
||||
text-align: center;
|
||||
|
@ -53,17 +54,21 @@
|
|||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
&.current,
|
||||
&.current:hover {
|
||||
background: var(--tab-background-color-selected);
|
||||
border-color: var(--tab-border-color-selected);
|
||||
color: var(--tab-foreground-color-selected);
|
||||
|
||||
svg {
|
||||
stroke: var(--tab-foreground-color-selected);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--tab-foreground-color-hover);
|
||||
|
||||
svg {
|
||||
stroke: var(--tab-foreground-color-hover);
|
||||
}
|
||||
|
@ -78,6 +83,7 @@
|
|||
min-width: $s-24;
|
||||
padding: 0 $s-6;
|
||||
border-radius: $br-5;
|
||||
|
||||
svg {
|
||||
@include flexCenter;
|
||||
height: $s-16;
|
||||
|
@ -87,6 +93,7 @@
|
|||
fill: none;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
svg {
|
||||
stroke: var(--icon-foreground-hover);
|
||||
|
@ -107,3 +114,10 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
//Firefox doesn't respect scrollbar-gutter
|
||||
@supports (-moz-appearance: none) {
|
||||
.tab-container-content {
|
||||
padding-right: $s-8;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -181,14 +181,14 @@
|
|||
[:span {:class (stl/css :resalted-area)}]]]
|
||||
[:div {:class (stl/css :constraints-center)}
|
||||
[:button {:class (stl/css-case :constraint-btn true
|
||||
:active (= constraints-h :center))
|
||||
:data-value "centerh"
|
||||
:active (= constraints-v :center))
|
||||
:data-value "centerv"
|
||||
:on-click on-constraint-button-clicked}
|
||||
[:span {:class (stl/css :resalted-area)}]]
|
||||
[:button {:class (stl/css-case :constraint-btn-special true
|
||||
:constraint-btn-rotated true
|
||||
:active (= constraints-v :center))
|
||||
:data-value "centerv"
|
||||
:active (= constraints-h :center))
|
||||
:data-value "centerh"
|
||||
:on-click on-constraint-button-clicked}
|
||||
[:span {:class (stl/css :resalted-area)}]]]
|
||||
[:div {:class (stl/css :constraints-right)}
|
||||
|
|
|
@ -69,33 +69,34 @@
|
|||
|
||||
on-add
|
||||
(mf/use-fn
|
||||
(mf/deps ids)
|
||||
(mf/deps ids fills)
|
||||
(fn [_]
|
||||
(st/emit! (dc/add-fill ids {:color default-color
|
||||
:opacity 1}))
|
||||
|
||||
(when (not (some? (seq fills))) (open-content))))
|
||||
(when (or (= :multiple fills)
|
||||
(not (some? (seq fills))))
|
||||
(open-content))))
|
||||
|
||||
on-change
|
||||
(mf/use-fn
|
||||
(mf/deps ids)
|
||||
(fn [index]
|
||||
(fn [color]
|
||||
(st/emit! (dc/change-fill ids color index)))))
|
||||
(fn [index]
|
||||
(fn [color]
|
||||
(st/emit! (dc/change-fill ids color index))))
|
||||
|
||||
on-reorder
|
||||
(mf/use-fn
|
||||
(mf/deps ids)
|
||||
(fn [new-index]
|
||||
(fn [index]
|
||||
(st/emit! (dc/reorder-fills ids index new-index)))))
|
||||
(fn [new-index]
|
||||
(fn [index]
|
||||
(st/emit! (dc/reorder-fills ids index new-index))))
|
||||
|
||||
on-remove
|
||||
(fn [index]
|
||||
(fn []
|
||||
(st/emit! (dc/remove-fill ids {:color default-color
|
||||
:opacity 1} index))
|
||||
(when (= 1 (count (seq fills))) (close-content))))
|
||||
(when (or (= :multiple fills)
|
||||
(= 1 (count (seq fills))))
|
||||
(close-content))))
|
||||
|
||||
on-remove-all
|
||||
(fn [_]
|
||||
(st/emit! (dc/remove-all-fills ids {:color clr/black
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue