@symbo.ls/uikit 2.11.226 → 2.11.229
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/index.cjs.js +208 -111
- package/dist/index.cjs.js.map +3 -3
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1383,7 +1383,9 @@ var require_cjs = __commonJS({
|
|
|
1383
1383
|
appendIconsSprite: () => appendIconsSprite2,
|
|
1384
1384
|
appendSVGSprite: () => appendSVGSprite2,
|
|
1385
1385
|
applyDocument: () => applyDocument,
|
|
1386
|
+
applyGlobalVars: () => applyGlobalVars,
|
|
1386
1387
|
applyHeadings: () => applyHeadings,
|
|
1388
|
+
applyMediaSequenceVars: () => applyMediaSequenceVars,
|
|
1387
1389
|
applyReset: () => applyReset,
|
|
1388
1390
|
applySequenceVars: () => applySequenceVars,
|
|
1389
1391
|
applySpacingSequence: () => applySpacingSequence,
|
|
@@ -1416,6 +1418,8 @@ var require_cjs = __commonJS({
|
|
|
1416
1418
|
getShadow: () => getShadow,
|
|
1417
1419
|
getSpacingBasedOnRatio: () => getSpacingBasedOnRatio4,
|
|
1418
1420
|
getSpacingByKey: () => getSpacingByKey3,
|
|
1421
|
+
getSubratio: () => getSubratio,
|
|
1422
|
+
getSubratioDifference: () => getSubratioDifference,
|
|
1419
1423
|
getTheme: () => getTheme,
|
|
1420
1424
|
getTimingByKey: () => getTimingByKey2,
|
|
1421
1425
|
getTimingFunction: () => getTimingFunction3,
|
|
@@ -1423,6 +1427,7 @@ var require_cjs = __commonJS({
|
|
|
1423
1427
|
hexToRgbArray: () => hexToRgbArray,
|
|
1424
1428
|
hexToRgba: () => hexToRgba,
|
|
1425
1429
|
hslToRgb: () => hslToRgb,
|
|
1430
|
+
isScalingUnit: () => isScalingUnit,
|
|
1426
1431
|
mixTwoColors: () => mixTwoColors,
|
|
1427
1432
|
mixTwoRgb: () => mixTwoRgb,
|
|
1428
1433
|
mixTwoRgba: () => mixTwoRgba,
|
|
@@ -1448,7 +1453,9 @@ var require_cjs = __commonJS({
|
|
|
1448
1453
|
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
1449
1454
|
setMediaTheme: () => setMediaTheme,
|
|
1450
1455
|
setSVG: () => setSVG,
|
|
1456
|
+
setScalingVar: () => setScalingVar,
|
|
1451
1457
|
setShadow: () => setShadow,
|
|
1458
|
+
setSubScalingVar: () => setSubScalingVar,
|
|
1452
1459
|
setTheme: () => setTheme,
|
|
1453
1460
|
setValue: () => setValue,
|
|
1454
1461
|
setVariables: () => setVariables,
|
|
@@ -1465,6 +1472,8 @@ var require_cjs = __commonJS({
|
|
|
1465
1472
|
module2.exports = __toCommonJS2(src_exports);
|
|
1466
1473
|
var utils_exports = {};
|
|
1467
1474
|
__export2(utils_exports, {
|
|
1475
|
+
applyGlobalVars: () => applyGlobalVars,
|
|
1476
|
+
applyMediaSequenceVars: () => applyMediaSequenceVars,
|
|
1468
1477
|
applySequenceVars: () => applySequenceVars,
|
|
1469
1478
|
changeLightness: () => changeLightness,
|
|
1470
1479
|
colorStringToRgbaArray: () => colorStringToRgbaArray,
|
|
@@ -1484,10 +1493,13 @@ var require_cjs = __commonJS({
|
|
|
1484
1493
|
getRgbTone: () => getRgbTone,
|
|
1485
1494
|
getSequenceValue: () => getSequenceValue,
|
|
1486
1495
|
getSequenceValuePropertyPair: () => getSequenceValuePropertyPair,
|
|
1496
|
+
getSubratio: () => getSubratio,
|
|
1497
|
+
getSubratioDifference: () => getSubratioDifference,
|
|
1487
1498
|
hexToRgb: () => hexToRgb,
|
|
1488
1499
|
hexToRgbArray: () => hexToRgbArray,
|
|
1489
1500
|
hexToRgba: () => hexToRgba,
|
|
1490
1501
|
hslToRgb: () => hslToRgb,
|
|
1502
|
+
isScalingUnit: () => isScalingUnit,
|
|
1491
1503
|
mixTwoColors: () => mixTwoColors,
|
|
1492
1504
|
mixTwoRgb: () => mixTwoRgb,
|
|
1493
1505
|
mixTwoRgba: () => mixTwoRgba,
|
|
@@ -1500,8 +1512,13 @@ var require_cjs = __commonJS({
|
|
|
1500
1512
|
setCustomFont: () => setCustomFont,
|
|
1501
1513
|
setCustomFontMedia: () => setCustomFontMedia,
|
|
1502
1514
|
setInCustomFontMedia: () => setInCustomFontMedia,
|
|
1515
|
+
setScalingVar: () => setScalingVar,
|
|
1516
|
+
setSubScalingVar: () => setSubScalingVar,
|
|
1503
1517
|
setVariables: () => setVariables
|
|
1504
1518
|
});
|
|
1519
|
+
var isScalingUnit = (unit) => {
|
|
1520
|
+
return unit === "em" || unit === "rem" || unit === "vw" || unit === "vh" || unit === "vmax" || unit === "vmin";
|
|
1521
|
+
};
|
|
1505
1522
|
var import_globals = __toESM2(require_cjs7(), 1);
|
|
1506
1523
|
var import_utils14 = __toESM2(require_cjs22(), 1);
|
|
1507
1524
|
var ENV = "development";
|
|
@@ -1781,6 +1798,7 @@ var require_cjs = __commonJS({
|
|
|
1781
1798
|
h1Matches: 6,
|
|
1782
1799
|
lineHeight: 1.5,
|
|
1783
1800
|
subSequence: true,
|
|
1801
|
+
mediaRegenerate: false,
|
|
1784
1802
|
unit: "em",
|
|
1785
1803
|
templates: {},
|
|
1786
1804
|
sequence: {},
|
|
@@ -1828,6 +1846,7 @@ var require_cjs = __commonJS({
|
|
|
1828
1846
|
ratio: SEQUENCE.phi,
|
|
1829
1847
|
range: [-5, 15],
|
|
1830
1848
|
subSequence: true,
|
|
1849
|
+
mediaRegenerate: false,
|
|
1831
1850
|
unit: "em",
|
|
1832
1851
|
sequence: {},
|
|
1833
1852
|
scales: {},
|
|
@@ -1845,6 +1864,7 @@ var require_cjs = __commonJS({
|
|
|
1845
1864
|
type: "timing",
|
|
1846
1865
|
ratio: SEQUENCE["perfect-fourth"],
|
|
1847
1866
|
range: [-3, 12],
|
|
1867
|
+
mediaRegenerate: false,
|
|
1848
1868
|
unit: "ms",
|
|
1849
1869
|
sequence: {},
|
|
1850
1870
|
scales: {},
|
|
@@ -1940,45 +1960,78 @@ var require_cjs = __commonJS({
|
|
|
1940
1960
|
19: "T"
|
|
1941
1961
|
};
|
|
1942
1962
|
var setSequenceValue = (props4, sequenceProps) => {
|
|
1943
|
-
const { key, variable, value, scaling, index } = props4;
|
|
1963
|
+
const { key, variable, value, scaling, index, scalingVariable } = props4;
|
|
1944
1964
|
sequenceProps.sequence[key] = {
|
|
1945
1965
|
key,
|
|
1946
1966
|
decimal: ~~(value * 100) / 100,
|
|
1947
1967
|
val: ~~value,
|
|
1948
1968
|
scaling,
|
|
1949
1969
|
index,
|
|
1970
|
+
scalingVariable,
|
|
1950
1971
|
variable
|
|
1951
1972
|
};
|
|
1952
1973
|
sequenceProps.scales[key] = scaling;
|
|
1953
1974
|
sequenceProps.vars[variable] = scaling + sequenceProps.unit;
|
|
1954
1975
|
};
|
|
1976
|
+
var setScalingVar = (key, sequenceProps) => {
|
|
1977
|
+
const { base, type, unit } = sequenceProps;
|
|
1978
|
+
const defaultVal = (isScalingUnit(unit) ? 1 : base) + unit;
|
|
1979
|
+
if (key === 0)
|
|
1980
|
+
return defaultVal;
|
|
1981
|
+
const prefix2 = "--" + (type && type.replace(".", "-"));
|
|
1982
|
+
const ratioVar = `${prefix2}-ratio`;
|
|
1983
|
+
if (key > 0) {
|
|
1984
|
+
const prevLetterKey = numToLetterMap[key - 1];
|
|
1985
|
+
return `calc(var(${prefix2}-${prevLetterKey}) * var(${ratioVar}))`;
|
|
1986
|
+
}
|
|
1987
|
+
if (key < 0) {
|
|
1988
|
+
const nextLetterKey = numToLetterMap[key + 1];
|
|
1989
|
+
return `calc(var(${prefix2}-${nextLetterKey}) / var(${ratioVar}))`;
|
|
1990
|
+
}
|
|
1991
|
+
};
|
|
1992
|
+
var setSubScalingVar = (index, arr, variable, sequenceProps) => {
|
|
1993
|
+
const { type } = sequenceProps;
|
|
1994
|
+
const skipMiddle = index === 2 && arr.length === 2;
|
|
1995
|
+
const indexMapWithLength = skipMiddle ? index + 1 : index;
|
|
1996
|
+
const prefix2 = "--" + (type && type.replace(".", "-"));
|
|
1997
|
+
const subRatioVarPrefix = `${prefix2}-sub-ratio-`;
|
|
1998
|
+
return `calc(var(${variable}) * var(${subRatioVarPrefix + indexMapWithLength}))`;
|
|
1999
|
+
};
|
|
2000
|
+
var getSubratioDifference = (base, ratio) => {
|
|
2001
|
+
const diff = base * ratio - base;
|
|
2002
|
+
const subRatio = diff / 1.618;
|
|
2003
|
+
const first = base * ratio - subRatio;
|
|
2004
|
+
const second = base + subRatio;
|
|
2005
|
+
const middle = (first + second) / 2;
|
|
2006
|
+
return [first, middle, second];
|
|
2007
|
+
};
|
|
2008
|
+
var getSubratio = (base, ratio) => {
|
|
2009
|
+
return getSubratioDifference(base, ratio).map((v) => v / base);
|
|
2010
|
+
};
|
|
1955
2011
|
var generateSubSequence = (props4, sequenceProps) => {
|
|
1956
2012
|
const { key, base, value, ratio, variable, index } = props4;
|
|
1957
2013
|
const next2 = value * ratio;
|
|
1958
|
-
const
|
|
1959
|
-
|
|
1960
|
-
const
|
|
1961
|
-
const nextRounded = ~~next2;
|
|
1962
|
-
const diffRounded = nextRounded - valueRounded;
|
|
1963
|
-
let arr = [];
|
|
1964
|
-
const first = next2 - smallscale;
|
|
1965
|
-
const second = value + smallscale;
|
|
1966
|
-
const middle = (first + second) / 2;
|
|
2014
|
+
const diffRounded = ~~next2 - ~~value;
|
|
2015
|
+
let arr;
|
|
2016
|
+
const [first, middle, second] = getSubratioDifference(value, ratio);
|
|
1967
2017
|
if (diffRounded > 16)
|
|
1968
2018
|
arr = [first, middle, second];
|
|
1969
2019
|
else
|
|
1970
2020
|
arr = [first, second];
|
|
1971
|
-
arr.
|
|
2021
|
+
arr.forEach((v, k) => {
|
|
1972
2022
|
const scaling = ~~(v / base * 1e3) / 1e3;
|
|
1973
2023
|
const newVar = variable + (k + 1);
|
|
2024
|
+
const newIndex = index + (k + 1) / 10;
|
|
2025
|
+
const scalingVariable = setSubScalingVar(k + 1, arr, variable, sequenceProps);
|
|
1974
2026
|
const props22 = {
|
|
1975
2027
|
key: key + (k + 1),
|
|
1976
2028
|
variable: newVar,
|
|
1977
2029
|
value: v,
|
|
1978
2030
|
scaling,
|
|
1979
|
-
|
|
2031
|
+
scalingVariable,
|
|
2032
|
+
index: newIndex
|
|
1980
2033
|
};
|
|
1981
|
-
|
|
2034
|
+
setSequenceValue(props22, sequenceProps);
|
|
1982
2035
|
});
|
|
1983
2036
|
};
|
|
1984
2037
|
var switchSequenceOnNegative = (key, base, ratio) => {
|
|
@@ -1994,12 +2047,14 @@ var require_cjs = __commonJS({
|
|
|
1994
2047
|
const value = switchSequenceOnNegative(key, base, ratio);
|
|
1995
2048
|
const scaling = ~~(value / base * 100) / 100;
|
|
1996
2049
|
const variable = prefix2 + letterKey;
|
|
2050
|
+
const scalingVariable = setScalingVar(key, sequenceProps);
|
|
1997
2051
|
const props4 = {
|
|
1998
2052
|
key: letterKey,
|
|
1999
2053
|
variable,
|
|
2000
2054
|
value,
|
|
2001
2055
|
base,
|
|
2002
2056
|
scaling,
|
|
2057
|
+
scalingVariable,
|
|
2003
2058
|
ratio,
|
|
2004
2059
|
index: key
|
|
2005
2060
|
};
|
|
@@ -2089,35 +2144,74 @@ var require_cjs = __commonJS({
|
|
|
2089
2144
|
CSS_VARS2[result.var] = result.value;
|
|
2090
2145
|
}
|
|
2091
2146
|
};
|
|
2092
|
-
var
|
|
2147
|
+
var applyGlobalVars = (vars, obj, options) => {
|
|
2148
|
+
const CONFIG22 = getActiveConfig3();
|
|
2149
|
+
const { UNIT: UNIT2 } = CONFIG22;
|
|
2150
|
+
const unit = obj.unit || UNIT2.default;
|
|
2151
|
+
const { base, ratio, type } = obj;
|
|
2152
|
+
const prefix2 = "--" + (type && type.replace(".", "-"));
|
|
2153
|
+
vars[`${prefix2}-base`] = base;
|
|
2154
|
+
vars[`${prefix2}-unit`] = unit;
|
|
2155
|
+
const ratioVar = `${prefix2}-ratio`;
|
|
2156
|
+
vars[ratioVar] = ratio;
|
|
2157
|
+
const [first, middle, second] = getSubratio(base, ratio);
|
|
2158
|
+
vars[`${prefix2}-sub-ratio-1`] = first;
|
|
2159
|
+
vars[`${prefix2}-sub-ratio-2`] = middle;
|
|
2160
|
+
vars[`${prefix2}-sub-ratio-3`] = second;
|
|
2161
|
+
};
|
|
2162
|
+
var applySequenceVars = (FACTORY2, options = {}) => {
|
|
2093
2163
|
const CONFIG22 = getActiveConfig3();
|
|
2094
|
-
const { UNIT: UNIT2,
|
|
2095
|
-
const unit =
|
|
2096
|
-
const { sequence, scales } =
|
|
2164
|
+
const { UNIT: UNIT2, TIMING: TIMING2, CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
2165
|
+
const unit = FACTORY2.unit || UNIT2.default;
|
|
2166
|
+
const { mediaRegenerate, sequence, scales } = FACTORY2;
|
|
2167
|
+
if (!mediaRegenerate) {
|
|
2168
|
+
applyGlobalVars(CSS_VARS2, FACTORY2, options);
|
|
2169
|
+
}
|
|
2097
2170
|
for (const key in sequence) {
|
|
2098
2171
|
const item = sequence[key];
|
|
2099
|
-
const value = (
|
|
2100
|
-
if (
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
if (!underMediaQuery)
|
|
2108
|
-
underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
2109
|
-
underMediaQuery[item.variable] = `var(${item.variable + "_" + mediaName})`;
|
|
2110
|
-
CSS_VARS2[item.variable + "_" + mediaName] = value;
|
|
2172
|
+
const value = (FACTORY2.type === TIMING2.type ? sequence[key].val : scales[key]) + unit;
|
|
2173
|
+
if (!mediaRegenerate) {
|
|
2174
|
+
CSS_VARS2[item.variable + "_default"] = value;
|
|
2175
|
+
CSS_VARS2[item.variable] = item.scalingVariable;
|
|
2176
|
+
continue;
|
|
2177
|
+
}
|
|
2178
|
+
if (options.useDefault === false) {
|
|
2179
|
+
CSS_VARS2[item.variable] = value;
|
|
2111
2180
|
} else {
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
} else {
|
|
2115
|
-
CSS_VARS2[item.variable + "_default"] = value;
|
|
2116
|
-
CSS_VARS2[item.variable] = `var(${item.variable + "_default"})`;
|
|
2117
|
-
}
|
|
2181
|
+
CSS_VARS2[item.variable + "_default"] = value;
|
|
2182
|
+
CSS_VARS2[item.variable] = `var(${item.variable + "_default"})`;
|
|
2118
2183
|
}
|
|
2119
2184
|
}
|
|
2120
2185
|
};
|
|
2186
|
+
var applyMediaSequenceVars = (FACTORY2, media, options = {}) => {
|
|
2187
|
+
const CONFIG22 = getActiveConfig3();
|
|
2188
|
+
const { UNIT: UNIT2, MEDIA: MEDIA2, CSS_VARS: CSS_VARS2 } = CONFIG22;
|
|
2189
|
+
const mediaName = media.slice(1);
|
|
2190
|
+
const unit = FACTORY2.unit || UNIT2.default;
|
|
2191
|
+
const { mediaRegenerate } = FACTORY2;
|
|
2192
|
+
const { sequence, scales } = FACTORY2[media];
|
|
2193
|
+
const query = MEDIA2[mediaName];
|
|
2194
|
+
if (!query && CONFIG22.verbose)
|
|
2195
|
+
console.warn("Can't find media query ", query);
|
|
2196
|
+
if (!mediaRegenerate) {
|
|
2197
|
+
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
2198
|
+
if (!underMediaQuery)
|
|
2199
|
+
underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
2200
|
+
applyGlobalVars(underMediaQuery, FACTORY2[media], options);
|
|
2201
|
+
return;
|
|
2202
|
+
}
|
|
2203
|
+
for (const key in sequence) {
|
|
2204
|
+
const item = sequence[key];
|
|
2205
|
+
const value = (isScalingUnit(unit) ? scales[key] : sequence[key].val) + unit;
|
|
2206
|
+
if (!query && CONFIG22.verbose)
|
|
2207
|
+
console.warn("Can't find query ", query);
|
|
2208
|
+
let underMediaQuery = CSS_VARS2[`@media ${query}`];
|
|
2209
|
+
if (!underMediaQuery)
|
|
2210
|
+
underMediaQuery = CSS_VARS2[`@media ${query}`] = {};
|
|
2211
|
+
underMediaQuery[item.variable] = `var(${item.variable + "_" + mediaName})`;
|
|
2212
|
+
CSS_VARS2[item.variable + "_" + mediaName] = value;
|
|
2213
|
+
}
|
|
2214
|
+
};
|
|
2121
2215
|
var import_utils82 = __toESM2(require_cjs22(), 1);
|
|
2122
2216
|
var generateSprite = (icons) => {
|
|
2123
2217
|
const CONFIG22 = getActiveConfig3();
|
|
@@ -2583,34 +2677,50 @@ var require_cjs = __commonJS({
|
|
|
2583
2677
|
return { var: CSSvar, value: str, arr: value, type };
|
|
2584
2678
|
};
|
|
2585
2679
|
var import_utils15 = __toESM2(require_cjs22(), 1);
|
|
2586
|
-
var runThroughMedia = (
|
|
2680
|
+
var runThroughMedia = (FACTORY2) => {
|
|
2587
2681
|
const CONFIG22 = getActiveConfig3();
|
|
2588
2682
|
const { TYPOGRAPHY: TYPOGRAPHY2, MEDIA: MEDIA2 } = CONFIG22;
|
|
2589
|
-
for (const prop in
|
|
2590
|
-
const
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2683
|
+
for (const prop in FACTORY2) {
|
|
2684
|
+
const isPropMedia = prop.slice(0, 1) === "@";
|
|
2685
|
+
const mediaValue = FACTORY2[prop];
|
|
2686
|
+
if (!isPropMedia)
|
|
2687
|
+
continue;
|
|
2688
|
+
const { mediaRegenerate } = FACTORY2;
|
|
2689
|
+
const mediaName = prop.slice(1);
|
|
2690
|
+
const {
|
|
2691
|
+
type,
|
|
2692
|
+
base,
|
|
2693
|
+
ratio,
|
|
2694
|
+
range,
|
|
2695
|
+
subSequence,
|
|
2696
|
+
h1Matches,
|
|
2697
|
+
unit
|
|
2698
|
+
} = FACTORY2;
|
|
2699
|
+
(0, import_utils15.merge)(mediaValue, {
|
|
2700
|
+
type,
|
|
2701
|
+
base,
|
|
2702
|
+
ratio,
|
|
2703
|
+
range,
|
|
2704
|
+
subSequence,
|
|
2705
|
+
h1Matches,
|
|
2706
|
+
unit
|
|
2707
|
+
});
|
|
2708
|
+
const query = MEDIA2[mediaName];
|
|
2709
|
+
TYPOGRAPHY2.templates[`@media screen and ${query}`] = {
|
|
2710
|
+
fontSize: mediaValue.base / TYPOGRAPHY2.browserDefault + unit
|
|
2711
|
+
};
|
|
2712
|
+
if (!mediaRegenerate) {
|
|
2713
|
+
applyMediaSequenceVars(FACTORY2, prop);
|
|
2714
|
+
continue;
|
|
2613
2715
|
}
|
|
2716
|
+
(0, import_utils15.merge)(mediaValue, {
|
|
2717
|
+
sequence: {},
|
|
2718
|
+
scales: {},
|
|
2719
|
+
templates: {},
|
|
2720
|
+
vars: {}
|
|
2721
|
+
});
|
|
2722
|
+
generateSequence(mediaValue);
|
|
2723
|
+
applyMediaSequenceVars(FACTORY2, prop);
|
|
2614
2724
|
}
|
|
2615
2725
|
};
|
|
2616
2726
|
var applyHeadings = (props4) => {
|
|
@@ -2650,28 +2760,36 @@ var require_cjs = __commonJS({
|
|
|
2650
2760
|
);
|
|
2651
2761
|
};
|
|
2652
2762
|
var import_utils18 = __toESM2(require_cjs22(), 1);
|
|
2653
|
-
var runThroughMedia2 = (
|
|
2654
|
-
for (const prop in
|
|
2655
|
-
const mediaProps =
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2763
|
+
var runThroughMedia2 = (FACTORY2) => {
|
|
2764
|
+
for (const prop in FACTORY2) {
|
|
2765
|
+
const mediaProps = FACTORY2[prop];
|
|
2766
|
+
const isMediaName = prop.slice(0, 1) === "@";
|
|
2767
|
+
if (!isMediaName)
|
|
2768
|
+
continue;
|
|
2769
|
+
const {
|
|
2770
|
+
type,
|
|
2771
|
+
base,
|
|
2772
|
+
ratio,
|
|
2773
|
+
range,
|
|
2774
|
+
subSequence,
|
|
2775
|
+
h1Matches,
|
|
2776
|
+
unit
|
|
2777
|
+
} = FACTORY2;
|
|
2778
|
+
(0, import_utils18.merge)(mediaProps, {
|
|
2779
|
+
type,
|
|
2780
|
+
base,
|
|
2781
|
+
ratio,
|
|
2782
|
+
range,
|
|
2783
|
+
subSequence,
|
|
2784
|
+
h1Matches,
|
|
2785
|
+
unit,
|
|
2786
|
+
sequence: {},
|
|
2787
|
+
scales: {},
|
|
2788
|
+
templates: {},
|
|
2789
|
+
vars: {}
|
|
2790
|
+
});
|
|
2791
|
+
generateSequence(mediaProps);
|
|
2792
|
+
applyMediaSequenceVars(FACTORY2, prop);
|
|
2675
2793
|
}
|
|
2676
2794
|
};
|
|
2677
2795
|
var applySpacingSequence = () => {
|
|
@@ -2746,7 +2864,7 @@ var require_cjs = __commonJS({
|
|
|
2746
2864
|
unit: SPACING2.unit
|
|
2747
2865
|
});
|
|
2748
2866
|
}
|
|
2749
|
-
applySequenceVars(sequenceProps,
|
|
2867
|
+
applySequenceVars(sequenceProps, { useDefault: false });
|
|
2750
2868
|
return getSpacingByKey3(value, propertyName, sequenceProps);
|
|
2751
2869
|
}
|
|
2752
2870
|
return getSpacingByKey3(value, propertyName);
|
|
@@ -3380,7 +3498,7 @@ var require_types = __commonJS({
|
|
|
3380
3498
|
isNumber: () => isNumber,
|
|
3381
3499
|
isObject: () => isObject4,
|
|
3382
3500
|
isObjectLike: () => isObjectLike2,
|
|
3383
|
-
isString: () =>
|
|
3501
|
+
isString: () => isString7,
|
|
3384
3502
|
isUndefined: () => isUndefined2
|
|
3385
3503
|
});
|
|
3386
3504
|
module2.exports = __toCommonJS2(types_exports);
|
|
@@ -3390,7 +3508,7 @@ var require_types = __commonJS({
|
|
|
3390
3508
|
return false;
|
|
3391
3509
|
return typeof arg === "object" && arg.constructor === Object;
|
|
3392
3510
|
};
|
|
3393
|
-
var
|
|
3511
|
+
var isString7 = (arg) => typeof arg === "string";
|
|
3394
3512
|
var isNumber = (arg) => typeof arg === "number";
|
|
3395
3513
|
var isFunction3 = (arg) => typeof arg === "function";
|
|
3396
3514
|
var isBoolean = (arg) => arg === true || arg === false;
|
|
@@ -3403,7 +3521,7 @@ var require_types = __commonJS({
|
|
|
3403
3521
|
return typeof arg === "object";
|
|
3404
3522
|
};
|
|
3405
3523
|
var isDefined2 = (arg) => {
|
|
3406
|
-
return isObject4(arg) || isObjectLike2(arg) ||
|
|
3524
|
+
return isObject4(arg) || isObjectLike2(arg) || isString7(arg) || isNumber(arg) || isFunction3(arg) || isArray3(arg) || isObjectLike2(arg) || isBoolean(arg) || isDate(arg) || isNull(arg);
|
|
3407
3525
|
};
|
|
3408
3526
|
var isUndefined2 = (arg) => {
|
|
3409
3527
|
return arg === void 0;
|
|
@@ -3412,7 +3530,7 @@ var require_types = __commonJS({
|
|
|
3412
3530
|
boolean: isBoolean,
|
|
3413
3531
|
array: isArray3,
|
|
3414
3532
|
object: isObject4,
|
|
3415
|
-
string:
|
|
3533
|
+
string: isString7,
|
|
3416
3534
|
date: isDate,
|
|
3417
3535
|
number: isNumber,
|
|
3418
3536
|
null: isNull,
|
|
@@ -6210,7 +6328,7 @@ var Theme = {
|
|
|
6210
6328
|
boxShadow: deps.transformShadow(props4.backgroundImage, globalTheme)
|
|
6211
6329
|
};
|
|
6212
6330
|
},
|
|
6213
|
-
boxShadow: ({ props: props4, deps }) =>
|
|
6331
|
+
boxShadow: ({ props: props4, deps }) => (0, import_utils.isString)(props4.boxShadow) && {
|
|
6214
6332
|
boxShadow: deps.transformBoxShadow(props4.boxShadow)
|
|
6215
6333
|
},
|
|
6216
6334
|
textShadow: ({ props: props4, deps }) => !(0, import_utils.isUndefined)(props4.textShadow) && {
|
|
@@ -8777,8 +8895,8 @@ var Input = {
|
|
|
8777
8895
|
autocomplete: ({ props: props4 }) => props4.autocomplete,
|
|
8778
8896
|
placeholder: ({ props: props4 }) => props4.placeholder,
|
|
8779
8897
|
value: ({ props: props4, state, deps }) => {
|
|
8780
|
-
const { isString:
|
|
8781
|
-
if (
|
|
8898
|
+
const { isString: isString7, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields2 } = deps;
|
|
8899
|
+
if (isString7(props4.value) && props4.value.includes("{{")) {
|
|
8782
8900
|
return replaceLiteralsWithObjectFields2(props4.value, state);
|
|
8783
8901
|
}
|
|
8784
8902
|
return props4.value;
|
|
@@ -9644,27 +9762,6 @@ var style_default = {
|
|
|
9644
9762
|
// Slider/index.js
|
|
9645
9763
|
var import_scratch12 = __toESM(require_cjs());
|
|
9646
9764
|
var import_utils12 = __toESM(require_cjs2());
|
|
9647
|
-
(0, import_scratch12.set)({
|
|
9648
|
-
theme: {
|
|
9649
|
-
sliderThumb: {
|
|
9650
|
-
background: "white 0.2",
|
|
9651
|
-
"&::-webkit-slider-thumb": {
|
|
9652
|
-
background: "#232526",
|
|
9653
|
-
borderColor: (0, import_scratch12.opacify)("#454646", 0.75)
|
|
9654
|
-
},
|
|
9655
|
-
"&:hover": {
|
|
9656
|
-
"&::-webkit-slider-thumb": {
|
|
9657
|
-
borderColor: (0, import_scratch12.opacify)("#fff", 0.35)
|
|
9658
|
-
}
|
|
9659
|
-
},
|
|
9660
|
-
"&:focus, &:active": {
|
|
9661
|
-
"&::-webkit-slider-thumb": {
|
|
9662
|
-
borderColor: "#3C6AC0"
|
|
9663
|
-
}
|
|
9664
|
-
}
|
|
9665
|
-
}
|
|
9666
|
-
}
|
|
9667
|
-
});
|
|
9668
9765
|
var RangeSlider = {
|
|
9669
9766
|
style: style_default,
|
|
9670
9767
|
props: {
|