@patternfly/react-table 4.37.11 → 4.38.3
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/CHANGELOG.md +38 -0
- package/dist/umd/react-table.css +47 -27
- package/dist/umd/react-table.js +103 -92
- package/dist/umd/react-table.min.css +5907 -5887
- package/dist/umd/react-table.min.js +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 4.38.3 (2021-11-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 4.38.2 (2021-11-08)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 4.38.1 (2021-11-08)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **acccessconsoles:** use object type Select options values in order to not mix displayed text with option keys ([#6496](https://github.com/patternfly/patternfly-react/issues/6496)) ([975c8e1](https://github.com/patternfly/patternfly-react/commit/975c8e14d7ea8c53eb4048ea6ef73e804b3ad2be))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# 4.38.0 (2021-11-04)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* **log-viewer:** support ANSI color ([#6519](https://github.com/patternfly/patternfly-react/issues/6519)) ([936a699](https://github.com/patternfly/patternfly-react/commit/936a699b0514a492d3c40be08932fb7bab275cce))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
## 4.37.11 (2021-11-01)
|
|
7
45
|
|
|
8
46
|
|
package/dist/umd/react-table.css
CHANGED
|
@@ -5194,30 +5194,48 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
5194
5194
|
box-shadow: var(--pf-c-tooltip--BoxShadow);
|
|
5195
5195
|
}
|
|
5196
5196
|
|
|
5197
|
-
.pf-c-tooltip.pf-m-top .pf-c-tooltip__arrow {
|
|
5197
|
+
.pf-c-tooltip.pf-m-top .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-top-left .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-top-right .pf-c-tooltip__arrow {
|
|
5198
5198
|
bottom: 0;
|
|
5199
5199
|
left: 50%;
|
|
5200
5200
|
transform: translateX(var(--pf-c-tooltip__arrow--m-top--TranslateX)) translateY(var(--pf-c-tooltip__arrow--m-top--TranslateY)) rotate(var(--pf-c-tooltip__arrow--m-top--Rotate));
|
|
5201
5201
|
}
|
|
5202
5202
|
|
|
5203
|
-
.pf-c-tooltip.pf-m-bottom .pf-c-tooltip__arrow {
|
|
5203
|
+
.pf-c-tooltip.pf-m-bottom .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-bottom-left .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-bottom-right .pf-c-tooltip__arrow {
|
|
5204
5204
|
top: 0;
|
|
5205
5205
|
left: 50%;
|
|
5206
5206
|
transform: translateX(var(--pf-c-tooltip__arrow--m-bottom--TranslateX)) translateY(var(--pf-c-tooltip__arrow--m-bottom--TranslateY)) rotate(var(--pf-c-tooltip__arrow--m-bottom--Rotate));
|
|
5207
5207
|
}
|
|
5208
5208
|
|
|
5209
|
-
.pf-c-tooltip.pf-m-left .pf-c-tooltip__arrow {
|
|
5209
|
+
.pf-c-tooltip.pf-m-left .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-left-top .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-left-bottom .pf-c-tooltip__arrow {
|
|
5210
5210
|
top: 50%;
|
|
5211
5211
|
right: 0;
|
|
5212
5212
|
transform: translateX(var(--pf-c-tooltip__arrow--m-left--TranslateX)) translateY(var(--pf-c-tooltip__arrow--m-left--TranslateY)) rotate(var(--pf-c-tooltip__arrow--m-left--Rotate));
|
|
5213
5213
|
}
|
|
5214
5214
|
|
|
5215
|
-
.pf-c-tooltip.pf-m-right .pf-c-tooltip__arrow {
|
|
5215
|
+
.pf-c-tooltip.pf-m-right .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-right-top .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-right-bottom .pf-c-tooltip__arrow {
|
|
5216
5216
|
top: 50%;
|
|
5217
5217
|
left: 0;
|
|
5218
5218
|
transform: translateX(var(--pf-c-tooltip__arrow--m-right--TranslateX)) translateY(var(--pf-c-tooltip__arrow--m-right--TranslateY)) rotate(var(--pf-c-tooltip__arrow--m-right--Rotate));
|
|
5219
5219
|
}
|
|
5220
5220
|
|
|
5221
|
+
.pf-c-tooltip.pf-m-left-top .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-right-top .pf-c-tooltip__arrow {
|
|
5222
|
+
top: var(--pf-c-tooltip__arrow--Height);
|
|
5223
|
+
}
|
|
5224
|
+
|
|
5225
|
+
.pf-c-tooltip.pf-m-left-bottom .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-right-bottom .pf-c-tooltip__arrow {
|
|
5226
|
+
top: auto;
|
|
5227
|
+
bottom: 0;
|
|
5228
|
+
}
|
|
5229
|
+
|
|
5230
|
+
.pf-c-tooltip.pf-m-top-left .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-bottom-left .pf-c-tooltip__arrow {
|
|
5231
|
+
left: var(--pf-c-tooltip__arrow--Width);
|
|
5232
|
+
}
|
|
5233
|
+
|
|
5234
|
+
.pf-c-tooltip.pf-m-top-right .pf-c-tooltip__arrow, .pf-c-tooltip.pf-m-bottom-right .pf-c-tooltip__arrow {
|
|
5235
|
+
right: 0;
|
|
5236
|
+
left: auto;
|
|
5237
|
+
}
|
|
5238
|
+
|
|
5221
5239
|
.pf-c-tooltip__content {
|
|
5222
5240
|
position: relative;
|
|
5223
5241
|
padding: var(--pf-c-tooltip__content--PaddingTop) var(--pf-c-tooltip__content--PaddingRight) var(--pf-c-tooltip__content--PaddingBottom) var(--pf-c-tooltip__content--PaddingLeft);
|
|
@@ -15545,7 +15563,7 @@ ul.pf-c-list {
|
|
|
15545
15563
|
--pf-c-menu-toggle--m-expanded--BackgroundColor: var(--pf-c-menu-toggle--m-primary--m-expanded--BackgroundColor);
|
|
15546
15564
|
}
|
|
15547
15565
|
|
|
15548
|
-
.pf-c-menu-toggle.pf-m-plain {
|
|
15566
|
+
.pf-c-menu-toggle.pf-m-plain:not(.pf-m-text) {
|
|
15549
15567
|
--pf-c-menu-toggle--Color: var(--pf-c-menu-toggle--m-plain--Color);
|
|
15550
15568
|
--pf-c-menu-toggle--hover--Color: var(--pf-c-menu-toggle--m-plain--hover--Color);
|
|
15551
15569
|
--pf-c-menu-toggle--focus--Color: var(--pf-c-menu-toggle--m-plain--hover--Color);
|
|
@@ -16330,14 +16348,12 @@ ul.pf-c-list {
|
|
|
16330
16348
|
}
|
|
16331
16349
|
|
|
16332
16350
|
.pf-c-nav__item {
|
|
16333
|
-
--pf-c-nav__item__toggle-icon--Rotate: 0;
|
|
16334
16351
|
position: relative;
|
|
16335
16352
|
margin-top: var(--pf-c-nav__item--MarginTop);
|
|
16336
16353
|
}
|
|
16337
16354
|
|
|
16338
16355
|
.pf-c-nav__item.pf-m-expandable {
|
|
16339
16356
|
--pf-c-nav__link--before--BorderBottomWidth: 0;
|
|
16340
|
-
--pf-c-nav__item__toggle-icon--Rotate: var(--pf-c-nav__item--m-expanded__toggle-icon--Rotate);
|
|
16341
16357
|
}
|
|
16342
16358
|
|
|
16343
16359
|
.pf-c-nav__item.pf-m-expandable::before {
|
|
@@ -16349,6 +16365,10 @@ ul.pf-c-list {
|
|
|
16349
16365
|
border-bottom: var(--pf-c-nav__item--before--BorderWidth) solid var(--pf-c-nav__item--before--BorderColor);
|
|
16350
16366
|
}
|
|
16351
16367
|
|
|
16368
|
+
.pf-c-nav__item .pf-c-nav__item:not(.pf-m-expanded) .pf-c-nav__toggle-icon {
|
|
16369
|
+
transform: rotate(0);
|
|
16370
|
+
}
|
|
16371
|
+
|
|
16352
16372
|
.pf-c-nav__item .pf-c-nav__item.pf-m-expandable {
|
|
16353
16373
|
--pf-c-nav__toggle--FontSize: var(--pf-c-nav__item__item__toggle--FontSize);
|
|
16354
16374
|
--pf-c-nav__link--PaddingRight: var(--pf-c-nav__item__item__link--PaddingRight);
|
|
@@ -16636,11 +16656,7 @@ ul.pf-c-list {
|
|
|
16636
16656
|
transition: var(--pf-c-nav__toggle-icon--Transition);
|
|
16637
16657
|
}
|
|
16638
16658
|
|
|
16639
|
-
.pf-c-nav__item.pf-m-expanded .pf-c-
|
|
16640
|
-
transform: rotate(0deg);
|
|
16641
|
-
}
|
|
16642
|
-
|
|
16643
|
-
.pf-c-nav__item.pf-m-expanded .pf-c-nav__toggle-icon, .pf-c-nav__item .pf-c-nav__item.pf-m-expanded .pf-c-nav__toggle-icon {
|
|
16659
|
+
.pf-c-nav__item.pf-m-expanded .pf-c-nav__toggle-icon {
|
|
16644
16660
|
transform: rotate(var(--pf-c-nav__item--m-expanded__toggle-icon--Rotate));
|
|
16645
16661
|
}
|
|
16646
16662
|
|
|
@@ -17237,44 +17253,34 @@ ul.pf-c-list {
|
|
|
17237
17253
|
justify-content: space-between;
|
|
17238
17254
|
min-width: var(--pf-c-options-menu__toggle--MinWidth);
|
|
17239
17255
|
max-width: 100%;
|
|
17240
|
-
padding
|
|
17256
|
+
padding: var(--pf-c-options-menu__toggle--PaddingTop) var(--pf-c-options-menu__toggle--PaddingRight) var(--pf-c-options-menu__toggle--PaddingBottom) var(--pf-c-options-menu__toggle--PaddingLeft);
|
|
17241
17257
|
line-height: var(--pf-c-options-menu__toggle--LineHeight);
|
|
17242
17258
|
color: var(--pf-c-options-menu__toggle--Color);
|
|
17243
17259
|
background-color: var(--pf-c-options-menu__toggle--BackgroundColor);
|
|
17244
17260
|
border: none;
|
|
17245
17261
|
}
|
|
17246
17262
|
|
|
17247
|
-
.pf-c-options-menu__toggle:not(.pf-m-text) {
|
|
17248
|
-
padding-top: var(--pf-c-options-menu__toggle--PaddingTop);
|
|
17249
|
-
padding-right: var(--pf-c-options-menu__toggle--PaddingRight);
|
|
17250
|
-
padding-bottom: var(--pf-c-options-menu__toggle--PaddingBottom);
|
|
17251
|
-
}
|
|
17252
|
-
|
|
17253
17263
|
.pf-c-options-menu.pf-m-expanded > .pf-c-options-menu__toggle::before {
|
|
17254
17264
|
--pf-c-options-menu__toggle--BorderBottomColor: var(--pf-c-options-menu__toggle--expanded--BorderBottomColor);
|
|
17255
17265
|
border-bottom-width: var(--pf-c-options-menu__toggle--expanded--BorderBottomWidth);
|
|
17256
17266
|
}
|
|
17257
17267
|
|
|
17258
|
-
.pf-c-options-menu__toggle.pf-m-plain {
|
|
17268
|
+
.pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text) {
|
|
17259
17269
|
--pf-c-options-menu__toggle--PaddingRight: var(--pf-c-options-menu__toggle--m-plain--PaddingRight);
|
|
17260
17270
|
--pf-c-options-menu__toggle--PaddingLeft: var(--pf-c-options-menu__toggle--m-plain--PaddingLeft);
|
|
17261
17271
|
display: inline-block;
|
|
17262
|
-
}
|
|
17263
|
-
|
|
17264
|
-
.pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text) {
|
|
17265
|
-
justify-content: center;
|
|
17266
17272
|
color: var(--pf-c-options-menu__toggle--m-plain--Color);
|
|
17267
17273
|
}
|
|
17268
17274
|
|
|
17269
|
-
.pf-c-options-menu__toggle.pf-m-plain .pf-c-options-menu__toggle-button-icon {
|
|
17275
|
+
.pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text) .pf-c-options-menu__toggle-button-icon {
|
|
17270
17276
|
line-height: var(--pf-c-options-menu__toggle--LineHeight);
|
|
17271
17277
|
}
|
|
17272
17278
|
|
|
17273
|
-
.pf-c-options-menu__toggle.pf-m-plain:hover, .pf-c-options-menu__toggle.pf-m-plain:active, .pf-c-options-menu__toggle.pf-m-plain.pf-m-active, .pf-c-options-menu__toggle.pf-m-plain:focus, .pf-c-options-menu.pf-m-expanded > .pf-c-options-menu__toggle.pf-m-plain {
|
|
17279
|
+
.pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text):hover, .pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text):active, .pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text).pf-m-active, .pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text):focus, .pf-c-options-menu.pf-m-expanded > .pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text) {
|
|
17274
17280
|
--pf-c-options-menu__toggle--m-plain--Color: var(--pf-c-options-menu__toggle--m-plain--hover--Color);
|
|
17275
17281
|
}
|
|
17276
17282
|
|
|
17277
|
-
.pf-c-options-menu__toggle.pf-m-plain.pf-m-disabled, .pf-c-options-menu__toggle.pf-m-plain:disabled {
|
|
17283
|
+
.pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text).pf-m-disabled, .pf-c-options-menu__toggle.pf-m-plain:not(.pf-m-text):disabled {
|
|
17278
17284
|
--pf-c-options-menu__toggle--m-plain--Color: var(--pf-c-options-menu__toggle--m-plain--disabled--Color);
|
|
17279
17285
|
}
|
|
17280
17286
|
|
|
@@ -24767,6 +24773,7 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
24767
24773
|
}
|
|
24768
24774
|
|
|
24769
24775
|
.pf-c-text-input-group {
|
|
24776
|
+
--pf-c-text-input-group--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
24770
24777
|
--pf-c-text-input-group__text--before--BorderWidth: var(--pf-global--BorderWidth--sm);
|
|
24771
24778
|
--pf-c-text-input-group__text--before--BorderColor: var(--pf-global--BorderColor--300);
|
|
24772
24779
|
--pf-c-text-input-group__text--after--BorderBottomWidth: var(--pf-global--BorderWidth--sm);
|
|
@@ -24791,14 +24798,27 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
24791
24798
|
--pf-c-text-input-group__utilities--child--MarginLeft: var(--pf-global--spacer--xs);
|
|
24792
24799
|
--pf-c-text-input-group__utilities--c-button--PaddingRight: var(--pf-global--spacer--xs);
|
|
24793
24800
|
--pf-c-text-input-group__utilities--c-button--PaddingLeft: var(--pf-global--spacer--xs);
|
|
24801
|
+
--pf-c-text-input-group--m-disabled--Color: var(--pf-global--disabled-color--100);
|
|
24802
|
+
--pf-c-text-input-group--m-disabled--BackgroundColor: var(--pf-global--disabled-color--300);
|
|
24794
24803
|
position: relative;
|
|
24795
24804
|
display: flex;
|
|
24805
|
+
color: var(--pf-c-text-input-group--Color, inherit);
|
|
24806
|
+
background-color: var(--pf-c-text-input-group--BackgroundColor);
|
|
24796
24807
|
}
|
|
24797
24808
|
|
|
24798
24809
|
.pf-c-text-input-group:hover {
|
|
24799
24810
|
--pf-c-text-input-group__text--after--BorderBottomColor: var(--pf-c-text-input-group--hover__text--after--BorderBottomColor);
|
|
24800
24811
|
}
|
|
24801
24812
|
|
|
24813
|
+
.pf-c-text-input-group.pf-m-disabled {
|
|
24814
|
+
--pf-c-text-input-group__text--before--BorderWidth: 0;
|
|
24815
|
+
--pf-c-text-input-group__text--after--BorderBottomWidth: 0;
|
|
24816
|
+
--pf-c-text-input-group--Color: var(--pf-c-text-input-group--m-disabled--Color);
|
|
24817
|
+
--pf-c-text-input-group__icon--Color: var(--pf-c-text-input-group--m-disabled--Color);
|
|
24818
|
+
--pf-c-text-input-group--BackgroundColor: var(--pf-c-text-input-group--m-disabled--BackgroundColor);
|
|
24819
|
+
pointer-events: none;
|
|
24820
|
+
}
|
|
24821
|
+
|
|
24802
24822
|
.pf-c-text-input-group__main {
|
|
24803
24823
|
display: flex;
|
|
24804
24824
|
flex: 1;
|
package/dist/umd/react-table.js
CHANGED
|
@@ -3243,6 +3243,94 @@
|
|
|
3243
3243
|
noSpaceHandling: false
|
|
3244
3244
|
};
|
|
3245
3245
|
|
|
3246
|
+
/**
|
|
3247
|
+
* This function creates a ResizeObserver used to handle resize events for the given containerRef. If ResizeObserver
|
|
3248
|
+
* or the given containerRef are not available, a window resize event listener is used by default.
|
|
3249
|
+
*
|
|
3250
|
+
* Example 1:
|
|
3251
|
+
*
|
|
3252
|
+
* private containerRef = React.createRef<HTMLDivElement>();
|
|
3253
|
+
* private observer: any = () => {};
|
|
3254
|
+
*
|
|
3255
|
+
* public componentDidMount() {
|
|
3256
|
+
* this.observer = getResizeObserver(this.containerRef.current, this.handleResize);
|
|
3257
|
+
* }
|
|
3258
|
+
*
|
|
3259
|
+
* public componentWillUnmount() {
|
|
3260
|
+
* this.observer();
|
|
3261
|
+
* }
|
|
3262
|
+
*
|
|
3263
|
+
* private handleResize = () => {
|
|
3264
|
+
* if (this.containerRef.current && this.containerRef.current.clientWidth) {
|
|
3265
|
+
* this.setState({ width: this.containerRef.current.clientWidth });
|
|
3266
|
+
* }
|
|
3267
|
+
* };
|
|
3268
|
+
*
|
|
3269
|
+
* public render() {
|
|
3270
|
+
* return (
|
|
3271
|
+
* <div ref={this.containerRef} >
|
|
3272
|
+
* <Chart width={this.state.width} ... />
|
|
3273
|
+
* </div>
|
|
3274
|
+
* );
|
|
3275
|
+
* }
|
|
3276
|
+
*
|
|
3277
|
+
* Example 2:
|
|
3278
|
+
*
|
|
3279
|
+
* private inputRef = React.createRef<HTMLInputElement>();
|
|
3280
|
+
* private observer: any = () => {};
|
|
3281
|
+
*
|
|
3282
|
+
* public componentDidMount() {
|
|
3283
|
+
* this.observer = getResizeObserver(this.inputRef.current, this.handleResize);
|
|
3284
|
+
* }
|
|
3285
|
+
*
|
|
3286
|
+
* public componentWillUnmount() {
|
|
3287
|
+
* this.observer();
|
|
3288
|
+
* }
|
|
3289
|
+
*
|
|
3290
|
+
* private handleResize = () => {
|
|
3291
|
+
* if (this.inputRef.current) {
|
|
3292
|
+
* trimLeft(inputRef.current, String(this.props.value));
|
|
3293
|
+
* }
|
|
3294
|
+
* };
|
|
3295
|
+
*
|
|
3296
|
+
* public render() {
|
|
3297
|
+
* return (
|
|
3298
|
+
* <input ref={this.inputRef} ... />
|
|
3299
|
+
* );
|
|
3300
|
+
* }
|
|
3301
|
+
*
|
|
3302
|
+
* @param {Element} containerRefElement The container reference to observe
|
|
3303
|
+
* @param {Function} handleResize The function to call for resize events
|
|
3304
|
+
* @return {Function} The function used to unobserve resize events
|
|
3305
|
+
*/
|
|
3306
|
+
const getResizeObserver = (containerRefElement, handleResize) => {
|
|
3307
|
+
let unobserve;
|
|
3308
|
+
if (canUseDOM) {
|
|
3309
|
+
const { ResizeObserver } = window;
|
|
3310
|
+
if (containerRefElement && ResizeObserver) {
|
|
3311
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
3312
|
+
// Wrap resize function in requestAnimationFrame to avoid "ResizeObserver loop limit exceeded" errors
|
|
3313
|
+
window.requestAnimationFrame(() => {
|
|
3314
|
+
if (Array.isArray(entries) && entries.length > 0) {
|
|
3315
|
+
handleResize();
|
|
3316
|
+
}
|
|
3317
|
+
});
|
|
3318
|
+
});
|
|
3319
|
+
resizeObserver.observe(containerRefElement);
|
|
3320
|
+
unobserve = () => resizeObserver.unobserve(containerRefElement);
|
|
3321
|
+
}
|
|
3322
|
+
else {
|
|
3323
|
+
window.addEventListener('resize', handleResize);
|
|
3324
|
+
unobserve = () => window.removeEventListener('resize', handleResize);
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
return () => {
|
|
3328
|
+
if (unobserve) {
|
|
3329
|
+
unobserve();
|
|
3330
|
+
}
|
|
3331
|
+
};
|
|
3332
|
+
};
|
|
3333
|
+
|
|
3246
3334
|
var _default$j = {
|
|
3247
3335
|
"bullseye": "pf-l-bullseye"
|
|
3248
3336
|
};
|
|
@@ -3530,9 +3618,17 @@
|
|
|
3530
3618
|
var _default$f = {
|
|
3531
3619
|
"modifiers": {
|
|
3532
3620
|
"top": "pf-m-top",
|
|
3621
|
+
"topLeft": "pf-m-top-left",
|
|
3622
|
+
"topRight": "pf-m-top-right",
|
|
3533
3623
|
"bottom": "pf-m-bottom",
|
|
3624
|
+
"bottomLeft": "pf-m-bottom-left",
|
|
3625
|
+
"bottomRight": "pf-m-bottom-right",
|
|
3534
3626
|
"left": "pf-m-left",
|
|
3627
|
+
"leftTop": "pf-m-left-top",
|
|
3628
|
+
"leftBottom": "pf-m-left-bottom",
|
|
3535
3629
|
"right": "pf-m-right",
|
|
3630
|
+
"rightTop": "pf-m-right-top",
|
|
3631
|
+
"rightBottom": "pf-m-right-bottom",
|
|
3536
3632
|
"textAlignLeft": "pf-m-text-align-left"
|
|
3537
3633
|
},
|
|
3538
3634
|
"tooltip": "pf-c-tooltip",
|
|
@@ -4441,94 +4537,6 @@
|
|
|
4441
4537
|
}));
|
|
4442
4538
|
};
|
|
4443
4539
|
|
|
4444
|
-
/**
|
|
4445
|
-
* This function creates a ResizeObserver used to handle resize events for the given containerRef. If ResizeObserver
|
|
4446
|
-
* or the given containerRef are not available, a window resize event listener is used by default.
|
|
4447
|
-
*
|
|
4448
|
-
* Example 1:
|
|
4449
|
-
*
|
|
4450
|
-
* private containerRef = React.createRef<HTMLDivElement>();
|
|
4451
|
-
* private observer: any = () => {};
|
|
4452
|
-
*
|
|
4453
|
-
* public componentDidMount() {
|
|
4454
|
-
* this.observer = getResizeObserver(this.containerRef.current, this.handleResize);
|
|
4455
|
-
* }
|
|
4456
|
-
*
|
|
4457
|
-
* public componentWillUnmount() {
|
|
4458
|
-
* this.observer();
|
|
4459
|
-
* }
|
|
4460
|
-
*
|
|
4461
|
-
* private handleResize = () => {
|
|
4462
|
-
* if (this.containerRef.current && this.containerRef.current.clientWidth) {
|
|
4463
|
-
* this.setState({ width: this.containerRef.current.clientWidth });
|
|
4464
|
-
* }
|
|
4465
|
-
* };
|
|
4466
|
-
*
|
|
4467
|
-
* public render() {
|
|
4468
|
-
* return (
|
|
4469
|
-
* <div ref={this.containerRef} >
|
|
4470
|
-
* <Chart width={this.state.width} ... />
|
|
4471
|
-
* </div>
|
|
4472
|
-
* );
|
|
4473
|
-
* }
|
|
4474
|
-
*
|
|
4475
|
-
* Example 2:
|
|
4476
|
-
*
|
|
4477
|
-
* private inputRef = React.createRef<HTMLInputElement>();
|
|
4478
|
-
* private observer: any = () => {};
|
|
4479
|
-
*
|
|
4480
|
-
* public componentDidMount() {
|
|
4481
|
-
* this.observer = getResizeObserver(this.inputRef.current, this.handleResize);
|
|
4482
|
-
* }
|
|
4483
|
-
*
|
|
4484
|
-
* public componentWillUnmount() {
|
|
4485
|
-
* this.observer();
|
|
4486
|
-
* }
|
|
4487
|
-
*
|
|
4488
|
-
* private handleResize = () => {
|
|
4489
|
-
* if (this.inputRef.current) {
|
|
4490
|
-
* trimLeft(inputRef.current, String(this.props.value));
|
|
4491
|
-
* }
|
|
4492
|
-
* };
|
|
4493
|
-
*
|
|
4494
|
-
* public render() {
|
|
4495
|
-
* return (
|
|
4496
|
-
* <input ref={this.inputRef} ... />
|
|
4497
|
-
* );
|
|
4498
|
-
* }
|
|
4499
|
-
*
|
|
4500
|
-
* @param {React.RefObject} containerRef The container reference to observe
|
|
4501
|
-
* @param {Function} handleResize The function to call for resize events
|
|
4502
|
-
* @return {Function} The function used to unobserve resize events
|
|
4503
|
-
*/
|
|
4504
|
-
const getResizeObserver = (containerRef, handleResize) => {
|
|
4505
|
-
let unobserve;
|
|
4506
|
-
if (canUseDOM) {
|
|
4507
|
-
const { ResizeObserver } = window;
|
|
4508
|
-
if (containerRef && ResizeObserver) {
|
|
4509
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
4510
|
-
// Wrap resize function in requestAnimationFrame to avoid "ResizeObserver loop limit exceeded" errors
|
|
4511
|
-
window.requestAnimationFrame(() => {
|
|
4512
|
-
if (Array.isArray(entries) && entries.length > 0) {
|
|
4513
|
-
handleResize();
|
|
4514
|
-
}
|
|
4515
|
-
});
|
|
4516
|
-
});
|
|
4517
|
-
resizeObserver.observe(containerRef);
|
|
4518
|
-
unobserve = () => resizeObserver.unobserve(containerRef);
|
|
4519
|
-
}
|
|
4520
|
-
else {
|
|
4521
|
-
window.addEventListener('resize', handleResize);
|
|
4522
|
-
unobserve = () => window.removeEventListener('resize', handleResize);
|
|
4523
|
-
}
|
|
4524
|
-
}
|
|
4525
|
-
return () => {
|
|
4526
|
-
if (unobserve) {
|
|
4527
|
-
unobserve();
|
|
4528
|
-
}
|
|
4529
|
-
};
|
|
4530
|
-
};
|
|
4531
|
-
|
|
4532
4540
|
var TextInputTypes;
|
|
4533
4541
|
(function (TextInputTypes) {
|
|
4534
4542
|
TextInputTypes["text"] = "text";
|
|
@@ -6258,6 +6266,8 @@
|
|
|
6258
6266
|
"title": "pf-c-title"
|
|
6259
6267
|
};
|
|
6260
6268
|
|
|
6269
|
+
const PopoverContext = React__namespace.createContext({});
|
|
6270
|
+
|
|
6261
6271
|
const PopoverContent = (_a) => {
|
|
6262
6272
|
var { className = null, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
6263
6273
|
return (React__namespace.createElement("div", Object.assign({ className: css(_default$5.popoverContent, className) }, props), children));
|
|
@@ -6272,7 +6282,7 @@
|
|
|
6272
6282
|
|
|
6273
6283
|
const PopoverHeader = (_a) => {
|
|
6274
6284
|
var { children, id } = _a, props = __rest$1(_a, ["children", "id"]);
|
|
6275
|
-
return (React__namespace.createElement(Title, Object.assign({ headingLevel:
|
|
6285
|
+
return (React__namespace.createElement(PopoverContext.Consumer, null, ({ headerComponent }) => (React__namespace.createElement(Title, Object.assign({ headingLevel: headerComponent, size: TitleSizes.md, id: id }, props), children))));
|
|
6276
6286
|
};
|
|
6277
6287
|
PopoverHeader.displayName = 'PopoverHeader';
|
|
6278
6288
|
|
|
@@ -6334,9 +6344,9 @@
|
|
|
6334
6344
|
PopoverPosition["rightEnd"] = "right-end";
|
|
6335
6345
|
})(PopoverPosition || (PopoverPosition = {}));
|
|
6336
6346
|
const Popover = (_a) => {
|
|
6337
|
-
var { children, position = 'top', enableFlip = true, className = '', isVisible = null, shouldClose = () => null, shouldOpen = () => null, 'aria-label': ariaLabel = '', bodyContent, headerContent = null, footerContent = null, appendTo = () => document.body, hideOnOutsideClick = true, onHide = () => null, onHidden = () => null, onShow = () => null, onShown = () => null, onMount = () => null, zIndex = 9999, minWidth = popoverMinWidth && popoverMinWidth.value, maxWidth = popoverMaxWidth && popoverMaxWidth.value, closeBtnAriaLabel = 'Close', showClose = true, distance = 25,
|
|
6347
|
+
var { children, position = 'top', enableFlip = true, className = '', isVisible = null, shouldClose = () => null, shouldOpen = () => null, 'aria-label': ariaLabel = '', bodyContent, headerContent = null, headerComponent = 'h6', footerContent = null, appendTo = () => document.body, hideOnOutsideClick = true, onHide = () => null, onHidden = () => null, onShow = () => null, onShown = () => null, onMount = () => null, zIndex = 9999, minWidth = popoverMinWidth && popoverMinWidth.value, maxWidth = popoverMaxWidth && popoverMaxWidth.value, closeBtnAriaLabel = 'Close', showClose = true, distance = 25,
|
|
6338
6348
|
// For every initial starting position, there are 3 escape positions
|
|
6339
|
-
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], animationDuration = 300, id, withFocusTrap: propWithFocusTrap, boundary, tippyProps, reference, hasNoPadding = false, hasAutoWidth = false } = _a, rest = __rest$1(_a, ["children", "position", "enableFlip", "className", "isVisible", "shouldClose", "shouldOpen", 'aria-label', "bodyContent", "headerContent", "footerContent", "appendTo", "hideOnOutsideClick", "onHide", "onHidden", "onShow", "onShown", "onMount", "zIndex", "minWidth", "maxWidth", "closeBtnAriaLabel", "showClose", "distance", "flipBehavior", "animationDuration", "id", "withFocusTrap", "boundary", "tippyProps", "reference", "hasNoPadding", "hasAutoWidth"]);
|
|
6349
|
+
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], animationDuration = 300, id, withFocusTrap: propWithFocusTrap, boundary, tippyProps, reference, hasNoPadding = false, hasAutoWidth = false } = _a, rest = __rest$1(_a, ["children", "position", "enableFlip", "className", "isVisible", "shouldClose", "shouldOpen", 'aria-label', "bodyContent", "headerContent", "headerComponent", "footerContent", "appendTo", "hideOnOutsideClick", "onHide", "onHidden", "onShow", "onShown", "onMount", "zIndex", "minWidth", "maxWidth", "closeBtnAriaLabel", "showClose", "distance", "flipBehavior", "animationDuration", "id", "withFocusTrap", "boundary", "tippyProps", "reference", "hasNoPadding", "hasAutoWidth"]);
|
|
6340
6350
|
{
|
|
6341
6351
|
boundary !== undefined &&
|
|
6342
6352
|
console.warn('The Popover boundary prop has been deprecated. If you want to constrain the popper to a specific element use the appendTo prop instead.');
|
|
@@ -6514,7 +6524,8 @@
|
|
|
6514
6524
|
headerContent && (React__namespace.createElement(PopoverHeader, { id: `popover-${uniqueId}-header` }, typeof headerContent === 'function' ? headerContent(hide) : headerContent)),
|
|
6515
6525
|
React__namespace.createElement(PopoverBody, { id: `popover-${uniqueId}-body` }, typeof bodyContent === 'function' ? bodyContent(hide) : bodyContent),
|
|
6516
6526
|
footerContent && (React__namespace.createElement(PopoverFooter, { id: `popover-${uniqueId}-footer` }, typeof footerContent === 'function' ? footerContent(hide) : footerContent)))));
|
|
6517
|
-
return (React__namespace.createElement(
|
|
6527
|
+
return (React__namespace.createElement(PopoverContext.Provider, { value: { headerComponent } },
|
|
6528
|
+
React__namespace.createElement(Popper, { trigger: children, reference: reference, popper: content, popperMatchesTriggerWidth: false, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onTriggerClick: onTriggerClick, onTriggerEnter: onTriggerEnter, onDocumentClick: onDocumentClick, onDocumentKeyDown: onDocumentKeyDown, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior })));
|
|
6518
6529
|
};
|
|
6519
6530
|
Popover.displayName = 'Popover';
|
|
6520
6531
|
|