@pingux/astro 2.128.0-alpha.4 → 2.128.1-alpha.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.
Files changed (31) hide show
  1. package/lib/cjs/components/ComboBoxField/ComboBoxField.stories.js +1 -1
  2. package/lib/cjs/components/HelpHint/HelpHint.styles.js +2 -1
  3. package/lib/cjs/components/Input/Input.styles.js +1 -1
  4. package/lib/cjs/components/SelectField/Select.styles.js +1 -0
  5. package/lib/cjs/components/SelectField/SelectField.stories.d.ts +26 -2
  6. package/lib/cjs/components/SelectField/SelectField.stories.js +20 -0
  7. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.js +5 -3
  8. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/input.d.ts +8 -0
  9. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/input.js +8 -0
  10. package/lib/cjs/styles/themes/next-gen/colors/colors.js +1 -1
  11. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +11 -2
  12. package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +6 -0
  13. package/lib/cjs/styles/themes/next-gen/variants/button.js +7 -1
  14. package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.d.ts +4 -2
  15. package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.js +4 -2
  16. package/lib/cjs/styles/themes/next-gen/variants/tooltip.d.ts +1 -0
  17. package/lib/cjs/styles/themes/next-gen/variants/tooltip.js +3 -2
  18. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +5 -2
  19. package/lib/cjs/types/tooltipTrigger.d.ts +1 -0
  20. package/lib/components/ComboBoxField/ComboBoxField.stories.js +1 -1
  21. package/lib/components/HelpHint/HelpHint.styles.js +2 -1
  22. package/lib/components/Input/Input.styles.js +1 -1
  23. package/lib/components/SelectField/Select.styles.js +1 -0
  24. package/lib/components/SelectField/SelectField.stories.js +20 -0
  25. package/lib/components/TooltipTrigger/TooltipTrigger.js +5 -3
  26. package/lib/styles/themeOverrides/nextGenDarkMode/variants/input.js +8 -0
  27. package/lib/styles/themes/next-gen/colors/colors.js +1 -1
  28. package/lib/styles/themes/next-gen/variants/button.js +7 -1
  29. package/lib/styles/themes/next-gen/variants/popoverMenu.js +4 -2
  30. package/lib/styles/themes/next-gen/variants/tooltip.js +3 -2
  31. package/package.json +1 -1
@@ -267,7 +267,7 @@ var AsyncLoading = function AsyncLoading() {
267
267
  // Otherwise, the cursor is the next URL to load,
268
268
  // as returned from the previous page.
269
269
  _context.next = 4;
270
- return fetch(cursor || "https://swapi.dev/api/people/?search=".concat(filterText), {
270
+ return fetch(cursor || "https://swapi.py4e.com/api/people/?search=".concat(filterText), {
271
271
  signal: signal
272
272
  });
273
273
  case 4:
@@ -57,7 +57,8 @@ exports.hintButton = hintButton;
57
57
  var popoverContainer = _objectSpread(_objectSpread({}, _TooltipStyles.container), {}, {
58
58
  p: '10px',
59
59
  fontSize: 'sm',
60
- fontWeight: 1
60
+ fontWeight: 1,
61
+ fontFamily: 'standard'
61
62
  });
62
63
  var _default = {
63
64
  hintButton: hintButton,
@@ -40,7 +40,7 @@ var input = _objectSpread(_objectSpread({}, _Text.text.inputValue), {}, {
40
40
  height: '40px',
41
41
  textOverflow: 'ellipsis',
42
42
  paddingRight: '100px',
43
- bg: 'white',
43
+ bg: 'background.base',
44
44
  borderWidth: 1,
45
45
  borderStyle: 'solid',
46
46
  borderColor: 'neutral.80',
@@ -77,6 +77,7 @@ select.transparent = {
77
77
  };
78
78
  select.arrow = {
79
79
  ml: 'auto',
80
+ pointerEvents: 'none',
80
81
  '.is-float-label &': {
81
82
  mt: -10
82
83
  },
@@ -30,14 +30,38 @@ export default _default;
30
30
  export declare const Default: (args: any) => React.JSX.Element;
31
31
  export declare const WithSections: (args: any) => React.JSX.Element;
32
32
  export declare const WithCustomHeight: (args: any) => React.JSX.Element;
33
- export declare const FloatLabel: () => React.JSX.Element;
33
+ export declare const FloatLabel: {
34
+ (): React.JSX.Element;
35
+ parameters: {
36
+ a11y: {
37
+ config: {
38
+ rules: {
39
+ id: string;
40
+ enabled: boolean;
41
+ }[];
42
+ };
43
+ };
44
+ };
45
+ };
34
46
  export declare const Controlled: () => React.JSX.Element;
35
47
  export declare const WithNoneOption: () => React.JSX.Element;
36
48
  export declare const WithSlots: () => React.JSX.Element;
37
49
  export declare const DisabledField: () => React.JSX.Element;
38
50
  export declare const DisabledOptions: () => React.JSX.Element;
39
51
  export declare const NoOptionsAvailable: () => React.JSX.Element;
40
- export declare const HelperText: () => React.JSX.Element;
52
+ export declare const HelperText: {
53
+ (): React.JSX.Element;
54
+ parameters: {
55
+ a11y: {
56
+ config: {
57
+ rules: {
58
+ id: string;
59
+ enabled: boolean;
60
+ }[];
61
+ };
62
+ };
63
+ };
64
+ };
41
65
  export declare const DynamicItems: {
42
66
  (): React.JSX.Element;
43
67
  parameters: {
@@ -244,6 +244,16 @@ var FloatLabel = function FloatLabel() {
244
244
  }, "Yellow"));
245
245
  };
246
246
  exports.FloatLabel = FloatLabel;
247
+ FloatLabel.parameters = {
248
+ a11y: {
249
+ config: {
250
+ rules: [{
251
+ id: 'color-contrast',
252
+ enabled: false
253
+ }]
254
+ }
255
+ }
256
+ };
247
257
  var Controlled = function Controlled() {
248
258
  var _useState = (0, _react.useState)('yellow'),
249
259
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
@@ -355,6 +365,16 @@ var HelperText = function HelperText() {
355
365
  }, "Yellow"));
356
366
  };
357
367
  exports.HelperText = HelperText;
368
+ HelperText.parameters = {
369
+ a11y: {
370
+ config: {
371
+ rules: [{
372
+ id: 'color-contrast',
373
+ enabled: false
374
+ }]
375
+ }
376
+ }
377
+ };
358
378
  var options = (0, _map["default"])(_context = (0, _fill["default"])(_context2 = new Array(400)).call(_context2, {
359
379
  key: 'string',
360
380
  name: 'string'
@@ -38,7 +38,9 @@ var TooltipTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
38
38
  isDarkMode = props.isDarkMode,
39
39
  hasNoArrow = props.hasNoArrow,
40
40
  targetRef = props.targetRef,
41
- width = props.width;
41
+ width = props.width,
42
+ _props$shouldAnimate = props.shouldAnimate,
43
+ shouldAnimate = _props$shouldAnimate === void 0 ? true : _props$shouldAnimate;
42
44
  var _React$Children$toArr = _react["default"].Children.toArray(children),
43
45
  _React$Children$toArr2 = (0, _slicedToArray2["default"])(_React$Children$toArr, 2),
44
46
  trigger = _React$Children$toArr2[0],
@@ -61,7 +63,7 @@ var TooltipTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
61
63
  var _useGetTheme = (0, _hooks.useGetTheme)(),
62
64
  themeState = _useGetTheme.themeState;
63
65
  var isTransitioning = (0, _hooks.useMountTransition)(state.isOpen, 200);
64
- var isOpen = state.isOpen || themeState.isOnyx && isTransitioning;
66
+ var isOpen = state.isOpen || themeState.isOnyx && shouldAnimate && isTransitioning;
65
67
  var _useOverlayPosition = (0, _reactAria.useOverlayPosition)({
66
68
  placement: (0, _concat["default"])(_context = "".concat(direction, " ")).call(_context, align),
67
69
  targetRef: tooltipRef,
@@ -75,7 +77,7 @@ var TooltipTrigger = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
75
77
  positionProps = _useOverlayPosition.overlayProps,
76
78
  arrowProps = _useOverlayPosition.arrowProps,
77
79
  placement = _useOverlayPosition.placement;
78
- var _useStatusClasses = (0, _hooks.useStatusClasses)(className, (_useStatusClasses2 = {}, (0, _defineProperty2["default"])(_useStatusClasses2, "is-".concat(direction), direction), (0, _defineProperty2["default"])(_useStatusClasses2, "isDarkMode", isDarkMode), (0, _defineProperty2["default"])(_useStatusClasses2, "isTransitioning", isTransitioning), (0, _defineProperty2["default"])(_useStatusClasses2, "isMounted", state.isOpen), _useStatusClasses2)),
80
+ var _useStatusClasses = (0, _hooks.useStatusClasses)(className, (_useStatusClasses2 = {}, (0, _defineProperty2["default"])(_useStatusClasses2, "is-".concat(direction), direction), (0, _defineProperty2["default"])(_useStatusClasses2, "isDarkMode", isDarkMode), (0, _defineProperty2["default"])(_useStatusClasses2, "animate", shouldAnimate), (0, _defineProperty2["default"])(_useStatusClasses2, "isTransitioning", isTransitioning), (0, _defineProperty2["default"])(_useStatusClasses2, "isMounted", state.isOpen), _useStatusClasses2)),
79
81
  classNames = _useStatusClasses.classNames;
80
82
  var overlay = (0, _react2.jsx)(_PopoverContainer["default"], (0, _extends2["default"])({
81
83
  isOpen: isOpen,
@@ -5,4 +5,12 @@ export declare const fieldControlWrapper: {
5
5
  borderColor: string;
6
6
  backgroundColor: string;
7
7
  };
8
+ '&.is-read-only': {
9
+ '> input': {
10
+ backgroundColor: string;
11
+ };
12
+ '> textarea': {
13
+ backgroundColor: string;
14
+ };
15
+ };
8
16
  };
@@ -27,6 +27,14 @@ var fieldControlWrapper = {
27
27
  '> textarea': {
28
28
  borderColor: 'border.input',
29
29
  backgroundColor: 'background.base'
30
+ },
31
+ '&.is-read-only': {
32
+ '> input': {
33
+ backgroundColor: 'background.base'
34
+ },
35
+ '> textarea': {
36
+ backgroundColor: 'background.base'
37
+ }
30
38
  }
31
39
  };
32
40
  exports.fieldControlWrapper = fieldControlWrapper;
@@ -119,7 +119,7 @@ var badge = {
119
119
  textColor: _colorTokens.nextGenColors['gray-900'],
120
120
  background: _colorTokens.nextGenColors['gray-100']
121
121
  };
122
- var tooltip = 'black';
122
+ var tooltip = _colorTokens.nextGenColors['gray-900'];
123
123
  var colors = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, subColors), _colorTokens.nextGenColors), overrides), {}, {
124
124
  badge: badge,
125
125
  card: card,
@@ -1376,6 +1376,12 @@ declare const _default: {
1376
1376
  outlineOffset: string;
1377
1377
  };
1378
1378
  };
1379
+ hintButton: {
1380
+ bg: string;
1381
+ '&.is-hovered': {
1382
+ bg: string;
1383
+ };
1384
+ };
1379
1385
  };
1380
1386
  modalCloseButton: {
1381
1387
  position: string;
@@ -3308,8 +3314,10 @@ declare const _default: {
3308
3314
  popoverMenu: {
3309
3315
  container: {
3310
3316
  transition: string;
3311
- opacity: number;
3312
- '&.is-mounted.is-transitioning': {
3317
+ '&.animate': {
3318
+ opacity: number;
3319
+ };
3320
+ '&.animate.is-mounted.is-transitioning': {
3313
3321
  opacity: string;
3314
3322
  };
3315
3323
  };
@@ -3667,6 +3675,7 @@ declare const _default: {
3667
3675
  backgroundColor: string;
3668
3676
  borderRadius: string;
3669
3677
  fontSize: string;
3678
+ fontFamily: string;
3670
3679
  };
3671
3680
  };
3672
3681
  footer: {
@@ -1125,6 +1125,12 @@ declare const buttons: {
1125
1125
  outlineOffset: string;
1126
1126
  };
1127
1127
  };
1128
+ hintButton: {
1129
+ bg: string;
1130
+ '&.is-hovered': {
1131
+ bg: string;
1132
+ };
1133
+ };
1128
1134
  };
1129
1135
  modalCloseButton: {
1130
1136
  position: string;
@@ -513,7 +513,13 @@ var iconButtons = {
513
513
  fill: 'dark'
514
514
  }
515
515
  }
516
- })
516
+ }),
517
+ hintButton: {
518
+ bg: 'gray-100',
519
+ '&.is-hovered': {
520
+ bg: 'gray-900'
521
+ }
522
+ }
517
523
  };
518
524
  var buttons = {
519
525
  neutral: neutral,
@@ -1,8 +1,10 @@
1
1
  declare const _default: {
2
2
  container: {
3
3
  transition: string;
4
- opacity: number;
5
- '&.is-mounted.is-transitioning': {
4
+ '&.animate': {
5
+ opacity: number;
6
+ };
7
+ '&.animate.is-mounted.is-transitioning': {
6
8
  opacity: string;
7
9
  };
8
10
  };
@@ -7,8 +7,10 @@ _Object$defineProperty(exports, "__esModule", {
7
7
  exports["default"] = void 0;
8
8
  var container = {
9
9
  transition: 'opacity 200ms ease',
10
- opacity: 0,
11
- '&.is-mounted.is-transitioning': {
10
+ '&.animate': {
11
+ opacity: 0
12
+ },
13
+ '&.animate.is-mounted.is-transitioning': {
12
14
  opacity: '100%'
13
15
  }
14
16
  };
@@ -3,6 +3,7 @@ declare const _default: {
3
3
  backgroundColor: string;
4
4
  borderRadius: string;
5
5
  fontSize: string;
6
+ fontFamily: string;
6
7
  };
7
8
  };
8
9
  export default _default;
@@ -6,9 +6,10 @@ _Object$defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports["default"] = void 0;
8
8
  var container = {
9
- backgroundColor: '#000000',
9
+ backgroundColor: 'tooltip',
10
10
  borderRadius: '4px',
11
- fontSize: 'xs'
11
+ fontSize: 'xs',
12
+ fontFamily: 'standard'
12
13
  };
13
14
  var _default = {
14
15
  container: container
@@ -928,8 +928,10 @@ declare const _default: {
928
928
  popoverMenu: {
929
929
  container: {
930
930
  transition: string;
931
- opacity: number;
932
- '&.is-mounted.is-transitioning': {
931
+ '&.animate': {
932
+ opacity: number;
933
+ };
934
+ '&.animate.is-mounted.is-transitioning': {
933
935
  opacity: string;
934
936
  };
935
937
  };
@@ -1287,6 +1289,7 @@ declare const _default: {
1287
1289
  backgroundColor: string;
1288
1290
  borderRadius: string;
1289
1291
  fontSize: string;
1292
+ fontFamily: string;
1290
1293
  };
1291
1294
  };
1292
1295
  footer: {
@@ -36,4 +36,5 @@ export interface TooltipTriggerProps extends DOMAttributes, ReactAriaTooltipTrig
36
36
  /** Width applied to the wrapper of the tooltip component. */
37
37
  width?: string;
38
38
  targetRef?: RefObject<FocusableElement | HTMLElement>;
39
+ shouldAnimate?: boolean;
39
40
  }
@@ -252,7 +252,7 @@ export var AsyncLoading = function AsyncLoading() {
252
252
  // Otherwise, the cursor is the next URL to load,
253
253
  // as returned from the previous page.
254
254
  _context.next = 4;
255
- return fetch(cursor || "https://swapi.dev/api/people/?search=".concat(filterText), {
255
+ return fetch(cursor || "https://swapi.py4e.com/api/people/?search=".concat(filterText), {
256
256
  signal: signal
257
257
  });
258
258
  case 4:
@@ -49,7 +49,8 @@ export var hintButton = {
49
49
  var popoverContainer = _objectSpread(_objectSpread({}, container), {}, {
50
50
  p: '10px',
51
51
  fontSize: 'sm',
52
- fontWeight: 1
52
+ fontWeight: 1,
53
+ fontFamily: 'standard'
53
54
  });
54
55
  export default {
55
56
  hintButton: hintButton,
@@ -33,7 +33,7 @@ export var input = _objectSpread(_objectSpread({}, text.inputValue), {}, {
33
33
  height: '40px',
34
34
  textOverflow: 'ellipsis',
35
35
  paddingRight: '100px',
36
- bg: 'white',
36
+ bg: 'background.base',
37
37
  borderWidth: 1,
38
38
  borderStyle: 'solid',
39
39
  borderColor: 'neutral.80',
@@ -71,6 +71,7 @@ select.transparent = {
71
71
  };
72
72
  select.arrow = {
73
73
  ml: 'auto',
74
+ pointerEvents: 'none',
74
75
  '.is-float-label &': {
75
76
  mt: -10
76
77
  },
@@ -228,6 +228,16 @@ export var FloatLabel = function FloatLabel() {
228
228
  key: "yellow"
229
229
  }, "Yellow"));
230
230
  };
231
+ FloatLabel.parameters = {
232
+ a11y: {
233
+ config: {
234
+ rules: [{
235
+ id: 'color-contrast',
236
+ enabled: false
237
+ }]
238
+ }
239
+ }
240
+ };
231
241
  export var Controlled = function Controlled() {
232
242
  var _useState = useState('yellow'),
233
243
  _useState2 = _slicedToArray(_useState, 2),
@@ -332,6 +342,16 @@ export var HelperText = function HelperText() {
332
342
  key: "yellow"
333
343
  }, "Yellow"));
334
344
  };
345
+ HelperText.parameters = {
346
+ a11y: {
347
+ config: {
348
+ rules: [{
349
+ id: 'color-contrast',
350
+ enabled: false
351
+ }]
352
+ }
353
+ }
354
+ };
335
355
  var options = _mapInstanceProperty(_context = _fillInstanceProperty(_context2 = new Array(400)).call(_context2, {
336
356
  key: 'string',
337
357
  name: 'string'
@@ -25,7 +25,9 @@ var TooltipTrigger = /*#__PURE__*/forwardRef(function (props, ref) {
25
25
  isDarkMode = props.isDarkMode,
26
26
  hasNoArrow = props.hasNoArrow,
27
27
  targetRef = props.targetRef,
28
- width = props.width;
28
+ width = props.width,
29
+ _props$shouldAnimate = props.shouldAnimate,
30
+ shouldAnimate = _props$shouldAnimate === void 0 ? true : _props$shouldAnimate;
29
31
  var _React$Children$toArr = React.Children.toArray(children),
30
32
  _React$Children$toArr2 = _slicedToArray(_React$Children$toArr, 2),
31
33
  trigger = _React$Children$toArr2[0],
@@ -48,7 +50,7 @@ var TooltipTrigger = /*#__PURE__*/forwardRef(function (props, ref) {
48
50
  var _useGetTheme = useGetTheme(),
49
51
  themeState = _useGetTheme.themeState;
50
52
  var isTransitioning = useMountTransition(state.isOpen, 200);
51
- var isOpen = state.isOpen || themeState.isOnyx && isTransitioning;
53
+ var isOpen = state.isOpen || themeState.isOnyx && shouldAnimate && isTransitioning;
52
54
  var _useOverlayPosition = useOverlayPosition({
53
55
  placement: _concatInstanceProperty(_context = "".concat(direction, " ")).call(_context, align),
54
56
  targetRef: tooltipRef,
@@ -62,7 +64,7 @@ var TooltipTrigger = /*#__PURE__*/forwardRef(function (props, ref) {
62
64
  positionProps = _useOverlayPosition.overlayProps,
63
65
  arrowProps = _useOverlayPosition.arrowProps,
64
66
  placement = _useOverlayPosition.placement;
65
- var _useStatusClasses = useStatusClasses(className, (_useStatusClasses2 = {}, _defineProperty(_useStatusClasses2, "is-".concat(direction), direction), _defineProperty(_useStatusClasses2, "isDarkMode", isDarkMode), _defineProperty(_useStatusClasses2, "isTransitioning", isTransitioning), _defineProperty(_useStatusClasses2, "isMounted", state.isOpen), _useStatusClasses2)),
67
+ var _useStatusClasses = useStatusClasses(className, (_useStatusClasses2 = {}, _defineProperty(_useStatusClasses2, "is-".concat(direction), direction), _defineProperty(_useStatusClasses2, "isDarkMode", isDarkMode), _defineProperty(_useStatusClasses2, "animate", shouldAnimate), _defineProperty(_useStatusClasses2, "isTransitioning", isTransitioning), _defineProperty(_useStatusClasses2, "isMounted", state.isOpen), _useStatusClasses2)),
66
68
  classNames = _useStatusClasses.classNames;
67
69
  var overlay = ___EmotionJSX(PopoverContainer, _extends({
68
70
  isOpen: isOpen,
@@ -19,6 +19,14 @@ export var fieldControlWrapper = {
19
19
  '> textarea': {
20
20
  borderColor: 'border.input',
21
21
  backgroundColor: 'background.base'
22
+ },
23
+ '&.is-read-only': {
24
+ '> input': {
25
+ backgroundColor: 'background.base'
26
+ },
27
+ '> textarea': {
28
+ backgroundColor: 'background.base'
29
+ }
22
30
  }
23
31
  };
24
32
  input.fieldControlWrapper = _objectSpread({}, fieldControlWrapper);
@@ -109,7 +109,7 @@ var badge = {
109
109
  textColor: nextGenColors['gray-900'],
110
110
  background: nextGenColors['gray-100']
111
111
  };
112
- var tooltip = 'black';
112
+ var tooltip = nextGenColors['gray-900'];
113
113
  var colors = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, subColors), nextGenColors), overrides), {}, {
114
114
  badge: badge,
115
115
  card: card,
@@ -505,7 +505,13 @@ var iconButtons = {
505
505
  fill: 'dark'
506
506
  }
507
507
  }
508
- })
508
+ }),
509
+ hintButton: {
510
+ bg: 'gray-100',
511
+ '&.is-hovered': {
512
+ bg: 'gray-900'
513
+ }
514
+ }
509
515
  };
510
516
  var buttons = {
511
517
  neutral: neutral,
@@ -1,7 +1,9 @@
1
1
  var container = {
2
2
  transition: 'opacity 200ms ease',
3
- opacity: 0,
4
- '&.is-mounted.is-transitioning': {
3
+ '&.animate': {
4
+ opacity: 0
5
+ },
6
+ '&.animate.is-mounted.is-transitioning': {
5
7
  opacity: '100%'
6
8
  }
7
9
  };
@@ -1,7 +1,8 @@
1
1
  var container = {
2
- backgroundColor: '#000000',
2
+ backgroundColor: 'tooltip',
3
3
  borderRadius: '4px',
4
- fontSize: 'xs'
4
+ fontSize: 'xs',
5
+ fontFamily: 'standard'
5
6
  };
6
7
  export default {
7
8
  container: container
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.128.0-alpha.4",
3
+ "version": "2.128.1-alpha.0",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",