@conveyorhq/arrow-ds 1.149.0 → 1.151.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/package.json +1 -1
- package/public/components/Floating/FloatingTooltip.d.ts +3 -2
- package/public/components/Floating/FloatingTooltip.js +2 -2
- package/public/components/Table/Table.d.ts +2 -1
- package/public/components/Table/Table.js +2 -2
- package/public/css/styles.css +23 -1
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/src/components/Floating/FloatingTooltip.tsx +4 -2
- package/src/components/Table/Table.tsx +7 -0
- package/src/components/Table/index.css +22 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { HTMLProps, PropsWithChildren } from "react";
|
|
2
|
-
import type { Placement, Strategy } from "@floating-ui/react";
|
|
2
|
+
import type { OffsetOptions, Placement, Strategy } from "@floating-ui/react";
|
|
3
3
|
import { PortalRootElementType } from "../Portal";
|
|
4
4
|
interface FloatingTooltipOptions {
|
|
5
5
|
initialOpen?: boolean;
|
|
@@ -8,8 +8,9 @@ interface FloatingTooltipOptions {
|
|
|
8
8
|
onOpenChange?: (open: boolean) => void;
|
|
9
9
|
strategy?: Strategy;
|
|
10
10
|
disableShiftMiddleware?: boolean;
|
|
11
|
+
offset?: OffsetOptions;
|
|
11
12
|
}
|
|
12
|
-
export declare function useFloatingTooltip({ initialOpen, placement, open: controlledOpen, onOpenChange: setControlledOpen, strategy, disableShiftMiddleware, }?: FloatingTooltipOptions): any;
|
|
13
|
+
export declare function useFloatingTooltip({ initialOpen, placement, open: controlledOpen, onOpenChange: setControlledOpen, strategy, disableShiftMiddleware, offset: offsetValue, }?: FloatingTooltipOptions): any;
|
|
13
14
|
export declare const useFloatingTooltipState: any;
|
|
14
15
|
export declare function FloatingTooltipRoot({ children, ...options }: PropsWithChildren<FloatingTooltipOptions>): React.JSX.Element;
|
|
15
16
|
export declare const FloatingTooltipTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & {
|
|
@@ -35,7 +35,7 @@ const tokens_1 = require("../../style-dictionary/dist/tokens");
|
|
|
35
35
|
const bem_1 = require("../../utilities/bem");
|
|
36
36
|
const Box_1 = require("../Box");
|
|
37
37
|
const cn = (0, bem_1.bemHOF)("FloatingTooltip");
|
|
38
|
-
function useFloatingTooltip({ initialOpen = false, placement = "top", open: controlledOpen, onOpenChange: setControlledOpen, strategy, disableShiftMiddleware, } = {}) {
|
|
38
|
+
function useFloatingTooltip({ initialOpen = false, placement = "top", open: controlledOpen, onOpenChange: setControlledOpen, strategy, disableShiftMiddleware, offset: offsetValue = 8, } = {}) {
|
|
39
39
|
const [uncontrolledOpen, setUncontrolledOpen] = (0, react_1.useState)(initialOpen);
|
|
40
40
|
const arrowRef = (0, react_1.useRef)(null);
|
|
41
41
|
const open = controlledOpen !== null && controlledOpen !== void 0 ? controlledOpen : uncontrolledOpen;
|
|
@@ -47,7 +47,7 @@ function useFloatingTooltip({ initialOpen = false, placement = "top", open: cont
|
|
|
47
47
|
onOpenChange: setOpen,
|
|
48
48
|
whileElementsMounted: react_2.autoUpdate,
|
|
49
49
|
middleware: [
|
|
50
|
-
(0, react_2.offset)(
|
|
50
|
+
(0, react_2.offset)(offsetValue),
|
|
51
51
|
(0, react_2.flip)(),
|
|
52
52
|
...shiftMiddleware,
|
|
53
53
|
(0, react_2.arrow)({ element: arrowRef }),
|
|
@@ -13,11 +13,12 @@ interface TableProps extends React.HTMLProps<HTMLTableElement> {
|
|
|
13
13
|
stickyColumn?: boolean;
|
|
14
14
|
hasBatchActions?: boolean;
|
|
15
15
|
spaceRows?: boolean;
|
|
16
|
+
shrinkFirstColumnPadding?: boolean;
|
|
16
17
|
enableGridSizing?: boolean;
|
|
17
18
|
gridSizing?: string | string[];
|
|
18
19
|
}
|
|
19
20
|
declare const Table: {
|
|
20
|
-
({ children, className, onSort, outerBorder, sortColumnId, sortDirection, affixHeader, removeSpacerColumn, noResults, renderInModal, enableHorizontalScroll, stickyColumn, hasBatchActions, spaceRows, style, enableGridSizing, gridSizing, ...rest }: TableProps): React.JSX.Element;
|
|
21
|
+
({ children, className, onSort, outerBorder, sortColumnId, sortDirection, affixHeader, removeSpacerColumn, noResults, renderInModal, enableHorizontalScroll, stickyColumn, hasBatchActions, spaceRows, shrinkFirstColumnPadding, style, enableGridSizing, gridSizing, ...rest }: TableProps): React.JSX.Element;
|
|
21
22
|
Body: ({ className, children, ...rest }: React.HTMLProps<HTMLTableSectionElement>) => React.JSX.Element;
|
|
22
23
|
Row: ({ className, children, selected, ...rest }: import("./TableRow").TableRowProps) => React.JSX.Element;
|
|
23
24
|
Cell: React.FunctionComponent<import("./TableCell").TableCellProps>;
|
|
@@ -39,9 +39,9 @@ Object.defineProperty(exports, "SORT_DIRECTION", { enumerable: true, get: functi
|
|
|
39
39
|
const bem_1 = require("../../utilities/bem");
|
|
40
40
|
const cn = "Table";
|
|
41
41
|
const wrapperCn = "TableWrapper";
|
|
42
|
-
const Table = ({ children, className, onSort = () => { }, outerBorder = false, sortColumnId, sortDirection, affixHeader = false, removeSpacerColumn = false, noResults = false, renderInModal = false, enableHorizontalScroll = false, stickyColumn = false, hasBatchActions = false, spaceRows = false, style, enableGridSizing = false, gridSizing, ...rest }) => {
|
|
42
|
+
const Table = ({ children, className, onSort = () => { }, outerBorder = false, sortColumnId, sortDirection, affixHeader = false, removeSpacerColumn = false, noResults = false, renderInModal = false, enableHorizontalScroll = false, stickyColumn = false, hasBatchActions = false, spaceRows = false, shrinkFirstColumnPadding = false, style, enableGridSizing = false, gridSizing, ...rest }) => {
|
|
43
43
|
const wrapperClasses = (0, classnames_1.default)((0, bem_1.bem)(wrapperCn), enableHorizontalScroll && (0, bem_1.bem)(wrapperCn, { m: "enable-hscroll" }), spaceRows && (0, bem_1.bem)(wrapperCn, { m: "space-rows" }));
|
|
44
|
-
const classes = (0, classnames_1.default)((0, bem_1.bem)(cn), removeSpacerColumn && (0, bem_1.bem)(cn, { m: "remove-spacer" }), outerBorder && (0, bem_1.bem)(cn, { m: "outer-border" }), affixHeader && (0, bem_1.bem)(cn, { m: "affix-header" }), noResults && (0, bem_1.bem)(cn, { m: "no-results" }), stickyColumn && (0, bem_1.bem)(cn, { m: "sticky-column" }), hasBatchActions && (0, bem_1.bem)(cn, { m: "batch-actions" }), spaceRows && (0, bem_1.bem)(cn, { m: "space-rows" }), enableGridSizing && gridSizing && (0, bem_1.bem)(cn, { m: "grid-sizing" }), className);
|
|
44
|
+
const classes = (0, classnames_1.default)((0, bem_1.bem)(cn), removeSpacerColumn && (0, bem_1.bem)(cn, { m: "remove-spacer" }), outerBorder && (0, bem_1.bem)(cn, { m: "outer-border" }), affixHeader && (0, bem_1.bem)(cn, { m: "affix-header" }), noResults && (0, bem_1.bem)(cn, { m: "no-results" }), stickyColumn && (0, bem_1.bem)(cn, { m: "sticky-column" }), hasBatchActions && (0, bem_1.bem)(cn, { m: "batch-actions" }), spaceRows && (0, bem_1.bem)(cn, { m: "space-rows" }), enableGridSizing && gridSizing && (0, bem_1.bem)(cn, { m: "grid-sizing" }), shrinkFirstColumnPadding && (0, bem_1.bem)(cn, { m: "shrink-first-column" }), className);
|
|
45
45
|
return (react_1.default.createElement(TableContext_1.default.Provider, { value: {
|
|
46
46
|
handleSort: onSort,
|
|
47
47
|
sortDirection,
|
package/public/css/styles.css
CHANGED
|
@@ -7260,10 +7260,16 @@ override built-in Image component classes */
|
|
|
7260
7260
|
position: -webkit-sticky;
|
|
7261
7261
|
position: sticky;
|
|
7262
7262
|
z-index: 10;
|
|
7263
|
-
|
|
7264
7263
|
left: 56px;
|
|
7265
7264
|
}
|
|
7266
7265
|
|
|
7266
|
+
.ads-Table.ads-Table--sticky-column.ads-Table--batch-actions.ads-Table--shrink-first-column
|
|
7267
|
+
.ads-TableCell:nth-of-type(2),
|
|
7268
|
+
.ads-Table.ads-Table--sticky-column.ads-Table--batch-actions.ads-Table--shrink-first-column
|
|
7269
|
+
.ads-TableHeaderCell:nth-of-type(2) {
|
|
7270
|
+
left: 32px;
|
|
7271
|
+
}
|
|
7272
|
+
|
|
7267
7273
|
.ads-TableCell:first-of-type:not(:only-child),
|
|
7268
7274
|
.ads-TableHeaderCell:first-of-type,
|
|
7269
7275
|
.ads-Table.ads-Table--batch-actions .ads-TableCell:first-of-type,
|
|
@@ -7271,6 +7277,15 @@ override built-in Image component classes */
|
|
|
7271
7277
|
padding-left: 32px;
|
|
7272
7278
|
}
|
|
7273
7279
|
|
|
7280
|
+
.ads-Table--shrink-first-column .ads-TableCell:first-of-type:not(:only-child),
|
|
7281
|
+
.ads-Table--shrink-first-column .ads-TableHeaderCell:first-of-type,
|
|
7282
|
+
.ads-Table.ads-Table--batch-actions.ads-Table--shrink-first-column
|
|
7283
|
+
.ads-TableCell:first-of-type,
|
|
7284
|
+
.ads-Table.ads-Table--batch-actions.ads-Table--shrink-first-column
|
|
7285
|
+
.ads-TableHeaderCell:first-of-type {
|
|
7286
|
+
padding-left: 8px;
|
|
7287
|
+
}
|
|
7288
|
+
|
|
7274
7289
|
.ads-Table.ads-Table--sticky-column .ads-TableCell:first-of-type,
|
|
7275
7290
|
.ads-Table.ads-Table--sticky-column.ads-Table--batch-actions
|
|
7276
7291
|
.ads-TableCell:nth-of-type(2) {
|
|
@@ -7281,6 +7296,13 @@ override built-in Image component classes */
|
|
|
7281
7296
|
.ads-Table.ads-Table--sticky-column.ads-Table--batch-actions
|
|
7282
7297
|
.ads-TableHeaderCell:nth-of-type(2) {
|
|
7283
7298
|
box-shadow: 1px 0 0 #dee7ee, 3px -1px 0 rgb(234, 237, 239);
|
|
7299
|
+
}
|
|
7300
|
+
|
|
7301
|
+
.ads-Table.ads-Table--sticky-column .ads-TableHeaderCell:first-of-type,
|
|
7302
|
+
.ads-Table.ads-Table--sticky-column.ads-Table--batch-actions
|
|
7303
|
+
.ads-TableHeaderCell:nth-of-type(2),
|
|
7304
|
+
.ads-Table.ads-Table--sticky-column.ads-Table--batch-actions.ads-Table--shrink-first-column
|
|
7305
|
+
.ads-TableHeaderCell:nth-of-type(2) {
|
|
7284
7306
|
z-index: 20;
|
|
7285
7307
|
}
|
|
7286
7308
|
|