@uni-design-system/uni-core 6.0.1 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +134 -17
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +134 -18
- package/dist/esm/index.js.map +1 -1
- package/dist/types/concepts/component/component.types.d.ts +1 -1
- package/dist/types/concepts/component/component.types.d.ts.map +1 -1
- package/dist/types/concepts/generation/theme-file.emitter.d.ts.map +1 -1
- package/dist/types/concepts/iconography/icon.helper.d.ts +40 -0
- package/dist/types/concepts/iconography/icon.helper.d.ts.map +1 -0
- package/dist/types/concepts/iconography/icon.helper.spec.d.ts +2 -0
- package/dist/types/concepts/iconography/icon.helper.spec.d.ts.map +1 -0
- package/dist/types/concepts/iconography/icon.records.d.ts +49 -2
- package/dist/types/concepts/iconography/icon.records.d.ts.map +1 -1
- package/dist/types/concepts/iconography/icon.records.spec.d.ts +2 -0
- package/dist/types/concepts/iconography/icon.records.spec.d.ts.map +1 -0
- package/dist/types/concepts/iconography/index.d.ts +1 -2
- package/dist/types/concepts/iconography/index.d.ts.map +1 -1
- package/dist/types/concepts/theme/themes/base.theme.d.ts.map +1 -1
- package/dist/types/concepts/typography/text.model.d.ts +10 -5
- package/dist/types/concepts/typography/text.model.d.ts.map +1 -1
- package/dist/types/concepts/typography/typeface.helpers.d.ts.map +1 -1
- package/dist/types/concepts/typography/typeface.helpers.spec.d.ts +2 -0
- package/dist/types/concepts/typography/typeface.helpers.spec.d.ts.map +1 -0
- package/package.json +5 -2
- package/dist/types/concepts/iconography/icon.model.d.ts +0 -8
- package/dist/types/concepts/iconography/icon.model.d.ts.map +0 -1
- package/dist/types/concepts/iconography/icon.types.d.ts +0 -4
- package/dist/types/concepts/iconography/icon.types.d.ts.map +0 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -828,18 +828,47 @@ var generateShadows = (colors, mode = "light") => {
|
|
|
828
828
|
* with the theme automatically. `createTheme` merges a theme's own `icons`
|
|
829
829
|
* over this set — add or override under any name; components render them by
|
|
830
830
|
* token via `uni-icon`, never by inlining SVG.
|
|
831
|
+
*
|
|
832
|
+
* The set is Material Symbols Outlined at weight 300, normalized to a
|
|
833
|
+
* single `0 -960 960 960` grid so every glyph shares one optical weight.
|
|
834
|
+
*
|
|
835
|
+
* Generated by scripts/generate-icons.mjs (pnpm icons:generate). Do not edit
|
|
836
|
+
* by hand — add or change icons in that script's manifest and regenerate.
|
|
831
837
|
*/
|
|
832
838
|
var BaseIcons = {
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
839
|
+
menu: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M140-254.62v-59.99h680v59.99H140ZM140-450v-60h680v60H140Zm0-195.39v-59.99h680v59.99H140Z'/%3e%3c/svg%3e",
|
|
840
|
+
chevronUp: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m480-541.85-184 184L253.85-400 480-626.15 706.15-400 664-357.85l-184-184Z'/%3e%3c/svg%3e",
|
|
841
|
+
chevronDown: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M480-357.85 253.85-584 296-626.15l184 184 184-184L706.15-584 480-357.85Z'/%3e%3c/svg%3e",
|
|
842
|
+
chevronLeft: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M560-253.85 333.85-480 560-706.15 602.15-664l-184 184 184 184L560-253.85Z'/%3e%3c/svg%3e",
|
|
843
|
+
chevronRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m517.85-480-184-184L376-706.15 602.15-480 376-253.85 333.85-296l184-184Z'/%3e%3c/svg%3e",
|
|
844
|
+
arrowLeft: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m294.92-450 227.85 227.85L480-180 180-480l300-300 42.77 42.15L294.92-510H780v60H294.92Z'/%3e%3c/svg%3e",
|
|
845
|
+
arrowRight: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M665.08-450H180v-60h485.08L437.23-737.85 480-780l300 300-300 300-42.77-42.15L665.08-450Z'/%3e%3c/svg%3e",
|
|
846
|
+
home: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M240-200h133.85v-237.69h212.3V-200H720v-360L480-740.77 240-560v360Zm-60 60v-450l300-225.77L780-590v450H526.15v-237.69h-92.3V-140H180Zm300-330.38Z'/%3e%3c/svg%3e",
|
|
847
|
+
externalLink: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M212.31-140Q182-140 161-161q-21-21-21-51.31v-535.38Q140-778 161-799q21-21 51.31-21h252.3v60h-252.3q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v535.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h535.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-252.3h60v252.3Q820-182 799-161q-21 21-51.31 21H212.31Zm176.46-206.62-42.15-42.15L717.85-760H560v-60h260v260h-60v-157.85L388.77-346.62Z'/%3e%3c/svg%3e",
|
|
848
|
+
search: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M781.69-136.92 530.46-388.16q-30 24.77-69 38.77-39 14-80.69 14-102.46 0-173.54-71.07-71.07-71.08-71.07-173.54t71.07-173.54q71.08-71.07 173.54-71.07t173.54 71.07q71.07 71.08 71.07 173.54 0 42.85-14.38 81.85-14.39 39-38.39 67.84l251.23 251.23-42.15 42.16ZM380.77-395.38q77.31 0 130.96-53.66 53.66-53.65 53.66-130.96t-53.66-130.96q-53.65-53.66-130.96-53.66t-130.96 53.66Q196.15-657.31 196.15-580t53.66 130.96q53.65 53.66 130.96 53.66Z'/%3e%3c/svg%3e",
|
|
849
|
+
close: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M256-213.85 213.85-256l224-224-224-224L256-746.15l224 224 224-224L746.15-704l-224 224 224 224L704-213.85l-224-224-224 224Z'/%3e%3c/svg%3e",
|
|
850
|
+
plus: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M450-450H220v-60h230v-230h60v230h230v60H510v230h-60v-230Z'/%3e%3c/svg%3e",
|
|
851
|
+
minus: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M220-450v-60h520v60H220Z'/%3e%3c/svg%3e",
|
|
852
|
+
more: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M480-189.23q-24.75 0-42.37-17.63Q420-224.48 420-249.23q0-24.75 17.63-42.38 17.62-17.62 42.37-17.62 24.75 0 42.37 17.62Q540-273.98 540-249.23q0 24.75-17.63 42.37-17.62 17.63-42.37 17.63ZM480-420q-24.75 0-42.37-17.63Q420-455.25 420-480q0-24.75 17.63-42.37Q455.25-540 480-540q24.75 0 42.37 17.63Q540-504.75 540-480q0 24.75-17.63 42.37Q504.75-420 480-420Zm0-230.77q-24.75 0-42.37-17.62Q420-686.02 420-710.77q0-24.75 17.63-42.37 17.62-17.63 42.37-17.63 24.75 0 42.37 17.63Q540-735.52 540-710.77q0 24.75-17.63 42.38-17.62 17.62-42.37 17.62Z'/%3e%3c/svg%3e",
|
|
853
|
+
delete: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M292.31-140q-29.92 0-51.12-21.19Q220-182.39 220-212.31V-720h-40v-60h180v-35.38h240V-780h180v60h-40v507.69Q740-182 719-161q-21 21-51.31 21H292.31ZM680-720H280v507.69q0 5.39 3.46 8.85t8.85 3.46h375.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46V-720ZM376.16-280h59.99v-360h-59.99v360Zm147.69 0h59.99v-360h-59.99v360ZM280-720v520-520Z'/%3e%3c/svg%3e",
|
|
854
|
+
edit: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M200-200h50.46l409.46-409.46-50.46-50.46L200-250.46V-200Zm-60 60v-135.38l527.62-527.39q9.07-8.24 20.03-12.73 10.97-4.5 23-4.5t23.3 4.27q11.28 4.27 19.97 13.58l48.85 49.46q9.31 8.69 13.27 20 3.96 11.31 3.96 22.62 0 12.07-4.12 23.03-4.12 10.97-13.11 20.04L275.38-140H140Zm620.38-570.15-50.23-50.23 50.23 50.23Zm-126.13 75.9-24.79-25.67 50.46 50.46-25.67-24.79Z'/%3e%3c/svg%3e",
|
|
855
|
+
download: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M480-328.46 309.23-499.23l42.16-43.38L450-444v-336h60v336l98.61-98.61 42.16 43.38L480-328.46ZM252.31-180Q222-180 201-201q-21-21-21-51.31v-108.46h60v108.46q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h455.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-108.46h60v108.46Q780-222 759-201q-21 21-51.31 21H252.31Z'/%3e%3c/svg%3e",
|
|
856
|
+
upload: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M450-328.46v-336l-98.61 98.61-42.16-43.38L480-780l170.77 170.77-42.16 43.38L510-664.46v336h-60ZM252.31-180Q222-180 201-201q-21-21-21-51.31v-108.46h60v108.46q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85h455.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-108.46h60v108.46Q780-222 759-201q-21 21-51.31 21H252.31Z'/%3e%3c/svg%3e",
|
|
857
|
+
share: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M672.22-100q-44.91 0-76.26-31.41-31.34-31.41-31.34-76.28 0-6 4.15-29.16L284.31-404.31q-14.46 15-34.36 23.5t-42.64 8.5q-44.71 0-76.01-31.54Q100-435.39 100-480q0-44.61 31.3-76.15 31.3-31.54 76.01-31.54 22.74 0 42.64 8.5 19.9 8.5 34.36 23.5l284.46-167.08q-2.38-7.38-3.27-14.46-.88-7.08-.88-15.08 0-44.87 31.43-76.28Q627.49-860 672.4-860t76.25 31.44Q780-797.13 780-752.22q0 44.91-31.41 76.26-31.41 31.34-76.28 31.34-22.85 0-42.5-8.69Q610.15-662 595.69-677L311.23-509.54q2.38 7.39 3.27 14.46.88 7.08.88 15.08t-.88 15.08q-.89 7.07-3.27 14.46L595.69-283q14.46-15 34.12-23.69 19.65-8.69 42.5-8.69 44.87 0 76.28 31.43Q780-252.51 780-207.6t-31.44 76.25Q717.13-100 672.22-100Zm.09-60q20.27 0 33.98-13.71Q720-187.42 720-207.69q0-20.27-13.71-33.98-13.71-13.72-33.98-13.72-20.27 0-33.98 13.72-13.72 13.71-13.72 33.98 0 20.27 13.72 33.98Q652.04-160 672.31-160Zm-465-272.31q20.43 0 34.25-13.8 13.83-13.81 13.83-33.89t-13.83-33.89q-13.82-13.8-34.25-13.8-20.11 0-33.71 13.8Q160-500.08 160-480t13.6 33.89q13.6 13.8 33.71 13.8Zm498.88-286.02Q720-732.04 720-752.31q0-20.27-13.71-33.98Q692.58-800 672.31-800q-20.27 0-33.98 13.71-13.72 13.71-13.72 33.98 0 20.27 13.81 33.98 13.81 13.72 33.89 13.72 20.07 0 33.88-13.72Zm-33.88 510.64ZM207.69-480Zm464.62-272.31Z'/%3e%3c/svg%3e",
|
|
858
|
+
filter: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M411.15-260v-60h137.31v60H411.15ZM256.16-450v-60h447.3v60h-447.3ZM140-640v-60h680v60H140Z'/%3e%3c/svg%3e",
|
|
859
|
+
check: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M382-253.85 168.62-467.23 211.38-510 382-339.38 748.62-706l42.76 42.77L382-253.85Z'/%3e%3c/svg%3e",
|
|
860
|
+
checkCircle: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m423.23-309.85 268.92-268.92L650-620.92 423.23-394.15l-114-114L267.08-466l156.15 156.15ZM480.07-100q-78.84 0-148.21-29.92t-120.68-81.21q-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.92t120.68 81.21q51.31 51.29 81.25 120.63Q860-558.9 860-480.07q0 78.84-29.92 148.21t-81.21 120.68q-51.29 51.31-120.63 81.25Q558.9-100 480.07-100Zm-.07-60q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3e%3c/svg%3e",
|
|
861
|
+
xCircle: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m336-293.85 144-144 144 144L666.15-336l-144-144 144-144L624-666.15l-144 144-144-144L293.85-624l144 144-144 144L336-293.85ZM480.07-100q-78.84 0-148.21-29.92t-120.68-81.21q-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.92t120.68 81.21q51.31 51.29 81.25 120.63Q860-558.9 860-480.07q0 78.84-29.92 148.21t-81.21 120.68q-51.29 51.31-120.63 81.25Q558.9-100 480.07-100Zm-.07-60q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3e%3c/svg%3e",
|
|
862
|
+
alertCircle: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M502.92-300.15q9.39-9.39 9.39-22.93T502.92-346q-9.38-9.38-22.92-9.38-13.54 0-22.92 9.38-9.39 9.38-9.39 22.92 0 13.54 9.39 22.93 9.38 9.38 22.92 9.38 13.54 0 22.92-9.38ZM450-436.92h60v-240h-60v240ZM480.07-100q-78.84 0-148.21-29.92t-120.68-81.21q-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.92t120.68 81.21q51.31 51.29 81.25 120.63Q860-558.9 860-480.07q0 78.84-29.92 148.21t-81.21 120.68q-51.29 51.31-120.63 81.25Q558.9-100 480.07-100Zm-.07-60q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3e%3c/svg%3e",
|
|
863
|
+
info: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M450-290h60v-230h-60v230Zm52.92-307.75q9.39-9.29 9.39-23.02t-9.29-23.02q-9.29-9.28-23.02-9.28t-23.02 9.28q-9.29 9.29-9.29 23.02t9.39 23.02q9.38 9.29 22.92 9.29 13.54 0 22.92-9.29ZM480.07-100q-78.84 0-148.21-29.92t-120.68-81.21q-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.92t120.68 81.21q51.31 51.29 81.25 120.63Q860-558.9 860-480.07q0 78.84-29.92 148.21t-81.21 120.68q-51.29 51.31-120.63 81.25Q558.9-100 480.07-100Zm-.07-60q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3e%3c/svg%3e",
|
|
864
|
+
warning: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M74.62-140 480-840l405.38 700H74.62ZM178-200h604L480-720 178-200Zm324.92-57.08q9.39-9.38 9.39-22.92 0-13.54-9.39-22.92-9.38-9.39-22.92-9.39-13.54 0-22.92 9.39-9.39 9.38-9.39 22.92 0 13.54 9.39 22.92 9.38 9.39 22.92 9.39 13.54 0 22.92-9.39ZM450-352.31h60v-200h-60v200ZM480-460Z'/%3e%3c/svg%3e",
|
|
865
|
+
lock: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M252.31-100q-29.92 0-51.12-21.19Q180-142.39 180-172.31v-375.38q0-29.92 21.19-51.12Q222.39-620 252.31-620H300v-80q0-74.92 52.54-127.46Q405.08-880 480-880q74.92 0 127.46 52.54Q660-774.92 660-700v80h47.69q29.92 0 51.12 21.19Q780-577.61 780-547.69v375.38q0 29.92-21.19 51.12Q737.61-100 707.69-100H252.31Zm0-60h455.38q5.39 0 8.85-3.46t3.46-8.85v-375.38q0-5.39-3.46-8.85t-8.85-3.46H252.31q-5.39 0-8.85 3.46t-3.46 8.85v375.38q0 5.39 3.46 8.85t8.85 3.46Zm277.27-150.42Q550-330.85 550-360t-20.42-49.58Q509.15-430 480-430t-49.58 20.42Q410-389.15 410-360t20.42 49.58Q450.85-290 480-290t49.58-20.42ZM360-620h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80ZM240-160v-400 400Z'/%3e%3c/svg%3e",
|
|
866
|
+
profile: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M381.04-533.35Q340-574.38 340-632.31q0-57.92 41.04-98.96 41.04-41.04 98.96-41.04 57.92 0 98.96 41.04Q620-690.23 620-632.31q0 57.93-41.04 98.96-41.04 41.04-98.96 41.04-57.92 0-98.96-41.04ZM180-187.69v-88.93q0-29.38 15.96-54.42 15.96-25.04 42.66-38.5 59.3-29.07 119.65-43.61 60.35-14.54 121.73-14.54t121.73 14.54q60.35 14.54 119.65 43.61 26.7 13.46 42.66 38.5Q780-306 780-276.62v88.93H180Zm60-60h480v-28.93q0-12.15-7.04-22.5-7.04-10.34-19.11-16.88-51.7-25.46-105.42-38.58Q534.7-367.69 480-367.69q-54.7 0-108.43 13.11-53.72 13.12-105.42 38.58-12.07 6.54-19.11 16.88-7.04 10.35-7.04 22.5v28.93Zm296.5-328.12q23.5-23.5 23.5-56.5t-23.5-56.5q-23.5-23.5-56.5-23.5t-56.5 23.5q-23.5 23.5-23.5 56.5t23.5 56.5q23.5 23.5 56.5 23.5t56.5-23.5Zm-56.5-56.5Zm0 384.62Z'/%3e%3c/svg%3e",
|
|
867
|
+
settings: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m387.69-100-15.23-121.85q-16.07-5.38-32.96-15.07-16.88-9.7-30.19-20.77L196.46-210l-92.3-160 97.61-73.77q-1.38-8.92-1.96-17.92-.58-9-.58-17.93 0-8.53.58-17.34t1.96-19.27L104.16-590l92.3-159.23 112.46 47.31q14.47-11.46 30.89-20.96t32.27-15.27L387.69-860h184.62l15.23 122.23q18 6.54 32.57 15.27 14.58 8.73 29.43 20.58l114-47.31L855.84-590l-99.15 74.92q2.15 9.69 2.35 18.12.19 8.42.19 16.96 0 8.15-.39 16.58-.38 8.42-2.76 19.27L854.46-370l-92.31 160-112.61-48.08q-14.85 11.85-30.31 20.96-15.46 9.12-31.69 14.89L572.31-100H387.69ZM440-160h78.62L533-267.15q30.62-8 55.96-22.73 25.35-14.74 48.89-37.89L737.23-286l39.39-68-86.77-65.38q5-15.54 6.8-30.47 1.81-14.92 1.81-30.15 0-15.62-1.81-30.15-1.8-14.54-6.8-29.7L777.38-606 738-674l-100.54 42.38q-20.08-21.46-48.11-37.92-28.04-16.46-56.73-23.31L520-800h-79.38l-13.24 106.77q-30.61 7.23-56.53 22.15-25.93 14.93-49.47 38.46L222-674l-39.38 68L269-541.62q-5 14.24-7 29.62t-2 32.38q0 15.62 2 30.62 2 15 6.62 29.62l-86 65.38L222-286l99-42q22.77 23.38 48.69 38.31 25.93 14.92 57.31 22.92L440-160Zm40.46-200q49.92 0 84.96-35.04 35.04-35.04 35.04-84.96 0-49.92-35.04-84.96Q530.38-600 480.46-600q-50.54 0-85.27 35.04T360.46-480q0 49.92 34.73 84.96Q429.92-360 480.46-360ZM480-480Z'/%3e%3c/svg%3e",
|
|
868
|
+
notification: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M180-204.62v-59.99h72.31v-298.47q0-80.69 49.81-142.69 49.8-62 127.88-79.31V-810q0-20.83 14.57-35.42Q459.14-860 479.95-860q20.82 0 35.43 14.58Q530-830.83 530-810v24.92q78.08 17.31 127.88 79.31 49.81 62 49.81 142.69v298.47H780v59.99H180Zm300-293.07Zm-.07 405.38q-29.85 0-51.04-21.24-21.2-21.24-21.2-51.07h144.62q0 29.93-21.26 51.12-21.26 21.19-51.12 21.19Zm-167.62-172.3h335.38v-298.47q0-69.46-49.11-118.57-49.12-49.12-118.58-49.12-69.46 0-118.58 49.12-49.11 49.11-49.11 118.57v298.47Z'/%3e%3c/svg%3e",
|
|
869
|
+
favorite: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='m480-146.93-44.15-39.69q-99.46-90.23-164.5-155.07-65.04-64.85-103.08-115.43-38.04-50.57-53.15-92.27Q100-591.08 100-634q0-85.15 57.42-142.58Q214.85-834 300-834q52.38 0 99 24.5t81 70.27q34.38-45.77 81-70.27 46.62-24.5 99-24.5 85.15 0 142.58 57.42Q860-719.15 860-634q0 42.92-15.12 84.61-15.11 41.7-53.15 92.27-38.04 50.58-102.89 115.43Q624-276.85 524.15-186.62L480-146.93Zm0-81.07q96-86.38 158-148.08 62-61.69 98-107.19t50-80.81q14-35.3 14-69.92 0-60-40-100t-100-40q-47.38 0-87.58 26.88-40.19 26.89-63.65 74.81h-57.54q-23.85-48.31-63.85-75Q347.38-774 300-774q-59.62 0-99.81 40Q160-694 160-634q0 34.62 14 69.92 14 35.31 50 80.81t98 107q62 61.5 158 148.27Zm0-273Z'/%3e%3c/svg%3e",
|
|
870
|
+
help: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M508.5-267.21q11.81-11.83 11.81-28.97 0-17.13-11.83-28.94-11.83-11.8-28.96-11.8-17.13 0-28.94 11.83-11.81 11.83-11.81 28.96 0 17.13 11.83 28.94 11.83 11.8 28.96 11.8 17.13 0 28.94-11.82Zm-57.27-131.41h56.31q.77-29.53 8.65-47.19 7.89-17.65 38.27-46.8 26.39-26.39 40.42-48.74 14.04-22.34 14.04-52.77 0-51.65-37.11-80.69-37.12-29.03-87.81-29.03-50.08 0-82.88 26.73-32.81 26.73-46.81 62.96l51.38 20.61q7.31-19.92 25-38.81 17.69-18.88 52.54-18.88 35.46 0 52.42 19.42 16.97 19.43 16.97 42.73 0 20.39-11.62 37.31-11.61 16.92-29.61 32.69-39.39 35.54-49.77 56.7-10.39 21.15-10.39 63.76ZM480.07-100q-78.84 0-148.21-29.92t-120.68-81.21q-51.31-51.29-81.25-120.63Q100-401.1 100-479.93q0-78.84 29.92-148.21t81.21-120.68q51.29-51.31 120.63-81.25Q401.1-860 479.93-860q78.84 0 148.21 29.92t120.68 81.21q51.31 51.29 81.25 120.63Q860-558.9 860-480.07q0 78.84-29.92 148.21t-81.21 120.68q-51.29 51.31-120.63 81.25Q558.9-100 480.07-100Zm-.07-60q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z'/%3e%3c/svg%3e",
|
|
871
|
+
calendar: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960'%3e%3cpath d='M212.31-100Q182-100 161-121q-21-21-21-51.31v-535.38Q140-738 161-759q21-21 51.31-21h55.38v-84.61h61.54V-780h303.08v-84.61h60V-780h55.38Q778-780 799-759q21 21 21 51.31v535.38Q820-142 799-121q-21 21-51.31 21H212.31Zm0-60h535.38q4.62 0 8.46-3.85 3.85-3.84 3.85-8.46v-375.38H200v375.38q0 4.62 3.85 8.46 3.84 3.85 8.46 3.85ZM200-607.69h560v-100q0-4.62-3.85-8.46-3.84-3.85-8.46-3.85H212.31q-4.62 0-8.46 3.85-3.85 3.84-3.85 8.46v100Zm0 0V-720v112.31Zm280 210.77q-14.69 0-25.04-10.35-10.34-10.34-10.34-25.04 0-14.69 10.34-25.04 10.35-10.34 25.04-10.34t25.04 10.34q10.34 10.35 10.34 25.04 0 14.7-10.34 25.04-10.35 10.35-25.04 10.35Zm-185.04-10.35q-10.34-10.34-10.34-25.04 0-14.69 10.34-25.04 10.35-10.34 25.04-10.34t25.04 10.34q10.34 10.35 10.34 25.04 0 14.7-10.34 25.04-10.35 10.35-25.04 10.35t-25.04-10.35ZM640-396.92q-14.69 0-25.04-10.35-10.34-10.34-10.34-25.04 0-14.69 10.34-25.04 10.35-10.34 25.04-10.34t25.04 10.34q10.34 10.35 10.34 25.04 0 14.7-10.34 25.04-10.35 10.35-25.04 10.35ZM480-240q-14.69 0-25.04-10.35-10.34-10.34-10.34-25.03 0-14.7 10.34-25.04 10.35-10.35 25.04-10.35t25.04 10.35q10.34 10.34 10.34 25.04 0 14.69-10.34 25.03Q494.69-240 480-240Zm-185.04-10.35q-10.34-10.34-10.34-25.03 0-14.7 10.34-25.04 10.35-10.35 25.04-10.35t25.04 10.35q10.34 10.34 10.34 25.04 0 14.69-10.34 25.03Q334.69-240 320-240t-25.04-10.35ZM640-240q-14.69 0-25.04-10.35-10.34-10.34-10.34-25.03 0-14.7 10.34-25.04 10.35-10.35 25.04-10.35t25.04 10.35q10.34 10.34 10.34 25.04 0 14.69-10.34 25.03Q654.69-240 640-240Z'/%3e%3c/svg%3e",
|
|
843
872
|
spinner: "data:image/svg+xml;charset=UTF-8,%3csvg stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' %3e%3cstyle%3e .oui_spinner %7b transform-origin: center; animation: rotate_360 2s linear infinite;%7d .oui_spinner circle %7b stroke-linecap: round; animation: dash 1.5s ease-in-out infinite;%7d %40keyframes rotate_360 %7b 100%25 %7b transform: rotate(360deg);%7d %7d %40keyframes dash %7b 0%25 %7b stroke-dasharray: 0 150; stroke-dashoffset: 0;%7d 47.5%25 %7b stroke-dasharray: 42 150; stroke-dashoffset: -16;%7d 95%25, 100%25 %7b stroke-dasharray: 42 150; stroke-dashoffset: -59;%7d %7d %3c/style%3e%3cg class='oui_spinner'%3e%3ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3e%3c/circle%3e%3c/g%3e%3c/svg%3e "
|
|
844
873
|
};
|
|
845
874
|
//#endregion
|
|
@@ -1007,7 +1036,7 @@ var BaseShadows = {
|
|
|
1007
1036
|
warn: "0 0 5px rgba(255, 0, 0, 0.5), inset 0 0 5px rgba(255, 0, 0, 0.3)"
|
|
1008
1037
|
};
|
|
1009
1038
|
var BaseSpacing = {
|
|
1010
|
-
none:
|
|
1039
|
+
none: 0,
|
|
1011
1040
|
xxs: "2px",
|
|
1012
1041
|
xs: "4px",
|
|
1013
1042
|
sm: "8px",
|
|
@@ -1159,6 +1188,17 @@ var buildComponents = (c) => ({
|
|
|
1159
1188
|
backdropFilter: "blur(2px)"
|
|
1160
1189
|
}
|
|
1161
1190
|
} },
|
|
1191
|
+
dialogButtons: { options: {
|
|
1192
|
+
gap: "md",
|
|
1193
|
+
padding: "md",
|
|
1194
|
+
paddingBottom: "lg",
|
|
1195
|
+
justifyContent: "center",
|
|
1196
|
+
confirmButtonVariant: "primary",
|
|
1197
|
+
cancelButtonVariant: "warn",
|
|
1198
|
+
buttonSize: "lg",
|
|
1199
|
+
stretch: false,
|
|
1200
|
+
reverseOrder: false
|
|
1201
|
+
} },
|
|
1162
1202
|
dialogHeader: { options: {
|
|
1163
1203
|
borderRadius: "max",
|
|
1164
1204
|
color: "primary",
|
|
@@ -1825,11 +1865,22 @@ var emitThemeFile = (input) => {
|
|
|
1825
1865
|
"const components = (colors: Colors): ComponentThemes => ({});",
|
|
1826
1866
|
"",
|
|
1827
1867
|
"/**",
|
|
1828
|
-
" * Icon primitives, merged over the built-in set
|
|
1829
|
-
" *
|
|
1830
|
-
" *
|
|
1831
|
-
" *
|
|
1832
|
-
" *
|
|
1868
|
+
" * Icon primitives, merged over the built-in 34-icon set per name: reuse a",
|
|
1869
|
+
" * built-in name to reskin it, or add any new name. Define an icon ONCE here",
|
|
1870
|
+
" * and render it anywhere via `<uni-icon name='…'/>` — never inline SVG in",
|
|
1871
|
+
" * components.",
|
|
1872
|
+
" *",
|
|
1873
|
+
" * Encode your own SVGs with `svgToIconUri` rather than by hand — it strips",
|
|
1874
|
+
" * fixed width/height, escapes the URI and rejects artwork that cannot",
|
|
1875
|
+
" * survive masking:",
|
|
1876
|
+
" *",
|
|
1877
|
+
" * import { svgToIconUri } from '@uni-design-system/uni-core';",
|
|
1878
|
+
" * const icons: Icons = { logo: svgToIconUri(readFileSync('logo.svg', 'utf8')) };",
|
|
1879
|
+
" *",
|
|
1880
|
+
" * Icons are masked with currentColor, so they recolor with the theme — but",
|
|
1881
|
+
" * that also means they are MONOCHROME: the mask uses the alpha channel, so a",
|
|
1882
|
+
" * multi-color mark flattens to its silhouette. Keep one grid (viewBox) across",
|
|
1883
|
+
" * your set, or the glyphs will not share an optical weight.",
|
|
1833
1884
|
" */",
|
|
1834
1885
|
"const icons: Icons = {};",
|
|
1835
1886
|
"",
|
|
@@ -1860,6 +1911,71 @@ function gradient(config) {
|
|
|
1860
1911
|
return ``;
|
|
1861
1912
|
}
|
|
1862
1913
|
//#endregion
|
|
1914
|
+
//#region src/concepts/iconography/icon.helper.ts
|
|
1915
|
+
/** Paint values that produce no pixels, and so never count as a color. */
|
|
1916
|
+
var BLANK_PAINT = new Set([
|
|
1917
|
+
"none",
|
|
1918
|
+
"transparent",
|
|
1919
|
+
"inherit",
|
|
1920
|
+
""
|
|
1921
|
+
]);
|
|
1922
|
+
/** Collect every distinct paint value the artwork actually renders with. */
|
|
1923
|
+
function paintValues(svg) {
|
|
1924
|
+
const found = /* @__PURE__ */ new Set();
|
|
1925
|
+
for (const [, value] of svg.matchAll(/\b(?:fill|stroke)\s*=\s*["']([^"']*)["']/g)) {
|
|
1926
|
+
const paint = value.trim().toLowerCase();
|
|
1927
|
+
if (!BLANK_PAINT.has(paint)) found.add(paint);
|
|
1928
|
+
}
|
|
1929
|
+
for (const [, , value] of svg.matchAll(/\b(fill|stroke)\s*:\s*([^;"'}]+)/g)) {
|
|
1930
|
+
const paint = value.trim().toLowerCase();
|
|
1931
|
+
if (!BLANK_PAINT.has(paint)) found.add(paint);
|
|
1932
|
+
}
|
|
1933
|
+
return [...found];
|
|
1934
|
+
}
|
|
1935
|
+
/**
|
|
1936
|
+
* Strip everything that stops an SVG scaling to the box it is masked into, and
|
|
1937
|
+
* collapse it to one line. Fixed `width`/`height` are removed rather than
|
|
1938
|
+
* rejected — designers export them by default and they carry no information
|
|
1939
|
+
* the `viewBox` doesn't already have.
|
|
1940
|
+
*/
|
|
1941
|
+
function normalize(svg) {
|
|
1942
|
+
return svg.replace(/<\?xml[^>]*\?>/g, "").replace(/<!DOCTYPE[^>]*>/gi, "").replace(/<!--[\s\S]*?-->/g, "").replace(/\s(width|height)\s*=\s*["'][^"']*["']/g, "").replace(/\s+/g, " ").replace(/>\s+</g, "><").trim();
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Percent-encode only what a data URI requires. SVG attributes are switched to
|
|
1946
|
+
* single quotes so the result drops straight into a double-quoted TypeScript
|
|
1947
|
+
* string with no escaping — and stays readable, unlike base64.
|
|
1948
|
+
*/
|
|
1949
|
+
function encode(svg) {
|
|
1950
|
+
return "data:image/svg+xml," + svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3c").replace(/>/g, "%3e");
|
|
1951
|
+
}
|
|
1952
|
+
/**
|
|
1953
|
+
* Encode an SVG string as a mask-ready icon data URI, validating that it will
|
|
1954
|
+
* actually survive the mask pipeline.
|
|
1955
|
+
*
|
|
1956
|
+
* Throws when the source is not a complete `<svg>` document, has no `viewBox`
|
|
1957
|
+
* (it could not scale), references an external or raster image, or paints in
|
|
1958
|
+
* more than one color (see {@link SvgToIconUriOptions.allowMultiColor}).
|
|
1959
|
+
*/
|
|
1960
|
+
function svgToIconUri(svg, options = {}) {
|
|
1961
|
+
const label = options.name ? `${options.name}: ` : "";
|
|
1962
|
+
const fail = (message) => {
|
|
1963
|
+
throw new Error(`${label}${message}`);
|
|
1964
|
+
};
|
|
1965
|
+
if (typeof svg !== "string" || !svg.trim()) fail("empty SVG source");
|
|
1966
|
+
const normalized = normalize(svg);
|
|
1967
|
+
if (!/^<svg[\s>]/i.test(normalized) || !/<\/svg>$/i.test(normalized)) fail("not a complete <svg> document");
|
|
1968
|
+
if (!/\bviewBox\s*=\s*["'][^"']+["']/i.test(normalized)) fail("no viewBox — the icon could not scale to its container");
|
|
1969
|
+
if (/<image\b/i.test(normalized)) fail("contains a raster <image>; masks need vector artwork");
|
|
1970
|
+
if (/\b(?:xlink:)?href\s*=\s*["'](?!#)/i.test(normalized)) fail("references an external resource, which a masked SVG cannot load");
|
|
1971
|
+
if (!options.allowMultiColor) {
|
|
1972
|
+
const paints = paintValues(normalized);
|
|
1973
|
+
if (paints.some((p) => p.startsWith("url("))) fail("paints with a gradient or pattern — masks use the alpha channel only, so it would flatten to a silhouette. Pass { allowMultiColor: true } to accept that.");
|
|
1974
|
+
if (paints.length > 1) fail(`paints in ${paints.length} colors (${paints.join(", ")}) — masks use the alpha channel only, so it would flatten to a silhouette in currentColor. Pass { allowMultiColor: true } to accept that.`);
|
|
1975
|
+
}
|
|
1976
|
+
return encode(normalized);
|
|
1977
|
+
}
|
|
1978
|
+
//#endregion
|
|
1863
1979
|
//#region src/concepts/layout/layout.helper.ts
|
|
1864
1980
|
function getDeviceSize(height, width) {
|
|
1865
1981
|
if (!height || !width) return "md";
|
|
@@ -2007,7 +2123,7 @@ var FontWeightMap = {
|
|
|
2007
2123
|
};
|
|
2008
2124
|
//#endregion
|
|
2009
2125
|
//#region src/concepts/typography/typeface.helpers.ts
|
|
2010
|
-
var px = (value) => `${value}px
|
|
2126
|
+
var px = (value) => typeof value === "number" ? `${value}px` : value;
|
|
2011
2127
|
/**
|
|
2012
2128
|
* Converts a TextStyle (numeric, design-token oriented) into a
|
|
2013
2129
|
* TypeFaceDefinition (CSS-ready) so a theme's `typefaces` map can be
|
|
@@ -2099,6 +2215,7 @@ exports.relativeLuminance = relativeLuminance;
|
|
|
2099
2215
|
exports.removeInputPlatformStyling = removeInputPlatformStyling;
|
|
2100
2216
|
exports.rgbToHex = rgbToHex;
|
|
2101
2217
|
exports.schemeHues = schemeHues;
|
|
2218
|
+
exports.svgToIconUri = svgToIconUri;
|
|
2102
2219
|
exports.toTypeface = toTypeface;
|
|
2103
2220
|
exports.toTypefaces = toTypefaces;
|
|
2104
2221
|
exports.uniColor = uniColor;
|