@pingux/astro 2.104.0-alpha.3 → 2.104.0-alpha.5

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 (42) hide show
  1. package/lib/cjs/components/AIComponents/AIPanel/AIPanel.d.ts +4 -0
  2. package/lib/cjs/components/AIComponents/AIPanel/AIPanel.js +34 -0
  3. package/lib/cjs/components/AIComponents/AIPanel/AIPanel.stories.d.ts +7 -0
  4. package/lib/cjs/components/AIComponents/AIPanel/AIPanel.stories.js +107 -0
  5. package/lib/cjs/components/AIComponents/AIPanel/AIPanel.test.d.ts +1 -0
  6. package/lib/cjs/components/AIComponents/AIPanel/AIPanel.test.js +105 -0
  7. package/lib/cjs/components/AIComponents/AIPanel/AIPanelHeader.d.ts +4 -0
  8. package/lib/cjs/components/AIComponents/AIPanel/AIPanelHeader.js +56 -0
  9. package/lib/cjs/components/AIComponents/AIPanel/index.d.ts +2 -0
  10. package/lib/cjs/components/AIComponents/AIPanel/index.js +21 -0
  11. package/lib/cjs/components/ListViewItem/ListViewItem.stories.js +51 -3
  12. package/lib/cjs/components/ListViewItem/controls/ListViewItemEditButton.js +3 -2
  13. package/lib/cjs/index.d.ts +2 -0
  14. package/lib/cjs/index.js +16 -0
  15. package/lib/cjs/styles/themes/next-gen/convertedComponentList.js +1 -1
  16. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +95 -0
  17. package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +48 -0
  18. package/lib/cjs/styles/themes/next-gen/variants/button.js +29 -1
  19. package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +12 -0
  20. package/lib/cjs/styles/themes/next-gen/variants/text.js +15 -2
  21. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +35 -0
  22. package/lib/cjs/styles/themes/next-gen/variants/variants.js +36 -1
  23. package/lib/cjs/types/aiPanel.d.ts +25 -0
  24. package/lib/cjs/types/aiPanel.js +6 -0
  25. package/lib/cjs/types/overlayPanel.d.ts +4 -1
  26. package/lib/cjs/utils/designUtils/figmaLinks.d.ts +10 -0
  27. package/lib/cjs/utils/designUtils/figmaLinks.js +10 -0
  28. package/lib/components/AIComponents/AIPanel/AIPanel.js +25 -0
  29. package/lib/components/AIComponents/AIPanel/AIPanel.stories.js +92 -0
  30. package/lib/components/AIComponents/AIPanel/AIPanel.test.js +96 -0
  31. package/lib/components/AIComponents/AIPanel/AIPanelHeader.js +47 -0
  32. package/lib/components/AIComponents/AIPanel/index.js +2 -0
  33. package/lib/components/ListViewItem/ListViewItem.stories.js +50 -2
  34. package/lib/components/ListViewItem/controls/ListViewItemEditButton.js +3 -2
  35. package/lib/index.js +2 -0
  36. package/lib/styles/themes/next-gen/convertedComponentList.js +1 -1
  37. package/lib/styles/themes/next-gen/variants/button.js +29 -1
  38. package/lib/styles/themes/next-gen/variants/text.js +15 -2
  39. package/lib/styles/themes/next-gen/variants/variants.js +36 -1
  40. package/lib/types/aiPanel.js +1 -0
  41. package/lib/utils/designUtils/figmaLinks.js +10 -0
  42. package/package.json +1 -1
@@ -4,6 +4,7 @@ import AccountIcon from '@pingux/mdi-react/AccountIcon';
4
4
  import FormSelectIcon from '@pingux/mdi-react/FormSelectIcon';
5
5
  import DocsLayout from '../../../.storybook/storybookDocsLayout';
6
6
  import { Badge, Box, ListViewItem, ListViewItemChart, ListViewItemEditButton, ListViewItemMenu, ListViewItemSwitchField, Separator, Text } from '../..';
7
+ import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
7
8
  import { pingImg } from '../../utils/devUtils/constants/images';
8
9
  import { chartData } from './controls/chart/chartData';
9
10
  import ListViewItemReadMe from './ListViewItem.mdx';
@@ -44,6 +45,12 @@ export var Default = function Default() {
44
45
  }
45
46
  }));
46
47
  };
48
+ Default.parameters = {
49
+ design: {
50
+ type: 'figma',
51
+ url: FIGMA_LINKS.listViewItem["default"]
52
+ }
53
+ };
47
54
  export var WithSubtext = function WithSubtext() {
48
55
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
49
56
  data: {
@@ -53,6 +60,12 @@ export var WithSubtext = function WithSubtext() {
53
60
  }
54
61
  }));
55
62
  };
63
+ WithSubtext.parameters = {
64
+ design: {
65
+ type: 'figma',
66
+ url: FIGMA_LINKS.listViewItem.withSubText
67
+ }
68
+ };
56
69
  export var WithImage = function WithImage() {
57
70
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
58
71
  data: {
@@ -66,13 +79,18 @@ export var WithImage = function WithImage() {
66
79
  }
67
80
  }));
68
81
  };
82
+ WithImage.parameters = {
83
+ design: {
84
+ type: 'figma',
85
+ url: FIGMA_LINKS.listViewItem.withImage
86
+ }
87
+ };
69
88
  export var WithControls = function WithControls() {
70
89
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
71
90
  data: {
72
91
  icon: FormSelectIcon,
73
92
  text: 'Fons Vernall'
74
- },
75
- "aria-label": "Fons Vernall"
93
+ }
76
94
  }, ___EmotionJSX(ListViewItemEditButton, {
77
95
  "aria-label": "edit-icon"
78
96
  }), ___EmotionJSX(ListViewItemSwitchField, {
@@ -85,6 +103,12 @@ export var WithControls = function WithControls() {
85
103
  key: "delete"
86
104
  }, "Delete user"))));
87
105
  };
106
+ WithControls.parameters = {
107
+ design: {
108
+ type: 'figma',
109
+ url: FIGMA_LINKS.listViewItem.withControls
110
+ }
111
+ };
88
112
  export var WithRightOfDataSlot = function WithRightOfDataSlot() {
89
113
  var renderRightOfData = ___EmotionJSX(Box, {
90
114
  isRow: true,
@@ -113,6 +137,12 @@ export var WithRightOfDataSlot = function WithRightOfDataSlot() {
113
137
  key: "delete"
114
138
  }, "Delete user"))));
115
139
  };
140
+ WithRightOfDataSlot.parameters = {
141
+ design: {
142
+ type: 'figma',
143
+ url: FIGMA_LINKS.listViewItem.withRightOfDataSlot
144
+ }
145
+ };
116
146
  export var WithLeftOfDataSlot = function WithLeftOfDataSlot() {
117
147
  var renderLeftOfData = ___EmotionJSX(Box, {
118
148
  mx: "sm",
@@ -141,6 +171,12 @@ export var WithLeftOfDataSlot = function WithLeftOfDataSlot() {
141
171
  key: "delete"
142
172
  }, "Delete user"))));
143
173
  };
174
+ WithLeftOfDataSlot.parameters = {
175
+ design: {
176
+ type: 'figma',
177
+ url: FIGMA_LINKS.listViewItem.withLeftOfDataSlot
178
+ }
179
+ };
144
180
  export var WithCharts = function WithCharts() {
145
181
  var containerRef = useRef();
146
182
  return ___EmotionJSX(Wrapper, null, ___EmotionJSX(ListViewItem, {
@@ -169,6 +205,12 @@ export var WithCharts = function WithCharts() {
169
205
  key: "delete"
170
206
  }, "Delete user"))));
171
207
  };
208
+ WithCharts.parameters = {
209
+ design: {
210
+ type: 'figma',
211
+ url: FIGMA_LINKS.listViewItem.withCharts
212
+ }
213
+ };
172
214
  export var WithExtraLongText = function WithExtraLongText() {
173
215
  var renderRightOfData = ___EmotionJSX(Box, {
174
216
  isRow: true,
@@ -197,4 +239,10 @@ export var WithExtraLongText = function WithExtraLongText() {
197
239
  }, "Disable user"), ___EmotionJSX(Item, {
198
240
  key: "delete"
199
241
  }, "Delete user"))));
242
+ };
243
+ WithExtraLongText.parameters = {
244
+ design: {
245
+ type: 'figma',
246
+ url: FIGMA_LINKS.listViewItem.withExtraLongText
247
+ }
200
248
  };
@@ -13,10 +13,11 @@ import { iconButtonPropTypes } from '../../IconButton/iconButtonAttributes';
13
13
  import { jsx as ___EmotionJSX } from "@emotion/react";
14
14
  var ListViewItemEditButton = /*#__PURE__*/forwardRef(function (props, ref) {
15
15
  return ___EmotionJSX(Box, {
16
- ref: ref
16
+ ref: ref,
17
+ ml: "sm"
17
18
  }, ___EmotionJSX(IconButton, props, ___EmotionJSX(Icon, {
18
19
  icon: CreateIcon,
19
- size: "sm"
20
+ size: "md"
20
21
  })));
21
22
  });
22
23
  ListViewItemEditButton.propTypes = iconButtonPropTypes;
package/lib/index.js CHANGED
@@ -10,6 +10,8 @@ export { default as AccordionGroup } from './components/AccordionGroup';
10
10
  export * from './components/AccordionGroup';
11
11
  export { default as AccordionItem } from './components/AccordionItem';
12
12
  export * from './components/AccordionItem';
13
+ export { default as AIPanel } from './components/AIComponents/AIPanel/AIPanel';
14
+ export { default as AIPanelHeader } from './components/AIComponents/AIPanel/AIPanelHeader';
13
15
  export { default as Prompt } from './components/AIComponents/Prompt';
14
16
  export { default as Response } from './components/AIComponents/Response';
15
17
  export { default as ResponseAttachment } from './components/AIComponents/Response/ResponseAttachment';
@@ -9,5 +9,5 @@ export var componentSpecificNextGenBlacklist = {
9
9
  TextField: ['Success'],
10
10
  OverlayPanel: ['Expandable']
11
11
  };
12
- export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'Response'];
12
+ export var nextGenOnlyComponents = ['NavigationHeader', 'Prompt', 'AI Panel', 'Response'];
13
13
  export default nextGenConvertedComponents;
@@ -153,6 +153,33 @@ var primaryWithIcon = _objectSpread(_objectSpread({}, primary), {}, {
153
153
  display: 'inline-flex',
154
154
  color: 'white'
155
155
  });
156
+ var aiChat = _objectSpread(_objectSpread({}, withIcon), {}, {
157
+ maxWidth: 'fit-content',
158
+ gap: 'sm',
159
+ border: 'none',
160
+ backgroundColor: 'transparent',
161
+ color: 'text.primary',
162
+ path: {
163
+ fill: 'text.primary'
164
+ },
165
+ '&.is-focused': {
166
+ outline: '2px solid',
167
+ outlineColor: 'primary',
168
+ outlineOffset: '3px'
169
+ },
170
+ '&.is-hovered': {
171
+ backgroundColor: 'gray-100',
172
+ path: {
173
+ fill: 'dark'
174
+ }
175
+ },
176
+ '&.is-pressed': {
177
+ backgroundColor: '#d5dfe8 !important',
178
+ path: {
179
+ fill: 'dark'
180
+ }
181
+ }
182
+ });
156
183
  var baseIconButton = {
157
184
  cursor: 'pointer',
158
185
  transition: 'color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out',
@@ -274,6 +301,7 @@ var buttons = {
274
301
  withIcon: withIcon,
275
302
  primaryWithIcon: primaryWithIcon,
276
303
  iconButtons: iconButtons,
277
- modalCloseButton: modalCloseButton
304
+ modalCloseButton: modalCloseButton,
305
+ aiChat: aiChat
278
306
  };
279
307
  export default buttons;
@@ -48,7 +48,7 @@ var hTags = {
48
48
  fontSize: 'xs'
49
49
  }
50
50
  };
51
- export var text = _objectSpread({
51
+ export var text = _objectSpread(_objectSpread({
52
52
  sideNavHeader: {
53
53
  py: 'sm',
54
54
  lineHeight: 'body',
@@ -58,6 +58,12 @@ export var text = _objectSpread({
58
58
  fontWeight: '1',
59
59
  letterSpacing: '1px'
60
60
  },
61
+ suggestion: {
62
+ fontSize: 'md',
63
+ fontFamily: 'standard',
64
+ color: 'text.primary',
65
+ lineHeight: '24px'
66
+ },
61
67
  modalTitle: {
62
68
  fontSize: '20px',
63
69
  fontWeight: '2',
@@ -94,4 +100,11 @@ export var text = _objectSpread({
94
100
  display: 'list-item'
95
101
  }
96
102
  }
97
- }, hTags);
103
+ }, hTags), {}, {
104
+ aiPanelHeader: {
105
+ fontFamily: 'standard',
106
+ color: 'text.primary',
107
+ fontSize: 'lg',
108
+ fontWeight: 2
109
+ }
110
+ });
@@ -257,7 +257,42 @@ var dataTable = {
257
257
  };
258
258
  var overlayPanel = {
259
259
  container: {
260
- backgroundColor: 'background.base'
260
+ backgroundColor: 'background.base',
261
+ border: 'none'
262
+ },
263
+ aiPanelContainer: {
264
+ backgroundColor: 'background.base',
265
+ border: 'none',
266
+ borderLeft: 'none',
267
+ position: 'fixed',
268
+ overflowY: 'scroll',
269
+ top: 0,
270
+ bottom: 0,
271
+ alignItems: 'center',
272
+ justifyContent: 'center',
273
+ boxShadow: '-2px 0px 2px 1px rgba(37, 55, 70, 0.15)',
274
+ display: 'flex !important',
275
+ opacity: 0,
276
+ right: '-50%',
277
+ transition: 'all 500ms',
278
+ maxWidth: '100%',
279
+ p: 'lg',
280
+ '&.is-small': {
281
+ width: '420px'
282
+ },
283
+ '&.is-full': {
284
+ width: 'container.full'
285
+ },
286
+ '&.is-open.is-transitioning': {
287
+ right: 0,
288
+ opacity: 1
289
+ }
290
+ },
291
+ body: {
292
+ gap: 'md',
293
+ minHeight: '100%',
294
+ maxWidth: '768px',
295
+ alignSelf: 'center'
261
296
  },
262
297
  innerPanel: {
263
298
  backgroundColor: 'background.base'
@@ -0,0 +1 @@
1
+ export {};
@@ -208,5 +208,15 @@ export var FIGMA_LINKS = {
208
208
  },
209
209
  editButton: {
210
210
  "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=58623-6267&t=pXTSE3YlGbL0X49N-4'
211
+ },
212
+ listViewItem: {
213
+ "default": 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688-39754&t=r7CoWppWfQQ6G2t8-4',
214
+ withSubText: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44688-39756&t=r7CoWppWfQQ6G2t8-4',
215
+ withImage: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44691-39794&t=r7CoWppWfQQ6G2t8-4',
216
+ withControls: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44691-39816&t=r7CoWppWfQQ6G2t8-4',
217
+ withRightOfDataSlot: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44693-39854&t=r7CoWppWfQQ6G2t8-4',
218
+ withLeftOfDataSlot: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44693-39909&t=r7CoWppWfQQ6G2t8-4',
219
+ withCharts: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44694-39944&t=r7CoWppWfQQ6G2t8-4',
220
+ withExtraLongText: 'https://www.figma.com/file/bpbEw54gTTcdIiZs4PKK1p/Astro-Specs?node-id=44694-40069&t=r7CoWppWfQQ6G2t8-4'
211
221
  }
212
222
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.104.0-alpha.3",
3
+ "version": "2.104.0-alpha.5",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",