sesame-components-testing 2.0.8 → 2.0.11
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/Button/Button.d.ts +1 -1
- package/dist/Icon/createIcon.d.ts +1 -1
- package/dist/theme/ThemeProvider.js +2 -2
- package/dist/theme/index.d.ts +0 -4
- package/dist/theme/index.js +1 -4
- package/dist/theme/sizes/getSizedTheme.d.ts +1 -1
- package/dist/theme/sizes/getSizedTheme.js +2 -2
- package/dist/theme/theme.d.ts +0 -5
- package/dist/theme/theme.js +5 -5
- package/dist/theme/useBreakpointSize.d.ts +1 -1
- package/dist/theme/useBreakpointSize.js +2 -2
- package/package.json +1 -1
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes, FC, ReactNode } from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { Theme } from '../theme/types';
|
|
3
3
|
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost' | 'error' | 'success' | 'keypad';
|
|
4
4
|
export type ButtonSize = keyof Theme['height']['button']['posButton'];
|
|
5
5
|
export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type StyledComponent } from '@emotion/styled';
|
|
2
2
|
import { type ComponentType, type SVGProps } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { Theme } from '../theme/types';
|
|
4
4
|
export type IconCommonVariant = keyof Theme['colors']['fill']['icon']['common'];
|
|
5
5
|
export type IconNotificationVariant = keyof Theme['colors']['fill']['icon']['notification'];
|
|
6
6
|
export type IconVariant = IconCommonVariant | IconNotificationVariant;
|
|
@@ -7,9 +7,9 @@ const react_2 = require("react");
|
|
|
7
7
|
const getSizedTheme_1 = require("./sizes/getSizedTheme");
|
|
8
8
|
const useBreakpointSize_1 = require("./useBreakpointSize");
|
|
9
9
|
const useSizedTheme = (theme, defaultSize) => {
|
|
10
|
-
const size = (0, useBreakpointSize_1.useBreakpointSize)();
|
|
10
|
+
const size = (0, useBreakpointSize_1.useBreakpointSize)(defaultSize);
|
|
11
11
|
return (0, react_2.useMemo)(() => {
|
|
12
|
-
return (0, getSizedTheme_1.getSizedTheme)(theme, size
|
|
12
|
+
return (0, getSizedTheme_1.getSizedTheme)(theme, size);
|
|
13
13
|
}, [size, theme, defaultSize]);
|
|
14
14
|
};
|
|
15
15
|
const ThemeProvider = ({ theme, defaultSize, children }) => {
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import '@emotion/react';
|
|
2
2
|
import type { Theme as ITheme } from './types';
|
|
3
|
-
export * from './theme';
|
|
4
3
|
export * from './ThemeProvider';
|
|
5
|
-
export * from './sizes/getSizedTheme';
|
|
6
|
-
export * from './types';
|
|
7
|
-
export * from './extendTheme';
|
|
8
4
|
declare module '@emotion/react' {
|
|
9
5
|
interface Theme extends ITheme {
|
|
10
6
|
}
|
package/dist/theme/index.js
CHANGED
|
@@ -15,8 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
require("@emotion/react");
|
|
18
|
-
|
|
18
|
+
// export * from './theme';
|
|
19
19
|
__exportStar(require("./ThemeProvider"), exports);
|
|
20
|
-
__exportStar(require("./sizes/getSizedTheme"), exports);
|
|
21
|
-
__exportStar(require("./types"), exports);
|
|
22
|
-
__exportStar(require("./extendTheme"), exports);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Breakpoint, BreakpointSize, Theme } from '../types';
|
|
2
2
|
export type UnsizedTheme = Omit<Theme, keyof Breakpoint>;
|
|
3
|
-
export declare const getSizedTheme: (theme: Theme | UnsizedTheme, size
|
|
3
|
+
export declare const getSizedTheme: (theme: Theme | UnsizedTheme, size: BreakpointSize) => Theme;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getSizedTheme = void 0;
|
|
4
|
-
const getSizedTheme = (theme, size
|
|
5
|
-
const breakpoint = theme.breakpoints[size
|
|
4
|
+
const getSizedTheme = (theme, size) => {
|
|
5
|
+
const breakpoint = theme.breakpoints[size];
|
|
6
6
|
return Object.assign(Object.assign({}, theme), breakpoint);
|
|
7
7
|
};
|
|
8
8
|
exports.getSizedTheme = getSizedTheme;
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -1,7 +1,2 @@
|
|
|
1
|
-
import './reset.css';
|
|
2
|
-
import '@fontsource/inter/400';
|
|
3
|
-
import '@fontsource/inter/500';
|
|
4
|
-
import '@fontsource/inter/600';
|
|
5
|
-
import '@fontsource/inter/700';
|
|
6
1
|
export declare const lightTheme: import("./types").Theme;
|
|
7
2
|
export declare const darkTheme: import("./types").Theme;
|
package/dist/theme/theme.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* import './reset.css';
|
|
3
|
+
import '@fontsource/inter/400';
|
|
4
|
+
import '@fontsource/inter/500';
|
|
5
|
+
import '@fontsource/inter/600';
|
|
6
|
+
import '@fontsource/inter/700'; */
|
|
2
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
8
|
exports.darkTheme = exports.lightTheme = void 0;
|
|
4
|
-
require("./reset.css");
|
|
5
|
-
require("@fontsource/inter/400");
|
|
6
|
-
require("@fontsource/inter/500");
|
|
7
|
-
require("@fontsource/inter/600");
|
|
8
|
-
require("@fontsource/inter/700");
|
|
9
9
|
const darkColors_1 = require("./colors/darkColors");
|
|
10
10
|
const lightColors_1 = require("./colors/lightColors");
|
|
11
11
|
const breakpoints_1 = require("./sizes/breakpoints");
|
|
@@ -9,12 +9,12 @@ const getBreakpointSize = (width) => {
|
|
|
9
9
|
return 'medium';
|
|
10
10
|
return 'small';
|
|
11
11
|
};
|
|
12
|
-
const useBreakpointSize = () => {
|
|
12
|
+
const useBreakpointSize = (defaultSize = 'large') => {
|
|
13
13
|
const [breakpointSize, setBreakpointSize] = (0, react_1.useState)(() => {
|
|
14
14
|
if (typeof window !== 'undefined') {
|
|
15
15
|
return getBreakpointSize(window.innerWidth);
|
|
16
16
|
}
|
|
17
|
-
return
|
|
17
|
+
return defaultSize;
|
|
18
18
|
});
|
|
19
19
|
(0, react_1.useEffect)(() => {
|
|
20
20
|
const handleResize = () => {
|