@algolia/satellite 1.6.0 → 1.8.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 +142 -0
- package/dist/cjs/Actions/Accordion/Accordion.js +149 -0
- package/dist/cjs/Actions/Accordion/Accordion.tailwind.d.ts +5 -0
- package/dist/cjs/Actions/Accordion/Accordion.tailwind.js +44 -0
- package/dist/cjs/Actions/Button/PolymorphicButton.js +2 -2
- package/dist/cjs/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/cjs/Actions/Button/types.d.ts +2 -2
- package/dist/cjs/Actions/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/cjs/Actions/index.d.ts +2 -0
- package/dist/cjs/Actions/index.js +18 -0
- package/dist/cjs/Fields/AutoComplete/AutoComplete.js +4 -4
- package/dist/cjs/Fields/DatePicker/components/Calendar.js +1 -4
- package/dist/cjs/Fields/Field/Field.js +12 -2
- package/dist/cjs/Fields/Field/FieldContext.d.ts +1 -0
- package/dist/cjs/Fields/Field/useField.d.ts +2 -1
- package/dist/cjs/Fields/Field/useField.js +7 -2
- package/dist/cjs/Fields/Form/Form.d.ts +12 -10
- package/dist/cjs/Fields/Form/Form.js +50 -38
- package/dist/cjs/Fields/Form/FormContext.d.ts +6 -6
- package/dist/cjs/Fields/Form/FormContext.js +2 -2
- package/dist/cjs/Fields/Form/index.d.ts +4 -3
- package/dist/cjs/Fields/Form/index.js +31 -21
- package/dist/cjs/Fields/Form/stories/AsynchronousValidation.js +142 -127
- package/dist/cjs/Fields/Form/stories/Complex.js +648 -642
- package/dist/cjs/Fields/Form/stories/DependentFieldsValidation.js +127 -121
- package/dist/cjs/Fields/Form/stories/DirtyFields.js +195 -189
- package/dist/cjs/Fields/Form/stories/DynamicFieldsValidation.js +251 -245
- package/dist/cjs/Fields/Form/stories/ExtraErrors.js +276 -0
- package/dist/cjs/Fields/Form/stories/FieldArrays.js +180 -174
- package/dist/cjs/Fields/Form/stories/JSONForms.js +58 -55
- package/dist/cjs/Fields/Form/stories/MultiStep.js +456 -472
- package/dist/cjs/Fields/Form/stories/ValidationStrategies.js +226 -237
- package/dist/cjs/Fields/Form/useForm.d.ts +1 -1
- package/dist/cjs/Fields/Form/useForm.js +3 -3
- package/dist/cjs/Fields/RangeSlider/RangeSlider.js +7 -8
- package/dist/cjs/Helpers/utilities/focusable.tailwind.js +1 -1
- package/dist/cjs/Indicators/ScrollIndicator/ScrollIndicator.js +1 -2
- package/dist/cjs/Indicators/Skeleton/Skeleton.d.ts +7 -0
- package/dist/cjs/Indicators/Skeleton/Skeleton.js +12 -5
- package/dist/cjs/Layout/Sidebar/SidebarButtonLink.js +1 -1
- package/dist/cjs/Layout/Sidebar/SidebarLink.js +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +1 -1
- package/dist/cjs/Layout/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +4 -5
- package/dist/cjs/Layout/Tables/DataTable/DataTable.d.ts +3 -1
- package/dist/cjs/Layout/Tables/DataTable/DataTable.js +3 -0
- package/dist/cjs/Layout/Tables/DataTable/components/Body.d.ts +1 -1
- package/dist/cjs/Layout/Tables/DataTable/components/Header.d.ts +1 -1
- package/dist/cjs/Layout/Tables/DataTable/components/HeaderCell.d.ts +1 -1
- package/dist/cjs/Layout/Tables/DataTable/utils.d.ts +1 -1
- package/dist/cjs/Layout/Tables/Table/Table.d.ts +2 -0
- package/dist/cjs/Layout/Tables/Table/Table.js +4 -2
- package/dist/cjs/Layout/Tables/Table/Table.tailwind.js +6 -1
- package/dist/cjs/Navigation/Stepper/Step.js +8 -7
- package/dist/cjs/Navigation/Stepper/Stepper.d.ts +6 -0
- package/dist/cjs/Navigation/Stepper/Stepper.js +9 -3
- package/dist/cjs/Navigation/Stepper/StepperContext.d.ts +2 -1
- package/dist/cjs/Overlay/Dropdown/DropdownContext.d.ts +1 -1
- package/dist/cjs/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/components/collapsible/CollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/components/items/LinkItem.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/components/items/ToggleItem.d.ts +1 -1
- package/dist/cjs/styles/helpers/makePurgeCssExtractor.js +3 -3
- package/dist/cjs/styles/tailwind.config.js +1 -1
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/cjs/utils/useTriggerInputChange.js +4 -3
- package/dist/esm/Actions/Accordion/Accordion.d.ts +142 -0
- package/dist/esm/Actions/Accordion/Accordion.js +139 -0
- package/dist/esm/Actions/Accordion/Accordion.tailwind.d.ts +5 -0
- package/dist/esm/Actions/Accordion/Accordion.tailwind.js +43 -0
- package/dist/esm/Actions/Button/PolymorphicButton.js +2 -2
- package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/esm/Actions/Button/types.d.ts +2 -2
- package/dist/esm/Actions/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/esm/Actions/index.d.ts +2 -0
- package/dist/esm/Actions/index.js +2 -2
- package/dist/esm/Fields/AutoComplete/AutoComplete.js +4 -4
- package/dist/esm/Fields/DatePicker/components/Calendar.js +1 -4
- package/dist/esm/Fields/Field/Field.js +13 -3
- package/dist/esm/Fields/Field/FieldContext.d.ts +1 -0
- package/dist/esm/Fields/Field/useField.d.ts +2 -1
- package/dist/esm/Fields/Field/useField.js +7 -2
- package/dist/esm/Fields/Form/Form.d.ts +12 -10
- package/dist/esm/Fields/Form/Form.js +52 -40
- package/dist/esm/Fields/Form/FormContext.d.ts +6 -6
- package/dist/esm/Fields/Form/FormContext.js +1 -1
- package/dist/esm/Fields/Form/index.d.ts +4 -3
- package/dist/esm/Fields/Form/index.js +2 -3
- package/dist/esm/Fields/Form/stories/AsynchronousValidation.js +143 -128
- package/dist/esm/Fields/Form/stories/Complex.js +649 -643
- package/dist/esm/Fields/Form/stories/DependentFieldsValidation.js +128 -122
- package/dist/esm/Fields/Form/stories/DirtyFields.js +196 -190
- package/dist/esm/Fields/Form/stories/DynamicFieldsValidation.js +252 -246
- package/dist/esm/Fields/Form/stories/ExtraErrors.js +266 -0
- package/dist/esm/Fields/Form/stories/FieldArrays.js +181 -175
- package/dist/esm/Fields/Form/stories/JSONForms.js +59 -56
- package/dist/esm/Fields/Form/stories/MultiStep.js +457 -473
- package/dist/esm/Fields/Form/stories/ValidationStrategies.js +227 -238
- package/dist/esm/Fields/Form/useForm.d.ts +1 -1
- package/dist/esm/Fields/Form/useForm.js +3 -3
- package/dist/esm/Fields/RangeSlider/RangeSlider.js +8 -9
- package/dist/esm/Helpers/utilities/focusable.tailwind.js +1 -1
- package/dist/esm/Indicators/ScrollIndicator/ScrollIndicator.js +1 -2
- package/dist/esm/Indicators/Skeleton/Skeleton.d.ts +7 -0
- package/dist/esm/Indicators/Skeleton/Skeleton.js +12 -5
- package/dist/esm/Layout/Sidebar/SidebarButtonLink.js +1 -1
- package/dist/esm/Layout/Sidebar/SidebarLink.js +2 -2
- package/dist/esm/Layout/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +1 -1
- package/dist/esm/Layout/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +4 -5
- package/dist/esm/Layout/Tables/DataTable/DataTable.d.ts +3 -1
- package/dist/esm/Layout/Tables/DataTable/DataTable.js +3 -0
- package/dist/esm/Layout/Tables/DataTable/components/Body.d.ts +1 -1
- package/dist/esm/Layout/Tables/DataTable/components/Header.d.ts +1 -1
- package/dist/esm/Layout/Tables/DataTable/components/HeaderCell.d.ts +1 -1
- package/dist/esm/Layout/Tables/DataTable/utils.d.ts +1 -1
- package/dist/esm/Layout/Tables/Table/Table.d.ts +2 -0
- package/dist/esm/Layout/Tables/Table/Table.js +4 -2
- package/dist/esm/Layout/Tables/Table/Table.tailwind.js +6 -1
- package/dist/esm/Navigation/Stepper/Step.js +8 -7
- package/dist/esm/Navigation/Stepper/Stepper.d.ts +6 -0
- package/dist/esm/Navigation/Stepper/Stepper.js +9 -3
- package/dist/esm/Navigation/Stepper/StepperContext.d.ts +2 -1
- package/dist/esm/Overlay/Dropdown/DropdownContext.d.ts +1 -1
- package/dist/esm/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/collapsible/CollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/items/LinkItem.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/items/ToggleItem.d.ts +1 -1
- package/dist/esm/styles/helpers/makePurgeCssExtractor.js +3 -3
- package/dist/esm/styles/tailwind.config.js +1 -1
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/utils/useTriggerInputChange.js +4 -3
- package/dist/satellite.min.css +1 -1
- package/package.json +20 -19
@@ -1,14 +1,20 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
-
|
5
|
-
var _excluded = ["circle", "image", "className"];
|
3
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
|
+
var _excluded = ["circle", "image", "className", "size"];
|
5
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
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
9
|
import { ImageIcon } from "../../Icons";
|
10
10
|
import stl from "../../styles/helpers/satellitePrefixer";
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
|
+
var DEFAULT_SKELETON_SIZES = {
|
13
|
+
sm: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["w-full h-8"]))),
|
14
|
+
md: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["w-full h-16"]))),
|
15
|
+
lg: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["w-full h-32"])))
|
16
|
+
};
|
17
|
+
|
12
18
|
/**
|
13
19
|
* The `Skeleton` component is used to display a placeholder during loading.
|
14
20
|
*
|
@@ -21,12 +27,13 @@ export var Skeleton = function Skeleton(_ref) {
|
|
21
27
|
_ref$image = _ref.image,
|
22
28
|
image = _ref$image === void 0 ? false : _ref$image,
|
23
29
|
className = _ref.className,
|
30
|
+
size = _ref.size,
|
24
31
|
props = _objectWithoutProperties(_ref, _excluded);
|
25
32
|
return /*#__PURE__*/_jsx("div", _objectSpread(_objectSpread({}, props), {}, {
|
26
33
|
"aria-hidden": true,
|
27
|
-
className: cx(stl(
|
34
|
+
className: cx(stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["flex animate-pulse bg-grey-200/80 ", ""])), circle ? "rounded-full aspect-square max-w-fit" : "rounded"), size && DEFAULT_SKELETON_SIZES[size], className),
|
28
35
|
children: image ? /*#__PURE__*/_jsx(ImageIcon, {
|
29
|
-
className: stl(
|
36
|
+
className: stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["mx-auto self-center text-grey-300/50 w-[40%] h-[40%] max-w-[32px] max-h-[32px]"])))
|
30
37
|
}) : null
|
31
38
|
}));
|
32
39
|
};
|
@@ -59,7 +59,7 @@ export var SidebarButtonLink = function SidebarButtonLink(props) {
|
|
59
59
|
onBlur: function onBlur() {
|
60
60
|
return setIsInteractedWith(false);
|
61
61
|
},
|
62
|
-
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n h-8 min-w-8 w-full rounded\n flex items-center space-x-3\n border border-transparent\n display-body\n hover:no-underline focus:no-underline\n ", "\n ", "\n ", "\n ", "\n "])), disabled ? "cursor-not-allowed opacity-70" : "
|
62
|
+
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n h-8 min-w-8 w-full rounded\n flex items-center space-x-3\n border border-transparent\n display-body\n hover:no-underline focus:no-underline\n ", "\n ", "\n ", "\n ", "\n "])), disabled ? "cursor-not-allowed opacity-70" : "focusable-visible", isActive ? "shadow-z100" : !disabled && "hover:border-grey-200", isActive && "bg-gradient-to-b from-white to-grey-50", collapsed ? "pl-2" : "px-2"),
|
63
63
|
"aria-current": isActive,
|
64
64
|
children: [/*#__PURE__*/_jsx(Icon, {
|
65
65
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["", " ml-[-3px] shrink-0"])), showColors ? "text-accent-600" : "text-grey-400"),
|
@@ -23,14 +23,14 @@ export var SidebarLink = function SidebarLink(props) {
|
|
23
23
|
var isActive = !disabled && !isExternalLink && isLinkActive((_linkProps$href = linkProps.href) !== null && _linkProps$href !== void 0 ? _linkProps$href : "");
|
24
24
|
return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread({}, linkProps), {}, {
|
25
25
|
id: id,
|
26
|
-
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex items-center
|
26
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex items-center w-full\n group focusable-visible-group hover:no-underline focus:outline-none\n ", "\n "])), disabled ? "cursor-not-allowed" : "cursor-pointer"), className),
|
27
27
|
"aria-current": isActive,
|
28
28
|
children: [/*#__PURE__*/_jsx(Icon, {
|
29
29
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["shrink-0 mr-3 ", ""])), disabled ? "text-grey-300" : "text-grey-500"),
|
30
30
|
width: "1rem",
|
31
31
|
height: "1rem"
|
32
32
|
}), /*#__PURE__*/_jsxs("span", {
|
33
|
-
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex-1 inline-flex items-center overflow-hidden\n ", ""])), disabled ? "text-grey-300" : isActive ? "font-semibold text-accent-600" : "typo-subdued
|
33
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex-1 inline-flex items-center overflow-hidden\n ", ""])), disabled ? "text-grey-300" : isActive ? "font-semibold text-accent-600" : "typo-subdued focusable-visible-group-item group-hover:text-accent-600"),
|
34
34
|
children: [/*#__PURE__*/_jsx("span", {
|
35
35
|
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["truncate"]))),
|
36
36
|
children: children
|
@@ -16,7 +16,7 @@ export var SidebarGroupLink = function SidebarGroupLink(props) {
|
|
16
16
|
var isExternalLink = linkProps.target === "_blank";
|
17
17
|
return /*#__PURE__*/_jsxs("a", _objectSpread(_objectSpread({}, linkProps), {}, {
|
18
18
|
id: id,
|
19
|
-
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n inline-flex w-full items-center hover:no-underline
|
19
|
+
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n inline-flex w-full items-center hover:no-underline leading-md\n ", "\n ", ""])), disabled ? "cursor-not-allowed" : "cursor-pointer focusable-visible", disabled ? "text-grey-300" : active ? "font-semibold text-accent-600" : "typo-subdued hover:text-accent-600"),
|
20
20
|
"aria-current": active,
|
21
21
|
children: [/*#__PURE__*/_jsx("span", {
|
22
22
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate"]))),
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
4
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7
|
4
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
|
5
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
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; }
|
7
7
|
import uniqueId from "lodash/uniqueId";
|
@@ -51,7 +51,7 @@ export var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
|
51
51
|
className: className,
|
52
52
|
children: [isCollapsibleSidebarLinksGroupProps(props) && /*#__PURE__*/_jsxs("button", {
|
53
53
|
type: "button",
|
54
|
-
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex w-full text-left items-center mb-4
|
54
|
+
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex w-full text-left items-center mb-4 focus:outline-none group focusable-visible-group cursor-pointer"]))),
|
55
55
|
onClick: function onClick() {
|
56
56
|
return setIsOpen(!isOpen);
|
57
57
|
},
|
@@ -62,7 +62,7 @@ export var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
|
62
62
|
width: "1rem",
|
63
63
|
height: "1rem"
|
64
64
|
}), /*#__PURE__*/_jsx("span", {
|
65
|
-
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["truncate display-subheading uppercase text-grey-800
|
65
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["truncate display-subheading uppercase text-grey-800 focusable-visible-group-item group-hover:text-accent-500 mr-2"]))),
|
66
66
|
children: props.title
|
67
67
|
}), /*#__PURE__*/_jsx(ChevronRightIcon, {
|
68
68
|
className: stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["shrink-0 text-grey-500 motion-safe:transition-all motion-safe:duration-150 ease-in-out ", ""])), isOpen && "rotate-90"),
|
@@ -76,10 +76,9 @@ export var SidebarLinksGroup = function SidebarLinksGroup(props) {
|
|
76
76
|
activeIndex: activeLinkIndex,
|
77
77
|
linksCount: links.length
|
78
78
|
}), /*#__PURE__*/_jsx("ul", {
|
79
|
-
className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["flex-1 space-y-2
|
79
|
+
className: stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["flex-1 space-y-2 min-w-0"]))),
|
80
80
|
children: links.map(function (link, idx) {
|
81
81
|
return /*#__PURE__*/_jsx("li", {
|
82
|
-
className: stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["overflow-hidden"]))),
|
83
82
|
children: /*#__PURE__*/_jsx(SidebarGroupLink, _objectSpread(_objectSpread({}, link), {}, {
|
84
83
|
active: activeLinkIndex === idx
|
85
84
|
}))
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { ReactNode } from "react";
|
2
|
+
import { type DisplayMode } from "../Table";
|
2
3
|
import type { ColumnDefinition, DataConfiguration, GetItemId, PaginationConfiguration, Row, SelectMode, Sorting, Status } from "./types";
|
3
4
|
declare type CanSelectItem<Item> = (item: Item, idx: number) => boolean;
|
4
5
|
export declare type SortMode = "single" | "multi";
|
@@ -21,6 +22,7 @@ interface BaseDataTableProps<Item> {
|
|
21
22
|
pagination?: PaginationConfiguration;
|
22
23
|
/** the `onChange` is triggered when either sorting or paginating */
|
23
24
|
onChange?(dataConfiguration: DataConfiguration): void;
|
25
|
+
mode?: DisplayMode;
|
24
26
|
/** Specify the global status of the table */
|
25
27
|
status?: Status;
|
26
28
|
/** Allows for specifying a custom empty state */
|
@@ -51,5 +53,5 @@ export declare type DataTableProps<Item> = BaseDataTableProps<Item> & (DataTable
|
|
51
53
|
*
|
52
54
|
* See the [Data Table documentation page](https://satellite.algolia.com/layouts/data-table) for more information.
|
53
55
|
*/
|
54
|
-
export declare const DataTable: <Item extends
|
56
|
+
export declare const DataTable: <Item extends object>({ data, itemId, columns, onChange, mode, status, noDataContent, errorContent, sorting, sortMode, pagination, selectMode, selection, onSelectionChange, canSelectItem, canHoverRow, onRowHoveredChanged, locale, }: DataTableProps<Item>) => import("react/jsx-runtime").JSX.Element;
|
55
57
|
export {};
|
@@ -45,6 +45,8 @@ export var DataTable = function DataTable(_ref) {
|
|
45
45
|
itemId = _ref.itemId,
|
46
46
|
columns = _ref.columns,
|
47
47
|
onChange = _ref.onChange,
|
48
|
+
_ref$mode = _ref.mode,
|
49
|
+
mode = _ref$mode === void 0 ? "comfortable" : _ref$mode,
|
48
50
|
_ref$status = _ref.status,
|
49
51
|
status = _ref$status === void 0 ? "success" : _ref$status,
|
50
52
|
noDataContent = _ref.noDataContent,
|
@@ -213,6 +215,7 @@ export var DataTable = function DataTable(_ref) {
|
|
213
215
|
})
|
214
216
|
}), /*#__PURE__*/_jsxs(Table, {
|
215
217
|
className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["datatable ", " ", ""])), status === "loading" && "pointer-events-none select-none", status === "loading" && data.length === 0 && "h-48"),
|
218
|
+
mode: mode,
|
216
219
|
highlight: false,
|
217
220
|
footer: shouldRenderPagination() && /*#__PURE__*/_jsx(DataTableFooter, {
|
218
221
|
pagination: pagination,
|
@@ -11,4 +11,4 @@ export interface DataTableBodyProps<Item> extends Pick<DataTableProps<Item>, "se
|
|
11
11
|
selectMode: SelectMode;
|
12
12
|
locale: Required<DataTableLocale>;
|
13
13
|
}
|
14
|
-
export declare const DataTableBody: <Item extends
|
14
|
+
export declare const DataTableBody: <Item extends object>({ rows, columns, status, noDataContent, errorContent, selectMode, selection, onSelectionChange, onRowHoverChange, canHoverRow, locale, }: DataTableBodyProps<Item>) => import("react/jsx-runtime").JSX.Element;
|
@@ -5,4 +5,4 @@ export interface DataTableHeaderProps<Item> {
|
|
5
5
|
onToggleSort: (columnId: string, direction: SortingDirection) => void;
|
6
6
|
disabled?: boolean;
|
7
7
|
}
|
8
|
-
export declare const DataTableHeader: <Item extends
|
8
|
+
export declare const DataTableHeader: <Item extends object>({ columns, sorting, onToggleSort, disabled, }: DataTableHeaderProps<Item>) => import("react/jsx-runtime").JSX.Element;
|
@@ -8,4 +8,4 @@ export interface DataTableHeaderCellProps<Item> extends HTMLAttributes<HTMLTable
|
|
8
8
|
onToggleSort: (columnId: string, sortingDirection: SortingDirection) => void;
|
9
9
|
children: ReactNode;
|
10
10
|
}
|
11
|
-
export declare const DataTableHeaderCell: <Item extends
|
11
|
+
export declare const DataTableHeaderCell: <Item extends object>({ sortingDirection, onToggleSort, column: { id, className, sort }, disabled, children, ...props }: DataTableHeaderCellProps<Item>) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { AdvancedColumnDefinition, DeterminatePagination, IndeterminatePagination, PaginationConfiguration, Row } from "./types";
|
2
2
|
export declare const isDeterminatePagination: (pagination: PaginationConfiguration) => pagination is DeterminatePagination;
|
3
3
|
export declare const isIndeterminatePagination: (pagination: PaginationConfiguration) => pagination is IndeterminatePagination;
|
4
|
-
export declare const getCellValue: <Item extends
|
4
|
+
export declare const getCellValue: <Item extends object>(column: AdvancedColumnDefinition<Item>, row: Row<Item>) => any;
|
@@ -1,9 +1,11 @@
|
|
1
1
|
import type { DetailedHTMLProps, ReactNode, TableHTMLAttributes, VFC } from "react";
|
2
|
+
export declare type DisplayMode = "comfortable" | "compact";
|
2
3
|
export interface TableProps extends DetailedHTMLProps<TableHTMLAttributes<HTMLTableElement>, HTMLTableElement> {
|
3
4
|
footer?: ReactNode;
|
4
5
|
smallFooter?: boolean;
|
5
6
|
hasActions?: boolean;
|
6
7
|
highlight?: boolean;
|
8
|
+
mode?: DisplayMode;
|
7
9
|
}
|
8
10
|
/**
|
9
11
|
* The `Table` component is used to structure content in a grid to make it easier to see relationships and to facilitate understanding.
|
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
4
|
var _templateObject, _templateObject2, _templateObject3;
|
5
|
-
var _excluded = ["className", "footer", "smallFooter", "hasActions", "highlight"];
|
5
|
+
var _excluded = ["className", "footer", "smallFooter", "hasActions", "highlight", "mode"];
|
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";
|
@@ -22,13 +22,15 @@ export var Table = function Table(_ref) {
|
|
22
22
|
hasActions = _ref.hasActions,
|
23
23
|
_ref$highlight = _ref.highlight,
|
24
24
|
highlight = _ref$highlight === void 0 ? true : _ref$highlight,
|
25
|
+
_ref$mode = _ref.mode,
|
26
|
+
mode = _ref$mode === void 0 ? "comfortable" : _ref$mode,
|
25
27
|
props = _objectWithoutProperties(_ref, _excluded);
|
26
28
|
return /*#__PURE__*/_jsxs("div", {
|
27
29
|
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["rounded text-grey-900 bg-white display-body"]))), className),
|
28
30
|
children: [/*#__PURE__*/_jsx("div", {
|
29
31
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["overflow-x-auto"]))),
|
30
32
|
children: /*#__PURE__*/_jsx("table", _objectSpread(_objectSpread({}, props), {}, {
|
31
|
-
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["table ", " ", ""])), hasActions && "table-with-actions", highlight && "table-with-highlight")
|
33
|
+
className: stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["table ", " ", " ", ""])), mode === "compact" && "table-compact", hasActions && "table-with-actions", highlight && "table-with-highlight")
|
32
34
|
}))
|
33
35
|
}), !!footer && /*#__PURE__*/_jsx(TableFooter, {
|
34
36
|
size: smallFooter ? "small" : "default",
|
@@ -10,7 +10,7 @@ var tablePlugin = plugin(function (_ref) {
|
|
10
10
|
borderCollapse: "collapse",
|
11
11
|
textAlign: "left",
|
12
12
|
"th, td": {
|
13
|
-
padding: "
|
13
|
+
padding: "12px 16px"
|
14
14
|
},
|
15
15
|
thead: {
|
16
16
|
backgroundColor: theme("colors.grey.50")
|
@@ -23,6 +23,11 @@ var tablePlugin = plugin(function (_ref) {
|
|
23
23
|
borderBottom: "1px solid ".concat(theme("colors.grey.100"))
|
24
24
|
}
|
25
25
|
},
|
26
|
+
".table-compact": {
|
27
|
+
"th, td": {
|
28
|
+
padding: "10px 16px"
|
29
|
+
}
|
30
|
+
},
|
26
31
|
".table-with-actions": {
|
27
32
|
"th:last-of-type, td:last-of-type": {
|
28
33
|
textAlign: "right"
|
@@ -2,7 +2,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
3
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
4
4
|
var _excluded = ["className", "index", "icon", "label", "name", "completed", "disabled"];
|
5
|
-
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;
|
5
|
+
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, _templateObject31;
|
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";
|
@@ -56,6 +56,7 @@ export var Step = function Step(_ref) {
|
|
56
56
|
var activeLocale = typeof locale.activeStep === "function" ? locale.activeStep(stepName) : locale.activeStep;
|
57
57
|
var completedLocale = typeof locale.completedStep === "function" ? locale.completedStep(stepName) : locale.completedStep;
|
58
58
|
var incompletedLocale = typeof locale.incompletedStep === "function" ? locale.incompletedStep(stepName) : locale.incompletedStep;
|
59
|
+
var isVertical = context.orientation === "vertical";
|
59
60
|
var Icon = CustomIcon;
|
60
61
|
if (completed) {
|
61
62
|
Icon = CheckIconInternal;
|
@@ -71,7 +72,7 @@ export var Step = function Step(_ref) {
|
|
71
72
|
"aria-label": disabled ? disabledLocale : active ? activeLocale : completed ? completedLocale : incompletedLocale,
|
72
73
|
"aria-current": active ? "step" : undefined,
|
73
74
|
disabled: disabled,
|
74
|
-
tabIndex: index === context.
|
75
|
+
tabIndex: index === context.focusedStep ? 0 : -1,
|
75
76
|
"data-step-idx": index,
|
76
77
|
onClick: function onClick() {
|
77
78
|
var _context$onStepChange;
|
@@ -89,20 +90,20 @@ export var Step = function Step(_ref) {
|
|
89
90
|
}
|
90
91
|
},
|
91
92
|
children: [context.connectors && /*#__PURE__*/_jsx("span", {
|
92
|
-
className: cx(stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["absolute -z-10 border-l h-full
|
93
|
+
className: cx(stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["absolute -z-10 group-last/step:hidden"]))), isVertical ? stl(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["border-l h-full"]))) : stl(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["border-t w-4 -right-px translate-x-full"]))), completed ? stl(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["border-green-600"]))) : stl(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["border-grey-200"]))), isVertical && CONNECTOR_SIZE_CLASSNAMES[context.size])
|
93
94
|
}), /*#__PURE__*/_jsx("span", {
|
94
|
-
className: cx(stl(
|
95
|
+
className: cx(stl(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["rounded-full flex items-center justify-center shrink-0 text-sm"]))), !active && !completed && stl(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["bg-grey-100"]))), !active && !completed && !disabled && stl(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["group-hover/button:bg-white"]))), active && !completed && stl(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["bg-grey-800 text-white"]))), completed && stl(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["bg-green-600 text-white"]))), ICON_SIZE_CLASSNAMES[context.size]),
|
95
96
|
children: Icon ? /*#__PURE__*/_jsx(Icon, {
|
96
97
|
width: ICON_SIZE[context.size],
|
97
98
|
height: ICON_SIZE[context.size]
|
98
99
|
}) : index + 1
|
99
100
|
}), /*#__PURE__*/_jsxs("div", {
|
100
|
-
className: cx(disabled && stl(
|
101
|
+
className: cx(disabled && stl(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["text-grey-300"])))),
|
101
102
|
children: [!!label && /*#__PURE__*/_jsx("div", {
|
102
|
-
className: stl(
|
103
|
+
className: stl(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["text-sm line-clamp-1"]))),
|
103
104
|
children: label
|
104
105
|
}), /*#__PURE__*/_jsx("div", {
|
105
|
-
className: cx(stl(
|
106
|
+
className: cx(stl(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["text-base line-clamp-2"]))), (completed || active) && stl(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["text-grey-900"]))), context.size === "small" && stl(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["text-sm"])))),
|
106
107
|
children: name
|
107
108
|
})]
|
108
109
|
})]
|
@@ -7,6 +7,7 @@ export declare type StepperLocale = {
|
|
7
7
|
completedStep?: string | ((stepName: string) => string);
|
8
8
|
};
|
9
9
|
export declare type StepperSizes = "small" | "default" | "large";
|
10
|
+
export declare type StepperOrientation = "horizontal" | "vertical";
|
10
11
|
export interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
11
12
|
/**
|
12
13
|
* Defines the steps of the Stepper.
|
@@ -27,6 +28,11 @@ export interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, "chil
|
|
27
28
|
* @default "default"
|
28
29
|
*/
|
29
30
|
size?: StepperSizes;
|
31
|
+
/**
|
32
|
+
* Defines the orientation of the Stepper.
|
33
|
+
* @default "vertical"
|
34
|
+
*/
|
35
|
+
orientation?: StepperOrientation;
|
30
36
|
/**
|
31
37
|
* Defines whether the connectors should be displayed.
|
32
38
|
* @default true
|
@@ -2,8 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
5
|
-
var _templateObject;
|
6
|
-
var _excluded = ["steps", "activeStep", "onStepChange", "size", "connectors", "locale", "className"];
|
5
|
+
var _templateObject, _templateObject2, _templateObject3;
|
6
|
+
var _excluded = ["steps", "activeStep", "onStepChange", "size", "orientation", "connectors", "locale", "className"];
|
7
7
|
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; }
|
8
8
|
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; }
|
9
9
|
import cx from "clsx";
|
@@ -34,6 +34,8 @@ export var Stepper = function Stepper(_ref) {
|
|
34
34
|
_onStepChange = _ref.onStepChange,
|
35
35
|
_ref$size = _ref.size,
|
36
36
|
size = _ref$size === void 0 ? "default" : _ref$size,
|
37
|
+
_ref$orientation = _ref.orientation,
|
38
|
+
orientation = _ref$orientation === void 0 ? "vertical" : _ref$orientation,
|
37
39
|
_ref$connectors = _ref.connectors,
|
38
40
|
connectors = _ref$connectors === void 0 ? true : _ref$connectors,
|
39
41
|
propsLocale = _ref.locale,
|
@@ -80,6 +82,7 @@ export var Stepper = function Stepper(_ref) {
|
|
80
82
|
activeStep: activeStep,
|
81
83
|
focusedStep: focusedStep,
|
82
84
|
size: size,
|
85
|
+
orientation: orientation,
|
83
86
|
connectors: connectors,
|
84
87
|
locale: locale,
|
85
88
|
onStepChange: function onStepChange(index) {
|
@@ -96,11 +99,14 @@ export var Stepper = function Stepper(_ref) {
|
|
96
99
|
className: cx(className),
|
97
100
|
children: /*#__PURE__*/_jsx("ol", {
|
98
101
|
role: "presentation",
|
99
|
-
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex flex-col
|
102
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex isolate"]))), orientation === "vertical" ? stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["flex-col"]))) : stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["gap-0"])))),
|
100
103
|
ref: containerRef,
|
101
104
|
onFocus: function onFocus() {
|
102
105
|
setFocusedStep(activeStep);
|
103
106
|
},
|
107
|
+
onBlur: function onBlur() {
|
108
|
+
setFocusedStep(activeStep);
|
109
|
+
},
|
104
110
|
onKeyDown: function onKeyDown(event) {
|
105
111
|
switch (event.key) {
|
106
112
|
case "ArrowLeft":
|
@@ -1,9 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import type { StepperLocale, StepperSizes } from "./Stepper";
|
2
|
+
import type { StepperLocale, StepperOrientation, StepperSizes } from "./Stepper";
|
3
3
|
export declare type StepperContextType = {
|
4
4
|
activeStep: number;
|
5
5
|
focusedStep: number;
|
6
6
|
size: StepperSizes;
|
7
|
+
orientation: StepperOrientation;
|
7
8
|
connectors: boolean;
|
8
9
|
locale: StepperLocale;
|
9
10
|
onStepChange?: (index: number) => void;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export interface DropdownContextInterface {
|
3
|
-
showMenu(show: boolean)
|
3
|
+
showMenu: (show: boolean) => void;
|
4
4
|
}
|
5
5
|
export declare const DropdownContext: import("react").Context<DropdownContextInterface | null>;
|
6
6
|
export declare const useDropdownContext: () => DropdownContextInterface;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export interface DropdownCollapsibleItemsGroupContextInterface {
|
3
3
|
expandedItems: readonly string[];
|
4
|
-
onItemClick(name: string)
|
4
|
+
onItemClick: (name: string) => void;
|
5
5
|
}
|
6
6
|
export declare const DropdownCollapsibleItemsGroupContext: import("react").Context<DropdownCollapsibleItemsGroupContextInterface | null>;
|
7
7
|
/** @deprecated */
|
package/dist/esm/Overlay/MenuButton/components/collapsible/CollapsibleItemsGroupContext.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
export interface CollapsibleItemsGroupContextInterface {
|
3
3
|
expandedItems: readonly string[];
|
4
|
-
onItemClick(name: string)
|
4
|
+
onItemClick: (name: string) => void;
|
5
5
|
}
|
6
6
|
export declare const CollapsibleItemsGroupContext: import("react").Context<CollapsibleItemsGroupContextInterface | null>;
|
7
7
|
export declare const useCollapsibleItemsGroup: () => CollapsibleItemsGroupContextInterface;
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import type { IconComponentType } from "Icons";
|
2
1
|
import type { FC } from "react";
|
2
|
+
import type { IconComponentType } from "../../../../Icons";
|
3
3
|
import type { BaseItemProps } from "../../useMenuItemProps";
|
4
4
|
declare type LinkItemNavigationType = "auto" | "reload" | "newTab";
|
5
5
|
export declare type LinkItemProps = BaseItemProps & {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { DropdownMenuCheckboxItemProps } from "@radix-ui/react-dropdown-menu";
|
2
|
-
import type { IconComponentType } from "Icons";
|
3
2
|
import type { FC } from "react";
|
3
|
+
import type { IconComponentType } from "../../../../Icons";
|
4
4
|
export interface ToggleItemProps extends Omit<DropdownMenuCheckboxItemProps, "asChild"> {
|
5
5
|
startIcon?: IconComponentType;
|
6
6
|
}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
function _createForOfIteratorHelper(
|
2
|
-
function _unsupportedIterableToArray(
|
3
|
-
function _arrayLikeToArray(
|
1
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
2
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
3
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
4
4
|
import _prefixTailwindClassName from "./prefixTailwindClassName";
|
5
5
|
// @ts-check
|
6
6
|
var prefixTailwindClassName = _prefixTailwindClassName;
|
@@ -142,5 +142,5 @@ export default {
|
|
142
142
|
}
|
143
143
|
}
|
144
144
|
},
|
145
|
-
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("../Layout/Card/Card.tailwind"), require("../Fields/Checkbox/Checkbox.tailwind"), require("../Indicators/EmptyState/EmptyState.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("../Helpers/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("../Helpers/Separator/Separator.tailwind"), require("../Actions/Switch/Switch.tailwind"), require("../Navigation/Tabs/Tabs.tailwind"), require("../Layout/Tables/DataTable/DataTable.tailwind"), require("../Layout/Tables/Table/Table.tailwind"), require("../Indicators/Tag/Tag.tailwind"), require("../Fields/TextArea/TextArea.tailwind"), require("../Fields/Toggle/Toggle.tailwind"), require("../Overlay/Tooltip/Tooltip.tailwind"), require("../Helpers/UserContent/UserContent.tailwind"), require("../Fields/DatePicker/DatePicker.tailwind")]
|
145
|
+
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/EmptyState/EmptyState.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("../Helpers/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("../Helpers/Separator/Separator.tailwind"), require("../Actions/Switch/Switch.tailwind"), require("../Navigation/Tabs/Tabs.tailwind"), require("../Layout/Tables/DataTable/DataTable.tailwind"), require("../Layout/Tables/Table/Table.tailwind"), require("../Indicators/Tag/Tag.tailwind"), require("../Fields/TextArea/TextArea.tailwind"), require("../Fields/Toggle/Toggle.tailwind"), require("../Overlay/Tooltip/Tooltip.tailwind"), require("../Helpers/UserContent/UserContent.tailwind"), require("../Fields/DatePicker/DatePicker.tailwind")]
|
146
146
|
};
|
@@ -1 +1 @@
|
|
1
|
-
export declare const isCssPropertySupported: <P extends number | typeof Symbol.iterator | "filter" | "fill" | "clipPath" | "marker" | "mask" | "grid" | "fontSize" | "translate" | "content" | "color" | "width" | "height" | "direction" | "alignmentBaseline" | "baselineShift" | "clip" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "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" | "
|
1
|
+
export declare const isCssPropertySupported: <P extends number | typeof Symbol.iterator | "filter" | "fill" | "clipPath" | "marker" | "mask" | "grid" | "fontSize" | "translate" | "content" | "color" | "width" | "height" | "direction" | "alignmentBaseline" | "baselineShift" | "clip" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "cursor" | "display" | "dominantBaseline" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "fontFamily" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "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" | "item" | "all" | "left" | "right" | "top" | "bottom" | "columns" | "padding" | "resize" | "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" | "border" | "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" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "perspective" | "perspectiveOrigin" | "placeContent" | "placeItems" | "placeSelf" | "position" | "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" | "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;
|
@@ -5,15 +5,16 @@ import { useCallback } from "react";
|
|
5
5
|
*/
|
6
6
|
export var useTriggerInputChange = function useTriggerInputChange(inputRef) {
|
7
7
|
var triggerInputChange = useCallback(function (value) {
|
8
|
+
var _Object$getOwnPropert;
|
8
9
|
var input = inputRef.current;
|
9
10
|
if (!input) return;
|
10
11
|
|
11
|
-
// @
|
12
|
-
var nativeInputValueSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value").set;
|
12
|
+
// eslint-disable-next-line @typescript-eslint/unbound-method
|
13
|
+
var nativeInputValueSetter = (_Object$getOwnPropert = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")) === null || _Object$getOwnPropert === void 0 ? void 0 : _Object$getOwnPropert.set;
|
13
14
|
var ev2 = new Event("input", {
|
14
15
|
bubbles: true
|
15
16
|
});
|
16
|
-
nativeInputValueSetter.call(input, value);
|
17
|
+
nativeInputValueSetter === null || nativeInputValueSetter === void 0 || nativeInputValueSetter.call(input, value);
|
17
18
|
input.dispatchEvent(ev2);
|
18
19
|
}, [inputRef]);
|
19
20
|
return triggerInputChange;
|