@patternfly/react-table 4.101.11 → 4.102.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/CHANGELOG.md +27 -0
- package/dist/umd/react-table.css +99 -98
- package/dist/umd/react-table.js +52 -11
- package/dist/umd/react-table.min.css +241 -240
- package/dist/umd/react-table.min.js +4 -4
- package/package.json +6 -6
- package/src/demos/Table.md +30 -3
- package/src/demos/examples/ComposableTableStickyToolbar.tsx +252 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
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.102.0 (2022-08-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ExpandableSection:** add truncated variant ([#7852](https://github.com/patternfly/patternfly-react/issues/7852)) ([f628cdf](https://github.com/patternfly/patternfly-react/commit/f628cdf571d71addfc04e69728be73895e261094))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## 4.101.13 (2022-08-19)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## 4.101.12 (2022-08-19)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @patternfly/react-table
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
6
33
|
## 4.101.11 (2022-08-18)
|
|
7
34
|
|
|
8
35
|
**Note:** Version bump only for package @patternfly/react-table
|
package/dist/umd/react-table.css
CHANGED
|
@@ -4260,11 +4260,12 @@
|
|
|
4260
4260
|
|
|
4261
4261
|
.pf-c-scroll-outer-wrapper {
|
|
4262
4262
|
--pf-c-scroll-outer-wrapper--MinHeight: 25rem;
|
|
4263
|
+
--pf-c-scroll-outer-wrapper--MaxHeight: 100%;
|
|
4263
4264
|
display: flex;
|
|
4264
4265
|
flex-direction: column;
|
|
4265
4266
|
max-width: 100%;
|
|
4266
4267
|
min-height: var(--pf-c-scroll-outer-wrapper--MinHeight);
|
|
4267
|
-
max-height:
|
|
4268
|
+
max-height: var(--pf-c-scroll-outer-wrapper--MaxHeight);
|
|
4268
4269
|
overflow: hidden;
|
|
4269
4270
|
}
|
|
4270
4271
|
|
|
@@ -8253,89 +8254,6 @@ button.pf-c-breadcrumb__link {
|
|
|
8253
8254
|
--pf-c-chip--m-draggable--BackgroundColor: var(--pf-global--palette--black-600);
|
|
8254
8255
|
}
|
|
8255
8256
|
|
|
8256
|
-
.pf-c-chip-group {
|
|
8257
|
-
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
8258
|
-
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
8259
|
-
--pf-global--BorderColor--100: var(--pf-global--BorderColor--dark-100);
|
|
8260
|
-
--pf-global--primary-color--100: var(--pf-global--primary-color--dark-100);
|
|
8261
|
-
--pf-global--link--Color: var(--pf-global--link--Color--dark);
|
|
8262
|
-
--pf-global--link--Color--hover: var(--pf-global--link--Color--dark--hover);
|
|
8263
|
-
--pf-global--BackgroundColor--100: var(--pf-global--BackgroundColor--light-100);
|
|
8264
|
-
}
|
|
8265
|
-
|
|
8266
|
-
.pf-c-chip-group {
|
|
8267
|
-
color: var(--pf-global--Color--100);
|
|
8268
|
-
--pf-c-chip-group__list--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
|
|
8269
|
-
--pf-c-chip-group__list--MarginRight: calc(var(--pf-global--spacer--xs) * -1);
|
|
8270
|
-
--pf-c-chip-group--m-category--PaddingTop: var(--pf-global--spacer--xs);
|
|
8271
|
-
--pf-c-chip-group--m-category--PaddingRight: var(--pf-global--spacer--xs);
|
|
8272
|
-
--pf-c-chip-group--m-category--PaddingBottom: var(--pf-global--spacer--xs);
|
|
8273
|
-
--pf-c-chip-group--m-category--PaddingLeft: var(--pf-global--spacer--sm);
|
|
8274
|
-
--pf-c-chip-group--m-category--BorderRadius: var(--pf-global--BorderRadius--sm);
|
|
8275
|
-
--pf-c-chip-group--m-category--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
8276
|
-
--pf-c-chip-group__label--MarginRight: var(--pf-global--spacer--sm);
|
|
8277
|
-
--pf-c-chip-group__label--FontSize: var(--pf-global--FontSize--sm);
|
|
8278
|
-
--pf-c-chip-group__label--MaxWidth: 18ch;
|
|
8279
|
-
--pf-c-chip-group__close--MarginTop: calc(var(--pf-global--spacer--xs) * -1);
|
|
8280
|
-
--pf-c-chip-group__close--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
|
|
8281
|
-
--pf-c-chip-group__list-item--MarginRight: var(--pf-global--spacer--xs);
|
|
8282
|
-
--pf-c-chip-group__list-item--MarginBottom: var(--pf-global--spacer--xs);
|
|
8283
|
-
max-width: 100%;
|
|
8284
|
-
}
|
|
8285
|
-
|
|
8286
|
-
.pf-c-chip-group.pf-m-category {
|
|
8287
|
-
padding-top: var(--pf-c-chip-group--m-category--PaddingTop);
|
|
8288
|
-
padding-right: var(--pf-c-chip-group--m-category--PaddingRight);
|
|
8289
|
-
padding-bottom: var(--pf-c-chip-group--m-category--PaddingBottom);
|
|
8290
|
-
padding-left: var(--pf-c-chip-group--m-category--PaddingLeft);
|
|
8291
|
-
background-color: var(--pf-c-chip-group--m-category--BackgroundColor);
|
|
8292
|
-
border-radius: var(--pf-c-chip-group--m-category--BorderRadius);
|
|
8293
|
-
}
|
|
8294
|
-
|
|
8295
|
-
.pf-c-chip-group__main {
|
|
8296
|
-
display: flex;
|
|
8297
|
-
flex: 1;
|
|
8298
|
-
flex-wrap: wrap;
|
|
8299
|
-
align-items: baseline;
|
|
8300
|
-
min-width: 0;
|
|
8301
|
-
}
|
|
8302
|
-
|
|
8303
|
-
.pf-c-chip-group__list {
|
|
8304
|
-
margin-right: var(--pf-c-chip-group__list--MarginRight);
|
|
8305
|
-
margin-bottom: var(--pf-c-chip-group__list--MarginBottom);
|
|
8306
|
-
}
|
|
8307
|
-
|
|
8308
|
-
.pf-c-chip-group,
|
|
8309
|
-
.pf-c-chip-group__list {
|
|
8310
|
-
display: inline-flex;
|
|
8311
|
-
flex-wrap: wrap;
|
|
8312
|
-
align-items: center;
|
|
8313
|
-
min-width: 0;
|
|
8314
|
-
}
|
|
8315
|
-
|
|
8316
|
-
.pf-c-chip-group__list-item {
|
|
8317
|
-
display: inline-flex;
|
|
8318
|
-
min-width: 0;
|
|
8319
|
-
margin-right: var(--pf-c-chip-group__list-item--MarginRight);
|
|
8320
|
-
margin-bottom: var(--pf-c-chip-group__list-item--MarginBottom);
|
|
8321
|
-
}
|
|
8322
|
-
|
|
8323
|
-
.pf-c-chip-group__label {
|
|
8324
|
-
overflow: hidden;
|
|
8325
|
-
text-overflow: ellipsis;
|
|
8326
|
-
white-space: nowrap;
|
|
8327
|
-
max-width: var(--pf-c-chip-group__label--MaxWidth);
|
|
8328
|
-
margin-right: var(--pf-c-chip-group__label--MarginRight);
|
|
8329
|
-
font-size: var(--pf-c-chip-group__label--FontSize);
|
|
8330
|
-
}
|
|
8331
|
-
|
|
8332
|
-
.pf-c-chip-group__close {
|
|
8333
|
-
display: flex;
|
|
8334
|
-
align-self: flex-start;
|
|
8335
|
-
margin-top: var(--pf-c-chip-group__close--MarginTop);
|
|
8336
|
-
margin-bottom: var(--pf-c-chip-group__close--MarginBottom);
|
|
8337
|
-
}
|
|
8338
|
-
|
|
8339
8257
|
.pf-c-clipboard-copy {
|
|
8340
8258
|
--pf-c-clipboard-copy__toggle-icon--Transition: .2s ease-in 0s;
|
|
8341
8259
|
--pf-c-clipboard-copy--m-expanded__toggle-icon--Rotate: 90deg;
|
|
@@ -8446,6 +8364,89 @@ button.pf-c-breadcrumb__link {
|
|
|
8446
8364
|
border: 0;
|
|
8447
8365
|
}
|
|
8448
8366
|
|
|
8367
|
+
.pf-c-chip-group {
|
|
8368
|
+
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
8369
|
+
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
8370
|
+
--pf-global--BorderColor--100: var(--pf-global--BorderColor--dark-100);
|
|
8371
|
+
--pf-global--primary-color--100: var(--pf-global--primary-color--dark-100);
|
|
8372
|
+
--pf-global--link--Color: var(--pf-global--link--Color--dark);
|
|
8373
|
+
--pf-global--link--Color--hover: var(--pf-global--link--Color--dark--hover);
|
|
8374
|
+
--pf-global--BackgroundColor--100: var(--pf-global--BackgroundColor--light-100);
|
|
8375
|
+
}
|
|
8376
|
+
|
|
8377
|
+
.pf-c-chip-group {
|
|
8378
|
+
color: var(--pf-global--Color--100);
|
|
8379
|
+
--pf-c-chip-group__list--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
|
|
8380
|
+
--pf-c-chip-group__list--MarginRight: calc(var(--pf-global--spacer--xs) * -1);
|
|
8381
|
+
--pf-c-chip-group--m-category--PaddingTop: var(--pf-global--spacer--xs);
|
|
8382
|
+
--pf-c-chip-group--m-category--PaddingRight: var(--pf-global--spacer--xs);
|
|
8383
|
+
--pf-c-chip-group--m-category--PaddingBottom: var(--pf-global--spacer--xs);
|
|
8384
|
+
--pf-c-chip-group--m-category--PaddingLeft: var(--pf-global--spacer--sm);
|
|
8385
|
+
--pf-c-chip-group--m-category--BorderRadius: var(--pf-global--BorderRadius--sm);
|
|
8386
|
+
--pf-c-chip-group--m-category--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
8387
|
+
--pf-c-chip-group__label--MarginRight: var(--pf-global--spacer--sm);
|
|
8388
|
+
--pf-c-chip-group__label--FontSize: var(--pf-global--FontSize--sm);
|
|
8389
|
+
--pf-c-chip-group__label--MaxWidth: 18ch;
|
|
8390
|
+
--pf-c-chip-group__close--MarginTop: calc(var(--pf-global--spacer--xs) * -1);
|
|
8391
|
+
--pf-c-chip-group__close--MarginBottom: calc(var(--pf-global--spacer--xs) * -1);
|
|
8392
|
+
--pf-c-chip-group__list-item--MarginRight: var(--pf-global--spacer--xs);
|
|
8393
|
+
--pf-c-chip-group__list-item--MarginBottom: var(--pf-global--spacer--xs);
|
|
8394
|
+
max-width: 100%;
|
|
8395
|
+
}
|
|
8396
|
+
|
|
8397
|
+
.pf-c-chip-group.pf-m-category {
|
|
8398
|
+
padding-top: var(--pf-c-chip-group--m-category--PaddingTop);
|
|
8399
|
+
padding-right: var(--pf-c-chip-group--m-category--PaddingRight);
|
|
8400
|
+
padding-bottom: var(--pf-c-chip-group--m-category--PaddingBottom);
|
|
8401
|
+
padding-left: var(--pf-c-chip-group--m-category--PaddingLeft);
|
|
8402
|
+
background-color: var(--pf-c-chip-group--m-category--BackgroundColor);
|
|
8403
|
+
border-radius: var(--pf-c-chip-group--m-category--BorderRadius);
|
|
8404
|
+
}
|
|
8405
|
+
|
|
8406
|
+
.pf-c-chip-group__main {
|
|
8407
|
+
display: flex;
|
|
8408
|
+
flex: 1;
|
|
8409
|
+
flex-wrap: wrap;
|
|
8410
|
+
align-items: baseline;
|
|
8411
|
+
min-width: 0;
|
|
8412
|
+
}
|
|
8413
|
+
|
|
8414
|
+
.pf-c-chip-group__list {
|
|
8415
|
+
margin-right: var(--pf-c-chip-group__list--MarginRight);
|
|
8416
|
+
margin-bottom: var(--pf-c-chip-group__list--MarginBottom);
|
|
8417
|
+
}
|
|
8418
|
+
|
|
8419
|
+
.pf-c-chip-group,
|
|
8420
|
+
.pf-c-chip-group__list {
|
|
8421
|
+
display: inline-flex;
|
|
8422
|
+
flex-wrap: wrap;
|
|
8423
|
+
align-items: center;
|
|
8424
|
+
min-width: 0;
|
|
8425
|
+
}
|
|
8426
|
+
|
|
8427
|
+
.pf-c-chip-group__list-item {
|
|
8428
|
+
display: inline-flex;
|
|
8429
|
+
min-width: 0;
|
|
8430
|
+
margin-right: var(--pf-c-chip-group__list-item--MarginRight);
|
|
8431
|
+
margin-bottom: var(--pf-c-chip-group__list-item--MarginBottom);
|
|
8432
|
+
}
|
|
8433
|
+
|
|
8434
|
+
.pf-c-chip-group__label {
|
|
8435
|
+
overflow: hidden;
|
|
8436
|
+
text-overflow: ellipsis;
|
|
8437
|
+
white-space: nowrap;
|
|
8438
|
+
max-width: var(--pf-c-chip-group__label--MaxWidth);
|
|
8439
|
+
margin-right: var(--pf-c-chip-group__label--MarginRight);
|
|
8440
|
+
font-size: var(--pf-c-chip-group__label--FontSize);
|
|
8441
|
+
}
|
|
8442
|
+
|
|
8443
|
+
.pf-c-chip-group__close {
|
|
8444
|
+
display: flex;
|
|
8445
|
+
align-self: flex-start;
|
|
8446
|
+
margin-top: var(--pf-c-chip-group__close--MarginTop);
|
|
8447
|
+
margin-bottom: var(--pf-c-chip-group__close--MarginBottom);
|
|
8448
|
+
}
|
|
8449
|
+
|
|
8449
8450
|
.pf-c-code-block {
|
|
8450
8451
|
--pf-c-code-block--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
8451
8452
|
--pf-c-code-block__header--BorderBottomWidth: var(--pf-global--BorderWidth--sm);
|
|
@@ -23090,6 +23091,20 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
23090
23091
|
--pf-c-skeleton--after--LinearGradientColorStop3: var(--pf-global--palette--black-600);
|
|
23091
23092
|
}
|
|
23092
23093
|
|
|
23094
|
+
.pf-c-skip-to-content {
|
|
23095
|
+
--pf-c-skip-to-content--Top: var(--pf-global--spacer--md);
|
|
23096
|
+
--pf-c-skip-to-content--ZIndex: var(--pf-global--ZIndex--2xl);
|
|
23097
|
+
--pf-c-skip-to-content--focus--Left: var(--pf-global--spacer--md);
|
|
23098
|
+
position: absolute;
|
|
23099
|
+
top: var(--pf-c-skip-to-content--Top);
|
|
23100
|
+
left: -300%;
|
|
23101
|
+
z-index: var(--pf-c-skip-to-content--ZIndex);
|
|
23102
|
+
}
|
|
23103
|
+
|
|
23104
|
+
.pf-c-skip-to-content:focus {
|
|
23105
|
+
left: var(--pf-c-skip-to-content--focus--Left);
|
|
23106
|
+
}
|
|
23107
|
+
|
|
23093
23108
|
.pf-c-slider {
|
|
23094
23109
|
--pf-c-slider--value: 0;
|
|
23095
23110
|
--pf-c-slider__rail--PaddingTop: var(--pf-global--spacer--md);
|
|
@@ -24707,20 +24722,6 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
24707
24722
|
--pf-c-tab-content__body--PaddingLeft: var(--pf-c-tab-content__body--m-padding--PaddingLeft);
|
|
24708
24723
|
}
|
|
24709
24724
|
|
|
24710
|
-
.pf-c-skip-to-content {
|
|
24711
|
-
--pf-c-skip-to-content--Top: var(--pf-global--spacer--md);
|
|
24712
|
-
--pf-c-skip-to-content--ZIndex: var(--pf-global--ZIndex--2xl);
|
|
24713
|
-
--pf-c-skip-to-content--focus--Left: var(--pf-global--spacer--md);
|
|
24714
|
-
position: absolute;
|
|
24715
|
-
top: var(--pf-c-skip-to-content--Top);
|
|
24716
|
-
left: -300%;
|
|
24717
|
-
z-index: var(--pf-c-skip-to-content--ZIndex);
|
|
24718
|
-
}
|
|
24719
|
-
|
|
24720
|
-
.pf-c-skip-to-content:focus {
|
|
24721
|
-
left: var(--pf-c-skip-to-content--focus--Left);
|
|
24722
|
-
}
|
|
24723
|
-
|
|
24724
24725
|
.pf-c-content {
|
|
24725
24726
|
--pf-c-content--MarginBottom: var(--pf-global--spacer--md);
|
|
24726
24727
|
--pf-c-content--LineHeight: var(--pf-global--LineHeight--md);
|
package/dist/umd/react-table.js
CHANGED
|
@@ -8051,9 +8051,11 @@
|
|
|
8051
8051
|
const idItem = React__namespace.Children.toArray(children).find((child) => !formCtrls.includes(child.type.displayName) && child.props.id);
|
|
8052
8052
|
const inputGroupRef = innerRef || React__namespace.useRef(null);
|
|
8053
8053
|
return (React__namespace.createElement("div", Object.assign({ ref: inputGroupRef, className: css(styles$v.inputGroup, className) }, props), idItem
|
|
8054
|
-
? React__namespace.Children.map(children, (child) => formCtrls.includes(child.type.displayName)
|
|
8055
|
-
?
|
|
8056
|
-
: child
|
|
8054
|
+
? React__namespace.Children.map(children, (child) => !formCtrls.includes(child.type.displayName) || child.props['aria-describedby']
|
|
8055
|
+
? child
|
|
8056
|
+
: React__namespace.cloneElement(child, {
|
|
8057
|
+
'aria-describedby': child.props['aria-describedby'] === '' ? undefined : idItem.props.id
|
|
8058
|
+
}))
|
|
8057
8059
|
: children));
|
|
8058
8060
|
};
|
|
8059
8061
|
InputGroup.displayName = 'InputGroup';
|
|
@@ -10885,9 +10887,27 @@
|
|
|
10885
10887
|
}
|
|
10886
10888
|
};
|
|
10887
10889
|
|
|
10890
|
+
const c_expandable_section_m_truncate__content_LineClamp = {
|
|
10891
|
+
"name": "--pf-c-expandable-section--m-truncate__content--LineClamp",
|
|
10892
|
+
"value": "3",
|
|
10893
|
+
"var": "var(--pf-c-expandable-section--m-truncate__content--LineClamp)"
|
|
10894
|
+
};
|
|
10895
|
+
|
|
10896
|
+
var ExpandableSectionVariant;
|
|
10897
|
+
(function (ExpandableSectionVariant) {
|
|
10898
|
+
ExpandableSectionVariant["default"] = "default";
|
|
10899
|
+
ExpandableSectionVariant["truncate"] = "truncate";
|
|
10900
|
+
})(ExpandableSectionVariant || (ExpandableSectionVariant = {}));
|
|
10901
|
+
const setLineClamp = (lines, element) => {
|
|
10902
|
+
if (!element || lines < 1) {
|
|
10903
|
+
return;
|
|
10904
|
+
}
|
|
10905
|
+
element.style.setProperty(c_expandable_section_m_truncate__content_LineClamp.name, lines.toString());
|
|
10906
|
+
};
|
|
10888
10907
|
class ExpandableSection extends React__namespace.Component {
|
|
10889
10908
|
constructor(props) {
|
|
10890
10909
|
super(props);
|
|
10910
|
+
this.expandableContentRef = React__namespace.createRef();
|
|
10891
10911
|
this.state = {
|
|
10892
10912
|
isExpanded: props.isExpanded
|
|
10893
10913
|
};
|
|
@@ -10901,10 +10921,25 @@
|
|
|
10901
10921
|
}
|
|
10902
10922
|
return toggleText;
|
|
10903
10923
|
}
|
|
10924
|
+
componentDidMount() {
|
|
10925
|
+
if (this.props.variant === ExpandableSectionVariant.truncate && this.props.truncateMaxLines) {
|
|
10926
|
+
const expandableContent = this.expandableContentRef.current;
|
|
10927
|
+
setLineClamp(this.props.truncateMaxLines, expandableContent);
|
|
10928
|
+
}
|
|
10929
|
+
}
|
|
10930
|
+
componentDidUpdate(prevProps) {
|
|
10931
|
+
if (this.props.variant === ExpandableSectionVariant.truncate &&
|
|
10932
|
+
prevProps.truncateMaxLines !== this.props.truncateMaxLines) {
|
|
10933
|
+
const expandableContent = this.expandableContentRef.current;
|
|
10934
|
+
setLineClamp(this.props.truncateMaxLines, expandableContent);
|
|
10935
|
+
}
|
|
10936
|
+
}
|
|
10904
10937
|
render() {
|
|
10905
10938
|
const _a = this.props, { onToggle: onToggleProp,
|
|
10906
10939
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10907
|
-
isActive, className, toggleText, toggleTextExpanded, toggleTextCollapsed, toggleContent, children, isExpanded, isDetached, displaySize, isWidthLimited, isIndented, contentId
|
|
10940
|
+
isActive, className, toggleText, toggleTextExpanded, toggleTextCollapsed, toggleContent, children, isExpanded, isDetached, displaySize, isWidthLimited, isIndented, contentId, variant,
|
|
10941
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10942
|
+
truncateMaxLines } = _a, props = __rest$1(_a, ["onToggle", "isActive", "className", "toggleText", "toggleTextExpanded", "toggleTextCollapsed", "toggleContent", "children", "isExpanded", "isDetached", "displaySize", "isWidthLimited", "isIndented", "contentId", "variant", "truncateMaxLines"]);
|
|
10908
10943
|
let onToggle = onToggleProp;
|
|
10909
10944
|
let propOrStateIsExpanded = isExpanded;
|
|
10910
10945
|
// uncontrolled
|
|
@@ -10915,12 +10950,14 @@
|
|
|
10915
10950
|
};
|
|
10916
10951
|
}
|
|
10917
10952
|
const computedToggleText = this.calculateToggleText(toggleText, toggleTextExpanded, toggleTextCollapsed, propOrStateIsExpanded);
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
React__namespace.createElement(
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10953
|
+
const expandableToggle = !isDetached && (React__namespace.createElement("button", { className: css(styles$m.expandableSectionToggle), type: "button", "aria-expanded": propOrStateIsExpanded, onClick: () => onToggle(!propOrStateIsExpanded) },
|
|
10954
|
+
variant !== ExpandableSectionVariant.truncate && (React__namespace.createElement("span", { className: css(styles$m.expandableSectionToggleIcon) },
|
|
10955
|
+
React__namespace.createElement(AngleRightIcon, { "aria-hidden": true }))),
|
|
10956
|
+
React__namespace.createElement("span", { className: css(styles$m.expandableSectionToggleText) }, toggleContent || computedToggleText)));
|
|
10957
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$m.expandableSection, propOrStateIsExpanded && styles$m.modifiers.expanded, isActive && styles$m.modifiers.active, isDetached && styles$m.modifiers.detached, displaySize === 'large' && styles$m.modifiers.displayLg, isWidthLimited && styles$m.modifiers.limitWidth, isIndented && styles$m.modifiers.indented, variant === ExpandableSectionVariant.truncate && styles$m.modifiers.truncate, className) }, props),
|
|
10958
|
+
variant === ExpandableSectionVariant.default && expandableToggle,
|
|
10959
|
+
React__namespace.createElement("div", { ref: this.expandableContentRef, className: css(styles$m.expandableSectionContent), hidden: variant !== ExpandableSectionVariant.truncate && !propOrStateIsExpanded, id: contentId }, children),
|
|
10960
|
+
variant === ExpandableSectionVariant.truncate && expandableToggle));
|
|
10924
10961
|
}
|
|
10925
10962
|
}
|
|
10926
10963
|
ExpandableSection.displayName = 'ExpandableSection';
|
|
@@ -10936,7 +10973,8 @@
|
|
|
10936
10973
|
displaySize: 'default',
|
|
10937
10974
|
isWidthLimited: false,
|
|
10938
10975
|
isIndented: false,
|
|
10939
|
-
contentId: ''
|
|
10976
|
+
contentId: '',
|
|
10977
|
+
variant: 'default'
|
|
10940
10978
|
};
|
|
10941
10979
|
|
|
10942
10980
|
var fileReaderType;
|
|
@@ -13104,6 +13142,7 @@
|
|
|
13104
13142
|
}
|
|
13105
13143
|
};
|
|
13106
13144
|
const onKeyDown = (event) => {
|
|
13145
|
+
var _a, _b;
|
|
13107
13146
|
const key = event.key;
|
|
13108
13147
|
if ((!isEditableActive &&
|
|
13109
13148
|
(!editableButtonRef ||
|
|
@@ -13120,6 +13159,7 @@
|
|
|
13120
13159
|
onEditComplete && onEditComplete(editableInputRef.current.value);
|
|
13121
13160
|
}
|
|
13122
13161
|
setIsEditableActive(false);
|
|
13162
|
+
(_a = editableButtonRef === null || editableButtonRef === void 0 ? void 0 : editableButtonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
13123
13163
|
}
|
|
13124
13164
|
if (isEditableActive && key === 'Escape') {
|
|
13125
13165
|
event.preventDefault();
|
|
@@ -13130,6 +13170,7 @@
|
|
|
13130
13170
|
onEditCancel && onEditCancel(children);
|
|
13131
13171
|
}
|
|
13132
13172
|
setIsEditableActive(false);
|
|
13173
|
+
(_b = editableButtonRef === null || editableButtonRef === void 0 ? void 0 : editableButtonRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
13133
13174
|
}
|
|
13134
13175
|
if (!isEditableActive && key === 'Enter') {
|
|
13135
13176
|
event.preventDefault();
|