@algolia/satellite 2.3.0-rc.9 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/Actions/Accordion/Accordion.d.ts +8 -0
- package/dist/cjs/Actions/Accordion/Accordion.js +104 -57
- package/dist/cjs/Actions/Accordion/Accordion.styles.d.ts +170 -0
- package/dist/cjs/Actions/Accordion/Accordion.styles.js +57 -0
- package/dist/cjs/Actions/Button/PolymorphicButton.js +5 -5
- package/dist/cjs/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/cjs/Actions/Button/styles.d.ts +1 -0
- package/dist/cjs/Actions/Button/styles.js +15 -10
- package/dist/cjs/Actions/SegmentedControl/SegmentedControl.js +3 -2
- package/dist/cjs/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
- package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +3 -3
- package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +4 -4
- package/dist/cjs/Chat/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/cjs/Chat/ChatMessage/ChatMessage.styles.d.ts +1 -1
- package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +2 -2
- package/dist/cjs/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +2 -2
- package/dist/cjs/Fields/Field/Field.js +3 -3
- package/dist/cjs/Fields/Input/Input.js +10 -13
- package/dist/cjs/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
- package/dist/cjs/Fields/Switch/Switch.tailwind.js +9 -9
- package/dist/cjs/Fields/TextArea/TextArea.tailwind.js +3 -3
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.d.ts +22 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.js +35 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
- package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
- package/dist/cjs/Helpers/MarkdownContent/index.d.ts +1 -0
- package/dist/cjs/Helpers/MarkdownContent/index.js +16 -0
- package/dist/cjs/Helpers/UserContent/UserContent.tailwind.js +1 -3
- package/dist/cjs/Helpers/index.d.ts +1 -0
- package/dist/cjs/Helpers/index.js +11 -0
- package/dist/cjs/Icons/index.d.ts +1 -1
- package/dist/cjs/Icons/index.js +6 -0
- package/dist/cjs/Illustrations/index.d.ts +7 -0
- package/dist/cjs/Illustrations/index.js +1254 -0
- package/dist/cjs/Indicators/EmptyState/EmptyState.js +35 -2
- package/dist/cjs/Indicators/EmptyState/types.d.ts +4 -3
- package/dist/cjs/Overlay/MenuButton/MenuButton.d.ts +23 -7
- package/dist/cjs/Overlay/Modal/Modal.js +8 -8
- package/dist/cjs/Overlay/Modal/components/ModalFooter.js +2 -7
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/styles/helpers/prefixTailwindClassName.js +7 -1
- package/dist/cjs/styles/tailwind.config.js +1 -1
- package/dist/cjs/types.d.ts +7 -0
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/Actions/Accordion/Accordion.d.ts +8 -0
- package/dist/esm/Actions/Accordion/Accordion.js +105 -58
- package/dist/esm/Actions/Accordion/Accordion.styles.d.ts +170 -0
- package/dist/esm/Actions/Accordion/Accordion.styles.js +50 -0
- package/dist/esm/Actions/Button/PolymorphicButton.js +6 -6
- package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/esm/Actions/Button/styles.d.ts +1 -0
- package/dist/esm/Actions/Button/styles.js +14 -9
- package/dist/esm/Actions/SegmentedControl/SegmentedControl.js +3 -2
- package/dist/esm/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
- package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +4 -4
- package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +4 -4
- package/dist/esm/Chat/ChatMessage/ChatMessage.d.ts +1 -1
- package/dist/esm/Chat/ChatMessage/ChatMessage.styles.d.ts +1 -1
- package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +2 -2
- package/dist/esm/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +2 -2
- package/dist/esm/Fields/Field/Field.js +3 -3
- package/dist/esm/Fields/Input/Input.js +10 -13
- package/dist/esm/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
- package/dist/esm/Fields/Switch/Switch.tailwind.js +9 -9
- package/dist/esm/Fields/TextArea/TextArea.tailwind.js +3 -3
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.d.ts +22 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.js +28 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
- package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
- package/dist/esm/Helpers/MarkdownContent/index.d.ts +1 -0
- package/dist/esm/Helpers/MarkdownContent/index.js +1 -0
- package/dist/esm/Helpers/UserContent/UserContent.tailwind.js +1 -3
- package/dist/esm/Helpers/index.d.ts +1 -0
- package/dist/esm/Helpers/index.js +2 -1
- package/dist/esm/Icons/index.d.ts +1 -1
- package/dist/esm/Icons/index.js +1 -1
- package/dist/esm/Illustrations/index.d.ts +7 -0
- package/dist/esm/Illustrations/index.js +1248 -0
- package/dist/esm/Indicators/EmptyState/EmptyState.js +35 -2
- package/dist/esm/Indicators/EmptyState/types.d.ts +4 -3
- package/dist/esm/Overlay/MenuButton/MenuButton.d.ts +23 -7
- package/dist/esm/Overlay/Modal/Modal.js +8 -8
- package/dist/esm/Overlay/Modal/components/ModalFooter.js +2 -7
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/styles/helpers/prefixTailwindClassName.js +7 -1
- package/dist/esm/styles/tailwind.config.js +1 -1
- package/dist/esm/types.d.ts +7 -0
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/satellite.min.css +1 -1
- package/package.json +4 -4
@@ -1,5 +1,9 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
1
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
2
4
|
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, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30;
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
3
7
|
import cx from "clsx";
|
4
8
|
import stl from "./../../styles/helpers/satellitePrefixer";
|
5
9
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -40,6 +44,30 @@ var ACTIONS_CONTEXT_CLASSNAMES = {
|
|
40
44
|
feature: stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["mt-3"]))),
|
41
45
|
page: stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["mt-6 md:flex-row"])))
|
42
46
|
};
|
47
|
+
var ILLUSTRATION_SIZES = {
|
48
|
+
small: {
|
49
|
+
width: 100,
|
50
|
+
height: 100
|
51
|
+
},
|
52
|
+
medium: {
|
53
|
+
width: 160,
|
54
|
+
height: 160
|
55
|
+
},
|
56
|
+
large: {
|
57
|
+
width: 400,
|
58
|
+
height: 400
|
59
|
+
}
|
60
|
+
};
|
61
|
+
var injectIllustrationSize = function injectIllustrationSize(illustration, illustrationSize, extraStyle) {
|
62
|
+
if (illustrationSize && illustration && _typeof(illustration) === "object" && "type" in illustration) {
|
63
|
+
return _objectSpread(_objectSpread({}, illustration), {}, {
|
64
|
+
props: _objectSpread(_objectSpread({}, illustration.props), {}, {
|
65
|
+
style: _objectSpread(_objectSpread(_objectSpread({}, illustration.props.style), ILLUSTRATION_SIZES[illustrationSize]), extraStyle)
|
66
|
+
})
|
67
|
+
});
|
68
|
+
}
|
69
|
+
return illustration;
|
70
|
+
};
|
43
71
|
var renderEmptyState = function renderEmptyState(_ref) {
|
44
72
|
var title = _ref.title,
|
45
73
|
description = _ref.description,
|
@@ -47,6 +75,7 @@ var renderEmptyState = function renderEmptyState(_ref) {
|
|
47
75
|
actionsDirection = _ref.actionsDirection,
|
48
76
|
leadIllustration = _ref.leadIllustration,
|
49
77
|
pageIllustration = _ref.pageIllustration,
|
78
|
+
illustrationSize = _ref.illustrationSize,
|
50
79
|
_ref$usageContext = _ref.usageContext,
|
51
80
|
usageContext = _ref$usageContext === void 0 ? "feature" : _ref$usageContext,
|
52
81
|
_ref$width = _ref.width,
|
@@ -57,13 +86,17 @@ var renderEmptyState = function renderEmptyState(_ref) {
|
|
57
86
|
var titleClassNames = cx(stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["text-grey-900"]))), TITLE_CONTEXT_CLASSNAMES[usageContext]);
|
58
87
|
var descriptionClassNames = cx(stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["text-grey-600"]))), DESCRIPTION_CONTEXT_CLASSNAMES[usageContext]);
|
59
88
|
var actionsClassNames = cx(ACTIONS_CONTEXT_CLASSNAMES[usageContext]);
|
89
|
+
var sizedLeadIllustration = injectIllustrationSize(leadIllustration, illustrationSize, {
|
90
|
+
display: "inline-block"
|
91
|
+
});
|
92
|
+
var sizedPageIllustration = injectIllustrationSize(pageIllustration, illustrationSize);
|
60
93
|
return /*#__PURE__*/_jsxs("div", {
|
61
94
|
className: containerClassNames,
|
62
95
|
children: [/*#__PURE__*/_jsxs("div", {
|
63
96
|
className: stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["min-w-2/5"]))),
|
64
97
|
children: [centered && !!leadIllustration && /*#__PURE__*/_jsx("div", {
|
65
98
|
className: LEAD_ILLUS_CONTEXT_CLASSNAMES[usageContext],
|
66
|
-
children:
|
99
|
+
children: sizedLeadIllustration
|
67
100
|
}), /*#__PURE__*/_jsx("h2", {
|
68
101
|
className: titleClassNames,
|
69
102
|
children: title
|
@@ -76,7 +109,7 @@ var renderEmptyState = function renderEmptyState(_ref) {
|
|
76
109
|
})]
|
77
110
|
}), !centered && usageContext === "page" && /*#__PURE__*/_jsx("div", {
|
78
111
|
className: stl(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["hidden lg:flex items-center justify-center"]))),
|
79
|
-
children:
|
112
|
+
children: sizedPageIllustration
|
80
113
|
})]
|
81
114
|
});
|
82
115
|
};
|
@@ -27,6 +27,7 @@ export interface EmptyStatePropsAll {
|
|
27
27
|
* Plop in an `img` element or `svg` here.
|
28
28
|
*/
|
29
29
|
pageIllustration?: ReactNode;
|
30
|
+
illustrationSize?: "small" | "medium" | "large";
|
30
31
|
/**
|
31
32
|
* UsageContext of the component.
|
32
33
|
* @default feature
|
@@ -43,13 +44,13 @@ export interface EmptyStatePropsAll {
|
|
43
44
|
*/
|
44
45
|
width?: EmptyStateWidths;
|
45
46
|
}
|
46
|
-
interface EmptyStatePropsUsageContextResult extends Omit<EmptyStatePropsAll, "usageContext" | "
|
47
|
+
interface EmptyStatePropsUsageContextResult extends Omit<EmptyStatePropsAll, "usageContext" | "pageIllustration"> {
|
47
48
|
usageContext: "result";
|
48
49
|
pageIllustration?: never;
|
49
50
|
}
|
50
|
-
interface EmptyStatePropsUsageContextFeature extends Omit<EmptyStatePropsAll, "usageContext" | "
|
51
|
+
interface EmptyStatePropsUsageContextFeature extends Omit<EmptyStatePropsAll, "usageContext" | "pageIllustration"> {
|
51
52
|
usageContext: "feature";
|
52
|
-
|
53
|
+
pageIllustration?: never;
|
53
54
|
}
|
54
55
|
interface EmptyStatePropsUsageContextPage extends Omit<EmptyStatePropsAll, "usageContext" | "centered"> {
|
55
56
|
usageContext: "page";
|
@@ -1,7 +1,23 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
3
3
|
import type { DropdownMenuProps } from "@radix-ui/react-dropdown-menu";
|
4
|
+
import { type CollapsibleItemProps, type CollapsibleItemsExclusiveGroupProps, type CollapsibleItemsMultiGroupProps } from "./components/collapsible";
|
5
|
+
import { type CustomTriggerProps } from "./components/CustomTrigger";
|
6
|
+
import { type DefaultTriggerProps } from "./components/DefaultTrigger";
|
7
|
+
import { type ItemProps, type LinkItemProps, type RadioItemProps, type ToggleItemProps } from "./components/items";
|
8
|
+
import { type LabelProps } from "./components/Label";
|
4
9
|
export declare type MenuButtonProps = DropdownMenuProps;
|
10
|
+
export declare type MenuButtonCollapsibleItemProps = CollapsibleItemProps;
|
11
|
+
export declare type MenuButtonCollapsibleItemsExclusiveGroupProps = CollapsibleItemsExclusiveGroupProps;
|
12
|
+
export declare type MenuButtonCollapsibleItemsMultiGroupProps = CollapsibleItemsMultiGroupProps;
|
13
|
+
export { type MenuButtonContentProps } from "./components/Content";
|
14
|
+
export declare type MenuButtonCustomTriggerProps = CustomTriggerProps;
|
15
|
+
export declare type MenuButtonDefaultTriggerProps = DefaultTriggerProps;
|
16
|
+
export declare type MenuButtonItemProps = ItemProps;
|
17
|
+
export declare type MenuButtonLinkItemProps = LinkItemProps;
|
18
|
+
export declare type MenuButtonRadioItemProps = RadioItemProps;
|
19
|
+
export declare type MenuButtonToggleItemProps = ToggleItemProps;
|
20
|
+
export declare type MenuButtonLabelProps = LabelProps;
|
5
21
|
/**
|
6
22
|
* The `MenuButton` component helps users select an item from a list of available options.
|
7
23
|
*
|
@@ -9,13 +25,13 @@ export declare type MenuButtonProps = DropdownMenuProps;
|
|
9
25
|
*/
|
10
26
|
export declare const MenuButton: {
|
11
27
|
(props: MenuButtonProps): import("react/jsx-runtime").JSX.Element;
|
12
|
-
CollapsibleItem: import("react").ForwardRefExoticComponent<
|
28
|
+
CollapsibleItem: import("react").ForwardRefExoticComponent<CollapsibleItemProps & {
|
13
29
|
children?: import("react").ReactNode;
|
14
30
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
15
|
-
CollapsibleItemsMultipleGroup: import("react").FC<import("react").PropsWithChildren<
|
16
|
-
CollapsibleItemsSingleGroup: import("react").FC<import("react").PropsWithChildren<
|
31
|
+
CollapsibleItemsMultipleGroup: import("react").FC<import("react").PropsWithChildren<CollapsibleItemsMultiGroupProps>>;
|
32
|
+
CollapsibleItemsSingleGroup: import("react").FC<import("react").PropsWithChildren<CollapsibleItemsExclusiveGroupProps>>;
|
17
33
|
Content: import("react").ForwardRefExoticComponent<import("./components/Content").MenuButtonContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
18
|
-
CustomTrigger: import("react").ForwardRefExoticComponent<
|
34
|
+
CustomTrigger: import("react").ForwardRefExoticComponent<CustomTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
19
35
|
Divider: import("react").ForwardRefExoticComponent<import("react").RefAttributes<HTMLDivElement>>;
|
20
36
|
Item: import("react").ForwardRefExoticComponent<import("./useMenuItemProps").BaseItemProps<HTMLDivElement> & DropdownMenu.DropdownMenuItemProps & {
|
21
37
|
startIcon?: import("../..").IconComponentType | undefined;
|
@@ -24,12 +40,12 @@ export declare const MenuButton: {
|
|
24
40
|
children?: import("react").ReactNode;
|
25
41
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
26
42
|
Label: import("react").FC<import("react").PropsWithChildren<DropdownMenu.DropdownMenuLabelProps>>;
|
27
|
-
LinkItem: import("react").FC<
|
43
|
+
LinkItem: import("react").FC<LinkItemProps>;
|
28
44
|
RadioGroup: import("react").ForwardRefExoticComponent<DropdownMenu.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
29
45
|
RadioItem: import("react").ForwardRefExoticComponent<Pick<DropdownMenu.DropdownMenuRadioItemProps, "value" | "defaultChecked"> & {
|
30
46
|
children?: import("react").ReactNode;
|
31
47
|
} & import("./useMenuItemProps").BaseItemProps<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
32
|
-
ToggleItem: import("react").FC<import("react").PropsWithChildren<
|
33
|
-
Trigger: import("react").ForwardRefExoticComponent<
|
48
|
+
ToggleItem: import("react").FC<import("react").PropsWithChildren<ToggleItemProps>>;
|
49
|
+
Trigger: import("react").ForwardRefExoticComponent<DefaultTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
34
50
|
displayName: string;
|
35
51
|
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
|
3
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
6
6
|
import * as Dialog from "@radix-ui/react-dialog";
|
@@ -76,10 +76,10 @@ export var Modal = function Modal(_ref) {
|
|
76
76
|
asChild: true,
|
77
77
|
children: triggerButton
|
78
78
|
}), createPortal( /*#__PURE__*/_jsx(Dialog.Overlay, {
|
79
|
-
className: cx(animate && !prefersReducedMotion && stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["modal-animated"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["modal-overlay bg-grey-900/30 z-modalOverlay inset-0 fixed w-full h-full flex items-start justify-center overflow-x-hidden overflow-y-auto
|
79
|
+
className: cx(animate && !prefersReducedMotion && stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["modal-animated"]))), stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["modal-overlay bg-grey-900/30 z-modalOverlay inset-0 fixed w-full h-full flex items-start justify-center px-8 py-10"]))), stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["overflow-x-hidden overflow-y-auto [scrollbar-gutter:stable_both-edges]"])))),
|
80
80
|
children: /*#__PURE__*/_jsx(Dialog.Content, {
|
81
81
|
ref: dialogContentRef,
|
82
|
-
className: cx(stl(
|
82
|
+
className: cx(stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["modal-content"]))), SIZE_CLASSNAMES[size], centerY && stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["flex m-auto justify-center"])))),
|
83
83
|
"aria-describedby": undefined,
|
84
84
|
onOpenAutoFocus: function onOpenAutoFocus(e) {
|
85
85
|
var _closeButtonRef$curre;
|
@@ -97,18 +97,18 @@ export var Modal = function Modal(_ref) {
|
|
97
97
|
}
|
98
98
|
},
|
99
99
|
children: /*#__PURE__*/_jsx("div", {
|
100
|
-
className: stl(
|
100
|
+
className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["modal-container"]))),
|
101
101
|
children: /*#__PURE__*/_jsxs(Card, {
|
102
102
|
as: "div",
|
103
103
|
elevation: "500",
|
104
|
-
className: cx(stl(
|
104
|
+
className: cx(stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["relative"]))), className),
|
105
105
|
fullBleed: true,
|
106
106
|
children: [/*#__PURE__*/_jsx("header", {
|
107
|
-
className: cx(stl(
|
107
|
+
className: cx(stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["min-h-14 flex items-center justify-between space-x-2"]))), title ? stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["border-b border-grey-100 pl-8 pr-16"]))) : stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["justify-end px-8"]))), !title && hideCloseIcon && stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["hidden"])))),
|
108
108
|
children: /*#__PURE__*/_jsx(Dialog.Title, {
|
109
109
|
asChild: true,
|
110
110
|
children: title ? /*#__PURE__*/_jsx("div", {
|
111
|
-
className: stl(
|
111
|
+
className: stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["flex-1 display-heading truncate"]))),
|
112
112
|
children: title
|
113
113
|
}) : /*#__PURE__*/_jsx(VisuallyHidden, {
|
114
114
|
children: locale.modalTitle
|
@@ -118,7 +118,7 @@ export var Modal = function Modal(_ref) {
|
|
118
118
|
className: cx(!fullBleed && SIZE_PADDING_CLASSNAMES[size]),
|
119
119
|
children: children
|
120
120
|
}), !hideCloseIcon && /*#__PURE__*/_jsx("div", {
|
121
|
-
className: stl(
|
121
|
+
className: stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["-mr-2 absolute top-3 right-8"]))),
|
122
122
|
children: /*#__PURE__*/_jsx(Dialog.Close, {
|
123
123
|
ref: closeButtonRef,
|
124
124
|
asChild: true,
|
@@ -6,7 +6,6 @@ var _excluded = ["className", "children"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
8
8
|
import cx from "clsx";
|
9
|
-
import { FlexGrid } from "./../../../Layout";
|
10
9
|
import stl from "./../../../styles/helpers/satellitePrefixer";
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
11
|
export var ModalFooter = function ModalFooter(_ref) {
|
@@ -14,11 +13,7 @@ export var ModalFooter = function ModalFooter(_ref) {
|
|
14
13
|
children = _ref.children,
|
15
14
|
props = _objectWithoutProperties(_ref, _excluded);
|
16
15
|
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
17
|
-
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["mt-8"]))), className),
|
18
|
-
children:
|
19
|
-
spacing: "md",
|
20
|
-
alignment: "center",
|
21
|
-
children: children
|
22
|
-
})
|
16
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["mt-8 flex justify-end gap-4 items-center"]))), className),
|
17
|
+
children: children
|
23
18
|
}));
|
24
19
|
};
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
*/
|
8
8
|
function prefixTailwindClassName(tailwindPrefix, classname) {
|
9
9
|
if (classname.startsWith("@container")) return "".concat(tailwindPrefix).concat(classname);
|
10
|
-
var searchZone = classname.replace(
|
10
|
+
var searchZone = classname.replace(/\[[^\]]+\]$/, "");
|
11
11
|
|
12
12
|
// important marker
|
13
13
|
var prefixInsertIndex = searchZone.lastIndexOf("!");
|
@@ -22,6 +22,12 @@ function prefixTailwindClassName(tailwindPrefix, classname) {
|
|
22
22
|
prefixInsertIndex = searchZone.lastIndexOf("@");
|
23
23
|
}
|
24
24
|
prefixInsertIndex += 1;
|
25
|
+
|
26
|
+
// This can happen when using arbitrary properties like [scrollbar-gutter:stable]
|
27
|
+
// In which case we don't want to prefix the classname
|
28
|
+
if (classname[prefixInsertIndex] === "[") {
|
29
|
+
return classname;
|
30
|
+
}
|
25
31
|
return classname.slice(0, prefixInsertIndex) + tailwindPrefix + classname.slice(prefixInsertIndex);
|
26
32
|
}
|
27
33
|
export default prefixTailwindClassName;
|
@@ -145,5 +145,5 @@ export default {
|
|
145
145
|
}
|
146
146
|
}
|
147
147
|
},
|
148
|
-
plugins: [require("@tailwindcss/container-queries"), require("./base.tailwind"), require("../Helpers/utilities/overlay.tailwind"), require("../Helpers/utilities/utilities.tailwind"), require("../Helpers/utilities/focusable.tailwind"), require("../Typography/Typography.tailwind"), require("../Layout/FlexGrid/FlexGrid.tailwind"), require("../Fields/AutoComplete/AutoComplete.tailwind"), require("../Actions/Button/Button.tailwind"), require("../Actions/ToggleGroup/ToggleGroup.tailwind"), require("../Actions/Accordion/Accordion.tailwind"), require("../Layout/Card/Card.tailwind"), require("../Fields/Checkbox/Checkbox.tailwind"), require("../Indicators/Toast/Toast.tailwind"), require("../Helpers/HelpUnderline/HelpUnderline.tailwind"), require("../Fields/Input/Input.tailwind"), require("../Helpers/InstantSearch/InstantSearch.tailwind"), require("../Indicators/KeyboardKey/KeyboardKey.tailwind"), require("../Indicators/Medallion/Medallion.tailwind"), require("../Overlay/Modal/Modal.tailwind"), require("../Indicators/ProgressBar/ProgressBar.tailwind"), require("../Indicators/ProgressSpinner/ProgressSpinner.tailwind"), require("../Fields/RadioGroup/RadioButton.tailwind"), require("../Indicators/ScrollIndicator/ScrollIndicator.tailwind"), require("../Fields/Select/Select.tailwind"), require("../Indicators/Separator/Separator.tailwind"), require("../Actions/SegmentedControl/SegmentedControl.tailwind"), require("../Navigation/Tabs/Tabs.tailwind"), require("../Layout/CollapsibleCard/CollapsibleCard.tailwind"), require("../Layout/Tables/DataTable/DataTable.tailwind"), require("../Layout/Tables/Table/Table.tailwind"), require("../Helpers/ShimmerText/ShimmerText.tailwind"), require("../Indicators/Tag/Tag.tailwind"), require("../Fields/TextArea/TextArea.tailwind"), require("../Fields/Switch/Switch.tailwind"), require("../Overlay/Tooltip/Tooltip.tailwind"), require("../Helpers/UserContent/UserContent.tailwind"), require("../Fields/DatePicker/DatePicker.tailwind")]
|
148
|
+
plugins: [require("@tailwindcss/container-queries"), require("./base.tailwind"), require("../Helpers/utilities/overlay.tailwind"), require("../Helpers/utilities/utilities.tailwind"), require("../Helpers/utilities/focusable.tailwind"), require("../Typography/Typography.tailwind"), require("../Layout/FlexGrid/FlexGrid.tailwind"), require("../Fields/AutoComplete/AutoComplete.tailwind"), require("../Actions/Button/Button.tailwind"), require("../Actions/ToggleGroup/ToggleGroup.tailwind"), require("../Actions/Accordion/Accordion.tailwind"), require("../Layout/Card/Card.tailwind"), require("../Fields/Checkbox/Checkbox.tailwind"), require("../Indicators/Toast/Toast.tailwind"), require("../Helpers/HelpUnderline/HelpUnderline.tailwind"), require("../Fields/Input/Input.tailwind"), require("../Helpers/InstantSearch/InstantSearch.tailwind"), require("../Indicators/KeyboardKey/KeyboardKey.tailwind"), require("../Indicators/Medallion/Medallion.tailwind"), require("../Overlay/Modal/Modal.tailwind"), require("../Indicators/ProgressBar/ProgressBar.tailwind"), require("../Indicators/ProgressSpinner/ProgressSpinner.tailwind"), require("../Fields/RadioGroup/RadioButton.tailwind"), require("../Indicators/ScrollIndicator/ScrollIndicator.tailwind"), require("../Fields/Select/Select.tailwind"), require("../Indicators/Separator/Separator.tailwind"), require("../Actions/SegmentedControl/SegmentedControl.tailwind"), require("../Navigation/Tabs/Tabs.tailwind"), require("../Layout/CollapsibleCard/CollapsibleCard.tailwind"), require("../Layout/Tables/DataTable/DataTable.tailwind"), require("../Layout/Tables/Table/Table.tailwind"), require("../Helpers/ShimmerText/ShimmerText.tailwind"), require("../Indicators/Tag/Tag.tailwind"), require("../Fields/TextArea/TextArea.tailwind"), require("../Fields/Switch/Switch.tailwind"), require("../Overlay/Tooltip/Tooltip.tailwind"), require("../Helpers/UserContent/UserContent.tailwind"), require("../Helpers/MarkdownContent/MarkdownContent.tailwind"), require("../Fields/DatePicker/DatePicker.tailwind")]
|
149
149
|
};
|
package/dist/esm/types.d.ts
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="react" />
|
1
2
|
export declare type ColorVariant = "accent" | "grey" | "green" | "blue" | "orange" | "red";
|
2
3
|
/**
|
3
4
|
* Ensures at least one type is required
|
@@ -21,4 +22,10 @@ declare type Without<Type, Union> = {
|
|
21
22
|
[Property in Exclude<keyof Type, keyof Union>]?: never;
|
22
23
|
};
|
23
24
|
export declare type XOR<Type, Union> = Type | Union extends object ? (Without<Type, Union> & Union) | (Without<Union, Type> & Type) : Type | Union;
|
25
|
+
export declare type SvgComponent = React.ComponentType<{
|
26
|
+
className?: string;
|
27
|
+
style?: {
|
28
|
+
[s: string]: any;
|
29
|
+
};
|
30
|
+
}>;
|
24
31
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
export declare const isCssPropertySupported: <P extends number | typeof Symbol.iterator | "filter" | "fill" | "
|
1
|
+
export declare const isCssPropertySupported: <P extends number | typeof Symbol.iterator | "filter" | "fill" | "appearance" | "bottom" | "clear" | "columns" | "content" | "cursor" | "display" | "flex" | "float" | "gap" | "hyphens" | "inset" | "isolation" | "left" | "opacity" | "order" | "overflow" | "position" | "resize" | "right" | "rotate" | "scale" | "stroke" | "top" | "transform" | "transition" | "visibility" | "borderColor" | "borderRadius" | "borderSpacing" | "borderWidth" | "margin" | "padding" | "translate" | "item" | "width" | "height" | "color" | "alignmentBaseline" | "baselineShift" | "clip" | "clipPath" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "direction" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "offset" | "paintOrder" | "pointerEvents" | "shapeRendering" | "stopColor" | "stopOpacity" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textDecoration" | "textRendering" | "unicodeBidi" | "wordSpacing" | "writingMode" | "grid" | "marker" | "all" | "border" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "aspectRatio" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundBlendMode" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "blockSize" | "borderBlock" | "borderBlockColor" | "borderBlockEnd" | "borderBlockEndColor" | "borderBlockEndStyle" | "borderBlockEndWidth" | "borderBlockStart" | "borderBlockStartColor" | "borderBlockStartStyle" | "borderBlockStartWidth" | "borderBlockStyle" | "borderBlockWidth" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "emptyCells" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "font" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSynthesis" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "imageOrientation" | "inlineSize" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "justifyContent" | "justifyItems" | "justifySelf" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maskClip" | "maskComposite" | "maskImage" | "maskMode" | "maskOrigin" | "maskPosition" | "maskRepeat" | "maskSize" | "maskType" | "maxBlockSize" | "maxHeight" | "maxInlineSize" | "maxWidth" | "minBlockSize" | "minHeight" | "minInlineSize" | "minWidth" | "mixBlendMode" | "objectFit" | "objectPosition" | "offsetDistance" | "offsetPath" | "offsetRotate" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflowAnchor" | "overflowWrap" | "overflowX" | "overflowY" | "overscrollBehavior" | "overscrollBehaviorBlock" | "overscrollBehaviorInline" | "overscrollBehaviorX" | "overscrollBehaviorY" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "printColorAdjust" | "quotes" | "rowGap" | "rubyPosition" | "scrollBehavior" | "scrollMargin" | "scrollMarginBlock" | "scrollMarginBlockEnd" | "scrollMarginBlockStart" | "scrollMarginBottom" | "scrollMarginInline" | "scrollMarginInlineEnd" | "scrollMarginInlineStart" | "scrollMarginLeft" | "scrollMarginRight" | "scrollMarginTop" | "scrollPadding" | "scrollPaddingBlock" | "scrollPaddingBlockEnd" | "scrollPaddingBlockStart" | "scrollPaddingBottom" | "scrollPaddingInline" | "scrollPaddingInlineEnd" | "scrollPaddingInlineStart" | "scrollPaddingLeft" | "scrollPaddingRight" | "scrollPaddingTop" | "scrollSnapAlign" | "scrollSnapStop" | "scrollSnapType" | "scrollbarGutter" | "shapeImageThreshold" | "shapeMargin" | "shapeOutside" | "tabSize" | "tableLayout" | "textAlign" | "textAlignLast" | "textCombineUpright" | "textDecorationColor" | "textDecorationLine" | "textDecorationSkipInk" | "textDecorationStyle" | "textDecorationThickness" | "textEmphasis" | "textEmphasisColor" | "textEmphasisPosition" | "textEmphasisStyle" | "textIndent" | "textOrientation" | "textOverflow" | "textShadow" | "textTransform" | "textUnderlineOffset" | "textUnderlinePosition" | "touchAction" | "transformBox" | "transformOrigin" | "transformStyle" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "userSelect" | "verticalAlign" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxShadow" | "webkitBoxSizing" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitLineClamp" | "webkitMask" | "webkitMaskBoxImage" | "webkitMaskBoxImageOutset" | "webkitMaskBoxImageRepeat" | "webkitMaskBoxImageSlice" | "webkitMaskBoxImageSource" | "webkitMaskBoxImageWidth" | "webkitMaskClip" | "webkitMaskComposite" | "webkitMaskImage" | "webkitMaskOrigin" | "webkitMaskPosition" | "webkitMaskRepeat" | "webkitMaskSize" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserSelect" | "whiteSpace" | "widows" | "willChange" | "wordBreak" | "wordWrap" | "zIndex" | "getPropertyPriority" | "getPropertyValue" | "removeProperty" | "setProperty">(prop: P, value: CSSStyleDeclaration[P]) => boolean;
|