@pedidopago/ui 1.17.4 → 1.17.5
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/NewAlert/styles.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/NewAlert/styles.ts"],"names":[],"mappings":";AAgBA,eAAO,MAAM,cAAc;;;;;;;;;UAuDzB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StyledNewAlert=void 0;var _templateObject,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled")),_Flex=_interopRequireDefault(require("../Flex")),_getColorValue=require("../../utils/getColorValue"),_utils=require("./utils")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.StyledNewAlert=void 0;var _templateObject,_react=require("@emotion/react"),_styled=_interopRequireDefault(require("@emotion/styled")),_Flex=_interopRequireDefault(require("../Flex")),_getColorValue=require("../../utils/getColorValue"),_utils=require("./utils");// Libs
|
|
2
2
|
// Utils
|
|
3
3
|
function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function _taggedTemplateLiteral(strings,raw){return raw||(raw=strings.slice(0)),Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}))}// Types
|
|
4
4
|
var StyledNewAlert=(0,_styled.default)(_Flex.default)(function(props){var _props$bgColor,_props$color,bgColorByType=(0,_utils.getBackgroundColorByType)(props.type),textColorByType=(0,_utils.getTextColorByType)(props.type,"dark"===props.theme.colorMode),headerBgColorByType=(0,_utils.getHeaderBackgroundColorByType)(props.type),headerBgColor=(0,_getColorValue.getColorValue)(headerBgColorByType,props.theme),backgroundColor=(0,_getColorValue.getColorValue)(null!==(_props$bgColor=props.bgColor)&&void 0!==_props$bgColor?_props$bgColor:bgColorByType,props.theme),textColor=(0,_getColorValue.getColorValue)(null!==(_props$color=props.color)&&void 0!==_props$color?_props$color:textColorByType,props.theme);return(0,_react.css)(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n gap: 0.875rem;\n border-radius: 0.25rem;\n background-color: ",";\n color: ",";\n font-size: 1rem;\n padding: 0.75rem 1rem;\n\n width: ",";\n box-sizing: border-box;\n\n &:has(.alert-header) {\n flex-direction: column;\n padding: 0;\n gap: 0;\n }\n\n &:not(:has(.alert-header)).rounded-full {\n border-radius: 9999px;\n font-size: 0.875rem;\n }\n\n &:not(:has(.alert-header)).highlighted {\n border-left: 0.25rem solid ",";\n }\n\n &:not(:has(.alert-header)).filled {\n background-color: ",";\n color: white;\n }\n\n .alert-header {\n padding: 0.75rem 1rem;\n width: 100%;\n font-weight: 600;\n color: white;\n background: ",";\n border-radius: 0.25rem 0.25rem 0 0;\n }\n\n .alert-content {\n padding: 0.75rem 1rem;\n width: 100%;\n }\n "])),backgroundColor,textColor,props.fullWidth?"100%":"fit-content",headerBgColor,headerBgColor,headerBgColor)});exports.StyledNewAlert=StyledNewAlert;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colorCheck.d.ts","sourceRoot":"","sources":["../../src/utils/colorCheck.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"colorCheck.d.ts","sourceRoot":"","sources":["../../src/utils/colorCheck.ts"],"names":[],"mappings":"AAAA,KAAK,qBAAqB,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG;QACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;CACH,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,UAAW,MAAM,KAAG,OAK1C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,KAAG,OAK7C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,UACpB,MAAM,eACA,qBAAqB,KACjC,MAAM,GAAG,IAYX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,UAAW,MAAM,WAAW,MAAM,KAAG,MASpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,UAAW,MAAM,EAAE,KAAG,MAIvD,CAAC"}
|
package/dist/utils/colorCheck.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stripThemeColors=exports.parseHslColorToString=exports.parseHexColorToRgba=exports.isRgbHslColor=exports.isHexColor=void 0;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.stripThemeColors=exports.parseHslColorToString=exports.parseHexColorToRgba=exports.isRgbHslColor=exports.isHexColor=void 0;function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(o,minLen){if(o){if("string"==typeof o)return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);return"Object"===n&&o.constructor&&(n=o.constructor.name),"Map"===n||"Set"===n?Array.from(o):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(o,minLen):void 0}}function _arrayLikeToArray(arr,len){(null==len||len>arr.length)&&(len=arr.length);for(var i=0,arr2=Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _iterableToArrayLimit(arr,i){var _i=null==arr?null:"undefined"!=typeof Symbol&&arr[Symbol.iterator]||arr["@@iterator"];if(null!=_i){var _s,_e,_x,_r,_arr=[],_n=!0,_d=!1;try{if(_x=(_i=_i.call(arr)).next,0===i){if(Object(_i)!==_i)return;_n=!1}else for(;!(_n=(_s=_x.call(_i)).done)&&(_arr.push(_s.value),_arr.length!==i);_n=!0);}catch(err){_d=!0,_e=err}finally{try{if(!_n&&null!=_i.return&&(_r=_i.return(),Object(_r)!==_r))return}finally{if(_d)throw _e}}return _arr}}function _arrayWithHoles(arr){if(Array.isArray(arr))return arr}/**
|
|
2
2
|
* Verifies if the provided color is a valid hex color.
|
|
3
3
|
* @param color : color value;
|
|
4
4
|
* @returns : true if color is valid, false otherwise;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* @param color : theme color tag value;
|
|
14
14
|
* @param themeColors : theme colors object;
|
|
15
15
|
* @returns : theme color value if color is valid, null otherwise;
|
|
16
|
-
*/exports.isRgbHslColor=isRgbHslColor;var stripThemeColors=function(color,themeColors){var splitColor=color.split("."),colorCategory=splitColor[0],colorVariant=splitColor[1];return
|
|
16
|
+
*/exports.isRgbHslColor=isRgbHslColor;var stripThemeColors=function(color,themeColors){var splitColor=color.split("."),colorCategory=splitColor[0],colorVariant=splitColor[1];return themeColors[colorCategory]&&themeColors[colorCategory][colorVariant]?themeColors[colorCategory][colorVariant]:null};/**
|
|
17
17
|
* Convert a hex color to rgba color.
|
|
18
18
|
* @param color : hex color value;
|
|
19
19
|
* @param opacity : opacity value;
|