@pedidopago/ui 1.16.67 → 1.16.69
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/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/shared/hooks/useSystemTheme.d.ts +3 -4
- package/dist/shared/hooks/useSystemTheme.d.ts.map +1 -1
- package/dist/shared/hooks/useSystemTheme.js +1 -1
- package/dist/shared/theme/contexts/ThemeContext.d.ts +7 -4
- 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 +453 -7
- package/dist/shared/theme/hooks/useTheme.d.ts.map +1 -1
- package/dist/shared/theme/hooks/useTheme.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,IAAa,EACb,GAAY,EACZ,OAAkB,EAClB,OAAkB,EAClB,OAAe,EACf,OAAe,EACf,aAAqB,EACrB,mBAA0B,EAC1B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,WAAW,EACX,WAAW,EACX,YAA4B,EAC5B,GAAG,IAAI,EACR,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,IAAa,EACb,GAAY,EACZ,OAAkB,EAClB,OAAkB,EAClB,OAAe,EACf,OAAe,EACf,aAAqB,EACrB,mBAA0B,EAC1B,QAAQ,EACR,SAAS,EACT,OAAO,EACP,WAAW,EACX,WAAW,EACX,YAA4B,EAC5B,GAAG,IAAI,EACR,EAAE,UAAU,2CAmGZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Modal=Modal;var _framerMotion=require("framer-motion"),_react=require("react"),_useDisableBodyScroll=require("../../shared/hooks/useDisableBodyScroll"),_useKeyPress=require("../../shared/hooks/useKeyPress"),_ReactPortal=require("../ReactPortal"),_styles=require("./styles"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["open","left","top","anchorX","anchorY","offsetX","offsetY","hideScrollBar","disableScrollOnOpen","maxWidth","maxHeight","onClose","hideOverlay","blurOverlay","portalNameId"];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}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function Modal(_ref){function getPercentage(type,value){if("number"==typeof value)return value;var anchor="x"===type?anchorX:anchorY;if("number"==typeof anchor)return anchor;switch(anchor){case"left":case"top":return 0;case"center":return-50;case"right":case"bottom":return-100;default:throw new Error("Invalid ".concat(type," anchor: ").concat(anchor));}}var open=_ref.open,_ref$left=_ref.left,left=void 0===_ref$left?"50vw":_ref$left,_ref$top=_ref.top,top=void 0===_ref$top?"50vh":_ref$top,_ref$anchorX=_ref.anchorX,anchorX=void 0===_ref$anchorX?"center":_ref$anchorX,_ref$anchorY=_ref.anchorY,anchorY=void 0===_ref$anchorY?"center":_ref$anchorY,_ref$offsetX=_ref.offsetX,offsetX=void 0===_ref$offsetX?"0px":_ref$offsetX,_ref$offsetY=_ref.offsetY,offsetY=void 0===_ref$offsetY?"0px":_ref$offsetY,_ref$hideScrollBar=_ref.hideScrollBar,_ref$disableScrollOnO=_ref.disableScrollOnOpen,maxWidth=_ref.maxWidth,maxHeight=_ref.maxHeight,onClose=_ref.onClose,hideOverlay=_ref.hideOverlay,blurOverlay=_ref.blurOverlay,_ref$portalNameId=_ref.portalNameId,portalNameId=void 0===_ref$portalNameId?"portal-root":_ref$portalNameId,rest=_objectWithoutProperties(_ref,_excluded),containerRef=(0,_react.useRef)(null),_useState=(0,_react.useState)(open),_useState2=_slicedToArray(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1],modalID=(0,_react.useId)();(0,_react.useEffect)(function(){return setIsOpen(open)},[open]);var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Modal=Modal;var _framerMotion=require("framer-motion"),_react=require("react"),_useDisableBodyScroll=require("../../shared/hooks/useDisableBodyScroll"),_useKeyPress=require("../../shared/hooks/useKeyPress"),_ReactPortal=require("../ReactPortal"),_styles=require("./styles"),_jsxRuntime=require("react/jsx-runtime"),_excluded=["open","left","top","anchorX","anchorY","offsetX","offsetY","hideScrollBar","disableScrollOnOpen","maxWidth","maxHeight","onClose","hideOverlay","blurOverlay","portalNameId"];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}function _objectWithoutProperties(source,excluded){if(null==source)return{};var key,i,target=_objectWithoutPropertiesLoose(source,excluded);if(Object.getOwnPropertySymbols){var sourceSymbolKeys=Object.getOwnPropertySymbols(source);for(i=0;i<sourceSymbolKeys.length;i++)key=sourceSymbolKeys[i],0<=excluded.indexOf(key)||Object.prototype.propertyIsEnumerable.call(source,key)&&(target[key]=source[key])}return target}function _objectWithoutPropertiesLoose(source,excluded){if(null==source)return{};var key,i,target={},sourceKeys=Object.keys(source);for(i=0;i<sourceKeys.length;i++)key=sourceKeys[i],0<=excluded.indexOf(key)||(target[key]=source[key]);return target}function Modal(_ref){function getPercentage(type,value){if("number"==typeof value)return value;var anchor="x"===type?anchorX:anchorY;if("number"==typeof anchor)return anchor;switch(anchor){case"left":case"top":return 0;case"center":return-50;case"right":case"bottom":return-100;default:throw new Error("Invalid ".concat(type," anchor: ").concat(anchor));}}var open=_ref.open,_ref$left=_ref.left,left=void 0===_ref$left?"50vw":_ref$left,_ref$top=_ref.top,top=void 0===_ref$top?"50vh":_ref$top,_ref$anchorX=_ref.anchorX,anchorX=void 0===_ref$anchorX?"center":_ref$anchorX,_ref$anchorY=_ref.anchorY,anchorY=void 0===_ref$anchorY?"center":_ref$anchorY,_ref$offsetX=_ref.offsetX,offsetX=void 0===_ref$offsetX?"0px":_ref$offsetX,_ref$offsetY=_ref.offsetY,offsetY=void 0===_ref$offsetY?"0px":_ref$offsetY,_ref$hideScrollBar=_ref.hideScrollBar,_ref$disableScrollOnO=_ref.disableScrollOnOpen,maxWidth=_ref.maxWidth,maxHeight=_ref.maxHeight,onClose=_ref.onClose,hideOverlay=_ref.hideOverlay,blurOverlay=_ref.blurOverlay,_ref$portalNameId=_ref.portalNameId,portalNameId=void 0===_ref$portalNameId?"portal-root":_ref$portalNameId,rest=_objectWithoutProperties(_ref,_excluded),containerRef=(0,_react.useRef)(null),prevWindowWidth=(0,_react.useRef)(window.innerWidth),_useState=(0,_react.useState)(open),_useState2=_slicedToArray(_useState,2),isOpen=_useState2[0],setIsOpen=_useState2[1],modalID=(0,_react.useId)();(0,_react.useEffect)(function(){return setIsOpen(open)},[open]);var handleCloseOnResize=(0,_react.useCallback)(function(){var isResizingX=prevWindowWidth.current!==window.innerWidth;isResizingX&&isOpen&&(null===onClose||void 0===onClose?void 0:onClose()),prevWindowWidth.current=window.innerWidth},[isOpen,onClose]);return(0,_useKeyPress.useKeyPress)("Escape",onClose),(0,_useDisableBodyScroll.useDisableBodyScroll)(isOpen&&(void 0===_ref$disableScrollOnO||_ref$disableScrollOnO),"modal"),(0,_react.useEffect)(function(){return window.addEventListener("resize",handleCloseOnResize),function(){return window.removeEventListener("resize",handleCloseOnResize)}},[handleCloseOnResize]),/*#__PURE__*/(0,_jsxRuntime.jsx)(_framerMotion.AnimatePresence,{mode:"wait",children:isOpen&&/*#__PURE__*/(0,_jsxRuntime.jsxs)(_ReactPortal.ReactPortal,{wrapperId:portalNameId,children:[/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.Overlay,{initial:{opacity:0},exit:{opacity:0},animate:{opacity:blurOverlay?1:.5},transition:{duration:.2},isOpen:isOpen,blur:blurOverlay,onClick:onClose,hidden:hideOverlay},"modal-overlay-".concat(modalID)),/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.ModalContainer,{ref:containerRef,style:{left:"calc(".concat(left," + ").concat(offsetX,")"),top:"calc(".concat(top," + ").concat(offsetY,")"),maxWidth:"number"==typeof maxWidth?"".concat(maxWidth,"px"):maxWidth,maxHeight:"number"==typeof maxHeight?"".concat(maxHeight,"px"):maxHeight,transform:function(){return"translate(\n ".concat(getPercentage("x",anchorX),"%, \n ").concat(getPercentage("y",anchorY),"%\n )")}()},children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_styles.ModalElement,{"data-scroll":"dispatch-scroll",hideScrollBar:void 0!==_ref$hideScrollBar&&_ref$hideScrollBar,initial:{scale:.8,opacity:0},exit:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.1},style:{maxHeight:"number"==typeof maxHeight?"".concat(maxHeight,"px"):maxHeight},children:rest.children},"modal-element-".concat(modalID))})]})})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSystemTheme.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useSystemTheme.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"useSystemTheme.d.ts","sourceRoot":"","sources":["../../../src/shared/hooks/useSystemTheme.ts"],"names":[],"mappings":"AAEA,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AASlC,wBAAgB,cAAc,IAAI,SAAS,CAoB1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var _react=require("react");Object.defineProperty(exports,"__esModule",{value:!0}),exports.useSystemTheme=
|
|
1
|
+
"use strict";var _react=require("react");Object.defineProperty(exports,"__esModule",{value:!0}),exports.useSystemTheme=useSystemTheme;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}function getSystemTheme(){return"undefined"==typeof window?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function useSystemTheme(){var _useState=(0,_react.useState)(getSystemTheme),_useState2=_slicedToArray(_useState,2),theme=_useState2[0],setTheme=_useState2[1];return(0,_react.useEffect)(function(){if("undefined"!=typeof window){var mediaQuery=window.matchMedia("(prefers-color-scheme: dark)"),handleChange=function(e){setTheme(e.matches?"dark":"light")};return mediaQuery.addEventListener("change",handleChange),function(){mediaQuery.removeEventListener("change",handleChange)}}},[]),theme}
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { ExtendThemeProps } from '../theme.types';
|
|
3
|
+
type ColorMode = 'light' | 'dark';
|
|
3
4
|
type ThemeContextProps = {
|
|
4
5
|
theme: ExtendThemeProps;
|
|
5
|
-
colorMode:
|
|
6
|
+
colorMode: ColorMode;
|
|
6
7
|
switchColorMode: () => void;
|
|
7
|
-
colorByTheme<T, P extends T>(light: P, dark: P):
|
|
8
|
+
colorByTheme<T, P extends T>(light: P, dark: P): P;
|
|
8
9
|
};
|
|
9
10
|
type ThemeProviderProps = {
|
|
10
11
|
theme?: ExtendThemeProps;
|
|
11
|
-
initialColorMode?:
|
|
12
|
+
initialColorMode?: ColorMode | 'system';
|
|
13
|
+
useSystemColorMode?: boolean;
|
|
14
|
+
forceColorMode?: ColorMode;
|
|
12
15
|
children: ReactNode;
|
|
13
16
|
};
|
|
14
17
|
export declare const ThemeContext: import("react").Context<ThemeContextProps>;
|
|
15
|
-
export declare function PPUIThemeProvider({ children, theme, initialColorMode }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function PPUIThemeProvider({ children, theme: themeProp, initialColorMode, useSystemColorMode, forceColorMode, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
19
|
export {};
|
|
17
20
|
//# sourceMappingURL=ThemeContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,
|
|
1
|
+
{"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAgC,MAAM,OAAO,CAAC;AAM/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIlD,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAElC,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,SAAS,CAAC;IACrB,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;CACpD,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACxC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,KAAK,EAAE,SAAS,EAChB,gBAA2B,EAC3B,kBAAkB,EAClB,cAAc,GACf,EAAE,kBAAkB,2CA8DpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.PPUIThemeProvider=PPUIThemeProvider,exports.ThemeContext=void 0;var _react=require("react"),_react2=require("@emotion/react"),_ToastProvider=_interopRequireDefault(require("../../../components/Toast/contexts/ToastProvider")),_=require(".."),_localStorageController=require("../utils/localStorageController"),_useSystemTheme=require("../../hooks/useSystemTheme"),_colors=require("../objects/colors"),_shadows=require("../objects/shadows"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}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}var ThemeContext=/*#__PURE__*/(0,_react.createContext)({});exports.ThemeContext=ThemeContext;function PPUIThemeProvider(_ref){
|
|
1
|
+
"use strict";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)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.PPUIThemeProvider=PPUIThemeProvider,exports.ThemeContext=void 0;var _react=require("react"),_react2=require("@emotion/react"),_ToastProvider=_interopRequireDefault(require("../../../components/Toast/contexts/ToastProvider")),_=require(".."),_localStorageController=require("../utils/localStorageController"),_useSystemTheme=require("../../hooks/useSystemTheme"),_colors=require("../objects/colors"),_shadows=require("../objects/shadows"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})),keys.push.apply(keys,symbols)}return keys}function _objectSpread(target){for(var source,i=1;i<arguments.length;i++)source=null==arguments[i]?{}:arguments[i],i%2?ownKeys(Object(source),!0).forEach(function(key){_defineProperty(target,key,source[key])}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))});return target}function _defineProperty(obj,key,value){return key=_toPropertyKey(key),key in obj?Object.defineProperty(obj,key,{value:value,enumerable:!0,configurable:!0,writable:!0}):obj[key]=value,obj}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return"symbol"===_typeof(key)?key:key+""}function _toPrimitive(input,hint){if("object"!==_typeof(input)||null===input)return input;var prim=input[Symbol.toPrimitive];if(prim!==void 0){var res=prim.call(input,hint||"default");if("object"!==_typeof(res))return res;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===hint?String:Number)(input)}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}var ThemeContext=/*#__PURE__*/(0,_react.createContext)({});exports.ThemeContext=ThemeContext;function PPUIThemeProvider(_ref){var children=_ref.children,themeProp=_ref.theme,_ref$initialColorMode=_ref.initialColorMode,initialColorMode=void 0===_ref$initialColorMode?"system":_ref$initialColorMode,useSystemColorMode=_ref.useSystemColorMode,forceColorMode=_ref.forceColorMode,systemTheme=(0,_useSystemTheme.useSystemTheme)(),baseTheme=themeProp||_.defaultTheme,_useState=(0,_react.useState)(function(){if(forceColorMode)return forceColorMode;if(useSystemColorMode)return systemTheme;if("undefined"!=typeof localStorage){var stored=_localStorageController.localStorageController.get("UIColorMode");if("light"===stored||"dark"===stored)return stored}return"system"===initialColorMode?systemTheme:initialColorMode}),_useState2=_slicedToArray(_useState,2),colorMode=_useState2[0],setColorMode=_useState2[1];(0,_react.useEffect)(function(){forceColorMode||(useSystemColorMode||"system"===initialColorMode)&&setColorMode(systemTheme)},[systemTheme,useSystemColorMode,initialColorMode,forceColorMode]),(0,_react.useEffect)(function(){forceColorMode&&setColorMode(forceColorMode)},[forceColorMode]);var mergedTheme=(0,_react.useMemo)(function(){var key="dark"===colorMode?"darkColors":"lightColors",themeColors=baseTheme[key]||_colors.colors[colorMode];return _objectSpread(_objectSpread({},baseTheme),{},{colors:themeColors,shadow:_shadows.shadow[colorMode],colorMode:colorMode,colorByTheme:function colorByTheme(light,dark){return"dark"===colorMode?dark:light}})},[baseTheme,colorMode]);return/*#__PURE__*/(0,_jsxRuntime.jsx)(ThemeContext.Provider,{value:{theme:mergedTheme,colorMode:colorMode,switchColorMode:function(){if(!(useSystemColorMode||forceColorMode)){var next="light"===colorMode?"dark":"light";setColorMode(next),_localStorageController.localStorageController.set("UIColorMode",next)}},colorByTheme:mergedTheme.colorByTheme},children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_react2.ThemeProvider,{theme:mergedTheme,children:/*#__PURE__*/(0,_jsxRuntime.jsx)(_ToastProvider.default,{children:children})})})}
|
|
@@ -1,10 +1,456 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export declare function useTheme(): {
|
|
2
|
+
theme: {
|
|
3
|
+
fontSizes: {
|
|
4
|
+
tiny: string;
|
|
5
|
+
xxxs: string;
|
|
6
|
+
xxs: string;
|
|
7
|
+
xs: string;
|
|
8
|
+
sm: string;
|
|
9
|
+
md: string;
|
|
10
|
+
lg: string;
|
|
11
|
+
xl: string;
|
|
12
|
+
xxl: string;
|
|
13
|
+
xxxl: string;
|
|
14
|
+
display: string;
|
|
15
|
+
giant: string;
|
|
16
|
+
};
|
|
17
|
+
fontWeight: {
|
|
18
|
+
normal: string;
|
|
19
|
+
bold: string;
|
|
20
|
+
'100': string;
|
|
21
|
+
'200': string;
|
|
22
|
+
'300': string;
|
|
23
|
+
'400': string;
|
|
24
|
+
'500': string;
|
|
25
|
+
'600': string;
|
|
26
|
+
'700': string;
|
|
27
|
+
'800': string;
|
|
28
|
+
'900': string;
|
|
29
|
+
};
|
|
30
|
+
breakpoints: {
|
|
31
|
+
base: string;
|
|
32
|
+
sm: string;
|
|
33
|
+
md: string;
|
|
34
|
+
lg: string;
|
|
35
|
+
xl: string;
|
|
36
|
+
xxl: string;
|
|
37
|
+
};
|
|
38
|
+
colors: {
|
|
39
|
+
body: {
|
|
40
|
+
light: string;
|
|
41
|
+
dark: string;
|
|
42
|
+
};
|
|
43
|
+
primary: {
|
|
44
|
+
alert: string;
|
|
45
|
+
disabled: string;
|
|
46
|
+
default: string;
|
|
47
|
+
hover: string;
|
|
48
|
+
focus: string;
|
|
49
|
+
transparent: string;
|
|
50
|
+
};
|
|
51
|
+
secondary: {
|
|
52
|
+
disabled: string;
|
|
53
|
+
default: string;
|
|
54
|
+
hover: string;
|
|
55
|
+
focus: string;
|
|
56
|
+
};
|
|
57
|
+
tertiary: {
|
|
58
|
+
disabled: string;
|
|
59
|
+
default: string;
|
|
60
|
+
hover: string;
|
|
61
|
+
focus: string;
|
|
62
|
+
};
|
|
63
|
+
neutral: {
|
|
64
|
+
white: string;
|
|
65
|
+
neutral1: string;
|
|
66
|
+
neutral2: string;
|
|
67
|
+
neutral3: string;
|
|
68
|
+
neutral4: string;
|
|
69
|
+
neutral5: string;
|
|
70
|
+
neutral6: string;
|
|
71
|
+
black: string;
|
|
72
|
+
};
|
|
73
|
+
background: {
|
|
74
|
+
linear1: string;
|
|
75
|
+
linear2: string;
|
|
76
|
+
linear3: string;
|
|
77
|
+
light: string;
|
|
78
|
+
};
|
|
79
|
+
informative: {
|
|
80
|
+
default: string;
|
|
81
|
+
blurred: string;
|
|
82
|
+
dark: string;
|
|
83
|
+
gradient: string;
|
|
84
|
+
};
|
|
85
|
+
success: {
|
|
86
|
+
default: string;
|
|
87
|
+
blurred: string;
|
|
88
|
+
dark: string;
|
|
89
|
+
gradient: string;
|
|
90
|
+
};
|
|
91
|
+
success_secondary: {
|
|
92
|
+
default: string;
|
|
93
|
+
blurred: string;
|
|
94
|
+
dark: string;
|
|
95
|
+
gradient: string;
|
|
96
|
+
};
|
|
97
|
+
warning: {
|
|
98
|
+
default: string;
|
|
99
|
+
blurred: string;
|
|
100
|
+
dark: string;
|
|
101
|
+
gradient: string;
|
|
102
|
+
};
|
|
103
|
+
warning_secondary: {
|
|
104
|
+
default: string;
|
|
105
|
+
blurred: string;
|
|
106
|
+
dark: string;
|
|
107
|
+
gradient: string;
|
|
108
|
+
};
|
|
109
|
+
error: {
|
|
110
|
+
default: string;
|
|
111
|
+
blurred: string;
|
|
112
|
+
dark: string;
|
|
113
|
+
gradient: string;
|
|
114
|
+
};
|
|
115
|
+
critical: {
|
|
116
|
+
default: string;
|
|
117
|
+
blurred: string;
|
|
118
|
+
dark: string;
|
|
119
|
+
gradient: string;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
lightColors: {
|
|
123
|
+
body: {
|
|
124
|
+
light: string;
|
|
125
|
+
dark: string;
|
|
126
|
+
};
|
|
127
|
+
primary: {
|
|
128
|
+
alert: string;
|
|
129
|
+
disabled: string;
|
|
130
|
+
default: string;
|
|
131
|
+
hover: string;
|
|
132
|
+
focus: string;
|
|
133
|
+
transparent: string;
|
|
134
|
+
};
|
|
135
|
+
secondary: {
|
|
136
|
+
disabled: string;
|
|
137
|
+
default: string;
|
|
138
|
+
hover: string;
|
|
139
|
+
focus: string;
|
|
140
|
+
};
|
|
141
|
+
tertiary: {
|
|
142
|
+
disabled: string;
|
|
143
|
+
default: string;
|
|
144
|
+
hover: string;
|
|
145
|
+
focus: string;
|
|
146
|
+
};
|
|
147
|
+
neutral: {
|
|
148
|
+
white: string;
|
|
149
|
+
neutral1: string;
|
|
150
|
+
neutral2: string;
|
|
151
|
+
neutral3: string;
|
|
152
|
+
neutral4: string;
|
|
153
|
+
neutral5: string;
|
|
154
|
+
neutral6: string;
|
|
155
|
+
black: string;
|
|
156
|
+
};
|
|
157
|
+
background: {
|
|
158
|
+
linear1: string;
|
|
159
|
+
linear2: string;
|
|
160
|
+
linear3: string;
|
|
161
|
+
light: string;
|
|
162
|
+
};
|
|
163
|
+
informative: {
|
|
164
|
+
default: string;
|
|
165
|
+
blurred: string;
|
|
166
|
+
dark: string;
|
|
167
|
+
gradient: string;
|
|
168
|
+
};
|
|
169
|
+
success: {
|
|
170
|
+
default: string;
|
|
171
|
+
blurred: string;
|
|
172
|
+
dark: string;
|
|
173
|
+
gradient: string;
|
|
174
|
+
};
|
|
175
|
+
success_secondary: {
|
|
176
|
+
default: string;
|
|
177
|
+
blurred: string;
|
|
178
|
+
dark: string;
|
|
179
|
+
gradient: string;
|
|
180
|
+
};
|
|
181
|
+
warning: {
|
|
182
|
+
default: string;
|
|
183
|
+
blurred: string;
|
|
184
|
+
dark: string;
|
|
185
|
+
gradient: string;
|
|
186
|
+
};
|
|
187
|
+
warning_secondary: {
|
|
188
|
+
default: string;
|
|
189
|
+
blurred: string;
|
|
190
|
+
dark: string;
|
|
191
|
+
gradient: string;
|
|
192
|
+
};
|
|
193
|
+
error: {
|
|
194
|
+
default: string;
|
|
195
|
+
blurred: string;
|
|
196
|
+
dark: string;
|
|
197
|
+
gradient: string;
|
|
198
|
+
};
|
|
199
|
+
critical: {
|
|
200
|
+
default: string;
|
|
201
|
+
blurred: string;
|
|
202
|
+
dark: string;
|
|
203
|
+
gradient: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
darkColors: {
|
|
207
|
+
body: {
|
|
208
|
+
light: string;
|
|
209
|
+
dark: string;
|
|
210
|
+
};
|
|
211
|
+
primary: {
|
|
212
|
+
alert: string;
|
|
213
|
+
disabled: string;
|
|
214
|
+
default: string;
|
|
215
|
+
hover: string;
|
|
216
|
+
focus: string;
|
|
217
|
+
transparent: string;
|
|
218
|
+
};
|
|
219
|
+
secondary: {
|
|
220
|
+
disabled: string;
|
|
221
|
+
default: string;
|
|
222
|
+
hover: string;
|
|
223
|
+
focus: string;
|
|
224
|
+
};
|
|
225
|
+
tertiary: {
|
|
226
|
+
disabled: string;
|
|
227
|
+
default: string;
|
|
228
|
+
hover: string;
|
|
229
|
+
focus: string;
|
|
230
|
+
};
|
|
231
|
+
neutral: {
|
|
232
|
+
white: string;
|
|
233
|
+
neutral1: string;
|
|
234
|
+
neutral2: string;
|
|
235
|
+
neutral3: string;
|
|
236
|
+
neutral4: string;
|
|
237
|
+
neutral5: string;
|
|
238
|
+
neutral6: string;
|
|
239
|
+
black: string;
|
|
240
|
+
};
|
|
241
|
+
background: {
|
|
242
|
+
linear1: string;
|
|
243
|
+
linear2: string;
|
|
244
|
+
linear3: string;
|
|
245
|
+
light: string;
|
|
246
|
+
};
|
|
247
|
+
informative: {
|
|
248
|
+
default: string;
|
|
249
|
+
blurred: string;
|
|
250
|
+
dark: string;
|
|
251
|
+
gradient: string;
|
|
252
|
+
};
|
|
253
|
+
success: {
|
|
254
|
+
default: string;
|
|
255
|
+
blurred: string;
|
|
256
|
+
dark: string;
|
|
257
|
+
gradient: string;
|
|
258
|
+
};
|
|
259
|
+
success_secondary: {
|
|
260
|
+
default: string;
|
|
261
|
+
blurred: string;
|
|
262
|
+
dark: string;
|
|
263
|
+
gradient: string;
|
|
264
|
+
};
|
|
265
|
+
warning: {
|
|
266
|
+
default: string;
|
|
267
|
+
blurred: string;
|
|
268
|
+
dark: string;
|
|
269
|
+
gradient: string;
|
|
270
|
+
};
|
|
271
|
+
warning_secondary: {
|
|
272
|
+
default: string;
|
|
273
|
+
blurred: string;
|
|
274
|
+
dark: string;
|
|
275
|
+
gradient: string;
|
|
276
|
+
};
|
|
277
|
+
error: {
|
|
278
|
+
default: string;
|
|
279
|
+
blurred: string;
|
|
280
|
+
dark: string;
|
|
281
|
+
gradient: string;
|
|
282
|
+
};
|
|
283
|
+
critical: {
|
|
284
|
+
default: string;
|
|
285
|
+
blurred: string;
|
|
286
|
+
dark: string;
|
|
287
|
+
gradient: string;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
space: {
|
|
291
|
+
px: string;
|
|
292
|
+
0.5: string;
|
|
293
|
+
1: string;
|
|
294
|
+
1.5: string;
|
|
295
|
+
2: string;
|
|
296
|
+
2.5: string;
|
|
297
|
+
3: string;
|
|
298
|
+
3.5: string;
|
|
299
|
+
4: string;
|
|
300
|
+
5: string;
|
|
301
|
+
6: string;
|
|
302
|
+
7: string;
|
|
303
|
+
8: string;
|
|
304
|
+
9: string;
|
|
305
|
+
10: string;
|
|
306
|
+
12: string;
|
|
307
|
+
14: string;
|
|
308
|
+
16: string;
|
|
309
|
+
20: string;
|
|
310
|
+
24: string;
|
|
311
|
+
28: string;
|
|
312
|
+
32: string;
|
|
313
|
+
36: string;
|
|
314
|
+
40: string;
|
|
315
|
+
44: string;
|
|
316
|
+
48: string;
|
|
317
|
+
52: string;
|
|
318
|
+
56: string;
|
|
319
|
+
60: string;
|
|
320
|
+
64: string;
|
|
321
|
+
72: string;
|
|
322
|
+
80: string;
|
|
323
|
+
96: string;
|
|
324
|
+
112: string;
|
|
325
|
+
128: string;
|
|
326
|
+
};
|
|
327
|
+
spacing: {
|
|
328
|
+
quarck: string;
|
|
329
|
+
nano: string;
|
|
330
|
+
xxxs: string;
|
|
331
|
+
xxs: string;
|
|
332
|
+
xs: string;
|
|
333
|
+
sm: string;
|
|
334
|
+
md: string;
|
|
335
|
+
lg: string;
|
|
336
|
+
xl: string;
|
|
337
|
+
xxl: string;
|
|
338
|
+
xxxl: string;
|
|
339
|
+
huge: string;
|
|
340
|
+
giant: string;
|
|
341
|
+
px: string;
|
|
342
|
+
0.5: string;
|
|
343
|
+
1: string;
|
|
344
|
+
1.5: string;
|
|
345
|
+
2: string;
|
|
346
|
+
2.5: string;
|
|
347
|
+
3: string;
|
|
348
|
+
3.5: string;
|
|
349
|
+
4: string;
|
|
350
|
+
5: string;
|
|
351
|
+
6: string;
|
|
352
|
+
7: string;
|
|
353
|
+
8: string;
|
|
354
|
+
9: string;
|
|
355
|
+
10: string;
|
|
356
|
+
12: string;
|
|
357
|
+
14: string;
|
|
358
|
+
16: string;
|
|
359
|
+
20: string;
|
|
360
|
+
24: string;
|
|
361
|
+
28: string;
|
|
362
|
+
32: string;
|
|
363
|
+
36: string;
|
|
364
|
+
40: string;
|
|
365
|
+
44: string;
|
|
366
|
+
48: string;
|
|
367
|
+
52: string;
|
|
368
|
+
56: string;
|
|
369
|
+
60: string;
|
|
370
|
+
64: string;
|
|
371
|
+
72: string;
|
|
372
|
+
80: string;
|
|
373
|
+
96: string;
|
|
374
|
+
112: string;
|
|
375
|
+
128: string;
|
|
376
|
+
};
|
|
377
|
+
spacingest: {
|
|
378
|
+
quarck: string;
|
|
379
|
+
nano: string;
|
|
380
|
+
xs: string;
|
|
381
|
+
sm: string;
|
|
382
|
+
md: string;
|
|
383
|
+
lg: string;
|
|
384
|
+
px: string;
|
|
385
|
+
0.5: string;
|
|
386
|
+
1: string;
|
|
387
|
+
1.5: string;
|
|
388
|
+
2: string;
|
|
389
|
+
2.5: string;
|
|
390
|
+
3: string;
|
|
391
|
+
3.5: string;
|
|
392
|
+
4: string;
|
|
393
|
+
5: string;
|
|
394
|
+
6: string;
|
|
395
|
+
7: string;
|
|
396
|
+
8: string;
|
|
397
|
+
9: string;
|
|
398
|
+
10: string;
|
|
399
|
+
12: string;
|
|
400
|
+
14: string;
|
|
401
|
+
16: string;
|
|
402
|
+
20: string;
|
|
403
|
+
24: string;
|
|
404
|
+
28: string;
|
|
405
|
+
32: string;
|
|
406
|
+
36: string;
|
|
407
|
+
40: string;
|
|
408
|
+
44: string;
|
|
409
|
+
48: string;
|
|
410
|
+
52: string;
|
|
411
|
+
56: string;
|
|
412
|
+
60: string;
|
|
413
|
+
64: string;
|
|
414
|
+
72: string;
|
|
415
|
+
80: string;
|
|
416
|
+
96: string;
|
|
417
|
+
112: string;
|
|
418
|
+
128: string;
|
|
419
|
+
};
|
|
420
|
+
borderRadius: {
|
|
421
|
+
default: string;
|
|
422
|
+
};
|
|
423
|
+
shadow: {
|
|
424
|
+
level1: string;
|
|
425
|
+
level2: string;
|
|
426
|
+
level3: string;
|
|
427
|
+
};
|
|
428
|
+
buttonSize: {
|
|
429
|
+
xs: string;
|
|
430
|
+
sm: string;
|
|
431
|
+
md: string;
|
|
432
|
+
lg: string;
|
|
433
|
+
xl: string;
|
|
434
|
+
};
|
|
435
|
+
transition: {
|
|
436
|
+
speed: string;
|
|
437
|
+
};
|
|
438
|
+
zIndex: {
|
|
439
|
+
default: string;
|
|
440
|
+
level1: string;
|
|
441
|
+
level2: string;
|
|
442
|
+
level3: string;
|
|
443
|
+
level4: string;
|
|
444
|
+
level6: string;
|
|
445
|
+
level8: string;
|
|
446
|
+
level12: string;
|
|
447
|
+
level16: string;
|
|
448
|
+
level24: string;
|
|
449
|
+
level48: string;
|
|
450
|
+
};
|
|
451
|
+
};
|
|
452
|
+
colorMode: "light" | "dark";
|
|
5
453
|
switchColorMode: () => void;
|
|
6
|
-
colorByTheme<T, P extends T>(light: P, dark: P):
|
|
454
|
+
colorByTheme<T, P extends T>(light: P, dark: P): P;
|
|
7
455
|
};
|
|
8
|
-
export declare function useTheme(): UseThemeReturn;
|
|
9
|
-
export {};
|
|
10
456
|
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/hooks/useTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/hooks/useTheme.ts"],"names":[],"mappings":"AAGA,wBAAgB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useTheme=useTheme;var _react=require("react"),_ThemeContext=require("../contexts/ThemeContext");function useTheme(){var ctx=(0,_react.useContext)(_ThemeContext.ThemeContext);if(!ctx)throw new Error("useTheme must be used within a ThemeProvider");return ctx}
|