@pingux/astro 2.199.0-alpha.0 → 2.200.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.
- package/lib/cjs/components/Button/Buttons.styles.d.ts +86 -0
- package/lib/cjs/components/Button/Buttons.styles.js +12 -2
- package/lib/cjs/components/Icon/IconSymbol.js +1 -1
- package/lib/cjs/components/Icon/IconSymbol.test.js +8 -1
- package/lib/cjs/components/Icon/MaterialSymbolIcon.stories.js +133 -135
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +15 -12
- package/lib/cjs/components/ListBox/ListBoxSection.js +1 -3
- package/lib/cjs/components/ListBox/Option.js +1 -1
- package/lib/cjs/components/Separator/Separator.styles.js +2 -2
- package/lib/cjs/components/Text/Text.styles.d.ts +11 -0
- package/lib/cjs/components/Text/Text.styles.js +12 -7
- package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +2 -0
- package/lib/cjs/index.d.ts +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/menu.d.ts +1 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/menu.js +1 -2
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.d.ts +3 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +3 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +2 -5
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +1 -3
- package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/astro/customProperties/index.js +3 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/customSizes.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/customSizes.js +3 -1
- package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +1 -0
- package/lib/cjs/styles/themes/next-gen/customProperties/index.js +1 -1
- package/lib/cjs/styles/themes/next-gen/forms.d.ts +2 -4
- package/lib/cjs/styles/themes/next-gen/forms.js +1 -2
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +46 -17
- package/lib/cjs/styles/themes/next-gen/variants/button.d.ts +25 -1
- package/lib/cjs/styles/themes/next-gen/variants/button.js +23 -2
- package/lib/cjs/styles/themes/next-gen/variants/menu.d.ts +0 -2
- package/lib/cjs/styles/themes/next-gen/variants/menu.js +1 -3
- package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.d.ts +3 -0
- package/lib/cjs/styles/themes/next-gen/variants/popoverMenu.js +4 -1
- package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +7 -0
- package/lib/cjs/styles/themes/next-gen/variants/text.js +8 -1
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +13 -14
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +10 -12
- package/lib/cjs/types/icon.d.ts +1 -1
- package/lib/cjs/types/navBar.d.ts +1 -1
- package/lib/cjs/utils/docUtils/iconSizeProps.d.ts +10 -2
- package/lib/cjs/utils/docUtils/iconSizeProps.js +17 -5
- package/lib/components/Button/Buttons.styles.js +11 -1
- package/lib/components/Icon/IconSymbol.js +1 -1
- package/lib/components/Icon/IconSymbol.test.js +8 -1
- package/lib/components/Icon/MaterialSymbolIcon.stories.js +131 -134
- package/lib/components/LinkSelectField/LinkSelectField.js +14 -11
- package/lib/components/ListBox/ListBoxSection.js +1 -3
- package/lib/components/ListBox/Option.js +1 -1
- package/lib/components/Separator/Separator.styles.js +2 -2
- package/lib/components/Text/Text.styles.js +12 -7
- package/lib/index.js +1 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/buttons.js +1 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/menu.js +1 -2
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +3 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +1 -3
- package/lib/styles/themes/astro/customProperties/index.js +3 -1
- package/lib/styles/themes/next-gen/customProperties/customSizes.js +3 -1
- package/lib/styles/themes/next-gen/customProperties/index.js +1 -1
- package/lib/styles/themes/next-gen/forms.js +1 -2
- package/lib/styles/themes/next-gen/variants/button.js +23 -2
- package/lib/styles/themes/next-gen/variants/menu.js +1 -3
- package/lib/styles/themes/next-gen/variants/popoverMenu.js +4 -1
- package/lib/styles/themes/next-gen/variants/text.js +8 -1
- package/lib/styles/themes/next-gen/variants/variants.js +10 -12
- package/lib/utils/docUtils/iconSizeProps.js +17 -5
- package/package.json +2 -2
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import PropTypes from 'prop-types';
|
|
2
2
|
export declare const sizeArgTypes: {
|
|
3
3
|
size: {
|
|
4
|
-
control:
|
|
4
|
+
control: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
options: readonly ["xxs", "xs", "sm", "md"];
|
|
5
8
|
description: string;
|
|
9
|
+
table: {
|
|
10
|
+
type: {
|
|
11
|
+
summary: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
6
14
|
};
|
|
7
15
|
};
|
|
8
16
|
export declare const sizePropTypes: {
|
|
9
|
-
size: PropTypes.Requireable<
|
|
17
|
+
size: PropTypes.Requireable<"xxs" | "xs" | "sm" | "md">;
|
|
10
18
|
};
|
|
@@ -6,15 +6,27 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.sizePropTypes = exports.sizeArgTypes = void 0;
|
|
9
|
-
var
|
|
9
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
|
10
|
+
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
10
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var
|
|
12
|
+
var _context;
|
|
13
|
+
var iconSizes = ['xxs', 'xs', 'sm', 'md'];
|
|
12
14
|
var sizeArgTypes = exports.sizeArgTypes = {
|
|
13
15
|
size: {
|
|
14
|
-
control:
|
|
15
|
-
|
|
16
|
+
control: {
|
|
17
|
+
type: 'select'
|
|
18
|
+
},
|
|
19
|
+
options: iconSizes,
|
|
20
|
+
description: 'The size of the icon. Accepts a t-shirt size ("xxs", "xs", "sm", "md") or a number value in pixels. Rendered pixel size may vary by theme.',
|
|
21
|
+
table: {
|
|
22
|
+
type: {
|
|
23
|
+
summary: (0, _map["default"])(iconSizes).call(iconSizes, function (k) {
|
|
24
|
+
return "\"".concat(k, "\"");
|
|
25
|
+
}).join(' | ')
|
|
26
|
+
}
|
|
27
|
+
}
|
|
16
28
|
}
|
|
17
29
|
};
|
|
18
30
|
var sizePropTypes = exports.sizePropTypes = {
|
|
19
|
-
size: _propTypes["default"].oneOf((0,
|
|
31
|
+
size: _propTypes["default"].oneOf((0, _concat["default"])(_context = []).call(_context, iconSizes))
|
|
20
32
|
};
|
|
@@ -174,6 +174,15 @@ export var link = _objectSpread(_objectSpread({}, text), {}, {
|
|
|
174
174
|
},
|
|
175
175
|
'&.is-focused': _objectSpread({}, focusWithCroppedOutline)
|
|
176
176
|
});
|
|
177
|
+
export var selectLink = _objectSpread(_objectSpread({}, link), {}, {
|
|
178
|
+
textDecoration: 'none',
|
|
179
|
+
'&.is-hovered': {
|
|
180
|
+
textDecoration: 'none'
|
|
181
|
+
},
|
|
182
|
+
'&.is-pressed': {
|
|
183
|
+
textDecoration: 'none'
|
|
184
|
+
}
|
|
185
|
+
});
|
|
177
186
|
var listBoxLink = _objectSpread({}, link);
|
|
178
187
|
var defaultVariant = _objectSpread(_objectSpread({}, base), {}, {
|
|
179
188
|
bg: 'white',
|
|
@@ -328,5 +337,6 @@ export default {
|
|
|
328
337
|
success: success,
|
|
329
338
|
withIcon: withIcon,
|
|
330
339
|
filter: filter,
|
|
331
|
-
searchNavTabLabel: tabLabelButton
|
|
340
|
+
searchNavTabLabel: tabLabelButton,
|
|
341
|
+
selectLink: selectLink
|
|
332
342
|
};
|
|
@@ -42,7 +42,7 @@ var IconSymbol = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
42
42
|
sx: _objectSpread(_objectSpread({}, rest.sx), {}, {
|
|
43
43
|
color: color,
|
|
44
44
|
fontSize: sizeProps.size,
|
|
45
|
-
fontVariationSettings: hasFill ? "'FILL' 1" : "'FILL' 0"
|
|
45
|
+
fontVariationSettings: hasFill ? "'FILL' 1, 'opsz' 24" : "'FILL' 0, 'opsz' 24"
|
|
46
46
|
})
|
|
47
47
|
}), icon);
|
|
48
48
|
});
|
|
@@ -60,7 +60,14 @@ test('hasFill prop', function () {
|
|
|
60
60
|
hasFill: true
|
|
61
61
|
});
|
|
62
62
|
var icon = screen.getByTestId(testId);
|
|
63
|
-
expect(icon).toHaveStyle("font-variation-settings: 'FILL' 1");
|
|
63
|
+
expect(icon).toHaveStyle("font-variation-settings: 'FILL' 1,'opsz' 24");
|
|
64
|
+
});
|
|
65
|
+
test('no hasFill prop', function () {
|
|
66
|
+
getComponent({
|
|
67
|
+
hasFill: false
|
|
68
|
+
});
|
|
69
|
+
var icon = screen.getByTestId(testId);
|
|
70
|
+
expect(icon).toHaveStyle("font-variation-settings: 'FILL' 0,'opsz' 24");
|
|
64
71
|
});
|
|
65
72
|
test('title prop', function () {
|
|
66
73
|
getComponent();
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
2
2
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
3
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
4
3
|
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
|
5
4
|
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
|
6
5
|
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
|
7
6
|
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
|
8
7
|
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
|
9
|
-
import
|
|
8
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
10
9
|
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
|
10
|
+
var _context6;
|
|
11
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
12
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
13
|
+
import _Object$entries from "@babel/runtime-corejs3/core-js-stable/object/entries";
|
|
14
|
+
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
11
15
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
12
16
|
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; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
17
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context8 = ownKeys(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context9 = ownKeys(Object(t))).call(_context9, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
18
|
import React from 'react';
|
|
15
19
|
import DocsLayout from '../../../.storybook/storybookDocsLayout';
|
|
20
|
+
import { useGetTheme } from '../../hooks';
|
|
16
21
|
import { Box, Icon, Table, TableBody, TableCell, TableHead, TableRow, Text } from '../../index';
|
|
17
22
|
import { FIGMA_LINKS } from '../../utils/designUtils/figmaLinks';
|
|
18
23
|
import { sizeArgTypes } from '../../utils/docUtils/iconSizeProps';
|
|
@@ -32,22 +37,24 @@ export default {
|
|
|
32
37
|
control: {
|
|
33
38
|
type: 'text'
|
|
34
39
|
},
|
|
35
|
-
description: 'The font icon to render. List of font icons at https://marella.github.io/material-symbols/demo/'
|
|
40
|
+
description: 'The font icon to render. List of font icons at https://marella.github.io/material-symbols/demo/',
|
|
41
|
+
table: {
|
|
42
|
+
type: {
|
|
43
|
+
summary: 'string'
|
|
44
|
+
}
|
|
45
|
+
}
|
|
36
46
|
}
|
|
37
47
|
}, sizeArgTypes),
|
|
38
48
|
args: {
|
|
39
|
-
icon: '
|
|
40
|
-
|
|
41
|
-
size: 'md'
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
export var Default = function Default(args) {
|
|
45
|
-
return ___EmotionJSX(Icon, _extends({}, args, {
|
|
46
|
-
icon: "search",
|
|
49
|
+
icon: 'search',
|
|
50
|
+
size: 'md',
|
|
47
51
|
title: {
|
|
48
52
|
name: 'Search Icon'
|
|
49
53
|
}
|
|
50
|
-
}
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
export var Default = function Default(args) {
|
|
57
|
+
return ___EmotionJSX(Icon, args);
|
|
51
58
|
};
|
|
52
59
|
Default.parameters = {
|
|
53
60
|
design: {
|
|
@@ -55,141 +62,131 @@ Default.parameters = {
|
|
|
55
62
|
url: FIGMA_LINKS.icon["default"]
|
|
56
63
|
}
|
|
57
64
|
};
|
|
65
|
+
var iconSizes = ['xxs', 'xs', 'sm', 'md'];
|
|
66
|
+
var iconNumericSizes = ['icon-50', 'icon-100', 'icon-200', 'icon-300', 'icon-400', 'icon-500', 'icon-600', 'icon-700', 'icon-800', 'icon-900'];
|
|
58
67
|
var rowHeadings = ['Size', 'Code Example', 'Icon Example'];
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
key: head
|
|
66
|
-
}, head);
|
|
67
|
-
}))), ___EmotionJSX(TableBody, {
|
|
68
|
-
sx: {
|
|
69
|
-
borderBottom: 'unset'
|
|
70
|
-
}
|
|
71
|
-
}, ___EmotionJSX(TableRow, {
|
|
72
|
-
height: "80px",
|
|
73
|
-
bg: "transparent !important"
|
|
74
|
-
}, ___EmotionJSX(TableCell, {
|
|
75
|
-
justifyContent: "center"
|
|
76
|
-
}, ___EmotionJSX(Text, null, "XXS | 9px")), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
|
77
|
-
fontFamily: "monospace"
|
|
78
|
-
}, '<Icon icon="search" size="xxs"/>')), ___EmotionJSX(TableCell, {
|
|
79
|
-
justifyContent: "center"
|
|
80
|
-
}, ___EmotionJSX(Icon, {
|
|
81
|
-
icon: "search",
|
|
82
|
-
title: {
|
|
83
|
-
name: 'Search Icon'
|
|
84
|
-
},
|
|
85
|
-
size: "xxs"
|
|
86
|
-
}))), ___EmotionJSX(TableRow, {
|
|
68
|
+
var SizeRow = function SizeRow(_ref) {
|
|
69
|
+
var _context;
|
|
70
|
+
var size = _ref.size,
|
|
71
|
+
px = _ref.px;
|
|
72
|
+
return ___EmotionJSX(TableRow, {
|
|
73
|
+
key: size,
|
|
87
74
|
height: "80px",
|
|
88
75
|
bg: "transparent !important"
|
|
89
76
|
}, ___EmotionJSX(TableCell, {
|
|
90
77
|
justifyContent: "center"
|
|
91
|
-
}, ___EmotionJSX(Text, null, "
|
|
78
|
+
}, ___EmotionJSX(Text, null, _concatInstanceProperty(_context = "".concat(size.toUpperCase(), " | ")).call(_context, px))), ___EmotionJSX(TableCell, null, ___EmotionJSX(Text, {
|
|
92
79
|
fontFamily: "monospace"
|
|
93
|
-
},
|
|
80
|
+
}, "<Icon icon=\"search\" size=\"".concat(size, "\" />"))), ___EmotionJSX(TableCell, {
|
|
94
81
|
justifyContent: "center"
|
|
95
82
|
}, ___EmotionJSX(Icon, {
|
|
96
83
|
icon: "search",
|
|
97
|
-
size:
|
|
84
|
+
size: size,
|
|
98
85
|
title: {
|
|
99
86
|
name: 'Search Icon'
|
|
100
87
|
}
|
|
101
|
-
})))
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
88
|
+
})));
|
|
89
|
+
};
|
|
90
|
+
export var Sizes = function Sizes() {
|
|
91
|
+
var _context2, _context4;
|
|
92
|
+
var theme = useGetTheme();
|
|
93
|
+
var tShirtRows = _filterInstanceProperty(_context2 = _Object$entries(theme.tShirtSizes)).call(_context2, function (_ref2) {
|
|
94
|
+
var _context3;
|
|
95
|
+
var _ref3 = _slicedToArray(_ref2, 1),
|
|
96
|
+
size = _ref3[0];
|
|
97
|
+
return _includesInstanceProperty(_context3 = iconSizes).call(_context3, size);
|
|
98
|
+
});
|
|
99
|
+
var numericRows = _filterInstanceProperty(_context4 = _Object$entries(theme.tShirtSizes)).call(_context4, function (_ref4) {
|
|
100
|
+
var _context5;
|
|
101
|
+
var _ref5 = _slicedToArray(_ref4, 1),
|
|
102
|
+
size = _ref5[0];
|
|
103
|
+
return _includesInstanceProperty(_context5 = iconNumericSizes).call(_context5, size);
|
|
104
|
+
});
|
|
105
|
+
return ___EmotionJSX(Table, null, ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
|
106
|
+
key: "head"
|
|
107
|
+
}, _mapInstanceProperty(rowHeadings).call(rowHeadings, function (head) {
|
|
108
|
+
return ___EmotionJSX(TableCell, {
|
|
109
|
+
isHeading: true,
|
|
110
|
+
key: head
|
|
111
|
+
}, head);
|
|
112
|
+
}))), ___EmotionJSX(TableBody, {
|
|
113
|
+
sx: {
|
|
114
|
+
borderBottom: 'unset'
|
|
115
115
|
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
116
|
+
}, _mapInstanceProperty(tShirtRows).call(tShirtRows, function (_ref6) {
|
|
117
|
+
var _ref7 = _slicedToArray(_ref6, 2),
|
|
118
|
+
size = _ref7[0],
|
|
119
|
+
px = _ref7[1];
|
|
120
|
+
return ___EmotionJSX(SizeRow, {
|
|
121
|
+
key: size,
|
|
122
|
+
size: size,
|
|
123
|
+
px: px
|
|
124
|
+
});
|
|
125
|
+
}), _mapInstanceProperty(numericRows).call(numericRows, function (_ref8) {
|
|
126
|
+
var _ref9 = _slicedToArray(_ref8, 2),
|
|
127
|
+
size = _ref9[0],
|
|
128
|
+
px = _ref9[1];
|
|
129
|
+
return ___EmotionJSX(SizeRow, {
|
|
130
|
+
key: size,
|
|
131
|
+
size: size,
|
|
132
|
+
px: px
|
|
133
|
+
});
|
|
134
|
+
})));
|
|
135
|
+
};
|
|
136
|
+
var allSizes = _concatInstanceProperty(_context6 = []).call(_context6, iconSizes, iconNumericSizes);
|
|
137
|
+
Sizes.parameters = {
|
|
138
|
+
docs: {
|
|
139
|
+
source: {
|
|
140
|
+
code: _mapInstanceProperty(allSizes).call(allSizes, function (size) {
|
|
141
|
+
return "<Icon icon=\"search\" size=\"".concat(size, "\" title={{ name: 'Search Icon' }} />");
|
|
142
|
+
}).join('\n')
|
|
130
143
|
}
|
|
131
|
-
}
|
|
144
|
+
}
|
|
132
145
|
};
|
|
146
|
+
var commonIcons = [{
|
|
147
|
+
icon: 'account_circle',
|
|
148
|
+
title: 'Account Icon'
|
|
149
|
+
}, {
|
|
150
|
+
icon: 'groups',
|
|
151
|
+
title: 'Account Group Icon'
|
|
152
|
+
}, {
|
|
153
|
+
icon: 'lock',
|
|
154
|
+
title: 'Lock Icon'
|
|
155
|
+
}, {
|
|
156
|
+
icon: 'search',
|
|
157
|
+
title: 'Search Icon'
|
|
158
|
+
}, {
|
|
159
|
+
icon: 'notifications',
|
|
160
|
+
title: 'Notification Icon'
|
|
161
|
+
}];
|
|
133
162
|
export var CommonlyUsed = function CommonlyUsed() {
|
|
134
|
-
return ___EmotionJSX(React.Fragment, null,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
icon: "lock",
|
|
164
|
-
color: "accent.40",
|
|
165
|
-
size: "sm",
|
|
166
|
-
title: {
|
|
167
|
-
name: 'Lock Icon'
|
|
168
|
-
},
|
|
169
|
-
hasFill: true
|
|
170
|
-
})), ___EmotionJSX(Box, {
|
|
171
|
-
isRow: true,
|
|
172
|
-
gap: "md",
|
|
173
|
-
mb: "xs"
|
|
174
|
-
}, ___EmotionJSX(Icon, {
|
|
175
|
-
icon: "search",
|
|
176
|
-
color: "accent.40",
|
|
177
|
-
size: "sm",
|
|
178
|
-
title: {
|
|
179
|
-
name: 'Search Icon'
|
|
180
|
-
},
|
|
181
|
-
hasFill: true
|
|
182
|
-
})), ___EmotionJSX(Box, {
|
|
183
|
-
isRow: true,
|
|
184
|
-
gap: "md",
|
|
185
|
-
mb: "xs"
|
|
186
|
-
}, ___EmotionJSX(Icon, {
|
|
187
|
-
icon: "notifications",
|
|
188
|
-
color: "accent.40",
|
|
189
|
-
size: "sm",
|
|
190
|
-
title: {
|
|
191
|
-
name: 'Notification Icon'
|
|
192
|
-
},
|
|
193
|
-
hasFill: true
|
|
194
|
-
})));
|
|
163
|
+
return ___EmotionJSX(React.Fragment, null, _mapInstanceProperty(commonIcons).call(commonIcons, function (_ref0) {
|
|
164
|
+
var icon = _ref0.icon,
|
|
165
|
+
title = _ref0.title;
|
|
166
|
+
return ___EmotionJSX(Box, {
|
|
167
|
+
key: icon,
|
|
168
|
+
isRow: true,
|
|
169
|
+
gap: "md",
|
|
170
|
+
mb: "xs"
|
|
171
|
+
}, ___EmotionJSX(Icon, {
|
|
172
|
+
icon: icon,
|
|
173
|
+
size: "md",
|
|
174
|
+
title: {
|
|
175
|
+
name: title
|
|
176
|
+
},
|
|
177
|
+
hasFill: true
|
|
178
|
+
}));
|
|
179
|
+
}));
|
|
180
|
+
};
|
|
181
|
+
CommonlyUsed.parameters = {
|
|
182
|
+
docs: {
|
|
183
|
+
source: {
|
|
184
|
+
code: _mapInstanceProperty(commonIcons).call(commonIcons, function (_ref1) {
|
|
185
|
+
var _context7;
|
|
186
|
+
var icon = _ref1.icon,
|
|
187
|
+
title = _ref1.title;
|
|
188
|
+
return _concatInstanceProperty(_context7 = "<Icon icon=\"".concat(icon, "\" size=\"md\" title={{ name: '")).call(_context7, title, "' }} hasFill />");
|
|
189
|
+
}).join('\n')
|
|
190
|
+
}
|
|
191
|
+
}
|
|
195
192
|
};
|
|
@@ -13,7 +13,6 @@ function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymb
|
|
|
13
13
|
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; }
|
|
14
14
|
import React, { forwardRef } from 'react';
|
|
15
15
|
import { VisuallyHidden } from 'react-aria';
|
|
16
|
-
import MenuDown from '@pingux/mdi-react/MenuDownIcon';
|
|
17
16
|
import PropTypes from 'prop-types';
|
|
18
17
|
import { v4 as uuid } from 'uuid';
|
|
19
18
|
import { Box, Button, Icon, Loader, Text } from '../..';
|
|
@@ -38,9 +37,10 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
38
37
|
var _getAriaAttributeProp = getAriaAttributeProps(props),
|
|
39
38
|
ariaProps = _getAriaAttributeProp.ariaProps;
|
|
40
39
|
var _useGetTheme = useGetTheme(),
|
|
40
|
+
isOnyx = _useGetTheme.themeState.isOnyx,
|
|
41
41
|
linkSelectFieldWidth = _useGetTheme.linkSelectFieldWidth,
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
linkSelectFieldIcon = _useGetTheme.linkSelectFieldIcon,
|
|
43
|
+
MenuDown = _useGetTheme.icons.MenuDown;
|
|
44
44
|
var helperTextId = uuid();
|
|
45
45
|
usePropWarning(props, 'disabled', 'isDisabled');
|
|
46
46
|
var _useSelectField = useSelectField(_objectSpread(_objectSpread({
|
|
@@ -60,13 +60,13 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
60
60
|
var trigger = ___EmotionJSX(Button, _extends({
|
|
61
61
|
className: fieldControlInputProps.className,
|
|
62
62
|
ref: triggerRef,
|
|
63
|
-
variant: "
|
|
63
|
+
variant: "selectLink",
|
|
64
64
|
tabIndex: isDisabled ? -1 : 0
|
|
65
65
|
}, getPendoID(displayName), triggerProps, raTriggerProps, ariaProps, {
|
|
66
66
|
"aria-describedby": helperText && helperTextId
|
|
67
67
|
}), ___EmotionJSX(Text, {
|
|
68
|
-
variant: "
|
|
69
|
-
|
|
68
|
+
variant: "linkSelectFieldLabel",
|
|
69
|
+
className: "link-select-field-placeholder"
|
|
70
70
|
}, placeholder), ___EmotionJSX(Box, {
|
|
71
71
|
isRow: true
|
|
72
72
|
}, hasInlineLoader && isLoadingInitial && ___EmotionJSX(Loader, {
|
|
@@ -78,12 +78,15 @@ var LinkSelectField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
78
78
|
}, ___EmotionJSX(Icon, _extends({
|
|
79
79
|
icon: MenuDown,
|
|
80
80
|
title: {
|
|
81
|
-
name: '
|
|
82
|
-
}
|
|
81
|
+
name: ''
|
|
82
|
+
},
|
|
83
|
+
color: isOnyx ? 'font.link' : 'active',
|
|
84
|
+
size: linkSelectFieldIcon
|
|
83
85
|
}, iconProps, {
|
|
84
|
-
sx:
|
|
85
|
-
transform: 'rotate(180deg)'
|
|
86
|
-
|
|
86
|
+
sx: _objectSpread({
|
|
87
|
+
transform: state.isOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
88
|
+
transition: 'transform 150ms ease'
|
|
89
|
+
}, iconProps === null || iconProps === void 0 ? void 0 : iconProps.sx)
|
|
87
90
|
})))), ___EmotionJSX(VisuallyHidden, {
|
|
88
91
|
"aria-live": "polite",
|
|
89
92
|
id: helperTextId
|
|
@@ -30,9 +30,7 @@ var ListBoxSection = function ListBoxSection(props) {
|
|
|
30
30
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, {
|
|
31
31
|
ref: headerRef,
|
|
32
32
|
style: layoutInfoToStyle(header.layoutInfo, direction)
|
|
33
|
-
}, item.key !== state.collection.getFirstKey() && ___EmotionJSX(Separator, {
|
|
34
|
-
mt: "0px"
|
|
35
|
-
}), item.rendered && ___EmotionJSX(Box, _extends({}, headingProps, {
|
|
33
|
+
}, item.key !== state.collection.getFirstKey() && ___EmotionJSX(Separator, null), item.rendered && ___EmotionJSX(Box, _extends({}, headingProps, {
|
|
36
34
|
variant: "listBox.sectionTitle"
|
|
37
35
|
}), item.rendered)), ___EmotionJSX(Box, _extends({}, groupProps, {
|
|
38
36
|
style: layoutInfoToStyle(reusableView.layoutInfo, direction)
|
|
@@ -13,12 +13,12 @@ var base = {
|
|
|
13
13
|
bg: 'neutral.80',
|
|
14
14
|
width: '100%',
|
|
15
15
|
height: '1px',
|
|
16
|
-
my: '
|
|
16
|
+
my: 'xs',
|
|
17
17
|
flexShrink: 0,
|
|
18
18
|
'&.is-vertical': {
|
|
19
19
|
width: '1px',
|
|
20
20
|
height: '100%',
|
|
21
|
-
mx: '
|
|
21
|
+
mx: 'xs'
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
var navBarSeparator = _objectSpread(_objectSpread({}, base), {}, {
|
|
@@ -170,6 +170,15 @@ var stepperTabContentHeader = {
|
|
|
170
170
|
fontSize: 'lg',
|
|
171
171
|
fontWeight: 3
|
|
172
172
|
};
|
|
173
|
+
var label = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
|
174
|
+
fontSize: 'sm',
|
|
175
|
+
color: 'text.secondary',
|
|
176
|
+
fontFamily: 'standard',
|
|
177
|
+
fontWeight: 1
|
|
178
|
+
});
|
|
179
|
+
var linkSelectFieldLabel = _objectSpread(_objectSpread({}, label), {}, {
|
|
180
|
+
color: 'active'
|
|
181
|
+
});
|
|
173
182
|
export var text = _objectSpread(_objectSpread(_objectSpread({
|
|
174
183
|
base: base,
|
|
175
184
|
bodyStrong: bodyStrong,
|
|
@@ -229,12 +238,7 @@ export var text = _objectSpread(_objectSpread(_objectSpread({
|
|
|
229
238
|
color: 'text.secondary',
|
|
230
239
|
fontFamily: 'standard'
|
|
231
240
|
}),
|
|
232
|
-
label:
|
|
233
|
-
fontSize: 'sm',
|
|
234
|
-
color: 'text.secondary',
|
|
235
|
-
fontFamily: 'standard',
|
|
236
|
-
fontWeight: 1
|
|
237
|
-
}),
|
|
241
|
+
label: label,
|
|
238
242
|
listTitle: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
|
239
243
|
fontSize: 'md',
|
|
240
244
|
fontWeight: 1,
|
|
@@ -296,5 +300,6 @@ export var text = _objectSpread(_objectSpread(_objectSpread({
|
|
|
296
300
|
stepperLabel: stepperLabel,
|
|
297
301
|
pageHeaderTitle: _objectSpread({}, HTags.H1),
|
|
298
302
|
stepperTabContent: stepperTabContent,
|
|
299
|
-
stepperTabContentHeader: stepperTabContentHeader
|
|
303
|
+
stepperTabContentHeader: stepperTabContentHeader,
|
|
304
|
+
linkSelectFieldLabel: linkSelectFieldLabel
|
|
300
305
|
});
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// NOTE: Named exports must be unique across files, otherwise collisions will occur.
|
|
2
2
|
|
|
3
3
|
/* eslint-disable import/export */
|
|
4
|
-
import '
|
|
4
|
+
import 'material-symbols/outlined.css';
|
|
5
5
|
export { default as AccordionGridGroup } from './components/AccordionGridGroup';
|
|
6
6
|
export * from './components/AccordionGridGroup';
|
|
7
7
|
export { default as AccordionGridItem } from './components/AccordionGridItem';
|
|
@@ -14,9 +14,7 @@ import stepper from './stepper';
|
|
|
14
14
|
var listBox = {
|
|
15
15
|
container: {
|
|
16
16
|
backgroundColor: 'backgroundBase',
|
|
17
|
-
|
|
18
|
-
borderColor: 'border.attachment',
|
|
19
|
-
borderRadius: '4px'
|
|
17
|
+
borderRadius: astroTokensDark.radius.md
|
|
20
18
|
},
|
|
21
19
|
option: {
|
|
22
20
|
color: astroTokensDark.color.gray[400],
|
|
@@ -24,6 +24,7 @@ var calendarIconSize = 25;
|
|
|
24
24
|
var navBarIconSize = 18;
|
|
25
25
|
var badgeTextFontSize = '';
|
|
26
26
|
var modalCloseIconSize = 'sm';
|
|
27
|
+
var linkSelectFieldIcon = 'sm';
|
|
27
28
|
export var astroThemeValues = {
|
|
28
29
|
accordionHoveredState: hoveredState,
|
|
29
30
|
accordionItemDefaultLabelTag: accordionItemDefaultLabelTag,
|
|
@@ -57,5 +58,6 @@ export var astroThemeValues = {
|
|
|
57
58
|
},
|
|
58
59
|
linkSelectFieldWidth: linkSelectFieldWidth,
|
|
59
60
|
badgeTextFontSize: badgeTextFontSize,
|
|
60
|
-
modalCloseIconSize: modalCloseIconSize
|
|
61
|
+
modalCloseIconSize: modalCloseIconSize,
|
|
62
|
+
linkSelectFieldIcon: linkSelectFieldIcon
|
|
61
63
|
};
|
|
@@ -7,6 +7,7 @@ var pageHeaderAddIconMargin = 'md';
|
|
|
7
7
|
var pageHeaderAddIconSize = 'md';
|
|
8
8
|
var defaultLoaderSize = 32;
|
|
9
9
|
var modalCloseIconSize = 'md';
|
|
10
|
+
var linkSelectFieldIcon = 'sm';
|
|
10
11
|
export default {
|
|
11
12
|
copyButtonSize: copyButtonSize,
|
|
12
13
|
breadcrumbIconSize: breadcrumbIconSize,
|
|
@@ -16,5 +17,6 @@ export default {
|
|
|
16
17
|
pageHeaderAddIconMargin: pageHeaderAddIconMargin,
|
|
17
18
|
pageHeaderAddIconSize: pageHeaderAddIconSize,
|
|
18
19
|
defaultLoaderSize: defaultLoaderSize,
|
|
19
|
-
modalCloseIconSize: modalCloseIconSize
|
|
20
|
+
modalCloseIconSize: modalCloseIconSize,
|
|
21
|
+
linkSelectFieldIcon: linkSelectFieldIcon
|
|
20
22
|
};
|