@mingto/mt-ui 1.1.42 → 1.1.43
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.es.js +5 -2
- package/dist/index.umd.js +5 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4704,6 +4704,9 @@ function useLocale() {
|
|
|
4704
4704
|
//#region src/hooks/use-namespace/index.ts
|
|
4705
4705
|
var defaultNamespace = "mt";
|
|
4706
4706
|
var statePrefix$1 = "is-";
|
|
4707
|
+
function toKebabCase(key) {
|
|
4708
|
+
return key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
4709
|
+
}
|
|
4707
4710
|
function _bem$1(namespace, block, blockSuffix, element, modifier) {
|
|
4708
4711
|
let cls = `${namespace}-${block}`;
|
|
4709
4712
|
if (blockSuffix) cls += `-${blockSuffix}`;
|
|
@@ -4733,12 +4736,12 @@ function useNamespace(block, namespaceOverrides) {
|
|
|
4733
4736
|
};
|
|
4734
4737
|
const cssVar = (object) => {
|
|
4735
4738
|
const styles = {};
|
|
4736
|
-
for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
|
|
4739
|
+
for (const key in object) if (object[key]) styles[`--${namespace.value}-${toKebabCase(key)}`] = object[key];
|
|
4737
4740
|
return styles;
|
|
4738
4741
|
};
|
|
4739
4742
|
const cssVarBlock = (object) => {
|
|
4740
4743
|
const styles = {};
|
|
4741
|
-
for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
|
|
4744
|
+
for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${toKebabCase(key)}`] = object[key];
|
|
4742
4745
|
return styles;
|
|
4743
4746
|
};
|
|
4744
4747
|
const cssVarName = (name) => `--${namespace.value}-${name}`;
|
package/dist/index.umd.js
CHANGED
|
@@ -4733,6 +4733,9 @@
|
|
|
4733
4733
|
//#region src/hooks/use-namespace/index.ts
|
|
4734
4734
|
var defaultNamespace = "mt";
|
|
4735
4735
|
var statePrefix$1 = "is-";
|
|
4736
|
+
function toKebabCase(key) {
|
|
4737
|
+
return key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
4738
|
+
}
|
|
4736
4739
|
function _bem$1(namespace, block, blockSuffix, element, modifier) {
|
|
4737
4740
|
let cls = `${namespace}-${block}`;
|
|
4738
4741
|
if (blockSuffix) cls += `-${blockSuffix}`;
|
|
@@ -4762,12 +4765,12 @@
|
|
|
4762
4765
|
};
|
|
4763
4766
|
const cssVar = (object) => {
|
|
4764
4767
|
const styles = {};
|
|
4765
|
-
for (const key in object) if (object[key]) styles[`--${namespace.value}-${key}`] = object[key];
|
|
4768
|
+
for (const key in object) if (object[key]) styles[`--${namespace.value}-${toKebabCase(key)}`] = object[key];
|
|
4766
4769
|
return styles;
|
|
4767
4770
|
};
|
|
4768
4771
|
const cssVarBlock = (object) => {
|
|
4769
4772
|
const styles = {};
|
|
4770
|
-
for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${key}`] = object[key];
|
|
4773
|
+
for (const key in object) if (object[key]) styles[`--${namespace.value}-${block}-${toKebabCase(key)}`] = object[key];
|
|
4771
4774
|
return styles;
|
|
4772
4775
|
};
|
|
4773
4776
|
const cssVarName = (name) => `--${namespace.value}-${name}`;
|