@pingux/astro 2.163.1-alpha.4 → 2.163.1-alpha.6

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 (37) hide show
  1. package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +50 -19
  2. package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +12 -0
  3. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +6 -0
  4. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.js +7 -1
  5. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.d.ts +16 -11
  6. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.js +25 -21
  7. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +7 -0
  8. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +12 -5
  9. package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +6 -0
  10. package/lib/cjs/styles/themes/astro/customProperties/index.js +6 -0
  11. package/lib/cjs/styles/themes/next-gen/colors/colors.d.ts +1 -0
  12. package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +6 -0
  13. package/lib/cjs/styles/themes/next-gen/customProperties/index.js +7 -0
  14. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +47 -25
  15. package/lib/cjs/styles/themes/next-gen/tokens/colorTokens.d.ts +1 -0
  16. package/lib/cjs/styles/themes/next-gen/tokens/colorTokens.js +2 -1
  17. package/lib/cjs/styles/themes/next-gen/variants/badges.d.ts +31 -25
  18. package/lib/cjs/styles/themes/next-gen/variants/badges.js +14 -13
  19. package/lib/cjs/styles/themes/next-gen/variants/listview.d.ts +1 -1
  20. package/lib/cjs/styles/themes/next-gen/variants/listview.js +1 -1
  21. package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +1 -0
  22. package/lib/cjs/styles/themes/next-gen/variants/text.js +2 -1
  23. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +14 -0
  24. package/lib/cjs/styles/themes/next-gen/variants/variants.js +16 -2
  25. package/lib/components/ListViewItem/ListViewItem.stories.js +52 -21
  26. package/lib/styles/themeOverrides/nextGenDarkMode/customProperties/index.js +7 -1
  27. package/lib/styles/themeOverrides/nextGenDarkMode/variants/badges.js +25 -21
  28. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +12 -5
  29. package/lib/styles/themes/astro/customProperties/index.js +6 -0
  30. package/lib/styles/themes/next-gen/customProperties/index.js +7 -0
  31. package/lib/styles/themes/next-gen/tokens/colorTokens.js +2 -1
  32. package/lib/styles/themes/next-gen/variants/badges.js +14 -13
  33. package/lib/styles/themes/next-gen/variants/listview.js +1 -1
  34. package/lib/styles/themes/next-gen/variants/text.js +2 -1
  35. package/lib/styles/themes/next-gen/variants/variants.js +16 -2
  36. package/lib/tsconfig.lib.tsbuildinfo +1 -1
  37. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  import React, { useRef } from 'react';
2
2
  import { Item } from 'react-stately';
3
3
  import AccountIcon from '@pingux/mdi-react/AccountIcon';
4
- import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
4
+ import ClockOutlineIcon from '@pingux/mdi-react/ClockOutlineIcon';
5
5
  import DocsLayout from '../../../.storybook/storybookDocsLayout';
6
- import { Badge, Box, ListViewItem, ListViewItemChart, ListViewItemEditButton, ListViewItemMenu, ListViewItemSwitchField, Separator, Text } from '../..';
6
+ import { Badge, Box, ListViewItem, ListViewItemChart, ListViewItemMenu, ListViewItemSwitchField, Separator, Text } from '../..';
7
7
  import { useGetTheme } from '../../hooks';
8
8
  import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
9
- import { pingImg } from '../../utils/devUtils/constants/images';
9
+ import { userImagePanelHeader } from '../../utils/devUtils/constants/images';
10
10
  import { chartData } from './controls/chart/chartData';
11
11
  import ListViewItemReadMe from './ListViewItem.mdx';
12
12
  import { listViewItemArgTypes } from './listViewItemAttributes';
@@ -54,7 +54,7 @@ export var Default = function Default() {
54
54
  },
55
55
  iconWrapperProps: {
56
56
  size: 'sm',
57
- color: 'green'
57
+ color: 'blue'
58
58
  }
59
59
  }));
60
60
  };
@@ -73,7 +73,7 @@ export var WithSubtext = function WithSubtext() {
73
73
  },
74
74
  iconWrapperProps: {
75
75
  size: 'sm',
76
- color: 'pink'
76
+ color: 'blue'
77
77
  }
78
78
  }));
79
79
  };
@@ -87,7 +87,7 @@ export var WithImage = function WithImage() {
87
87
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
88
88
  data: {
89
89
  image: {
90
- src: pingImg,
90
+ src: userImagePanelHeader,
91
91
  alt: 'avatar',
92
92
  'aria-label': 'avatar'
93
93
  },
@@ -105,16 +105,14 @@ WithImage.parameters = {
105
105
  export var WithControls = function WithControls() {
106
106
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
107
107
  data: {
108
- icon: FormSelectIcon,
108
+ icon: AccountIcon,
109
109
  text: 'Fons Vernall'
110
110
  },
111
111
  iconWrapperProps: {
112
112
  size: 'sm',
113
- color: 'orange'
113
+ color: 'blue'
114
114
  }
115
- }, ___EmotionJSX(ListViewItemEditButton, {
116
- "aria-label": "edit-icon"
117
- }), ___EmotionJSX(ListViewItemSwitchField, {
115
+ }, ___EmotionJSX(ListViewItemSwitchField, {
118
116
  "aria-label": "active user"
119
117
  }), ___EmotionJSX(ListViewItemMenu, null, ___EmotionJSX(Item, {
120
118
  key: "enable"
@@ -131,15 +129,30 @@ WithControls.parameters = {
131
129
  }
132
130
  };
133
131
  export var WithRightOfDataSlot = function WithRightOfDataSlot() {
132
+ var _useGetTheme2 = useGetTheme(),
133
+ _useGetTheme2$badgeSt = _useGetTheme2.badgeStyles,
134
+ blueBg = _useGetTheme2$badgeSt.blueBg,
135
+ greyBg = _useGetTheme2$badgeSt.greyBg,
136
+ blueText = _useGetTheme2$badgeSt.blueText,
137
+ greyText = _useGetTheme2$badgeSt.greyText;
134
138
  var renderRightOfData = ___EmotionJSX(Box, {
135
139
  isRow: true,
136
140
  gap: "sm",
137
141
  ml: "sm"
138
142
  }, ___EmotionJSX(Badge, {
139
- label: "Label"
143
+ label: "Label",
144
+ textColor: greyText,
145
+ bg: greyBg,
146
+ sx: {
147
+ minWidth: 'unset'
148
+ }
140
149
  }), ___EmotionJSX(Badge, {
141
150
  label: "Label",
142
- bg: "active"
151
+ textColor: blueText,
152
+ bg: blueBg,
153
+ sx: {
154
+ minWidth: 'unset'
155
+ }
143
156
  }));
144
157
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
145
158
  data: {
@@ -149,7 +162,7 @@ export var WithRightOfDataSlot = function WithRightOfDataSlot() {
149
162
  },
150
163
  iconWrapperProps: {
151
164
  size: 'sm',
152
- color: 'teal'
165
+ color: 'blue'
153
166
  },
154
167
  slots: {
155
168
  rightOfData: renderRightOfData
@@ -170,11 +183,14 @@ WithRightOfDataSlot.parameters = {
170
183
  };
171
184
  export var WithLeftOfDataSlot = function WithLeftOfDataSlot() {
172
185
  var renderLeftOfData = ___EmotionJSX(Box, {
173
- mx: "sm",
186
+ pr: "md",
187
+ pl: "lg",
174
188
  minWidth: 35
175
189
  }, ___EmotionJSX(Text, {
176
190
  pr: 3,
177
- variant: "H3"
191
+ variant: "H3",
192
+ fontSize: "md",
193
+ fontWeight: "3"
178
194
  }, "Ping"));
179
195
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
180
196
  data: {
@@ -213,11 +229,11 @@ export var WithCharts = function WithCharts() {
213
229
  data: {
214
230
  text: 'Kangaroo',
215
231
  subtext: 'kangaroo@example.com',
216
- icon: FormSelectIcon
232
+ icon: ClockOutlineIcon
217
233
  },
218
234
  iconWrapperProps: {
219
235
  size: 'sm',
220
- color: 'purple'
236
+ color: 'green'
221
237
  }
222
238
  }, ___EmotionJSX(ListViewItemChart, {
223
239
  containerRef: containerRef,
@@ -245,15 +261,30 @@ WithCharts.parameters = {
245
261
  }
246
262
  };
247
263
  export var WithExtraLongText = function WithExtraLongText() {
264
+ var _useGetTheme3 = useGetTheme(),
265
+ _useGetTheme3$badgeSt = _useGetTheme3.badgeStyles,
266
+ blueBg = _useGetTheme3$badgeSt.blueBg,
267
+ greyBg = _useGetTheme3$badgeSt.greyBg,
268
+ blueText = _useGetTheme3$badgeSt.blueText,
269
+ greyText = _useGetTheme3$badgeSt.greyText;
248
270
  var renderRightOfData = ___EmotionJSX(Box, {
249
271
  isRow: true,
250
272
  gap: "sm",
251
273
  mx: "sm"
252
274
  }, ___EmotionJSX(Badge, {
253
- label: "Label"
275
+ label: "Label",
276
+ textColor: greyText,
277
+ bg: greyBg,
278
+ sx: {
279
+ minWidth: 'unset'
280
+ }
254
281
  }), ___EmotionJSX(Badge, {
255
282
  label: "Label",
256
- bg: "active"
283
+ textColor: blueText,
284
+ bg: blueBg,
285
+ sx: {
286
+ minWidth: 'unset'
287
+ }
257
288
  }));
258
289
  var longText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum';
259
290
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
@@ -264,7 +295,7 @@ export var WithExtraLongText = function WithExtraLongText() {
264
295
  },
265
296
  iconWrapperProps: {
266
297
  size: 'sm',
267
- color: 'orange'
298
+ color: 'blue'
268
299
  },
269
300
  slots: {
270
301
  rightOfData: renderRightOfData
@@ -18,5 +18,11 @@ export var nextGenDarkThemeValues = _objectSpread(_objectSpread({}, nextGenTheme
18
18
  backgroundBaseColor: backgroundBaseColor,
19
19
  iFrameContentDivBackgroundColor: iFrameContentDivBackgroundColor,
20
20
  icons: icons,
21
- defaultIconColor: defaultIconColor
21
+ defaultIconColor: defaultIconColor,
22
+ badgeStyles: {
23
+ blueBg: '#1A73E8',
24
+ greyBg: '#F6F8FA',
25
+ blueText: '#000000',
26
+ greyText: '#000000'
27
+ }
22
28
  });
@@ -57,18 +57,35 @@ var countNeutral = {
57
57
  color: 'white'
58
58
  }
59
59
  };
60
- var itemBadgeWithSlot = {
61
- bg: '#455469 !important',
62
- fontWeight: 2,
60
+ var readOnlyBadge = {
61
+ color: 'gray-100',
62
+ backgroundColor: '#23282E !important',
63
+ borderColor: 'border.attachment',
63
64
  '& span': {
64
65
  color: 'gray-100'
65
- },
66
+ }
67
+ };
68
+ var readOnlyFieldBadge = {
69
+ color: 'gray-100',
70
+ backgroundColor: '#23282E !important',
71
+ borderColor: 'border.attachment',
72
+ '& span': {
73
+ color: 'gray-100'
74
+ }
75
+ };
76
+ var selectedItemBadge = {
77
+ backgroundColor: '#155CBA !important',
78
+ '& span': {
79
+ color: 'gray-100'
80
+ }
81
+ };
82
+ var itemBadgeWithSlot = _objectSpread(_objectSpread({}, selectedItemBadge), {}, {
66
83
  '& svg': {
67
84
  path: {
68
85
  fill: 'gray-100'
69
86
  }
70
87
  }
71
- };
88
+ });
72
89
  var badges = {
73
90
  baseBadge: baseBadge,
74
91
  primary: primary,
@@ -83,24 +100,11 @@ var badges = {
83
100
  criticalStatusBadge: criticalStatusBadge,
84
101
  healthyStatusBadge: healthyStatusBadge,
85
102
  secondaryStatusBadge: secondaryStatusBadge,
86
- readOnlyFieldBadge: {
87
- backgroundColor: '#F6F8FA !important',
88
- '& span': {
89
- color: 'black'
90
- }
91
- },
92
- selectedItemBadge: {
93
- backgroundColor: '#1a73e8 !important',
94
- paddingRight: '0px !important',
95
- pl: '10px',
96
- '& span': {
97
- fontSize: '14px',
98
- color: 'gray-400',
99
- fontWeight: 400
100
- }
101
- },
102
103
  countBadge: countBadge,
103
104
  countNeutral: countNeutral,
105
+ selectedItemBadge: selectedItemBadge,
106
+ readOnlyBadge: readOnlyBadge,
107
+ readOnlyFieldBadge: readOnlyFieldBadge,
104
108
  itemBadgeWithSlot: itemBadgeWithSlot,
105
109
  errorCalloutBadge: {
106
110
  backgroundColor: '#23282e !important',
@@ -18,15 +18,22 @@ var listBox = {
18
18
  borderRadius: '4px'
19
19
  },
20
20
  option: {
21
+ color: 'gray-400',
21
22
  '&.is-focused': {
22
- color: 'text.primary',
23
- bg: 'gray-800'
23
+ color: 'gray-200',
24
+ bg: '#2C323A'
24
25
  },
25
26
  '&.is-selected': {
26
- color: 'text.primary',
27
- bg: 'gray-800',
27
+ color: 'gray-200',
28
+ bg: '#2C323A',
28
29
  '&.is-focused': {
29
- color: 'text.primary'
30
+ color: 'gray-200'
31
+ }
32
+ },
33
+ '&.is-condensed': {
34
+ color: 'gray-400',
35
+ '&.is-focused': {
36
+ color: 'gray-200'
30
37
  }
31
38
  },
32
39
  '&.is-focus-visible': {
@@ -39,5 +39,11 @@ export var astroThemeValues = {
39
39
  defaultIconSize: defaultIconSize,
40
40
  calendarIconSize: calendarIconSize,
41
41
  buttonLoaderSize: buttonLoaderSize,
42
+ badgeStyles: {
43
+ blueBg: '#4462ed',
44
+ greyBg: '#253746',
45
+ blueText: '#FFFFFF',
46
+ greyText: '#FFFFFF'
47
+ },
42
48
  linkSelectFieldWidth: linkSelectFieldWidth
43
49
  };
@@ -21,6 +21,12 @@ var iFrameContentDivBackgroundColor = backgroundBaseColor;
21
21
  var defaultIconColor = 'gray-800';
22
22
  var defaultIconSize = 'md';
23
23
  var buttonLoaderSize = 'sm';
24
+ var badgeStyles = {
25
+ blueBg: '#EAF2FD',
26
+ greyBg: '#455469',
27
+ blueText: '#155CBA',
28
+ greyText: '#FFFFFF'
29
+ };
24
30
  var linkSelectFieldWidth = '12em';
25
31
  var calendarIconSize = 'sm';
26
32
  export var nextGenThemeValues = _objectSpread({
@@ -38,5 +44,6 @@ export var nextGenThemeValues = _objectSpread({
38
44
  defaultIconSize: defaultIconSize,
39
45
  calendarIconSize: calendarIconSize,
40
46
  buttonLoaderSize: buttonLoaderSize,
47
+ badgeStyles: badgeStyles,
41
48
  linkSelectFieldWidth: linkSelectFieldWidth
42
49
  }, customSizes);
@@ -123,7 +123,8 @@ export var nextGenColors = {
123
123
  'light': '#5e6d82',
124
124
  'link': '#1a73e8',
125
125
  'label': '#5e6d82',
126
- 'reverse': '#ffffff'
126
+ 'reverse': '#ffffff',
127
+ 'hover': '#121518'
127
128
  },
128
129
  'active': '#1a73e8',
129
130
  'active_hover': '#1462C8',
@@ -11,8 +11,8 @@ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymb
11
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
12
12
  import buttons from './button';
13
13
  var badgeFont = {
14
- fontSize: '12px',
15
- fontWeight: 2
14
+ fontSize: 'tiny',
15
+ fontWeight: '2'
16
16
  };
17
17
  var badgeIconStyle = {
18
18
  '& span': _objectSpread({}, badgeFont),
@@ -39,11 +39,11 @@ var baseBadge = _objectSpread({
39
39
  alignItems: 'center',
40
40
  justifyContent: 'center',
41
41
  py: '.25em',
42
- px: '.4em',
42
+ px: '.34em',
43
43
  borderRadius: '4px',
44
44
  maxHeight: '18px',
45
45
  minHeight: '18px',
46
- fontSize: '12px',
46
+ fontSize: 'tiny',
47
47
  alignSelf: 'flex-start',
48
48
  display: 'inline-flex !important',
49
49
  width: 'fit-content',
@@ -81,30 +81,31 @@ var selectedItemBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
81
81
  backgroundColor: '#eaf2fd !important',
82
82
  paddingRight: '0px !important',
83
83
  '& span': _objectSpread(_objectSpread({}, badgeFont), {}, {
84
- color: 'text.primary',
85
- fontWeight: 400
84
+ color: 'text.primary'
86
85
  })
87
86
  });
88
87
  var readOnlyBadge = _objectSpread(_objectSpread({}, baseBadge), {}, {
89
- border: 'none',
88
+ border: '1px solid',
89
+ borderColor: 'border.hairline',
90
+ backgroundColor: '#FFFFFF !important',
90
91
  '& span': _objectSpread(_objectSpread({}, badgeFont), {}, {
91
92
  color: 'text.primary',
92
- fontWeight: 2
93
+ lineHeight: 'xs'
93
94
  })
94
95
  });
95
96
  var readOnlyFieldBadge = _objectSpread(_objectSpread({}, readOnlyBadge), {}, {
96
97
  '& span': _objectSpread(_objectSpread({}, badgeFont), {}, {
97
- color: 'white'
98
+ color: 'text.primary',
99
+ lineHeight: 'xs'
98
100
  })
99
101
  });
100
- var itemBadgeWithSlot = _objectSpread(_objectSpread({}, readOnlyBadge), {}, {
101
- bg: '#EAF2FD !important',
102
- fontWeight: 2,
102
+ var itemBadgeWithSlot = _objectSpread(_objectSpread({}, selectedItemBadge), {}, {
103
+ border: 'none',
103
104
  '& span': _objectSpread(_objectSpread({}, badgeFont), {}, {
104
105
  color: 'text.primary'
105
106
  }),
106
107
  '& svg': {
107
- fill: 'gray-900'
108
+ fill: 'text.primary'
108
109
  }
109
110
  });
110
111
  export var badgeDeleteButton = _objectSpread(_objectSpread({}, buttons.iconButtons.base), {}, {
@@ -1,4 +1,4 @@
1
- export var focusBoxShadow = '0 0 0 3px inset #1a73e8';
1
+ export var focusBoxShadow = '0 0 0 2px inset #1a73e8';
2
2
  export var borderRadius = '16px';
3
3
  export var listViewItem = {
4
4
  rightOfData: {
@@ -153,7 +153,8 @@ export var text = _objectSpread(_objectSpread({
153
153
  listViewItemSubtext: {
154
154
  fontSize: 'md',
155
155
  lineHeight: 'body',
156
- color: 'gray-700'
156
+ color: 'font.light',
157
+ mt: 0
157
158
  },
158
159
  itemTitle: {
159
160
  fontWeight: 2,
@@ -148,8 +148,11 @@ var listBox = {
148
148
  pl: '.75rem',
149
149
  pr: 'md',
150
150
  justifyContent: 'space-between',
151
+ borderRadius: '4px',
152
+ lineHeight: 'body',
153
+ color: 'gray-700',
151
154
  '&.is-focused': {
152
- color: 'text.primary',
155
+ color: 'font.hover',
153
156
  bg: 'gray-100',
154
157
  borderRadius: '4px'
155
158
  },
@@ -177,13 +180,24 @@ var listBox = {
177
180
  '&.is-condensed': {
178
181
  pl: 'md',
179
182
  bg: 'backgroundBase',
183
+ color: 'gray-700',
180
184
  '&.is-selected': {
181
185
  bg: 'backgroundBase'
182
186
  },
183
187
  '&.is-focused': {
184
- bg: 'backgroundBase'
188
+ bg: 'backgroundBase',
189
+ color: 'font.hover'
185
190
  }
186
191
  }
192
+ },
193
+ sectionTitle: {
194
+ color: 'font.light',
195
+ fontWeight: '1',
196
+ fontSize: 'tiny',
197
+ lineHeight: 'xs',
198
+ textTransform: 'uppercase',
199
+ letterSpacing: '1px',
200
+ ml: 'md'
187
201
  }
188
202
  };
189
203
  var separator = {