@wavemaker/foundation-css 11.15.1-rc.248 → 11.15.2-rc.249
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/cjs/foundation-css.cjs +1260 -12
- package/cjs/src_tokens_mobile_components_accordion-pane_accordion-pane_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_accordion_accordion_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_anchor_anchor_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_barcodescanner_barcodescanner_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_bottomsheet_bottomsheet_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_button_button_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_calendar_calendar_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_camera_camera_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_cards_cards_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_carousel_carousel_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_checkboxset_checkboxset_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_chips_chips_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_container_container_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_currency_currency_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_dropdown-menu_dropdown-menu_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_form-controls_form-controls_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_form-wrapper_form-wrapper_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_label_label_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_list_list_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_login_login_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_lottie_lottie_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_message_message_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_modal-dialog_modal-dialog_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_nav_nav_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_navbar_navbar_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_navitem_navitem_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_page-left-nav_page-left-nav_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_panel_panel_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_partial-container_partial-container_json.foundation-css.cjs +14 -0
- package/cjs/src_tokens_mobile_components_picture_picture_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_popover_popover_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_progress-bar_progress-bar_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_radioset_radioset_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_rating_rating_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_search_search_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_select_select_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_spinner_spinner_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_switch_switch_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_tabbar_tabbar_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_tabs_tabs_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_tile_tile_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_webview_webview_json.foundation-css.cjs +1 -1
- package/cjs/src_tokens_mobile_components_wizard_wizard_json.foundation-css.cjs +1 -1
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/native_mobile.index.d.ts +17 -0
- package/native_mobile.index.js +17 -5
- package/native_mobile.index.js.map +1 -1
- package/npm-shrinkwrap.json +95 -117
- package/package-lock.json +95 -117
- package/package.json +13 -4
- package/src/node/index.d.ts +1 -0
- package/src/node/index.js +2 -0
- package/src/node/index.js.map +1 -0
- package/src/styles/mobile/components/advanced/carousel.less +6 -12
- package/src/styles/mobile/components/advanced/login.less +1 -4
- package/src/styles/mobile/components/advanced/webview.less +1 -4
- package/src/styles/mobile/components/basic/anchor.less +2 -2
- package/src/styles/mobile/components/basic/bottomsheet.less +5 -12
- package/src/styles/mobile/components/basic/button.less +3 -12
- package/src/styles/mobile/components/basic/buttongroup.less +3 -12
- package/src/styles/mobile/components/basic/label.less +7 -4
- package/src/styles/mobile/components/basic/lottie.less +7 -4
- package/src/styles/mobile/components/basic/message.less +6 -10
- package/src/styles/mobile/components/basic/picture.less +4 -16
- package/src/styles/mobile/components/basic/progress-bar.less +0 -1
- package/src/styles/mobile/components/basic/search.less +5 -20
- package/src/styles/mobile/components/basic/spinner.less +1 -1
- package/src/styles/mobile/components/container/accordion/accordionpane.less +6 -0
- package/src/styles/mobile/components/container/accordion.less +35 -3
- package/src/styles/mobile/components/container/panel.less +0 -5
- package/src/styles/mobile/components/container/tabs/tab-header.less +14 -3
- package/src/styles/mobile/components/container/tile.less +1 -4
- package/src/styles/mobile/components/container/wizard.less +3 -9
- package/src/styles/mobile/components/container.less +8 -32
- package/src/styles/mobile/components/data/card.less +1 -4
- package/src/styles/mobile/components/data/form.less +143 -37
- package/src/styles/mobile/components/data/list.less +1 -4
- package/src/styles/mobile/components/device/barcodescanner.less +2 -5
- package/src/styles/mobile/components/device/camera.less +1 -4
- package/src/styles/mobile/components/dialogs/dialog.less +17 -4
- package/src/styles/mobile/components/input/calendar.less +46 -38
- package/src/styles/mobile/components/input/checkboxset.less +1 -2
- package/src/styles/mobile/components/input/chips.less +8 -19
- package/src/styles/mobile/components/input/currency.less +14 -17
- package/src/styles/mobile/components/input/radioset.less +1 -2
- package/src/styles/mobile/components/input/rating.less +1 -1
- package/src/styles/mobile/components/input/select.less +26 -64
- package/src/styles/mobile/components/input/switch.less +1 -2
- package/src/styles/mobile/components/input/toggle.less +1 -1
- package/src/styles/mobile/components/navigation/appnavbar.less +11 -15
- package/src/styles/mobile/components/navigation/menu.less +3 -11
- package/src/styles/mobile/components/navigation/popover.less +22 -15
- package/src/styles/mobile/components/page/left-panel.less +0 -1
- package/src/styles/mobile/components/page/partial-container.less +1 -0
- package/src/styles/mobile/components/page/tabbar.less +9 -8
- package/src/styles/mobile/components/tokens.dark.css +25 -9
- package/src/styles/mobile/components/tokens.light.css +198 -241
- package/src/styles/mobile/components/variables/accordion.variant.less +4 -0
- package/src/styles/mobile/components/variables/button.variant.less +19 -79
- package/src/styles/mobile/components/variables/carousel.variant.less +2 -3
- package/src/styles/mobile/components/variables/container.variant.less +6 -24
- package/src/styles/mobile/components/variables/form-controls.variant.less +9 -8
- package/src/styles/mobile/components/variables/picture.variant.less +3 -12
- package/src/styles/mobile/components/variables/tabbar.variant.less +1 -0
- package/src/styles/mobile/components/variables/tabs.variant.less +7 -0
- package/src/styles/mobile/studio/advanced/carousel.less +4 -2
- package/src/styles/mobile/studio/advanced/login.less +1 -4
- package/src/styles/mobile/studio/advanced/webview.less +1 -4
- package/src/styles/mobile/studio/basic/label.less +0 -8
- package/src/styles/mobile/studio/basic/message.less +1 -2
- package/src/styles/mobile/studio/container/accordion.less +1 -4
- package/src/styles/mobile/studio/container/container.less +2 -8
- package/src/styles/mobile/studio/container/tabs.less +10 -2
- package/src/styles/mobile/studio/data/card.less +1 -1
- package/src/styles/mobile/studio/device/barcode.less +2 -8
- package/src/styles/mobile/studio/input/calendar.less +66 -6
- package/src/styles/mobile/studio/input/checkboxset.less +21 -6
- package/src/styles/mobile/studio/input/currency.less +9 -1
- package/src/styles/mobile/studio/input/form.less +10 -40
- package/src/styles/mobile/studio/input/rating.less +1 -1
- package/src/styles/mobile/studio/input/select.less +33 -0
- package/src/styles/mobile/studio/input/toggle.less +3 -2
- package/src/styles/mobile/studio/layouts/tabbar.less +4 -5
- package/src/styles/mobile/studio/navigation/nav.less +0 -17
- package/src/styles/mobile/studio/navigation/popover.less +2 -5
- package/src/token-validation/component-token-schema.d.ts +169 -0
- package/src/token-validation/component-token-schema.js +146 -0
- package/src/token-validation/component-token-schema.js.map +1 -0
- package/src/token-validation/constants.d.ts +41 -0
- package/src/token-validation/constants.js +54 -0
- package/src/token-validation/constants.js.map +1 -0
- package/src/token-validation/global-token-schema.d.ts +37 -0
- package/src/token-validation/global-token-schema.js +41 -0
- package/src/token-validation/global-token-schema.js.map +1 -0
- package/src/token-validation/validate-token.d.ts +72 -0
- package/src/token-validation/validate-token.js +939 -0
- package/src/token-validation/validate-token.js.map +1 -0
- package/src/token-validation/validate-value.d.ts +13 -0
- package/src/token-validation/validate-value.js +57 -0
- package/src/token-validation/validate-value.js.map +1 -0
- package/src/token-validation/validator-utils/common/constants.d.ts +172 -0
- package/src/token-validation/validator-utils/common/constants.js +258 -0
- package/src/token-validation/validator-utils/common/constants.js.map +1 -0
- package/src/token-validation/validator-utils/common/primitives.d.ts +14 -0
- package/src/token-validation/validator-utils/common/primitives.js +35 -0
- package/src/token-validation/validator-utils/common/primitives.js.map +1 -0
- package/src/token-validation/validator-utils/common/utils.d.ts +152 -0
- package/src/token-validation/validator-utils/common/utils.js +316 -0
- package/src/token-validation/validator-utils/common/utils.js.map +1 -0
- package/src/token-validation/validator-utils/native_mobile.d.ts +1 -0
- package/src/token-validation/validator-utils/native_mobile.js +120 -0
- package/src/token-validation/validator-utils/native_mobile.js.map +1 -0
- package/src/token-validation/validator-utils/web.d.ts +1 -0
- package/src/token-validation/validator-utils/web.js +72 -0
- package/src/token-validation/validator-utils/web.js.map +1 -0
- package/src/tokens/mobile/components/accordion/accordion.json +172 -4
- package/src/tokens/mobile/components/accordion-pane/accordion-pane.json +65 -0
- package/src/tokens/mobile/components/anchor/anchor.json +5 -15
- package/src/tokens/mobile/components/barcodescanner/barcodescanner.json +10 -38
- package/src/tokens/mobile/components/bottomsheet/bottomsheet.json +28 -92
- package/src/tokens/mobile/components/button/button.json +24 -121
- package/src/tokens/mobile/components/calendar/calendar.json +262 -158
- package/src/tokens/mobile/components/camera/camera.json +5 -31
- package/src/tokens/mobile/components/cards/cards.json +1 -27
- package/src/tokens/mobile/components/carousel/carousel.json +25 -69
- package/src/tokens/mobile/components/checkboxset/checkboxset.json +6 -16
- package/src/tokens/mobile/components/chips/chips.json +8 -80
- package/src/tokens/mobile/components/container/container.json +22 -158
- package/src/tokens/mobile/components/currency/currency.json +89 -5
- package/src/tokens/mobile/components/dropdown-menu/dropdown-menu.json +15 -87
- package/src/tokens/mobile/components/form-controls/form-controls.json +140 -142
- package/src/tokens/mobile/components/form-wrapper/form-wrapper.json +0 -8
- package/src/tokens/mobile/components/label/label.json +0 -34
- package/src/tokens/mobile/components/list/list.json +5 -31
- package/src/tokens/mobile/components/login/login.json +5 -31
- package/src/tokens/mobile/components/lottie/lottie.json +23 -29
- package/src/tokens/mobile/components/message/message.json +37 -61
- package/src/tokens/mobile/components/modal-dialog/modal-dialog.json +54 -8
- package/src/tokens/mobile/components/nav/nav.json +1 -48
- package/src/tokens/mobile/components/navbar/navbar.json +61 -95
- package/src/tokens/mobile/components/navitem/navitem.json +4 -4
- package/src/tokens/mobile/components/{left-nav/left-nav.json → page-left-nav/page-left-nav.json} +1 -9
- package/src/tokens/mobile/components/panel/panel.json +0 -10
- package/src/tokens/mobile/components/partial-container/partial-container.json +23 -0
- package/src/tokens/mobile/components/picture/picture.json +9 -63
- package/src/tokens/mobile/components/popover/popover.json +105 -97
- package/src/tokens/mobile/components/progress-bar/progress-bar.json +0 -8
- package/src/tokens/mobile/components/radioset/radioset.json +5 -15
- package/src/tokens/mobile/components/rating/rating.json +5 -7
- package/src/tokens/mobile/components/search/search.json +25 -155
- package/src/tokens/mobile/components/select/select.json +223 -165
- package/src/tokens/mobile/components/spinner/spinner.json +5 -7
- package/src/tokens/mobile/components/switch/switch.json +5 -15
- package/src/tokens/mobile/components/tabbar/tabbar.json +48 -54
- package/src/tokens/mobile/components/tabs/tabs.json +113 -5
- package/src/tokens/mobile/components/tile/tile.json +5 -31
- package/src/tokens/mobile/components/webview/webview.json +5 -31
- package/src/tokens/mobile/components/wizard/wizard.json +8 -56
- package/cjs/src_tokens_mobile_components_left-nav_left-nav_json.foundation-css.cjs +0 -14
- package/src/styles/mobile/components/input/epoch/date.less +0 -44
- package/src/styles/mobile/components/input/epoch/datetime.less +0 -38
- package/src/styles/mobile/components/input/epoch/time.less +0 -38
- package/src/styles/mobile/components/input/number.less +0 -40
- package/src/styles/mobile/components/input/text.less +0 -69
- package/src/styles/mobile/components/input/textarea.less +0 -63
- package/src/styles/mobile/components/variables/select.variant.less +0 -3
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { isMobileColor, isNamedColor } from "./common/primitives.js";
|
|
2
|
+
import { validateSizeValue, validateFromAllowedList, validateFontFamily, validateFontWeight, validateOpacity, validatePlatformSizeValue, validatePlatformSpaceValue } from "./common/utils.js";
|
|
3
|
+
import { BASE_SUBTYPE_CONFIGS, getPlatformRule, resolveRuleValidator } from "./common/constants.js";
|
|
4
|
+
function generateMobileRules() {
|
|
5
|
+
const rules = {};
|
|
6
|
+
Object.keys(BASE_SUBTYPE_CONFIGS).forEach(subtype => {
|
|
7
|
+
const config = BASE_SUBTYPE_CONFIGS[subtype];
|
|
8
|
+
// Skip subtypes not supported on mobile
|
|
9
|
+
if (!config.mobile && config.web && !config.type)
|
|
10
|
+
return;
|
|
11
|
+
const rule = getPlatformRule(subtype, 'native_mobile');
|
|
12
|
+
if (!rule)
|
|
13
|
+
return;
|
|
14
|
+
rule.validate = resolveRuleValidator(rule.type, subtype, 'native_mobile', {
|
|
15
|
+
validateFromAllowedList,
|
|
16
|
+
validatePlatformSizeValue,
|
|
17
|
+
validatePlatformSpaceValue,
|
|
18
|
+
validateFontFamily,
|
|
19
|
+
validateOpacity,
|
|
20
|
+
validateFontWeight,
|
|
21
|
+
validateBoxShadow
|
|
22
|
+
});
|
|
23
|
+
// Set custom description if available
|
|
24
|
+
if (rule.customDescription && rule.customDescription.mobile) {
|
|
25
|
+
rule.customDescription = rule.customDescription.mobile;
|
|
26
|
+
}
|
|
27
|
+
else if (rule.customDescription && typeof rule.customDescription === 'string') {
|
|
28
|
+
// Keep existing string descriptions
|
|
29
|
+
}
|
|
30
|
+
rules[subtype] = rule;
|
|
31
|
+
});
|
|
32
|
+
return rules;
|
|
33
|
+
}
|
|
34
|
+
export const MOBILE_RULES = generateMobileRules();
|
|
35
|
+
function validateBoxShadow(value) {
|
|
36
|
+
// Support comma-separated multiple shadows
|
|
37
|
+
const shadows = splitByTopLevelComma(value);
|
|
38
|
+
return { valid: shadows.every(validateSingleShadow) };
|
|
39
|
+
}
|
|
40
|
+
function validateSingleShadow(raw) {
|
|
41
|
+
let s = raw.trim();
|
|
42
|
+
if (!s)
|
|
43
|
+
return false;
|
|
44
|
+
// Strip optional leading/trailing `inset` keyword
|
|
45
|
+
s = s.replace(/^inset\s+/, "").replace(/\s+inset$/, "").trim();
|
|
46
|
+
// Extract rgba/rgb color (contains spaces inside parens, must handle first)
|
|
47
|
+
let color = null;
|
|
48
|
+
const rgbMatch = s.match(/rgba?\([^)]+\)/);
|
|
49
|
+
if (rgbMatch) {
|
|
50
|
+
color = rgbMatch[0];
|
|
51
|
+
s = s.replace(color, "").trim();
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
// Extract hex at any position
|
|
55
|
+
const hexMatch = s.match(/(^|\s)(#[0-9a-fA-F]{3,8})(\s|$)/);
|
|
56
|
+
if (hexMatch) {
|
|
57
|
+
color = hexMatch[2];
|
|
58
|
+
s = s.replace(hexMatch[2], "").trim();
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
// Named color at end only
|
|
62
|
+
const parts = s.split(/\s+/);
|
|
63
|
+
const last = parts[parts.length - 1];
|
|
64
|
+
if (isNamedColor(last)) {
|
|
65
|
+
color = last;
|
|
66
|
+
s = parts.slice(0, -1).join(" ").trim();
|
|
67
|
+
}
|
|
68
|
+
// color may be absent — React Native defaults to black, that's valid
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (color !== null) {
|
|
72
|
+
if (!isMobileColor(color))
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
// Remaining: 2–4 length values
|
|
76
|
+
const parts = s.split(/\s+/).filter(Boolean);
|
|
77
|
+
if (parts.length < 2 || parts.length > 4)
|
|
78
|
+
return false;
|
|
79
|
+
return parts.every((p, i) => {
|
|
80
|
+
const trimmedPart = String(p).trim();
|
|
81
|
+
// Offsets/spread accept `0` without units, but non-zero values must be px.
|
|
82
|
+
if (trimmedPart === "0")
|
|
83
|
+
return true;
|
|
84
|
+
if (i === 2) {
|
|
85
|
+
// blurRadius >= 0
|
|
86
|
+
return validateSizeValue(trimmedPart, {
|
|
87
|
+
allowedUnits: ["px"],
|
|
88
|
+
allowUnitless: false,
|
|
89
|
+
allowNegative: false
|
|
90
|
+
}).valid;
|
|
91
|
+
}
|
|
92
|
+
// offsetX/offsetY and optional spreadDistance
|
|
93
|
+
return validateSizeValue(trimmedPart, {
|
|
94
|
+
allowedUnits: ["px"],
|
|
95
|
+
allowUnitless: false,
|
|
96
|
+
allowNegative: true
|
|
97
|
+
}).valid;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/** Split "a, rgba(1,2,3), b" by commas NOT inside parens */
|
|
101
|
+
function splitByTopLevelComma(value) {
|
|
102
|
+
const result = [];
|
|
103
|
+
let depth = 0, current = "";
|
|
104
|
+
for (const ch of value) {
|
|
105
|
+
if (ch === "(")
|
|
106
|
+
depth++;
|
|
107
|
+
else if (ch === ")")
|
|
108
|
+
depth--;
|
|
109
|
+
else if (ch === "," && depth === 0) {
|
|
110
|
+
result.push(current.trim());
|
|
111
|
+
current = "";
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
current += ch;
|
|
115
|
+
}
|
|
116
|
+
if (current.trim())
|
|
117
|
+
result.push(current.trim());
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=native_mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native_mobile.js","sourceRoot":"./","sources":["src/token-validation/validator-utils/native_mobile.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE/L,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEpG,SAAS,mBAAmB;IACxB,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAChD,MAAM,MAAM,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;QAE7C,wCAAwC;QACxC,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI;YAAE,OAAO;QAEzD,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC;QACvD,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,IAAI,CAAC,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,eAAe,EAAE;YACtE,uBAAuB;YACvB,yBAAyB;YACzB,0BAA0B;YAC1B,kBAAkB;YAClB,eAAe;YACf,kBAAkB;YAClB,iBAAiB;SACpB,CAAC,CAAC;QAEH,sCAAsC;QACtC,IAAI,IAAI,CAAC,i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AAG;YAAE,OAAO,IAAI,CAAC;QAErC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACV,kBAAkB;YAClB,OAAO,iBAAiB,CAAC,WAAW,EAAE;gBAClC,YAAY,EAAE,CAAC,IAAI,CAAC;gBACpB,aAAa,EAAE,KAAK;gBACpB,aAAa,EAAE,KAAK;aACvB,CAAC,CAAC,KAAK,CAAC;QACb,CAAC;QAED,8CAA8C;QAC9C,OAAO,iBAAiB,CAAC,WAAW,EAAE;YAClC,YAAY,EAAE,CAAC,IAAI,CAAC;YACpB,aAAa,EAAE,KAAK;YACpB,aAAa,EAAE,IAAI;SACtB,CAAC,CAAC,KAAK,CAAC;IACb,CAAC,CAAC,CAAC;AACP,CAAC;AAGD,4DAA4D;AAC5D,SAAS,oBAAoB,CAAC,KAAK;IAC/B,MAAM,MAAM,GAAG,EAAE,CAAC;IAClB,IAAI,KAAK,GAAG,CAAC,EAAE,OAAO,GAAG,EAAE,CAAC;IAC5B,KAAK,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC;QACrB,IAAI,EAAE,KAAK,GAAG;YAAE,KAAK,EAAE,CAAC;aACnB,IAAI,EAAE,KAAK,GAAG;YAAE,KAAK,EAAE,CAAC;aACxB,IAAI,EAAE,KAAK,GAAG,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5B,OAAO,GAAG,EAAE,CAAC;YACb,SAAS;QACb,CAAC;QACD,OAAO,IAAI,EAAE,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,CAAC,IAAI,EAAE;QAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import { isMobileColor, isNamedColor } from \"./common/primitives.js\";\n\nimport { validateSizeValue, validateFromAllowedList, validateFontFamily, validateFontWeight, validateOpacity, validatePlatformSizeValue, validatePlatformSpaceValue } from \"./common/utils.js\";\n\nimport { BASE_SUBTYPE_CONFIGS, getPlatformRule, resolveRuleValidator } from \"./common/constants.js\";\n\nfunction generateMobileRules() {\n const rules = {};\n \n Object.keys(BASE_SUBTYPE_CONFIGS).forEach(subtype => {\n const config = BASE_SUBTYPE_CONFIGS[subtype];\n \n // Skip subtypes not supported on mobile\n if (!config.mobile && config.web && !config.type) return;\n \n const rule = getPlatformRule(subtype, 'native_mobile');\n if (!rule) return;\n \n rule.validate = resolveRuleValidator(rule.type, subtype, 'native_mobile', {\n validateFromAllowedList,\n validatePlatformSizeValue,\n validatePlatformSpaceValue,\n validateFontFamily,\n validateOpacity,\n validateFontWeight,\n validateBoxShadow\n });\n \n // Set custom description if available\n if (rule.customDescription && rule.customDescription.mobile) {\n rule.customDescription = rule.customDescription.mobile;\n } else if (rule.customDescription && typeof rule.customDescription === 'string') {\n // Keep existing string descriptions\n }\n \n rules[subtype] = rule;\n });\n \n return rules;\n}\n\nexport const MOBILE_RULES = generateMobileRules();\n\n\nfunction validateBoxShadow(value) {\n // Support comma-separated multiple shadows\n const shadows = splitByTopLevelComma(value);\n return { valid: shadows.every(validateSingleShadow) };\n}\n\nfunction validateSingleShadow(raw) {\n let s = raw.trim();\n if (!s) return false;\n\n // Strip optional leading/trailing `inset` keyword\n s = s.replace(/^inset\\s+/, \"\").replace(/\\s+inset$/, \"\").trim();\n\n // Extract rgba/rgb color (contains spaces inside parens, must handle first)\n let color = null;\n const rgbMatch = s.match(/rgba?\\([^)]+\\)/);\n if (rgbMatch) {\n color = rgbMatch[0];\n s = s.replace(color, \"\").trim();\n } else {\n // Extract hex at any position\n const hexMatch = s.match(/(^|\\s)(#[0-9a-fA-F]{3,8})(\\s|$)/);\n if (hexMatch) {\n color = hexMatch[2];\n s = s.replace(hexMatch[2], \"\").trim();\n } else {\n // Named color at end only\n const parts = s.split(/\\s+/);\n const last = parts[parts.length - 1];\n if (isNamedColor(last)) {\n color = last;\n s = parts.slice(0, -1).join(\" \").trim();\n }\n // color may be absent — React Native defaults to black, that's valid\n }\n }\n\n if (color !== null) {\n if (!isMobileColor(color)) return false;\n }\n\n // Remaining: 2–4 length values\n const parts = s.split(/\\s+/).filter(Boolean);\n if (parts.length < 2 || parts.length > 4) return false;\n\n return parts.every((p, i) => {\n const trimmedPart = String(p).trim();\n\n // Offsets/spread accept `0` without units, but non-zero values must be px.\n if (trimmedPart === \"0\") return true;\n\n if (i === 2) {\n // blurRadius >= 0\n return validateSizeValue(trimmedPart, {\n allowedUnits: [\"px\"],\n allowUnitless: false,\n allowNegative: false\n }).valid;\n }\n\n // offsetX/offsetY and optional spreadDistance\n return validateSizeValue(trimmedPart, {\n allowedUnits: [\"px\"],\n allowUnitless: false,\n allowNegative: true\n }).valid;\n });\n}\n\n\n/** Split \"a, rgba(1,2,3), b\" by commas NOT inside parens */\nfunction splitByTopLevelComma(value) {\n const result = [];\n let depth = 0, current = \"\";\n for (const ch of value) {\n if (ch === \"(\") depth++;\n else if (ch === \")\") depth--;\n else if (ch === \",\" && depth === 0) {\n result.push(current.trim());\n current = \"\";\n continue;\n }\n current += ch;\n }\n if (current.trim()) result.push(current.trim());\n return result;\n}\n\n\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const WEB_VALIDATION_RULES: {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { isPx, isRem, isEm, isUnitlessNumber, isWebColor } from "./common/primitives.js";
|
|
2
|
+
import { validateFromAllowedList, validateFontFamily, validateFontWeight, validateOpacity, validatePlatformSizeValue, validatePlatformSpaceValue } from "./common/utils.js";
|
|
3
|
+
import { BASE_SUBTYPE_CONFIGS, getPlatformRule, resolveRuleValidator } from "./common/constants.js";
|
|
4
|
+
function generateWebRules() {
|
|
5
|
+
const rules = {};
|
|
6
|
+
Object.keys(BASE_SUBTYPE_CONFIGS).forEach(subtype => {
|
|
7
|
+
const rule = getPlatformRule(subtype, 'web');
|
|
8
|
+
if (!rule)
|
|
9
|
+
return;
|
|
10
|
+
rule.validate = resolveRuleValidator(rule.type, subtype, 'web', {
|
|
11
|
+
validateFromAllowedList,
|
|
12
|
+
validatePlatformSizeValue,
|
|
13
|
+
validatePlatformSpaceValue,
|
|
14
|
+
validateFontFamily,
|
|
15
|
+
validateOpacity,
|
|
16
|
+
validateFontWeight,
|
|
17
|
+
validateBoxShadow
|
|
18
|
+
});
|
|
19
|
+
// Set custom description if available
|
|
20
|
+
if (rule.customDescription && rule.customDescription.web) {
|
|
21
|
+
rule.customDescription = rule.customDescription.web;
|
|
22
|
+
}
|
|
23
|
+
else if (rule.customDescription && typeof rule.customDescription === 'string') {
|
|
24
|
+
// Keep existing string descriptions
|
|
25
|
+
}
|
|
26
|
+
rules[subtype] = rule;
|
|
27
|
+
});
|
|
28
|
+
return rules;
|
|
29
|
+
}
|
|
30
|
+
export const WEB_VALIDATION_RULES = generateWebRules();
|
|
31
|
+
// ─── Validation Functions ────────────────────────────────────────────────────
|
|
32
|
+
function validateBoxShadow(value) {
|
|
33
|
+
const trimmed = String(value).trim();
|
|
34
|
+
if (trimmed === "none") {
|
|
35
|
+
return { valid: true };
|
|
36
|
+
}
|
|
37
|
+
// Split by comma for multiple shadows
|
|
38
|
+
const shadows = trimmed.split(',').map(s => s.trim());
|
|
39
|
+
for (const shadow of shadows) {
|
|
40
|
+
if (!isValidSingleShadow(shadow)) {
|
|
41
|
+
return {
|
|
42
|
+
valid: false,
|
|
43
|
+
error: `Invalid box-shadow format: "${shadow}". Expected format: "[inset] <x> <y> [blur] [spread] <color>"`
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return { valid: true };
|
|
48
|
+
}
|
|
49
|
+
function isValidSingleShadow(shadow) {
|
|
50
|
+
// Very basic validation - could be more sophisticated
|
|
51
|
+
const parts = shadow.split(/\s+/);
|
|
52
|
+
// Need at least x, y, and color
|
|
53
|
+
if (parts.length < 3)
|
|
54
|
+
return false;
|
|
55
|
+
let hasInset = false;
|
|
56
|
+
let sizeCount = 0;
|
|
57
|
+
let hasColor = false;
|
|
58
|
+
for (const part of parts) {
|
|
59
|
+
if (part === "inset") {
|
|
60
|
+
hasInset = true;
|
|
61
|
+
}
|
|
62
|
+
else if (isPx(part) || isRem(part) || isEm(part) || isUnitlessNumber(part)) {
|
|
63
|
+
sizeCount++;
|
|
64
|
+
}
|
|
65
|
+
else if (isWebColor(part)) {
|
|
66
|
+
hasColor = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
// Need at least 2 size values (x, y) and a color
|
|
70
|
+
return sizeCount >= 2 && hasColor;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"./","sources":["src/token-validation/validator-utils/web.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzF,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,eAAe,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC5K,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEpG,SAAS,gBAAgB;IACrB,MAAM,KAAK,GAAG,EAAE,CAAC;IAEjB,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAChD,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QAC7C,IAAI,CAAC,IAAI;YAAE,OAAO;QAElB,IAAI,CAAC,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE;YAC5D,uBAAuB;YACvB,yBAAyB;YACzB,0BAA0B;YAC1B,kBAAkB;YAClB,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M,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAElC,gCAAgC;IAChC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAEnC,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,IAAI,QAAQ,GAAG,KAAK,CAAC;IAErB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACvB,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;YACnB,QAAQ,GAAG,IAAI,CAAC;QACpB,CAAC;aAAM,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3E,SAAS,EAAE,CAAC;QAChB,CAAC;aAAM,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1B,QAAQ,GAAG,IAAI,CAAC;QACpB,CAAC;IACL,CAAC;IAED,iDAAiD;IACjD,OAAO,SAAS,IAAI,CAAC,IAAI,QAAQ,CAAC;AACtC,CAAC","sourcesContent":["import { isPx, isRem, isEm, isUnitlessNumber, isWebColor } from \"./common/primitives.js\";\nimport { validateFromAllowedList, validateFontFamily, validateFontWeight, validateOpacity, validatePlatformSizeValue, validatePlatformSpaceValue } from \"./common/utils.js\";\nimport { BASE_SUBTYPE_CONFIGS, getPlatformRule, resolveRuleValidator } from \"./common/constants.js\";\n\nfunction generateWebRules() {\n const rules = {};\n\n Object.keys(BASE_SUBTYPE_CONFIGS).forEach(subtype => {\n const rule = getPlatformRule(subtype, 'web');\n if (!rule) return;\n\n rule.validate = resolveRuleValidator(rule.type, subtype, 'web', {\n validateFromAllowedList,\n validatePlatformSizeValue,\n validatePlatformSpaceValue,\n validateFontFamily,\n validateOpacity,\n validateFontWeight,\n validateBoxShadow\n });\n\n // Set custom description if available\n if (rule.customDescription && rule.customDescription.web) {\n rule.customDescription = rule.customDescription.web;\n } else if (rule.customDescription && typeof rule.customDescription === 'string') {\n // Keep existing string descriptions\n }\n\n rules[subtype] = rule;\n });\n\n return rules;\n}\n\nexport const WEB_VALIDATION_RULES = generateWebRules();\n\n// ─── Validation Functions ────────────────────────────────────────────────────\n\nfunction validateBoxShadow(value) {\n const trimmed = String(value).trim();\n\n if (trimmed === \"none\") {\n return { valid: true };\n }\n\n // Split by comma for multiple shadows\n const shadows = trimmed.split(',').map(s => s.trim());\n\n for (const shadow of shadows) {\n if (!isValidSingleShadow(shadow)) {\n return {\n valid: false,\n error: `Invalid box-shadow format: \"${shadow}\". Expected format: \"[inset] <x> <y> [blur] [spread] <color>\"`\n };\n }\n }\n\n return { valid: true };\n}\n\nfunction isValidSingleShadow(shadow) {\n // Very basic validation - could be more sophisticated\n const parts = shadow.split(/\\s+/);\n\n // Need at least x, y, and color\n if (parts.length < 3) return false;\n\n let hasInset = false;\n let sizeCount = 0;\n let hasColor = false;\n\n for (const part of parts) {\n if (part === \"inset\") {\n hasInset = true;\n } else if (isPx(part) || isRem(part) || isEm(part) || isUnitlessNumber(part)) {\n sizeCount++;\n } else if (isWebColor(part)) {\n hasColor = true;\n }\n }\n\n // Need at least 2 size values (x, y) and a color\n return sizeCount >= 2 && hasColor;\n}"]}
|
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
"description": "Controls the width of the accordion component. This determines how wide the accordion panel appears on the screen.<br>CSS variable: --wm-accordion-width"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
|
+
"gap": {
|
|
27
|
+
"value": "{space.0.value}",
|
|
28
|
+
"type": "space",
|
|
29
|
+
"attributes": {
|
|
30
|
+
"subtype": "space",
|
|
31
|
+
"description": "Controls the gap between accordion items. This determines the spacing between accordion headers and content.<br>CSS variable: --wm-accordion-gap"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
26
34
|
"border": {
|
|
27
35
|
"width": {
|
|
28
36
|
"value": "{border.width.0.value}",
|
|
@@ -33,7 +41,7 @@
|
|
|
33
41
|
}
|
|
34
42
|
},
|
|
35
43
|
"style": {
|
|
36
|
-
"value": "{border.style.solid}",
|
|
44
|
+
"value": "{border.style.solid.value}",
|
|
37
45
|
"type": "radius",
|
|
38
46
|
"attributes": {
|
|
39
47
|
"subtype": "border-style",
|
|
@@ -66,6 +74,42 @@
|
|
|
66
74
|
}
|
|
67
75
|
},
|
|
68
76
|
"text": {
|
|
77
|
+
"background": {
|
|
78
|
+
"color": {
|
|
79
|
+
"value": "transparent",
|
|
80
|
+
"type": "color",
|
|
81
|
+
"attributes": {
|
|
82
|
+
"subtype": "color",
|
|
83
|
+
"description": "Sets the background color of the accordion title. This is the background color that appears <br>CSS variable: --wm-accordion-active-text-background-color"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"border": {
|
|
88
|
+
"width": {
|
|
89
|
+
"value": "{border.width.0.value}",
|
|
90
|
+
"type": "border",
|
|
91
|
+
"attributes": {
|
|
92
|
+
"subtype": "border-width",
|
|
93
|
+
"description": "Sets the border width of the accordion title. This determines the thickness of the border that appears <br>CSS variable: --wm-accordion-active-text-border-width"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"radius": {
|
|
97
|
+
"value": "0px",
|
|
98
|
+
"type": "radius",
|
|
99
|
+
"attributes": {
|
|
100
|
+
"subtype": "radius",
|
|
101
|
+
"description": "Sets the border radius of the accordion title. This determines the roundness of the border that appears <br>CSS variable: --wm-accordion-active-text-border-radius"
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"color": {
|
|
105
|
+
"value": "{color.outline.@.value}",
|
|
106
|
+
"type": "color",
|
|
107
|
+
"attributes": {
|
|
108
|
+
"subtype": "color",
|
|
109
|
+
"description": "Sets the border color of the accordion title. This determines what color the border appears <br>CSS variable: --wm-accordion-active-text-border-color"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
69
113
|
"color": {
|
|
70
114
|
"value": "#333333",
|
|
71
115
|
"type": "color",
|
|
@@ -85,12 +129,12 @@
|
|
|
85
129
|
},
|
|
86
130
|
"header": {
|
|
87
131
|
"border": {
|
|
88
|
-
"
|
|
89
|
-
"value": "{border.width.1.value}",
|
|
132
|
+
"width": {
|
|
133
|
+
"value": "{space.0.value} {space.0.value} {border.width.1.value} {space.0.value}",
|
|
90
134
|
"type": "space",
|
|
91
135
|
"attributes": {
|
|
92
136
|
"subtype": "border-width",
|
|
93
|
-
"description": "Controls the
|
|
137
|
+
"description": "Controls the border thickness of the accordion header (bottom only). This determines how thick the border at the bottom of the header appears.<br>CSS variable: --wm-accordion-header-border-width"
|
|
94
138
|
}
|
|
95
139
|
},
|
|
96
140
|
"color": {
|
|
@@ -241,7 +285,95 @@
|
|
|
241
285
|
}
|
|
242
286
|
}
|
|
243
287
|
},
|
|
288
|
+
"pane":{
|
|
289
|
+
"border":{
|
|
290
|
+
"color":{
|
|
291
|
+
"value": "{color.outline.@.value}",
|
|
292
|
+
"type": "color",
|
|
293
|
+
"attributes": {
|
|
294
|
+
"subtype": "color",
|
|
295
|
+
"description": "Sets the border color of the accordion pane. This determines what color the border around the pane appears in.<br>CSS variable: --wm-accordion-pane-border-color"
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"radius":{
|
|
299
|
+
"value": "0px",
|
|
300
|
+
"type": "radius",
|
|
301
|
+
"attributes": {
|
|
302
|
+
"subtype": "radius",
|
|
303
|
+
"description": "Controls the border radius of the accordion pane. This determines the radius of the border around the pane.<br>CSS variable: --wm-accordion-pane-border-radius"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
"width":{
|
|
307
|
+
"value": "{border.width.0.value}",
|
|
308
|
+
"type": "border",
|
|
309
|
+
"attributes": {
|
|
310
|
+
"subtype": "border-width",
|
|
311
|
+
"description": "Controls the border thickness of the accordion pane. This determines how thick the border around the pane appears.<br>CSS variable: --wm-accordion-pane-border-width"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"style":{
|
|
315
|
+
"value": "{border.style.solid.value}",
|
|
316
|
+
"type": "border",
|
|
317
|
+
"attributes": {
|
|
318
|
+
"subtype": "border-style",
|
|
319
|
+
"description": "Controls the border style of the accordion pane. This determines the style of the border around the pane.<br>CSS variable: --wm-accordion-pane-border-style"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
244
324
|
"title": {
|
|
325
|
+
"wrapper": {
|
|
326
|
+
"padding": {
|
|
327
|
+
"value": "{space.0.value}",
|
|
328
|
+
"type": "space",
|
|
329
|
+
"attributes": {
|
|
330
|
+
"subtype": "space",
|
|
331
|
+
"description": "Controls the padding of the accordion title wrapper. This creates spacing around the title content.<br>CSS variable: --wm-accordion-title-wrapper-padding"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"width": {
|
|
335
|
+
"value": "auto",
|
|
336
|
+
"type": "space",
|
|
337
|
+
"attributes": {
|
|
338
|
+
"subtype": "space",
|
|
339
|
+
"description": "Controls the width of the accordion title wrapper. This determines the width of the title wrapper.<br>CSS variable: --wm-accordion-title-wrapper-width"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"border": {
|
|
343
|
+
"width": {
|
|
344
|
+
"value": "{border.width.0.value}",
|
|
345
|
+
"type": "border",
|
|
346
|
+
"attributes": {
|
|
347
|
+
"subtype": "border-width",
|
|
348
|
+
"description": "Controls the border thickness of the accordion title wrapper. This determines how thick the border around the title wrapper appears.<br>CSS variable: --wm-accordion-title-wrapper-border-width"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"radius": {
|
|
352
|
+
"value": "{radius.none.value}",
|
|
353
|
+
"type": "radius",
|
|
354
|
+
"attributes": {
|
|
355
|
+
"subtype": "radius",
|
|
356
|
+
"description": "Controls the border radius of the accordion title wrapper. This determines the roundness of the border around the title wrapper.<br>CSS variable: --wm-accordion-title-wrapper-border-radius"
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
"style": {
|
|
360
|
+
"value": "{border.style.solid.value}",
|
|
361
|
+
"type": "radius",
|
|
362
|
+
"attributes": {
|
|
363
|
+
"subtype": "border-style",
|
|
364
|
+
"description": "Controls the border style of the accordion title wrapper. This determines the style of the border around the title wrapper.<br>CSS variable: --wm-accordion-title-wrapper-border-style"
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"background-color": {
|
|
369
|
+
"value": "{color.transparent.@.value}",
|
|
370
|
+
"type": "color",
|
|
371
|
+
"attributes": {
|
|
372
|
+
"subtype": "color",
|
|
373
|
+
"description": "Sets the background color of the accordion title wrapper. This is the background color that appears behind the title content.<br>CSS variable: --wm-accordion-title-wrapper-background-color"
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
},
|
|
245
377
|
"icon": {
|
|
246
378
|
"color": {
|
|
247
379
|
"value": "#333333",
|
|
@@ -284,6 +416,42 @@
|
|
|
284
416
|
}
|
|
285
417
|
},
|
|
286
418
|
"text": {
|
|
419
|
+
"background": {
|
|
420
|
+
"color": {
|
|
421
|
+
"value": "transparent",
|
|
422
|
+
"type": "color",
|
|
423
|
+
"attributes": {
|
|
424
|
+
"subtype": "color",
|
|
425
|
+
"description": "Sets the background color of the active accordion content. This is the background color that appears when the accordion is expanded.<br>CSS variable: --wm-accordion-active-text-background-color"
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"border": {
|
|
430
|
+
"width": {
|
|
431
|
+
"value": "{border.width.0.value}",
|
|
432
|
+
"type": "border",
|
|
433
|
+
"attributes": {
|
|
434
|
+
"subtype": "border-width",
|
|
435
|
+
"description": "Sets the border width of the active accordion content. This determines the thickness of the border that appears when the accordion is expanded.<br>CSS variable: --wm-accordion-active-text-border-width"
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
"radius": {
|
|
439
|
+
"value": "0px",
|
|
440
|
+
"type": "radius",
|
|
441
|
+
"attributes": {
|
|
442
|
+
"subtype": "radius",
|
|
443
|
+
"description": "Sets the border radius of the active accordion content. This determines the roundness of the border that appears when the accordion is expanded.<br>CSS variable: --wm-accordion-active-text-border-radius"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"color": {
|
|
447
|
+
"value": "{color.outline.@.value}",
|
|
448
|
+
"type": "color",
|
|
449
|
+
"attributes": {
|
|
450
|
+
"subtype": "color",
|
|
451
|
+
"description": "Sets the border color of the active accordion content. This determines what color the border appears in when the accordion is expanded.<br>CSS variable: --wm-accordion-active-text-border-color"
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
},
|
|
287
455
|
"color": {
|
|
288
456
|
"value": "{color.white.@.value}",
|
|
289
457
|
"type": "color",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"accordion-pane": {
|
|
3
|
+
"meta": {
|
|
4
|
+
"mapping": {
|
|
5
|
+
"selector": {
|
|
6
|
+
"mobile": ".app-accordionpane"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"mapping": {
|
|
11
|
+
"content": {
|
|
12
|
+
"background-color": {
|
|
13
|
+
"value": "{color.surface.@.value}",
|
|
14
|
+
"type": "color",
|
|
15
|
+
"attributes": {
|
|
16
|
+
"subtype": "color",
|
|
17
|
+
"description": "Sets the background color of the accordion pane content. This is the background color that appears behind the accordion content.<br>CSS variable: --wm-accordion-content-background-color"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"padding": {
|
|
21
|
+
"value": "0px",
|
|
22
|
+
"type": "space",
|
|
23
|
+
"attributes": {
|
|
24
|
+
"subtype": "space",
|
|
25
|
+
"description": "Sets the internal spacing inside the accordion pane content. This creates breathing room around the content.<br>CSS variable: --wm-accordion-content-padding"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"border": {
|
|
29
|
+
"radius": {
|
|
30
|
+
"value": "{radius.sm.value}",
|
|
31
|
+
"type": "radius",
|
|
32
|
+
"attributes": {
|
|
33
|
+
"subtype": "radius",
|
|
34
|
+
"description": "Controls the border radius for rounded corners of the accordion pane content. This makes the content appear with rounded corners instead of sharp edges.<br>CSS variable: --wm-accordion-content-border-radius"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"style": {
|
|
38
|
+
"value": "{border.style.solid.value}",
|
|
39
|
+
"type": "radius",
|
|
40
|
+
"attributes": {
|
|
41
|
+
"subtype": "border-style",
|
|
42
|
+
"description": "Sets the border style of the accordion pane content. Acceptable values: solid, dashed, dotted.<br>CSS variable: --wm-accordion-content-border-style"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"width": {
|
|
46
|
+
"value": "{border.width.0.value}",
|
|
47
|
+
"type": "space",
|
|
48
|
+
"attributes": {
|
|
49
|
+
"subtype": "border-width",
|
|
50
|
+
"description": "Controls the border thickness of the accordion pane content. This determines how thick the border around the content appears.<br>CSS variable: --wm-accordion-content-border-width"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"color": {
|
|
54
|
+
"value": "{color.outline.@.value}",
|
|
55
|
+
"type": "color",
|
|
56
|
+
"attributes": {
|
|
57
|
+
"subtype": "color",
|
|
58
|
+
"description": "Sets the border color of the accordion pane content. This determines what color the border around the content appears in.<br>CSS variable: --wm-accordion-content-border-color"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -79,21 +79,11 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"padding": {
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
"
|
|
86
|
-
|
|
87
|
-
"description": "Controls the left padding (spacing) inside anchor link text. This creates space between the left edge of the text and its container, making the anchor text more comfortable to read and click.<br>CSS variable: --wm-anchor-text-padding-left"
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"right": {
|
|
91
|
-
"value": "{space.2.value}",
|
|
92
|
-
"type": "space",
|
|
93
|
-
"attributes": {
|
|
94
|
-
"subtype": "padding-right",
|
|
95
|
-
"description": "Controls the right padding (spacing) inside anchor link text. This creates space between the right edge of the text and its container, making the anchor text more comfortable to read and click.<br>CSS variable: --wm-anchor-text-padding-right"
|
|
96
|
-
}
|
|
82
|
+
"value": "{space.0.value} {space.2.value}",
|
|
83
|
+
"type": "space",
|
|
84
|
+
"attributes": {
|
|
85
|
+
"subtype": "space",
|
|
86
|
+
"description": "Controls the padding (top/bottom, left/right) inside anchor link text. This creates space around the text, making the anchor text more comfortable to read and click. Acceptable units: px.<br>CSS variable: --wm-anchor-text-padding"
|
|
97
87
|
}
|
|
98
88
|
}
|
|
99
89
|
},
|
|
@@ -46,13 +46,11 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"padding": {
|
|
49
|
-
"
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
"description": "Sets the left padding of the text in the barcode scanner component. This creates spacing to the left of the text.<br>CSS variable: --wm-barcodescanner-text-padding-left"
|
|
55
|
-
}
|
|
49
|
+
"value": "{space.0.value} {space.0.value} {space.0.value} {space.0.value}",
|
|
50
|
+
"type": "space",
|
|
51
|
+
"attributes": {
|
|
52
|
+
"subtype": "space",
|
|
53
|
+
"description": "Controls the padding (top, right, bottom, left) of the text in the barcode scanner component. This creates spacing around the text. Acceptable units: px.<br>CSS variable: --wm-barcodescanner-text-padding"
|
|
56
54
|
}
|
|
57
55
|
}
|
|
58
56
|
},
|
|
@@ -85,37 +83,11 @@
|
|
|
85
83
|
}
|
|
86
84
|
},
|
|
87
85
|
"padding": {
|
|
88
|
-
"
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
"description": "Sets the top padding of the barcode scanner component. This creates spacing at the top of the component.<br>CSS variable: --wm-barcodescanner-padding-top"
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"left": {
|
|
97
|
-
"value": "{space.2.value}",
|
|
98
|
-
"type": "space",
|
|
99
|
-
"attributes": {
|
|
100
|
-
"subtype": "space",
|
|
101
|
-
"description": "Sets the left padding of the barcode scanner component. This creates spacing on the left side of the component.<br>CSS variable: --wm-barcodescanner-padding-left"
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"bottom": {
|
|
105
|
-
"value": "{space.2.value}",
|
|
106
|
-
"type": "space",
|
|
107
|
-
"attributes": {
|
|
108
|
-
"subtype": "space",
|
|
109
|
-
"description": "Sets the bottom padding of the barcode scanner component. This creates spacing at the bottom of the component.<br>CSS variable: --wm-barcodescanner-padding-bottom"
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
"right": {
|
|
113
|
-
"value": "{space.2.value}",
|
|
114
|
-
"type": "space",
|
|
115
|
-
"attributes": {
|
|
116
|
-
"subtype": "space",
|
|
117
|
-
"description": "Sets the right padding of the barcode scanner component. This creates spacing on the right side of the component.<br>CSS variable: --wm-barcodescanner-padding-right"
|
|
118
|
-
}
|
|
86
|
+
"value": "10px {space.2.value} {space.2.value} {space.2.value}",
|
|
87
|
+
"type": "space",
|
|
88
|
+
"attributes": {
|
|
89
|
+
"subtype": "space",
|
|
90
|
+
"description": "Controls the padding (top, right, bottom, left) of the barcode scanner component. This creates spacing around the component content. Acceptable units: px.<br>CSS variable: --wm-barcodescanner-padding"
|
|
119
91
|
}
|
|
120
92
|
},
|
|
121
93
|
"border": {
|