@pedidopago/ui 1.10.11 → 1.10.13
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/components/Alert/styles.d.ts.map +1 -1
- package/dist/components/Alert/styles.js +1 -1
- package/dist/components/Badge/styles.js +1 -1
- package/dist/components/CollapseCard/ExpandButton/styles.d.ts +1 -1
- package/dist/components/ComposeIcon/index.d.ts.map +1 -1
- package/dist/components/ComposeIcon/index.js +1 -1
- package/dist/components/NewSelect/Multiple/index.d.ts +1 -1
- package/dist/components/NewSelect/Multiple/index.d.ts.map +1 -1
- package/dist/components/NewSelect/Multiple/index.js +1 -1
- package/dist/components/NewSelect/Single/Examples/index.d.ts.map +1 -1
- package/dist/components/NewSelect/Single/Examples/index.js +1 -1
- package/dist/components/NewSelect/Single/index.d.ts +1 -1
- package/dist/components/NewSelect/Single/index.d.ts.map +1 -1
- package/dist/components/NewSelect/Single/index.js +1 -1
- package/dist/components/NewSelect/types.d.ts +1 -0
- package/dist/components/NewSelect/types.d.ts.map +1 -1
- package/dist/components/Pagination/index.d.ts +1 -1
- package/dist/components/Pagination/index.d.ts.map +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/Pagination/types.d.ts +1 -0
- package/dist/components/Pagination/types.d.ts.map +1 -1
- package/dist/components/Tag/index.d.ts.map +1 -1
- package/dist/components/Tag/index.js +1 -1
- package/dist/components/Tag/types.d.ts +1 -0
- package/dist/components/Tag/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/theme/contexts/ThemeContext.d.ts.map +1 -1
- package/dist/shared/theme/contexts/ThemeContext.js +1 -1
- package/dist/shared/theme/hooks/useTheme.d.ts +6 -452
- package/dist/shared/theme/hooks/useTheme.d.ts.map +1 -1
- package/dist/shared/theme/hooks/useTheme.js +1 -1
- package/dist/shared/theme/theme.test.js +1 -1
- package/dist/shared/theme/theme.types.d.ts +16 -4
- package/dist/shared/theme/theme.types.d.ts.map +1 -1
- package/dist/shared/theme/utils/extendTheme.d.ts.map +1 -1
- package/dist/shared/theme/utils/extendTheme.js +1 -1
- package/dist/shared/theme/utils/tests/extendTheme.test.d.ts +2 -0
- package/dist/shared/theme/utils/tests/extendTheme.test.d.ts.map +1 -0
- package/dist/shared/theme/utils/tests/extendTheme.test.js +1 -0
- package/dist/shared/types/generics.d.ts +9 -0
- package/dist/shared/types/generics.d.ts.map +1 -0
- package/dist/shared/types/generics.js +1 -0
- package/dist/utils/customColorMode.d.ts +4 -0
- package/dist/utils/customColorMode.d.ts.map +1 -1
- package/dist/utils/customColorMode.js +4 -1
- package/dist/utils/findDifferentKeys.d.ts +3 -0
- package/dist/utils/findDifferentKeys.d.ts.map +1 -0
- package/dist/utils/findDifferentKeys.js +1 -0
- package/dist/utils/formatters/strings.d.ts +9 -0
- package/dist/utils/formatters/strings.d.ts.map +1 -1
- package/dist/utils/formatters/strings.js +13 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customColorMode.d.ts","sourceRoot":"","sources":["../../src/utils/customColorMode.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,SAKtD"}
|
|
1
|
+
{"version":3,"file":"customColorMode.d.ts","sourceRoot":"","sources":["../../src/utils/customColorMode.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,SAKtD"}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
"use strict";var _react=require("@emotion/react");Object.defineProperty(exports,"__esModule",{value:!0}),exports.customColorMode=customColorMode
|
|
1
|
+
"use strict";var _react=require("@emotion/react");Object.defineProperty(exports,"__esModule",{value:!0}),exports.customColorMode=customColorMode;/**
|
|
2
|
+
* @deprecated do not use `customColorMode`, use the useTheme instead, ex:
|
|
3
|
+
* @example const { colorByTheme } = useTheme()
|
|
4
|
+
*/function customColorMode(light,dark){// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
2
5
|
var theme=(0,_react.useTheme)();return"dark"===theme.colorMode?dark:light}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"findDifferentKeys.d.ts","sourceRoot":"","sources":["../../src/utils/findDifferentKeys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,CAoBzF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.findDifferentKeys=findDifferentKeys;function _typeof(obj){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(obj){return typeof obj}:function(obj){return obj&&"function"==typeof Symbol&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj},_typeof(obj)}function findDifferentKeys(obj1,obj2){function compareObjects(objA,objB){var currentKey=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"";for(var key in objA){var valueA=null===objA||void 0===objA?void 0:objA[key],valueB=null===objB||void 0===objB?void 0:objB[key],newKey=currentKey?"".concat(currentKey,".").concat(key):key;"object"===_typeof(valueA)||"object"===_typeof(valueB)?compareObjects(valueA,valueB,newKey):valueA!==valueB&&differentKeys.push(newKey)}}var differentKeys=[];return compareObjects(obj1,obj2),differentKeys}
|
|
@@ -32,4 +32,13 @@ export declare function sanitizeString(string: string): string;
|
|
|
32
32
|
* @returns a normalized string.
|
|
33
33
|
*/
|
|
34
34
|
export declare function normalizeString(string: string): string;
|
|
35
|
+
/**
|
|
36
|
+
* The function converts a string to kebab-case by replacing spaces and underscores
|
|
37
|
+
* with hyphens, converting camelCase to kebab-case, and converting the entire
|
|
38
|
+
* string to lowercase.
|
|
39
|
+
* @param {string} text - The `text` parameter is a string that represents the
|
|
40
|
+
* input data that needs to be converted to kebab-case.
|
|
41
|
+
* @returns the input string converted to kebab-case.
|
|
42
|
+
*/
|
|
43
|
+
export declare function convertToKebabCase(text: string): string;
|
|
35
44
|
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/utils/formatters/strings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlE;AACD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE3D;AACD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,UAQ7C"}
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../../src/utils/formatters/strings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMlE;AACD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAE3D;AACD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE9D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,UAQ7C;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,UAM9C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalizeString=normalizeString,exports.removeLineBreaks=removeLineBreaks,exports.replaceUnecessarySpaces=replaceUnecessarySpaces,exports.sanitizeString=sanitizeString,exports.truncateString=truncateString;/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.convertToKebabCase=convertToKebabCase,exports.normalizeString=normalizeString,exports.removeLineBreaks=removeLineBreaks,exports.replaceUnecessarySpaces=replaceUnecessarySpaces,exports.sanitizeString=sanitizeString,exports.truncateString=truncateString;/**
|
|
2
2
|
* Truncates a string to a given character limit and adds ellipses at the end if necessary.
|
|
3
3
|
* @param {string} data - The string to truncate.
|
|
4
4
|
* @param {number} limit - The maximum number of characters the string can have.
|
|
@@ -22,4 +22,15 @@
|
|
|
22
22
|
* @param {string} string - The `string` parameter is a string value that you want
|
|
23
23
|
* to normalize.
|
|
24
24
|
* @returns a normalized string.
|
|
25
|
-
*/function normalizeString(string){return string?string.toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g,""):""}
|
|
25
|
+
*/function normalizeString(string){return string?string.toLowerCase().trim().normalize("NFD").replace(/[\u0300-\u036f]/g,""):""}/**
|
|
26
|
+
* The function converts a string to kebab-case by replacing spaces and underscores
|
|
27
|
+
* with hyphens, converting camelCase to kebab-case, and converting the entire
|
|
28
|
+
* string to lowercase.
|
|
29
|
+
* @param {string} text - The `text` parameter is a string that represents the
|
|
30
|
+
* input data that needs to be converted to kebab-case.
|
|
31
|
+
* @returns the input string converted to kebab-case.
|
|
32
|
+
*/function convertToKebabCase(text){return text.replace(/\s+/g,"-")// Replace spaces with hyphens
|
|
33
|
+
.replace(/_/g,"-")// Replace underscores with hyphens
|
|
34
|
+
.replace(/([a-z])([A-Z])/g,"$1-$2")// Convert camelCase to kebab-case
|
|
35
|
+
.toLowerCase();// Convert the entire string to lowercase
|
|
36
|
+
}
|