@pingux/astro 2.184.0-alpha.0 → 2.186.0-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 (47) hide show
  1. package/lib/cjs/components/AccordionGridItem/AccordionGridItemHeader.js +8 -4
  2. package/lib/cjs/components/Avatar/Avatar.js +1 -1
  3. package/lib/cjs/components/Avatar/Avatar.test.js +21 -17
  4. package/lib/cjs/components/ColorField/ColorFieldPreviewButton.js +6 -3
  5. package/lib/cjs/components/ComboBox/ComboBoxInput.js +7 -4
  6. package/lib/cjs/components/ListBox/Option.js +2 -2
  7. package/lib/cjs/components/ListView/ListViewExpandableItem.js +6 -3
  8. package/lib/cjs/components/Loader/Loader.styles.js +1 -1
  9. package/lib/cjs/components/MultivaluesField/CondensedMultivaluesField.js +8 -4
  10. package/lib/cjs/components/NavBarSection/NavBarItemHeader.js +3 -2
  11. package/lib/cjs/components/NumberField/NumberField.js +4 -2
  12. package/lib/cjs/components/PanelHeader/PanelHeader.js +0 -1
  13. package/lib/cjs/components/SelectFieldBase/SelectFieldBase.js +3 -2
  14. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/comboBox.d.ts +9 -0
  15. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/comboBox.js +17 -0
  16. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.d.ts +8 -0
  17. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.js +3 -1
  18. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +1 -1
  19. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +7 -0
  20. package/lib/cjs/styles/themes/next-gen/text.d.ts +1 -0
  21. package/lib/cjs/styles/themes/next-gen/text.js +1 -0
  22. package/lib/cjs/styles/themes/next-gen/variants/label.js +2 -0
  23. package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.d.ts +3 -0
  24. package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.js +3 -0
  25. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +6 -0
  26. package/lib/cjs/styles/themes/next-gen/variants/variants.js +7 -4
  27. package/lib/components/AccordionGridItem/AccordionGridItemHeader.js +8 -4
  28. package/lib/components/Avatar/Avatar.js +1 -1
  29. package/lib/components/Avatar/Avatar.test.js +21 -17
  30. package/lib/components/ColorField/ColorFieldPreviewButton.js +6 -3
  31. package/lib/components/ComboBox/ComboBoxInput.js +7 -4
  32. package/lib/components/ListBox/Option.js +2 -2
  33. package/lib/components/ListView/ListViewExpandableItem.js +6 -3
  34. package/lib/components/Loader/Loader.styles.js +1 -1
  35. package/lib/components/MultivaluesField/CondensedMultivaluesField.js +8 -4
  36. package/lib/components/NavBarSection/NavBarItemHeader.js +3 -2
  37. package/lib/components/NumberField/NumberField.js +5 -3
  38. package/lib/components/PanelHeader/PanelHeader.js +0 -1
  39. package/lib/components/SelectFieldBase/SelectFieldBase.js +3 -2
  40. package/lib/styles/themeOverrides/nextGenDarkMode/variants/comboBox.js +10 -0
  41. package/lib/styles/themeOverrides/nextGenDarkMode/variants/forms.js +3 -1
  42. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +1 -1
  43. package/lib/styles/themes/next-gen/text.js +1 -0
  44. package/lib/styles/themes/next-gen/variants/label.js +2 -0
  45. package/lib/styles/themes/next-gen/variants/popoverMenu.js +3 -0
  46. package/lib/styles/themes/next-gen/variants/variants.js +7 -4
  47. package/package.json +1 -1
@@ -39,7 +39,8 @@ var AccordionGridItemHeader = /*#__PURE__*/(0, _react.forwardRef)(function (prop
39
39
  state = _useAccordionGridCont.state;
40
40
  var cellRef = (0, _react.useRef)();
41
41
  var _useGetTheme = (0, _hooks.useGetTheme)(),
42
- icons = _useGetTheme.icons;
42
+ icons = _useGetTheme.icons,
43
+ isOnyx = _useGetTheme.themeState.isOnyx;
43
44
  var MenuDown = icons.MenuDown,
44
45
  MenuUp = icons.MenuUp;
45
46
 
@@ -110,13 +111,16 @@ var AccordionGridItemHeader = /*#__PURE__*/(0, _react.forwardRef)(function (prop
110
111
  sx: {
111
112
  mr: '0px'
112
113
  }
113
- }, (0, _react2.jsx)(_Icon["default"], {
114
+ }, (0, _react2.jsx)(_Icon["default"], (0, _extends2["default"])({
114
115
  color: "text.primary",
115
- icon: isSelected ? upArrow : downArrow,
116
+ icon: isSelected ? upArrow : downArrow
117
+ }, isOnyx && {
118
+ size: 'sm'
119
+ }, {
116
120
  title: {
117
121
  name: isSelected ? 'Menu Up Icon' : 'Menu Down Icon'
118
122
  }
119
- }))));
123
+ })))));
120
124
  });
121
125
  AccordionGridItemHeader.defaultProps = {
122
126
  hasCaret: true
@@ -44,7 +44,7 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
44
44
  isSquare = props.isSquare,
45
45
  isLogo = props.isLogo,
46
46
  others = (0, _objectWithoutProperties2["default"])(props, _excluded);
47
- var safeColorId = colorId || '_INTERNAL_DEFAULT_ID_';
47
+ var safeColorId = colorId || (defaultText && defaultText !== 'AA' ? defaultText : '_INTERNAL_DEFAULT_ID_');
48
48
  if (process.env.NODE_ENV !== 'production') {
49
49
  if (!src && !color && !colorId) {
50
50
  console.warn("[Astro] Avatar: No 'src', 'color', or 'colorId' provided. " + 'The component is falling back to a default generated color.');
@@ -25,7 +25,6 @@ var getComponent = function getComponent() {
25
25
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
26
26
  return (0, _testWrapper.render)((0, _react2.jsx)(_["default"], (0, _extends2["default"])({}, defaultProps, props)));
27
27
  };
28
- // Needs to be added to each components test file
29
28
  (0, _universalComponentTest.universalComponentTests)({
30
29
  renderComponent: function renderComponent(props) {
31
30
  return (0, _react2.jsx)(_["default"], (0, _extends2["default"])({}, defaultProps, props));
@@ -45,7 +44,7 @@ test('an avatar is rendered with custom alt', function () {
45
44
  var img = _testWrapper.screen.getByRole('img');
46
45
  expect(img).toHaveAttribute('alt', 'Custom Alt');
47
46
  });
48
- test('an avatar is rendered with custom alt', function () {
47
+ test('an avatar is rendered with initials', function () {
49
48
  var warnSpy = jest.spyOn(console, 'warn').mockImplementation();
50
49
  getComponent({
51
50
  src: undefined,
@@ -70,9 +69,6 @@ describe('getColorFromUUID', function () {
70
69
  test('distributes colors differently for different UUIDs', function () {
71
70
  var colorA = (0, _getColorFromUuid["default"])('id-1', _constants.avatarColors);
72
71
  var colorB = (0, _getColorFromUuid["default"])('id-2', _constants.avatarColors);
73
-
74
- // While collisions are mathematically possible, for 2 items in a 10-item list,
75
- // these specific IDs yield different results in FNV-1a.
76
72
  expect(colorA).not.toBe(colorB);
77
73
  });
78
74
  test('throws error if color array is empty', function () {
@@ -86,8 +82,6 @@ describe('getColorFromUUID', function () {
86
82
  colorId: 'some-id'
87
83
  });
88
84
  var avatar = _testWrapper.screen.getByTestId(datatestId);
89
-
90
- // Checking for 'is-blue'
91
85
  expect(avatar).toHaveClass('is-blue');
92
86
  });
93
87
  test('applies a hashed color class from colorId', function () {
@@ -96,9 +90,6 @@ describe('getColorFromUUID', function () {
96
90
  colorId: uuid
97
91
  });
98
92
  var avatar = _testWrapper.screen.getByTestId(datatestId);
99
-
100
- // We check that it has *a* class starting with 'is-'
101
- // and specifically isn't the default 'is-green'
102
93
  var classList = (0, _from["default"])(avatar.classList);
103
94
  var colorClass = (0, _find["default"])(classList).call(classList, function (cls) {
104
95
  return (0, _startsWith["default"])(cls).call(cls, 'is-');
@@ -171,27 +162,40 @@ describe('getColorFromUUID Distribution', function () {
171
162
  test('distributes 10,000 UUIDs evenly across 10 colors', function () {
172
163
  var iterations = 10000;
173
164
  var distribution = {};
174
-
175
- // Initialize counts
176
165
  (0, _forEach["default"])(_constants.avatarColors).call(_constants.avatarColors, function (c) {
177
166
  distribution[c] = 0;
178
167
  });
179
-
180
- // Generate and hash
181
168
  for (var i = 0; i < iterations; i += 1) {
182
- // Use the imported randomUUID function directly
183
169
  var uuid = (0, _nodeCrypto.randomUUID)();
184
170
  var selectedColor = (0, _getColorFromUuid["default"])(uuid, _constants.avatarColors);
185
171
  distribution[selectedColor] += 1;
186
172
  }
187
173
  var expectedMean = iterations / _constants.avatarColors.length;
188
- // 15% variance is a safe threshold for 10k iterations
189
174
  var allowedVariance = 0.15;
190
175
  (0, _forEach["default"])(_constants.avatarColors).call(_constants.avatarColors, function (color) {
191
176
  var count = distribution[color];
192
- // Assert that each color is roughly 10% of the total
193
177
  expect(count).toBeGreaterThan(expectedMean * (1 - allowedVariance));
194
178
  expect(count).toBeLessThan(expectedMean * (1 + allowedVariance));
195
179
  });
196
180
  });
181
+ });
182
+ describe('Color Selection Logic', function () {
183
+ var getResolvedId = function getResolvedId(colorId, defaultText) {
184
+ return colorId || (defaultText && defaultText !== 'AA' ? defaultText : '_INTERNAL_DEFAULT_ID_');
185
+ };
186
+ test('should use colorId if it is provided', function () {
187
+ expect(getResolvedId('custom-id', 'BB')).toBe('custom-id');
188
+ });
189
+ test('should use defaultText if colorId is missing and text is not "AA"', function () {
190
+ expect(getResolvedId(null, 'BB')).toBe('BB');
191
+ });
192
+ test('should use hardcoded string if colorId is missing and text is "AA"', function () {
193
+ expect(getResolvedId(undefined, 'AA')).toBe('_INTERNAL_DEFAULT_ID_');
194
+ });
195
+ test('should use hardcoded string if both colorId and defaultText are null', function () {
196
+ expect(getResolvedId(null, null)).toBe('_INTERNAL_DEFAULT_ID_');
197
+ });
198
+ test('should use hardcoded string if colorId is missing and defaultText is empty string', function () {
199
+ expect(getResolvedId(null, '')).toBe('_INTERNAL_DEFAULT_ID_');
200
+ });
197
201
  });
@@ -24,7 +24,8 @@ var ColorFieldPreviewButton = /*#__PURE__*/(0, _react.forwardRef)(function (prop
24
24
  colorValue = props.colorValue,
25
25
  others = (0, _objectWithoutProperties2["default"])(props, _excluded);
26
26
  var _useGetTheme = (0, _hooks.useGetTheme)(),
27
- icons = _useGetTheme.icons;
27
+ icons = _useGetTheme.icons,
28
+ isOnyx = _useGetTheme.themeState.isOnyx;
28
29
  var MenuUp = icons.MenuUp,
29
30
  MenuDown = icons.MenuDown;
30
31
  var buttonRef = (0, _hooks.useLocalOrForwardRef)(ref);
@@ -52,12 +53,14 @@ var ColorFieldPreviewButton = /*#__PURE__*/(0, _react.forwardRef)(function (prop
52
53
  ml: 'auto'
53
54
  },
54
55
  flexGrow: "1"
55
- }, (0, _react2.jsx)(_index.Icon, {
56
+ }, (0, _react2.jsx)(_index.Icon, (0, _extends2["default"])({
56
57
  ml: "auto",
57
58
  title: {
58
59
  name: isOpen ? 'menu-up' : 'menu-down'
59
60
  },
60
61
  icon: isOpen ? MenuUp : MenuDown
61
- }))));
62
+ }, isOnyx && {
63
+ size: 'sm'
64
+ })))));
62
65
  });
63
66
  var _default = exports["default"] = ColorFieldPreviewButton;
@@ -61,7 +61,8 @@ var ComboBoxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
61
61
  containerProps: containerProps
62
62
  }, (0, _reactAria.mergeProps)(inputProps, others));
63
63
  var _useGetTheme = (0, _useGetTheme2["default"])(),
64
- icons = _useGetTheme.icons;
64
+ icons = _useGetTheme.icons,
65
+ isOnyx = _useGetTheme.themeState.isOnyx;
65
66
  var MenuDown = icons.MenuDown;
66
67
 
67
68
  // istanbul ignore next
@@ -82,9 +83,11 @@ var ComboBoxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
82
83
  variant: "forms.comboBox.inputInContainerSlot"
83
84
  },
84
85
  // Render loader after delay if filtering or loading
85
- isLoading && (isOpen || menuTrigger === 'manual' || loadingState === _loadingStates["default"].LOADING) && (0, _react2.jsx)(_.Loader, {
86
+ isLoading && (isOpen || menuTrigger === 'manual' || loadingState === _loadingStates["default"].LOADING) && (0, _react2.jsx)(_.Loader, (0, _extends2["default"])({
86
87
  variant: "loader.withinInput"
87
- }), (0, _react2.jsx)(_interactions.PressResponder, {
88
+ }, isOnyx && {
89
+ size: 'sm'
90
+ })), (0, _react2.jsx)(_interactions.PressResponder, {
88
91
  preventFocusOnPress: true,
89
92
  isPressed: isOpen
90
93
  }, (0, _react2.jsx)(_.Button, (0, _extends2["default"])({
@@ -95,7 +98,7 @@ var ComboBoxInput = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
95
98
  tabIndex: -1
96
99
  }), (0, _react2.jsx)(_.Icon, {
97
100
  icon: MenuDown,
98
- size: "md",
101
+ size: isOnyx ? 'sm' : 'md',
99
102
  sx: isOpen ? {
100
103
  transform: 'rotate(180deg)'
101
104
  } : null,
@@ -142,7 +142,6 @@ var Option = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
142
142
  }, (0, _react2.jsx)(_Icon["default"], {
143
143
  icon: isSelected ? CheckedIcon : UncheckedIcon,
144
144
  color: "active",
145
- size: "24px",
146
145
  mr: "xs",
147
146
  className: classNames,
148
147
  variant: "listBox.checkboxIcon"
@@ -156,7 +155,8 @@ var Option = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
156
155
  title: {
157
156
  name: 'Check Icon'
158
157
  },
159
- color: "green-500"
158
+ color: "green-500",
159
+ size: isOnyx ? 'xsm' : 'md'
160
160
  }));
161
161
  });
162
162
  Option.defaultProps = {
@@ -33,7 +33,8 @@ var ListViewExpandableItem = function ListViewExpandableItem(props) {
33
33
  isFocusable = props.isFocusable,
34
34
  className = props.className;
35
35
  var _useGetTheme = (0, _useGetTheme2["default"])(),
36
- icons = _useGetTheme.icons;
36
+ icons = _useGetTheme.icons,
37
+ isOnyx = _useGetTheme.themeState.isOnyx;
37
38
  var MenuDown = icons.MenuDown,
38
39
  MenuUp = icons.MenuUp;
39
40
  var _useContext = (0, _react.useContext)(_ListViewContext.ListViewContext),
@@ -75,7 +76,7 @@ var ListViewExpandableItem = function ListViewExpandableItem(props) {
75
76
  alignItems: 'center',
76
77
  width: '100%'
77
78
  }
78
- }, item.rendered && item.rendered[0], (0, _react2.jsx)(_index.Icon, {
79
+ }, item.rendered && item.rendered[0], (0, _react2.jsx)(_index.Icon, (0, _extends2["default"])({
79
80
  sx: {
80
81
  ml: 'auto'
81
82
  },
@@ -84,7 +85,9 @@ var ListViewExpandableItem = function ListViewExpandableItem(props) {
84
85
  title: {
85
86
  name: "".concat(key, " expand icon button")
86
87
  }
87
- }))), (0, _react2.jsx)(_index.Box, expandableItemState.gridCellProps, isExpanded && (0, _react2.jsx)(_ListViewFocusWrapper["default"], {
88
+ }, isOnyx && {
89
+ size: 'sm'
90
+ })))), (0, _react2.jsx)(_index.Box, expandableItemState.gridCellProps, isExpanded && (0, _react2.jsx)(_ListViewFocusWrapper["default"], {
88
91
  isFocusEscaped: isFocusEscaped,
89
92
  containerProps: expandableContainerProps
90
93
  }, item.rendered && item.rendered[1])));
@@ -33,7 +33,7 @@ var withinInput = {
33
33
  var withinListbox = {
34
34
  color: 'active',
35
35
  fontSize: '6px',
36
- padding: 'md',
36
+ padding: 'sm',
37
37
  alignItems: 'center',
38
38
  justifyContent: 'center'
39
39
  };
@@ -106,7 +106,8 @@ var CondensedMultivaluesField = /*#__PURE__*/(0, _react.forwardRef)(function (pr
106
106
  var inputRef = (0, _react.useRef)();
107
107
  var buttonRef = (0, _react.useRef)();
108
108
  var _useGetTheme = (0, _hooks.useGetTheme)(),
109
- icons = _useGetTheme.icons;
109
+ icons = _useGetTheme.icons,
110
+ isOnyx = _useGetTheme.themeState.isOnyx;
110
111
  var MenuDown = icons.MenuDown,
111
112
  MenuUp = icons.MenuUp;
112
113
  var _useFocusWithin = (0, _interactions.useFocusWithin)({
@@ -393,12 +394,15 @@ var CondensedMultivaluesField = /*#__PURE__*/(0, _react.forwardRef)(function (pr
393
394
  sx: {
394
395
  border: 'none'
395
396
  }
396
- }, (0, _react2.jsx)(_.Icon, {
397
- icon: isOpen ? MenuUp : MenuDown,
397
+ }, (0, _react2.jsx)(_.Icon, (0, _extends2["default"])({
398
+ icon: isOpen ? MenuUp : MenuDown
399
+ }, isOnyx && {
400
+ size: 'sm'
401
+ }, {
398
402
  title: {
399
403
  name: isOpen ? 'Menu Up Icon' : 'Menu Down Icon'
400
404
  }
401
- })));
405
+ }))));
402
406
  return (0, _react2.jsx)(_MultivaluesContext.MultivaluesContext.Provider, {
403
407
  value: setActiveDescendant
404
408
  }, (0, _react2.jsx)(_.Box, (0, _reactAria.mergeProps)(containerProps, focusWithinProps), (0, _react2.jsx)(_.TextField, (0, _extends2["default"])({
@@ -41,7 +41,8 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
41
41
  var navBarState = (0, _NavBarContext.useNavBarContext)();
42
42
  var _useGetTheme = (0, _useGetTheme3["default"])(),
43
43
  icons = _useGetTheme.icons,
44
- navBarIconSize = _useGetTheme.navBarIconSize;
44
+ navBarIconSize = _useGetTheme.navBarIconSize,
45
+ isOnyx = _useGetTheme.themeState.isOnyx;
45
46
  var MenuDown = icons.MenuDown,
46
47
  MenuUp = icons.MenuUp;
47
48
  var selectedKey = navBarState.selectedKey,
@@ -97,7 +98,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
97
98
  }
98
99
  }, (0, _react2.jsx)(_index.Icon, {
99
100
  icon: isExpanded ? MenuUp : MenuDown,
100
- size: "xsm",
101
+ size: isOnyx ? 'sm' : 'xsm',
101
102
  sx: {
102
103
  color: getIconColor(),
103
104
  fill: getIconColor()
@@ -41,6 +41,8 @@ var NumberField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
41
41
  status = props.status;
42
42
  var _useLocale = (0, _i18n.useLocale)(),
43
43
  locale = _useLocale.locale;
44
+ var _useGetTheme = (0, _hooks.useGetTheme)(),
45
+ isOnyx = _useGetTheme.themeState.isOnyx;
44
46
  var state = (0, _reactStately.useNumberFieldState)(_objectSpread(_objectSpread({}, props), {}, {
45
47
  locale: locale
46
48
  }));
@@ -71,7 +73,7 @@ var NumberField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
71
73
  p: 0
72
74
  }), (0, _react2.jsx)(_.Icon, {
73
75
  icon: _MenuUpIcon["default"],
74
- size: 18,
76
+ size: isOnyx ? 'sm' : 18,
75
77
  title: {
76
78
  name: 'Menu Up Icon'
77
79
  }
@@ -81,7 +83,7 @@ var NumberField = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
81
83
  p: 0
82
84
  }), (0, _react2.jsx)(_.Icon, {
83
85
  icon: _MenuDownIcon["default"],
84
- size: 18,
86
+ size: isOnyx ? 'sm' : 18,
85
87
  title: {
86
88
  name: 'Menu Down Icon'
87
89
  }
@@ -61,7 +61,6 @@ var PanelHeader = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
61
61
  }
62
62
  }));
63
63
  var renderAvatar = (0, _react2.jsx)(_index.Avatar, (0, _extends2["default"])({
64
- color: image !== null && image !== void 0 && image.src ? false : 'green',
65
64
  src: image === null || image === void 0 ? void 0 : image.src,
66
65
  isSquare: !!(image !== null && image !== void 0 && image.src),
67
66
  size: "avatar.lg",
@@ -69,7 +69,8 @@ var SelectFieldBase = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
69
69
  var _getAriaAttributeProp = (0, _ariaAttributes.getAriaAttributeProps)(others),
70
70
  ariaProps = _getAriaAttributeProp.ariaProps;
71
71
  var _useGetTheme = (0, _useGetTheme2["default"])(),
72
- icons = _useGetTheme.icons;
72
+ icons = _useGetTheme.icons,
73
+ isOnyx = _useGetTheme.themeState.isOnyx;
73
74
  var MenuDown = icons.MenuDown,
74
75
  MenuUp = icons.MenuUp;
75
76
  var helperTextId = (0, _react.useMemo)(function () {
@@ -90,7 +91,7 @@ var SelectFieldBase = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref)
90
91
  title: {
91
92
  name: 'Menu down'
92
93
  },
93
- size: "md"
94
+ size: isOnyx ? 'sm' : 'md'
94
95
  }));
95
96
  var clearButton = hasClearButton && state.selectedKey && (0, _react2.jsx)(_.IconButton, (0, _extends2["default"])({
96
97
  tabIndex: 0,
@@ -0,0 +1,9 @@
1
+ declare const comboBox: {
2
+ input: {
3
+ bg: string;
4
+ '&.is-disabled, &.is-read-only': {
5
+ bg: string;
6
+ };
7
+ };
8
+ };
9
+ export default comboBox;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _colors = require("../colors");
9
+ var comboBox = {
10
+ input: {
11
+ bg: 'gray[900]',
12
+ '&.is-disabled, &.is-read-only': {
13
+ bg: "".concat(_colors.colors.disabled, " !important")
14
+ }
15
+ }
16
+ };
17
+ var _default = exports["default"] = comboBox;
@@ -85,5 +85,13 @@ declare const _default: {
85
85
  };
86
86
  };
87
87
  };
88
+ comboBox: {
89
+ input: {
90
+ bg: string;
91
+ '&.is-disabled, &.is-read-only': {
92
+ bg: string;
93
+ };
94
+ };
95
+ };
88
96
  };
89
97
  export default _default;
@@ -15,6 +15,7 @@ _Object$defineProperty(exports, "__esModule", {
15
15
  exports.select = exports.radio = exports["default"] = exports.checkbox = void 0;
16
16
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
17
17
  var _onyxTokens = require("@pingux/onyx-tokens");
18
+ var _comboBox = _interopRequireDefault(require("./comboBox"));
18
19
  var _input = require("./input");
19
20
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
21
  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) { (0, _defineProperty2["default"])(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; }
@@ -88,5 +89,6 @@ var _default = exports["default"] = {
88
89
  select: _objectSpread(_objectSpread({}, select), {}, {
89
90
  option: _objectSpread({}, selectOption)
90
91
  }),
91
- "switch": switchable
92
+ "switch": switchable,
93
+ comboBox: _comboBox["default"]
92
94
  };
@@ -23,7 +23,7 @@ var listBox = {
23
23
  container: {
24
24
  backgroundColor: 'backgroundBase',
25
25
  border: '1px solid',
26
- borderColor: 'transparent',
26
+ borderColor: 'border.attachment',
27
27
  borderRadius: '4px'
28
28
  },
29
29
  option: {
@@ -2881,6 +2881,7 @@ declare const _default: {
2881
2881
  xs: string;
2882
2882
  tiny: string;
2883
2883
  sm: string;
2884
+ small: string;
2884
2885
  md: string;
2885
2886
  lg: string;
2886
2887
  xl: string;
@@ -5420,7 +5421,9 @@ declare const _default: {
5420
5421
  lineHeight: string;
5421
5422
  textTransform: string;
5422
5423
  letterSpacing: string;
5424
+ pl: string;
5423
5425
  ml: string;
5426
+ py: string;
5424
5427
  };
5425
5428
  };
5426
5429
  listView: {
@@ -5974,6 +5977,8 @@ declare const _default: {
5974
5977
  };
5975
5978
  popoverMenu: {
5976
5979
  container: {
5980
+ minWidth: string;
5981
+ boxShadow: string;
5977
5982
  transition: string;
5978
5983
  '&.animate': {
5979
5984
  opacity: number;
@@ -6001,6 +6006,7 @@ declare const _default: {
6001
6006
  };
6002
6007
  arrow: {
6003
6008
  color: string;
6009
+ fontSize: string;
6004
6010
  '&:before': {
6005
6011
  content: string;
6006
6012
  position: string;
@@ -6253,6 +6259,7 @@ declare const _default: {
6253
6259
  separator: {
6254
6260
  base: {
6255
6261
  bg: string;
6262
+ my: string;
6256
6263
  '&.is-vertical': {
6257
6264
  m: string;
6258
6265
  };
@@ -8,6 +8,7 @@ export declare const fontSizes: {
8
8
  xs: string;
9
9
  tiny: string;
10
10
  sm: string;
11
+ small: string;
11
12
  md: string;
12
13
  lg: string;
13
14
  xl: string;
@@ -21,6 +21,7 @@ var fontSizes = exports.fontSizes = {
21
21
  'xs': '11px',
22
22
  'tiny': "".concat(fontSize.tiny, "px"),
23
23
  'sm': "".concat(fontSize.small || fontSize.sm, "px"),
24
+ 'small': "".concat(fontSize.small, "px"),
24
25
  'md': "".concat(fontSizeBase * 1, "rem"),
25
26
  'lg': "".concat(fontSizeBase * 1.25, "rem"),
26
27
  'xl': "".concat(fontSizeBase * 1.5, "rem"),
@@ -10,6 +10,8 @@ var fontSizes = _onyxTokens.astroTokens["default"]['font-size'];
10
10
  var label = exports.label = {
11
11
  color: 'text.primary',
12
12
  fontSize: fontSizes.label,
13
+ mb: 'sm',
14
+ fontWeight: 'body',
13
15
  '&.is-float-label': {
14
16
  fontSize: fontSizes.label,
15
17
  fontWeight: 1,
@@ -1,5 +1,7 @@
1
1
  declare const _default: {
2
2
  container: {
3
+ minWidth: string;
4
+ boxShadow: string;
3
5
  transition: string;
4
6
  '&.animate': {
5
7
  opacity: number;
@@ -27,6 +29,7 @@ declare const _default: {
27
29
  };
28
30
  arrow: {
29
31
  color: string;
32
+ fontSize: string;
30
33
  '&:before': {
31
34
  content: string;
32
35
  position: string;
@@ -7,6 +7,8 @@ _Object$defineProperty(exports, "__esModule", {
7
7
  exports["default"] = void 0;
8
8
  var _onyxTokens = require("@pingux/onyx-tokens");
9
9
  var container = {
10
+ minWidth: '150px',
11
+ boxShadow: '0px 8px 16px 0px rgba(0, 0, 0, 0.176)',
10
12
  transition: 'opacity 200ms ease',
11
13
  '&.animate': {
12
14
  opacity: 0
@@ -34,6 +36,7 @@ var container = {
34
36
  };
35
37
  var arrow = {
36
38
  color: 'white',
39
+ fontSize: 'sm',
37
40
  '&:before': {
38
41
  content: '""',
39
42
  position: 'absolute',
@@ -841,7 +841,9 @@ declare const _default: {
841
841
  lineHeight: string;
842
842
  textTransform: string;
843
843
  letterSpacing: string;
844
+ pl: string;
844
845
  ml: string;
846
+ py: string;
845
847
  };
846
848
  };
847
849
  listView: {
@@ -1395,6 +1397,8 @@ declare const _default: {
1395
1397
  };
1396
1398
  popoverMenu: {
1397
1399
  container: {
1400
+ minWidth: string;
1401
+ boxShadow: string;
1398
1402
  transition: string;
1399
1403
  '&.animate': {
1400
1404
  opacity: number;
@@ -1422,6 +1426,7 @@ declare const _default: {
1422
1426
  };
1423
1427
  arrow: {
1424
1428
  color: string;
1429
+ fontSize: string;
1425
1430
  '&:before': {
1426
1431
  content: string;
1427
1432
  position: string;
@@ -1674,6 +1679,7 @@ declare const _default: {
1674
1679
  separator: {
1675
1680
  base: {
1676
1681
  bg: string;
1682
+ my: string;
1677
1683
  '&.is-vertical': {
1678
1684
  m: string;
1679
1685
  };
@@ -51,7 +51,7 @@ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymb
51
51
  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) { (0, _defineProperty2["default"])(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; }
52
52
  var fieldHelperText = {
53
53
  title: {
54
- fontSize: 'sm',
54
+ fontSize: 'small',
55
55
  pt: '0px !important',
56
56
  mt: '.25rem',
57
57
  '&.is-default': {
@@ -174,7 +174,7 @@ var listBox = {
174
174
  zIndex: 1
175
175
  },
176
176
  '&.is-selected': {
177
- color: 'text.primary',
177
+ color: 'black',
178
178
  bg: 'lightblue',
179
179
  pl: '.75rem',
180
180
  borderRadius: '4px',
@@ -204,17 +204,20 @@ var listBox = {
204
204
  },
205
205
  sectionTitle: {
206
206
  color: 'font.light',
207
- fontWeight: '1',
207
+ fontWeight: '0',
208
208
  fontSize: 'tiny',
209
209
  lineHeight: 'xs',
210
210
  textTransform: 'uppercase',
211
211
  letterSpacing: '1px',
212
- ml: 'md'
212
+ pl: 'xs',
213
+ ml: 'sm',
214
+ py: 'sm'
213
215
  }
214
216
  };
215
217
  var separator = {
216
218
  base: {
217
219
  bg: 'border.base',
220
+ my: 'sm',
218
221
  '&.is-vertical': {
219
222
  m: '0'
220
223
  }
@@ -27,7 +27,8 @@ var AccordionGridItemHeader = /*#__PURE__*/forwardRef(function (props, ref) {
27
27
  state = _useAccordionGridCont.state;
28
28
  var cellRef = useRef();
29
29
  var _useGetTheme = useGetTheme(),
30
- icons = _useGetTheme.icons;
30
+ icons = _useGetTheme.icons,
31
+ isOnyx = _useGetTheme.themeState.isOnyx;
31
32
  var MenuDown = icons.MenuDown,
32
33
  MenuUp = icons.MenuUp;
33
34
 
@@ -98,13 +99,16 @@ var AccordionGridItemHeader = /*#__PURE__*/forwardRef(function (props, ref) {
98
99
  sx: {
99
100
  mr: '0px'
100
101
  }
101
- }, ___EmotionJSX(Icon, {
102
+ }, ___EmotionJSX(Icon, _extends({
102
103
  color: "text.primary",
103
- icon: isSelected ? upArrow : downArrow,
104
+ icon: isSelected ? upArrow : downArrow
105
+ }, isOnyx && {
106
+ size: 'sm'
107
+ }, {
104
108
  title: {
105
109
  name: isSelected ? 'Menu Up Icon' : 'Menu Down Icon'
106
110
  }
107
- }))));
111
+ })))));
108
112
  });
109
113
  AccordionGridItemHeader.defaultProps = {
110
114
  hasCaret: true
@@ -34,7 +34,7 @@ var Avatar = /*#__PURE__*/forwardRef(function (props, ref) {
34
34
  isSquare = props.isSquare,
35
35
  isLogo = props.isLogo,
36
36
  others = _objectWithoutProperties(props, _excluded);
37
- var safeColorId = colorId || '_INTERNAL_DEFAULT_ID_';
37
+ var safeColorId = colorId || (defaultText && defaultText !== 'AA' ? defaultText : '_INTERNAL_DEFAULT_ID_');
38
38
  if (process.env.NODE_ENV !== 'production') {
39
39
  if (!src && !color && !colorId) {
40
40
  console.warn("[Astro] Avatar: No 'src', 'color', or 'colorId' provided. " + 'The component is falling back to a default generated color.');
@@ -22,7 +22,6 @@ var getComponent = function getComponent() {
22
22
  var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23
23
  return render(___EmotionJSX(Avatar, _extends({}, defaultProps, props)));
24
24
  };
25
- // Needs to be added to each components test file
26
25
  universalComponentTests({
27
26
  renderComponent: function renderComponent(props) {
28
27
  return ___EmotionJSX(Avatar, _extends({}, defaultProps, props));
@@ -42,7 +41,7 @@ test('an avatar is rendered with custom alt', function () {
42
41
  var img = screen.getByRole('img');
43
42
  expect(img).toHaveAttribute('alt', 'Custom Alt');
44
43
  });
45
- test('an avatar is rendered with custom alt', function () {
44
+ test('an avatar is rendered with initials', function () {
46
45
  var warnSpy = jest.spyOn(console, 'warn').mockImplementation();
47
46
  getComponent({
48
47
  src: undefined,
@@ -67,9 +66,6 @@ describe('getColorFromUUID', function () {
67
66
  test('distributes colors differently for different UUIDs', function () {
68
67
  var colorA = getColorFromUUID('id-1', colors);
69
68
  var colorB = getColorFromUUID('id-2', colors);
70
-
71
- // While collisions are mathematically possible, for 2 items in a 10-item list,
72
- // these specific IDs yield different results in FNV-1a.
73
69
  expect(colorA).not.toBe(colorB);
74
70
  });
75
71
  test('throws error if color array is empty', function () {
@@ -83,8 +79,6 @@ describe('getColorFromUUID', function () {
83
79
  colorId: 'some-id'
84
80
  });
85
81
  var avatar = screen.getByTestId(datatestId);
86
-
87
- // Checking for 'is-blue'
88
82
  expect(avatar).toHaveClass('is-blue');
89
83
  });
90
84
  test('applies a hashed color class from colorId', function () {
@@ -93,9 +87,6 @@ describe('getColorFromUUID', function () {
93
87
  colorId: uuid
94
88
  });
95
89
  var avatar = screen.getByTestId(datatestId);
96
-
97
- // We check that it has *a* class starting with 'is-'
98
- // and specifically isn't the default 'is-green'
99
90
  var classList = _Array$from(avatar.classList);
100
91
  var colorClass = _findInstanceProperty(classList).call(classList, function (cls) {
101
92
  return _startsWithInstanceProperty(cls).call(cls, 'is-');
@@ -168,27 +159,40 @@ describe('getColorFromUUID Distribution', function () {
168
159
  test('distributes 10,000 UUIDs evenly across 10 colors', function () {
169
160
  var iterations = 10000;
170
161
  var distribution = {};
171
-
172
- // Initialize counts
173
162
  _forEachInstanceProperty(colors).call(colors, function (c) {
174
163
  distribution[c] = 0;
175
164
  });
176
-
177
- // Generate and hash
178
165
  for (var i = 0; i < iterations; i += 1) {
179
- // Use the imported randomUUID function directly
180
166
  var uuid = randomUUID();
181
167
  var selectedColor = getColorFromUUID(uuid, colors);
182
168
  distribution[selectedColor] += 1;
183
169
  }
184
170
  var expectedMean = iterations / colors.length;
185
- // 15% variance is a safe threshold for 10k iterations
186
171
  var allowedVariance = 0.15;
187
172
  _forEachInstanceProperty(colors).call(colors, function (color) {
188
173
  var count = distribution[color];
189
- // Assert that each color is roughly 10% of the total
190
174
  expect(count).toBeGreaterThan(expectedMean * (1 - allowedVariance));
191
175
  expect(count).toBeLessThan(expectedMean * (1 + allowedVariance));
192
176
  });
193
177
  });
178
+ });
179
+ describe('Color Selection Logic', function () {
180
+ var getResolvedId = function getResolvedId(colorId, defaultText) {
181
+ return colorId || (defaultText && defaultText !== 'AA' ? defaultText : '_INTERNAL_DEFAULT_ID_');
182
+ };
183
+ test('should use colorId if it is provided', function () {
184
+ expect(getResolvedId('custom-id', 'BB')).toBe('custom-id');
185
+ });
186
+ test('should use defaultText if colorId is missing and text is not "AA"', function () {
187
+ expect(getResolvedId(null, 'BB')).toBe('BB');
188
+ });
189
+ test('should use hardcoded string if colorId is missing and text is "AA"', function () {
190
+ expect(getResolvedId(undefined, 'AA')).toBe('_INTERNAL_DEFAULT_ID_');
191
+ });
192
+ test('should use hardcoded string if both colorId and defaultText are null', function () {
193
+ expect(getResolvedId(null, null)).toBe('_INTERNAL_DEFAULT_ID_');
194
+ });
195
+ test('should use hardcoded string if colorId is missing and defaultText is empty string', function () {
196
+ expect(getResolvedId(null, '')).toBe('_INTERNAL_DEFAULT_ID_');
197
+ });
194
198
  });
@@ -12,7 +12,8 @@ var ColorFieldPreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
12
12
  colorValue = props.colorValue,
13
13
  others = _objectWithoutProperties(props, _excluded);
14
14
  var _useGetTheme = useGetTheme(),
15
- icons = _useGetTheme.icons;
15
+ icons = _useGetTheme.icons,
16
+ isOnyx = _useGetTheme.themeState.isOnyx;
16
17
  var MenuUp = icons.MenuUp,
17
18
  MenuDown = icons.MenuDown;
18
19
  var buttonRef = useLocalOrForwardRef(ref);
@@ -40,12 +41,14 @@ var ColorFieldPreviewButton = /*#__PURE__*/forwardRef(function (props, ref) {
40
41
  ml: 'auto'
41
42
  },
42
43
  flexGrow: "1"
43
- }, ___EmotionJSX(Icon, {
44
+ }, ___EmotionJSX(Icon, _extends({
44
45
  ml: "auto",
45
46
  title: {
46
47
  name: isOpen ? 'menu-up' : 'menu-down'
47
48
  },
48
49
  icon: isOpen ? MenuUp : MenuDown
49
- }))));
50
+ }, isOnyx && {
51
+ size: 'sm'
52
+ })))));
50
53
  });
51
54
  export default ColorFieldPreviewButton;
@@ -51,7 +51,8 @@ var ComboBoxInput = /*#__PURE__*/forwardRef(function (props, ref) {
51
51
  containerProps: containerProps
52
52
  }, mergeProps(inputProps, others));
53
53
  var _useGetTheme = useGetTheme(),
54
- icons = _useGetTheme.icons;
54
+ icons = _useGetTheme.icons,
55
+ isOnyx = _useGetTheme.themeState.isOnyx;
55
56
  var MenuDown = icons.MenuDown;
56
57
 
57
58
  // istanbul ignore next
@@ -72,9 +73,11 @@ var ComboBoxInput = /*#__PURE__*/forwardRef(function (props, ref) {
72
73
  variant: "forms.comboBox.inputInContainerSlot"
73
74
  },
74
75
  // Render loader after delay if filtering or loading
75
- isLoading && (isOpen || menuTrigger === 'manual' || loadingState === loadingStates.LOADING) && ___EmotionJSX(Loader, {
76
+ isLoading && (isOpen || menuTrigger === 'manual' || loadingState === loadingStates.LOADING) && ___EmotionJSX(Loader, _extends({
76
77
  variant: "loader.withinInput"
77
- }), ___EmotionJSX(PressResponder, {
78
+ }, isOnyx && {
79
+ size: 'sm'
80
+ })), ___EmotionJSX(PressResponder, {
78
81
  preventFocusOnPress: true,
79
82
  isPressed: isOpen
80
83
  }, ___EmotionJSX(Button, _extends({
@@ -85,7 +88,7 @@ var ComboBoxInput = /*#__PURE__*/forwardRef(function (props, ref) {
85
88
  tabIndex: -1
86
89
  }), ___EmotionJSX(Icon, {
87
90
  icon: MenuDown,
88
- size: "md",
91
+ size: isOnyx ? 'sm' : 'md',
89
92
  sx: isOpen ? {
90
93
  transform: 'rotate(180deg)'
91
94
  } : null,
@@ -132,7 +132,6 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
132
132
  }, ___EmotionJSX(Icon, {
133
133
  icon: isSelected ? CheckedIcon : UncheckedIcon,
134
134
  color: "active",
135
- size: "24px",
136
135
  mr: "xs",
137
136
  className: classNames,
138
137
  variant: "listBox.checkboxIcon"
@@ -146,7 +145,8 @@ var Option = /*#__PURE__*/forwardRef(function (props, ref) {
146
145
  title: {
147
146
  name: 'Check Icon'
148
147
  },
149
- color: "green-500"
148
+ color: "green-500",
149
+ size: isOnyx ? 'xsm' : 'md'
150
150
  }));
151
151
  });
152
152
  Option.defaultProps = {
@@ -21,7 +21,8 @@ var ListViewExpandableItem = function ListViewExpandableItem(props) {
21
21
  isFocusable = props.isFocusable,
22
22
  className = props.className;
23
23
  var _useGetTheme = useGetTheme(),
24
- icons = _useGetTheme.icons;
24
+ icons = _useGetTheme.icons,
25
+ isOnyx = _useGetTheme.themeState.isOnyx;
25
26
  var MenuDown = icons.MenuDown,
26
27
  MenuUp = icons.MenuUp;
27
28
  var _useContext = useContext(ListViewContext),
@@ -63,7 +64,7 @@ var ListViewExpandableItem = function ListViewExpandableItem(props) {
63
64
  alignItems: 'center',
64
65
  width: '100%'
65
66
  }
66
- }, item.rendered && item.rendered[0], ___EmotionJSX(Icon, {
67
+ }, item.rendered && item.rendered[0], ___EmotionJSX(Icon, _extends({
67
68
  sx: {
68
69
  ml: 'auto'
69
70
  },
@@ -72,7 +73,9 @@ var ListViewExpandableItem = function ListViewExpandableItem(props) {
72
73
  title: {
73
74
  name: "".concat(key, " expand icon button")
74
75
  }
75
- }))), ___EmotionJSX(Box, expandableItemState.gridCellProps, isExpanded && ___EmotionJSX(ListViewFocusWrapper, {
76
+ }, isOnyx && {
77
+ size: 'sm'
78
+ })))), ___EmotionJSX(Box, expandableItemState.gridCellProps, isExpanded && ___EmotionJSX(ListViewFocusWrapper, {
76
79
  isFocusEscaped: isFocusEscaped,
77
80
  containerProps: expandableContainerProps
78
81
  }, item.rendered && item.rendered[1])));
@@ -26,7 +26,7 @@ var withinInput = {
26
26
  var withinListbox = {
27
27
  color: 'active',
28
28
  fontSize: '6px',
29
- padding: 'md',
29
+ padding: 'sm',
30
30
  alignItems: 'center',
31
31
  justifyContent: 'center'
32
32
  };
@@ -95,7 +95,8 @@ var CondensedMultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
95
95
  var inputRef = useRef();
96
96
  var buttonRef = useRef();
97
97
  var _useGetTheme = useGetTheme(),
98
- icons = _useGetTheme.icons;
98
+ icons = _useGetTheme.icons,
99
+ isOnyx = _useGetTheme.themeState.isOnyx;
99
100
  var MenuDown = icons.MenuDown,
100
101
  MenuUp = icons.MenuUp;
101
102
  var _useFocusWithin = useFocusWithin({
@@ -382,12 +383,15 @@ var CondensedMultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
382
383
  sx: {
383
384
  border: 'none'
384
385
  }
385
- }, ___EmotionJSX(Icon, {
386
- icon: isOpen ? MenuUp : MenuDown,
386
+ }, ___EmotionJSX(Icon, _extends({
387
+ icon: isOpen ? MenuUp : MenuDown
388
+ }, isOnyx && {
389
+ size: 'sm'
390
+ }, {
387
391
  title: {
388
392
  name: isOpen ? 'Menu Up Icon' : 'Menu Down Icon'
389
393
  }
390
- })));
394
+ }))));
391
395
  return ___EmotionJSX(MultivaluesContext.Provider, {
392
396
  value: setActiveDescendant
393
397
  }, ___EmotionJSX(Box, mergeProps(containerProps, focusWithinProps), ___EmotionJSX(TextField, _extends({
@@ -29,7 +29,8 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
29
29
  var navBarState = useNavBarContext();
30
30
  var _useGetTheme = useGetTheme(),
31
31
  icons = _useGetTheme.icons,
32
- navBarIconSize = _useGetTheme.navBarIconSize;
32
+ navBarIconSize = _useGetTheme.navBarIconSize,
33
+ isOnyx = _useGetTheme.themeState.isOnyx;
33
34
  var MenuDown = icons.MenuDown,
34
35
  MenuUp = icons.MenuUp;
35
36
  var selectedKey = navBarState.selectedKey,
@@ -85,7 +86,7 @@ var NavBarSectionItemHeader = function NavBarSectionItemHeader(_ref2) {
85
86
  }
86
87
  }, ___EmotionJSX(Icon, {
87
88
  icon: isExpanded ? MenuUp : MenuDown,
88
- size: "xsm",
89
+ size: isOnyx ? 'sm' : 'xsm',
89
90
  sx: {
90
91
  color: getIconColor(),
91
92
  fill: getIconColor()
@@ -20,7 +20,7 @@ import omit from 'lodash/omit';
20
20
  import PropTypes from 'prop-types';
21
21
  import { v4 as uuid } from 'uuid';
22
22
  import { Box, FieldHelperText, Icon, IconButton, Input, Label } from '../..';
23
- import { useField, usePropWarning } from '../../hooks';
23
+ import { useField, useGetTheme, usePropWarning } from '../../hooks';
24
24
  import { getPendoID } from '../../utils/devUtils/constants/pendoID';
25
25
  import { ariaAttributesBasePropTypes } from '../../utils/docUtils/ariaAttributes';
26
26
  import { inputFieldAttributesBasePropTypes } from '../../utils/docUtils/fieldAttributes';
@@ -31,6 +31,8 @@ var NumberField = /*#__PURE__*/forwardRef(function (props, ref) {
31
31
  status = props.status;
32
32
  var _useLocale = useLocale(),
33
33
  locale = _useLocale.locale;
34
+ var _useGetTheme = useGetTheme(),
35
+ isOnyx = _useGetTheme.themeState.isOnyx;
34
36
  var state = useNumberFieldState(_objectSpread(_objectSpread({}, props), {}, {
35
37
  locale: locale
36
38
  }));
@@ -61,7 +63,7 @@ var NumberField = /*#__PURE__*/forwardRef(function (props, ref) {
61
63
  p: 0
62
64
  }), ___EmotionJSX(Icon, {
63
65
  icon: MenuUp,
64
- size: 18,
66
+ size: isOnyx ? 'sm' : 18,
65
67
  title: {
66
68
  name: 'Menu Up Icon'
67
69
  }
@@ -71,7 +73,7 @@ var NumberField = /*#__PURE__*/forwardRef(function (props, ref) {
71
73
  p: 0
72
74
  }), ___EmotionJSX(Icon, {
73
75
  icon: MenuDown,
74
- size: 18,
76
+ size: isOnyx ? 'sm' : 18,
75
77
  title: {
76
78
  name: 'Menu Down Icon'
77
79
  }
@@ -51,7 +51,6 @@ var PanelHeader = /*#__PURE__*/forwardRef(function (_ref, ref) {
51
51
  }
52
52
  }));
53
53
  var renderAvatar = ___EmotionJSX(Avatar, _extends({
54
- color: image !== null && image !== void 0 && image.src ? false : 'green',
55
54
  src: image === null || image === void 0 ? void 0 : image.src,
56
55
  isSquare: !!(image !== null && image !== void 0 && image.src),
57
56
  size: "avatar.lg",
@@ -60,7 +60,8 @@ var SelectFieldBase = /*#__PURE__*/forwardRef(function (props, ref) {
60
60
  var _getAriaAttributeProp = getAriaAttributeProps(others),
61
61
  ariaProps = _getAriaAttributeProp.ariaProps;
62
62
  var _useGetTheme = useGetTheme(),
63
- icons = _useGetTheme.icons;
63
+ icons = _useGetTheme.icons,
64
+ isOnyx = _useGetTheme.themeState.isOnyx;
64
65
  var MenuDown = icons.MenuDown,
65
66
  MenuUp = icons.MenuUp;
66
67
  var helperTextId = useMemo(function () {
@@ -81,7 +82,7 @@ var SelectFieldBase = /*#__PURE__*/forwardRef(function (props, ref) {
81
82
  title: {
82
83
  name: 'Menu down'
83
84
  },
84
- size: "md"
85
+ size: isOnyx ? 'sm' : 'md'
85
86
  }));
86
87
  var clearButton = hasClearButton && state.selectedKey && ___EmotionJSX(IconButton, _extends({
87
88
  tabIndex: 0,
@@ -0,0 +1,10 @@
1
+ import { colors } from '../colors';
2
+ var comboBox = {
3
+ input: {
4
+ bg: 'gray[900]',
5
+ '&.is-disabled, &.is-read-only': {
6
+ bg: "".concat(colors.disabled, " !important")
7
+ }
8
+ }
9
+ };
10
+ export default comboBox;
@@ -10,6 +10,7 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
10
10
  function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
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 { astroTokensDark } from '@pingux/onyx-tokens';
13
+ import comboBox from './comboBox';
13
14
  import { input } from './input';
14
15
  export var select = {
15
16
  backgroundColor: 'backgroundBase',
@@ -81,5 +82,6 @@ export default {
81
82
  select: _objectSpread(_objectSpread({}, select), {}, {
82
83
  option: _objectSpread({}, selectOption)
83
84
  }),
84
- "switch": switchable
85
+ "switch": switchable,
86
+ comboBox: comboBox
85
87
  };
@@ -15,7 +15,7 @@ var listBox = {
15
15
  container: {
16
16
  backgroundColor: 'backgroundBase',
17
17
  border: '1px solid',
18
- borderColor: 'transparent',
18
+ borderColor: 'border.attachment',
19
19
  borderRadius: '4px'
20
20
  },
21
21
  option: {
@@ -13,6 +13,7 @@ export var fontSizes = {
13
13
  'xs': '11px',
14
14
  'tiny': "".concat(fontSize.tiny, "px"),
15
15
  'sm': "".concat(fontSize.small || fontSize.sm, "px"),
16
+ 'small': "".concat(fontSize.small, "px"),
16
17
  'md': "".concat(fontSizeBase * 1, "rem"),
17
18
  'lg': "".concat(fontSizeBase * 1.25, "rem"),
18
19
  'xl': "".concat(fontSizeBase * 1.5, "rem"),
@@ -3,6 +3,8 @@ var fontSizes = astroTokens["default"]['font-size'];
3
3
  export var label = {
4
4
  color: 'text.primary',
5
5
  fontSize: fontSizes.label,
6
+ mb: 'sm',
7
+ fontWeight: 'body',
6
8
  '&.is-float-label': {
7
9
  fontSize: fontSizes.label,
8
10
  fontWeight: 1,
@@ -1,5 +1,7 @@
1
1
  import { astroTokens } from '@pingux/onyx-tokens';
2
2
  var container = {
3
+ minWidth: '150px',
4
+ boxShadow: '0px 8px 16px 0px rgba(0, 0, 0, 0.176)',
3
5
  transition: 'opacity 200ms ease',
4
6
  '&.animate': {
5
7
  opacity: 0
@@ -27,6 +29,7 @@ var container = {
27
29
  };
28
30
  var arrow = {
29
31
  color: 'white',
32
+ fontSize: 'sm',
30
33
  '&:before': {
31
34
  content: '""',
32
35
  position: 'absolute',
@@ -41,7 +41,7 @@ import { menuTab, tab, tabs } from './tabs';
41
41
  import tooltip from './tooltip';
42
42
  var fieldHelperText = {
43
43
  title: {
44
- fontSize: 'sm',
44
+ fontSize: 'small',
45
45
  pt: '0px !important',
46
46
  mt: '.25rem',
47
47
  '&.is-default': {
@@ -164,7 +164,7 @@ var listBox = {
164
164
  zIndex: 1
165
165
  },
166
166
  '&.is-selected': {
167
- color: 'text.primary',
167
+ color: 'black',
168
168
  bg: 'lightblue',
169
169
  pl: '.75rem',
170
170
  borderRadius: '4px',
@@ -194,17 +194,20 @@ var listBox = {
194
194
  },
195
195
  sectionTitle: {
196
196
  color: 'font.light',
197
- fontWeight: '1',
197
+ fontWeight: '0',
198
198
  fontSize: 'tiny',
199
199
  lineHeight: 'xs',
200
200
  textTransform: 'uppercase',
201
201
  letterSpacing: '1px',
202
- ml: 'md'
202
+ pl: 'xs',
203
+ ml: 'sm',
204
+ py: 'sm'
203
205
  }
204
206
  };
205
207
  var separator = {
206
208
  base: {
207
209
  bg: 'border.base',
210
+ my: 'sm',
208
211
  '&.is-vertical': {
209
212
  m: '0'
210
213
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.184.0-alpha.0",
3
+ "version": "2.186.0-alpha.0",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",