@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.
Files changed (92) hide show
  1. package/dist/cjs/Actions/Accordion/Accordion.d.ts +8 -0
  2. package/dist/cjs/Actions/Accordion/Accordion.js +104 -57
  3. package/dist/cjs/Actions/Accordion/Accordion.styles.d.ts +170 -0
  4. package/dist/cjs/Actions/Accordion/Accordion.styles.js +57 -0
  5. package/dist/cjs/Actions/Button/PolymorphicButton.js +5 -5
  6. package/dist/cjs/Actions/Button/PolymorphicIconButton.js +2 -2
  7. package/dist/cjs/Actions/Button/styles.d.ts +1 -0
  8. package/dist/cjs/Actions/Button/styles.js +15 -10
  9. package/dist/cjs/Actions/SegmentedControl/SegmentedControl.js +3 -2
  10. package/dist/cjs/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
  11. package/dist/cjs/Actions/ToggleButton/ToggleButtonBase.js +3 -3
  12. package/dist/cjs/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +4 -4
  13. package/dist/cjs/Chat/ChatMessage/ChatMessage.d.ts +1 -1
  14. package/dist/cjs/Chat/ChatMessage/ChatMessage.styles.d.ts +1 -1
  15. package/dist/cjs/Chat/ChatMessageError/ChatMessageError.styles.d.ts +2 -2
  16. package/dist/cjs/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +2 -2
  17. package/dist/cjs/Fields/Field/Field.js +3 -3
  18. package/dist/cjs/Fields/Input/Input.js +10 -13
  19. package/dist/cjs/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
  20. package/dist/cjs/Fields/Switch/Switch.tailwind.js +9 -9
  21. package/dist/cjs/Fields/TextArea/TextArea.tailwind.js +3 -3
  22. package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.d.ts +22 -0
  23. package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.js +35 -0
  24. package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
  25. package/dist/cjs/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
  26. package/dist/cjs/Helpers/MarkdownContent/index.d.ts +1 -0
  27. package/dist/cjs/Helpers/MarkdownContent/index.js +16 -0
  28. package/dist/cjs/Helpers/UserContent/UserContent.tailwind.js +1 -3
  29. package/dist/cjs/Helpers/index.d.ts +1 -0
  30. package/dist/cjs/Helpers/index.js +11 -0
  31. package/dist/cjs/Icons/index.d.ts +1 -1
  32. package/dist/cjs/Icons/index.js +6 -0
  33. package/dist/cjs/Illustrations/index.d.ts +7 -0
  34. package/dist/cjs/Illustrations/index.js +1254 -0
  35. package/dist/cjs/Indicators/EmptyState/EmptyState.js +35 -2
  36. package/dist/cjs/Indicators/EmptyState/types.d.ts +4 -3
  37. package/dist/cjs/Overlay/MenuButton/MenuButton.d.ts +23 -7
  38. package/dist/cjs/Overlay/Modal/Modal.js +8 -8
  39. package/dist/cjs/Overlay/Modal/components/ModalFooter.js +2 -7
  40. package/dist/cjs/index.d.ts +1 -0
  41. package/dist/cjs/index.js +12 -0
  42. package/dist/cjs/styles/helpers/prefixTailwindClassName.js +7 -1
  43. package/dist/cjs/styles/tailwind.config.js +1 -1
  44. package/dist/cjs/types.d.ts +7 -0
  45. package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
  46. package/dist/esm/Actions/Accordion/Accordion.d.ts +8 -0
  47. package/dist/esm/Actions/Accordion/Accordion.js +105 -58
  48. package/dist/esm/Actions/Accordion/Accordion.styles.d.ts +170 -0
  49. package/dist/esm/Actions/Accordion/Accordion.styles.js +50 -0
  50. package/dist/esm/Actions/Button/PolymorphicButton.js +6 -6
  51. package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
  52. package/dist/esm/Actions/Button/styles.d.ts +1 -0
  53. package/dist/esm/Actions/Button/styles.js +14 -9
  54. package/dist/esm/Actions/SegmentedControl/SegmentedControl.js +3 -2
  55. package/dist/esm/Actions/SegmentedControl/SegmentedControlOption.js +6 -3
  56. package/dist/esm/Actions/ToggleButton/ToggleButtonBase.js +4 -4
  57. package/dist/esm/Chat/ChatContextAccordion/ChatContextAccordion.styles.d.ts +4 -4
  58. package/dist/esm/Chat/ChatMessage/ChatMessage.d.ts +1 -1
  59. package/dist/esm/Chat/ChatMessage/ChatMessage.styles.d.ts +1 -1
  60. package/dist/esm/Chat/ChatMessageError/ChatMessageError.styles.d.ts +2 -2
  61. package/dist/esm/Chat/ChatMessageLoader/ChatMessageLoader.styles.d.ts +2 -2
  62. package/dist/esm/Fields/Field/Field.js +3 -3
  63. package/dist/esm/Fields/Input/Input.js +10 -13
  64. package/dist/esm/Fields/RadioGroup/RadioGroupContext.d.ts +2 -0
  65. package/dist/esm/Fields/Switch/Switch.tailwind.js +9 -9
  66. package/dist/esm/Fields/TextArea/TextArea.tailwind.js +3 -3
  67. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.d.ts +22 -0
  68. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.js +28 -0
  69. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.d.ts +5 -0
  70. package/dist/esm/Helpers/MarkdownContent/MarkdownContent.tailwind.js +138 -0
  71. package/dist/esm/Helpers/MarkdownContent/index.d.ts +1 -0
  72. package/dist/esm/Helpers/MarkdownContent/index.js +1 -0
  73. package/dist/esm/Helpers/UserContent/UserContent.tailwind.js +1 -3
  74. package/dist/esm/Helpers/index.d.ts +1 -0
  75. package/dist/esm/Helpers/index.js +2 -1
  76. package/dist/esm/Icons/index.d.ts +1 -1
  77. package/dist/esm/Icons/index.js +1 -1
  78. package/dist/esm/Illustrations/index.d.ts +7 -0
  79. package/dist/esm/Illustrations/index.js +1248 -0
  80. package/dist/esm/Indicators/EmptyState/EmptyState.js +35 -2
  81. package/dist/esm/Indicators/EmptyState/types.d.ts +4 -3
  82. package/dist/esm/Overlay/MenuButton/MenuButton.d.ts +23 -7
  83. package/dist/esm/Overlay/Modal/Modal.js +8 -8
  84. package/dist/esm/Overlay/Modal/components/ModalFooter.js +2 -7
  85. package/dist/esm/index.d.ts +1 -0
  86. package/dist/esm/index.js +1 -0
  87. package/dist/esm/styles/helpers/prefixTailwindClassName.js +7 -1
  88. package/dist/esm/styles/tailwind.config.js +1 -1
  89. package/dist/esm/types.d.ts +7 -0
  90. package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
  91. package/dist/satellite.min.css +1 -1
  92. package/package.json +4 -4
@@ -5,11 +5,15 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.EmptyState = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+ var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
8
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
11
  var _clsx = _interopRequireDefault(require("clsx"));
10
12
  var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
11
13
  var _jsxRuntime = require("react/jsx-runtime");
12
14
  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;
15
+ 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; }
16
+ 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) { (0, _defineProperty2["default"])(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; }
13
17
  var CONTAINER_CONTEXT_CLASSNAMES = {
14
18
  result: {
15
19
  medium: (0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["max-w-xs"]))),
@@ -47,6 +51,30 @@ var ACTIONS_CONTEXT_CLASSNAMES = {
47
51
  feature: (0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["mt-3"]))),
48
52
  page: (0, _satellitePrefixer["default"])(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["mt-6 md:flex-row"])))
49
53
  };
54
+ var ILLUSTRATION_SIZES = {
55
+ small: {
56
+ width: 100,
57
+ height: 100
58
+ },
59
+ medium: {
60
+ width: 160,
61
+ height: 160
62
+ },
63
+ large: {
64
+ width: 400,
65
+ height: 400
66
+ }
67
+ };
68
+ var injectIllustrationSize = function injectIllustrationSize(illustration, illustrationSize, extraStyle) {
69
+ if (illustrationSize && illustration && (0, _typeof2["default"])(illustration) === "object" && "type" in illustration) {
70
+ return _objectSpread(_objectSpread({}, illustration), {}, {
71
+ props: _objectSpread(_objectSpread({}, illustration.props), {}, {
72
+ style: _objectSpread(_objectSpread(_objectSpread({}, illustration.props.style), ILLUSTRATION_SIZES[illustrationSize]), extraStyle)
73
+ })
74
+ });
75
+ }
76
+ return illustration;
77
+ };
50
78
  var renderEmptyState = function renderEmptyState(_ref) {
51
79
  var title = _ref.title,
52
80
  description = _ref.description,
@@ -54,6 +82,7 @@ var renderEmptyState = function renderEmptyState(_ref) {
54
82
  actionsDirection = _ref.actionsDirection,
55
83
  leadIllustration = _ref.leadIllustration,
56
84
  pageIllustration = _ref.pageIllustration,
85
+ illustrationSize = _ref.illustrationSize,
57
86
  _ref$usageContext = _ref.usageContext,
58
87
  usageContext = _ref$usageContext === void 0 ? "feature" : _ref$usageContext,
59
88
  _ref$width = _ref.width,
@@ -64,13 +93,17 @@ var renderEmptyState = function renderEmptyState(_ref) {
64
93
  var titleClassNames = (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject22 || (_templateObject22 = (0, _taggedTemplateLiteral2["default"])(["text-grey-900"]))), TITLE_CONTEXT_CLASSNAMES[usageContext]);
65
94
  var descriptionClassNames = (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject23 || (_templateObject23 = (0, _taggedTemplateLiteral2["default"])(["text-grey-600"]))), DESCRIPTION_CONTEXT_CLASSNAMES[usageContext]);
66
95
  var actionsClassNames = (0, _clsx["default"])(ACTIONS_CONTEXT_CLASSNAMES[usageContext]);
96
+ var sizedLeadIllustration = injectIllustrationSize(leadIllustration, illustrationSize, {
97
+ display: "inline-block"
98
+ });
99
+ var sizedPageIllustration = injectIllustrationSize(pageIllustration, illustrationSize);
67
100
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
68
101
  className: containerClassNames,
69
102
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
70
103
  className: (0, _satellitePrefixer["default"])(_templateObject24 || (_templateObject24 = (0, _taggedTemplateLiteral2["default"])(["min-w-2/5"]))),
71
104
  children: [centered && !!leadIllustration && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
72
105
  className: LEAD_ILLUS_CONTEXT_CLASSNAMES[usageContext],
73
- children: leadIllustration
106
+ children: sizedLeadIllustration
74
107
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
75
108
  className: titleClassNames,
76
109
  children: title
@@ -83,7 +116,7 @@ var renderEmptyState = function renderEmptyState(_ref) {
83
116
  })]
84
117
  }), !centered && usageContext === "page" && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
85
118
  className: (0, _satellitePrefixer["default"])(_templateObject30 || (_templateObject30 = (0, _taggedTemplateLiteral2["default"])(["hidden lg:flex items-center justify-center"]))),
86
- children: pageIllustration
119
+ children: sizedPageIllustration
87
120
  })]
88
121
  });
89
122
  };
@@ -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" | "illustration"> {
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" | "illustration"> {
51
+ interface EmptyStatePropsUsageContextFeature extends Omit<EmptyStatePropsAll, "usageContext" | "pageIllustration"> {
51
52
  usageContext: "feature";
52
- illustration?: never;
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<import("./components/collapsible").CollapsibleItemProps & {
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<import("./components/collapsible").CollapsibleItemsMultiGroupProps>>;
16
- CollapsibleItemsSingleGroup: import("react").FC<import("react").PropsWithChildren<import("./components/collapsible").CollapsibleItemsExclusiveGroupProps>>;
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<import("./components/CustomTrigger").CustomTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
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<import("./components/items").LinkItemProps>;
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<import("./components/items").ToggleItemProps>>;
33
- Trigger: import("react").ForwardRefExoticComponent<import("./components/DefaultTrigger").DefaultTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
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
  };
@@ -21,7 +21,7 @@ var _Satellite = require("./../../Satellite");
21
21
  var _satellitePrefixer = _interopRequireDefault(require("./../../styles/helpers/satellitePrefixer"));
22
22
  var _prefersReducedMotion = require("./../../utils/prefersReducedMotion");
23
23
  var _jsxRuntime = require("react/jsx-runtime");
24
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18;
24
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
25
25
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
26
26
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
27
27
  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; }
@@ -86,10 +86,10 @@ var Modal = exports.Modal = function Modal(_ref) {
86
86
  asChild: true,
87
87
  children: triggerButton
88
88
  }), createPortal( /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Overlay, {
89
- className: (0, _clsx["default"])(animate && !_prefersReducedMotion.prefersReducedMotion && (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["modal-animated"]))), (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["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 px-4 py-10"])))),
89
+ className: (0, _clsx["default"])(animate && !_prefersReducedMotion.prefersReducedMotion && (0, _satellitePrefixer["default"])(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2["default"])(["modal-animated"]))), (0, _satellitePrefixer["default"])(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2["default"])(["modal-overlay bg-grey-900/30 z-modalOverlay inset-0 fixed w-full h-full flex items-start justify-center px-8 py-10"]))), (0, _satellitePrefixer["default"])(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["overflow-x-hidden overflow-y-auto [scrollbar-gutter:stable_both-edges]"])))),
90
90
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Content, {
91
91
  ref: dialogContentRef,
92
- className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2["default"])(["modal-content"]))), SIZE_CLASSNAMES[size], centerY && (0, _satellitePrefixer["default"])(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["flex m-auto justify-center"])))),
92
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2["default"])(["modal-content"]))), SIZE_CLASSNAMES[size], centerY && (0, _satellitePrefixer["default"])(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["flex m-auto justify-center"])))),
93
93
  "aria-describedby": undefined,
94
94
  onOpenAutoFocus: function onOpenAutoFocus(e) {
95
95
  var _closeButtonRef$curre;
@@ -107,18 +107,18 @@ var Modal = exports.Modal = function Modal(_ref) {
107
107
  }
108
108
  },
109
109
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
110
- className: (0, _satellitePrefixer["default"])(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2["default"])(["modal-container"]))),
110
+ className: (0, _satellitePrefixer["default"])(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["modal-container"]))),
111
111
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Layout.Card, {
112
112
  as: "div",
113
113
  elevation: "500",
114
- className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2["default"])(["relative"]))), className),
114
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["relative"]))), className),
115
115
  fullBleed: true,
116
116
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("header", {
117
- className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2["default"])(["min-h-14 flex items-center justify-between space-x-2"]))), title ? (0, _satellitePrefixer["default"])(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["border-b border-grey-100 pl-8 pr-16"]))) : (0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["justify-end px-8"]))), !title && hideCloseIcon && (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["hidden"])))),
117
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2["default"])(["min-h-14 flex items-center justify-between space-x-2"]))), title ? (0, _satellitePrefixer["default"])(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2["default"])(["border-b border-grey-100 pl-8 pr-16"]))) : (0, _satellitePrefixer["default"])(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2["default"])(["justify-end px-8"]))), !title && hideCloseIcon && (0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["hidden"])))),
118
118
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Title, {
119
119
  asChild: true,
120
120
  children: title ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
121
- className: (0, _satellitePrefixer["default"])(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2["default"])(["flex-1 display-heading truncate"]))),
121
+ className: (0, _satellitePrefixer["default"])(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["flex-1 display-heading truncate"]))),
122
122
  children: title
123
123
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactVisuallyHidden.VisuallyHidden, {
124
124
  children: locale.modalTitle
@@ -128,7 +128,7 @@ var Modal = exports.Modal = function Modal(_ref) {
128
128
  className: (0, _clsx["default"])(!fullBleed && SIZE_PADDING_CLASSNAMES[size]),
129
129
  children: children
130
130
  }), !hideCloseIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
131
- className: (0, _satellitePrefixer["default"])(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2["default"])(["-mr-2 absolute top-3 right-8"]))),
131
+ className: (0, _satellitePrefixer["default"])(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2["default"])(["-mr-2 absolute top-3 right-8"]))),
132
132
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Dialog.Close, {
133
133
  ref: closeButtonRef,
134
134
  asChild: true,
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _clsx = _interopRequireDefault(require("clsx"));
12
- var _Layout = require("./../../../Layout");
13
12
  var _satellitePrefixer = _interopRequireDefault(require("./../../../styles/helpers/satellitePrefixer"));
14
13
  var _jsxRuntime = require("react/jsx-runtime");
15
14
  var _templateObject;
@@ -21,11 +20,7 @@ var ModalFooter = exports.ModalFooter = function ModalFooter(_ref) {
21
20
  children = _ref.children,
22
21
  props = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
23
22
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, props), {}, {
24
- className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["mt-8"]))), className),
25
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Layout.FlexGrid, {
26
- spacing: "md",
27
- alignment: "center",
28
- children: children
29
- })
23
+ className: (0, _clsx["default"])((0, _satellitePrefixer["default"])(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["mt-8 flex justify-end gap-4 items-center"]))), className),
24
+ children: children
30
25
  }));
31
26
  };
@@ -11,6 +11,7 @@ export * from "./Chat";
11
11
  export * from "./Fields";
12
12
  export * from "./Helpers";
13
13
  export * from "./Icons";
14
+ export * from "./Illustrations";
14
15
  export * from "./Indicators";
15
16
  export * from "./Layout";
16
17
  export * from "./Navigation";
package/dist/cjs/index.js CHANGED
@@ -146,6 +146,18 @@ Object.keys(_Icons).forEach(function (key) {
146
146
  }
147
147
  });
148
148
  });
149
+ var _Illustrations = require("./Illustrations");
150
+ Object.keys(_Illustrations).forEach(function (key) {
151
+ if (key === "default" || key === "__esModule") return;
152
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
153
+ if (key in exports && exports[key] === _Illustrations[key]) return;
154
+ Object.defineProperty(exports, key, {
155
+ enumerable: true,
156
+ get: function get() {
157
+ return _Illustrations[key];
158
+ }
159
+ });
160
+ });
149
161
  var _Indicators = require("./Indicators");
150
162
  Object.keys(_Indicators).forEach(function (key) {
151
163
  if (key === "default" || key === "__esModule") return;
@@ -9,7 +9,7 @@
9
9
  */
10
10
  function prefixTailwindClassName(tailwindPrefix, classname) {
11
11
  if (classname.startsWith("@container")) return "".concat(tailwindPrefix).concat(classname);
12
- var searchZone = classname.replace(/-\[[^\]]+\]$/, "");
12
+ var searchZone = classname.replace(/\[[^\]]+\]$/, "");
13
13
 
14
14
  // important marker
15
15
  var prefixInsertIndex = searchZone.lastIndexOf("!");
@@ -24,6 +24,12 @@ function prefixTailwindClassName(tailwindPrefix, classname) {
24
24
  prefixInsertIndex = searchZone.lastIndexOf("@");
25
25
  }
26
26
  prefixInsertIndex += 1;
27
+
28
+ // This can happen when using arbitrary properties like [scrollbar-gutter:stable]
29
+ // In which case we don't want to prefix the classname
30
+ if (classname[prefixInsertIndex] === "[") {
31
+ return classname;
32
+ }
27
33
  return classname.slice(0, prefixInsertIndex) + tailwindPrefix + classname.slice(prefixInsertIndex);
28
34
  }
29
35
  module.exports = prefixTailwindClassName;
@@ -144,5 +144,5 @@ module.exports = {
144
144
  }
145
145
  }
146
146
  },
147
- 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")]
147
+ 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")]
148
148
  };
@@ -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" | "width" | "height" | "color" | "alignmentBaseline" | "baselineShift" | "clip" | "clipPath" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "direction" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "offset" | "opacity" | "order" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "textDecoration" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "wordSpacing" | "writingMode" | "grid" | "marker" | "translate" | "content" | "item" | "all" | "border" | "left" | "right" | "columns" | "top" | "bottom" | "accentColor" | "alignContent" | "alignItems" | "alignSelf" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "appearance" | "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" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderInline" | "borderInlineColor" | "borderInlineEnd" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStart" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderInlineStyle" | "borderInlineWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStartEndRadius" | "borderStartStartRadius" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "caretColor" | "clear" | "colorScheme" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columnSpan" | "columnWidth" | "contain" | "counterIncrement" | "counterReset" | "counterSet" | "cssFloat" | "cssText" | "emptyCells" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "float" | "font" | "fontFeatureSettings" | "fontKerning" | "fontOpticalSizing" | "fontSynthesis" | "fontVariantAlternates" | "fontVariantCaps" | "fontVariantEastAsian" | "fontVariantLigatures" | "fontVariantNumeric" | "fontVariantPosition" | "fontVariationSettings" | "gap" | "gridArea" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridColumn" | "gridColumnEnd" | "gridColumnGap" | "gridColumnStart" | "gridGap" | "gridRow" | "gridRowEnd" | "gridRowGap" | "gridRowStart" | "gridTemplate" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "hyphens" | "imageOrientation" | "inlineSize" | "inset" | "insetBlock" | "insetBlockEnd" | "insetBlockStart" | "insetInline" | "insetInlineEnd" | "insetInlineStart" | "isolation" | "justifyContent" | "justifyItems" | "justifySelf" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "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" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "position" | "printColorAdjust" | "quotes" | "resize" | "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" | "transition" | "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;
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;
@@ -1,6 +1,9 @@
1
1
  import * as RadixAccordion from "@radix-ui/react-accordion";
2
2
  import type { FC, ReactNode } from "react";
3
+ import type { VariantProps } from "tailwind-variants";
4
+ import { accordionStyles } from "./Accordion.styles";
3
5
  import type { IconComponentType } from "../../Icons";
6
+ declare type AccordionVariants = VariantProps<typeof accordionStyles>;
4
7
  declare type AccordionSharedProps = {
5
8
  /**
6
9
  * The content of the `Accordion`.
@@ -14,6 +17,11 @@ declare type AccordionSharedProps = {
14
17
  * Whether the `Accordion` is disabled, preventing the user from interacting with the accordion and all its items.
15
18
  */
16
19
  disabled?: boolean;
20
+ /**
21
+ * Display the Accordion in normal or a more compact style (no meta or description, smaller paddings).
22
+ * @default normal
23
+ */
24
+ variant?: AccordionVariants["variant"];
17
25
  };
18
26
  declare type AccordionSingleProps = {
19
27
  /**