@datarobot/design-system 28.9.2 → 28.10.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/cjs/floating-panel/constants.d.ts +21 -0
- package/cjs/floating-panel/constants.js +94 -0
- package/cjs/floating-panel/draggable-area.d.ts +12 -0
- package/cjs/floating-panel/draggable-area.js +72 -0
- package/cjs/floating-panel/floating-panel-dock-button.d.ts +5 -0
- package/cjs/floating-panel/floating-panel-dock-button.js +37 -0
- package/cjs/floating-panel/floating-panel-drag-handle.d.ts +5 -0
- package/cjs/floating-panel/floating-panel-drag-handle.js +51 -0
- package/cjs/floating-panel/floating-panel-header.d.ts +11 -0
- package/cjs/floating-panel/floating-panel-header.js +46 -0
- package/cjs/floating-panel/floating-panel.d.ts +66 -0
- package/cjs/floating-panel/floating-panel.js +140 -0
- package/cjs/floating-panel/index.d.ts +4 -0
- package/cjs/floating-panel/index.js +19 -0
- package/cjs/floating-panel/types.d.ts +21 -0
- package/cjs/floating-panel/types.js +5 -0
- package/cjs/floating-panel/use-floating-panel-root.d.ts +6 -0
- package/cjs/floating-panel/use-floating-panel-root.js +31 -0
- package/cjs/floating-panel/use-floating-panel-state.d.ts +27 -0
- package/cjs/floating-panel/use-floating-panel-state.js +316 -0
- package/cjs/floating-panel/use-floating-panel.d.ts +4 -0
- package/cjs/floating-panel/use-floating-panel.js +14 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/index.js +11 -0
- package/cjs/table-react/hooks/useColumns.js +13 -5
- package/esm/floating-panel/constants.d.ts +21 -0
- package/esm/floating-panel/constants.js +86 -0
- package/esm/floating-panel/draggable-area.d.ts +12 -0
- package/esm/floating-panel/draggable-area.js +65 -0
- package/esm/floating-panel/floating-panel-dock-button.d.ts +5 -0
- package/esm/floating-panel/floating-panel-dock-button.js +30 -0
- package/esm/floating-panel/floating-panel-drag-handle.d.ts +5 -0
- package/esm/floating-panel/floating-panel-drag-handle.js +44 -0
- package/esm/floating-panel/floating-panel-header.d.ts +11 -0
- package/esm/floating-panel/floating-panel-header.js +39 -0
- package/esm/floating-panel/floating-panel.d.ts +66 -0
- package/esm/floating-panel/floating-panel.js +132 -0
- package/esm/floating-panel/index.d.ts +4 -0
- package/esm/floating-panel/index.js +2 -0
- package/esm/floating-panel/types.d.ts +21 -0
- package/esm/floating-panel/types.js +1 -0
- package/esm/floating-panel/use-floating-panel-root.d.ts +6 -0
- package/esm/floating-panel/use-floating-panel-root.js +24 -0
- package/esm/floating-panel/use-floating-panel-state.d.ts +27 -0
- package/esm/floating-panel/use-floating-panel-state.js +310 -0
- package/esm/floating-panel/use-floating-panel.d.ts +4 -0
- package/esm/floating-panel/use-floating-panel.js +9 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/table-react/hooks/useColumns.js +13 -5
- package/floating-panel/package.json +7 -0
- package/js/bundle/bundle.js +1351 -332
- package/js/bundle/bundle.min.js +1 -1
- package/js/bundle/index.d.ts +94 -1
- package/package.json +1 -1
- package/styles/index.css +150 -0
- package/styles/index.min.css +1 -1
- package/styles/themes/alpine-light.css +12 -0
- package/styles/themes/alpine-light.min.css +1 -1
- package/styles/themes/midnight-gray.css +12 -0
- package/styles/themes/midnight-gray.min.css +1 -1
package/js/bundle/index.d.ts
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
// ../packages/lib/moment
|
|
10
10
|
// ../packages/lib/react-datetime
|
|
11
11
|
// ../packages/lib/dnd-core
|
|
12
|
+
// ../packages/lib/@popperjs/core
|
|
12
13
|
// ../packages/lib/@fortawesome/react-fontawesome
|
|
13
14
|
// ../packages/lib/@fortawesome/fontawesome-common-types
|
|
14
|
-
// ../packages/lib/@popperjs/core
|
|
15
15
|
// ../packages/lib/@tanstack/react-table
|
|
16
16
|
// ../packages/lib/slate-history
|
|
17
17
|
|
|
@@ -56,6 +56,9 @@ import { ElementType, ReactNode } from 'react';
|
|
|
56
56
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
57
57
|
import { ReactElement, InputHTMLAttributes } from 'react';
|
|
58
58
|
import { ReactNode, SyntheticEvent } from 'react';
|
|
59
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
60
|
+
import { Modifier, Placement } from '@popperjs/core';
|
|
61
|
+
import React, { MutableRefObject } from 'react';
|
|
59
62
|
import { FontAwesomeIcon as FontAwesomeIconOriginal } from '@fortawesome/react-fontawesome';
|
|
60
63
|
import React, { ReactNode, ReactElement } from 'react';
|
|
61
64
|
import React, { ChangeEvent, FocusEvent } from 'react';
|
|
@@ -3029,6 +3032,96 @@ export type FilteringPanelProps = {
|
|
|
3029
3032
|
/** Button which slides in a modal from the left for filtering selection. */
|
|
3030
3033
|
export function FilteringPanel({ buttonTestId, buttonText, titleText, clearFiltersText, applyFiltersText, closeOnClear, isValid, modalProps, isInitial, children, onApply, onClear, buttonProps, }: FilteringPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
3031
3034
|
|
|
3035
|
+
import './floating-panel.less';
|
|
3036
|
+
export type FloatingPanelProps = {
|
|
3037
|
+
/**
|
|
3038
|
+
* Panel's content
|
|
3039
|
+
*/
|
|
3040
|
+
children: React.ReactNode;
|
|
3041
|
+
/**
|
|
3042
|
+
* Pass custom header action buttons here
|
|
3043
|
+
*/
|
|
3044
|
+
actions?: React.ReactNode;
|
|
3045
|
+
minHeight?: number;
|
|
3046
|
+
minWidth?: number;
|
|
3047
|
+
maxWidth?: number;
|
|
3048
|
+
maxHeight?: number;
|
|
3049
|
+
/**
|
|
3050
|
+
* Position panel relative to this element. Alternative use `initialState`
|
|
3051
|
+
*/
|
|
3052
|
+
anchorEl?: ElementReference;
|
|
3053
|
+
/**
|
|
3054
|
+
* Dock element. It should be placed after id="full-screen-modal-root"
|
|
3055
|
+
*/
|
|
3056
|
+
dockEl?: ElementReference;
|
|
3057
|
+
/**
|
|
3058
|
+
* Pass an element where the main page content is rendered, this will help calculate the header size
|
|
3059
|
+
*/
|
|
3060
|
+
pageContentEl?: ElementReference;
|
|
3061
|
+
/**
|
|
3062
|
+
* Popper's placement, used for initial position if `initialState` is not defined
|
|
3063
|
+
*/
|
|
3064
|
+
placement?: Placement;
|
|
3065
|
+
/**
|
|
3066
|
+
* Popper modifies which will override default set of modifiers
|
|
3067
|
+
*/
|
|
3068
|
+
popperModifiers?: Partial<Modifier<any, any>>[];
|
|
3069
|
+
testId?: string;
|
|
3070
|
+
/**
|
|
3071
|
+
* Use this to set initial state. Update it in `onClose` handler to preserve last position.
|
|
3072
|
+
*/
|
|
3073
|
+
initialState?: PanelState;
|
|
3074
|
+
/**
|
|
3075
|
+
* Use this to control docked state outside the component
|
|
3076
|
+
*/
|
|
3077
|
+
isDocked?: boolean;
|
|
3078
|
+
/**
|
|
3079
|
+
* Use this to sync up the docked state with consumer when controlled outside
|
|
3080
|
+
*/
|
|
3081
|
+
setIsDocked?: Dispatch<SetStateAction<boolean>>;
|
|
3082
|
+
/**
|
|
3083
|
+
* Use this in consumer to update `initialState` in order to preserve last position
|
|
3084
|
+
*/
|
|
3085
|
+
onClose?: (State: PanelState) => void;
|
|
3086
|
+
/**
|
|
3087
|
+
* Aria label for the floating panel
|
|
3088
|
+
*/
|
|
3089
|
+
ariaLabel?: string;
|
|
3090
|
+
};
|
|
3091
|
+
/**
|
|
3092
|
+
* Floating panel
|
|
3093
|
+
* @midnight-gray-supported
|
|
3094
|
+
* @uxr-only-supported
|
|
3095
|
+
* @alpine-light-supported
|
|
3096
|
+
*/
|
|
3097
|
+
export function FloatingPanel({ children, minHeight, minWidth, maxWidth, maxHeight, anchorEl, dockEl, pageContentEl, initialState, testId, placement, popperModifiers, onClose, actions, ...props }: FloatingPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
3098
|
+
|
|
3099
|
+
export type PanelState = {
|
|
3100
|
+
top: number;
|
|
3101
|
+
left: number;
|
|
3102
|
+
width: number;
|
|
3103
|
+
height: number;
|
|
3104
|
+
};
|
|
3105
|
+
export type DraggableEvent = MouseEvent & {
|
|
3106
|
+
areaId: string;
|
|
3107
|
+
};
|
|
3108
|
+
export type FloatingPanelContextType = {
|
|
3109
|
+
onDrag: (event: DraggableEvent) => void;
|
|
3110
|
+
onDragStart: (event: DraggableEvent) => void;
|
|
3111
|
+
onDragEnd: (event: DraggableEvent | string) => void;
|
|
3112
|
+
onMoveWithArrows: (event: React.KeyboardEvent) => void;
|
|
3113
|
+
isDocked: boolean;
|
|
3114
|
+
setIsDocked: (docked: boolean) => void;
|
|
3115
|
+
isMoving: boolean;
|
|
3116
|
+
getPosition: () => PanelState;
|
|
3117
|
+
};
|
|
3118
|
+
export type ElementReference = HTMLElement | Element | MutableRefObject<HTMLElement> | (() => HTMLElement) | null;
|
|
3119
|
+
|
|
3120
|
+
/**
|
|
3121
|
+
* Use inside the content component for FloatingPanel in order to get access to context
|
|
3122
|
+
*/
|
|
3123
|
+
export function useFloatingPanel(): import("./types").FloatingPanelContextType;
|
|
3124
|
+
|
|
3032
3125
|
export const FontAwesomeIcon: import("react").MemoExoticComponent<typeof FontAwesomeIconOriginal>;
|
|
3033
3126
|
|
|
3034
3127
|
import './form-field.less';
|
package/package.json
CHANGED
package/styles/index.css
CHANGED
|
@@ -7624,6 +7624,7 @@ li.CodeMirror-hint-active {
|
|
|
7624
7624
|
.custom-card-header .right-content {
|
|
7625
7625
|
display: flex;
|
|
7626
7626
|
align-items: center;
|
|
7627
|
+
gap: 0.25rem;
|
|
7627
7628
|
}
|
|
7628
7629
|
|
|
7629
7630
|
/*!**************************************************************************************************************************************************************************************************************************************************************!*\
|
|
@@ -9557,6 +9558,155 @@ td.rdtYear {
|
|
|
9557
9558
|
animation-name: FilterPanelShow;
|
|
9558
9559
|
}
|
|
9559
9560
|
|
|
9561
|
+
/*!**********************************************************************************************************************************************************************************************************************************************************!*\
|
|
9562
|
+
!*** css ../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./src/components/floating-panel/floating-panel.less ***!
|
|
9563
|
+
\**********************************************************************************************************************************************************************************************************************************************************/
|
|
9564
|
+
/* stylelint-disable dr-custom/no-several-root-selectors */
|
|
9565
|
+
.floating-panel {
|
|
9566
|
+
position: fixed;
|
|
9567
|
+
display: flex;
|
|
9568
|
+
flex-direction: column;
|
|
9569
|
+
margin: 0;
|
|
9570
|
+
background: var(--floating-panel-bg);
|
|
9571
|
+
border: 0.0625rem solid var(--floating-panel-border-color);
|
|
9572
|
+
border-radius: var(--floating-panel-border-radius);
|
|
9573
|
+
box-shadow: var(--floating-panel-border-shadow);
|
|
9574
|
+
z-index: 101;
|
|
9575
|
+
/* keep for translate3d positioning */
|
|
9576
|
+
inset: 0 auto auto 0;
|
|
9577
|
+
/* keep for translate3d positioning */
|
|
9578
|
+
}
|
|
9579
|
+
.floating-panel.docked {
|
|
9580
|
+
position: absolute;
|
|
9581
|
+
top: 0;
|
|
9582
|
+
bottom: 0;
|
|
9583
|
+
left: calc(-1 * var(--floating-panel-docked-width));
|
|
9584
|
+
height: unset;
|
|
9585
|
+
width: var(--floating-panel-docked-width);
|
|
9586
|
+
border-radius: unset;
|
|
9587
|
+
transform: unset;
|
|
9588
|
+
}
|
|
9589
|
+
.floating-panel.docked .floating-panel-header {
|
|
9590
|
+
border-radius: unset;
|
|
9591
|
+
}
|
|
9592
|
+
.floating-panel .floating-panel-header {
|
|
9593
|
+
display: flex;
|
|
9594
|
+
flex-direction: row;
|
|
9595
|
+
align-items: center;
|
|
9596
|
+
justify-content: space-between;
|
|
9597
|
+
padding: 0.5rem;
|
|
9598
|
+
background-color: var(--floating-panel-header-bg);
|
|
9599
|
+
border-radius: var(--floating-panel-border-radius) var(--floating-panel-border-radius) 0 0;
|
|
9600
|
+
}
|
|
9601
|
+
.floating-panel .floating-panel-header .drag-handle {
|
|
9602
|
+
justify-self: left;
|
|
9603
|
+
padding: 0.5rem;
|
|
9604
|
+
color: var(--floating-panel-drag-handle-color);
|
|
9605
|
+
border-radius: var(--button-border-radius);
|
|
9606
|
+
cursor: move;
|
|
9607
|
+
}
|
|
9608
|
+
.floating-panel .floating-panel-header .drag-handle > svg {
|
|
9609
|
+
margin: 0 0.25rem;
|
|
9610
|
+
}
|
|
9611
|
+
.floating-panel .floating-panel-header .drag-handle:focus-visible {
|
|
9612
|
+
outline: var(--focus-outline-color) solid 0.0625rem;
|
|
9613
|
+
outline-offset: 0.125rem;
|
|
9614
|
+
}
|
|
9615
|
+
.floating-panel .floating-panel-header .drag-handle.disabled {
|
|
9616
|
+
cursor: default;
|
|
9617
|
+
}
|
|
9618
|
+
.floating-panel .floating-panel-header .actions {
|
|
9619
|
+
display: flex;
|
|
9620
|
+
flex-direction: row;
|
|
9621
|
+
justify-self: right;
|
|
9622
|
+
gap: 0.25rem;
|
|
9623
|
+
}
|
|
9624
|
+
.floating-panel .floating-panel-header .actions > * {
|
|
9625
|
+
color: var(--floating-panel-header-color);
|
|
9626
|
+
}
|
|
9627
|
+
.floating-panel .floating-panel-content {
|
|
9628
|
+
padding: 1rem;
|
|
9629
|
+
border-top: 0.0625rem solid var(--floating-panel-border-color);
|
|
9630
|
+
}
|
|
9631
|
+
.floating-panel .resize-handle {
|
|
9632
|
+
position: absolute;
|
|
9633
|
+
z-index: 1;
|
|
9634
|
+
}
|
|
9635
|
+
.floating-panel .resize-handle.top-left {
|
|
9636
|
+
top: calc(var(--floating-panel-resizer-width) / -2);
|
|
9637
|
+
left: calc(var(--floating-panel-resizer-width) / -2);
|
|
9638
|
+
height: var(--floating-panel-resizer-width);
|
|
9639
|
+
width: var(--floating-panel-resizer-width);
|
|
9640
|
+
cursor: nwse-resize;
|
|
9641
|
+
}
|
|
9642
|
+
.floating-panel .resize-handle.top {
|
|
9643
|
+
top: calc(var(--floating-panel-resizer-width) / -2);
|
|
9644
|
+
right: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9645
|
+
left: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9646
|
+
height: var(--floating-panel-resizer-width);
|
|
9647
|
+
cursor: ns-resize;
|
|
9648
|
+
}
|
|
9649
|
+
.floating-panel .resize-handle.top-right {
|
|
9650
|
+
top: calc(var(--floating-panel-resizer-width) / -2);
|
|
9651
|
+
right: calc(var(--floating-panel-resizer-width) / -2);
|
|
9652
|
+
height: var(--floating-panel-resizer-width);
|
|
9653
|
+
width: var(--floating-panel-resizer-width);
|
|
9654
|
+
cursor: nesw-resize;
|
|
9655
|
+
}
|
|
9656
|
+
.floating-panel .resize-handle.right {
|
|
9657
|
+
top: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9658
|
+
right: calc(var(--floating-panel-resizer-width) / -2);
|
|
9659
|
+
bottom: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9660
|
+
width: var(--floating-panel-resizer-width);
|
|
9661
|
+
cursor: ew-resize;
|
|
9662
|
+
}
|
|
9663
|
+
.floating-panel .resize-handle.bottom-right {
|
|
9664
|
+
right: calc(var(--floating-panel-resizer-width) / -2);
|
|
9665
|
+
bottom: calc(var(--floating-panel-resizer-width) / -2);
|
|
9666
|
+
height: var(--floating-panel-resizer-width);
|
|
9667
|
+
width: var(--floating-panel-resizer-width);
|
|
9668
|
+
cursor: nwse-resize;
|
|
9669
|
+
}
|
|
9670
|
+
.floating-panel .resize-handle.bottom {
|
|
9671
|
+
right: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9672
|
+
bottom: calc(var(--floating-panel-resizer-width) / -2);
|
|
9673
|
+
left: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9674
|
+
height: var(--floating-panel-resizer-width);
|
|
9675
|
+
cursor: ns-resize;
|
|
9676
|
+
}
|
|
9677
|
+
.floating-panel .resize-handle.bottom-left {
|
|
9678
|
+
bottom: calc(var(--floating-panel-resizer-width) / -2);
|
|
9679
|
+
left: calc(var(--floating-panel-resizer-width) / -2);
|
|
9680
|
+
height: var(--floating-panel-resizer-width);
|
|
9681
|
+
width: var(--floating-panel-resizer-width);
|
|
9682
|
+
cursor: nesw-resize;
|
|
9683
|
+
}
|
|
9684
|
+
.floating-panel .resize-handle.left {
|
|
9685
|
+
top: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9686
|
+
bottom: calc(var(--floating-panel-resizer-width) - var(--floating-panel-resizer-width) / 2);
|
|
9687
|
+
left: calc(var(--floating-panel-resizer-width) / -2);
|
|
9688
|
+
width: var(--floating-panel-resizer-width);
|
|
9689
|
+
cursor: ew-resize;
|
|
9690
|
+
}
|
|
9691
|
+
#floating-panel-root {
|
|
9692
|
+
position: absolute;
|
|
9693
|
+
top: 0;
|
|
9694
|
+
right: 0;
|
|
9695
|
+
bottom: 0;
|
|
9696
|
+
}
|
|
9697
|
+
#floating-panel-root.highlighted:before {
|
|
9698
|
+
content: '';
|
|
9699
|
+
position: absolute;
|
|
9700
|
+
top: 0;
|
|
9701
|
+
right: 0;
|
|
9702
|
+
bottom: 0;
|
|
9703
|
+
width: 0.1875rem;
|
|
9704
|
+
margin: 0.75rem;
|
|
9705
|
+
background: var(--floating-panel-dock-highlight-color);
|
|
9706
|
+
pointer-events: none;
|
|
9707
|
+
z-index: 1;
|
|
9708
|
+
}
|
|
9709
|
+
|
|
9560
9710
|
/*!******************************************************************************************************************************************************************************************************************************************************************!*\
|
|
9561
9711
|
!*** css ../../node_modules/css-loader/dist/cjs.js!../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[3].use[2]!../../node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[3].use[3]!./src/components/full-screen-drawer/full-screen-drawer.less ***!
|
|
9562
9712
|
\******************************************************************************************************************************************************************************************************************************************************************/
|