@sproutsocial/racine 20.2.0 → 20.3.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/CHANGELOG.md +15 -0
- package/__flow__/Button/Button.flow.js +3 -1
- package/__flow__/FormField/FormField.flow.js +3 -0
- package/__flow__/Text/Text.flow.js +3 -0
- package/__flow__/types/theme.flow.js +8 -0
- package/commonjs/Button/styles.js +2 -2
- package/commonjs/FormField/FormField.js +15 -5
- package/commonjs/Icon/Icon.js +1 -1
- package/commonjs/Table/Table.js +3 -2
- package/commonjs/Text/styles.js +2 -2
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +6 -0
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +6 -0
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +12 -0
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +12 -0
- package/dist/types/Button/ButtonTypes.d.ts +2 -2
- package/dist/types/Button/ButtonTypes.d.ts.map +1 -1
- package/dist/types/Button/styles.d.ts.map +1 -1
- package/dist/types/FormField/FormField.d.ts +1 -1
- package/dist/types/FormField/FormField.d.ts.map +1 -1
- package/dist/types/FormField/FormFieldTypes.d.ts +3 -0
- package/dist/types/FormField/FormFieldTypes.d.ts.map +1 -1
- package/dist/types/Icon/Icon.d.ts.map +1 -1
- package/dist/types/Text/TextTypes.d.ts +2 -2
- package/dist/types/Text/TextTypes.d.ts.map +1 -1
- package/dist/types/Text/styles.d.ts.map +1 -1
- package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts +6 -0
- package/dist/types/themes/extendedThemes/sproutTheme/dark/theme.d.ts.map +1 -1
- package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts +6 -0
- package/dist/types/themes/extendedThemes/sproutTheme/light/theme.d.ts.map +1 -1
- package/lib/Button/styles.js +3 -3
- package/lib/FormField/FormField.js +16 -5
- package/lib/Icon/Icon.js +1 -1
- package/lib/Table/Table.js +3 -2
- package/lib/Text/styles.js +3 -3
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +6 -0
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 20.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- e83128a9: Add flex and grid system props to the Button and Text components
|
|
8
|
+
- a90ffa7d: `FormField` component now supports `required` prop, which marks the label with an asterisk and sets children elements to required.
|
|
9
|
+
- 7672a5d2: Updated the `Icon` component so that when a non-variant tag `name` is passed in and the `size='mini'`, then the default variant will be `solid` instead of `outline`.
|
|
10
|
+
- Example: `<Icon name='tag' size='mini' />` would display the `tag-solid` icon at the `mini` size.
|
|
11
|
+
- Note: This behavior can be overridden by passing a name with a variant such as `<Icon name='tag-outline' size='mini' />`
|
|
12
|
+
- 354caff2: Add carousel indicator color tokens
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- 97366f0a: Use id of head cells instead of colGroup for key
|
|
17
|
+
|
|
3
18
|
## 20.2.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { type StyledComponent } from 'styled-components';
|
|
4
4
|
import type { TypeTheme } from "../types/theme.flow";
|
|
5
|
-
import type { TypeSystemCommonProps, TypeSystemLayoutProps } from "../types/system-props.flow";
|
|
5
|
+
import type { TypeSystemCommonProps, TypeSystemLayoutProps, TypeSystemFlexboxProps, TypeSystemGridProps } from "../types/system-props.flow";
|
|
6
6
|
export type TypeButtonProps = {
|
|
7
7
|
...TypeSystemCommonProps,
|
|
8
8
|
...TypeSystemLayoutProps,
|
|
9
|
+
...TypeSystemFlexboxProps,
|
|
10
|
+
...TypeSystemGridProps,
|
|
9
11
|
/** If the button is being used as an anchor, this prop will cause the link to open in a new tab. */
|
|
10
12
|
external?: boolean,
|
|
11
13
|
size?: 'large' | 'default',
|
|
@@ -8,6 +8,7 @@ export type TypeFormFieldProps = {
|
|
|
8
8
|
id: string,
|
|
9
9
|
isInvalid: boolean,
|
|
10
10
|
ariaDescribedby: string,
|
|
11
|
+
required?: boolean,
|
|
11
12
|
...
|
|
12
13
|
}) => React.Element<any>,
|
|
13
14
|
/** Text describing any error with the field's content */
|
|
@@ -23,6 +24,8 @@ export type TypeFormFieldProps = {
|
|
|
23
24
|
qa?: Object,
|
|
24
25
|
/** Whether the label text should be visually hidden */
|
|
25
26
|
isLabelHidden?: boolean,
|
|
27
|
+
/** Whether the form element is required */
|
|
28
|
+
required?: boolean,
|
|
26
29
|
...
|
|
27
30
|
};
|
|
28
31
|
declare var FormField: React.StatelessFunctionalComponent<TypeFormFieldProps>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
//@flow
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import type { TypeWithDisplayName } from "../types/shared.flow";
|
|
4
|
+
import type { TypeSystemFlexboxProps, TypeSystemGridProps } from "../types/system-props.flow";
|
|
4
5
|
export type TypeTextProps = {
|
|
6
|
+
...TypeSystemFlexboxProps,
|
|
7
|
+
...TypeSystemGridProps,
|
|
5
8
|
/** Maps to the typeScale system prop, sets font size and line height using Seeds values */
|
|
6
9
|
fontSize?: 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000 | 1100 | 1200,
|
|
7
10
|
/** Controls the CSS word-break property */
|
|
@@ -147,6 +147,14 @@ export type TypeListeningTheme = {|
|
|
|
147
147
|
},
|
|
148
148
|
|};
|
|
149
149
|
export type TypeGrowthTheme = {|
|
|
150
|
+
carousel: {
|
|
151
|
+
indicator: {
|
|
152
|
+
active: string,
|
|
153
|
+
inactive: string,
|
|
154
|
+
...
|
|
155
|
+
},
|
|
156
|
+
...
|
|
157
|
+
},
|
|
150
158
|
education: {
|
|
151
159
|
decorative: {
|
|
152
160
|
aqua: string,
|
|
@@ -15,7 +15,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
15
15
|
var Container = _styledComponents.default.button.withConfig({
|
|
16
16
|
displayName: "styles__Container",
|
|
17
17
|
componentId: "sc-17njgx1-0"
|
|
18
|
-
})(["display:inline-block;box-sizing:border-box;text-align:center;font-family:", ";border:1px solid ", ";border-radius:", ";border-style:", ";background:", ";color:", ";cursor:pointer;text-decoration:none;line-height:16px;white-space:nowrap;font-weight:", ";transition:all ", " linear;margin:0;padding:", ";font-size:", ";&:visited{color:", ";}&:hover{color:", ";", ";text-decoration:none;box-shadow:", ";}&:active{color:", ";", ";transform:translateY(1px);}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", "{vertical-align:text-bottom;}", " ", ""], function (props) {
|
|
18
|
+
})(["display:inline-block;box-sizing:border-box;text-align:center;font-family:", ";border:1px solid ", ";border-radius:", ";border-style:", ";background:", ";color:", ";cursor:pointer;text-decoration:none;line-height:16px;white-space:nowrap;font-weight:", ";transition:all ", " linear;margin:0;padding:", ";font-size:", ";&:visited{color:", ";}&:hover{color:", ";", ";text-decoration:none;box-shadow:", ";}&:active{color:", ";", ";transform:translateY(1px);}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", "{vertical-align:text-bottom;}", " ", " ", " ", ""], function (props) {
|
|
19
19
|
return props.theme.fontFamily;
|
|
20
20
|
}, function (props) {
|
|
21
21
|
return props.theme.colors.button[props.appearance].border.base;
|
|
@@ -56,7 +56,7 @@ var Container = _styledComponents.default.button.withConfig({
|
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
57
57
|
// @ts-ignore - FIXME: button.pill.border.hover is not defined in theme
|
|
58
58
|
props.theme.colors.button[props.appearance].border.hover);
|
|
59
|
-
}, _styles.default, _systemProps.LAYOUT, _systemProps.COMMON);
|
|
59
|
+
}, _styles.default, _systemProps.LAYOUT, _systemProps.COMMON, _systemProps.FLEXBOX, _systemProps.GRID);
|
|
60
60
|
Container.displayName = 'Button-Container';
|
|
61
61
|
var _default = Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
|
|
62
62
|
exports.default = _default;
|
|
@@ -11,11 +11,16 @@ var _Box = _interopRequireDefault(require("../Box"));
|
|
|
11
11
|
var _Label = _interopRequireDefault(require("../Label"));
|
|
12
12
|
var _Text = _interopRequireDefault(require("../Text"));
|
|
13
13
|
var _VisuallyHidden = require("../VisuallyHidden");
|
|
14
|
-
var _excluded = ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden"];
|
|
14
|
+
var _excluded = ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden", "required"];
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
18
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
22
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
23
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
25
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
26
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -38,6 +43,7 @@ var FormField = function FormField(_ref) {
|
|
|
38
43
|
qa = _ref.qa,
|
|
39
44
|
_ref$isLabelHidden = _ref.isLabelHidden,
|
|
40
45
|
isLabelHidden = _ref$isLabelHidden === void 0 ? false : _ref$isLabelHidden,
|
|
46
|
+
required = _ref.required,
|
|
41
47
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
42
48
|
var _useState = (0, _react.useState)(identifier || "FormField-".concat(idCounter++)),
|
|
43
49
|
_useState2 = _slicedToArray(_useState, 1),
|
|
@@ -52,20 +58,24 @@ var FormField = function FormField(_ref) {
|
|
|
52
58
|
}), isLabelHidden ? /*#__PURE__*/_react.default.createElement(_VisuallyHidden.VisuallyHidden, {
|
|
53
59
|
"data-testid": "visually-hidden"
|
|
54
60
|
}, /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
55
|
-
htmlFor: id
|
|
61
|
+
htmlFor: id,
|
|
62
|
+
required: required
|
|
56
63
|
}, label)) : /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
57
64
|
mb: helperText ? 100 : 300,
|
|
58
|
-
htmlFor: id
|
|
65
|
+
htmlFor: id,
|
|
66
|
+
required: required
|
|
59
67
|
}, label), helperText && /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
60
68
|
as: "p",
|
|
61
69
|
fontSize: 200,
|
|
62
70
|
mb: 300,
|
|
63
71
|
color: "text.subtext"
|
|
64
|
-
}, helperText), children({
|
|
72
|
+
}, helperText), children(_objectSpread({
|
|
65
73
|
id: id,
|
|
66
74
|
isInvalid: isInvalid,
|
|
67
75
|
ariaDescribedby: errorId
|
|
68
|
-
}
|
|
76
|
+
}, required !== undefined && {
|
|
77
|
+
required: required
|
|
78
|
+
})), isInvalid && error && /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
69
79
|
as: "div",
|
|
70
80
|
fontSize: 200,
|
|
71
81
|
color: "text.error",
|
package/commonjs/Icon/Icon.js
CHANGED
|
@@ -26,7 +26,6 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
26
26
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
27
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
28
28
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
29
|
-
var defaultVariant = 'outline';
|
|
30
29
|
var AllViewboxes = _objectSpread(_objectSpread(_objectSpread({}, _seedsIcons.ExternalViewBoxes), _seedsIcons.GeneralViewBoxes), _seedsIcons.SproutViewBoxes);
|
|
31
30
|
var Icon = function Icon(_ref) {
|
|
32
31
|
var name = _ref.name,
|
|
@@ -53,6 +52,7 @@ var Icon = function Icon(_ref) {
|
|
|
53
52
|
"aria-label": ariaLabel
|
|
54
53
|
}, rest, logoProps));
|
|
55
54
|
}
|
|
55
|
+
var defaultVariant = size === 'mini' ? 'solid' : 'outline';
|
|
56
56
|
var iconName =
|
|
57
57
|
// if not external and has no variant
|
|
58
58
|
!(name !== null && name !== void 0 && name.endsWith('-outline')) && !(name !== null && name !== void 0 && name.endsWith('-solid')) && !(0, _utils.includes)(_seedsIcons.ExternalIconNames, name) ? // then add default variant
|
package/commonjs/Table/Table.js
CHANGED
|
@@ -59,10 +59,11 @@ var Table = function Table(_ref) {
|
|
|
59
59
|
,
|
|
60
60
|
color: color
|
|
61
61
|
}), /*#__PURE__*/React.createElement("colgroup", null, head.map(function (_ref2) {
|
|
62
|
-
var
|
|
62
|
+
var id = _ref2.id,
|
|
63
|
+
_ref2$colSpan = _ref2.colSpan,
|
|
63
64
|
colSpan = _ref2$colSpan === void 0 ? 1 : _ref2$colSpan;
|
|
64
65
|
return /*#__PURE__*/React.createElement("col", {
|
|
65
|
-
key:
|
|
66
|
+
key: id,
|
|
66
67
|
span: colSpan
|
|
67
68
|
});
|
|
68
69
|
})), head.length > 0 && /*#__PURE__*/React.createElement("thead", {
|
package/commonjs/Text/styles.js
CHANGED
|
@@ -12,7 +12,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
12
12
|
var Container = _styledComponents.default.span.withConfig({
|
|
13
13
|
displayName: "styles__Container",
|
|
14
14
|
componentId: "sc-99cuku-0"
|
|
15
|
-
})(["margin:0;padding-left:0;padding-right:0;font-family:", ";font-style:", ";", " ", " ", " ", " ", ""], function (props) {
|
|
15
|
+
})(["margin:0;padding-left:0;padding-right:0;font-family:", ";font-style:", ";", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
16
16
|
return props.theme.fontFamily;
|
|
17
17
|
}, function (props) {
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -22,6 +22,6 @@ var Container = _styledComponents.default.span.withConfig({
|
|
|
22
22
|
return props.truncated && (0, _styledComponents.css)(["display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
|
|
23
23
|
}, function (props) {
|
|
24
24
|
return props.breakWord && (0, _styledComponents.css)(["word-break:break-word;hyphens:auto;"]);
|
|
25
|
-
}, _systemProps.COMMON, _systemProps.LAYOUT, _systemProps.TYPOGRAPHY);
|
|
25
|
+
}, _systemProps.COMMON, _systemProps.LAYOUT, _systemProps.FLEXBOX, _systemProps.GRID, _systemProps.TYPOGRAPHY);
|
|
26
26
|
var _default = Container;
|
|
27
27
|
exports.default = _default;
|
|
@@ -136,6 +136,12 @@ var listening = {
|
|
|
136
136
|
};
|
|
137
137
|
exports.listening = listening;
|
|
138
138
|
var growth = {
|
|
139
|
+
carousel: {
|
|
140
|
+
indicator: {
|
|
141
|
+
active: _theme.default.colors.blue[600],
|
|
142
|
+
inactive: _theme.default.colors.neutral[300]
|
|
143
|
+
}
|
|
144
|
+
},
|
|
139
145
|
education: {
|
|
140
146
|
decorative: {
|
|
141
147
|
aqua: _theme.default.colors.aqua[600],
|
|
@@ -133,6 +133,12 @@ var listening = {
|
|
|
133
133
|
};
|
|
134
134
|
exports.listening = listening;
|
|
135
135
|
var growth = {
|
|
136
|
+
carousel: {
|
|
137
|
+
indicator: {
|
|
138
|
+
active: _theme.default.colors.blue[600],
|
|
139
|
+
inactive: _theme.default.colors.neutral[300]
|
|
140
|
+
}
|
|
141
|
+
},
|
|
136
142
|
education: {
|
|
137
143
|
decorative: {
|
|
138
144
|
aqua: _theme.default.colors.aqua[600],
|
|
@@ -603,6 +603,12 @@ $theme: (
|
|
|
603
603
|
)
|
|
604
604
|
),
|
|
605
605
|
"growth": (
|
|
606
|
+
"carousel": (
|
|
607
|
+
"indicator": (
|
|
608
|
+
"active": #2b87d3,
|
|
609
|
+
"inactive": #c8cccc
|
|
610
|
+
)
|
|
611
|
+
),
|
|
606
612
|
"education": (
|
|
607
613
|
"decorative": (
|
|
608
614
|
"aqua": #0797ae,
|
|
@@ -902,6 +908,12 @@ $theme: (
|
|
|
902
908
|
"mode": dark
|
|
903
909
|
),
|
|
904
910
|
"growth": (
|
|
911
|
+
"carousel": (
|
|
912
|
+
"indicator": (
|
|
913
|
+
"active": #2b87d3,
|
|
914
|
+
"inactive": #c8cccc
|
|
915
|
+
)
|
|
916
|
+
),
|
|
905
917
|
"education": (
|
|
906
918
|
"decorative": (
|
|
907
919
|
"aqua": #0797ae,
|
|
@@ -602,6 +602,12 @@ $theme: (
|
|
|
602
602
|
)
|
|
603
603
|
),
|
|
604
604
|
"growth": (
|
|
605
|
+
"carousel": (
|
|
606
|
+
"indicator": (
|
|
607
|
+
"active": #2b87d3,
|
|
608
|
+
"inactive": #c8cccc
|
|
609
|
+
)
|
|
610
|
+
),
|
|
605
611
|
"education": (
|
|
606
612
|
"decorative": (
|
|
607
613
|
"aqua": #0797ae,
|
|
@@ -901,6 +907,12 @@ $theme: (
|
|
|
901
907
|
"mode": light
|
|
902
908
|
),
|
|
903
909
|
"growth": (
|
|
910
|
+
"carousel": (
|
|
911
|
+
"indicator": (
|
|
912
|
+
"active": #2b87d3,
|
|
913
|
+
"inactive": #c8cccc
|
|
914
|
+
)
|
|
915
|
+
),
|
|
904
916
|
"education": (
|
|
905
917
|
"decorative": (
|
|
906
918
|
"aqua": #0797ae,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { TypeStyledComponentsCommonProps } from '../types/styled-components';
|
|
3
|
-
import type { TypeSystemCommonProps, TypeSystemLayoutProps } from '../types/system-props';
|
|
3
|
+
import type { TypeSystemCommonProps, TypeSystemLayoutProps, TypeSystemFlexboxProps, TypeSystemGridProps } from '../types/system-props';
|
|
4
4
|
export type TypeButtonAppearance = 'primary' | 'secondary' | 'pill' | 'destructive' | 'unstyled' | 'placeholder';
|
|
5
|
-
export interface TypeButtonProps extends TypeStyledComponentsCommonProps, TypeSystemCommonProps, TypeSystemLayoutProps, Omit<React.ComponentPropsWithoutRef<'button'>, 'color'> {
|
|
5
|
+
export interface TypeButtonProps extends TypeStyledComponentsCommonProps, TypeSystemCommonProps, TypeSystemLayoutProps, TypeSystemFlexboxProps, TypeSystemGridProps, Omit<React.ComponentPropsWithoutRef<'button'>, 'color'> {
|
|
6
6
|
/** If the button is being used as an anchor, this prop will cause the link to open in a new tab. */
|
|
7
7
|
external?: boolean;
|
|
8
8
|
size?: 'large' | 'small' | 'default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTypes.d.ts","sourceRoot":"","sources":["../../../src/Button/ButtonTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,+BAA+B,EAAC,MAAM,8BAA8B,CAAC;AAClF,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,WAAW,GACX,MAAM,GACN,aAAa,GACb,UAAU,GACV,aAAa,CAAC;AAElB,MAAM,WAAW,eACf,SAAQ,+BAA+B,EACrC,qBAAqB,EACrB,qBAAqB,EACrB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACzD,oGAAoG;IACpG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAErC,kCAAkC;IAClC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAElC,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,kHAAkH;IAClH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gHAAgH;IAChH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAExC,mDAAmD;IACnD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,+BAA+B,CAAC,IAAI,CAAC,CAAC;IAE3C,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
1
|
+
{"version":3,"file":"ButtonTypes.d.ts","sourceRoot":"","sources":["../../../src/Button/ButtonTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAC,+BAA+B,EAAC,MAAM,8BAA8B,CAAC;AAClF,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,oBAAoB,GAC5B,SAAS,GACT,WAAW,GACX,MAAM,GACN,aAAa,GACb,UAAU,GACV,aAAa,CAAC;AAElB,MAAM,WAAW,eACf,SAAQ,+BAA+B,EACrC,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACzD,oGAAoG;IACpG,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAC;IAErC,kCAAkC;IAClC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAElC,oDAAoD;IACpD,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,kHAAkH;IAClH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,gHAAgH;IAChH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IAExC,mDAAmD;IACnD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,+BAA+B,CAAC,IAAI,CAAC,CAAC;IAE3C,mFAAmF;IACnF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Button/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Button/styles.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,eAAe,EAAE,oBAAoB,EAAC,MAAM,SAAS,CAAC;AACnE,UAAU,oBAAqB,SAAQ,eAAe;IACpD,UAAU,EAAE,oBAAoB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC;AACD,QAAA,MAAM,SAAS,8HA+Gd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { TypeFormFieldProps } from './FormFieldTypes';
|
|
3
|
-
declare const FormField: ({ children, error, helperText, id: identifier, isInvalid, label, mb, qa, isLabelHidden, ...rest }: TypeFormFieldProps) => JSX.Element;
|
|
3
|
+
declare const FormField: ({ children, error, helperText, id: identifier, isInvalid, label, mb, qa, isLabelHidden, required, ...rest }: TypeFormFieldProps) => JSX.Element;
|
|
4
4
|
export default FormField;
|
|
5
5
|
//# sourceMappingURL=FormField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/FormField/FormField.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAIzD,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../src/FormField/FormField.tsx"],"names":[],"mappings":";AAMA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AAIzD,QAAA,MAAM,SAAS,gHAYZ,kBAAkB,gBAqDpB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -6,6 +6,7 @@ export interface TypeFormFieldProps extends Omit<TypeBoxProps, 'children'> {
|
|
|
6
6
|
id: string;
|
|
7
7
|
isInvalid: boolean;
|
|
8
8
|
ariaDescribedby: string;
|
|
9
|
+
required?: boolean;
|
|
9
10
|
}) => React.ReactNode;
|
|
10
11
|
/** Text describing any error with the field's content */
|
|
11
12
|
error?: React.ReactNode;
|
|
@@ -20,5 +21,7 @@ export interface TypeFormFieldProps extends Omit<TypeBoxProps, 'children'> {
|
|
|
20
21
|
qa?: object;
|
|
21
22
|
/** Whether the label text should be visually hidden */
|
|
22
23
|
isLabelHidden?: boolean;
|
|
24
|
+
/** Whether the form element is required */
|
|
25
|
+
required?: boolean;
|
|
23
26
|
}
|
|
24
27
|
//# sourceMappingURL=FormFieldTypes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldTypes.d.ts","sourceRoot":"","sources":["../../../src/FormField/FormFieldTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;IACxE,mFAAmF;IACnF,QAAQ,EAAE,CAAC,OAAO,EAAE;QAClB,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"FormFieldTypes.d.ts","sourceRoot":"","sources":["../../../src/FormField/FormFieldTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,YAAY,EAAC,MAAM,UAAU,CAAC;AAEtC,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;IACxE,mFAAmF;IACnF,QAAQ,EAAE,CAAC,OAAO,EAAE;QAClB,EAAE,EAAE,MAAM,CAAC;QACX,SAAS,EAAE,OAAO,CAAC;QACnB,eAAe,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,KAAK,KAAK,CAAC,SAAS,CAAC;IAEtB,yDAAyD;IACzD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAExB,+DAA+D;IAC/D,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE7B,sEAAsE;IACtE,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,iDAAiD;IACjD,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,uDAAuD;IACvD,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/Icon/Icon.tsx"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/Icon/Icon.tsx"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;AAiBhE,QAAA,MAAM,IAAI;sEAQP,aAAa;IA+GhB;;;;;;;;;;;;;;;;;;OAkBG;;uFA1CA,eAAe;;;CA7BjB,CAAC;AA0EF,eAAe,IAAI,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TypeQaProps } from '../types/shared';
|
|
3
3
|
import type { TypeStyledComponentsCommonProps } from '../types/styled-components';
|
|
4
|
-
import { TypeSystemCommonProps, TypeSystemLayoutProps, TypeSystemTypographyProps } from '../types/system-props';
|
|
5
|
-
interface TypeTextSystemProps extends TypeStyledComponentsCommonProps, TypeSystemCommonProps, TypeSystemLayoutProps, Omit<TypeSystemTypographyProps, 'fontSize'> {
|
|
4
|
+
import { TypeSystemCommonProps, TypeSystemLayoutProps, TypeSystemTypographyProps, TypeSystemFlexboxProps, TypeSystemGridProps } from '../types/system-props';
|
|
5
|
+
interface TypeTextSystemProps extends TypeStyledComponentsCommonProps, TypeSystemCommonProps, TypeSystemLayoutProps, TypeSystemFlexboxProps, TypeSystemGridProps, Omit<TypeSystemTypographyProps, 'fontSize'> {
|
|
6
6
|
}
|
|
7
7
|
export interface TypeTextProps extends TypeTextSystemProps, Omit<React.ComponentPropsWithoutRef<'span'>, keyof TypeTextSystemProps> {
|
|
8
8
|
/** Maps to the typeScale system prop, sets font size and line height using Seeds values */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextTypes.d.ts","sourceRoot":"","sources":["../../../src/Text/TextTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAC,+BAA+B,EAAC,MAAM,8BAA8B,CAAC;AAClF,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,
|
|
1
|
+
{"version":3,"file":"TextTypes.d.ts","sourceRoot":"","sources":["../../../src/Text/TextTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAC,+BAA+B,EAAC,MAAM,8BAA8B,CAAC;AAClF,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,UAAU,mBACR,SAAQ,+BAA+B,EACrC,qBAAqB,EACrB,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC;CAAG;AAElD,MAAM,WAAW,aACf,SAAQ,mBAAmB,EACzB,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,MAAM,mBAAmB,CAAC;IACzE,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC;IAElD,2CAA2C;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,WAAW,CAAC;CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Text/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Text/styles.ts"],"names":[],"mappings":"AAQA,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C,QAAA,MAAM,SAAS,qHAgCd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../src/themes/extendedThemes/sproutTheme/dark/theme.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;CAStB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;CAWrB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAC;AAEF,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../src/themes/extendedThemes/sproutTheme/dark/theme.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;CAStB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;CAWrB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFlB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;CASvB,CAAC;AAEF,QAAA,MAAM,SAAS,EAAE,eAWhB,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../src/themes/extendedThemes/sproutTheme/light/theme.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;CAStB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;CAWrB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAC;AAEF,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../src/themes/extendedThemes/sproutTheme/light/theme.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;;;;;CAStB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;CAWrB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCrB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFlB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;CASvB,CAAC;AAEF,QAAA,MAAM,UAAU,EAAE,eAWjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/lib/Button/styles.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { COMMON, LAYOUT } from "../utils/system-props";
|
|
2
|
+
import { COMMON, LAYOUT, FLEXBOX, GRID } from "../utils/system-props";
|
|
3
3
|
import { focusRing, disabled, pill } from "../utils/mixins";
|
|
4
4
|
import Icon from "../Icon/styles";
|
|
5
5
|
var Container = styled.button.withConfig({
|
|
6
6
|
displayName: "styles__Container",
|
|
7
7
|
componentId: "sc-17njgx1-0"
|
|
8
|
-
})(["display:inline-block;box-sizing:border-box;text-align:center;font-family:", ";border:1px solid ", ";border-radius:", ";border-style:", ";background:", ";color:", ";cursor:pointer;text-decoration:none;line-height:16px;white-space:nowrap;font-weight:", ";transition:all ", " linear;margin:0;padding:", ";font-size:", ";&:visited{color:", ";}&:hover{color:", ";", ";text-decoration:none;box-shadow:", ";}&:active{color:", ";", ";transform:translateY(1px);}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", "{vertical-align:text-bottom;}", " ", ""], function (props) {
|
|
8
|
+
})(["display:inline-block;box-sizing:border-box;text-align:center;font-family:", ";border:1px solid ", ";border-radius:", ";border-style:", ";background:", ";color:", ";cursor:pointer;text-decoration:none;line-height:16px;white-space:nowrap;font-weight:", ";transition:all ", " linear;margin:0;padding:", ";font-size:", ";&:visited{color:", ";}&:hover{color:", ";", ";text-decoration:none;box-shadow:", ";}&:active{color:", ";", ";transform:translateY(1px);}&:focus{", "}&:focus:active{box-shadow:none;}", " ", " ", " ", "{vertical-align:text-bottom;}", " ", " ", " ", ""], function (props) {
|
|
9
9
|
return props.theme.fontFamily;
|
|
10
10
|
}, function (props) {
|
|
11
11
|
return props.theme.colors.button[props.appearance].border.base;
|
|
@@ -46,6 +46,6 @@ var Container = styled.button.withConfig({
|
|
|
46
46
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
47
47
|
// @ts-ignore - FIXME: button.pill.border.hover is not defined in theme
|
|
48
48
|
props.theme.colors.button[props.appearance].border.hover);
|
|
49
|
-
}, Icon, LAYOUT, COMMON);
|
|
49
|
+
}, Icon, LAYOUT, COMMON, FLEXBOX, GRID);
|
|
50
50
|
Container.displayName = 'Button-Container';
|
|
51
51
|
export default Container; //${props.theme.mode === "dark" ? "screen" : "multiply"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
var _excluded = ["children", "error", "helperText", "id", "isInvalid", "label", "mb", "qa", "isLabelHidden", "required"];
|
|
2
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
3
9
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
10
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
11
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
@@ -28,6 +34,7 @@ var FormField = function FormField(_ref) {
|
|
|
28
34
|
qa = _ref.qa,
|
|
29
35
|
_ref$isLabelHidden = _ref.isLabelHidden,
|
|
30
36
|
isLabelHidden = _ref$isLabelHidden === void 0 ? false : _ref$isLabelHidden,
|
|
37
|
+
required = _ref.required,
|
|
31
38
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
39
|
var _useState = useState(identifier || "FormField-".concat(idCounter++)),
|
|
33
40
|
_useState2 = _slicedToArray(_useState, 1),
|
|
@@ -42,20 +49,24 @@ var FormField = function FormField(_ref) {
|
|
|
42
49
|
}), isLabelHidden ? /*#__PURE__*/React.createElement(VisuallyHidden, {
|
|
43
50
|
"data-testid": "visually-hidden"
|
|
44
51
|
}, /*#__PURE__*/React.createElement(Label, {
|
|
45
|
-
htmlFor: id
|
|
52
|
+
htmlFor: id,
|
|
53
|
+
required: required
|
|
46
54
|
}, label)) : /*#__PURE__*/React.createElement(Label, {
|
|
47
55
|
mb: helperText ? 100 : 300,
|
|
48
|
-
htmlFor: id
|
|
56
|
+
htmlFor: id,
|
|
57
|
+
required: required
|
|
49
58
|
}, label), helperText && /*#__PURE__*/React.createElement(Text, {
|
|
50
59
|
as: "p",
|
|
51
60
|
fontSize: 200,
|
|
52
61
|
mb: 300,
|
|
53
62
|
color: "text.subtext"
|
|
54
|
-
}, helperText), children({
|
|
63
|
+
}, helperText), children(_objectSpread({
|
|
55
64
|
id: id,
|
|
56
65
|
isInvalid: isInvalid,
|
|
57
66
|
ariaDescribedby: errorId
|
|
58
|
-
}
|
|
67
|
+
}, required !== undefined && {
|
|
68
|
+
required: required
|
|
69
|
+
})), isInvalid && error && /*#__PURE__*/React.createElement(Text, {
|
|
59
70
|
as: "div",
|
|
60
71
|
fontSize: 200,
|
|
61
72
|
color: "text.error",
|
package/lib/Icon/Icon.js
CHANGED
|
@@ -17,7 +17,6 @@ import { includes } from "../utils";
|
|
|
17
17
|
import PartnerLogoNames from "../logoNames";
|
|
18
18
|
import Container from "./styles";
|
|
19
19
|
import { ExternalViewBoxes, GeneralViewBoxes, SproutViewBoxes, ExternalIconNames } from '@sproutsocial/seeds-icons';
|
|
20
|
-
var defaultVariant = 'outline';
|
|
21
20
|
var AllViewboxes = _objectSpread(_objectSpread(_objectSpread({}, ExternalViewBoxes), GeneralViewBoxes), SproutViewBoxes);
|
|
22
21
|
var Icon = function Icon(_ref) {
|
|
23
22
|
var name = _ref.name,
|
|
@@ -44,6 +43,7 @@ var Icon = function Icon(_ref) {
|
|
|
44
43
|
"aria-label": ariaLabel
|
|
45
44
|
}, rest, logoProps));
|
|
46
45
|
}
|
|
46
|
+
var defaultVariant = size === 'mini' ? 'solid' : 'outline';
|
|
47
47
|
var iconName =
|
|
48
48
|
// if not external and has no variant
|
|
49
49
|
!(name !== null && name !== void 0 && name.endsWith('-outline')) && !(name !== null && name !== void 0 && name.endsWith('-solid')) && !includes(ExternalIconNames, name) ? // then add default variant
|
package/lib/Table/Table.js
CHANGED
|
@@ -49,10 +49,11 @@ export var Table = function Table(_ref) {
|
|
|
49
49
|
,
|
|
50
50
|
color: color
|
|
51
51
|
}), /*#__PURE__*/React.createElement("colgroup", null, head.map(function (_ref2) {
|
|
52
|
-
var
|
|
52
|
+
var id = _ref2.id,
|
|
53
|
+
_ref2$colSpan = _ref2.colSpan,
|
|
53
54
|
colSpan = _ref2$colSpan === void 0 ? 1 : _ref2$colSpan;
|
|
54
55
|
return /*#__PURE__*/React.createElement("col", {
|
|
55
|
-
key:
|
|
56
|
+
key: id,
|
|
56
57
|
span: colSpan
|
|
57
58
|
});
|
|
58
59
|
})), head.length > 0 && /*#__PURE__*/React.createElement("thead", {
|
package/lib/Text/styles.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import styled, { css } from 'styled-components';
|
|
2
|
-
import { COMMON, LAYOUT, TYPOGRAPHY } from "../utils/system-props";
|
|
2
|
+
import { COMMON, LAYOUT, FLEXBOX, GRID, TYPOGRAPHY } from "../utils/system-props";
|
|
3
3
|
var Container = styled.span.withConfig({
|
|
4
4
|
displayName: "styles__Container",
|
|
5
5
|
componentId: "sc-99cuku-0"
|
|
6
|
-
})(["margin:0;padding-left:0;padding-right:0;font-family:", ";font-style:", ";", " ", " ", " ", " ", ""], function (props) {
|
|
6
|
+
})(["margin:0;padding-left:0;padding-right:0;font-family:", ";font-style:", ";", " ", " ", " ", " ", " ", " ", ""], function (props) {
|
|
7
7
|
return props.theme.fontFamily;
|
|
8
8
|
}, function (props) {
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -13,5 +13,5 @@ var Container = styled.span.withConfig({
|
|
|
13
13
|
return props.truncated && css(["display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;"]);
|
|
14
14
|
}, function (props) {
|
|
15
15
|
return props.breakWord && css(["word-break:break-word;hyphens:auto;"]);
|
|
16
|
-
}, COMMON, LAYOUT, TYPOGRAPHY);
|
|
16
|
+
}, COMMON, LAYOUT, FLEXBOX, GRID, TYPOGRAPHY);
|
|
17
17
|
export default Container;
|
|
@@ -127,6 +127,12 @@ export var listening = {
|
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
export var growth = {
|
|
130
|
+
carousel: {
|
|
131
|
+
indicator: {
|
|
132
|
+
active: baseDarkTheme.colors.blue[600],
|
|
133
|
+
inactive: baseDarkTheme.colors.neutral[300]
|
|
134
|
+
}
|
|
135
|
+
},
|
|
130
136
|
education: {
|
|
131
137
|
decorative: {
|
|
132
138
|
aqua: baseDarkTheme.colors.aqua[600],
|
|
@@ -124,6 +124,12 @@ export var listening = {
|
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
126
|
export var growth = {
|
|
127
|
+
carousel: {
|
|
128
|
+
indicator: {
|
|
129
|
+
active: baseLightTheme.colors.blue[600],
|
|
130
|
+
inactive: baseLightTheme.colors.neutral[300]
|
|
131
|
+
}
|
|
132
|
+
},
|
|
127
133
|
education: {
|
|
128
134
|
decorative: {
|
|
129
135
|
aqua: baseLightTheme.colors.aqua[600],
|