oddsgate-ds 1.0.97 → 1.0.98
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/.storybook/preview.ts +17 -0
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/styles/variables.d.ts +1 -0
- package/dist/esm/index.js +5 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/styles/variables.d.ts +1 -0
- package/dist/types.d.ts +3 -0
- package/package.json +2 -1
- package/src/components/atoms/FlexGrid/FlexGrid.stories.tsx +7 -3
- package/src/components/atoms/FlexGrid/FlexGrid.theme.ts +4 -4
- package/src/components/molecules/Accordion/Accordion.theme.ts +2 -2
- package/src/components/molecules/OffCanvas/OffCanvas.theme.ts +2 -2
- package/src/components/organisms/Slider/Slider.theme.ts +2 -2
- package/src/helpers/useMediaMatch.tsx +2 -2
- package/src/styles/utilities.ts +0 -1
- package/src/styles/variables.ts +2 -1
|
@@ -6,6 +6,7 @@ export declare const desktop_width: number;
|
|
|
6
6
|
export declare const tablet_width: number;
|
|
7
7
|
export declare const mobile_width: number;
|
|
8
8
|
export declare const responsiveMedia = "768px";
|
|
9
|
+
export declare const responsiveMediaMax = "767px";
|
|
9
10
|
export declare const mobileMedia = "360px";
|
|
10
11
|
export declare const easeOutExpo = "cubic-bezier(.32,.94,.6,1);";
|
|
11
12
|
export type IBreakpoints = {
|
package/dist/types.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ declare const desktop_width: number;
|
|
|
11
11
|
declare const tablet_width: number;
|
|
12
12
|
declare const mobile_width: number;
|
|
13
13
|
declare const responsiveMedia = "768px";
|
|
14
|
+
declare const responsiveMediaMax = "767px";
|
|
14
15
|
declare const mobileMedia = "360px";
|
|
15
16
|
declare const easeOutExpo = "cubic-bezier(.32,.94,.6,1);";
|
|
16
17
|
type IBreakpoints = {
|
|
@@ -51,6 +52,7 @@ declare const variables_mobile_width: typeof mobile_width;
|
|
|
51
52
|
declare const variables_pxToRem: typeof pxToRem;
|
|
52
53
|
declare const variables_radius: typeof radius;
|
|
53
54
|
declare const variables_responsiveMedia: typeof responsiveMedia;
|
|
55
|
+
declare const variables_responsiveMediaMax: typeof responsiveMediaMax;
|
|
54
56
|
declare const variables_shadows: typeof shadows;
|
|
55
57
|
declare const variables_spaces: typeof spaces;
|
|
56
58
|
declare const variables_spacesNegative: typeof spacesNegative;
|
|
@@ -73,6 +75,7 @@ declare namespace variables {
|
|
|
73
75
|
variables_pxToRem as pxToRem,
|
|
74
76
|
variables_radius as radius,
|
|
75
77
|
variables_responsiveMedia as responsiveMedia,
|
|
78
|
+
variables_responsiveMediaMax as responsiveMediaMax,
|
|
76
79
|
variables_shadows as shadows,
|
|
77
80
|
variables_spaces as spaces,
|
|
78
81
|
variables_spacesNegative as spacesNegative,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oddsgate-ds",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.98",
|
|
4
4
|
"description": "Miew theme component library",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@storybook/addon-interactions": "^8.1.5",
|
|
44
44
|
"@storybook/addon-links": "^8.1.5",
|
|
45
45
|
"@storybook/addon-styling": "^1.3.7",
|
|
46
|
+
"@storybook/addon-viewport": "^8.2.7",
|
|
46
47
|
"@storybook/addon-webpack5-compiler-swc": "^1.0.3",
|
|
47
48
|
"@storybook/blocks": "^8.1.5",
|
|
48
49
|
"@storybook/react": "^8.1.5",
|
|
@@ -16,15 +16,17 @@ export default {
|
|
|
16
16
|
export const Simple: StoryObj<IRow> = {
|
|
17
17
|
render: args => (
|
|
18
18
|
<Row {...args}>
|
|
19
|
-
<Column
|
|
19
|
+
<Column md={8} lg={10}>
|
|
20
20
|
Column sm-6 md-8 lg-10
|
|
21
21
|
</Column>
|
|
22
|
-
<Column
|
|
22
|
+
<Column md={4} lg={2}>
|
|
23
23
|
Column sm-6 md-4 lg-2
|
|
24
24
|
</Column>
|
|
25
25
|
</Row>
|
|
26
26
|
),
|
|
27
|
-
args: {
|
|
27
|
+
args: {
|
|
28
|
+
mobileSpace: true,
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
export const Fluid: StoryObj<IRow> = {
|
|
30
32
|
render: args => (
|
|
@@ -34,6 +36,7 @@ export const Fluid: StoryObj<IRow> = {
|
|
|
34
36
|
</Row>
|
|
35
37
|
),
|
|
36
38
|
args: {
|
|
39
|
+
mobileSpace: true,
|
|
37
40
|
fluid: true
|
|
38
41
|
}
|
|
39
42
|
}
|
|
@@ -50,6 +53,7 @@ export const Order: StoryObj<IRow> = {
|
|
|
50
53
|
</Row>
|
|
51
54
|
),
|
|
52
55
|
args: {
|
|
56
|
+
mobileSpace: true,
|
|
53
57
|
fluid: true
|
|
54
58
|
}
|
|
55
59
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { IColumnSC, IRowSC } from './FlexGrid.interface';
|
|
5
5
|
import config, { CONTAINER_NAMES, DIMENSION_NAMES } from '@/styles/grid';
|
|
6
|
-
import { grid_conf, gutter, responsiveMedia, spaces } from '@/styles/variables';
|
|
6
|
+
import { grid_conf, gutter, responsiveMedia, responsiveMediaMax, spaces } from '@/styles/variables';
|
|
7
7
|
import styled, { css } from 'styled-components';
|
|
8
8
|
|
|
9
9
|
export const StyledContainer = styled.div<IRowSC>`
|
|
@@ -35,9 +35,9 @@ export const StyledRow = styled.div<IRowSC>`
|
|
|
35
35
|
margin-left: ${props => props.$fluid ? "0" : `-${gutter}`};
|
|
36
36
|
margin-right: ${props => props.$fluid ? "0" : `-${gutter}`};
|
|
37
37
|
|
|
38
|
-
@media only screen and (max-width: ${
|
|
38
|
+
@media only screen and (max-width: ${responsiveMediaMax}) {
|
|
39
39
|
${({ $mobileSpace }) => $mobileSpace && `
|
|
40
|
-
gap: 1.6rem;
|
|
40
|
+
gap: 1.6rem 0;
|
|
41
41
|
`}
|
|
42
42
|
}
|
|
43
43
|
`;
|
|
@@ -69,7 +69,7 @@ export const StyledColumn = styled.div<IColumnSC>`
|
|
|
69
69
|
`)
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
@media only screen and (max-width: ${
|
|
72
|
+
@media only screen and (max-width: ${responsiveMediaMax}) {
|
|
73
73
|
&:empty{
|
|
74
74
|
display:none
|
|
75
75
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAccordion, IAccordionItem } from './Accordion.interface';
|
|
2
|
-
import { colors, easeOutExpo, responsiveMedia } from '@/styles/variables';
|
|
2
|
+
import { colors, easeOutExpo, responsiveMedia, responsiveMediaMax } from '@/styles/variables';
|
|
3
3
|
import styled, { css } from 'styled-components';
|
|
4
4
|
|
|
5
5
|
export const StyledAccordionTitle = styled.span<IAccordionItem>`
|
|
@@ -48,7 +48,7 @@ export const StyledAccordionContent = styled.div<IAccordionItem>`
|
|
|
48
48
|
grid-template-rows: 1fr;
|
|
49
49
|
`}
|
|
50
50
|
|
|
51
|
-
@media only screen and (max-width: ${
|
|
51
|
+
@media only screen and (max-width: ${responsiveMediaMax}) {
|
|
52
52
|
padding-right: 6rem;
|
|
53
53
|
}
|
|
54
54
|
`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { colors,
|
|
1
|
+
import { colors, responsiveMediaMax } from '@/styles/variables';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { IOffCanvas } from './OffCanvas.interface';
|
|
5
5
|
|
|
6
6
|
export const StyledOffCanvas = styled.div<IOffCanvas>`
|
|
7
7
|
display: none;
|
|
8
|
-
@media only screen and (max-width: ${
|
|
8
|
+
@media only screen and (max-width: ${responsiveMediaMax}) {
|
|
9
9
|
display: block !important;
|
|
10
10
|
position: fixed;
|
|
11
11
|
top: 0px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { colors, gutter, radius, responsiveMedia, shadows, spaces } from '@/styles/variables';
|
|
1
|
+
import { colors, gutter, radius, responsiveMedia, responsiveMediaMax, shadows, spaces } from '@/styles/variables';
|
|
2
2
|
import styled, { css } from 'styled-components';
|
|
3
3
|
|
|
4
4
|
import { ISlider } from './Slider.interface';
|
|
@@ -113,7 +113,7 @@ export const StyledSlider = styled.div<ISlider>`
|
|
|
113
113
|
width: 100%;
|
|
114
114
|
|
|
115
115
|
${({ $mobileOnly }) => $mobileOnly ? (`
|
|
116
|
-
@media only screen and (max-width: ${
|
|
116
|
+
@media only screen and (max-width: ${responsiveMediaMax}) {
|
|
117
117
|
${SliderStyles}
|
|
118
118
|
}
|
|
119
119
|
@media only screen and (min-width: ${responsiveMedia}) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react'
|
|
2
2
|
|
|
3
3
|
import { debounce } from './events';
|
|
4
|
-
import {
|
|
4
|
+
import { responsiveMediaMax } from '@/styles/variables'
|
|
5
5
|
|
|
6
6
|
// useMediaMatch('(max-width: 600px)')
|
|
7
|
-
export default function useMediaMatch(query: string = `(max-width: ${
|
|
7
|
+
export default function useMediaMatch(query: string = `(max-width: ${responsiveMediaMax})`) {
|
|
8
8
|
const [matches, setMatches] = useState(false)
|
|
9
9
|
|
|
10
10
|
useEffect(() => {
|
package/src/styles/utilities.ts
CHANGED
package/src/styles/variables.ts
CHANGED
|
@@ -10,7 +10,8 @@ export const gutter = pxToRem(8); //needs to be in this file
|
|
|
10
10
|
export const desktop_width:number = 1620; //container size of design on desktop
|
|
11
11
|
export const tablet_width:number = 768; //container size of design on tablet
|
|
12
12
|
export const mobile_width:number = 375; //container size of design on mobile
|
|
13
|
-
export const responsiveMedia = "768px"; //
|
|
13
|
+
export const responsiveMedia = "768px"; //container size of design on mobile
|
|
14
|
+
export const responsiveMediaMax = "767px"; //mobile media value for bootstrap -> use this for max-width media queries
|
|
14
15
|
export const mobileMedia = "360px"; //mobile media value
|
|
15
16
|
|
|
16
17
|
export const easeOutExpo = "cubic-bezier(.32,.94,.6,1);";
|