@algolia/satellite 1.0.0-beta.134 → 1.0.0-beta.137
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.js +2 -2
- package/cjs/AutoComplete/AutoComplete.js +7 -5
- package/cjs/Avatars/ApplicationAvatar.js +4 -2
- package/cjs/Avatars/UserAvatar.js +7 -4
- package/cjs/Avatars/utils.js +12 -4
- package/cjs/Badge/Badge.js +7 -7
- package/cjs/Banners/Alert/Alert.js +3 -3
- package/cjs/Banners/Promote/Promote.js +2 -2
- package/cjs/Button/Button.js +7 -7
- package/cjs/Button/Button.tailwind.js +7 -7
- package/cjs/Button/ButtonGroup.js +2 -2
- package/cjs/Button/IconButton.js +3 -3
- package/cjs/Card/Card.js +2 -2
- package/cjs/Card/components/CardHeader.js +2 -2
- package/cjs/Card/components/CardTitle.js +2 -2
- package/cjs/Checkbox/Checkbox.d.ts +1 -1
- package/cjs/Checkbox/Checkbox.js +3 -3
- package/cjs/DatePicker/DatePicker.tailwind.js +13 -13
- package/cjs/DatePicker/components/Modal.js +7 -6
- package/cjs/DatePicker/components/NavBar.js +3 -3
- package/cjs/Dropdown/Dropdown.js +7 -6
- package/cjs/Dropdown/components/DropdownButtonItem.js +4 -4
- package/cjs/Dropdown/components/DropdownFooterItem.js +2 -2
- package/cjs/Dropdown/components/DropdownLinkItem.js +2 -3
- package/cjs/Dropdown/components/DropdownTitle.js +2 -2
- package/cjs/Dropdown/components/DropdownToggleItem.js +2 -2
- package/cjs/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/cjs/Dropdown/useDropdownItemProps.js +18 -9
- package/cjs/Dropzone/Dropzone.js +2 -2
- package/cjs/EmptyState/EmptyState.js +5 -5
- package/cjs/Field/Field.js +3 -3
- package/cjs/Flag/Flag.js +3 -3
- package/cjs/Flag/Flags.d.ts +1 -1
- package/cjs/Flag/Flags.js +5 -4
- package/cjs/FlexGrid/FlexGrid.js +3 -3
- package/cjs/HelpUnderline/HelpUnderline.js +3 -3
- package/cjs/Input/Input.js +2 -2
- package/cjs/Insert/Insert.js +3 -0
- package/cjs/KeyboardKey/KeyboardKey.js +2 -2
- package/cjs/Link/ButtonLink.js +1 -10
- package/cjs/Link/Link.js +2 -2
- package/cjs/Medallion/Medallion.js +3 -2
- package/cjs/Modal/Modal.d.ts +1 -1
- package/cjs/Modal/Modal.js +7 -8
- package/cjs/Modal/components/ModalFooter.js +2 -2
- package/cjs/Modal/components/ModalSection.js +2 -2
- package/cjs/ProgressBar/ProgressBar.js +3 -3
- package/cjs/ProgressSpinner/ProgressSpinner.js +2 -2
- package/cjs/RadioGroup/RadioButton.js +2 -2
- package/cjs/RangeSlider/RangeSlider.js +2 -2
- package/cjs/Satellite/Satellite.d.ts +1 -0
- package/cjs/Satellite/Satellite.js +3 -1
- package/cjs/Satellite/SatelliteContext.d.ts +1 -0
- package/cjs/Satellite/index.d.ts +1 -0
- package/cjs/Satellite/index.js +14 -0
- package/cjs/Satellite/locale.d.ts +5 -3
- package/cjs/Satellite/useCreatePortal.d.ts +4 -0
- package/cjs/Satellite/useCreatePortal.js +29 -0
- package/cjs/ScrollIndicator/ScrollIndicator.js +5 -4
- package/cjs/Select/Select.js +2 -2
- package/cjs/Sidebar/Sidebar.d.ts +33 -12
- package/cjs/Sidebar/Sidebar.js +49 -39
- package/cjs/Sidebar/SidebarButtonLink.d.ts +14 -0
- package/cjs/Sidebar/SidebarButtonLink.js +110 -0
- package/cjs/Sidebar/SidebarContext.d.ts +7 -8
- package/cjs/Sidebar/SidebarContext.js +10 -11
- package/cjs/Sidebar/SidebarHeader.d.ts +6 -0
- package/cjs/Sidebar/SidebarHeader.js +29 -0
- package/cjs/Sidebar/SidebarHeading.d.ts +7 -0
- package/cjs/Sidebar/SidebarHeading.js +37 -0
- package/cjs/Sidebar/SidebarLink.d.ts +8 -0
- package/cjs/Sidebar/SidebarLink.js +58 -0
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
- package/cjs/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +47 -0
- package/cjs/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
- package/cjs/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +14 -23
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
- package/cjs/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +120 -0
- package/cjs/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
- package/cjs/Sidebar/SidebarLinksGroup/index.js +18 -0
- package/cjs/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
- package/cjs/Sidebar/SidebarLinksGroup/types.js +5 -0
- package/cjs/Sidebar/SidebarNav.d.ts +10 -0
- package/cjs/Sidebar/SidebarNav.js +48 -0
- package/cjs/Sidebar/index.d.ts +7 -4
- package/cjs/Sidebar/index.js +61 -21
- package/cjs/Sidebar/types.d.ts +6 -2
- package/cjs/Switch/Switch.js +2 -2
- package/cjs/Tables/DataTable/DataTable.js +30 -21
- package/cjs/Tables/DataTable/DataTable.tailwind.js +3 -0
- package/cjs/Tables/DataTable/components/HeaderCell.d.ts +1 -0
- package/cjs/Tables/DataTable/components/HeaderCell.js +20 -10
- package/cjs/Tables/Table/Table.js +2 -2
- package/cjs/Tables/Table/components/Footer.js +2 -2
- package/cjs/Tabs/ContentTabs.js +3 -3
- package/cjs/Tabs/LinkTabs.js +2 -2
- package/cjs/Tabs/Tabs.tailwind.js +8 -8
- package/cjs/Tabs/components/LinkTab.js +9 -11
- package/cjs/Tag/Tag.js +5 -6
- package/cjs/TextArea/TextArea.js +2 -2
- package/cjs/Toggle/Toggle.js +2 -2
- package/cjs/Tooltip/OverflowTooltipWrapper.js +8 -7
- package/cjs/Tooltip/Tooltip.js +2 -2
- package/cjs/Tooltip/TooltipWrapper.js +8 -7
- package/cjs/UserContent/UserContent.js +2 -2
- package/cjs/UserContent/UserContent.tailwind.js +1 -1
- package/cjs/index.d.ts +0 -1
- package/cjs/index.js +0 -14
- package/cjs/styles/tailwind.config.js +1 -1
- package/cjs/utils/onlyText.d.ts +3 -0
- package/cjs/utils/onlyText.js +49 -0
- package/cjs/utils/useLinkProps.d.ts +5 -2
- package/cjs/utils/useLinkProps.js +9 -2
- package/esm/AnnouncementBadge/AnnouncementBadge.js +1 -1
- package/esm/AutoComplete/AutoComplete.js +4 -2
- package/esm/Avatars/ApplicationAvatar.js +3 -1
- package/esm/Avatars/UserAvatar.js +7 -4
- package/esm/Avatars/utils.js +12 -4
- package/esm/Badge/Badge.js +6 -6
- package/esm/Banners/Alert/Alert.js +1 -1
- package/esm/Banners/Promote/Promote.js +1 -1
- package/esm/Button/Button.js +1 -1
- package/esm/Button/Button.tailwind.js +7 -7
- package/esm/Button/ButtonGroup.js +1 -1
- package/esm/Button/IconButton.js +1 -1
- package/esm/Card/Card.js +1 -1
- package/esm/Card/components/CardHeader.js +1 -1
- package/esm/Card/components/CardTitle.js +1 -1
- package/esm/Checkbox/Checkbox.d.ts +1 -1
- package/esm/Checkbox/Checkbox.js +1 -1
- package/esm/DatePicker/DatePicker.tailwind.js +13 -13
- package/esm/DatePicker/components/Modal.js +5 -4
- package/esm/DatePicker/components/NavBar.js +2 -2
- package/esm/Dropdown/Dropdown.js +5 -4
- package/esm/Dropdown/components/DropdownButtonItem.js +3 -3
- package/esm/Dropdown/components/DropdownFooterItem.js +1 -1
- package/esm/Dropdown/components/DropdownLinkItem.js +1 -2
- package/esm/Dropdown/components/DropdownTitle.js +1 -1
- package/esm/Dropdown/components/DropdownToggleItem.js +1 -1
- package/esm/Dropdown/useDropdownItemProps.d.ts +9 -1
- package/esm/Dropdown/useDropdownItemProps.js +16 -8
- package/esm/Dropzone/Dropzone.js +2 -2
- package/esm/EmptyState/EmptyState.js +1 -1
- package/esm/Field/Field.js +1 -1
- package/esm/Flag/Flag.js +1 -1
- package/esm/Flag/Flags.d.ts +1 -1
- package/esm/Flag/Flags.js +4 -3
- package/esm/FlexGrid/FlexGrid.js +1 -1
- package/esm/HelpUnderline/HelpUnderline.js +1 -1
- package/esm/Input/Input.js +1 -1
- package/esm/Insert/Insert.js +2 -0
- package/esm/KeyboardKey/KeyboardKey.js +1 -1
- package/esm/Link/ButtonLink.js +1 -10
- package/esm/Link/Link.js +1 -1
- package/esm/Medallion/Medallion.js +2 -1
- package/esm/Modal/Modal.d.ts +1 -1
- package/esm/Modal/Modal.js +5 -5
- package/esm/Modal/components/ModalFooter.js +1 -1
- package/esm/Modal/components/ModalSection.js +1 -1
- package/esm/ProgressBar/ProgressBar.js +1 -1
- package/esm/ProgressSpinner/ProgressSpinner.js +1 -1
- package/esm/RadioGroup/RadioButton.js +1 -1
- package/esm/RangeSlider/RangeSlider.js +1 -1
- package/esm/Satellite/Satellite.d.ts +1 -0
- package/esm/Satellite/Satellite.js +3 -1
- package/esm/Satellite/SatelliteContext.d.ts +1 -0
- package/esm/Satellite/index.d.ts +1 -0
- package/esm/Satellite/index.js +1 -0
- package/esm/Satellite/locale.d.ts +5 -3
- package/esm/Satellite/useCreatePortal.d.ts +4 -0
- package/esm/Satellite/useCreatePortal.js +16 -0
- package/esm/ScrollIndicator/ScrollIndicator.js +3 -2
- package/esm/Select/Select.js +1 -1
- package/esm/Sidebar/Sidebar.d.ts +33 -12
- package/esm/Sidebar/Sidebar.js +45 -30
- package/esm/Sidebar/SidebarButtonLink.d.ts +14 -0
- package/esm/Sidebar/SidebarButtonLink.js +92 -0
- package/esm/Sidebar/SidebarContext.d.ts +7 -8
- package/esm/Sidebar/SidebarContext.js +9 -8
- package/esm/Sidebar/SidebarHeader.d.ts +6 -0
- package/esm/Sidebar/SidebarHeader.js +15 -0
- package/esm/Sidebar/SidebarHeading.d.ts +7 -0
- package/esm/Sidebar/SidebarHeading.js +22 -0
- package/esm/Sidebar/SidebarLink.d.ts +8 -0
- package/esm/Sidebar/SidebarLink.js +42 -0
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.d.ts +8 -0
- package/esm/Sidebar/SidebarLinksGroup/ActiveLinkIndicator.js +32 -0
- package/esm/Sidebar/SidebarLinksGroup/SidebarGroupLink.d.ts +7 -0
- package/esm/Sidebar/{components/SidebarHeader.js → SidebarLinksGroup/SidebarGroupLink.js} +13 -19
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.d.ts +23 -0
- package/esm/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +100 -0
- package/esm/Sidebar/SidebarLinksGroup/index.d.ts +2 -0
- package/esm/Sidebar/SidebarLinksGroup/index.js +2 -0
- package/esm/Sidebar/SidebarLinksGroup/types.d.ts +10 -0
- package/esm/Sidebar/SidebarLinksGroup/types.js +1 -0
- package/esm/Sidebar/SidebarNav.d.ts +10 -0
- package/esm/Sidebar/SidebarNav.js +33 -0
- package/esm/Sidebar/index.d.ts +7 -4
- package/esm/Sidebar/index.js +7 -4
- package/esm/Sidebar/types.d.ts +6 -2
- package/esm/Switch/Switch.js +1 -1
- package/esm/Tables/DataTable/DataTable.js +29 -21
- package/esm/Tables/DataTable/DataTable.tailwind.js +3 -0
- package/esm/Tables/DataTable/components/HeaderCell.d.ts +1 -0
- package/esm/Tables/DataTable/components/HeaderCell.js +20 -10
- package/esm/Tables/Table/Table.js +1 -1
- package/esm/Tables/Table/components/Footer.js +1 -1
- package/esm/Tabs/ContentTabs.js +1 -1
- package/esm/Tabs/LinkTabs.js +1 -1
- package/esm/Tabs/Tabs.tailwind.js +8 -8
- package/esm/Tabs/components/LinkTab.js +8 -10
- package/esm/Tag/Tag.js +3 -4
- package/esm/TextArea/TextArea.js +1 -1
- package/esm/Toggle/Toggle.js +1 -1
- package/esm/Tooltip/OverflowTooltipWrapper.js +5 -4
- package/esm/Tooltip/Tooltip.js +1 -1
- package/esm/Tooltip/TooltipWrapper.js +5 -4
- package/esm/UserContent/UserContent.js +1 -1
- package/esm/UserContent/UserContent.tailwind.js +1 -1
- package/esm/index.d.ts +0 -1
- package/esm/index.js +0 -1
- package/esm/styles/tailwind.config.js +1 -1
- package/esm/utils/onlyText.d.ts +3 -0
- package/esm/utils/onlyText.js +41 -0
- package/esm/utils/useLinkProps.d.ts +5 -2
- package/esm/utils/useLinkProps.js +9 -2
- package/package.json +5 -4
- package/satellite.min.css +1 -1
- package/cjs/Banner/Banner.d.ts +0 -86
- package/cjs/Banner/Banner.js +0 -176
- package/cjs/Banner/index.d.ts +0 -2
- package/cjs/Banner/index.js +0 -32
- package/cjs/Sidebar/Sidebar.tailwind.d.ts +0 -5
- package/cjs/Sidebar/Sidebar.tailwind.js +0 -66
- package/cjs/Sidebar/components/SidebarHeader.d.ts +0 -5
- package/cjs/Sidebar/components/SidebarLink.d.ts +0 -10
- package/cjs/Sidebar/components/SidebarLink.js +0 -98
- package/esm/Banner/Banner.d.ts +0 -86
- package/esm/Banner/Banner.js +0 -161
- package/esm/Banner/index.d.ts +0 -2
- package/esm/Banner/index.js +0 -2
- package/esm/Sidebar/Sidebar.tailwind.d.ts +0 -5
- package/esm/Sidebar/Sidebar.tailwind.js +0 -64
- package/esm/Sidebar/components/SidebarHeader.d.ts +0 -5
- package/esm/Sidebar/components/SidebarLink.d.ts +0 -10
- package/esm/Sidebar/components/SidebarLink.js +0 -78
package/esm/Button/Button.js
CHANGED
@@ -9,7 +9,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
9
9
|
|
10
10
|
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) { _defineProperty(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; }
|
11
11
|
|
12
|
-
import cx from "
|
12
|
+
import cx from "clsx";
|
13
13
|
import ProgressSpinner from "../ProgressSpinner";
|
14
14
|
import stl from "../styles/helpers/satellitePrefixer";
|
15
15
|
import { BUTTON_LOADER_ICON_SIZES, BUTTON_SIZE_CLASSNAMES, BUTTON_VARIANT_CLASSNAMES, getIconColorClassName } from "./styles";
|
@@ -27,14 +27,14 @@ var buttonPlugin = plugin(function (_ref) {
|
|
27
27
|
".btn-subtle": {
|
28
28
|
color: theme("colors.grey.600"),
|
29
29
|
"&:hover": {
|
30
|
-
|
30
|
+
backgroundColor: rgba(theme("colors.grey.300"), 0.15)
|
31
31
|
},
|
32
32
|
"&:focus": {
|
33
33
|
boxShadow: "0 0 0 1px ".concat(theme("colors.accent.600"))
|
34
34
|
},
|
35
35
|
"&:active, &.btn-active": {
|
36
36
|
color: theme("colors.accent.600"),
|
37
|
-
|
37
|
+
backgroundColor: theme("colors.accent.100"),
|
38
38
|
boxShadow: "none"
|
39
39
|
},
|
40
40
|
"&:disabled, &.btn-disabled": {
|
@@ -50,8 +50,8 @@ var buttonPlugin = plugin(function (_ref) {
|
|
50
50
|
border: "1px solid ".concat(theme("colors.grey.200")),
|
51
51
|
boxShadow: "0 1px 0 0 ".concat(theme("colors.shadow.5")),
|
52
52
|
"&:hover": {
|
53
|
-
|
54
|
-
|
53
|
+
backgroundImage: "linear-gradient(-180deg, ".concat(theme("colors.white"), " 0%, ").concat(theme("colors.grey.100"), " 100%)"),
|
54
|
+
borderColor: theme("colors.grey.200")
|
55
55
|
},
|
56
56
|
"&:focus": {
|
57
57
|
backgroundImage: "linear-gradient(-180deg, ".concat(theme("colors.white"), " 0%, ").concat(theme("colors.grey.100"), " 100%)"),
|
@@ -59,8 +59,8 @@ var buttonPlugin = plugin(function (_ref) {
|
|
59
59
|
boxShadow: "\n 0 0 0 1px ".concat(theme("colors.accent.600"), ",\n 0 2px 0 1px ").concat(theme("colors.shadow.5"), "\n ")
|
60
60
|
},
|
61
61
|
"&:active, &.btn-active": {
|
62
|
-
backgroundImage: theme("color.grey.100"),
|
63
62
|
borderColor: theme("colors.grey.200"),
|
63
|
+
backgroundImage: theme("color.grey.100"),
|
64
64
|
boxShadow: "\n inset 0 1px 4px 0 ".concat(rgba(theme("colors.grey.500"), 0.4), ",\n inset 0 1px 1px 0 ").concat(rgba(theme("colors.grey.500"), 0.4), ",\n 0 1px 0 0 ").concat(theme("colors.shadow.5"), "\n ")
|
65
65
|
},
|
66
66
|
"&:disabled, &.btn-disabled": {
|
@@ -77,8 +77,8 @@ var buttonPlugin = plugin(function (_ref) {
|
|
77
77
|
border: "1px solid ".concat(theme("colors.accent.700")),
|
78
78
|
boxShadow: "\n inset 0 1px 0 0 ".concat(rgba(theme("colors.white"), 0.06), ",\n 0 1px 0 0 ").concat(theme("colors.shadow.10"), "\n "),
|
79
79
|
"&:hover": {
|
80
|
-
backgroundImage: "linear-gradient(0deg, ".concat(theme("colors.accent.800"), " 0%, ").concat(theme("colors.accent.700"), " 100%)"),
|
81
80
|
borderColor: theme("colors.accent.800"),
|
81
|
+
backgroundImage: "linear-gradient(0deg, ".concat(theme("colors.accent.800"), " 0%, ").concat(theme("colors.accent.700"), " 100%)"),
|
82
82
|
boxShadow: "\n inset 0 1px 0 0 ".concat(rgba(theme("colors.white"), 0.06), ",\n 0 1px 0 0 ").concat(theme("colors.shadow.10"), "\n ")
|
83
83
|
},
|
84
84
|
"&:focus": {
|
@@ -87,7 +87,7 @@ var buttonPlugin = plugin(function (_ref) {
|
|
87
87
|
boxShadow: "\n inset 0 1px 0 0 ".concat(rgba(theme("colors.white"), 0.06), ",\n 0 0 0 1px ").concat(theme("colors.accent.800"), ",\n 0 2px 0 1px ").concat(theme("colors.shadow.10"), "\n ")
|
88
88
|
},
|
89
89
|
"&:active, &.btn-active": {
|
90
|
-
|
90
|
+
backgroundColor: theme("colors.accent.700"),
|
91
91
|
borderColor: theme("colors.accent.800"),
|
92
92
|
boxShadow: "\n inset 0 1px 4px 0 ".concat(rgba(theme("colors.accent.900"), 0.4), ",\n inset 0 1px 1px 0 ").concat(rgba(theme("colors.accent.900"), 0.6), ",\n 0 1px 0 0 ").concat(theme("colors.shadow.5"), "\n ")
|
93
93
|
},
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject;
|
4
4
|
|
5
|
-
import cx from "
|
5
|
+
import cx from "clsx";
|
6
6
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
8
|
|
package/esm/Button/IconButton.js
CHANGED
@@ -9,7 +9,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
9
9
|
|
10
10
|
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) { _defineProperty(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; }
|
11
11
|
|
12
|
-
import cx from "
|
12
|
+
import cx from "clsx";
|
13
13
|
import ProgressSpinner from "../ProgressSpinner";
|
14
14
|
import stl from "../styles/helpers/satellitePrefixer";
|
15
15
|
import { TooltipWrapper } from "../Tooltip";
|
package/esm/Card/Card.js
CHANGED
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
4
4
|
|
5
|
-
import cx from "
|
5
|
+
import cx from "clsx";
|
6
6
|
import { forwardRef } from "react";
|
7
7
|
import stl from "../styles/helpers/satellitePrefixer";
|
8
8
|
import CardHeader from "./components/CardHeader";
|
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
16
|
export var CardHeader = function CardHeader(_ref) {
|
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
16
|
export var CardTitle = function CardTitle(_ref) {
|
package/esm/Checkbox/Checkbox.js
CHANGED
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import { forwardRef, useMemo, useState } from "react";
|
15
15
|
import { Check, Minus } from "react-feather";
|
16
16
|
import { useFieldState } from "../Field";
|
@@ -13,10 +13,10 @@ var datePickerPlugin = plugin(function (_ref) {
|
|
13
13
|
var defaultRadius = theme("borderRadius.DEFAULT");
|
14
14
|
/** @type {string} */
|
15
15
|
|
16
|
-
var
|
16
|
+
var accent600 = theme("colors.accent.600");
|
17
17
|
/** @type {string} */
|
18
18
|
|
19
|
-
var
|
19
|
+
var accent200 = theme("colors.accent.200");
|
20
20
|
|
21
21
|
var not = function not() {
|
22
22
|
for (var _len = arguments.length, modifiers = new Array(_len), _key = 0; _key < _len; _key++) {
|
@@ -71,18 +71,18 @@ var datePickerPlugin = plugin(function (_ref) {
|
|
71
71
|
".DayPicker-Day": _defineProperty({
|
72
72
|
borderRadius: defaultRadius,
|
73
73
|
"&--today": {
|
74
|
-
color:
|
74
|
+
color: accent600
|
75
75
|
}
|
76
76
|
}, "&--selected".concat(not("outside")), {
|
77
|
-
backgroundColor:
|
77
|
+
backgroundColor: accent600,
|
78
78
|
"&:hover": {
|
79
|
-
backgroundColor:
|
79
|
+
backgroundColor: accent600
|
80
80
|
}
|
81
81
|
})
|
82
82
|
}, "&--selected".concat(not("outside")), {
|
83
|
-
backgroundColor:
|
83
|
+
backgroundColor: accent600,
|
84
84
|
"&:hover": {
|
85
|
-
backgroundColor:
|
85
|
+
backgroundColor: accent600
|
86
86
|
}
|
87
87
|
})), _defineProperty(_addComponents, prefix(".date-range-picker"), {
|
88
88
|
"& .DayPicker-Day": (_DayPickerDay3 = {}, _defineProperty(_DayPickerDay3, "&--displayedRanges".concat(not("outside")), {
|
@@ -101,27 +101,27 @@ var datePickerPlugin = plugin(function (_ref) {
|
|
101
101
|
}), _defineProperty(_DayPickerDay3, "&--selected".concat(not("outside")), {
|
102
102
|
color: theme("colors.black"),
|
103
103
|
borderRadius: "0px",
|
104
|
-
backgroundColor:
|
104
|
+
backgroundColor: accent200,
|
105
105
|
"&:hover": {
|
106
|
-
backgroundColor:
|
106
|
+
backgroundColor: accent200
|
107
107
|
}
|
108
108
|
}), _defineProperty(_DayPickerDay3, "&--start".concat(not("outside")), {
|
109
109
|
color: theme("colors.white"),
|
110
110
|
borderRadius: "0px",
|
111
111
|
borderTopLeftRadius: defaultRadius,
|
112
112
|
borderBottomLeftRadius: defaultRadius,
|
113
|
-
backgroundColor:
|
113
|
+
backgroundColor: accent600,
|
114
114
|
"&:hover": {
|
115
|
-
backgroundColor:
|
115
|
+
backgroundColor: accent600
|
116
116
|
}
|
117
117
|
}), _defineProperty(_DayPickerDay3, "&--end".concat(not("outside")), {
|
118
118
|
color: theme("colors.white"),
|
119
119
|
borderRadius: "0px",
|
120
120
|
borderTopRightRadius: defaultRadius,
|
121
121
|
borderBottomRightRadius: defaultRadius,
|
122
|
-
backgroundColor:
|
122
|
+
backgroundColor: accent600,
|
123
123
|
"&:hover": {
|
124
|
-
backgroundColor:
|
124
|
+
backgroundColor: accent600
|
125
125
|
}
|
126
126
|
}), _DayPickerDay3)
|
127
127
|
}), _addComponents), {
|
@@ -9,11 +9,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
9
9
|
|
10
10
|
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) { _defineProperty(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; }
|
11
11
|
|
12
|
-
import cx from "
|
12
|
+
import cx from "clsx";
|
13
13
|
import { useState } from "react";
|
14
|
-
import { createPortal } from "react-dom";
|
15
14
|
import { usePopper } from "react-popper";
|
16
15
|
import { ClickAwayContainer } from "../../ClickAwayContainer";
|
16
|
+
import { useCreatePortal } from "../../Satellite";
|
17
17
|
import stl from "../../styles/helpers/satellitePrefixer";
|
18
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
19
19
|
export var DEFAULT_DATE_PICKER_MODAL_POPPER_MODIFIERS = [{
|
@@ -33,6 +33,7 @@ var Modal = function Modal(_ref) {
|
|
33
33
|
_ref$modifiers = _ref.modifiers,
|
34
34
|
modifiers = _ref$modifiers === void 0 ? [] : _ref$modifiers,
|
35
35
|
className = _ref.className;
|
36
|
+
var createPortal = useCreatePortal();
|
36
37
|
|
37
38
|
var _useState = useState(null),
|
38
39
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -51,7 +52,7 @@ var Modal = function Modal(_ref) {
|
|
51
52
|
return null;
|
52
53
|
}
|
53
54
|
|
54
|
-
return
|
55
|
+
return createPortal( /*#__PURE__*/_jsx(ClickAwayContainer, {
|
55
56
|
element: datePickerElement,
|
56
57
|
onClickAway: function onClickAway(evt) {
|
57
58
|
return _onClickAway === null || _onClickAway === void 0 ? void 0 : _onClickAway(evt);
|
@@ -63,7 +64,7 @@ var Modal = function Modal(_ref) {
|
|
63
64
|
style: styles.popper,
|
64
65
|
children: children
|
65
66
|
}))
|
66
|
-
})
|
67
|
+
}));
|
67
68
|
};
|
68
69
|
|
69
70
|
export default Modal;
|
@@ -5,7 +5,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
6
6
|
|
7
7
|
var _excluded = ["onPreviousClick", "onNextClick", "showPreviousButton", "showNextButton", "month", "locale", "localeUtils"];
|
8
|
-
import cx from "
|
8
|
+
import cx from "clsx";
|
9
9
|
import { useMemo } from "react";
|
10
10
|
import { ChevronLeft, ChevronRight } from "react-feather";
|
11
11
|
import { IconButton } from "../../Button";
|
@@ -50,7 +50,7 @@ var NavBar = function NavBar(_ref) {
|
|
50
50
|
children: /*#__PURE__*/_jsxs("div", {
|
51
51
|
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["font-medium text-md"]))),
|
52
52
|
children: [localeUtils.getMonths()[month.getMonth()], " ", props.editableYear ? /*#__PURE__*/_jsx("select", {
|
53
|
-
className: cx("DayPicker-Year", stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["pl-0.5 font-medium outline-none border-transparent border-2 rounded focus:border-
|
53
|
+
className: cx("DayPicker-Year", stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["pl-0.5 font-medium outline-none border-transparent border-2 rounded focus:border-accent-600 focus:shadow-z100 appearance-none"])))),
|
54
54
|
value: month.getFullYear(),
|
55
55
|
onChange: function onChange(e) {
|
56
56
|
return props.onYearChange(parseInt(e.currentTarget.value));
|
package/esm/Dropdown/Dropdown.js
CHANGED
@@ -9,12 +9,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
9
9
|
|
10
10
|
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) { _defineProperty(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; }
|
11
11
|
|
12
|
-
import cx from "
|
12
|
+
import cx from "clsx";
|
13
13
|
import { useState } from "react";
|
14
|
-
import { createPortal } from "react-dom";
|
15
14
|
import { usePopper } from "react-popper";
|
16
15
|
import Card from "../Card";
|
17
16
|
import { ClickAwayContainer } from "../ClickAwayContainer";
|
17
|
+
import { useCreatePortal } from "../Satellite";
|
18
18
|
import stl from "../styles/helpers/satellitePrefixer";
|
19
19
|
import DropdownButtonItem from "./components/DropdownButtonItem";
|
20
20
|
import { DropdownCollapsibleItem, DropdownCollapsibleItemsSingleGroup } from "./components/DropdownCollapsibleItem";
|
@@ -55,6 +55,7 @@ export var Dropdown = function Dropdown(_ref) {
|
|
55
55
|
renderTarget = _ref.renderTarget,
|
56
56
|
renderFooter = _ref.renderFooter,
|
57
57
|
children = _ref.children;
|
58
|
+
var createPortal = useCreatePortal();
|
58
59
|
|
59
60
|
var _useState = useState(false),
|
60
61
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -100,7 +101,7 @@ export var Dropdown = function Dropdown(_ref) {
|
|
100
101
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["inline-block leading-none"]))),
|
101
102
|
ref: setTargetEl,
|
102
103
|
children: target
|
103
|
-
}), showMenu && targetEl &&
|
104
|
+
}), showMenu && targetEl && createPortal( /*#__PURE__*/_jsx(ClickAwayContainer, {
|
104
105
|
element: menuContainerEl,
|
105
106
|
onClickAway: function onClickAway(evt) {
|
106
107
|
var isContainedInTarget = targetEl === null || targetEl === void 0 ? void 0 : targetEl.contains(evt.target);
|
@@ -122,7 +123,7 @@ export var Dropdown = function Dropdown(_ref) {
|
|
122
123
|
}) : null]
|
123
124
|
})
|
124
125
|
}))
|
125
|
-
})
|
126
|
+
}))]
|
126
127
|
})
|
127
128
|
});
|
128
129
|
};
|
@@ -4,13 +4,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
4
4
|
|
5
5
|
var _templateObject, _templateObject2, _templateObject3;
|
6
6
|
|
7
|
-
var _excluded = ["
|
7
|
+
var _excluded = ["toggle", "children", "variant", "startIcon"];
|
8
8
|
|
9
9
|
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; }
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
15
|
import useDropdownItemProps from "../useDropdownItemProps";
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -19,9 +19,9 @@ export var DropdownButtonItem = function DropdownButtonItem(props) {
|
|
19
19
|
var dropdownItemProps = useDropdownItemProps(props);
|
20
20
|
|
21
21
|
var _props$dropdownItemPr = _objectSpread(_objectSpread({}, props), dropdownItemProps),
|
22
|
+
toggle = _props$dropdownItemPr.toggle,
|
22
23
|
children = _props$dropdownItemPr.children,
|
23
24
|
variant = _props$dropdownItemPr.variant,
|
24
|
-
toggle = _props$dropdownItemPr.toggle,
|
25
25
|
StartIcon = _props$dropdownItemPr.startIcon,
|
26
26
|
mergedProps = _objectWithoutProperties(_props$dropdownItemPr, _excluded);
|
27
27
|
|
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
16
|
export var DropdownFooterItem = function DropdownFooterItem(_ref) {
|
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
15
|
import useLinkProps from "../../utils/useLinkProps";
|
16
16
|
import useDropdownItemProps from "../useDropdownItemProps";
|
@@ -29,7 +29,6 @@ export var DropdownLinkItem = function DropdownLinkItem(props) {
|
|
29
29
|
mergedProps = _objectWithoutProperties(_props$dropdownItemPr, _excluded);
|
30
30
|
|
31
31
|
return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread({
|
32
|
-
tabIndex: disabled ? -1 : undefined,
|
33
32
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex items-center"]))), className)
|
34
33
|
}, mergedProps), {}, {
|
35
34
|
children: [StartIcon && /*#__PURE__*/_jsx(StartIcon, {
|
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
16
16
|
export var DropdownTitle = function DropdownTitle(_ref) {
|
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import stl from "../../styles/helpers/satellitePrefixer";
|
15
15
|
import { Toggle } from "../../Toggle";
|
16
16
|
import useDropdownItemProps from "../useDropdownItemProps";
|
@@ -6,8 +6,16 @@ export interface DropdownBaseItemProps<T extends HTMLElement = HTMLElement> {
|
|
6
6
|
onClick?: EventHandler<MouseEvent<T>>;
|
7
7
|
}
|
8
8
|
export declare const useDropdownItemProps: <T extends HTMLElement = HTMLElement>(props: DropdownBaseItemProps<T>) => {
|
9
|
+
disabled: boolean;
|
10
|
+
"aria-disabled": boolean;
|
11
|
+
tabIndex: number;
|
12
|
+
onClick: undefined;
|
9
13
|
className: string;
|
14
|
+
} | {
|
15
|
+
disabled?: undefined;
|
16
|
+
"aria-disabled"?: undefined;
|
17
|
+
tabIndex?: undefined;
|
10
18
|
onClick: (evt: MouseEvent<T, globalThis.MouseEvent>) => void;
|
11
|
-
|
19
|
+
className: string;
|
12
20
|
};
|
13
21
|
export default useDropdownItemProps;
|
@@ -1,8 +1,13 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
1
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
3
|
|
3
4
|
var _templateObject;
|
4
5
|
|
5
|
-
|
6
|
+
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; }
|
7
|
+
|
8
|
+
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) { _defineProperty(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; }
|
9
|
+
|
10
|
+
import cx from "clsx";
|
6
11
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
12
|
import { useDropdownContext } from "./DropdownContext";
|
8
13
|
export var useDropdownItemProps = function useDropdownItemProps(props) {
|
@@ -10,11 +15,15 @@ export var useDropdownItemProps = function useDropdownItemProps(props) {
|
|
10
15
|
showMenu = _useDropdownContext.showMenu;
|
11
16
|
|
12
17
|
var className = cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex items-center\n min-h-10 px-4 text-left\n focus:no-underline hover:no-underline\n ", "\n "])), props.disabled ? "text-grey-300 cursor-not-allowed" : "text-inherit hover:bg-grey-100 focus:bg-grey-100 focus:outline-none cursor-pointer"), props.className);
|
13
|
-
|
18
|
+
var disabledProps = props.disabled ? {
|
19
|
+
disabled: true,
|
20
|
+
"aria-disabled": true,
|
21
|
+
tabIndex: -1,
|
22
|
+
onClick: undefined
|
23
|
+
} : {};
|
24
|
+
return _objectSpread({
|
14
25
|
className: className,
|
15
|
-
onClick:
|
16
|
-
return evt.preventDefault();
|
17
|
-
} : function (evt) {
|
26
|
+
onClick: function onClick(evt) {
|
18
27
|
if (props.onClick) {
|
19
28
|
props.onClick(evt);
|
20
29
|
}
|
@@ -22,8 +31,7 @@ export var useDropdownItemProps = function useDropdownItemProps(props) {
|
|
22
31
|
if (!evt.defaultPrevented && props.toggle) {
|
23
32
|
showMenu(false);
|
24
33
|
}
|
25
|
-
}
|
26
|
-
|
27
|
-
};
|
34
|
+
}
|
35
|
+
}, disabledProps);
|
28
36
|
};
|
29
37
|
export default useDropdownItemProps;
|
package/esm/Dropzone/Dropzone.js
CHANGED
@@ -11,7 +11,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
11
11
|
|
12
12
|
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) { _defineProperty(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; }
|
13
13
|
|
14
|
-
import cx from "
|
14
|
+
import cx from "clsx";
|
15
15
|
import { Fragment, useCallback, useMemo, useState } from "react";
|
16
16
|
import { useDropzone } from "react-dropzone";
|
17
17
|
import { Check, UploadCloud, X } from "react-feather";
|
@@ -113,7 +113,7 @@ export var Dropzone = function Dropzone(_ref2) {
|
|
113
113
|
var StatusIcon = status === "invalid" ? InvalidIcon : status === "validated" ? ValidatedIcon : Fragment;
|
114
114
|
return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({}, getRootProps({
|
115
115
|
"aria-controls": dropzoneId,
|
116
|
-
className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n input group\n ", "\n ", "\n min-h-16 cursor-pointer\n ", ""])), focused && "input-focused", disabled && "input-disabled cursor-not-allowed", isDragReject ? "border-red-200 cursor-not-allowed" : isDragActive ? "border-
|
116
|
+
className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n input group\n ", "\n ", "\n min-h-16 cursor-pointer\n ", ""])), focused && "input-focused", disabled && "input-disabled cursor-not-allowed", isDragReject ? "border-red-200 cursor-not-allowed" : isDragActive ? "border-accent-500" : null), STATUS_CLASSNAMES[status], className),
|
117
117
|
onClick: function onClick(evt) {
|
118
118
|
// Helps with https://github.com/react-dropzone/react-dropzone/issues/182
|
119
119
|
if (evt.target.closest("label")) {
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24;
|
4
4
|
|
5
|
-
import cx from "
|
5
|
+
import cx from "clsx";
|
6
6
|
import FlexGrid from "../FlexGrid";
|
7
7
|
import stl from "../styles/helpers/satellitePrefixer";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/esm/Field/Field.js
CHANGED
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9;
|
4
4
|
|
5
|
-
import cx from "
|
5
|
+
import cx from "clsx";
|
6
6
|
import { AlertCircle } from "react-feather";
|
7
7
|
import stl from "../styles/helpers/satellitePrefixer";
|
8
8
|
import FieldStateContext, { DEFAULT_STATE } from "./FieldStateContext";
|
package/esm/Flag/Flag.js
CHANGED
@@ -8,7 +8,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
8
8
|
|
9
9
|
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) { _defineProperty(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; }
|
10
10
|
|
11
|
-
import cx from "
|
11
|
+
import cx from "clsx";
|
12
12
|
import { useEffect, useRef, useState } from "react";
|
13
13
|
import { Check, X } from "react-feather";
|
14
14
|
import { IconButton } from "../Button";
|
package/esm/Flag/Flags.d.ts
CHANGED
@@ -44,5 +44,5 @@ export interface FlagsProps {
|
|
44
44
|
*
|
45
45
|
* When there are multiple flags, they will stack on top of one another with the most recent flag on top. When a user dismisses a flag, any older flags 'below' will come to the top. Careful consideration should be taken to take into account the ordering and priority of flags in the stack. Never use dismissible and non-dismissible flags in a stack as flags that automatically dismiss can do so and not be visible to the user.
|
46
46
|
*/
|
47
|
-
export declare const Flags: ({ notifications }: FlagsProps) => import("react").
|
47
|
+
export declare const Flags: ({ notifications }: FlagsProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
48
48
|
export default Flags;
|
package/esm/Flag/Flags.js
CHANGED
@@ -9,8 +9,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
9
9
|
|
10
10
|
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) { _defineProperty(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; }
|
11
11
|
|
12
|
-
import { createPortal } from "react-dom";
|
13
12
|
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
13
|
+
import { useCreatePortal } from "../Satellite";
|
14
14
|
import stl from "../styles/helpers/satellitePrefixer";
|
15
15
|
import Flag from "./Flag";
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -56,7 +56,8 @@ var TRANSITION_TIMEOUT = 500;
|
|
56
56
|
export var Flags = function Flags(_ref) {
|
57
57
|
var _ref$notifications = _ref.notifications,
|
58
58
|
notifications = _ref$notifications === void 0 ? [] : _ref$notifications;
|
59
|
-
|
59
|
+
var createPortal = useCreatePortal();
|
60
|
+
return createPortal( /*#__PURE__*/_jsx(TransitionGroup, {
|
60
61
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["z-notification bottom-0 right-0 fixed flex flex-col items-end p-4"]))),
|
61
62
|
component: "ul",
|
62
63
|
children: notifications.map(function (_ref2) {
|
@@ -81,6 +82,6 @@ export var Flags = function Flags(_ref) {
|
|
81
82
|
})
|
82
83
|
}, id);
|
83
84
|
})
|
84
|
-
})
|
85
|
+
}));
|
85
86
|
};
|
86
87
|
export default Flags;
|
package/esm/FlexGrid/FlexGrid.js
CHANGED
@@ -3,7 +3,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22;
|
4
4
|
|
5
5
|
// Heavily inspired by https://github.com/Shopify/polaris-react/blob/2b34f8609e9f08c1a767abea0a235bcc17706b63/src/components/Stack/Stack.tsx#L1
|
6
|
-
import cx from "
|
6
|
+
import cx from "clsx";
|
7
7
|
import { Children, isValidElement } from "react";
|
8
8
|
import stl from "../styles/helpers/satellitePrefixer";
|
9
9
|
import isRenderedChild from "../utils/isRenderedChild";
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3;
|
4
4
|
|
5
|
-
import cx from "
|
5
|
+
import cx from "clsx";
|
6
6
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
7
|
import { TooltipWrapper } from "../Tooltip";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
package/esm/Input/Input.js
CHANGED
@@ -10,7 +10,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
10
10
|
|
11
11
|
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) { _defineProperty(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; }
|
12
12
|
|
13
|
-
import cx from "
|
13
|
+
import cx from "clsx";
|
14
14
|
import { forwardRef, Fragment, useEffect, useState } from "react";
|
15
15
|
import { Check, ChevronDown, ChevronUp, Search, X } from "react-feather";
|
16
16
|
import { IconButton } from "../Button";
|
package/esm/Insert/Insert.js
CHANGED
@@ -4,6 +4,7 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
4
4
|
|
5
5
|
import Badge from "../Badge";
|
6
6
|
import stl from "../styles/helpers/satellitePrefixer";
|
7
|
+
import onlyText from "../utils/onlyText";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
|
@@ -43,6 +44,7 @@ export var Insert = function Insert(_ref) {
|
|
43
44
|
contexts = _ref.contexts,
|
44
45
|
children = _ref.children;
|
45
46
|
return /*#__PURE__*/_jsxs("aside", {
|
47
|
+
"aria-label": onlyText(title),
|
46
48
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["inline-flex flex-col self-start p-4 bg-grey-100 rounded"]))),
|
47
49
|
children: [contexts ? /*#__PURE__*/_jsx("span", {
|
48
50
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["block space-x-2 mb-4"]))),
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
|
3
3
|
var _templateObject;
|
4
4
|
|
5
|
-
import cx from "
|
5
|
+
import cx from "clsx";
|
6
6
|
import { createElement } from "react";
|
7
7
|
import { ArrowDown, ArrowLeft, ArrowRight, ArrowUp, CornerDownLeft } from "react-feather";
|
8
8
|
import stl from "../styles/helpers/satellitePrefixer";
|
package/esm/Link/ButtonLink.js
CHANGED
@@ -22,16 +22,7 @@ export var ButtonLink = function ButtonLink(_ref) {
|
|
22
22
|
|
23
23
|
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({}, props), linkProps), {}, {
|
24
24
|
endIcon: EndIcon,
|
25
|
-
as: "a"
|
26
|
-
onClick: function onClick(evt) {
|
27
|
-
if (props.disabled) {
|
28
|
-
evt.preventDefault();
|
29
|
-
} else {
|
30
|
-
var _linkProps$onClick;
|
31
|
-
|
32
|
-
(_linkProps$onClick = linkProps.onClick) === null || _linkProps$onClick === void 0 ? void 0 : _linkProps$onClick.call(linkProps, evt);
|
33
|
-
}
|
34
|
-
}
|
25
|
+
as: "a"
|
35
26
|
}));
|
36
27
|
};
|
37
28
|
export default ButtonLink;
|