@shopgate/pwa-ui-material 7.30.3 → 7.31.0-alpha.1

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.
Files changed (36) hide show
  1. package/Accordion/components/AccordionContent/index.js +23 -10
  2. package/Accordion/index.js +62 -12
  3. package/AppBar/components/Field/index.js +37 -39
  4. package/AppBar/components/Icon/index.js +47 -39
  5. package/AppBar/components/Title/index.js +44 -38
  6. package/AppBar/index.js +26 -5
  7. package/BaseDialog/components/Buttons/index.js +29 -18
  8. package/BaseDialog/components/Content/index.js +14 -3
  9. package/BaseDialog/components/Title/index.js +17 -5
  10. package/BaseDialog/index.js +71 -26
  11. package/FloatingActionButton/index.js +40 -12
  12. package/NavDrawer/components/Divider/index.js +24 -6
  13. package/NavDrawer/components/Item/index.js +91 -65
  14. package/NavDrawer/components/Title/index.js +16 -4
  15. package/NavDrawer/index.js +129 -120
  16. package/NavDrawer/spec.js +112 -14
  17. package/SnackBar/index.js +176 -166
  18. package/icons/ShareIcon.d.ts +7 -0
  19. package/icons/ShareIcon.d.ts.map +1 -0
  20. package/icons/ShareIcon.js +0 -2
  21. package/package.json +6 -4
  22. package/tsconfig.build.json +16 -0
  23. package/tsconfig.json +3 -0
  24. package/Accordion/components/AccordionContent/style.js +0 -9
  25. package/Accordion/style.js +0 -47
  26. package/AppBar/components/Field/style.js +0 -14
  27. package/AppBar/components/Icon/style.js +0 -14
  28. package/AppBar/components/Title/style.js +0 -11
  29. package/AppBar/style.js +0 -21
  30. package/BaseDialog/style.js +0 -64
  31. package/FloatingActionButton/style.js +0 -33
  32. package/NavDrawer/components/Divider/style.js +0 -12
  33. package/NavDrawer/components/Item/style.js +0 -49
  34. package/NavDrawer/components/Title/style.js +0 -8
  35. package/NavDrawer/style.js +0 -26
  36. package/SnackBar/style.js +0 -64
@@ -1,49 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
3
- const srOnly = css({
4
- clip: 'rect(1px, 1px, 1px, 1px)',
5
- height: '1px',
6
- margin: 0,
7
- overflow: 'hidden',
8
- padding: 0,
9
- position: 'absolute',
10
- whiteSpace: 'nowrap',
11
- width: '1px',
12
- zIndex: -1000,
13
- ':first-child': {
14
- marginTop: 'calc(16px + var(--safe-area-inset-top))'
15
- }
16
- }).toString();
17
- const button = css({
18
- alignItems: 'flex-start',
19
- color: 'inherit',
20
- display: 'flex',
21
- fontWeight: 500,
22
- outline: 0,
23
- padding: '16px 8px 16px 0',
24
- position: 'relative',
25
- width: '100%',
26
- ':first-child': {
27
- paddingTop: 'calc(16px + var(--safe-area-inset-top))'
28
- }
29
- }).toString();
30
- const label = css({
31
- marginTop: 2,
32
- textAlign: 'left'
33
- }).toString();
34
- const iconWrapper = css({
35
- width: 56,
36
- flexShrink: 0
37
- }).toString();
38
- const icon = css({
39
- boxSizing: 'content-box',
40
- color: themeColors.gray,
41
- padding: '0 32px 0 16px'
42
- }).toString();
43
- export default {
44
- srOnly,
45
- button,
46
- label,
47
- iconWrapper,
48
- icon
49
- };
@@ -1,8 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
3
- export default css({
4
- color: themeColors.shade11,
5
- fontSize: '0.875rem',
6
- fontWeight: 500,
7
- margin: '16px 0 0 16px'
8
- });
@@ -1,26 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeShadows, themeColors } from '@shopgate/pwa-common/helpers/config';
3
- export const contentStyle = css({
4
- fontSize: 14,
5
- height: '100%',
6
- overflowY: 'scroll',
7
- paddingBottom: 'var(--safe-area-inset-bottom)',
8
- WebkitOverflowScrolling: 'touch'
9
- });
10
- export const drawerStyle = css({
11
- background: themeColors.light,
12
- boxShadow: themeShadows.navDrawer,
13
- color: themeColors.dark,
14
- height: '100vh',
15
- left: 0,
16
- maxWidth: '300px',
17
- position: 'fixed',
18
- top: 0,
19
- transition: 'transform 300ms cubic-bezier(0.25, 0.1, 0.25, 1)',
20
- width: '100%',
21
- willChange: 'transform',
22
- zIndex: 50,
23
- '@media(max-width: 480px)': {
24
- maxWidth: '67vw'
25
- }
26
- });
package/SnackBar/style.js DELETED
@@ -1,64 +0,0 @@
1
- import { css } from 'glamor';
2
- import Color from 'color';
3
- import { themeColors, themeShadows } from '@shopgate/pwa-common/helpers/config';
4
- const backgroundColor = themeColors.lightDark;
5
- const buttonColor = themeColors.accent;
6
- const buttonColorContrast = Color(buttonColor).contrast(Color(backgroundColor));
7
- // Button color can be anything. Fall back to white if accent is too dark.
8
- const safeButtonColor = buttonColorContrast > 4 ? buttonColor : themeColors.light;
9
- const container = css({
10
- position: 'fixed',
11
- height: 'var(--snack-bar-height, 80px)',
12
- bottom: 'max(var(--footer-height), var(--safe-area-inset-bottom))',
13
- transition: 'bottom 0.3s ease',
14
- overflow: 'hidden',
15
- zIndex: 6,
16
- width: '100%'
17
- });
18
- const wrapper = css({
19
- top: 'var(--snack-bar-height, 80px)',
20
- display: 'flex',
21
- justifyContent: 'center',
22
- left: 0,
23
- position: 'absolute',
24
- width: '100%',
25
- zIndex: 6
26
- });
27
- const box = css({
28
- alignItems: 'center',
29
- background: backgroundColor,
30
- borderRadius: 3,
31
- boxShadow: themeShadows.toast,
32
- color: themeColors.light,
33
- display: 'flex',
34
- fontSize: '0.875rem',
35
- justifyContent: 'space-between',
36
- letterSpacing: 0.5,
37
- margin: 16,
38
- maxWidth: 344,
39
- minHeight: 48,
40
- padding: '6px 16px',
41
- width: '100%'
42
- });
43
- const label = css({
44
- lineHeight: 1.4,
45
- margin: '6px 0',
46
- overflow: 'hidden'
47
- }).toString();
48
- const button = css({
49
- color: safeButtonColor,
50
- fontWeight: 500,
51
- height: 36,
52
- letterSpacing: 'inherit',
53
- margin: '0 -8px 0 8px',
54
- outline: 0,
55
- padding: '0 8px',
56
- textTransform: 'uppercase'
57
- });
58
- export default {
59
- container,
60
- wrapper,
61
- box,
62
- label,
63
- button
64
- };