grommet 2.26.0 → 2.27.0
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/all/stories/AllComponents.js +19 -126
- package/components/Accordion/stories/CustomHeader.js +3 -1
- package/components/Avatar/Avatar.js +22 -9
- package/components/CheckBox/StyledCheckBox.js +9 -5
- package/components/DataChart/Detail.js +3 -1
- package/components/DataTable/index.d.ts +6 -6
- package/components/DateInput/DateInput.js +1 -1
- package/components/Diagram/Diagram.js +2 -1
- package/components/Drop/stories/Inline.js +1 -1
- package/components/Drop/stories/Overflow.js +1 -1
- package/components/Drop/stories/Plain.js +1 -1
- package/components/Drop/stories/Simple.js +1 -1
- package/components/Drop/stories/Styled.js +1 -1
- package/components/List/List.js +16 -13
- package/components/List/stories/Order.js +1 -0
- package/components/List/stories/Pinned.js +1 -0
- package/components/List/stories/Selection.js +1 -0
- package/components/List/stories/onClickItem.js +1 -0
- package/components/Notification/Notification.js +2 -2
- package/components/Notification/index.d.ts +1 -1
- package/components/Notification/propTypes.js +1 -1
- package/components/RadioButton/README.md +1 -279
- package/components/RadioButton/RadioButton.js +1 -0
- package/components/Select/Select.js +8 -4
- package/components/Select/SelectContainer.js +4 -4
- package/components/Select/utils.js +28 -2
- package/components/SelectMultiple/SelectMultiple.js +4 -4
- package/components/SelectMultiple/SelectMultipleContainer.js +10 -8
- package/components/SelectMultiple/SelectMultipleValue.js +18 -21
- package/components/SelectMultiple/SelectionSummary.js +1 -1
- package/components/SelectMultiple/stories/ObjectOptions.js +25 -1
- package/components/Sidebar/stories/Labels.js +4 -1
- package/components/TextArea/stories/NonResizable.js +1 -0
- package/components/TextArea/stories/Simple.js +1 -0
- package/es6/all/stories/AllComponents.js +21 -121
- package/es6/components/Accordion/stories/CustomHeader.js +3 -1
- package/es6/components/Avatar/Avatar.js +21 -9
- package/es6/components/CheckBox/StyledCheckBox.js +9 -5
- package/es6/components/DataChart/Detail.js +3 -1
- package/es6/components/DataTable/index.d.ts +6 -6
- package/es6/components/DateInput/DateInput.js +1 -1
- package/es6/components/Diagram/Diagram.js +2 -1
- package/es6/components/Drop/stories/Inline.js +1 -1
- package/es6/components/Drop/stories/Overflow.js +1 -1
- package/es6/components/Drop/stories/Plain.js +1 -1
- package/es6/components/Drop/stories/Simple.js +1 -1
- package/es6/components/Drop/stories/Styled.js +1 -1
- package/es6/components/List/List.js +16 -13
- package/es6/components/List/stories/Order.js +1 -0
- package/es6/components/List/stories/Pinned.js +1 -0
- package/es6/components/List/stories/Selection.js +1 -0
- package/es6/components/List/stories/onClickItem.js +1 -0
- package/es6/components/Notification/Notification.js +2 -2
- package/es6/components/Notification/index.d.ts +1 -1
- package/es6/components/Notification/propTypes.js +1 -1
- package/es6/components/RadioButton/README.md +1 -279
- package/es6/components/RadioButton/RadioButton.js +1 -0
- package/es6/components/Select/Select.js +8 -4
- package/es6/components/Select/SelectContainer.js +4 -4
- package/es6/components/Select/utils.js +21 -1
- package/es6/components/SelectMultiple/SelectMultiple.js +5 -5
- package/es6/components/SelectMultiple/SelectMultipleContainer.js +11 -9
- package/es6/components/SelectMultiple/SelectMultipleValue.js +19 -22
- package/es6/components/SelectMultiple/SelectionSummary.js +2 -2
- package/es6/components/SelectMultiple/stories/ObjectOptions.js +25 -1
- package/es6/components/Sidebar/stories/Labels.js +4 -1
- package/es6/components/TextArea/stories/NonResizable.js +1 -0
- package/es6/components/TextArea/stories/Simple.js +1 -0
- package/es6/themes/base.d.ts +8 -3
- package/es6/themes/base.js +6 -1
- package/es6/themes/hacktoberfest2022.js +129 -0
- package/es6/themes/index.js +2 -1
- package/es6/utils/background.js +4 -4
- package/es6/utils/styles.js +3 -1
- package/grommet.min.js +1 -1
- package/grommet.min.js.map +1 -1
- package/package.json +45 -43
- package/themes/base.d.ts +8 -3
- package/themes/base.js +6 -1
- package/themes/hacktoberfest2022.js +137 -0
- package/themes/index.js +6 -2
- package/tools/grommet-babel-preset-es2015.js +1 -12
- package/tools/pack.js +1 -94
- package/tools/release-stable.js +1 -27
- package/utils/background.js +4 -4
- package/utils/styles.js +3 -1
|
@@ -56,7 +56,9 @@ var SidebarButton = function SidebarButton(_ref) {
|
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
var SidebarFooter = function SidebarFooter() {
|
|
59
|
-
return /*#__PURE__*/React.createElement(Nav,
|
|
59
|
+
return /*#__PURE__*/React.createElement(Nav, {
|
|
60
|
+
"aria-label": "sidebar footer"
|
|
61
|
+
}, /*#__PURE__*/React.createElement(SidebarButton, {
|
|
60
62
|
icon: /*#__PURE__*/React.createElement(Chat, null)
|
|
61
63
|
}), /*#__PURE__*/React.createElement(SidebarButton, {
|
|
62
64
|
icon: /*#__PURE__*/React.createElement(Help, null)
|
|
@@ -65,6 +67,7 @@ var SidebarFooter = function SidebarFooter() {
|
|
|
65
67
|
|
|
66
68
|
var MainNavigation = function MainNavigation() {
|
|
67
69
|
return /*#__PURE__*/React.createElement(Nav, {
|
|
70
|
+
"aria-label": "main navigation",
|
|
68
71
|
gap: "large",
|
|
69
72
|
responsive: false
|
|
70
73
|
}, /*#__PURE__*/React.createElement(SidebarButton, {
|
package/es6/themes/base.d.ts
CHANGED
|
@@ -395,6 +395,7 @@ export interface ThemeType {
|
|
|
395
395
|
maxWidth?: string;
|
|
396
396
|
size?: string;
|
|
397
397
|
weight?: number | string;
|
|
398
|
+
variant?: string;
|
|
398
399
|
};
|
|
399
400
|
graph?: {
|
|
400
401
|
colors?: GraphColorsType;
|
|
@@ -594,13 +595,14 @@ export interface ThemeType {
|
|
|
594
595
|
background?: {
|
|
595
596
|
color?: ColorType;
|
|
596
597
|
};
|
|
598
|
+
extend?: ExtendType;
|
|
597
599
|
};
|
|
598
600
|
icon?: {
|
|
599
601
|
size?: string;
|
|
600
602
|
extend?: ExtendType;
|
|
601
603
|
};
|
|
602
604
|
icons?: {
|
|
603
|
-
checked?:
|
|
605
|
+
checked?: React.ReactNode | Icon;
|
|
604
606
|
indeterminate?: any;
|
|
605
607
|
};
|
|
606
608
|
pad?: PadType;
|
|
@@ -662,6 +664,9 @@ export interface ThemeType {
|
|
|
662
664
|
baseline?: number;
|
|
663
665
|
};
|
|
664
666
|
dateInput?: {
|
|
667
|
+
container?: {
|
|
668
|
+
round?: RoundType;
|
|
669
|
+
};
|
|
665
670
|
icon?: {
|
|
666
671
|
size?: string;
|
|
667
672
|
};
|
|
@@ -1292,7 +1297,7 @@ export interface ThemeType {
|
|
|
1292
1297
|
size?: string;
|
|
1293
1298
|
};
|
|
1294
1299
|
icons?: {
|
|
1295
|
-
circle?:
|
|
1300
|
+
circle?: React.ReactNode | Icon;
|
|
1296
1301
|
};
|
|
1297
1302
|
gap?: string;
|
|
1298
1303
|
size?: string;
|
|
@@ -1650,7 +1655,7 @@ export interface ThemeType {
|
|
|
1650
1655
|
};
|
|
1651
1656
|
scrubber?: {
|
|
1652
1657
|
color?: ColorType;
|
|
1653
|
-
interval
|
|
1658
|
+
interval?: number;
|
|
1654
1659
|
track?: {
|
|
1655
1660
|
color?: ColorType;
|
|
1656
1661
|
};
|
package/es6/themes/base.js
CHANGED
|
@@ -710,6 +710,7 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
710
710
|
light: 'black'
|
|
711
711
|
}
|
|
712
712
|
} // background: undefined,
|
|
713
|
+
// extend: undefined,
|
|
713
714
|
|
|
714
715
|
},
|
|
715
716
|
icon: {// size: undefined,
|
|
@@ -812,9 +813,13 @@ export var generate = function generate(baseSpacing, scale) {
|
|
|
812
813
|
minSpeed: 200,
|
|
813
814
|
baseline: 500
|
|
814
815
|
},
|
|
815
|
-
dateInput: {
|
|
816
|
+
dateInput: {
|
|
817
|
+
container: {
|
|
818
|
+
round: 'xxsmall'
|
|
819
|
+
} // icon: {
|
|
816
820
|
// size: undefined,
|
|
817
821
|
// },
|
|
822
|
+
|
|
818
823
|
},
|
|
819
824
|
dataTable: {
|
|
820
825
|
// body: {
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
import { deepFreeze } from '../utils/object';
|
|
3
|
+
export var hacktoberfest2022 = deepFreeze({
|
|
4
|
+
defaultMode: 'dark',
|
|
5
|
+
global: {
|
|
6
|
+
colors: {
|
|
7
|
+
background: '#160F1D',
|
|
8
|
+
'background-back': '#000000',
|
|
9
|
+
'background-front': '#160F1D',
|
|
10
|
+
'text-strong': '#FFFFFF',
|
|
11
|
+
text: '#E4E1E6',
|
|
12
|
+
'text-weak': '#76717A',
|
|
13
|
+
grey: '#AFACB2',
|
|
14
|
+
lime: '#C6FC60',
|
|
15
|
+
pink: '#D856A7',
|
|
16
|
+
purple: '#7C7EF4',
|
|
17
|
+
teal: '#73DAFB',
|
|
18
|
+
yellow: '#EDD063',
|
|
19
|
+
darkPurple: '#291E40',
|
|
20
|
+
active: 'purple',
|
|
21
|
+
focus: '#233670',
|
|
22
|
+
brand: 'lime',
|
|
23
|
+
control: 'teal',
|
|
24
|
+
'graph-0': 'yellow',
|
|
25
|
+
'graph-1': 'purple',
|
|
26
|
+
'graph-2': 'teal',
|
|
27
|
+
'graph-3': 'pink',
|
|
28
|
+
'graph-4': 'lime',
|
|
29
|
+
// clear unused colors
|
|
30
|
+
icon: undefined,
|
|
31
|
+
'accent-1': undefined,
|
|
32
|
+
'accent-2': undefined,
|
|
33
|
+
'accent-3': undefined,
|
|
34
|
+
'accent-4': undefined,
|
|
35
|
+
'neutral-1': undefined,
|
|
36
|
+
'neutral-2': undefined,
|
|
37
|
+
'neutral-3': undefined,
|
|
38
|
+
'neutral-4': undefined,
|
|
39
|
+
'neutral-5': undefined,
|
|
40
|
+
'light-1': undefined,
|
|
41
|
+
'light-2': undefined,
|
|
42
|
+
'light-3': undefined,
|
|
43
|
+
'light-4': undefined,
|
|
44
|
+
'light-5': undefined,
|
|
45
|
+
'light-6': undefined,
|
|
46
|
+
'dark-1': undefined,
|
|
47
|
+
'dark-2': undefined,
|
|
48
|
+
'dark-3': undefined,
|
|
49
|
+
'dark-4': undefined,
|
|
50
|
+
'dark-5': undefined,
|
|
51
|
+
'dark-6': undefined
|
|
52
|
+
},
|
|
53
|
+
backgrounds: {
|
|
54
|
+
'gradient-purple-teal': {
|
|
55
|
+
image: "linear-gradient(\n #7C7EF4 0%,\n #73DAFB 100%\n );"
|
|
56
|
+
},
|
|
57
|
+
'gradient-teal-purple': {
|
|
58
|
+
image: "linear-gradient(\n #73DAFB 0%,\n #7C7EF4 100%\n );"
|
|
59
|
+
},
|
|
60
|
+
'gradient-yellow-teal-purple': {
|
|
61
|
+
image: "linear-gradient(\n #EDD063 0%,\n #73DAFB 50%,\n #7C7EF4 100%\n );",
|
|
62
|
+
rotate: 90
|
|
63
|
+
},
|
|
64
|
+
'gradient-yellow-teal': {
|
|
65
|
+
image: "linear-gradient(\n #EDD063 0%,\n #73DAFB 100%\n );",
|
|
66
|
+
rotate: 90
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
focus: {
|
|
70
|
+
shadow: {
|
|
71
|
+
color: 'focus',
|
|
72
|
+
size: '3px'
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
font: {
|
|
76
|
+
family: '"JetBrains Mono", monospace',
|
|
77
|
+
face: "/* latin */\n@font-face {\n font-family: 'JetBrains Mono';\n font-style: normal;\n font-weight: 400;\n src: url(https://fonts.gstatic.com/s/jetbrainsmono/v13/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOTk6OThhvA.woff) format('woff');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
grommet: {
|
|
81
|
+
extend: css(["text-transform:uppercase;"])
|
|
82
|
+
},
|
|
83
|
+
anchor: {
|
|
84
|
+
color: 'text',
|
|
85
|
+
hover: {
|
|
86
|
+
color: 'text-strong'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
button: {
|
|
90
|
+
border: {
|
|
91
|
+
width: '0px',
|
|
92
|
+
radius: '0px'
|
|
93
|
+
},
|
|
94
|
+
padding: {
|
|
95
|
+
horizontal: '20px',
|
|
96
|
+
vertical: '10px'
|
|
97
|
+
},
|
|
98
|
+
color: 'text-strong',
|
|
99
|
+
size: {
|
|
100
|
+
small: {
|
|
101
|
+
pad: {
|
|
102
|
+
horizontal: '16px',
|
|
103
|
+
vertical: '8px'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
medium: {
|
|
107
|
+
pad: {
|
|
108
|
+
horizontal: '20px',
|
|
109
|
+
vertical: '10px'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"default": {
|
|
114
|
+
color: 'text-strong'
|
|
115
|
+
},
|
|
116
|
+
primary: {
|
|
117
|
+
border: false,
|
|
118
|
+
background: 'gradient-yellow-teal-purple',
|
|
119
|
+
color: 'text'
|
|
120
|
+
},
|
|
121
|
+
hover: {
|
|
122
|
+
border: false
|
|
123
|
+
},
|
|
124
|
+
extend: css(["clip-path:polygon( 12px 0px,100% 0px,100% 72%,calc(100% - 12px) 100%,0px 100%,0px 12px );text-transform:uppercase;&:focus{clip-path:none;}"])
|
|
125
|
+
},
|
|
126
|
+
heading: {
|
|
127
|
+
extend: css(["text-shadow:rgba(255,215,77,0.6) -1px -1px 6px,rgba(124,127,255,0.6) 1px 1px 6px;"])
|
|
128
|
+
}
|
|
129
|
+
});
|
package/es6/themes/index.js
CHANGED
package/es6/utils/background.js
CHANGED
|
@@ -44,13 +44,13 @@ var normalizeBackgroundImage = function normalizeBackgroundImage(background, the
|
|
|
44
44
|
var result;
|
|
45
45
|
|
|
46
46
|
if (background.image) {
|
|
47
|
-
var _theme$global$backgro3, _theme$global$backgro4;
|
|
47
|
+
var _theme$global$backgro3, _theme$global$backgro4, _theme$global$backgro5;
|
|
48
48
|
|
|
49
|
-
result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro3[background.image].dark : (_theme$global$
|
|
49
|
+
result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null ? void 0 : (_theme$global$backgro4 = _theme$global$backgro3[background.image]) == null ? void 0 : _theme$global$backgro4.dark : (_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background.image], theme) || background.image;
|
|
50
50
|
} else {
|
|
51
|
-
var _theme$global$
|
|
51
|
+
var _theme$global$backgro6;
|
|
52
52
|
|
|
53
|
-
var normalized = normalizeBackground((_theme$global$
|
|
53
|
+
var normalized = normalizeBackground((_theme$global$backgro6 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro6[background], theme);
|
|
54
54
|
result = typeof normalized === 'object' ? normalizeBackgroundImage(normalized, theme) : normalized;
|
|
55
55
|
}
|
|
56
56
|
|
package/es6/utils/styles.js
CHANGED
|
@@ -3,7 +3,7 @@ import { backgroundStyle } from './background';
|
|
|
3
3
|
import { normalizeColor } from './colors';
|
|
4
4
|
import { getBreakpointStyle } from './responsive';
|
|
5
5
|
import { breakpointStyle, parseMetricToNum } from './mixins';
|
|
6
|
-
export var baseStyle = css(["font-family:", ";font-size:", ";line-height:", ";font-weight:", ";", " box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;"], function (props) {
|
|
6
|
+
export var baseStyle = css(["font-family:", ";font-size:", ";line-height:", ";font-weight:", ";", " ", " box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;"], function (props) {
|
|
7
7
|
return props.theme.global.font.family;
|
|
8
8
|
}, function (props) {
|
|
9
9
|
return props.theme.global.font.size;
|
|
@@ -11,6 +11,8 @@ export var baseStyle = css(["font-family:", ";font-size:", ";line-height:", ";fo
|
|
|
11
11
|
return props.theme.global.font.height;
|
|
12
12
|
}, function (props) {
|
|
13
13
|
return props.theme.global.font.weight;
|
|
14
|
+
}, function (props) {
|
|
15
|
+
return props.theme.global.font.variant && "\n font-variant:" + props.theme.global.font.variant + ";\n ";
|
|
14
16
|
}, function (props) {
|
|
15
17
|
return !props.plain && backgroundStyle(props.theme.baseBackground, props.theme);
|
|
16
18
|
});
|