@scaleflex/ui-tw 0.0.1 → 0.0.2
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/core/accordion-header/accordion-header.component.js +1 -1
- package/core/arrow/arrow.component.js +3 -4
- package/core/arrow-tick/arrow-tick.component.js +3 -10
- package/core/button/button.component.d.ts +2 -2
- package/core/button/button.component.js +7 -5
- package/core/button/button.const.d.ts +15 -0
- package/core/button/button.const.js +4 -0
- package/core/button/button.types.d.ts +3 -4
- package/core/button/button.utils.d.ts +2 -3
- package/core/button/button.utils.js +11 -10
- package/core/button/components/end-icon.d.ts +5 -10
- package/core/button/components/end-icon.js +20 -14
- package/core/button/components/start-icon.d.ts +7 -8
- package/core/button/components/start-icon.js +29 -16
- package/core/check-box/check-box.component.d.ts +0 -3
- package/core/check-box/check-box.component.js +77 -62
- package/core/check-box/index.d.ts +0 -2
- package/core/check-box/index.js +2 -1
- package/core/check-box-group/check-box-group.component.d.ts +0 -3
- package/core/check-box-group/check-box-group.component.js +75 -74
- package/core/check-box-group/check-box-group.props.d.ts +0 -19
- package/core/check-box-group/check-box-group.props.js +23 -1
- package/core/check-box-group/index.d.ts +0 -2
- package/core/check-box-group/index.js +2 -1
- package/core/cross-button/cross-button.component.js +16 -14
- package/core/dot/dot.component.js +1 -3
- package/core/input/components/clear-icon.d.ts +6 -0
- package/core/input/components/clear-icon.js +12 -0
- package/core/input/components/copy-icon.d.ts +6 -0
- package/core/input/components/copy-icon.js +13 -0
- package/core/input/components/password-icon.d.ts +7 -0
- package/core/input/components/password-icon.js +24 -0
- package/core/input/components/render-icon.d.ts +7 -0
- package/core/input/components/render-icon.js +26 -0
- package/core/input/index.d.ts +1 -1
- package/core/input/input.component.d.ts +1 -1
- package/core/input/input.component.js +147 -207
- package/core/input/input.const.d.ts +6 -0
- package/core/input/input.const.js +6 -0
- package/core/input/{input.props.d.ts → input.types.d.ts} +22 -6
- package/core/input/input.types.js +16 -0
- package/core/input/input.utils.d.ts +2 -4
- package/core/input/input.utils.js +11 -28
- package/core/pagination/pagination.component.js +2 -2
- package/core/popper/popper.component.js +5 -42
- package/package.json +2 -2
- package/theme/README.md +1 -38
- package/theme/theme.css +5 -5
- package/utils/functions/index.d.ts +0 -3
- package/utils/functions/index.js +0 -3
- package/utils/types/color/index.d.ts +0 -2
- package/utils/types/color/index.js +2 -2
- package/utils/types/index.d.ts +0 -2
- package/utils/types/index.js +2 -2
- package/core/accordion/accordion.styles.d.ts +0 -6
- package/core/accordion/accordion.styles.js +0 -12
- package/core/accordion-details/accordion-details.styles.d.ts +0 -6
- package/core/accordion-details/accordion-details.styles.js +0 -12
- package/core/accordion-header/accordion-header.styles.d.ts +0 -19
- package/core/accordion-header/accordion-header.styles.js +0 -44
- package/core/arrow/arrow.mixin.d.ts +0 -6
- package/core/arrow/arrow.mixin.js +0 -4
- package/core/arrow/arrow.styles.d.ts +0 -9
- package/core/arrow/arrow.styles.js +0 -18
- package/core/arrow-tick/arrow-tick.mixin.d.ts +0 -6
- package/core/arrow-tick/arrow-tick.mixin.js +0 -4
- package/core/arrow-tick/arrow-tick.styles.d.ts +0 -7
- package/core/arrow-tick/arrow-tick.styles.js +0 -18
- package/core/check-box/check-box.mixin.d.ts +0 -4
- package/core/check-box/check-box.mixin.js +0 -8
- package/core/check-box/check-box.styles.d.ts +0 -19
- package/core/check-box/check-box.styles.js +0 -42
- package/core/check-box-group/check-box-group.mixin.d.ts +0 -5
- package/core/check-box-group/check-box-group.mixin.js +0 -10
- package/core/check-box-group/check-box-group.styles.d.ts +0 -19
- package/core/check-box-group/check-box-group.styles.js +0 -33
- package/core/cross-button/cross-button.styles.d.ts +0 -9
- package/core/cross-button/cross-button.styles.js +0 -21
- package/core/dot/dot.styles.d.ts +0 -18
- package/core/dot/dot.styles.js +0 -32
- package/core/dots-navigation/dots-navigation.styles.d.ts +0 -6
- package/core/dots-navigation/dots-navigation.styles.js +0 -15
- package/core/input/input.mixin.d.ts +0 -18
- package/core/input/input.mixin.js +0 -25
- package/core/input/input.props.js +0 -1
- package/core/input/input.styles.d.ts +0 -78
- package/core/input/input.styles.js +0 -148
- package/core/input/types/index.d.ts +0 -1
- package/core/input/types/index.js +0 -1
- package/core/input/types/type.d.ts +0 -4
- package/core/input/types/type.js +0 -4
- package/core/modal/modal.mixin.d.ts +0 -7
- package/core/modal/modal.mixin.js +0 -4
- package/core/modal/modal.styles.d.ts +0 -22
- package/core/modal/modal.styles.js +0 -51
- package/core/modal-actions/modal-actions.styles.d.ts +0 -7
- package/core/modal-actions/modal-actions.styles.js +0 -17
- package/core/modal-content/modal-content.styles.d.ts +0 -6
- package/core/modal-content/modal-content.styles.js +0 -12
- package/core/modal-title/modal-title.styles.d.ts +0 -31
- package/core/modal-title/modal-title.styles.js +0 -64
- package/core/pagination/pagination.styles.d.ts +0 -19
- package/core/pagination/pagination.styles.js +0 -36
- package/core/popper/popper.mixin.d.ts +0 -17
- package/core/popper/popper.mixin.js +0 -5
- package/core/popper/popper.styles.d.ts +0 -25
- package/core/popper/popper.styles.js +0 -48
- package/core/radio/radio.mixin.d.ts +0 -13
- package/core/radio/radio.mixin.js +0 -13
- package/core/radio/radio.styles.d.ts +0 -19
- package/core/radio/radio.styles.js +0 -44
- package/core/radio-group/radio-group.styles.d.ts +0 -14
- package/core/radio-group/radio-group.styles.js +0 -30
- package/core/switcher/switcher.mixin.d.ts +0 -21
- package/core/switcher/switcher.mixin.js +0 -17
- package/core/switcher/switcher.styles.d.ts +0 -27
- package/core/switcher/switcher.styles.js +0 -54
- package/core/switcher-group/switcher-group.styles.d.ts +0 -10
- package/core/switcher-group/switcher-group.styles.js +0 -30
- package/core/tab/tab.mixin.d.ts +0 -11
- package/core/tab/tab.mixin.js +0 -15
- package/core/tab/tab.styles.d.ts +0 -26
- package/core/tab/tab.styles.js +0 -61
- package/core/tab-panel/tab-panel.styles.d.ts +0 -6
- package/core/tab-panel/tab-panel.styles.js +0 -12
- package/core/upload-input/upload-input.styles.d.ts +0 -11
- package/core/upload-input/upload-input.styles.js +0 -53
- package/theme/entity/index.d.ts +0 -1
- package/theme/entity/index.js +0 -1
- package/theme/entity/theme.d.ts +0 -34
- package/theme/hooks/index.d.ts +0 -2
- package/theme/hooks/index.js +0 -2
- package/theme/hooks/use-media-query.d.ts +0 -1
- package/theme/hooks/use-media-query.js +0 -27
- package/theme/hooks/use-theme.d.ts +0 -2
- package/theme/hooks/use-theme.js +0 -4
- package/theme/index.d.ts +0 -3
- package/theme/index.js +0 -1
- package/theme/roots/breakpoints/entity/breakpoints-map.d.ts +0 -8
- package/theme/roots/breakpoints/entity/breakpoints.d.ts +0 -73
- package/theme/roots/breakpoints/entity/create-breakpoints.d.ts +0 -3
- package/theme/roots/breakpoints/entity/create-breakpoints.js +0 -65
- package/theme/roots/breakpoints/entity/default-breakpoints.d.ts +0 -26
- package/theme/roots/breakpoints/entity/default-breakpoints.js +0 -22
- package/theme/roots/breakpoints/entity/index.d.ts +0 -3
- package/theme/roots/breakpoints/entity/index.js +0 -2
- package/theme/roots/breakpoints/index.d.ts +0 -3
- package/theme/roots/breakpoints/index.js +0 -1
- package/theme/roots/common-styles.d.ts +0 -2
- package/theme/roots/common-styles.js +0 -6
- package/theme/roots/index.d.ts +0 -2
- package/theme/roots/index.js +0 -2
- package/theme/roots/palette/entity/colors-map.d.ts +0 -4
- package/theme/roots/palette/entity/default-palette.d.ts +0 -282
- package/theme/roots/palette/entity/default-palette.js +0 -22
- package/theme/roots/palette/entity/index.d.ts +0 -2
- package/theme/roots/palette/entity/index.js +0 -2
- package/theme/roots/palette/index.d.ts +0 -2
- package/theme/roots/palette/index.js +0 -1
- package/theme/roots/shadows/entity/default-shadows.d.ts +0 -16
- package/theme/roots/shadows/entity/default-shadows.js +0 -5
- package/theme/roots/shadows/entity/index.d.ts +0 -2
- package/theme/roots/shadows/entity/index.js +0 -2
- package/theme/roots/shadows/entity/shadows-map.d.ts +0 -4
- package/theme/roots/shadows/index.d.ts +0 -2
- package/theme/roots/shadows/index.js +0 -1
- package/theme/roots/shape/index.d.ts +0 -1
- package/theme/roots/shape/index.js +0 -1
- package/theme/roots/shape/shape.props.d.ts +0 -5
- package/theme/roots/shape/shape.props.js +0 -1
- package/theme/roots/typography/entity/default-typography.d.ts +0 -398
- package/theme/roots/typography/entity/default-typography.js +0 -237
- package/theme/roots/typography/entity/index.d.ts +0 -1
- package/theme/roots/typography/entity/index.js +0 -1
- package/theme/roots/typography/index.d.ts +0 -3
- package/theme/roots/typography/index.js +0 -2
- package/theme/roots/typography/typography.component.d.ts +0 -2
- package/theme/roots/typography/typography.component.js +0 -7
- package/theme/roots/typography/typography.props.d.ts +0 -15
- package/theme/roots/typography/typography.props.js +0 -1
- package/theme/theme-provider/index.d.ts +0 -2
- package/theme/theme-provider/index.js +0 -1
- package/theme/theme-provider/theme-provider.context.d.ts +0 -4
- package/theme/theme-provider/theme-provider.context.js +0 -48
- package/theme/theme-provider/theme-provider.props.d.ts +0 -6
- package/theme/theme-provider/theme-provider.props.js +0 -1
- package/utils/functions/color-picker/map-number.d.ts +0 -1
- package/utils/functions/color-picker/map-number.js +0 -3
- package/utils/functions/color-picker/restrict-number.d.ts +0 -1
- package/utils/functions/color-picker/restrict-number.js +0 -8
- package/utils/functions/scrollbar.d.ts +0 -2
- package/utils/functions/scrollbar.js +0 -6
- package/utils/types/size/index.d.ts +0 -1
- package/utils/types/size/index.js +0 -1
- package/utils/types/size/input-size.d.ts +0 -4
- package/utils/types/size/input-size.js +0 -4
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import styled, { css } from 'styled-components';
|
|
2
|
-
import { applyDisplayNames, generateClassNames } from '../../utils/functions';
|
|
3
|
-
import IStyled from '../input/input.styles';
|
|
4
|
-
var baseClassName = 'UploadInput';
|
|
5
|
-
var FileInput = /*#__PURE__*/styled.input.attrs({
|
|
6
|
-
className: generateClassNames(baseClassName, 'FileInput')
|
|
7
|
-
}).withConfig({
|
|
8
|
-
componentId: "sc-hwl9p2-0"
|
|
9
|
-
})(["display:none;"]);
|
|
10
|
-
|
|
11
|
-
// const UploadInput = styled.div.attrs({
|
|
12
|
-
// className: generateClassNames(baseClassName, 'root'),
|
|
13
|
-
// })<WithTheme>(
|
|
14
|
-
// ({ theme }) => css`
|
|
15
|
-
// position: relative;
|
|
16
|
-
//
|
|
17
|
-
// ${IStyled.Input} {
|
|
18
|
-
// padding: unset;
|
|
19
|
-
// width: 299px;
|
|
20
|
-
// column-gap: 0;
|
|
21
|
-
// transition: all 100ms ease-out;
|
|
22
|
-
//
|
|
23
|
-
// &:hover {
|
|
24
|
-
// ${BStyled.Button} {
|
|
25
|
-
// background-color: ${theme.palette[PaletteColor.AccentPrimaryHover]};
|
|
26
|
-
// transition: all 100ms ease-out;
|
|
27
|
-
// border: none;
|
|
28
|
-
// }
|
|
29
|
-
// }
|
|
30
|
-
// }
|
|
31
|
-
//
|
|
32
|
-
// ${IStyled.Base} {
|
|
33
|
-
// padding: 12px 8px 12px 12px;
|
|
34
|
-
// }
|
|
35
|
-
//
|
|
36
|
-
// ${BStyled.Button} {
|
|
37
|
-
// border-radius: 0 4px 4px 0;
|
|
38
|
-
// }
|
|
39
|
-
// `,
|
|
40
|
-
// )
|
|
41
|
-
|
|
42
|
-
var UploadInput = /*#__PURE__*/styled.div.attrs({
|
|
43
|
-
className: generateClassNames(baseClassName, 'root')
|
|
44
|
-
}).withConfig({
|
|
45
|
-
componentId: "sc-hwl9p2-1"
|
|
46
|
-
})(function () {
|
|
47
|
-
return css(["position:relative;", "{padding:unset;width:299px;column-gap:0;transition:all 100ms ease-out;}", "{padding:12px 8px 12px 12px;}"], IStyled.Input, IStyled.Base);
|
|
48
|
-
});
|
|
49
|
-
var Styled = applyDisplayNames({
|
|
50
|
-
UploadInput: UploadInput,
|
|
51
|
-
FileInput: FileInput
|
|
52
|
-
});
|
|
53
|
-
export default Styled;
|
package/theme/entity/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { Theme, ThemeOverride, WithTheme } from './theme';
|
package/theme/entity/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/theme/entity/theme.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { DefaultTheme } from 'styled-components'
|
|
2
|
-
|
|
3
|
-
import type { With } from '../../utils/types'
|
|
4
|
-
import type { Breakpoints } from '../roots/breakpoints'
|
|
5
|
-
import type { ColorsMap } from '../roots/palette'
|
|
6
|
-
import { ShadowsMap } from '../roots/shadows'
|
|
7
|
-
import type { ShapeProps } from '../roots/shape'
|
|
8
|
-
import type { TypographyProps } from '../roots/typography'
|
|
9
|
-
|
|
10
|
-
export interface Theme {
|
|
11
|
-
readonly breakpoints: Breakpoints
|
|
12
|
-
|
|
13
|
-
readonly palette: ColorsMap
|
|
14
|
-
|
|
15
|
-
readonly typography: TypographyProps
|
|
16
|
-
|
|
17
|
-
readonly shape: ShapeProps
|
|
18
|
-
|
|
19
|
-
readonly shadows: ShadowsMap
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface ThemeOverride extends Omit<Partial<Theme>> {
|
|
23
|
-
readonly breakpoints?: Theme['breakpoints']
|
|
24
|
-
|
|
25
|
-
readonly palette?: Partial<Record<Partial<Theme['palette']>>>
|
|
26
|
-
|
|
27
|
-
readonly typography?: TypographyProps
|
|
28
|
-
|
|
29
|
-
readonly shape?: ShapeProps
|
|
30
|
-
|
|
31
|
-
readonly shadows?: ShadowsMap
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type WithTheme<T = undefined> = With<T, { theme: DefaultTheme }>
|
package/theme/hooks/index.d.ts
DELETED
package/theme/hooks/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function useMediaQuery(queryInput: string): boolean;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
3
|
-
export function useMediaQuery(queryInput) {
|
|
4
|
-
var query = queryInput.replace(/^@media( ?)/m, '');
|
|
5
|
-
var _useState = useState(function () {
|
|
6
|
-
return window.matchMedia(query).matches;
|
|
7
|
-
}),
|
|
8
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
9
|
-
match = _useState2[0],
|
|
10
|
-
setMatch = _useState2[1];
|
|
11
|
-
useEffect(function () {
|
|
12
|
-
var active = true;
|
|
13
|
-
var queryList = window.matchMedia(query);
|
|
14
|
-
var updateMatch = function updateMatch() {
|
|
15
|
-
if (active) {
|
|
16
|
-
setMatch(queryList.matches);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
updateMatch();
|
|
20
|
-
queryList.addEventListener('change', updateMatch);
|
|
21
|
-
return function () {
|
|
22
|
-
active = false;
|
|
23
|
-
queryList.removeEventListener('change', updateMatch);
|
|
24
|
-
};
|
|
25
|
-
}, [query, matchMedia]);
|
|
26
|
-
return match;
|
|
27
|
-
}
|
package/theme/hooks/use-theme.js
DELETED
package/theme/index.d.ts
DELETED
package/theme/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from './theme-provider';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Values } from '../../../../utils/types'
|
|
2
|
-
import { Breakpoint, BreakpointClass } from '../../../../utils/types/css'
|
|
3
|
-
|
|
4
|
-
export type BreakpointsMap = Record<Values<typeof Breakpoint>, number>
|
|
5
|
-
|
|
6
|
-
export type Breakpoint = Values<typeof Breakpoint>
|
|
7
|
-
|
|
8
|
-
export type BreakpointClass = Values<typeof BreakpointClass>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { Breakpoint, BreakpointClass } from './breakpoints-map'
|
|
2
|
-
|
|
3
|
-
export interface Breakpoints {
|
|
4
|
-
keys: Breakpoint[]
|
|
5
|
-
/**
|
|
6
|
-
* Each breakpoint (a key) matches with a fixed screen width (a value).
|
|
7
|
-
* @default {
|
|
8
|
-
* // extra-small
|
|
9
|
-
* xs: 0,
|
|
10
|
-
* // small
|
|
11
|
-
* sm: 600,
|
|
12
|
-
* // medium
|
|
13
|
-
* md: 900,
|
|
14
|
-
* // large
|
|
15
|
-
* lg: 1200,
|
|
16
|
-
* // extra-large
|
|
17
|
-
* xl: 1536,
|
|
18
|
-
* }
|
|
19
|
-
*/
|
|
20
|
-
values: { [key in Breakpoint]: number }
|
|
21
|
-
/**
|
|
22
|
-
* // extra-small
|
|
23
|
-
* xs: '.sfx-breakpoint-xs',
|
|
24
|
-
* // small
|
|
25
|
-
* sm:'.sfx-breakpoint-sm',
|
|
26
|
-
* // medium
|
|
27
|
-
* md:'.sfx-breakpoint-md',
|
|
28
|
-
* // large
|
|
29
|
-
* lg:'.sfx-breakpoint-lg',
|
|
30
|
-
* // extra-large
|
|
31
|
-
* xl: '.sfx-breakpoint-xl',
|
|
32
|
-
* // extra-extra-large
|
|
33
|
-
* xxl: '.sfx-breakpoint-xxl',
|
|
34
|
-
* // extra-extra-extra-large
|
|
35
|
-
* xxxl: '.sfx-breakpoint-xxxl',
|
|
36
|
-
* }
|
|
37
|
-
*/
|
|
38
|
-
classes: { [key in Breakpoint]: BreakpointClass }
|
|
39
|
-
/**
|
|
40
|
-
* @param width - A breakpoint width..
|
|
41
|
-
* @returns A breakpoint class ready to be used with styled components, it will be applied when it matches the nearest breakpoint intialized in the theme.
|
|
42
|
-
*/
|
|
43
|
-
getBreakpointClass: (width: number, hideSelector?: boolean) => BreakpointClass
|
|
44
|
-
/**
|
|
45
|
-
* @param width - A breakpoint width.
|
|
46
|
-
* @returns A media query string ready to be used with styled components, which matches screen width greater than the screen size given by the breakpoint key.
|
|
47
|
-
*/
|
|
48
|
-
up: (key: Breakpoint) => string
|
|
49
|
-
/**
|
|
50
|
-
* @param key - A breakpoint key (`xs`, `sm`, etc).
|
|
51
|
-
* @returns A media query string ready to be used with styled components, which matches screen width less than the screen size given by the breakpoint key.
|
|
52
|
-
*/
|
|
53
|
-
down: (key: Breakpoint) => string
|
|
54
|
-
/**
|
|
55
|
-
* @param start - A breakpoint key (`xs`, `sm`, etc).
|
|
56
|
-
* @param end - A breakpoint key (`xs`, `sm`, etc).
|
|
57
|
-
* @returns A media query string ready to be used with styled components, which matches screen width greater than the screen size given by the breakpoint key in the first argument and less than the screen size given by the breakpoint key in the second argument.
|
|
58
|
-
*/
|
|
59
|
-
between: (start: Breakpoint, end: Breakpoint) => string
|
|
60
|
-
/**
|
|
61
|
-
* @param key - A breakpoint key (`xs`, `sm`, etc).
|
|
62
|
-
* @returns A media query string ready to be used with styled components, which matches screen width starting from the screen size given by the breakpoint key and stopping at the screen size given by the next breakpoint key.
|
|
63
|
-
*/
|
|
64
|
-
only: (key: Breakpoint) => string
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// export interface BreakpointsOptions extends Partial<Breakpoints> {
|
|
68
|
-
// /**
|
|
69
|
-
// * The unit used for the breakpoint's values.
|
|
70
|
-
// * @default 'px'
|
|
71
|
-
// */
|
|
72
|
-
// unit?: string | undefined;
|
|
73
|
-
// }
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { defaultBreakpoints } from './default-breakpoints';
|
|
2
|
-
var createBreakpoints = function createBreakpoints(breakpoints) {
|
|
3
|
-
var _breakpoints$values = breakpoints.values,
|
|
4
|
-
values = _breakpoints$values === void 0 ? defaultBreakpoints.values : _breakpoints$values,
|
|
5
|
-
_breakpoints$classes = breakpoints.classes,
|
|
6
|
-
classes = _breakpoints$classes === void 0 ? defaultBreakpoints.classes : _breakpoints$classes;
|
|
7
|
-
var unit = 'px';
|
|
8
|
-
var keys = Object.keys(values);
|
|
9
|
-
var up = function up(key) {
|
|
10
|
-
var value = typeof values[key] === 'number' ? values[key] : key;
|
|
11
|
-
return "@media (min-width:".concat(value).concat(unit, ")");
|
|
12
|
-
};
|
|
13
|
-
var down = function down(key) {
|
|
14
|
-
var value = values[key];
|
|
15
|
-
return "@media (max-width:".concat(value).concat(unit, ")");
|
|
16
|
-
};
|
|
17
|
-
var between = function between(start, end) {
|
|
18
|
-
var endIndex = keys.indexOf(end);
|
|
19
|
-
return "@media (min-width:".concat(values[start]).concat(unit, ") and (max-width:").concat(values[keys[endIndex]]).concat(unit, ")");
|
|
20
|
-
};
|
|
21
|
-
var only = function only(key) {
|
|
22
|
-
if (keys.indexOf(key) + 1 < keys.length) {
|
|
23
|
-
return between(key, keys[keys.indexOf(key) + 1]);
|
|
24
|
-
}
|
|
25
|
-
return up(key);
|
|
26
|
-
};
|
|
27
|
-
var getBreakpointClass = function getBreakpointClass(width, hideSelector) {
|
|
28
|
-
var removeSelector = function removeSelector(str) {
|
|
29
|
-
return str.slice(1);
|
|
30
|
-
};
|
|
31
|
-
if (width >= values.xs && width < values.sm) {
|
|
32
|
-
return hideSelector ? removeSelector(classes.xs) : classes.xs;
|
|
33
|
-
}
|
|
34
|
-
if (width >= values.sm && width < values.md) {
|
|
35
|
-
return hideSelector ? removeSelector(classes.sm) : classes.sm;
|
|
36
|
-
}
|
|
37
|
-
if (width >= values.md && width < values.lg) {
|
|
38
|
-
return hideSelector ? removeSelector(classes.md) : classes.md;
|
|
39
|
-
}
|
|
40
|
-
if (width >= values.lg && width < values.xl) {
|
|
41
|
-
return hideSelector ? removeSelector(classes.lg) : classes.lg;
|
|
42
|
-
}
|
|
43
|
-
if (width >= values.xl && width < values.xxl) {
|
|
44
|
-
return hideSelector ? removeSelector(classes.xl) : classes.xl;
|
|
45
|
-
}
|
|
46
|
-
if (width >= values.xxl && width < values.xxxl) {
|
|
47
|
-
return hideSelector ? removeSelector(classes.xxl) : classes.xxl;
|
|
48
|
-
}
|
|
49
|
-
if (width >= values.xxxl) {
|
|
50
|
-
return hideSelector ? removeSelector(classes.xxxl) : classes.xxxl;
|
|
51
|
-
}
|
|
52
|
-
return hideSelector ? removeSelector(classes.md) : classes.md;
|
|
53
|
-
};
|
|
54
|
-
return {
|
|
55
|
-
keys: keys,
|
|
56
|
-
values: values,
|
|
57
|
-
classes: classes,
|
|
58
|
-
getBreakpointClass: getBreakpointClass,
|
|
59
|
-
up: up,
|
|
60
|
-
down: down,
|
|
61
|
-
between: between,
|
|
62
|
-
only: only
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
export default createBreakpoints;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const defaultBreakpoints: {
|
|
2
|
-
keys: ("sm" | "md" | "xs" | "lg" | "xl")[];
|
|
3
|
-
values: {
|
|
4
|
-
xs: number;
|
|
5
|
-
sm: number;
|
|
6
|
-
md: number;
|
|
7
|
-
lg: number;
|
|
8
|
-
xl: number;
|
|
9
|
-
xxl: number;
|
|
10
|
-
xxxl: number;
|
|
11
|
-
};
|
|
12
|
-
classes: {
|
|
13
|
-
xs: string;
|
|
14
|
-
sm: string;
|
|
15
|
-
md: string;
|
|
16
|
-
lg: string;
|
|
17
|
-
xl: string;
|
|
18
|
-
xxl: string;
|
|
19
|
-
xxxl: string;
|
|
20
|
-
};
|
|
21
|
-
getBreakpointClass: () => string;
|
|
22
|
-
up: () => string;
|
|
23
|
-
down: () => string;
|
|
24
|
-
between: () => string;
|
|
25
|
-
only: () => string;
|
|
26
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
import { Breakpoint } from '../../../../utils/types/css';
|
|
3
|
-
export var defaultBreakpoints = {
|
|
4
|
-
keys: [Breakpoint.Xs, Breakpoint.Sm, Breakpoint.Md, Breakpoint.Lg, Breakpoint.Xl],
|
|
5
|
-
values: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Breakpoint.Xs, 0), Breakpoint.Sm, 576), Breakpoint.Md, 768), Breakpoint.Lg, 1084), Breakpoint.Xl, 1342), Breakpoint.Xxl, 1600), Breakpoint.Xxxl, 1920),
|
|
6
|
-
classes: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, Breakpoint.Xs, '.sfx-breakpoint-xs'), Breakpoint.Sm, '.sfx-breakpoint-sm'), Breakpoint.Md, '.sfx-breakpoint-md'), Breakpoint.Lg, '.sfx-breakpoint-lg'), Breakpoint.Xl, '.sfx-breakpoint-xl'), Breakpoint.Xxl, '.sfx-breakpoint-xxl'), Breakpoint.Xxxl, '.sfx-breakpoint-xxxl'),
|
|
7
|
-
getBreakpointClass: function getBreakpointClass() {
|
|
8
|
-
return '';
|
|
9
|
-
},
|
|
10
|
-
up: function up() {
|
|
11
|
-
return '';
|
|
12
|
-
},
|
|
13
|
-
down: function down() {
|
|
14
|
-
return '';
|
|
15
|
-
},
|
|
16
|
-
between: function between() {
|
|
17
|
-
return '';
|
|
18
|
-
},
|
|
19
|
-
only: function only() {
|
|
20
|
-
return '';
|
|
21
|
-
}
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { defaultBreakpoints } from './entity';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { createGlobalStyle /* , css */ } from 'styled-components';
|
|
2
|
-
|
|
3
|
-
// Example with theme: ${({ theme }) => css``;
|
|
4
|
-
|
|
5
|
-
var CommonStyles = /*#__PURE__*/createGlobalStyle(["@keyframes spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.Menu-open{overflow:hidden;}.Modal-open{overflow:hidden;}.Drawer-open{overflow:hidden;}"]);
|
|
6
|
-
export default CommonStyles;
|
package/theme/roots/index.d.ts
DELETED
package/theme/roots/index.js
DELETED