@sproutsocial/racine 20.12.0 → 20.13.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/README.md +1 -0
- package/__flow__/EnumLogoNames.flow.js +1 -1
- package/__flow__/LogoViewBoxes.js +2 -0
- package/__flow__/types/theme.colors.flow.js +2 -0
- package/commonjs/Avatar/Avatar.flow.js +2 -2
- package/commonjs/Avatar/Avatar.js +10 -12
- package/commonjs/Avatar/constants.flow.js +2 -3
- package/commonjs/Avatar/constants.js +2 -3
- package/commonjs/Avatar/index.js +1 -2
- package/commonjs/Badge/Badge.flow.js +2 -2
- package/commonjs/Badge/Badge.js +3 -4
- package/commonjs/Badge/constants.flow.js +2 -3
- package/commonjs/Badge/constants.js +3 -5
- package/commonjs/Badge/index.js +1 -2
- package/commonjs/Badge/styles.js +1 -2
- package/commonjs/Banner/Banner.flow.js +2 -2
- package/commonjs/Banner/Banner.js +3 -4
- package/commonjs/Banner/index.js +1 -2
- package/commonjs/Banner/styles.js +5 -7
- package/commonjs/Box/Box.flow.js +2 -2
- package/commonjs/Box/Box.js +3 -4
- package/commonjs/Box/index.js +1 -2
- package/commonjs/Box/styles.js +1 -2
- package/commonjs/Breadcrumb/Breadcrumb.flow.js +2 -2
- package/commonjs/Breadcrumb/Breadcrumb.js +5 -6
- package/commonjs/Breadcrumb/index.js +1 -2
- package/commonjs/Breadcrumb/styles.js +1 -2
- package/commonjs/Button/Button.flow.js +2 -2
- package/commonjs/Button/Button.js +1 -2
- package/commonjs/Button/index.js +1 -2
- package/commonjs/Button/styles.js +4 -8
- package/commonjs/Card/Card.flow.js +2 -2
- package/commonjs/Card/Card.js +3 -4
- package/commonjs/Card/CardTypes.flow.js +2 -2
- package/commonjs/Card/index.js +1 -2
- package/commonjs/Card/styles.js +9 -17
- package/commonjs/Card/subComponents.js +9 -15
- package/commonjs/Card/utils.js +4 -7
- package/commonjs/CharacterCounter/CharacterCounter.flow.js +2 -2
- package/commonjs/CharacterCounter/CharacterCounter.js +10 -12
- package/commonjs/CharacterCounter/index.js +1 -2
- package/commonjs/CharacterCounter/styles.js +3 -4
- package/commonjs/ChartLegend/ChartLegend.flow.js +2 -2
- package/commonjs/ChartLegend/ChartLegend.js +3 -4
- package/commonjs/ChartLegend/index.js +1 -2
- package/commonjs/ChartLegend/styles.js +5 -8
- package/commonjs/ChartLegend/useChartLabels.js +2 -3
- package/commonjs/Checkbox/Checkbox.flow.js +2 -2
- package/commonjs/Checkbox/Checkbox.js +11 -13
- package/commonjs/Checkbox/index.js +1 -2
- package/commonjs/Checkbox/styles.js +9 -16
- package/commonjs/Collapsible/Collapsible.flow.js +2 -2
- package/commonjs/Collapsible/Collapsible.js +13 -13
- package/commonjs/Collapsible/index.js +1 -2
- package/commonjs/Collapsible/styles.js +2 -3
- package/commonjs/DatePicker/DateRangePicker/DateRangePicker.flow.js +2 -2
- package/commonjs/DatePicker/DateRangePicker/DateRangePicker.js +3 -4
- package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.flow.js +2 -2
- package/commonjs/DatePicker/DateRangePicker/StatefulDateRangePicker.js +4 -5
- package/commonjs/DatePicker/DateRangePicker/index.js +1 -2
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.flow.js +2 -2
- package/commonjs/DatePicker/SingleDatePicker/SingleDatePicker.js +3 -4
- package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.flow.js +2 -2
- package/commonjs/DatePicker/SingleDatePicker/StatefulSingleDatePicker.js +4 -5
- package/commonjs/DatePicker/SingleDatePicker/index.js +1 -2
- package/commonjs/DatePicker/common.js +9 -15
- package/commonjs/DatePicker/index.flow.js +2 -2
- package/commonjs/DatePicker/styles.js +5 -7
- package/commonjs/Drawer/Drawer.flow.js +2 -2
- package/commonjs/Drawer/Drawer.js +11 -11
- package/commonjs/Drawer/SlideTransition.js +4 -5
- package/commonjs/Drawer/index.js +1 -2
- package/commonjs/Drawer/styles.js +4 -6
- package/commonjs/EmptyState/EmptyState.flow.js +2 -2
- package/commonjs/EmptyState/EmptyState.js +3 -4
- package/commonjs/EmptyState/index.js +1 -2
- package/commonjs/Fieldset/Fieldset.flow.js +2 -2
- package/commonjs/Fieldset/Fieldset.js +3 -4
- package/commonjs/Fieldset/index.js +1 -2
- package/commonjs/Fieldset/styles.js +4 -5
- package/commonjs/FormField/FormField.flow.js +2 -2
- package/commonjs/FormField/FormField.js +5 -6
- package/commonjs/FormField/index.js +1 -2
- package/commonjs/Icon/Icon.flow.js +2 -2
- package/commonjs/Icon/Icon.js +5 -6
- package/commonjs/Icon/index.flow.js +2 -2
- package/commonjs/Icon/index.js +1 -2
- package/commonjs/Icon/styles.js +3 -4
- package/commonjs/Image/Image.flow.js +2 -2
- package/commonjs/Image/Image.js +11 -13
- package/commonjs/Image/index.js +1 -2
- package/commonjs/Image/styles.js +3 -4
- package/commonjs/Indicator/Indicator.flow.js +2 -2
- package/commonjs/Indicator/Indicator.js +10 -12
- package/commonjs/Indicator/index.js +1 -2
- package/commonjs/Indicator/styles.js +1 -2
- package/commonjs/Input/Input.flow.js +2 -2
- package/commonjs/Input/Input.js +12 -13
- package/commonjs/Input/index.js +1 -2
- package/commonjs/Input/styles.js +4 -6
- package/commonjs/KeyboardKey/KeyboardKey.flow.js +2 -2
- package/commonjs/KeyboardKey/KeyboardKey.js +11 -13
- package/commonjs/KeyboardKey/index.js +1 -2
- package/commonjs/KeyboardKey/styles.js +1 -2
- package/commonjs/Label/Label.flow.js +2 -2
- package/commonjs/Label/Label.js +11 -13
- package/commonjs/Label/index.js +1 -2
- package/commonjs/Link/Link.flow.js +2 -2
- package/commonjs/Link/Link.js +3 -4
- package/commonjs/Link/constants.js +1 -2
- package/commonjs/Link/index.js +1 -2
- package/commonjs/Link/styles.js +3 -4
- package/commonjs/Listbox/Listbox.flow.js +2 -2
- package/commonjs/Listbox/Listbox.js +8 -12
- package/commonjs/Listbox/index.js +3 -4
- package/commonjs/Loader/Loader.flow.js +2 -2
- package/commonjs/Loader/Loader.js +10 -12
- package/commonjs/Loader/index.js +1 -2
- package/commonjs/Loader/styles.js +4 -6
- package/commonjs/LoaderButton/LoaderButton.flow.js +2 -2
- package/commonjs/LoaderButton/LoaderButton.js +4 -6
- package/commonjs/LoaderButton/index.js +1 -2
- package/commonjs/LogoViewBoxes.js +2 -0
- package/commonjs/Menu/Menu.flow.js +2 -2
- package/commonjs/Menu/Menu.js +42 -50
- package/commonjs/Menu/index.js +3 -4
- package/commonjs/Menu/styles.js +5 -7
- package/commonjs/Menu/utils/constants.flow.js +3 -5
- package/commonjs/Menu/utils/constants.js +3 -5
- package/commonjs/Menu/utils/descendants.js +17 -16
- package/commonjs/Menu/utils/hooks.js +3 -6
- package/commonjs/Message/Message.flow.js +3 -4
- package/commonjs/Message/Message.js +3 -4
- package/commonjs/Message/constants.js +2 -3
- package/commonjs/Message/index.js +1 -2
- package/commonjs/Message/styles.js +5 -10
- package/commonjs/Modal/Modal.flow.js +2 -2
- package/commonjs/Modal/Modal.js +7 -7
- package/commonjs/Modal/index.js +1 -2
- package/commonjs/Modal/styles.js +8 -14
- package/commonjs/Numeral/Numeral.flow.js +2 -2
- package/commonjs/Numeral/Numeral.js +3 -4
- package/commonjs/Numeral/constants.js +7 -13
- package/commonjs/Numeral/index.js +1 -2
- package/commonjs/Numeral/styles.js +3 -5
- package/commonjs/PartnerLogo/PartnerLogo.flow.js +2 -2
- package/commonjs/PartnerLogo/PartnerLogo.js +1 -2
- package/commonjs/PartnerLogo/PartnerLogoTypes.js +4 -6
- package/commonjs/PartnerLogo/index.js +1 -2
- package/commonjs/PartnerLogo/styles.js +3 -4
- package/commonjs/Popout/Popout.flow.js +2 -2
- package/commonjs/Popout/Popout.js +21 -22
- package/commonjs/Popout/index.js +1 -2
- package/commonjs/Popout/styles.js +2 -3
- package/commonjs/Portal/Portal.flow.js +2 -2
- package/commonjs/Portal/Portal.js +11 -13
- package/commonjs/Portal/index.js +1 -2
- package/commonjs/Radio/Radio.flow.js +2 -2
- package/commonjs/Radio/Radio.js +11 -13
- package/commonjs/Radio/index.js +1 -2
- package/commonjs/Radio/styles.js +6 -10
- package/commonjs/SegmentedControl/SegmentedControl.flow.js +2 -2
- package/commonjs/SegmentedControl/SegmentedControl.js +8 -8
- package/commonjs/SegmentedControl/index.js +1 -2
- package/commonjs/SegmentedControl/styles.js +6 -9
- package/commonjs/Select/Select.flow.js +2 -2
- package/commonjs/Select/Select.js +11 -13
- package/commonjs/Select/index.js +1 -2
- package/commonjs/Select/styles.js +4 -6
- package/commonjs/Skeleton/Skeleton.js +1 -2
- package/commonjs/Skeleton/index.js +1 -2
- package/commonjs/SpotIllustration/SpotIllustration.flow.js +2 -2
- package/commonjs/SpotIllustration/SpotIllustration.js +3 -4
- package/commonjs/SpotIllustration/illustrationNames.js +1 -2
- package/commonjs/SpotIllustration/index.js +1 -2
- package/commonjs/Stack/Stack.flow.js +2 -2
- package/commonjs/Stack/Stack.js +6 -6
- package/commonjs/Stack/index.js +1 -2
- package/commonjs/Switch/Switch.flow.js +2 -2
- package/commonjs/Switch/Switch.js +3 -4
- package/commonjs/Switch/index.js +1 -2
- package/commonjs/Switch/styles.js +4 -5
- package/commonjs/Table/Table.flow.js +2 -2
- package/commonjs/Table/Table.js +7 -12
- package/commonjs/Table/index.js +1 -2
- package/commonjs/Table/styles.js +1 -2
- package/commonjs/TableCell/TableCell.flow.js +2 -2
- package/commonjs/TableCell/TableCell.js +11 -14
- package/commonjs/TableCell/index.js +1 -2
- package/commonjs/TableCell/styles.js +1 -2
- package/commonjs/TableHeaderCell/TableHeaderCell.flow.js +4 -5
- package/commonjs/TableHeaderCell/TableHeaderCell.js +12 -15
- package/commonjs/TableHeaderCell/constants.js +2 -3
- package/commonjs/TableHeaderCell/index.js +1 -2
- package/commonjs/TableHeaderCell/styles.js +5 -8
- package/commonjs/TableRowAccordion/TableRowAccordion.flow.js +2 -2
- package/commonjs/TableRowAccordion/TableRowAccordion.js +12 -14
- package/commonjs/TableRowAccordion/index.js +1 -2
- package/commonjs/TableRowAccordion/styles.js +5 -8
- package/commonjs/Tabs/Tabs.flow.js +2 -2
- package/commonjs/Tabs/Tabs.js +12 -15
- package/commonjs/Tabs/index.js +1 -2
- package/commonjs/Tabs/styles.js +5 -8
- package/commonjs/Text/Text.flow.js +2 -2
- package/commonjs/Text/Text.js +3 -4
- package/commonjs/Text/index.js +1 -2
- package/commonjs/Text/styles.js +3 -4
- package/commonjs/Textarea/Textarea.flow.js +2 -2
- package/commonjs/Textarea/Textarea.js +11 -13
- package/commonjs/Textarea/index.js +1 -2
- package/commonjs/Textarea/styles.js +4 -6
- package/commonjs/ThemeProvider/index.flow.js +2 -2
- package/commonjs/ThemeProvider/index.js +3 -4
- package/commonjs/Toast/Toast.flow.js +2 -2
- package/commonjs/Toast/Toast.js +3 -4
- package/commonjs/Toast/index.js +3 -4
- package/commonjs/Toast/styles.js +6 -8
- package/commonjs/ToggleHint/ToggleHint.flow.js +2 -2
- package/commonjs/ToggleHint/ToggleHint.js +11 -13
- package/commonjs/ToggleHint/index.js +1 -2
- package/commonjs/ToggleHint/styles.js +4 -6
- package/commonjs/Token/Token.flow.js +2 -2
- package/commonjs/Token/Token.js +3 -4
- package/commonjs/Token/index.js +3 -4
- package/commonjs/Token/styles.js +3 -4
- package/commonjs/TokenInput/TokenInput.flow.js +2 -2
- package/commonjs/TokenInput/TokenInput.js +12 -14
- package/commonjs/TokenInput/TokenScreenReaderStatus.js +4 -5
- package/commonjs/TokenInput/index.js +1 -2
- package/commonjs/TokenInput/styles.js +3 -4
- package/commonjs/TokenInput/util.js +3 -5
- package/commonjs/Tooltip/Tooltip.flow.js +2 -2
- package/commonjs/Tooltip/Tooltip.js +11 -11
- package/commonjs/Tooltip/index.js +1 -2
- package/commonjs/Tooltip/styles.js +2 -3
- package/commonjs/VisuallyHidden/VisuallyHidden.flow.js +2 -2
- package/commonjs/VisuallyHidden/VisuallyHidden.js +2 -3
- package/commonjs/illustrationNames.js +1 -2
- package/commonjs/index.flow.js +2 -2
- package/commonjs/logoNames.js +1 -2
- package/commonjs/systemProps/background.flow.js +1 -2
- package/commonjs/systemProps/border.flow.js +1 -2
- package/commonjs/systemProps/color.flow.js +1 -2
- package/commonjs/systemProps/custom.flow.js +2 -3
- package/commonjs/systemProps/flexbox.flow.js +1 -2
- package/commonjs/systemProps/grid.flow.js +1 -2
- package/commonjs/systemProps/index.js +5 -7
- package/commonjs/systemProps/layout.flow.js +1 -2
- package/commonjs/systemProps/position.flow.js +1 -2
- package/commonjs/systemProps/shadow.flow.js +1 -2
- package/commonjs/systemProps/space.flow.js +1 -2
- package/commonjs/systemProps/systemProps.flow.js +1 -2
- package/commonjs/systemProps/typography.flow.js +1 -2
- package/commonjs/systemProps/variant.flow.js +2 -3
- package/commonjs/themes/dark/dataviz-palette.js +2 -3
- package/commonjs/themes/dark/decorative-palettes.js +12 -23
- package/commonjs/themes/dark/theme.js +5 -6
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.flow.js +1 -2
- package/commonjs/themes/extendedThemes/sproutTheme/dark/theme.js +9 -16
- package/commonjs/themes/extendedThemes/sproutTheme/light/theme.js +9 -16
- package/commonjs/themes/light/dataviz-palette.js +2 -3
- package/commonjs/themes/light/decorative-palettes.js +12 -23
- package/commonjs/themes/light/literal-colors.js +1 -2
- package/commonjs/themes/light/theme.js +22 -34
- package/commonjs/types/shared.flow.js +2 -2
- package/commonjs/types/styled-components.flow.js +2 -2
- package/commonjs/utils/a11yTest.js +2 -3
- package/commonjs/utils/chartColors.js +5 -9
- package/commonjs/utils/constants.js +1 -2
- package/commonjs/utils/dataQaLabelQueries.js +2 -3
- package/commonjs/utils/hooks.flow.js +1 -0
- package/commonjs/utils/hooks.js +4 -6
- package/commonjs/utils/index.js +2 -4
- package/commonjs/utils/innerText.flow.js +2 -2
- package/commonjs/utils/innerText.js +1 -2
- package/commonjs/utils/mixins.js +5 -10
- package/commonjs/utils/react-testing-library.flow.js +2 -2
- package/commonjs/utils/react-testing-library.js +5 -8
- package/commonjs/utils/responsiveProps/index.js +2 -3
- package/commonjs/utils/system-props/gap.js +2 -3
- package/commonjs/utils/system-props/system-props.js +9 -16
- package/commonjs/utils/useInteractiveColor.js +2 -3
- package/dist/logo.svg +1 -1
- package/dist/logoList.js +1 -1
- package/dist/themes/dark/theme.scss +2 -1
- package/dist/themes/extendedThemes/sproutTheme/dark/theme.scss +2 -1
- package/dist/themes/extendedThemes/sproutTheme/light/theme.scss +4 -2
- package/dist/themes/light/theme.scss +4 -2
- package/dist/types/Button/styles.d.ts.map +1 -1
- package/dist/types/EnumLogoNames.d.ts +1 -1
- package/dist/types/EnumLogoNames.d.ts.map +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts +1 -1
- package/dist/types/PartnerLogo/PartnerLogoTypes.d.ts.map +1 -1
- package/dist/types/logoNames.d.ts +1 -1
- package/dist/types/logoNames.d.ts.map +1 -1
- package/dist/types/themes/dark/theme.d.ts +19 -18
- package/dist/types/themes/dark/theme.d.ts.map +1 -1
- package/dist/types/themes/light/theme.d.ts +29 -27
- package/dist/types/themes/light/theme.d.ts.map +1 -1
- package/dist/types/types/theme.colors.d.ts +2 -0
- package/dist/types/types/theme.colors.d.ts.map +1 -1
- package/lib/Breadcrumb/Breadcrumb.js +2 -2
- package/lib/Button/styles.js +1 -4
- package/lib/CharacterCounter/CharacterCounter.js +7 -8
- package/lib/Checkbox/Checkbox.js +8 -9
- package/lib/Collapsible/Collapsible.js +2 -2
- package/lib/Drawer/Drawer.js +2 -2
- package/lib/FormField/FormField.js +2 -2
- package/lib/Icon/Icon.js +2 -2
- package/lib/Image/Image.js +8 -9
- package/lib/Indicator/Indicator.js +7 -8
- package/lib/Input/Input.js +9 -9
- package/lib/KeyboardKey/KeyboardKey.js +7 -8
- package/lib/Label/Label.js +7 -8
- package/lib/Listbox/Listbox.js +2 -2
- package/lib/Loader/Loader.js +7 -8
- package/lib/LogoViewBoxes.js +2 -0
- package/lib/Menu/Menu.js +2 -2
- package/lib/Menu/utils/descendants.js +2 -2
- package/lib/Popout/Popout.js +2 -2
- package/lib/Portal/Portal.js +8 -9
- package/lib/Radio/Radio.js +8 -9
- package/lib/Select/Select.js +8 -9
- package/lib/TableCell/TableCell.js +7 -8
- package/lib/TableHeaderCell/TableHeaderCell.js +8 -9
- package/lib/TableRowAccordion/TableRowAccordion.js +8 -9
- package/lib/Tabs/Tabs.js +9 -11
- package/lib/Textarea/Textarea.js +8 -9
- package/lib/ToggleHint/ToggleHint.js +8 -9
- package/lib/TokenInput/TokenInput.js +8 -9
- package/lib/Tooltip/Tooltip.js +2 -2
- package/lib/logoNames.js +1 -1
- package/lib/systemProps/space.flow.js +14 -0
- package/lib/themes/dark/theme.js +2 -2
- package/lib/themes/extendedThemes/sproutTheme/dark/theme.js +2 -2
- package/lib/themes/extendedThemes/sproutTheme/light/theme.js +2 -2
- package/lib/themes/light/theme.js +7 -4
- package/lib/utils/hooks.flow.js +1 -0
- package/lib/utils/hooks.js +2 -2
- package/lib/utils/react-testing-library.js +2 -2
- package/package.json +16 -24
|
@@ -7,15 +7,13 @@ exports.Container = exports.AbbrContainer = void 0;
|
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _Text = _interopRequireDefault(require("../Text"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
var Container = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
10
|
+
var Container = exports.Container = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
11
11
|
displayName: "styles__Container",
|
|
12
12
|
componentId: "sc-19ypa4h-0"
|
|
13
13
|
})(["font-variant-numeric:tabular-nums;"]);
|
|
14
|
-
exports.
|
|
15
|
-
var AbbrContainer = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
14
|
+
var AbbrContainer = exports.AbbrContainer = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
16
15
|
displayName: "styles__AbbrContainer",
|
|
17
16
|
componentId: "sc-19ypa4h-1"
|
|
18
17
|
})(["font-variant-numeric:tabular-nums;border-bottom:1px dotted ", ";"], function (props) {
|
|
19
18
|
return props.theme.colors.container.border.base;
|
|
20
|
-
});
|
|
21
|
-
exports.AbbrContainer = AbbrContainer;
|
|
19
|
+
});
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
|
-
function _getRequireWildcardCache(
|
|
6
|
-
function _interopRequireWildcard(
|
|
5
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
6
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -9,19 +9,17 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Use PartnerLogoNames instead
|
|
11
11
|
*/
|
|
12
|
-
var PartnerNames = _logoNames.default;
|
|
12
|
+
var PartnerNames = exports.PartnerNames = _logoNames.default;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @deprecated Use EnumLogoNames instead
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
var PartnerLogoSizes = {
|
|
17
|
+
|
|
18
|
+
var PartnerLogoSizes = exports.PartnerLogoSizes = {
|
|
19
19
|
mini: '12px',
|
|
20
20
|
small: '16px',
|
|
21
21
|
medium: '24px',
|
|
22
22
|
large: '32px',
|
|
23
23
|
jumbo: '64px'
|
|
24
24
|
};
|
|
25
|
-
exports.
|
|
26
|
-
var PartnerLogoTypes = ['symbol', 'wordmark', 'lockup'];
|
|
27
|
-
exports.PartnerLogoTypes = PartnerLogoTypes;
|
|
25
|
+
var PartnerLogoTypes = exports.PartnerLogoTypes = ['symbol', 'wordmark', 'lockup'];
|
|
@@ -27,5 +27,4 @@ Object.keys(_PartnerLogoTypes).forEach(function (key) {
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
-
var _default = _PartnerLogo.default;
|
|
31
|
-
exports.default = _default;
|
|
30
|
+
var _default = exports.default = _PartnerLogo.default;
|
|
@@ -8,8 +8,8 @@ exports.default = void 0;
|
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _styledSystem = require("styled-system");
|
|
10
10
|
var _systemProps = require("../utils/system-props");
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
13
|
var sizes = {
|
|
14
14
|
mini: '12px',
|
|
15
15
|
small: '16px',
|
|
@@ -28,5 +28,4 @@ var Container = (0, _styledComponents.default)('span').withConfig({
|
|
|
28
28
|
})(["display:inline-block;color:inherit;vertical-align:middle;", " ", " ", " ", ""], _systemProps.COMMON, _systemProps.FLEXBOX, _styledSystem.verticalAlign, function (props) {
|
|
29
29
|
return stylesForSize(props.height, props.width, sizes[props.logoSize]);
|
|
30
30
|
});
|
|
31
|
-
var _default = Container;
|
|
32
|
-
exports.default = _default;
|
|
31
|
+
var _default = exports.default = Container;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
|
-
function _getRequireWildcardCache(
|
|
6
|
-
function _interopRequireWildcard(
|
|
5
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
6
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.Popout = Popout;
|
|
8
8
|
exports.placements = exports.default = void 0;
|
|
9
|
-
var
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var React = _react;
|
|
10
11
|
var _reactSpring = require("react-spring");
|
|
11
12
|
var _reactFocusLock = _interopRequireDefault(require("react-focus-lock"));
|
|
12
13
|
var _reactPopper = require("react-popper");
|
|
@@ -19,14 +20,14 @@ var _excluded = ["isOpen", "setIsOpen", "content", "children", "placement", "ful
|
|
|
19
20
|
_excluded2 = ["autoFocus", "returnFocus"],
|
|
20
21
|
_excluded3 = ["children"];
|
|
21
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
function _getRequireWildcardCache(
|
|
23
|
-
function _interopRequireWildcard(
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
25
|
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); }
|
|
25
26
|
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; }
|
|
26
27
|
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; }
|
|
27
28
|
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; }
|
|
28
|
-
function _toPropertyKey(
|
|
29
|
-
function _toPrimitive(
|
|
29
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
30
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
31
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
31
32
|
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."); }
|
|
32
33
|
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); }
|
|
@@ -35,7 +36,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
35
36
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
36
37
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
37
38
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
38
|
-
var placements = {
|
|
39
|
+
var placements = exports.placements = {
|
|
39
40
|
auto: 'auto',
|
|
40
41
|
top: 'top',
|
|
41
42
|
right: 'right',
|
|
@@ -50,7 +51,6 @@ var placements = {
|
|
|
50
51
|
'bottom-end': 'bottom-end',
|
|
51
52
|
'left-end': 'left-end'
|
|
52
53
|
};
|
|
53
|
-
exports.placements = placements;
|
|
54
54
|
var doesRefContainEventTarget = function doesRefContainEventTarget(ref, event) {
|
|
55
55
|
return ref.current && event.target instanceof Node && ref.current.contains(event.target);
|
|
56
56
|
};
|
|
@@ -102,24 +102,24 @@ function Popout(_ref) {
|
|
|
102
102
|
id = _ref.id,
|
|
103
103
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
104
104
|
var PopoutComponentWrapper = appendToBody ? _Portal.default : React.Fragment;
|
|
105
|
-
var _useState = (0,
|
|
105
|
+
var _useState = (0, _react.useState)(false),
|
|
106
106
|
_useState2 = _slicedToArray(_useState, 2),
|
|
107
107
|
isInternalShown = _useState2[0],
|
|
108
108
|
setIsInternalShown = _useState2[1];
|
|
109
109
|
var isControlled = typeof isOpen === 'boolean';
|
|
110
110
|
var isShown = isControlled ? isOpen : isInternalShown;
|
|
111
|
-
var setIsShown = (0,
|
|
111
|
+
var setIsShown = (0, _react.useMemo)(function () {
|
|
112
112
|
return isControlled && setIsOpen ? setIsOpen : function (nextIsShown) {
|
|
113
113
|
return setIsInternalShown(nextIsShown);
|
|
114
114
|
};
|
|
115
115
|
}, [isControlled, setIsOpen]);
|
|
116
|
-
var targetRef = (0,
|
|
117
|
-
var popoutRef = (0,
|
|
118
|
-
var isFirstRender = (0,
|
|
116
|
+
var targetRef = (0, _react.useRef)();
|
|
117
|
+
var popoutRef = (0, _react.useRef)();
|
|
118
|
+
var isFirstRender = (0, _react.useRef)(true);
|
|
119
119
|
|
|
120
120
|
// This callback will automatically trigger a recalculation of the popout position if the content is changed
|
|
121
121
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
122
|
-
var scheduleUpdateCallback = (0,
|
|
122
|
+
var scheduleUpdateCallback = (0, _react.useRef)(function () {});
|
|
123
123
|
(0, _hooks.useMutationObserver)((_popoutRef$current = popoutRef.current) !== null && _popoutRef$current !== void 0 ? _popoutRef$current : null, {
|
|
124
124
|
childList: true,
|
|
125
125
|
characterData: true,
|
|
@@ -134,16 +134,16 @@ function Popout(_ref) {
|
|
|
134
134
|
|
|
135
135
|
// Callbacks for showing, hiding, and toggling visibility of the popout
|
|
136
136
|
// (Not used when isOpen is passed explicitly)
|
|
137
|
-
var show = (0,
|
|
137
|
+
var show = (0, _react.useCallback)(function () {
|
|
138
138
|
return setIsShown(true);
|
|
139
139
|
}, [setIsShown]);
|
|
140
|
-
var hide = (0,
|
|
140
|
+
var hide = (0, _react.useCallback)(function () {
|
|
141
141
|
return setIsShown(false);
|
|
142
142
|
}, [setIsShown]);
|
|
143
|
-
var toggle = (0,
|
|
143
|
+
var toggle = (0, _react.useCallback)(function () {
|
|
144
144
|
return setIsShown(!isShown);
|
|
145
145
|
}, [isShown, setIsShown]);
|
|
146
|
-
(0,
|
|
146
|
+
(0, _react.useEffect)(function () {
|
|
147
147
|
var documentBody = document.body;
|
|
148
148
|
if (isShown && documentBody) {
|
|
149
149
|
// Callback passed to a click handler attached to document.body,
|
|
@@ -175,7 +175,7 @@ function Popout(_ref) {
|
|
|
175
175
|
}, [isShown, setIsShown]);
|
|
176
176
|
|
|
177
177
|
// Manage onOpen and onClose callbacks
|
|
178
|
-
(0,
|
|
178
|
+
(0, _react.useEffect)(function () {
|
|
179
179
|
// Don't fire onClose on the first render
|
|
180
180
|
if (isFirstRender.current) {
|
|
181
181
|
isFirstRender.current = false;
|
|
@@ -195,7 +195,7 @@ function Popout(_ref) {
|
|
|
195
195
|
[isShown]);
|
|
196
196
|
var transitions = (0, _reactSpring.useTransition)(isShown, null, transitionConfig);
|
|
197
197
|
// WAI-Aria properties for the popout trigger, disabled if necessary
|
|
198
|
-
var ariaProps = (0,
|
|
198
|
+
var ariaProps = (0, _react.useMemo)(function () {
|
|
199
199
|
return disableWrapperAria ? {} : {
|
|
200
200
|
'aria-expanded': isShown,
|
|
201
201
|
'aria-haspopup': ariaHasPopup ? ariaHasPopup : true
|
|
@@ -206,7 +206,7 @@ function Popout(_ref) {
|
|
|
206
206
|
// to wait for the targetRef to receive a value before rendering the popout. Otherwise,
|
|
207
207
|
// the Popout component renders, but doesn't know how to position itself due the
|
|
208
208
|
// `refereElement` property being undefined.
|
|
209
|
-
var _useState3 = (0,
|
|
209
|
+
var _useState3 = (0, _react.useState)(
|
|
210
210
|
// Only trigger this shouldRenderPopout logic when using a controlled component.
|
|
211
211
|
// The reason for that is because controlled components may render the popout
|
|
212
212
|
// immediately before the targetRef has a value set to it.
|
|
@@ -302,5 +302,4 @@ var PopoutContent = function PopoutContent(_ref4) {
|
|
|
302
302
|
};
|
|
303
303
|
PopoutContent.displayName = 'Popout.Content';
|
|
304
304
|
Popout.Content = PopoutContent;
|
|
305
|
-
var _default = Popout;
|
|
306
|
-
exports.default = _default;
|
|
305
|
+
var _default = exports.default = Popout;
|
package/commonjs/Popout/index.js
CHANGED
|
@@ -27,5 +27,4 @@ Object.keys(_PopoutTypes).forEach(function (key) {
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
-
var _default = _Popout.default;
|
|
31
|
-
exports.default = _default;
|
|
30
|
+
var _default = exports.default = _Popout.default;
|
|
@@ -7,8 +7,7 @@ exports.TargetWrapper = void 0;
|
|
|
7
7
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
8
|
var _systemProps = require("../utils/system-props");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
var TargetWrapper = _styledComponents.default.div.withConfig({
|
|
10
|
+
var TargetWrapper = exports.TargetWrapper = _styledComponents.default.div.withConfig({
|
|
11
11
|
displayName: "styles__TargetWrapper",
|
|
12
12
|
componentId: "sc-pftzv7-0"
|
|
13
|
-
})(["display:inline-block;", " ", ""], _systemProps.COMMON, _systemProps.LAYOUT);
|
|
14
|
-
exports.TargetWrapper = TargetWrapper;
|
|
13
|
+
})(["display:inline-block;", " ", ""], _systemProps.COMMON, _systemProps.LAYOUT);
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
|
-
function _getRequireWildcardCache(
|
|
6
|
-
function _interopRequireWildcard(
|
|
5
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
6
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -7,29 +7,28 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactDom = require("react-dom");
|
|
9
9
|
var _utils = require("../utils");
|
|
10
|
-
function _getRequireWildcardCache(
|
|
11
|
-
function _interopRequireWildcard(
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
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); }
|
|
13
13
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
14
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
15
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
16
|
-
function
|
|
17
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
18
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
16
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
19
17
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
20
|
-
function
|
|
21
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
22
19
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
21
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
22
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
23
23
|
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; }
|
|
24
|
-
function _toPropertyKey(
|
|
25
|
-
function _toPrimitive(
|
|
26
|
-
var Portal = /*#__PURE__*/function (_React$Component) {
|
|
24
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
25
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
26
|
+
var Portal = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
27
27
|
_inherits(Portal, _React$Component);
|
|
28
|
-
var _super = _createSuper(Portal);
|
|
29
28
|
function Portal(props) {
|
|
30
29
|
var _this;
|
|
31
30
|
_classCallCheck(this, Portal);
|
|
32
|
-
_this =
|
|
31
|
+
_this = _callSuper(this, Portal, [props]);
|
|
33
32
|
_defineProperty(_assertThisInitialized(_this), "el", null);
|
|
34
33
|
if ((0, _utils.canUseDOM)()) {
|
|
35
34
|
var as = props.as,
|
|
@@ -79,7 +78,6 @@ var Portal = /*#__PURE__*/function (_React$Component) {
|
|
|
79
78
|
}]);
|
|
80
79
|
return Portal;
|
|
81
80
|
}(React.Component);
|
|
82
|
-
exports.default = Portal;
|
|
83
81
|
_defineProperty(Portal, "defaultProps", {
|
|
84
82
|
as: 'div',
|
|
85
83
|
id: ''
|
package/commonjs/Portal/index.js
CHANGED
|
@@ -19,5 +19,4 @@ Object.keys(_PortalTypes).forEach(function (key) {
|
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
22
|
-
var _default = _Portal.default;
|
|
23
|
-
exports.default = _default;
|
|
22
|
+
var _default = exports.default = _Portal.default;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
|
-
function _getRequireWildcardCache(
|
|
6
|
-
function _interopRequireWildcard(
|
|
5
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
6
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
package/commonjs/Radio/Radio.js
CHANGED
|
@@ -7,8 +7,8 @@ exports.default = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _styles = _interopRequireWildcard(require("./styles"));
|
|
9
9
|
var _excluded = ["id", "value", "name", "label", "checked", "disabled", "onChange", "onFocus", "onBlur", "ariaLabel", "qa", "color"];
|
|
10
|
-
function _getRequireWildcardCache(
|
|
11
|
-
function _interopRequireWildcard(
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
12
|
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); }
|
|
13
13
|
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); }
|
|
14
14
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -16,29 +16,28 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
16
16
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
17
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
18
18
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
19
|
-
function
|
|
20
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
19
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
22
20
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
23
|
-
function
|
|
24
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
22
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
23
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
24
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
25
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
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
|
-
function _toPropertyKey(
|
|
28
|
-
function _toPrimitive(
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
28
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
29
29
|
/**
|
|
30
30
|
* Primitive Radio Element
|
|
31
31
|
*/
|
|
32
|
-
var Radio = /*#__PURE__*/function (_React$Component) {
|
|
32
|
+
var Radio = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
33
33
|
_inherits(Radio, _React$Component);
|
|
34
|
-
var _super = _createSuper(Radio);
|
|
35
34
|
function Radio() {
|
|
36
35
|
var _this;
|
|
37
36
|
_classCallCheck(this, Radio);
|
|
38
37
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
39
38
|
args[_key] = arguments[_key];
|
|
40
39
|
}
|
|
41
|
-
_this =
|
|
40
|
+
_this = _callSuper(this, Radio, [].concat(args));
|
|
42
41
|
_defineProperty(_assertThisInitialized(_this), "handleChange", function (e) {
|
|
43
42
|
if (!!_this.props.checked || _this.props.disabled) {
|
|
44
43
|
return;
|
|
@@ -106,7 +105,6 @@ var Radio = /*#__PURE__*/function (_React$Component) {
|
|
|
106
105
|
}]);
|
|
107
106
|
return Radio;
|
|
108
107
|
}(React.Component);
|
|
109
|
-
exports.default = Radio;
|
|
110
108
|
_defineProperty(Radio, "defaultProps", {
|
|
111
109
|
disabled: false
|
|
112
110
|
});
|
package/commonjs/Radio/index.js
CHANGED
|
@@ -27,5 +27,4 @@ Object.keys(_RadioTypes).forEach(function (key) {
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
|
-
var _default = _Radio.default;
|
|
31
|
-
exports.default = _default;
|
|
30
|
+
var _default = exports.default = _Radio.default;
|
package/commonjs/Radio/styles.js
CHANGED
|
@@ -10,14 +10,14 @@ var _mixins = require("../utils/mixins");
|
|
|
10
10
|
var _systemProps = require("../utils/system-props");
|
|
11
11
|
var _Text = _interopRequireDefault(require("../Text"));
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
13
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
14
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
15
|
var Container = _styledComponents.default.span.withConfig({
|
|
16
16
|
displayName: "styles__Container",
|
|
17
17
|
componentId: "sc-w38s4t-0"
|
|
18
18
|
})(["display:inline-flex;align-items:center;box-sizing:border-box;", ""], _systemProps.COMMON);
|
|
19
19
|
Container.displayName = 'Radio';
|
|
20
|
-
var Input = _styledComponents.default.input.withConfig({
|
|
20
|
+
var Input = exports.Input = _styledComponents.default.input.withConfig({
|
|
21
21
|
displayName: "styles__Input",
|
|
22
22
|
componentId: "sc-w38s4t-1"
|
|
23
23
|
})(["box-sizing:border-box;position:absolute;top:0;left:0;width:100%;height:100%;margin:0;appearance:none;cursor:", ";border:1px solid ", ";border-radius:50%;background-color:", ";transition:border-color ", " ", ",background-color ", " ", ";&:focus{", "}"], function (props) {
|
|
@@ -35,9 +35,8 @@ var Input = _styledComponents.default.input.withConfig({
|
|
|
35
35
|
}, function (props) {
|
|
36
36
|
return props.theme.easing.ease_in;
|
|
37
37
|
}, _mixins.focusRing);
|
|
38
|
-
exports.Input = Input;
|
|
39
38
|
Input.displayName = 'Input';
|
|
40
|
-
var InputWrapper = _styledComponents.default.span.withConfig({
|
|
39
|
+
var InputWrapper = exports.InputWrapper = _styledComponents.default.span.withConfig({
|
|
41
40
|
displayName: "styles__InputWrapper",
|
|
42
41
|
componentId: "sc-w38s4t-2"
|
|
43
42
|
})(["position:relative;width:", ";height:", ";cursor:", ";", " &:before{content:'';position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:6px;height:6px;border-radius:50%;opacity:0;transition:opacity ", " ", ";z-index:1;pointer-events:none;cursor:", ";}", " ", ""], function (props) {
|
|
@@ -59,9 +58,8 @@ var InputWrapper = _styledComponents.default.span.withConfig({
|
|
|
59
58
|
}, function (props) {
|
|
60
59
|
return props.checked && (0, _styledComponents.css)(["", "{border-color:", ";background-color:", ";}&:before{opacity:1;background-color:", ";}"], Input, props.theme.colors.form.border.selected, props.theme.colors.form.background.selected, props.theme.colors.form.background.base);
|
|
61
60
|
});
|
|
62
|
-
exports.InputWrapper = InputWrapper;
|
|
63
61
|
InputWrapper.displayName = 'InputWrapper';
|
|
64
|
-
var LabelText = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
62
|
+
var LabelText = exports.LabelText = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
65
63
|
displayName: "styles__LabelText",
|
|
66
64
|
componentId: "sc-w38s4t-3"
|
|
67
65
|
})(["margin-left:", ";font-size:", ";line-height:1;cursor:", ";color:", ";", ""], function (props) {
|
|
@@ -75,7 +73,5 @@ var LabelText = (0, _styledComponents.default)(_Text.default).withConfig({
|
|
|
75
73
|
}, function (props) {
|
|
76
74
|
return props.disabled && (0, _styledComponents.css)(["opacity:0.4;"]);
|
|
77
75
|
});
|
|
78
|
-
exports.LabelText = LabelText;
|
|
79
76
|
LabelText.displayName = 'LabelText';
|
|
80
|
-
var _default = Container;
|
|
81
|
-
exports.default = _default;
|
|
77
|
+
var _default = exports.default = Container;
|
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
|
|
3
3
|
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); }
|
|
4
4
|
var React = _interopRequireWildcard(require("react"));
|
|
5
|
-
function _getRequireWildcardCache(
|
|
6
|
-
function _interopRequireWildcard(
|
|
5
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
6
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -5,14 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var React = _react;
|
|
9
10
|
var _Box = _interopRequireDefault(require("../Box"));
|
|
10
11
|
var _styles = require("./styles");
|
|
11
12
|
var _excluded = ["value", "children"],
|
|
12
13
|
_excluded2 = ["selectedValue", "label", "onChange", "children"];
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
17
|
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); }
|
|
17
18
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
19
|
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."); }
|
|
@@ -29,7 +30,7 @@ var SegmentedControlItem = function SegmentedControlItem(_ref) {
|
|
|
29
30
|
var value = _ref.value,
|
|
30
31
|
children = _ref.children,
|
|
31
32
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
-
var context = (0,
|
|
33
|
+
var context = (0, _react.useContext)(SegmentedControlContext);
|
|
33
34
|
if (!context) {
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
@@ -38,7 +39,7 @@ var SegmentedControlItem = function SegmentedControlItem(_ref) {
|
|
|
38
39
|
onChange = context.onChange;
|
|
39
40
|
|
|
40
41
|
/* eslint-disable-next-line */
|
|
41
|
-
var _useState = (0,
|
|
42
|
+
var _useState = (0, _react.useState)("".concat(name, "-").concat(idCounter++)),
|
|
42
43
|
_useState2 = _slicedToArray(_useState, 1),
|
|
43
44
|
id = _useState2[0];
|
|
44
45
|
var isChecked = value === selectedValue;
|
|
@@ -65,7 +66,7 @@ var SegmentedControl = function SegmentedControl(_ref2) {
|
|
|
65
66
|
onChange = _ref2.onChange,
|
|
66
67
|
children = _ref2.children,
|
|
67
68
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
68
|
-
var _useState3 = (0,
|
|
69
|
+
var _useState3 = (0, _react.useState)("Racine-segmented-control-".concat(nameCounter++)),
|
|
69
70
|
_useState4 = _slicedToArray(_useState3, 1),
|
|
70
71
|
name = _useState4[0];
|
|
71
72
|
return /*#__PURE__*/React.createElement(SegmentedControlContext.Provider, {
|
|
@@ -84,5 +85,4 @@ var SegmentedControl = function SegmentedControl(_ref2) {
|
|
|
84
85
|
};
|
|
85
86
|
SegmentedControlItem.displayName = 'SegmentedControl.Item';
|
|
86
87
|
SegmentedControl.Item = SegmentedControlItem;
|
|
87
|
-
var _default = SegmentedControl;
|
|
88
|
-
exports.default = _default;
|
|
88
|
+
var _default = exports.default = SegmentedControl;
|