@salt-ds/lab 1.0.0-alpha.25 → 1.0.0-alpha.26
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/css/salt-lab.css +86 -121
- package/dist-cjs/combo-box-next/ComboBoxNext.js +1 -1
- package/dist-cjs/combo-box-next/ComboBoxNext.js.map +1 -1
- package/dist-cjs/dropdown-next/DropdownNext.js +1 -2
- package/dist-cjs/dropdown-next/DropdownNext.js.map +1 -1
- package/dist-cjs/index.js +4 -0
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/pagination/CompactInput.css.js +6 -0
- package/dist-cjs/pagination/CompactInput.css.js.map +1 -0
- package/dist-cjs/pagination/CompactInput.js +31 -35
- package/dist-cjs/pagination/CompactInput.js.map +1 -1
- package/dist-cjs/pagination/CompactPaginator.css.js +6 -0
- package/dist-cjs/pagination/CompactPaginator.css.js.map +1 -0
- package/dist-cjs/pagination/CompactPaginator.js +76 -0
- package/dist-cjs/pagination/CompactPaginator.js.map +1 -0
- package/dist-cjs/pagination/GoToInput.css.js +6 -0
- package/dist-cjs/pagination/GoToInput.css.js.map +1 -0
- package/dist-cjs/pagination/GoToInput.js +37 -59
- package/dist-cjs/pagination/GoToInput.js.map +1 -1
- package/dist-cjs/pagination/PageButton.css.js +6 -0
- package/dist-cjs/pagination/PageButton.css.js.map +1 -0
- package/dist-cjs/pagination/PageButton.js +34 -33
- package/dist-cjs/pagination/PageButton.js.map +1 -1
- package/dist-cjs/pagination/PageRanges.css.js +6 -0
- package/dist-cjs/pagination/PageRanges.css.js.map +1 -0
- package/dist-cjs/pagination/PageRanges.js +73 -0
- package/dist-cjs/pagination/PageRanges.js.map +1 -0
- package/dist-cjs/pagination/Pagination.css.js +1 -1
- package/dist-cjs/pagination/Pagination.js +21 -38
- package/dist-cjs/pagination/Pagination.js.map +1 -1
- package/dist-cjs/pagination/PaginationContext.js +1 -6
- package/dist-cjs/pagination/PaginationContext.js.map +1 -1
- package/dist-cjs/pagination/Paginator.css.js +6 -0
- package/dist-cjs/pagination/Paginator.css.js.map +1 -0
- package/dist-cjs/pagination/Paginator.js +33 -43
- package/dist-cjs/pagination/Paginator.js.map +1 -1
- package/dist-cjs/pagination/usePaginationContext.js +1 -1
- package/dist-cjs/pagination/usePaginationContext.js.map +1 -1
- package/dist-cjs/pill-next/PillNext.css.js +1 -1
- package/dist-cjs/pill-next/PillNext.js +26 -31
- package/dist-cjs/pill-next/PillNext.js.map +1 -1
- package/dist-es/combo-box-next/ComboBoxNext.js +1 -1
- package/dist-es/combo-box-next/ComboBoxNext.js.map +1 -1
- package/dist-es/dropdown-next/DropdownNext.js +1 -2
- package/dist-es/dropdown-next/DropdownNext.js.map +1 -1
- package/dist-es/index.js +2 -0
- package/dist-es/index.js.map +1 -1
- package/dist-es/pagination/CompactInput.css.js +4 -0
- package/dist-es/pagination/CompactInput.css.js.map +1 -0
- package/dist-es/pagination/CompactInput.js +32 -36
- package/dist-es/pagination/CompactInput.js.map +1 -1
- package/dist-es/pagination/CompactPaginator.css.js +4 -0
- package/dist-es/pagination/CompactPaginator.css.js.map +1 -0
- package/dist-es/pagination/CompactPaginator.js +72 -0
- package/dist-es/pagination/CompactPaginator.js.map +1 -0
- package/dist-es/pagination/GoToInput.css.js +4 -0
- package/dist-es/pagination/GoToInput.css.js.map +1 -0
- package/dist-es/pagination/GoToInput.js +40 -62
- package/dist-es/pagination/GoToInput.js.map +1 -1
- package/dist-es/pagination/PageButton.css.js +4 -0
- package/dist-es/pagination/PageButton.css.js.map +1 -0
- package/dist-es/pagination/PageButton.js +34 -33
- package/dist-es/pagination/PageButton.js.map +1 -1
- package/dist-es/pagination/PageRanges.css.js +4 -0
- package/dist-es/pagination/PageRanges.css.js.map +1 -0
- package/dist-es/pagination/PageRanges.js +69 -0
- package/dist-es/pagination/PageRanges.js.map +1 -0
- package/dist-es/pagination/Pagination.css.js +1 -1
- package/dist-es/pagination/Pagination.js +20 -37
- package/dist-es/pagination/Pagination.js.map +1 -1
- package/dist-es/pagination/PaginationContext.js +1 -6
- package/dist-es/pagination/PaginationContext.js.map +1 -1
- package/dist-es/pagination/Paginator.css.js +4 -0
- package/dist-es/pagination/Paginator.css.js.map +1 -0
- package/dist-es/pagination/Paginator.js +32 -42
- package/dist-es/pagination/Paginator.js.map +1 -1
- package/dist-es/pagination/usePaginationContext.js +1 -1
- package/dist-es/pagination/usePaginationContext.js.map +1 -1
- package/dist-es/pill-next/PillNext.css.js +1 -1
- package/dist-es/pill-next/PillNext.js +28 -33
- package/dist-es/pill-next/PillNext.js.map +1 -1
- package/dist-types/combo-box-next/useComboBox.d.ts +2 -2
- package/dist-types/combo-box-next/useComboboxPortal.d.ts +2 -2
- package/dist-types/dialog/useDialog.d.ts +6 -7
- package/dist-types/drawer/useDrawer.d.ts +6 -7
- package/dist-types/dropdown-next/useDropdownNext.d.ts +12 -4
- package/dist-types/pagination/CompactInput.d.ts +2 -8
- package/dist-types/pagination/CompactPaginator.d.ts +1 -0
- package/dist-types/pagination/GoToInput.d.ts +13 -4
- package/dist-types/pagination/PageButton.d.ts +2 -3
- package/dist-types/pagination/PageRanges.d.ts +5 -0
- package/dist-types/pagination/Pagination.d.ts +15 -4
- package/dist-types/pagination/PaginationContext.d.ts +2 -4
- package/dist-types/pagination/Paginator.d.ts +6 -3
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/pill-next/PillNext.d.ts +1 -4
- package/dist-types/tabs/drag-drop/drag-utils.d.ts +6 -6
- package/package.json +3 -3
- package/dist-cjs/pagination/ArrowButton.js +0 -64
- package/dist-cjs/pagination/ArrowButton.js.map +0 -1
- package/dist-cjs/pagination/CompactControls.js +0 -38
- package/dist-cjs/pagination/CompactControls.js.map +0 -1
- package/dist-cjs/pagination/RegularControls.js +0 -58
- package/dist-cjs/pagination/RegularControls.js.map +0 -1
- package/dist-cjs/pagination/utils.js +0 -10
- package/dist-cjs/pagination/utils.js.map +0 -1
- package/dist-es/pagination/ArrowButton.js +0 -60
- package/dist-es/pagination/ArrowButton.js.map +0 -1
- package/dist-es/pagination/CompactControls.js +0 -34
- package/dist-es/pagination/CompactControls.js.map +0 -1
- package/dist-es/pagination/RegularControls.js +0 -54
- package/dist-es/pagination/RegularControls.js.map +0 -1
- package/dist-es/pagination/utils.js +0 -6
- package/dist-es/pagination/utils.js.map +0 -1
- package/dist-types/pagination/ArrowButton.d.ts +0 -7
- package/dist-types/pagination/CompactControls.d.ts +0 -8
- package/dist-types/pagination/RegularControls.d.ts +0 -8
- package/dist-types/pagination/utils.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Paginator.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,40 +1,30 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { useForkRef } from '@salt-ds/core';
|
|
3
|
-
import { ChevronLeftIcon, ChevronRightIcon } from '@salt-ds/icons';
|
|
4
2
|
import { clsx } from 'clsx';
|
|
5
|
-
import { forwardRef
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { makePrefixer, Button } from '@salt-ds/core';
|
|
5
|
+
import { ChevronLeftIcon, ChevronRightIcon } from '@salt-ds/icons';
|
|
6
|
+
import { PageRanges } from './PageRanges.js';
|
|
9
7
|
import { usePaginationContext } from './usePaginationContext.js';
|
|
10
|
-
import { withBaseName } from './utils.js';
|
|
11
8
|
import { useWindow } from '@salt-ds/window';
|
|
12
9
|
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
13
|
-
import css_248z from './
|
|
10
|
+
import css_248z from './Paginator.css.js';
|
|
14
11
|
|
|
12
|
+
const withBaseName = makePrefixer("saltPaginator");
|
|
15
13
|
const Paginator = forwardRef(
|
|
16
|
-
({
|
|
17
|
-
className,
|
|
18
|
-
boundaryCount,
|
|
19
|
-
siblingCount,
|
|
20
|
-
showPreviousNext = true,
|
|
21
|
-
FormFieldProps: FormFieldProps2,
|
|
22
|
-
...restProps
|
|
23
|
-
}, forwardedRef) => {
|
|
14
|
+
function Paginator2({ className, boundaryCount, siblingCount, ...restProps }, ref) {
|
|
24
15
|
const targetWindow = useWindow();
|
|
25
16
|
useComponentCssInjection({
|
|
26
|
-
testId: "salt-
|
|
17
|
+
testId: "salt-paginator",
|
|
27
18
|
css: css_248z,
|
|
28
19
|
window: targetWindow
|
|
29
20
|
});
|
|
30
|
-
const { count, page, onPageChange
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, [page, onPageChange, count]);
|
|
21
|
+
const { count, page, onPageChange } = usePaginationContext();
|
|
22
|
+
const onPreviousPage = (event) => {
|
|
23
|
+
onPageChange(event, Math.max(1, page - 1));
|
|
24
|
+
};
|
|
25
|
+
const onNextPage = (event) => {
|
|
26
|
+
onPageChange(event, Math.min(page + 1, count));
|
|
27
|
+
};
|
|
38
28
|
const isOnFirstPage = page === 1;
|
|
39
29
|
const isOnLastPage = page === count;
|
|
40
30
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -42,29 +32,29 @@ const Paginator = forwardRef(
|
|
|
42
32
|
...restProps,
|
|
43
33
|
ref,
|
|
44
34
|
children: [
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
/* @__PURE__ */ jsx(Button, {
|
|
36
|
+
variant: "secondary",
|
|
37
|
+
"aria-label": "Previous Page",
|
|
38
|
+
onClick: onPreviousPage,
|
|
48
39
|
disabled: isOnFirstPage,
|
|
49
|
-
|
|
40
|
+
className: withBaseName("arrowButton-previous"),
|
|
41
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {
|
|
42
|
+
"aria-hidden": true
|
|
43
|
+
})
|
|
50
44
|
}),
|
|
51
|
-
|
|
52
|
-
count,
|
|
53
|
-
page,
|
|
54
|
-
onPageChange,
|
|
55
|
-
FormFieldProps: FormFieldProps2
|
|
56
|
-
}) : /* @__PURE__ */ jsx(RegularControls, {
|
|
57
|
-
count,
|
|
58
|
-
page,
|
|
59
|
-
onPageChange,
|
|
45
|
+
/* @__PURE__ */ jsx(PageRanges, {
|
|
60
46
|
siblingCount,
|
|
61
47
|
boundaryCount
|
|
62
48
|
}),
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
49
|
+
/* @__PURE__ */ jsx(Button, {
|
|
50
|
+
variant: "secondary",
|
|
51
|
+
"aria-label": "Next Page",
|
|
52
|
+
onClick: onNextPage,
|
|
66
53
|
disabled: isOnLastPage,
|
|
67
|
-
|
|
54
|
+
className: withBaseName("arrowButton-next"),
|
|
55
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
56
|
+
"aria-hidden": true
|
|
57
|
+
})
|
|
68
58
|
})
|
|
69
59
|
]
|
|
70
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paginator.js","sources":["../src/pagination/Paginator.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"Paginator.js","sources":["../src/pagination/Paginator.tsx"],"sourcesContent":["import { clsx } from \"clsx\";\nimport { forwardRef, HTMLAttributes, MouseEventHandler } from \"react\";\nimport { Button, makePrefixer } from \"@salt-ds/core\";\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@salt-ds/icons\";\nimport { PageRanges } from \"./PageRanges\";\nimport { usePaginationContext } from \"./usePaginationContext\";\n\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\n\nimport paginatorCss from \"./Paginator.css\";\n\nconst withBaseName = makePrefixer(\"saltPaginator\");\n\nexport interface PaginatorProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Number of pages next to the arrow buttons when page range is truncated.\n */\n boundaryCount?: number;\n /**\n * Number of pages on each side of the current page when page range is truncated.\n */\n siblingCount?: number;\n}\n\nexport const Paginator = forwardRef<HTMLDivElement, PaginatorProps>(\n function Paginator(\n { className, boundaryCount, siblingCount, ...restProps },\n ref\n ) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-paginator\",\n css: paginatorCss,\n window: targetWindow,\n });\n\n const { count, page, onPageChange } = usePaginationContext();\n\n const onPreviousPage: MouseEventHandler<HTMLButtonElement> = (event) => {\n onPageChange(event, Math.max(1, page - 1));\n };\n\n const onNextPage: MouseEventHandler<HTMLButtonElement> = (event) => {\n onPageChange(event, Math.min(page + 1, count));\n };\n\n const isOnFirstPage = page === 1;\n const isOnLastPage = page === count;\n\n return (\n <div className={clsx(withBaseName(), className)} {...restProps} ref={ref}>\n <Button\n variant=\"secondary\"\n aria-label=\"Previous Page\"\n onClick={onPreviousPage}\n disabled={isOnFirstPage}\n className={withBaseName(\"arrowButton-previous\")}\n >\n <ChevronLeftIcon aria-hidden />\n </Button>\n <PageRanges siblingCount={siblingCount} boundaryCount={boundaryCount} />\n <Button\n variant=\"secondary\"\n aria-label=\"Next Page\"\n onClick={onNextPage}\n disabled={isOnLastPage}\n className={withBaseName(\"arrowButton-next\")}\n >\n <ChevronRightIcon aria-hidden />\n </Button>\n </div>\n );\n }\n);\n"],"names":["Paginator","paginatorCss"],"mappings":";;;;;;;;;;;AAYA,MAAM,YAAA,GAAe,aAAa,eAAe,CAAA,CAAA;AAa1C,MAAM,SAAY,GAAA,UAAA;AAAA,EACvB,SAASA,WACP,EAAE,SAAA,EAAW,eAAe,YAAiB,EAAA,GAAA,SAAA,IAC7C,GACA,EAAA;AACA,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,gBAAA;AAAA,MACR,GAAK,EAAAC,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AAED,IAAA,MAAM,EAAE,KAAA,EAAO,IAAM,EAAA,YAAA,KAAiB,oBAAqB,EAAA,CAAA;AAE3D,IAAM,MAAA,cAAA,GAAuD,CAAC,KAAU,KAAA;AACtE,MAAA,YAAA,CAAa,OAAO,IAAK,CAAA,GAAA,CAAI,CAAG,EAAA,IAAA,GAAO,CAAC,CAAC,CAAA,CAAA;AAAA,KAC3C,CAAA;AAEA,IAAM,MAAA,UAAA,GAAmD,CAAC,KAAU,KAAA;AAClE,MAAA,YAAA,CAAa,OAAO,IAAK,CAAA,GAAA,CAAI,IAAO,GAAA,CAAA,EAAG,KAAK,CAAC,CAAA,CAAA;AAAA,KAC/C,CAAA;AAEA,IAAA,MAAM,gBAAgB,IAAS,KAAA,CAAA,CAAA;AAC/B,IAAA,MAAM,eAAe,IAAS,KAAA,KAAA,CAAA;AAE9B,IAAA,uBACG,IAAA,CAAA,KAAA,EAAA;AAAA,MAAI,SAAW,EAAA,IAAA,CAAK,YAAa,EAAA,EAAG,SAAS,CAAA;AAAA,MAAI,GAAG,SAAA;AAAA,MAAW,GAAA;AAAA,MAC9D,QAAA,EAAA;AAAA,wBAAC,GAAA,CAAA,MAAA,EAAA;AAAA,UACC,OAAQ,EAAA,WAAA;AAAA,UACR,YAAW,EAAA,eAAA;AAAA,UACX,OAAS,EAAA,cAAA;AAAA,UACT,QAAU,EAAA,aAAA;AAAA,UACV,SAAA,EAAW,aAAa,sBAAsB,CAAA;AAAA,UAE9C,QAAC,kBAAA,GAAA,CAAA,eAAA,EAAA;AAAA,YAAgB,aAAW,EAAA,IAAA;AAAA,WAAC,CAAA;AAAA,SAC/B,CAAA;AAAA,wBACC,GAAA,CAAA,UAAA,EAAA;AAAA,UAAW,YAAA;AAAA,UAA4B,aAAA;AAAA,SAA8B,CAAA;AAAA,wBACrE,GAAA,CAAA,MAAA,EAAA;AAAA,UACC,OAAQ,EAAA,WAAA;AAAA,UACR,YAAW,EAAA,WAAA;AAAA,UACX,OAAS,EAAA,UAAA;AAAA,UACT,QAAU,EAAA,YAAA;AAAA,UACV,SAAA,EAAW,aAAa,kBAAkB,CAAA;AAAA,UAE1C,QAAC,kBAAA,GAAA,CAAA,gBAAA,EAAA;AAAA,YAAiB,aAAW,EAAA,IAAA;AAAA,WAAC,CAAA;AAAA,SAChC,CAAA;AAAA,OAAA;AAAA,KACF,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePaginationContext.js","sources":["../src/pagination/usePaginationContext.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"usePaginationContext.js","sources":["../src/pagination/usePaginationContext.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { paginationContext } from \"./PaginationContext\";\n\nexport const usePaginationContext = () => {\n const context = useContext(paginationContext);\n if (process.env.NODE_ENV !== \"production\") {\n if (!context) {\n console.error(`usePaginationContext should be used inside of Pagination`);\n }\n }\n return context;\n};\n"],"names":[],"mappings":";;;AAGO,MAAM,uBAAuB,MAAM;AACxC,EAAM,MAAA,OAAA,GAAU,WAAW,iBAAiB,CAAA,CAAA;AAC5C,EAAI,IAAA,OAAA,CAAQ,GAAI,CAAA,QAAA,KAAa,YAAc,EAAA;AACzC,IAAA,IAAI,CAAC,OAAS,EAAA;AACZ,MAAA,OAAA,CAAQ,MAAM,CAA0D,wDAAA,CAAA,CAAA,CAAA;AAAA,KAC1E;AAAA,GACF;AACA,EAAO,OAAA,OAAA,CAAA;AACT;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var css_248z = "/* Styles applied to the root element */\n
|
|
1
|
+
var css_248z = "/* Styles applied to the root element */\n.saltPillNext {\n appearance: none;\n display: inline-flex;\n align-items: center;\n background: var(--saltPillNext-background, var(--salt-actionable-primary-background));\n border-radius: 0;\n border: 0;\n height: calc(var(--salt-size-base) - var(--salt-spacing-100));\n min-height: var(--salt-text-minHeight);\n outline: 0;\n position: relative;\n gap: var(--salt-spacing-50);\n padding-left: var(--salt-spacing-50);\n padding-right: var(--salt-spacing-50);\n color: var(--saltPillNext-color, var(--salt-actionable-primary-foreground));\n font-family: var(--salt-text-fontFamily);\n font-size: var(--salt-text-fontSize);\n font-weight: var(--salt-text-fontWeight);\n line-height: var(--salt-text-lineHeight);\n overflow: hidden;\n white-space: nowrap;\n}\n\n/* Style applied to Pill if pill is clickable */\n.saltPillNext-clickable {\n cursor: var(--salt-selectable-cursor-hover);\n}\n\n.saltPillNext-clickable:hover,\n.saltPillNext-clickable:focus-visible {\n color: var(--salt-actionable-primary-foreground-hover);\n background: var(--salt-actionable-primary-background-hover);\n}\n\n.saltPillNext-clickable.saltPillNext-active,\n.saltPillNext-clickable:active {\n background: var(--salt-actionable-primary-background-active);\n color: var(--salt-actionable-primary-foreground-active);\n}\n\n/* Style applied to Pill on focus */\n.saltPillNext:focus-visible {\n outline: var(--salt-focused-outline);\n}\n\n/* Style applied to Pill when disabled */\n.saltPillNext:disabled,\n.saltPillNext:disabled:hover {\n color: var(--salt-actionable-primary-foreground-disabled);\n background: var(--salt-actionable-primary-background-disabled);\n cursor: var(--salt-selectable-cursor-disabled);\n}\n";
|
|
2
2
|
|
|
3
3
|
export { css_248z as default };
|
|
4
4
|
//# sourceMappingURL=PillNext.css.js.map
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useWindow } from '@salt-ds/window';
|
|
5
5
|
import { useComponentCssInjection } from '@salt-ds/styles';
|
|
6
|
-
import { makePrefixer, useButton
|
|
6
|
+
import { makePrefixer, useButton } from '@salt-ds/core';
|
|
7
7
|
import css_248z from './PillNext.css.js';
|
|
8
|
-
import { CloseIcon } from '@salt-ds/icons';
|
|
9
8
|
|
|
10
9
|
const withBaseName = makePrefixer("saltPillNext");
|
|
11
10
|
const PillNext = forwardRef(
|
|
12
|
-
function PillNext2({
|
|
11
|
+
function PillNext2({
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
disabled,
|
|
15
|
+
onKeyUp,
|
|
16
|
+
onKeyDown,
|
|
17
|
+
onClick,
|
|
18
|
+
onBlur,
|
|
19
|
+
...rest
|
|
20
|
+
}, ref) {
|
|
13
21
|
const targetWindow = useWindow();
|
|
14
22
|
useComponentCssInjection({
|
|
15
23
|
testId: "salt-pill-next",
|
|
@@ -18,37 +26,24 @@ const PillNext = forwardRef(
|
|
|
18
26
|
});
|
|
19
27
|
const { buttonProps, active } = useButton({
|
|
20
28
|
disabled,
|
|
21
|
-
|
|
29
|
+
onKeyUp,
|
|
30
|
+
onKeyDown,
|
|
31
|
+
onClick,
|
|
32
|
+
onBlur
|
|
22
33
|
});
|
|
23
34
|
const { tabIndex, ...restButtonProps } = buttonProps;
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children: [
|
|
37
|
-
icon,
|
|
38
|
-
/* @__PURE__ */ jsx("span", {
|
|
39
|
-
className: withBaseName("label"),
|
|
40
|
-
children
|
|
41
|
-
})
|
|
42
|
-
]
|
|
43
|
-
}),
|
|
44
|
-
onClose && /* @__PURE__ */ jsx(Button, {
|
|
45
|
-
"data-testid": "pill-close-button",
|
|
46
|
-
className: withBaseName("close-button"),
|
|
47
|
-
disabled,
|
|
48
|
-
onClick: onClose,
|
|
49
|
-
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
50
|
-
})
|
|
51
|
-
]
|
|
35
|
+
return /* @__PURE__ */ jsx("button", {
|
|
36
|
+
"data-testid": "pill",
|
|
37
|
+
ref,
|
|
38
|
+
className: clsx(
|
|
39
|
+
withBaseName(),
|
|
40
|
+
withBaseName("clickable"),
|
|
41
|
+
{ [withBaseName("active")]: active },
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
...restButtonProps,
|
|
45
|
+
...rest,
|
|
46
|
+
children
|
|
52
47
|
});
|
|
53
48
|
}
|
|
54
49
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PillNext.js","sources":["../src/pill-next/PillNext.tsx"],"sourcesContent":["import { forwardRef, ComponentPropsWithoutRef
|
|
1
|
+
{"version":3,"file":"PillNext.js","sources":["../src/pill-next/PillNext.tsx"],"sourcesContent":["import { forwardRef, ComponentPropsWithoutRef } from \"react\";\nimport clsx from \"clsx\";\nimport { useWindow } from \"@salt-ds/window\";\nimport { useComponentCssInjection } from \"@salt-ds/styles\";\nimport { makePrefixer, useButton } from \"@salt-ds/core\";\nimport pillCss from \"./PillNext.css\";\n\nconst withBaseName = makePrefixer(\"saltPillNext\");\n\n/* eslint-disable @typescript-eslint/no-empty-interface */\nexport interface PillNextProps extends ComponentPropsWithoutRef<\"button\"> {}\n\nexport const PillNext = forwardRef<HTMLButtonElement, PillNextProps>(\n function PillNext(\n {\n children,\n className,\n disabled,\n onKeyUp,\n onKeyDown,\n onClick,\n onBlur,\n ...rest\n },\n ref\n ) {\n const targetWindow = useWindow();\n useComponentCssInjection({\n testId: \"salt-pill-next\",\n css: pillCss,\n window: targetWindow,\n });\n const { buttonProps, active } = useButton<HTMLButtonElement>({\n disabled,\n onKeyUp,\n onKeyDown,\n onClick,\n onBlur,\n });\n // we do not want to spread tab index in this case because the button element\n // does not require tabindex=\"0\" attribute\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { tabIndex, ...restButtonProps } = buttonProps;\n return (\n <button\n data-testid=\"pill\"\n ref={ref}\n className={clsx(\n withBaseName(),\n withBaseName(\"clickable\"),\n { [withBaseName(\"active\")]: active },\n className\n )}\n {...restButtonProps}\n {...rest}\n >\n {children}\n </button>\n );\n }\n);\n"],"names":["PillNext","pillCss"],"mappings":";;;;;;;;AAOA,MAAM,YAAA,GAAe,aAAa,cAAc,CAAA,CAAA;AAKzC,MAAM,QAAW,GAAA,UAAA;AAAA,EACtB,SAASA,SACP,CAAA;AAAA,IACE,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACG,GAAA,IAAA;AAAA,KAEL,GACA,EAAA;AACA,IAAA,MAAM,eAAe,SAAU,EAAA,CAAA;AAC/B,IAAyB,wBAAA,CAAA;AAAA,MACvB,MAAQ,EAAA,gBAAA;AAAA,MACR,GAAK,EAAAC,QAAA;AAAA,MACL,MAAQ,EAAA,YAAA;AAAA,KACT,CAAA,CAAA;AACD,IAAA,MAAM,EAAE,WAAA,EAAa,MAAO,EAAA,GAAI,SAA6B,CAAA;AAAA,MAC3D,QAAA;AAAA,MACA,OAAA;AAAA,MACA,SAAA;AAAA,MACA,OAAA;AAAA,MACA,MAAA;AAAA,KACD,CAAA,CAAA;AAID,IAAM,MAAA,EAAE,QAAa,EAAA,GAAA,eAAA,EAAoB,GAAA,WAAA,CAAA;AACzC,IAAA,uBACG,GAAA,CAAA,QAAA,EAAA;AAAA,MACC,aAAY,EAAA,MAAA;AAAA,MACZ,GAAA;AAAA,MACA,SAAW,EAAA,IAAA;AAAA,QACT,YAAa,EAAA;AAAA,QACb,aAAa,WAAW,CAAA;AAAA,QACxB,EAAE,CAAC,YAAa,CAAA,QAAQ,IAAI,MAAO,EAAA;AAAA,QACnC,SAAA;AAAA,OACF;AAAA,MACC,GAAG,eAAA;AAAA,MACH,GAAG,IAAA;AAAA,MAEH,QAAA;AAAA,KACH,CAAA,CAAA;AAAA,GAEJ;AACF;;;;"}
|
|
@@ -17,8 +17,8 @@ export declare const useComboBox: ({ defaultInputValue, onFocus, onMouseOver, on
|
|
|
17
17
|
portalProps: {
|
|
18
18
|
open: boolean;
|
|
19
19
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
20
|
-
floating: (node: HTMLElement | null) => void;
|
|
21
|
-
reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
|
|
20
|
+
floating: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
21
|
+
reference: ((node: import("@floating-ui/react-dom").ReferenceType | null) => void) & ((node: import("@floating-ui/react").ReferenceType | null) => void);
|
|
22
22
|
getTriggerProps: () => Record<string, unknown>;
|
|
23
23
|
getPortalProps: () => import("react").HTMLProps<HTMLDivElement>;
|
|
24
24
|
getPosition: () => {
|
|
@@ -8,8 +8,8 @@ export interface UseComboBoxPortalProps {
|
|
|
8
8
|
export declare function useComboboxPortal(props?: UseComboBoxPortalProps): {
|
|
9
9
|
open: boolean;
|
|
10
10
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
11
|
-
floating: (node: HTMLElement | null) => void;
|
|
12
|
-
reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
|
|
11
|
+
floating: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
12
|
+
reference: ((node: import("@floating-ui/react-dom").ReferenceType | null) => void) & ((node: import("@floating-ui/react").ReferenceType | null) => void);
|
|
13
13
|
getPortalProps: () => HTMLProps<HTMLDivElement>;
|
|
14
14
|
getTriggerProps: () => Record<string, unknown>;
|
|
15
15
|
getPosition: () => {
|
|
@@ -3,19 +3,18 @@ export declare type UseDialogProps = Partial<Pick<UseFloatingUIProps, "onOpenCha
|
|
|
3
3
|
export declare function useDialog(props: UseDialogProps): {
|
|
4
4
|
getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
|
|
5
5
|
getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
|
|
6
|
-
floating: (node: HTMLElement | null) => void;
|
|
6
|
+
floating: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
7
7
|
context: {
|
|
8
|
-
x: number
|
|
9
|
-
y: number
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
10
|
placement: import("@floating-ui/utils").Placement;
|
|
11
11
|
strategy: import("@floating-ui/utils").Strategy;
|
|
12
12
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
13
|
-
reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
|
|
14
|
-
floating: (node: HTMLElement | null) => void;
|
|
15
|
-
update: () => void;
|
|
16
13
|
isPositioned: boolean;
|
|
14
|
+
update: () => void;
|
|
15
|
+
floatingStyles: import("react").CSSProperties;
|
|
17
16
|
open: boolean;
|
|
18
|
-
onOpenChange: (open: boolean) => void;
|
|
17
|
+
onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
|
|
19
18
|
events: import("@floating-ui/react").FloatingEvents;
|
|
20
19
|
dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
21
20
|
nodeId: string | undefined;
|
|
@@ -3,19 +3,18 @@ export declare type UseDrawerProps = Partial<Pick<UseFloatingUIProps, "onOpenCha
|
|
|
3
3
|
export declare function useDrawer(props: UseDrawerProps): {
|
|
4
4
|
getFloatingProps: (userProps?: import("react").HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
|
|
5
5
|
getReferenceProps: (userProps?: import("react").HTMLProps<Element> | undefined) => Record<string, unknown>;
|
|
6
|
-
floating: (node: HTMLElement | null) => void;
|
|
6
|
+
floating: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
7
7
|
context: {
|
|
8
|
-
x: number
|
|
9
|
-
y: number
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
10
|
placement: import("@floating-ui/utils").Placement;
|
|
11
11
|
strategy: import("@floating-ui/utils").Strategy;
|
|
12
12
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
13
|
-
reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
|
|
14
|
-
floating: (node: HTMLElement | null) => void;
|
|
15
|
-
update: () => void;
|
|
16
13
|
isPositioned: boolean;
|
|
14
|
+
update: () => void;
|
|
15
|
+
floatingStyles: import("react").CSSProperties;
|
|
17
16
|
open: boolean;
|
|
18
|
-
onOpenChange: (open: boolean) => void;
|
|
17
|
+
onOpenChange: (open: boolean, event?: Event | undefined, reason?: import("@floating-ui/react").OpenChangeReason | undefined) => void;
|
|
19
18
|
events: import("@floating-ui/react").FloatingEvents;
|
|
20
19
|
dataRef: import("react").MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
21
20
|
nodeId: string | undefined;
|
|
@@ -13,10 +13,18 @@ export declare const useDropdownNext: ({ listProps, openControlProp, onOpenChang
|
|
|
13
13
|
mouseDownHandler: () => void;
|
|
14
14
|
listSelectHandler: () => void;
|
|
15
15
|
};
|
|
16
|
-
refs:
|
|
16
|
+
refs: {
|
|
17
|
+
reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
|
|
18
|
+
floating: import("react").MutableRefObject<HTMLElement | null>;
|
|
19
|
+
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
20
|
+
setFloating: (node: HTMLElement | null) => void;
|
|
21
|
+
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
17
22
|
open: boolean;
|
|
18
23
|
getReferenceProps: (userProps?: HTMLProps<Element> | undefined) => Record<string, unknown>;
|
|
19
|
-
getItemProps: (userProps?: HTMLProps<HTMLElement
|
|
24
|
+
getItemProps: (userProps?: (Omit<HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
25
|
+
active?: boolean | undefined;
|
|
26
|
+
selected?: boolean | undefined;
|
|
27
|
+
}) | undefined) => Record<string, unknown>;
|
|
20
28
|
activeDescendant: string | undefined;
|
|
21
29
|
selectedItem: string | undefined;
|
|
22
30
|
setSelectedItem: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
@@ -26,8 +34,8 @@ export declare const useDropdownNext: ({ listProps, openControlProp, onOpenChang
|
|
|
26
34
|
portalProps: {
|
|
27
35
|
open: boolean;
|
|
28
36
|
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
29
|
-
floating: (node: HTMLElement | null) => void;
|
|
30
|
-
reference: (node: import("@floating-ui/react").ReferenceType | null) => void;
|
|
37
|
+
floating: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
38
|
+
reference: ((node: import("@floating-ui/react-dom").ReferenceType | null) => void) & ((node: import("@floating-ui/react").ReferenceType | null) => void);
|
|
31
39
|
getFloatingProps: (userProps?: HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
|
|
32
40
|
getDropdownNextProps: () => HTMLProps<HTMLDivElement>;
|
|
33
41
|
getPosition: () => {
|
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
count: number;
|
|
4
|
-
page: number;
|
|
5
|
-
onPageChange: (page: number) => void;
|
|
6
|
-
FormFieldProps?: Partial<FormFieldProps>;
|
|
7
|
-
}
|
|
8
|
-
export declare const CompactInput: ({ page, count, onPageChange, FormFieldProps: { className, ...restFormFieldLegacyProps }, }: CompactInputProps) => JSX.Element;
|
|
1
|
+
import { InputProps } from "@salt-ds/core";
|
|
2
|
+
export declare const CompactInput: import("react").ForwardRefExoticComponent<Pick<InputProps, "variant" | "inputRef"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CompactPaginator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
2
|
-
import { FormFieldLegacyProps as FormFieldProps } from "../form-field-legacy";
|
|
1
|
+
import { HTMLAttributes, Ref } from "react";
|
|
3
2
|
export interface GoToInputProps extends HTMLAttributes<HTMLSpanElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Input label.
|
|
5
|
+
*/
|
|
4
6
|
label?: string;
|
|
5
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Optional ref for the input component
|
|
9
|
+
*/
|
|
10
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
11
|
+
/**
|
|
12
|
+
* Change input variant.
|
|
13
|
+
*/
|
|
14
|
+
inputVariant?: "primary" | "secondary";
|
|
6
15
|
}
|
|
7
|
-
export declare const GoToInput: import("react").ForwardRefExoticComponent<GoToInputProps & import("react").RefAttributes<
|
|
16
|
+
export declare const GoToInput: import("react").ForwardRefExoticComponent<GoToInputProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export interface PageButtonProps {
|
|
2
2
|
page: number;
|
|
3
|
-
|
|
4
|
-
onPageChange: (page: number) => void;
|
|
3
|
+
selected?: boolean;
|
|
5
4
|
disabled?: boolean;
|
|
6
5
|
}
|
|
7
|
-
export declare const PageButton: (
|
|
6
|
+
export declare const PageButton: import("react").ForwardRefExoticComponent<PageButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
import { HTMLAttributes } from "react";
|
|
1
|
+
import { HTMLAttributes, SyntheticEvent } from "react";
|
|
2
2
|
export interface PaginationProps extends HTMLAttributes<HTMLElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Number of pages.
|
|
5
|
+
*/
|
|
3
6
|
count: number;
|
|
7
|
+
/**
|
|
8
|
+
* Current/active page.
|
|
9
|
+
*/
|
|
4
10
|
page?: number;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Default current/active page.
|
|
13
|
+
*/
|
|
14
|
+
defaultPage?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Callback function triggered when current page changed.
|
|
17
|
+
*/
|
|
18
|
+
onPageChange?: (event: SyntheticEvent, page: number) => void;
|
|
8
19
|
}
|
|
9
20
|
export declare const Pagination: import("react").ForwardRefExoticComponent<PaginationProps & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
+
import { SyntheticEvent } from "react";
|
|
1
2
|
export interface PaginationContext {
|
|
2
3
|
page: number;
|
|
3
4
|
count: number;
|
|
4
|
-
|
|
5
|
-
onPageChange: (page: number) => void;
|
|
6
|
-
paginatorElement?: HTMLDivElement;
|
|
7
|
-
setPaginatorElement: (element: HTMLDivElement) => void;
|
|
5
|
+
onPageChange: (event: SyntheticEvent, page: number) => void;
|
|
8
6
|
}
|
|
9
7
|
export declare const paginationContext: import("react").Context<PaginationContext>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { HTMLAttributes } from "react";
|
|
2
|
-
import { FormFieldLegacyProps as FormFieldProps } from "../form-field-legacy";
|
|
3
2
|
export interface PaginatorProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Number of pages next to the arrow buttons when page range is truncated.
|
|
5
|
+
*/
|
|
4
6
|
boundaryCount?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Number of pages on each side of the current page when page range is truncated.
|
|
9
|
+
*/
|
|
5
10
|
siblingCount?: number;
|
|
6
|
-
showPreviousNext?: boolean;
|
|
7
|
-
FormFieldProps?: Partial<FormFieldProps>;
|
|
8
11
|
}
|
|
9
12
|
export declare const Paginator: import("react").ForwardRefExoticComponent<PaginatorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
2
|
export interface PillNextProps extends ComponentPropsWithoutRef<"button"> {
|
|
3
|
-
disabled?: boolean;
|
|
4
|
-
onClose?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
3
|
}
|
|
7
4
|
export declare const PillNext: import("react").ForwardRefExoticComponent<PillNextProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -21,24 +21,24 @@ declare type Dimension = keyof Pick<DOMRect, "width" | "height">;
|
|
|
21
21
|
export declare const measureElementSizeAndPosition: (element: HTMLElement, dimension?: Dimension, includeAutoMargin?: boolean) => number[];
|
|
22
22
|
export declare const dimensions: (orientation: orientationType) => {
|
|
23
23
|
CLIENT_SIZE: "scrollWidth" | "scrollHeight" | "clientHeight" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
24
|
-
CONTRA: "x" | "y" | "
|
|
24
|
+
CONTRA: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
25
25
|
CONTRA_POS: "clientX" | "clientY";
|
|
26
26
|
DIMENSION: "height" | "width";
|
|
27
|
-
END: "x" | "y" | "
|
|
27
|
+
END: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
28
28
|
POS: "clientX" | "clientY";
|
|
29
29
|
SCROLL_POS: "scrollWidth" | "scrollHeight" | "clientHeight" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
30
30
|
SCROLL_SIZE: "scrollWidth" | "scrollHeight" | "clientHeight" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
31
|
-
START: "x" | "y" | "
|
|
31
|
+
START: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
32
32
|
} | {
|
|
33
33
|
CLIENT_SIZE: "scrollWidth" | "scrollHeight" | "clientHeight" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
34
|
-
CONTRA: "x" | "y" | "
|
|
34
|
+
CONTRA: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
35
35
|
CONTRA_POS: "clientX" | "clientY";
|
|
36
36
|
DIMENSION: "height" | "width";
|
|
37
|
-
END: "x" | "y" | "
|
|
37
|
+
END: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
38
38
|
POS: "clientX" | "clientY";
|
|
39
39
|
SCROLL_POS: "scrollWidth" | "scrollHeight" | "clientHeight" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
40
40
|
SCROLL_SIZE: "scrollWidth" | "scrollHeight" | "clientHeight" | "clientWidth" | "scrollTop" | "scrollLeft";
|
|
41
|
-
START: "x" | "y" | "
|
|
41
|
+
START: "x" | "y" | "height" | "width" | "left" | "right" | "top" | "bottom";
|
|
42
42
|
};
|
|
43
43
|
export declare const getDraggedItem: (measuredItems: MeasuredDropTarget[]) => MeasuredDropTarget;
|
|
44
44
|
export declare const moveDragItem: (measuredItems: MeasuredDropTarget[], dropTarget: MeasuredDropTarget) => MeasuredDropTarget[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salt-ds/lab",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.26",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"main": "dist-cjs/index.js",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@floating-ui/react": "^0.
|
|
14
|
+
"@floating-ui/react": "^0.26.5",
|
|
15
15
|
"@fluentui/react-overflow": "^9.0.19",
|
|
16
16
|
"@internationalized/date": "^3.0.0",
|
|
17
17
|
"@types/react-window": "^1.8.2",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"react-window": "^1.8.6",
|
|
27
27
|
"rifm": "^0.12.0",
|
|
28
28
|
"tinycolor2": "^1.4.2",
|
|
29
|
-
"@salt-ds/core": "^1.13.
|
|
29
|
+
"@salt-ds/core": "^1.13.4",
|
|
30
30
|
"@salt-ds/window": "^0.1.1",
|
|
31
31
|
"@salt-ds/styles": "^0.2.1",
|
|
32
32
|
"@salt-ds/icons": "^1.9.1"
|