@algolia/satellite 1.0.0-beta.160 → 1.0.0-beta.162
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/cjs/AnnouncementBadge/AnnouncementBadge.d.ts +2 -2
- package/cjs/AutoComplete/AutoComplete.tailwind.js +4 -1
- package/cjs/AutoComplete/components/AutoCompleteEmptyState.d.ts +2 -2
- package/cjs/AutoComplete/components/DefaultOptionItem.d.ts +2 -2
- package/cjs/Avatars/ApplicationAvatar.d.ts +2 -2
- package/cjs/Avatars/UserAvatar.d.ts +2 -2
- package/cjs/Badge/Badge.d.ts +3 -3
- package/cjs/Badge/Badge.js +6 -3
- package/cjs/Banners/Alert/Alert.d.ts +2 -2
- package/cjs/Banners/BigBertha/BigBertha.d.ts +2 -2
- package/cjs/Banners/Promote/Promote.d.ts +2 -2
- package/cjs/Button/ButtonGroup.d.ts +2 -2
- package/cjs/Button/PolymorphicIconButton.d.ts +1 -1
- package/cjs/Button/PolymorphicIconButton.js +4 -4
- package/cjs/Card/components/CardHeader.d.ts +2 -2
- package/cjs/Card/components/CardTitle.d.ts +2 -2
- package/cjs/Checkbox/Checkbox.js +3 -3
- package/cjs/Checkbox/Checkbox.tailwind.js +1 -1
- package/cjs/ClickAwayContainer/ClickAwayContainer.d.ts +2 -2
- package/cjs/DatePicker/DatePicker/DatePicker.d.ts +2 -2
- package/cjs/DatePicker/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/cjs/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +2 -2
- package/cjs/DatePicker/components/Calendar.d.ts +2 -2
- package/cjs/DatePicker/components/Display.d.ts +2 -2
- package/cjs/DatePicker/components/Footer.d.ts +2 -2
- package/cjs/DatePicker/components/FooterActions.d.ts +2 -2
- package/cjs/DatePicker/components/Modal.d.ts +2 -2
- package/cjs/DatePicker/components/NavBar.d.ts +2 -2
- package/cjs/DatePicker/components/SidePanel.d.ts +2 -2
- package/cjs/Dropdown/Dropdown.d.ts +20 -34
- package/cjs/Dropdown/components/DropdownButtonItem.d.ts +2 -7
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +2 -2
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +2 -2
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +2 -1
- package/cjs/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +2 -1
- package/cjs/Dropdown/components/DropdownFooterItem.d.ts +2 -2
- package/cjs/Dropdown/components/DropdownLinkItem.d.ts +2 -7
- package/cjs/Dropdown/components/DropdownRadioItem.d.ts +2 -7
- package/cjs/Dropdown/components/DropdownTitle.d.ts +2 -2
- package/cjs/Dropdown/components/DropdownToggleItem.d.ts +2 -7
- package/cjs/Dropzone/Dropzone.d.ts +2 -2
- package/cjs/EmptyState/EmptyState.d.ts +2 -2
- package/cjs/Field/Field.d.ts +2 -2
- package/cjs/Flag/Flag.d.ts +2 -2
- package/cjs/Flag/Flags.d.ts +2 -2
- package/cjs/FlexGrid/FlexGrid.d.ts +2 -2
- package/cjs/HelpUnderline/HelpUnderline.d.ts +5 -6
- package/cjs/HelpUnderline/HelpUnderline.js +13 -10
- package/cjs/Input/Input.tailwind.js +28 -4
- package/cjs/Insert/Insert.d.ts +2 -2
- package/cjs/KeyboardKey/KeyboardKey.d.ts +2 -2
- package/cjs/Medallion/Medallion.d.ts +2 -2
- package/cjs/Modal/Modal.d.ts +7 -5
- package/cjs/Modal/components/ModalFooter.d.ts +2 -2
- package/cjs/Modal/components/ModalSection.d.ts +2 -2
- package/cjs/Pagination/CompactPagination/CompactPagination.d.ts +2 -2
- package/cjs/Pagination/Pagination/Pagination.d.ts +2 -2
- package/cjs/ProgressBar/ProgressBar.d.ts +2 -2
- package/cjs/ProgressSpinner/ProgressSpinner.d.ts +2 -2
- package/cjs/RadioGroup/RadioButton.tailwind.js +4 -1
- package/cjs/RadioGroup/RadioGroup.d.ts +6 -6
- package/cjs/RangeSlider/RangeSlider.js +2 -2
- package/cjs/Satellite/Satellite.d.ts +2 -3
- package/cjs/Satellite/Satellite.js +27 -16
- package/cjs/Satellite/SatelliteContext.d.ts +1 -1
- package/cjs/Satellite/SatelliteContext.js +2 -1
- package/cjs/ScrollIndicator/ScrollIndicator.d.ts +2 -2
- package/cjs/Select/Select.tailwind.js +2 -2
- package/cjs/Separator/Separator.d.ts +8 -0
- package/cjs/Separator/Separator.js +29 -0
- package/cjs/Separator/Separator.tailwind.d.ts +5 -0
- package/cjs/Separator/Separator.tailwind.js +25 -0
- package/cjs/Separator/index.d.ts +2 -0
- package/cjs/Separator/index.js +27 -0
- package/cjs/Sidebar/Sidebar.d.ts +2 -2
- package/cjs/Sidebar/SidebarButtonLink.d.ts +2 -2
- package/cjs/Sidebar/SidebarButtonLink.js +8 -14
- package/cjs/Sidebar/SidebarHeader.d.ts +2 -2
- package/cjs/Sidebar/SidebarHeading.d.ts +2 -2
- package/cjs/Sidebar/SidebarLink.d.ts +2 -2
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +2 -2
- package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +2 -2
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +2 -2
- package/cjs/Sidebar/SidebarNav.d.ts +2 -2
- package/cjs/Switch/Switch.d.ts +2 -2
- package/cjs/Switch/SwitchOption.d.ts +2 -2
- package/cjs/Tables/DataTable/DataTable.d.ts +4 -2
- package/cjs/Tables/DataTable/DataTable.js +9 -4
- package/cjs/Tables/DataTable/components/Footer.d.ts +2 -2
- package/cjs/Tables/DataTable/components/Loader.d.ts +2 -2
- package/cjs/Tables/Table/Table.d.ts +2 -2
- package/cjs/Tables/Table/components/TableFooter.d.ts +2 -2
- package/cjs/Tabs/ContentTabs.d.ts +2 -2
- package/cjs/Tabs/LinkTabs.d.ts +2 -2
- package/cjs/Tabs/components/LinkTab.d.ts +2 -2
- package/cjs/Tag/Tag.js +7 -7
- package/cjs/TextWrap/TextWrap.d.ts +2 -2
- package/cjs/Toggle/Toggle.js +3 -13
- package/cjs/Toggle/Toggle.tailwind.js +8 -2
- package/cjs/Tooltip/OverflowTooltipWrapper.d.ts +2 -5
- package/cjs/Tooltip/OverflowTooltipWrapper.js +20 -78
- package/cjs/Tooltip/Tooltip.d.ts +6 -6
- package/cjs/Tooltip/Tooltip.js +6 -6
- package/cjs/Tooltip/Tooltip.tailwind.js +85 -62
- package/cjs/Tooltip/TooltipWrapper.d.ts +8 -21
- package/cjs/Tooltip/TooltipWrapper.js +49 -158
- package/cjs/Tooltip/types.d.ts +57 -6
- package/cjs/Tooltip/utils.d.ts +1 -0
- package/cjs/Tooltip/utils.js +10 -0
- package/cjs/UserContent/UserContent.d.ts +2 -2
- package/cjs/index.d.ts +2 -1
- package/cjs/index.js +20 -8
- package/cjs/styles/tailwind.config.js +1 -1
- package/cjs/types.d.ts +6 -6
- package/esm/AnnouncementBadge/AnnouncementBadge.d.ts +2 -2
- package/esm/AutoComplete/AutoComplete.tailwind.js +4 -1
- package/esm/AutoComplete/components/AutoCompleteEmptyState.d.ts +2 -2
- package/esm/AutoComplete/components/DefaultOptionItem.d.ts +2 -2
- package/esm/Avatars/ApplicationAvatar.d.ts +2 -2
- package/esm/Avatars/UserAvatar.d.ts +2 -2
- package/esm/Badge/Badge.d.ts +3 -3
- package/esm/Badge/Badge.js +6 -3
- package/esm/Banners/Alert/Alert.d.ts +2 -2
- package/esm/Banners/BigBertha/BigBertha.d.ts +2 -2
- package/esm/Banners/Promote/Promote.d.ts +2 -2
- package/esm/Button/ButtonGroup.d.ts +2 -2
- package/esm/Button/PolymorphicIconButton.d.ts +1 -1
- package/esm/Button/PolymorphicIconButton.js +4 -4
- package/esm/Card/components/CardHeader.d.ts +2 -2
- package/esm/Card/components/CardTitle.d.ts +2 -2
- package/esm/Checkbox/Checkbox.js +3 -3
- package/esm/Checkbox/Checkbox.tailwind.js +1 -1
- package/esm/ClickAwayContainer/ClickAwayContainer.d.ts +2 -2
- package/esm/DatePicker/DatePicker/DatePicker.d.ts +2 -2
- package/esm/DatePicker/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/esm/DatePicker/DateRangePicker/DateRangePickerDisplay.d.ts +2 -2
- package/esm/DatePicker/components/Calendar.d.ts +2 -2
- package/esm/DatePicker/components/Display.d.ts +2 -2
- package/esm/DatePicker/components/Footer.d.ts +2 -2
- package/esm/DatePicker/components/FooterActions.d.ts +2 -2
- package/esm/DatePicker/components/Modal.d.ts +2 -2
- package/esm/DatePicker/components/NavBar.d.ts +2 -2
- package/esm/DatePicker/components/SidePanel.d.ts +2 -2
- package/esm/Dropdown/Dropdown.d.ts +20 -34
- package/esm/Dropdown/components/DropdownButtonItem.d.ts +2 -7
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItem.d.ts +2 -2
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroup.d.ts +2 -2
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsMultiGroup.d.ts +2 -1
- package/esm/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsSingleGroup.d.ts +2 -1
- package/esm/Dropdown/components/DropdownFooterItem.d.ts +2 -2
- package/esm/Dropdown/components/DropdownLinkItem.d.ts +2 -7
- package/esm/Dropdown/components/DropdownRadioItem.d.ts +2 -7
- package/esm/Dropdown/components/DropdownTitle.d.ts +2 -2
- package/esm/Dropdown/components/DropdownToggleItem.d.ts +2 -7
- package/esm/Dropzone/Dropzone.d.ts +2 -2
- package/esm/EmptyState/EmptyState.d.ts +2 -2
- package/esm/Field/Field.d.ts +2 -2
- package/esm/Flag/Flag.d.ts +2 -2
- package/esm/Flag/Flags.d.ts +2 -2
- package/esm/FlexGrid/FlexGrid.d.ts +2 -2
- package/esm/HelpUnderline/HelpUnderline.d.ts +5 -6
- package/esm/HelpUnderline/HelpUnderline.js +13 -10
- package/esm/Input/Input.tailwind.js +28 -4
- package/esm/Insert/Insert.d.ts +2 -2
- package/esm/KeyboardKey/KeyboardKey.d.ts +2 -2
- package/esm/Medallion/Medallion.d.ts +2 -2
- package/esm/Modal/Modal.d.ts +7 -5
- package/esm/Modal/components/ModalFooter.d.ts +2 -2
- package/esm/Modal/components/ModalSection.d.ts +2 -2
- package/esm/Pagination/CompactPagination/CompactPagination.d.ts +2 -2
- package/esm/Pagination/Pagination/Pagination.d.ts +2 -2
- package/esm/ProgressBar/ProgressBar.d.ts +2 -2
- package/esm/ProgressSpinner/ProgressSpinner.d.ts +2 -2
- package/esm/RadioGroup/RadioButton.tailwind.js +4 -1
- package/esm/RadioGroup/RadioGroup.d.ts +6 -6
- package/esm/RangeSlider/RangeSlider.js +2 -2
- package/esm/Satellite/Satellite.d.ts +2 -3
- package/esm/Satellite/Satellite.js +26 -14
- package/esm/Satellite/SatelliteContext.d.ts +1 -1
- package/esm/Satellite/SatelliteContext.js +2 -1
- package/esm/ScrollIndicator/ScrollIndicator.d.ts +2 -2
- package/esm/Select/Select.tailwind.js +2 -2
- package/esm/Separator/Separator.d.ts +8 -0
- package/esm/Separator/Separator.js +17 -0
- package/esm/Separator/Separator.tailwind.d.ts +5 -0
- package/esm/Separator/Separator.tailwind.js +24 -0
- package/esm/Separator/index.d.ts +2 -0
- package/esm/Separator/index.js +2 -0
- package/esm/Sidebar/Sidebar.d.ts +2 -2
- package/esm/Sidebar/SidebarButtonLink.d.ts +2 -2
- package/esm/Sidebar/SidebarButtonLink.js +8 -14
- package/esm/Sidebar/SidebarHeader.d.ts +2 -2
- package/esm/Sidebar/SidebarHeading.d.ts +2 -2
- package/esm/Sidebar/SidebarLink.d.ts +2 -2
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +2 -2
- package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +2 -2
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +2 -2
- package/esm/Sidebar/SidebarNav.d.ts +2 -2
- package/esm/Switch/Switch.d.ts +2 -2
- package/esm/Switch/SwitchOption.d.ts +2 -2
- package/esm/Tables/DataTable/DataTable.d.ts +4 -2
- package/esm/Tables/DataTable/DataTable.js +9 -4
- package/esm/Tables/DataTable/components/Footer.d.ts +2 -2
- package/esm/Tables/DataTable/components/Loader.d.ts +2 -2
- package/esm/Tables/Table/Table.d.ts +2 -2
- package/esm/Tables/Table/components/TableFooter.d.ts +2 -2
- package/esm/Tabs/ContentTabs.d.ts +2 -2
- package/esm/Tabs/LinkTabs.d.ts +2 -2
- package/esm/Tabs/components/LinkTab.d.ts +2 -2
- package/esm/Tag/Tag.js +7 -7
- package/esm/TextWrap/TextWrap.d.ts +2 -2
- package/esm/Toggle/Toggle.js +3 -13
- package/esm/Toggle/Toggle.tailwind.js +8 -2
- package/esm/Tooltip/OverflowTooltipWrapper.d.ts +2 -5
- package/esm/Tooltip/OverflowTooltipWrapper.js +20 -78
- package/esm/Tooltip/Tooltip.d.ts +6 -6
- package/esm/Tooltip/Tooltip.js +6 -6
- package/esm/Tooltip/Tooltip.tailwind.js +84 -62
- package/esm/Tooltip/TooltipWrapper.d.ts +8 -21
- package/esm/Tooltip/TooltipWrapper.js +47 -157
- package/esm/Tooltip/types.d.ts +57 -6
- package/esm/Tooltip/utils.d.ts +1 -0
- package/esm/Tooltip/utils.js +3 -0
- package/esm/UserContent/UserContent.d.ts +2 -2
- package/esm/index.d.ts +2 -1
- package/esm/index.js +2 -1
- package/esm/styles/tailwind.config.js +1 -1
- package/esm/types.d.ts +6 -6
- package/package.json +3 -1
- package/satellite.min.css +1 -1
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
// @ts-check
|
4
|
+
var plugin = require("tailwindcss/plugin");
|
5
|
+
var separatorPlugin = plugin(function (_ref) {
|
6
|
+
var addComponents = _ref.addComponents,
|
7
|
+
theme = _ref.theme;
|
8
|
+
var margin = theme("spacing.4");
|
9
|
+
addComponents({
|
10
|
+
".separator": {
|
11
|
+
backgroundColor: theme("colors.grey.200"),
|
12
|
+
'&[data-orientation="horizontal"]': {
|
13
|
+
height: "1px",
|
14
|
+
width: "100%",
|
15
|
+
margin: "".concat(margin, " 0")
|
16
|
+
},
|
17
|
+
'&[data-orientation="vertical"]': {
|
18
|
+
height: "100%",
|
19
|
+
width: "1px",
|
20
|
+
margin: "0 ".concat(margin)
|
21
|
+
}
|
22
|
+
}
|
23
|
+
});
|
24
|
+
});
|
25
|
+
module.exports = separatorPlugin;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
6
|
+
});
|
7
|
+
var _exportNames = {};
|
8
|
+
Object.defineProperty(exports, "default", {
|
9
|
+
enumerable: true,
|
10
|
+
get: function get() {
|
11
|
+
return _Separator["default"];
|
12
|
+
}
|
13
|
+
});
|
14
|
+
var _Separator = _interopRequireWildcard(require("./Separator"));
|
15
|
+
Object.keys(_Separator).forEach(function (key) {
|
16
|
+
if (key === "default" || key === "__esModule") return;
|
17
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
18
|
+
if (key in exports && exports[key] === _Separator[key]) return;
|
19
|
+
Object.defineProperty(exports, key, {
|
20
|
+
enumerable: true,
|
21
|
+
get: function get() {
|
22
|
+
return _Separator[key];
|
23
|
+
}
|
24
|
+
});
|
25
|
+
});
|
26
|
+
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); }
|
27
|
+
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; }
|
package/cjs/Sidebar/Sidebar.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
import type { SidebarLocale, SidebarLocation, SidebarVariant } from "./types";
|
3
3
|
export interface SidebarProps {
|
4
4
|
id?: string;
|
@@ -32,4 +32,4 @@ export interface SidebarProps {
|
|
32
32
|
location: SidebarLocation;
|
33
33
|
children?: ReactNode;
|
34
34
|
}
|
35
|
-
export declare const Sidebar:
|
35
|
+
export declare const Sidebar: VFC<SidebarProps>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { MouseEventHandler, ReactNode, VFC } from "react";
|
2
2
|
import type { IconComponentType } from "../types";
|
3
3
|
export declare type SidebarButtonLinkIcon = IconComponentType | {
|
4
4
|
active: IconComponentType;
|
@@ -17,4 +17,4 @@ export interface SidebarButtonLinkProps {
|
|
17
17
|
tooltipContent?: ReactNode;
|
18
18
|
children: ReactNode;
|
19
19
|
}
|
20
|
-
export declare const SidebarButtonLink:
|
20
|
+
export declare const SidebarButtonLink: VFC<SidebarButtonLinkProps>;
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
});
|
7
7
|
exports.SidebarButtonLink = void 0;
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
10
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
11
|
var _react = require("react");
|
12
12
|
var _reactFeather = require("react-feather");
|
13
13
|
var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
|
@@ -15,24 +15,18 @@ var _Tooltip = require("../Tooltip");
|
|
15
15
|
var _useLinkProps = _interopRequireDefault(require("../utils/useLinkProps"));
|
16
16
|
var _SidebarContext = require("./SidebarContext");
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
18
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4
|
18
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
19
19
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
20
20
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
21
21
|
var Tooltip = function Tooltip(_ref) {
|
22
22
|
var content = _ref.content,
|
23
23
|
children = _ref.children;
|
24
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.TooltipWrapper, {
|
25
|
-
|
25
|
+
side: "right",
|
26
|
+
sideOffset: 24,
|
26
27
|
delay: 0,
|
27
28
|
hideDelay: 0,
|
28
|
-
modifiers: [{
|
29
|
-
name: "offset",
|
30
|
-
options: {
|
31
|
-
offset: [0, 32]
|
32
|
-
}
|
33
|
-
}],
|
34
29
|
content: content,
|
35
|
-
wrapperClassName: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["block"]))),
|
36
30
|
interactive: false,
|
37
31
|
children: children
|
38
32
|
});
|
@@ -72,17 +66,17 @@ var SidebarButtonLink = function SidebarButtonLink(props) {
|
|
72
66
|
onBlur: function onBlur() {
|
73
67
|
return setIsInteractedWith(false);
|
74
68
|
},
|
75
|
-
className: (0, _satellitePrefixer["default"])(
|
69
|
+
className: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n h-8 min-w-8 w-full rounded\n flex items-center space-x-3\n border border-transparent\n display-body\n hover:no-underline focus:no-underline\n ", "\n ", "\n ", "\n ", "\n "])), disabled ? "cursor-not-allowed opacity-70" : "focus:border-grey-500", isActive ? "shadow-z100" : !disabled && "hover:border-grey-200", isActive && "bg-gradient-to-b from-white to-grey-50", collapsed ? "pl-2" : "px-2"),
|
76
70
|
"aria-current": isActive,
|
77
71
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
78
|
-
className: (0, _satellitePrefixer["default"])(
|
72
|
+
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["", " ml-[-3px]"])), showColors ? "text-accent-600" : "text-grey-400"),
|
79
73
|
height: 20,
|
80
74
|
width: 20
|
81
75
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
82
|
-
className: (0, _satellitePrefixer["default"])(
|
76
|
+
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n ", "\n ", "\n "])), collapsed && "sr-only", showColors ? "text-accent-600" : "typo-subdued", isActive && "font-bold"),
|
83
77
|
children: children
|
84
78
|
}), isExternalLink && !collapsed && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFeather.ExternalLink, {
|
85
|
-
className: (0, _satellitePrefixer["default"])(
|
79
|
+
className: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["", " !ml-1 shrink-0"])), showColors ? "text-accent-600" : "typo-subdued"),
|
86
80
|
size: "1em"
|
87
81
|
})]
|
88
82
|
}))
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
export declare type SidebarHeaderProps = {
|
3
3
|
className?: string;
|
4
4
|
children?: ReactNode;
|
5
5
|
};
|
6
|
-
export declare const SidebarHeader:
|
6
|
+
export declare const SidebarHeader: VFC<SidebarHeaderProps>;
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
export declare type SidebarHeadingProps = {
|
3
3
|
id?: string;
|
4
4
|
className?: string;
|
5
5
|
children: ReactNode;
|
6
6
|
};
|
7
|
-
export declare const SidebarHeading:
|
7
|
+
export declare const SidebarHeading: VFC<SidebarHeadingProps>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
import type { IconComponentType } from "../types";
|
3
3
|
export declare type SidebarLinkProps = {
|
4
4
|
icon: IconComponentType;
|
@@ -6,4 +6,4 @@ export declare type SidebarLinkProps = {
|
|
6
6
|
disabled?: boolean;
|
7
7
|
children: ReactNode;
|
8
8
|
} & Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "id" | "className" | "target" | "rel" | "aria-label" | "onClick">;
|
9
|
-
export declare const SidebarLink:
|
9
|
+
export declare const SidebarLink: VFC<SidebarLinkProps>;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type {
|
1
|
+
import type { VFC } from "react";
|
2
2
|
declare type ActiveLinkIndicatorProps = {
|
3
3
|
className?: string;
|
4
4
|
activeIndex?: number;
|
5
5
|
linksCount: number;
|
6
6
|
};
|
7
|
-
export declare const ActiveLinkIndicator:
|
7
|
+
export declare const ActiveLinkIndicator: VFC<ActiveLinkIndicatorProps>;
|
8
8
|
export {};
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type {
|
1
|
+
import type { VFC } from "react";
|
2
2
|
import type { SidebarLinksGroupLink } from "./types";
|
3
3
|
declare type LinkProps = SidebarLinksGroupLink & {
|
4
4
|
active: boolean;
|
5
5
|
};
|
6
|
-
export declare const SidebarGroupLink:
|
6
|
+
export declare const SidebarGroupLink: VFC<LinkProps>;
|
7
7
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { ReactNode } from "react";
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
import type { IconComponentType } from "../../types";
|
3
3
|
import type { SidebarLinksGroupLink } from "./types";
|
4
4
|
declare type SidebarLinksGroupBaseProps = {
|
@@ -19,5 +19,5 @@ export declare type CollapsibleSidebarLinksGroupProps = SidebarLinksGroupBasePro
|
|
19
19
|
onGroupToggle?: (open: boolean) => void;
|
20
20
|
};
|
21
21
|
export declare type SidebarLinksGroupProps = StaticSidebarLinksGroupProps | CollapsibleSidebarLinksGroupProps;
|
22
|
-
export declare const SidebarLinksGroup:
|
22
|
+
export declare const SidebarLinksGroup: VFC<SidebarLinksGroupProps>;
|
23
23
|
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
export declare type SidebarNavSpacing = "small" | "large";
|
3
3
|
export declare type SidebarNavProps = {
|
4
4
|
id?: string;
|
@@ -7,4 +7,4 @@ export declare type SidebarNavProps = {
|
|
7
7
|
label: string;
|
8
8
|
children: ReactNode;
|
9
9
|
};
|
10
|
-
export declare const SidebarNav:
|
10
|
+
export declare const SidebarNav: VFC<SidebarNavProps>;
|
package/cjs/Switch/Switch.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
import type { SwitchSize } from "./types";
|
3
3
|
export interface SwitchProps {
|
4
4
|
className?: string;
|
@@ -9,5 +9,5 @@ export interface SwitchProps {
|
|
9
9
|
size?: SwitchSize;
|
10
10
|
name?: string;
|
11
11
|
}
|
12
|
-
export declare const Switch:
|
12
|
+
export declare const Switch: VFC<SwitchProps>;
|
13
13
|
export default Switch;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
export interface SwitchOptionProps {
|
3
3
|
value: string;
|
4
4
|
disabled?: boolean;
|
5
5
|
children: ReactNode;
|
6
6
|
}
|
7
|
-
export declare const SwitchOption:
|
7
|
+
export declare const SwitchOption: VFC<SwitchOptionProps>;
|
8
8
|
export default SwitchOption;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import type { ReactNode } from "react";
|
2
2
|
import type { ColumnDefinition, DataConfiguration, GetItemId, PaginationConfiguration, Row, SelectMode, Sorting, Status } from "./types";
|
3
3
|
declare type CanSelectItem<Item> = (item: Item, idx: number) => boolean;
|
4
|
+
export declare type SortMode = "single" | "multi";
|
4
5
|
export declare type DataTableLocale = {
|
5
6
|
selectAllButton?: string;
|
6
7
|
noDataTitle?: string;
|
@@ -14,7 +15,6 @@ interface BaseDataTableProps<Item> {
|
|
14
15
|
data: Item[];
|
15
16
|
itemId?: GetItemId<Item>;
|
16
17
|
pagination?: PaginationConfiguration;
|
17
|
-
sorting?: Sorting[];
|
18
18
|
onChange?(dataConfiguration: DataConfiguration): void;
|
19
19
|
status?: Status;
|
20
20
|
noDataContent?: ReactNode;
|
@@ -22,6 +22,8 @@ interface BaseDataTableProps<Item> {
|
|
22
22
|
columns: ColumnDefinition<Item>[];
|
23
23
|
canHoverRow?(row: Row<Item>): boolean;
|
24
24
|
onRowHoveredChanged?(row: Row<Item> | null): void;
|
25
|
+
sorting?: Sorting[];
|
26
|
+
sortMode?: SortMode;
|
25
27
|
locale?: DataTableLocale;
|
26
28
|
}
|
27
29
|
declare type DataTableWithSelectMode<Item> = {
|
@@ -56,5 +58,5 @@ export declare type DataTableProps<Item> = BaseDataTableProps<Item> & (DataTable
|
|
56
58
|
* - If a cell is empty or unavailable, keep the cell empty to reduce noise and help with legibility.
|
57
59
|
* - Truncate long text to make it fit into a cell. However, choose column width wisely based on expected values, and adjust the table accordingly
|
58
60
|
*/
|
59
|
-
export declare const DataTable: <Item extends {}>({ data, itemId, columns, onChange, status, noDataContent, errorContent, sorting, pagination, selectMode, selection, onSelectionChange, canSelectItem, canHoverRow, onRowHoveredChanged, locale: propsLocale, }: DataTableProps<Item>) => JSX.Element;
|
61
|
+
export declare const DataTable: <Item extends {}>({ data, itemId, columns, onChange, status, noDataContent, errorContent, sorting, sortMode, pagination, selectMode, selection, onSelectionChange, canSelectItem, canHoverRow, onRowHoveredChanged, locale: propsLocale, }: DataTableProps<Item>) => JSX.Element;
|
60
62
|
export default DataTable;
|
@@ -73,6 +73,8 @@ var DataTable = function DataTable(_ref) {
|
|
73
73
|
errorContent = _ref.errorContent,
|
74
74
|
_ref$sorting = _ref.sorting,
|
75
75
|
sorting = _ref$sorting === void 0 ? [] : _ref$sorting,
|
76
|
+
_ref$sortMode = _ref.sortMode,
|
77
|
+
sortMode = _ref$sortMode === void 0 ? "single" : _ref$sortMode,
|
76
78
|
_ref$pagination = _ref.pagination,
|
77
79
|
pagination = _ref$pagination === void 0 ? false : _ref$pagination,
|
78
80
|
_ref$selectMode = _ref.selectMode,
|
@@ -189,12 +191,15 @@ var DataTable = function DataTable(_ref) {
|
|
189
191
|
};
|
190
192
|
});
|
191
193
|
var internalSorting = computedColumns.map(function (c) {
|
192
|
-
var _sorting$find
|
193
|
-
|
194
|
+
var _sorting$find;
|
195
|
+
if (c.sort === undefined) return [c.id, "none"];
|
196
|
+
var columnDirection = (_sorting$find = sorting.find(function (_ref5) {
|
194
197
|
var _ref6 = (0, _slicedToArray2["default"])(_ref5, 1),
|
195
198
|
columnId = _ref6[0];
|
196
199
|
return columnId === c.id;
|
197
|
-
})) === null || _sorting$find === void 0 ? void 0 : _sorting$find[1]
|
200
|
+
})) === null || _sorting$find === void 0 ? void 0 : _sorting$find[1];
|
201
|
+
if (columnDirection) return [c.id, columnDirection];
|
202
|
+
return [c.id, "desc"];
|
198
203
|
});
|
199
204
|
var shouldRenderPagination = function shouldRenderPagination() {
|
200
205
|
if ((0, _utils2.isDeterminatePagination)(pagination)) return pagination && pagination.totalItemsCount > 0;
|
@@ -210,7 +215,7 @@ var DataTable = function DataTable(_ref) {
|
|
210
215
|
var _ref8 = (0, _slicedToArray2["default"])(_ref7, 2),
|
211
216
|
colId = _ref8[0],
|
212
217
|
d = _ref8[1];
|
213
|
-
return columnId === colId ? [columnId, direction] : [colId, d];
|
218
|
+
return columnId === colId ? [columnId, direction] : [colId, sortMode === "multi" ? d : "none"];
|
214
219
|
});
|
215
220
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
216
221
|
pagination: pagination,
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
import type { VFC } from "react";
|
2
2
|
import type { DataConfiguration, PaginationConfiguration } from "../types";
|
3
3
|
export interface FooterProps {
|
4
4
|
pagination: PaginationConfiguration;
|
5
5
|
onChange(dataConfiguration: DataConfiguration): void;
|
6
6
|
}
|
7
|
-
export declare const Footer:
|
7
|
+
export declare const Footer: VFC<FooterProps>;
|
8
8
|
export default Footer;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
import { VFC } from "react";
|
2
2
|
import type { DataTableLocale } from "../DataTable";
|
3
3
|
export interface LoaderProps {
|
4
4
|
className?: string;
|
5
5
|
locale: Required<DataTableLocale>;
|
6
6
|
}
|
7
|
-
export declare const Loader:
|
7
|
+
export declare const Loader: VFC<LoaderProps>;
|
8
8
|
export default Loader;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { DetailedHTMLProps, ReactNode, TableHTMLAttributes } from "react";
|
1
|
+
import type { DetailedHTMLProps, ReactNode, TableHTMLAttributes, VFC } from "react";
|
2
2
|
export interface TableProps extends DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
3
3
|
footer?: ReactNode;
|
4
4
|
smallFooter?: boolean;
|
@@ -24,5 +24,5 @@ export interface TableProps extends DetailedHTMLProps<TableHTMLAttributes<HTMLTa
|
|
24
24
|
* - If a cell is empty or unavailable, keep the cell empty to reduce noise and help with legibility.
|
25
25
|
* - Truncate long text to make it fit into a cell. However, choose column width wisely based on expected values, and adjust the table accordingly
|
26
26
|
*/
|
27
|
-
export declare const Table:
|
27
|
+
export declare const Table: VFC<TableProps>;
|
28
28
|
export default Table;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { ReactNode } from "react";
|
1
|
+
import type { ReactNode, VFC } from "react";
|
2
2
|
export declare type FooterSizes = "default" | "small";
|
3
3
|
export interface FooterProps {
|
4
4
|
size?: FooterSizes;
|
5
5
|
children?: ReactNode;
|
6
6
|
}
|
7
|
-
export declare const TableFooter:
|
7
|
+
export declare const TableFooter: VFC<FooterProps>;
|
8
8
|
export default TableFooter;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import type { VFC } from "react";
|
2
2
|
import type { ContentTabsProps } from "./types";
|
3
|
-
export declare const ContentTabs:
|
3
|
+
export declare const ContentTabs: VFC<ContentTabsProps>;
|
4
4
|
export default ContentTabs;
|
package/cjs/Tabs/LinkTabs.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
import type { VFC } from "react";
|
2
2
|
import type { LinkTabsProps, UrlMatcher } from "./types";
|
3
3
|
export declare const defaultUrlMatcher: UrlMatcher;
|
4
4
|
/**
|
@@ -29,5 +29,5 @@ export declare const defaultUrlMatcher: UrlMatcher;
|
|
29
29
|
* - Use more than one row of tabs. Multiple rows create jumping UI elements, which make it impossible for users to remember which tabs they've already visited
|
30
30
|
* - Place the tab on the sides or bottom of the page, where users often overlook them
|
31
31
|
*/
|
32
|
-
export declare const LinkTabs:
|
32
|
+
export declare const LinkTabs: VFC<LinkTabsProps>;
|
33
33
|
export default LinkTabs;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import type { MouseEventHandler } from "react";
|
1
|
+
import type { MouseEventHandler, VFC } from "react";
|
2
2
|
import type { LinkTab as LinkTabType } from "../types";
|
3
3
|
export interface LinkTabProps {
|
4
4
|
tab: LinkTabType;
|
5
5
|
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
6
6
|
selected: boolean;
|
7
7
|
}
|
8
|
-
export declare const LinkTab:
|
8
|
+
export declare const LinkTab: VFC<LinkTabProps>;
|
9
9
|
export default LinkTab;
|
package/cjs/Tag/Tag.js
CHANGED
@@ -16,7 +16,7 @@ var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satel
|
|
16
16
|
var _Tooltip = require("../Tooltip");
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
18
18
|
var _excluded = ["children", "variant", "className", "onAdd", "addTooltip", "onRemove", "removeTooltip", "locale"];
|
19
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20
|
19
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20;
|
20
20
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
21
21
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
22
22
|
var DEFAULT_TAG_LOCALE = {
|
@@ -93,7 +93,7 @@ var Tag = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
93
93
|
onRemove === null || onRemove === void 0 ? void 0 : onRemove(evt);
|
94
94
|
};
|
95
95
|
var content = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
96
|
-
className: (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["truncate flex-1
|
96
|
+
className: (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["truncate flex-1"]))),
|
97
97
|
children: children
|
98
98
|
});
|
99
99
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", _objectSpread(_objectSpread({}, props), {}, {
|
@@ -102,10 +102,9 @@ var Tag = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
102
102
|
children: [addable ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.TooltipWrapper, {
|
103
103
|
content: addTooltip,
|
104
104
|
hideDelay: 0,
|
105
|
-
|
106
|
-
wrapperClassName: (0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["h-full"]))),
|
105
|
+
side: "bottom",
|
107
106
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("button", {
|
108
|
-
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(
|
107
|
+
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["tag-add-button"]))), !removable && (0, _satellitePrefixer["default"])(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["-mr-2"]))), BUTTON_VARIANT_CLASSNAMES[variant]),
|
109
108
|
type: "button",
|
110
109
|
onClick: handleAdd,
|
111
110
|
"aria-label": typeof locale.addButton === "function" ? locale.addButton(title) : locale.addButton,
|
@@ -116,9 +115,10 @@ var Tag = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
116
115
|
}) : content, removable && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.TooltipWrapper, {
|
117
116
|
content: removeTooltip,
|
118
117
|
hideDelay: 0,
|
119
|
-
|
118
|
+
side: "bottom",
|
119
|
+
align: "start",
|
120
120
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
121
|
-
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(
|
121
|
+
className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2["default"])(["tag-close-button p-1"]))), !addable && (0, _satellitePrefixer["default"])(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2["default"])(["ml-2"]))), BUTTON_VARIANT_CLASSNAMES[variant]),
|
122
122
|
type: "button",
|
123
123
|
onClick: handleRemove,
|
124
124
|
"aria-label": typeof locale.removeButton === "function" ? locale.removeButton(title) : locale.removeButton,
|
@@ -1,8 +1,8 @@
|
|
1
|
-
|
1
|
+
import type { VFC } from "react";
|
2
2
|
export interface TextWrapProps extends Omit<JSX.IntrinsicElements["span"], "children"> {
|
3
3
|
/** The max number of lines before the text is cut with an ellipsis */
|
4
4
|
maxLines?: number;
|
5
5
|
children: string;
|
6
6
|
}
|
7
|
-
export declare const TextWrap:
|
7
|
+
export declare const TextWrap: VFC<TextWrapProps>;
|
8
8
|
export default TextWrap;
|
package/cjs/Toggle/Toggle.js
CHANGED
@@ -11,10 +11,9 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
11
11
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
13
13
|
var _react = require("react");
|
14
|
-
var _reactFeather = require("react-feather");
|
15
14
|
var _satellitePrefixer = _interopRequireDefault(require("../styles/helpers/satellitePrefixer"));
|
16
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
17
|
-
var _templateObject, _templateObject2
|
16
|
+
var _templateObject, _templateObject2;
|
18
17
|
var _excluded = ["className", "checked", "defaultChecked"];
|
19
18
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
20
19
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
@@ -52,17 +51,8 @@ var Toggle = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
52
51
|
type: "checkbox",
|
53
52
|
role: "switch",
|
54
53
|
ref: ref
|
55
|
-
})), /*#__PURE__*/(0, _jsxRuntime.
|
56
|
-
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["toggle
|
57
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFeather.Check, {
|
58
|
-
size: 12,
|
59
|
-
className: (0, _satellitePrefixer["default"])(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["text-white"]))),
|
60
|
-
"aria-hidden": true
|
61
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFeather.X, {
|
62
|
-
size: 12,
|
63
|
-
className: (0, _satellitePrefixer["default"])(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["text-grey-300"]))),
|
64
|
-
"aria-hidden": true
|
65
|
-
})]
|
54
|
+
})), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
55
|
+
className: (0, _satellitePrefixer["default"])(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["toggle"])))
|
66
56
|
})]
|
67
57
|
});
|
68
58
|
});
|
@@ -25,6 +25,12 @@ var togglePlugin = plugin(function (_ref) {
|
|
25
25
|
"&:disabled": {
|
26
26
|
cursor: "not-allowed"
|
27
27
|
}
|
28
|
+
},
|
29
|
+
"&:hover .toggle:after": {
|
30
|
+
transform: "translateX(2px)"
|
31
|
+
},
|
32
|
+
"&:hover input:checked ~ .toggle:after": {
|
33
|
+
transform: "translateX(12px)"
|
28
34
|
}
|
29
35
|
},
|
30
36
|
".toggle": {
|
@@ -35,7 +41,7 @@ var togglePlugin = plugin(function (_ref) {
|
|
35
41
|
height: "100%",
|
36
42
|
pointerEvents: "none",
|
37
43
|
borderRadius: "9999px",
|
38
|
-
background: theme("colors.grey.
|
44
|
+
background: theme("colors.grey.500"),
|
39
45
|
boxShadow: "inset 0px 1px 4px 0px ".concat(rgba(theme("colors.grey.500"), 0.2)),
|
40
46
|
transition: transition,
|
41
47
|
"&::after": {
|
@@ -58,7 +64,7 @@ var togglePlugin = plugin(function (_ref) {
|
|
58
64
|
}
|
59
65
|
},
|
60
66
|
"input:disabled ~ &": {
|
61
|
-
|
67
|
+
background: theme("colors.grey.200")
|
62
68
|
}
|
63
69
|
}
|
64
70
|
});
|
@@ -1,6 +1,3 @@
|
|
1
|
-
import
|
1
|
+
import { VFC } from "react";
|
2
2
|
import type { TooltipWrapperBaseProps } from "./types";
|
3
|
-
|
4
|
-
export declare const isOverflowing: (element: HTMLElement) => boolean;
|
5
|
-
export declare const OverflowTooltipWrapper: FunctionComponent<TooltipWrapperBaseProps>;
|
6
|
-
export default OverflowTooltipWrapper;
|
3
|
+
export declare const OverflowTooltipWrapper: VFC<TooltipWrapperBaseProps>;
|