ant-design-x-vue
Version:
Craft AI-driven interfaces effortlessly
2 lines (1 loc) • 2.07 kB
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("./utils.js"),c=(t,r,o)=>{switch(t){case"marginLeft":case"marginRight":case"paddingLeft":case"paddingRight":case"left":case"right":case"borderLeft":case"borderLeftWidth":case"borderLeftStyle":case"borderLeftColor":case"borderRight":case"borderRightWidth":case"borderRightStyle":case"borderRightColor":case"borderTopLeftRadius":case"borderTopRightRadius":case"borderBottomLeftRadius":case"borderBottomRightRadius":a.lintWarning(`You seem to be using non-logical property '${t}' which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,o);return;case"margin":case"padding":case"borderWidth":case"borderStyle":if(typeof r=="string"){const s=r.split(" ").map(n=>n.trim());s.length===4&&s[1]!==s[3]&&a.lintWarning(`You seem to be using '${t}' property with different left ${t} and right ${t}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,o)}return;case"clear":case"textAlign":(r==="left"||r==="right")&&a.lintWarning(`You seem to be using non-logical value '${r}' of ${t}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,o);return;case"borderRadius":typeof r=="string"&&r.split("/").map(i=>i.trim()).reduce((i,l)=>{if(i)return i;const e=l.split(" ").map(d=>d.trim());return e.length>=2&&e[0]!==e[1]||e.length===3&&e[1]!==e[2]||e.length===4&&e[2]!==e[3]?!0:i},!1)&&a.lintWarning(`You seem to be using non-logical value '${r}' of ${t}, which is not compatible with RTL mode. Please use logical properties and values instead. For more information: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Logical_Properties.`,o);return}};exports.default=c;
;