@pedidopago/ui 1.3.17 → 1.3.20

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.
@@ -91,7 +91,7 @@ function DateInput(_ref) {
91
91
  }
92
92
 
93
93
  (0, _react.useEffect)(function () {
94
- value && setCurrentValue(value);
94
+ setCurrentValue(value);
95
95
  }, [value]);
96
96
  (0, _useDisableBodyScroll.useDisableBodyScroll)(datePickerOpen);
97
97
 
@@ -3,8 +3,8 @@ import { GenericStyledProps } from './../../@types/index';
3
3
  export declare const StyledText: import("@emotion/styled").StyledComponent<{
4
4
  theme?: import("@emotion/react").Theme | undefined;
5
5
  as?: import("react").ElementType<any> | undefined;
6
- } & GenericStyledProps & import("react").ClassAttributes<HTMLParagraphElement> & import("react").HTMLAttributes<HTMLParagraphElement> & {
7
- variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | undefined;
6
+ } & GenericStyledProps & import("react").HTMLAttributes<HTMLLabelElement | HTMLParagraphElement> & {
7
+ variant?: "small" | "caption" | "em" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "p" | "span" | "strong" | undefined;
8
8
  color?: import("../..").GlobalColorsProps | (string & {}) | undefined;
9
9
  fontSize?: number | "display" | "tiny" | "xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "giant" | undefined;
10
10
  fontWeight?: "400" | "700" | "100" | "200" | "300" | "500" | "600" | "800" | "900" | "bold" | "normal" | undefined;
@@ -14,6 +14,7 @@ export declare const StyledText: import("@emotion/styled").StyledComponent<{
14
14
  textTransform?: "none" | "capitalize" | "lowercase" | "uppercase" | undefined;
15
15
  textDecoration?: "none" | "underline" | "line-through" | undefined;
16
16
  letterSpacing?: string | number | undefined;
17
+ htmlFor?: string | undefined;
17
18
  children?: import("react").ReactNode;
18
19
  } & {
19
20
  textColor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;eAGN,MAAM;qHAsBtB,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/styles.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAI1D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;eAGN,MAAM;qHAsBtB,CAAC"}
@@ -1,7 +1,7 @@
1
- import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react';
1
+ import { HTMLAttributes, ReactNode } from 'react';
2
2
  import { GlobalColorsProps, defaultTheme } from './../../shared/theme';
3
- export declare type TypographyProps = DetailedHTMLProps<HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement> & {
4
- variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
3
+ export declare type TypographyProps = HTMLAttributes<HTMLParagraphElement | HTMLLabelElement> & {
4
+ variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span' | 'label' | 'caption' | 'small' | 'strong' | 'em';
5
5
  color?: GlobalColorsProps | (string & {});
6
6
  fontSize?: keyof typeof defaultTheme.fontSizes | number;
7
7
  fontWeight?: keyof typeof defaultTheme.fontWeight;
@@ -11,6 +11,7 @@ export declare type TypographyProps = DetailedHTMLProps<HTMLAttributes<HTMLParag
11
11
  textTransform?: 'uppercase' | 'lowercase' | 'capitalize' | 'none';
12
12
  textDecoration?: 'underline' | 'line-through' | 'none';
13
13
  letterSpacing?: string | number;
14
+ htmlFor?: string;
14
15
  children?: ReactNode;
15
16
  };
16
17
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Typography/types.ts"],"names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C7B,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eA8B1F"}
1
+ {"version":3,"file":"ThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/shared/theme/contexts/ThemeContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAuB,MAAM,OAAO,CAAC;AAQtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,aAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,YAAY,4CAAyC,CAAC;AAEnE,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,EAAE,kBAAkB,eAmC1F"}
@@ -51,6 +51,11 @@ function PPUIThemeProvider(_ref) {
51
51
  colorMode = _useState2[0],
52
52
  setColorMode = _useState2[1];
53
53
 
54
+ var _useState3 = (0, _react.useState)(theme || _.defaultTheme),
55
+ _useState4 = _slicedToArray(_useState3, 2),
56
+ currentTheme = _useState4[0],
57
+ setCurrentTheme = _useState4[1];
58
+
54
59
  (0, _react.useEffect)(function () {
55
60
  var localStorageColorMode = _localStorageController.localStorageController.get('UIColorMode');
56
61
 
@@ -58,6 +63,9 @@ function PPUIThemeProvider(_ref) {
58
63
  setColorMode(localStorageColorMode === 'dark');
59
64
  }
60
65
  }, [setColorMode]);
66
+ (0, _react.useEffect)(function () {
67
+ setCurrentTheme(theme || _.defaultTheme);
68
+ }, [theme]);
61
69
 
62
70
  function switchColorMode() {
63
71
  var newColorMode = !colorMode;
@@ -69,12 +77,12 @@ function PPUIThemeProvider(_ref) {
69
77
 
70
78
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ThemeContext.Provider, {
71
79
  value: {
72
- theme: theme || _.defaultTheme,
80
+ theme: currentTheme,
73
81
  colorMode: colorMode,
74
82
  switchColorMode: switchColorMode
75
83
  },
76
84
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.ThemeProvider, {
77
- theme: _objectSpread(_objectSpread({}, theme || _.defaultTheme), {}, {
85
+ theme: _objectSpread(_objectSpread({}, currentTheme), {}, {
78
86
  colorMode: colorMode ? 'dark' : 'light'
79
87
  }),
80
88
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToastProvider.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedidopago/ui",
3
- "version": "1.3.17",
3
+ "version": "1.3.20",
4
4
  "description": "Quick build beatiful Pedido Pago apps",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",