mirror of
https://github.com/penpot/penpot.git
synced 2025-07-05 18:47:30 +02:00
♻️ Rename all icon functions
This commit is contained in:
parent
5739c0797c
commit
ca7438aab5
100 changed files with 777 additions and 772 deletions
|
@ -220,7 +220,7 @@
|
|||
[:button {:class (stl/css :context-menu-action :submenu-back)
|
||||
:data-no-close true
|
||||
:on-click exit-submenu}
|
||||
[:span {:class (stl/css :submenu-icon-back)} i/arrow-refactor]
|
||||
[:span {:class (stl/css :submenu-icon-back)} i/arrow]
|
||||
parent-option]]
|
||||
|
||||
[:li {:class (stl/css :separator)}]])
|
||||
|
@ -257,14 +257,14 @@
|
|||
option-name)
|
||||
|
||||
(when (and selected (= data-test selected))
|
||||
[:span {:class (stl/css :selected-icon)} i/tick-refactor])]
|
||||
[:span {:class (stl/css :selected-icon)} i/tick])]
|
||||
|
||||
[:a {:class (stl/css :context-menu-action :submenu)
|
||||
:data-no-close true
|
||||
:on-click (enter-submenu option-name sub-options)
|
||||
:data-test data-test}
|
||||
option-name
|
||||
[:span {:class (stl/css :submenu-icon)} i/arrow-refactor]])]))))])])])))
|
||||
[:span {:class (stl/css :submenu-icon)} i/arrow]])]))))])])])))
|
||||
|
||||
(mf/defc context-menu-a11y
|
||||
{::mf/wrap-props false}
|
||||
|
|
|
@ -43,5 +43,5 @@
|
|||
children
|
||||
[:span {:class (stl/css :icon-btn)}
|
||||
(if active?
|
||||
i/tick-refactor
|
||||
i/clipboard-refactor)]]))
|
||||
i/tick
|
||||
i/clipboard)]]))
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
|
||||
[:span {:class (stl/css :editable-label-close)
|
||||
:on-click cancel-edition}
|
||||
i/delete-text-refactor]]
|
||||
i/delete-text]]
|
||||
|
||||
[:span {:class final-class
|
||||
:title tooltip
|
||||
|
|
|
@ -180,7 +180,7 @@
|
|||
|
||||
[:span {:class (stl/css :dropdown-button)
|
||||
:on-click toggle-dropdown}
|
||||
i/arrow-refactor]
|
||||
i/arrow]
|
||||
|
||||
[:& dropdown {:show (or is-open? false)
|
||||
:on-close close-dropdown}
|
||||
|
@ -199,4 +199,4 @@
|
|||
:on-click select-item}
|
||||
[:span {:class (stl/css :label)} label]
|
||||
[:span {:class (stl/css :check-icon)}
|
||||
i/tick-refactor]])))]]]))
|
||||
i/tick]])))]]]))
|
||||
|
|
|
@ -52,11 +52,11 @@
|
|||
help-icon' (cond
|
||||
(and (= input-type "password")
|
||||
(= @type' "password"))
|
||||
i/shown-refactor
|
||||
i/shown
|
||||
|
||||
(and (= input-type "password")
|
||||
(= @type' "text"))
|
||||
i/hide-refactor
|
||||
i/hide
|
||||
|
||||
:else
|
||||
help-icon)
|
||||
|
@ -125,7 +125,7 @@
|
|||
:for (name input-name)} label
|
||||
|
||||
(when is-checkbox?
|
||||
[:span {:class (stl/css-case :global/checked checked?)} (when checked? i/status-tick-refactor)])
|
||||
[:span {:class (stl/css-case :global/checked checked?)} (when checked? i/status-tick)])
|
||||
|
||||
(if is-checkbox?
|
||||
[:> :input props]
|
||||
|
@ -140,11 +140,11 @@
|
|||
|
||||
(when show-valid?
|
||||
[:span {:class (stl/css :valid-icon)}
|
||||
i/tick-refactor])
|
||||
i/tick])
|
||||
|
||||
(when show-invalid?
|
||||
[:span {:class (stl/css :invalid-icon)}
|
||||
i/close-refactor])])]
|
||||
i/close])])]
|
||||
|
||||
(some? children)
|
||||
[:label {:for (name input-name)}
|
||||
|
@ -479,7 +479,7 @@
|
|||
:caution (:caution item))}
|
||||
[:span {:class (stl/css :text)} (:text item)]
|
||||
[:button {:class (stl/css :icon)
|
||||
:on-click #(remove-item! item)} i/close-refactor]]])])]))
|
||||
:on-click #(remove-item! item)} i/close]]])])]))
|
||||
|
||||
;; --- Validators
|
||||
|
||||
|
|
|
@ -62,4 +62,4 @@
|
|||
(when (not= "" value)
|
||||
[:button {:class (stl/css :clear)
|
||||
:on-click handle-clear}
|
||||
i/delete-text-refactor])]]))
|
||||
i/delete-text])]]))
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
(when (and current-icon current-icon-ref)
|
||||
[:span {:class (stl/css :current-icon)} current-icon-ref])
|
||||
[:span {:class (stl/css :current-label)} current-label]
|
||||
[:span {:class (stl/css :dropdown-button)} i/arrow-refactor]
|
||||
[:span {:class (stl/css :dropdown-button)} i/arrow]
|
||||
[:& dropdown {:show is-open? :on-close close-dropdown}
|
||||
[:ul {:ref dropdown-element* :data-direction @dropdown-direction*
|
||||
:class (dm/str dropdown-class " " (stl/css :custom-select-dropdown))}
|
||||
|
@ -126,4 +126,4 @@
|
|||
:on-click select-item}
|
||||
(when (and icon icon-ref) [:span {:class (stl/css :icon)} icon-ref])
|
||||
[:span {:class (stl/css :label)} label]
|
||||
[:span {:class (stl/css :check-icon)} i/tick-refactor]])))]]])))
|
||||
[:span {:class (stl/css :check-icon)} i/tick]])))]]])))
|
||||
|
|
|
@ -17,49 +17,49 @@
|
|||
[{:keys [shape main-instance?]}]
|
||||
(if (ctk/instance-head? shape)
|
||||
(if main-instance?
|
||||
i/component-refactor
|
||||
i/copy-refactor)
|
||||
i/component
|
||||
i/component-copy)
|
||||
(case (:type shape)
|
||||
:frame (cond
|
||||
(and (ctl/flex-layout? shape) (ctl/col? shape))
|
||||
i/flex-horizontal-refactor
|
||||
i/flex-horizontal
|
||||
|
||||
(and (ctl/flex-layout? shape) (ctl/row? shape))
|
||||
i/flex-vertical-refactor
|
||||
i/flex-vertical
|
||||
|
||||
(ctl/grid-layout? shape)
|
||||
i/flex-grid-refactor
|
||||
i/flex-grid
|
||||
|
||||
:else
|
||||
i/board-refactor)
|
||||
i/board)
|
||||
;; TODO -> THUMBNAIL ICON
|
||||
:image i/img-refactor
|
||||
:line (if (cts/has-images? shape) i/img-refactor i/path-refactor)
|
||||
:circle (if (cts/has-images? shape) i/img-refactor i/elipse-refactor)
|
||||
:path (if (cts/has-images? shape) i/img-refactor i/path-refactor)
|
||||
:rect (if (cts/has-images? shape) i/img-refactor i/rectangle-refactor)
|
||||
:text i/text-refactor
|
||||
:image i/img
|
||||
:line (if (cts/has-images? shape) i/img i/path)
|
||||
:circle (if (cts/has-images? shape) i/img i/elipse)
|
||||
:path (if (cts/has-images? shape) i/img i/path)
|
||||
:rect (if (cts/has-images? shape) i/img i/rectangle)
|
||||
:text i/text
|
||||
:group (if (:masked-group shape)
|
||||
i/mask-refactor
|
||||
i/group-refactor)
|
||||
i/mask
|
||||
i/group)
|
||||
:bool (case (:bool-type shape)
|
||||
:difference i/boolean-difference-refactor
|
||||
:exclude i/boolean-exclude-refactor
|
||||
:intersection i/boolean-intersection-refactor
|
||||
#_:default i/boolean-union-refactor)
|
||||
:svg-raw i/img-refactor
|
||||
:difference i/boolean-difference
|
||||
:exclude i/boolean-exclude
|
||||
:intersection i/boolean-intersection
|
||||
#_:default i/boolean-union)
|
||||
:svg-raw i/img
|
||||
nil)))
|
||||
|
||||
|
||||
(mf/defc element-icon-refactor-by-type
|
||||
[{:keys [type main-instance?] :as props}]
|
||||
(if main-instance?
|
||||
i/component-refactor
|
||||
i/component
|
||||
(case type
|
||||
:frame i/board-refactor
|
||||
:image i/img-refactor
|
||||
:shape i/path-refactor
|
||||
:text i/text-refactor
|
||||
:mask i/mask-refactor
|
||||
:group i/group-refactor
|
||||
:frame i/board
|
||||
:image i/img
|
||||
:shape i/path
|
||||
:text i/text
|
||||
:mask i/mask
|
||||
:group i/group
|
||||
nil)))
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
{:on-click handle-collapse
|
||||
:class (stl/css :collapse-sidebar)
|
||||
:aria-label (tr "workspace.sidebar.collapse")}
|
||||
i/arrow-refactor])
|
||||
i/arrow])
|
||||
[:div {:class (stl/css :tab-container-tab-wrapper)}
|
||||
(for [tab children]
|
||||
(let [props (.-props tab)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue