@patternfly/react-core 4.170.1 → 4.170.2
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 +8 -0
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts +3 -0
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroup.js +6 -2
- package/dist/esm/components/TextInputGroup/TextInputGroup.js.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts +8 -2
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js +7 -3
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts +3 -0
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.js +7 -3
- package/dist/js/components/TextInputGroup/TextInputGroup.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts +8 -2
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js +7 -3
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js.map +1 -1
- package/dist/umd/react-core.css +77 -77
- package/dist/umd/react-core.js +13 -5
- package/dist/umd/react-core.min.css +1603 -1603
- package/dist/umd/react-core.min.js +3 -3
- package/package.json +5 -5
- package/src/components/TextInputGroup/TextInputGroup.tsx +12 -3
- package/src/components/TextInputGroup/TextInputGroupMain.tsx +51 -20
- package/src/components/TextInputGroup/__tests__/TextInputGroup.test.tsx +91 -3
- package/src/components/TextInputGroup/__tests__/__snapshots__/TextInputGroup.test.tsx.snap +19 -16
- package/src/components/TextInputGroup/examples/TextInputGroup.md +13 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.170.2 (2021-11-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/react-core
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## 4.170.1 (2021-11-10)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @patternfly/react-core
|
|
@@ -4,6 +4,9 @@ export interface TextInputGroupProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
/** Additional classes applied to the text input group container */
|
|
6
6
|
className?: string;
|
|
7
|
+
/** Adds disabled styling and a disabled context value which text input group main hooks into for the input itself */
|
|
8
|
+
isDisabled?: boolean;
|
|
7
9
|
}
|
|
10
|
+
export declare const TextInputGroupContext: React.Context<Partial<TextInputGroupProps>>;
|
|
8
11
|
export declare const TextInputGroup: React.FunctionComponent<TextInputGroupProps>;
|
|
9
12
|
//# sourceMappingURL=TextInputGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC1E,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInputGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC1E,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qHAAqH;IACrH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,6CAEhC,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAWvE,CAAC"}
|
|
@@ -2,9 +2,13 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/TextInputGroup/text-input-group';
|
|
4
4
|
import { css } from '@patternfly/react-styles';
|
|
5
|
+
export const TextInputGroupContext = React.createContext({
|
|
6
|
+
isDisabled: false
|
|
7
|
+
});
|
|
5
8
|
export const TextInputGroup = (_a) => {
|
|
6
|
-
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
|
7
|
-
return (React.createElement(
|
|
9
|
+
var { children, className, isDisabled } = _a, props = __rest(_a, ["children", "className", "isDisabled"]);
|
|
10
|
+
return (React.createElement(TextInputGroupContext.Provider, { value: { isDisabled } },
|
|
11
|
+
React.createElement("div", Object.assign({ className: css(styles.textInputGroup, isDisabled && styles.modifiers.disabled, className) }, props), children)));
|
|
8
12
|
};
|
|
9
13
|
TextInputGroup.displayName = 'TextInputGroup';
|
|
10
14
|
//# sourceMappingURL=TextInputGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroup.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,yEAAyE,CAAC;AAC7F,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInputGroup.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,yEAAyE,CAAC;AAC7F,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAW/C,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAA+B;IACrF,UAAU,EAAE,KAAK;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAiD,CAAC,EAKvD,EAAE,EAAE;QALmD,EAC3E,QAAQ,EACR,SAAS,EACT,UAAU,OAEU,EADjB,KAAK,cAJmE,uCAK5E,CADS;IACiB,OAAA,CACzB,oBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE;QACnD,2CAAK,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE,UAAU,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAM,KAAK,GACtG,QAAQ,CACL,CACyB,CAClC,CAAA;CAAA,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export interface TextInputGroupMainProps extends React.HTMLProps<HTMLDivElement> {
|
|
2
|
+
export interface TextInputGroupMainProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onChange'> {
|
|
3
3
|
/** Content rendered inside the text input group main div */
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
/** Additional classes applied to the text input group main container */
|
|
6
6
|
className?: string;
|
|
7
7
|
/** Icon to be shown on the left side of the text input group main container */
|
|
8
8
|
icon?: React.ReactNode;
|
|
9
|
+
/** Type that the input accepts. */
|
|
10
|
+
type?: 'text' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'time' | 'url';
|
|
9
11
|
/** Callback for when there is a change in the input field*/
|
|
10
|
-
onChange?: () => void;
|
|
12
|
+
onChange?: (value: string, event: React.FormEvent<HTMLInputElement>) => void;
|
|
13
|
+
/** Callback for when the input field is focused*/
|
|
14
|
+
onFocus?: (event?: any) => void;
|
|
15
|
+
/** Callback for when focus is lost on the input field*/
|
|
16
|
+
onBlur?: (event?: any) => void;
|
|
11
17
|
/** Accessibility label for the input */
|
|
12
18
|
'aria-label'?: string;
|
|
13
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroupMain.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInputGroupMain.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAChG,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mCAAmC;IACnC,IAAI,CAAC,EACD,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,CAAC;IACV,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC7E,kDAAkD;IAClD,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,wDAAwD;IACxD,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CAoC/E,CAAC"}
|
|
@@ -2,14 +2,18 @@ import { __rest } from "tslib";
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/TextInputGroup/text-input-group';
|
|
4
4
|
import { css } from '@patternfly/react-styles';
|
|
5
|
+
import { TextInputGroupContext } from './TextInputGroup';
|
|
5
6
|
export const TextInputGroupMain = (_a) => {
|
|
6
|
-
var { children, className, icon, onChange, 'aria-label': ariaLabel, value: inputValue } = _a, props = __rest(_a, ["children", "className", "icon", "onChange", 'aria-label', "value"]);
|
|
7
|
+
var { children, className, icon, type = 'text', onChange = () => undefined, onFocus, onBlur, 'aria-label': ariaLabel = 'Type to filter', value: inputValue } = _a, props = __rest(_a, ["children", "className", "icon", "type", "onChange", "onFocus", "onBlur", 'aria-label', "value"]);
|
|
8
|
+
const { isDisabled } = React.useContext(TextInputGroupContext);
|
|
9
|
+
const handleChange = (event) => {
|
|
10
|
+
onChange(event.currentTarget.value, event);
|
|
11
|
+
};
|
|
7
12
|
return (React.createElement("div", Object.assign({ className: css(styles.textInputGroupMain, icon && styles.modifiers.icon, className) }, props),
|
|
8
13
|
children,
|
|
9
14
|
React.createElement("span", { className: css(styles.textInputGroupText) },
|
|
10
15
|
icon && React.createElement("span", { className: css(styles.textInputGroupIcon) }, icon),
|
|
11
|
-
React.createElement("input", { type:
|
|
16
|
+
React.createElement("input", { type: type, className: css(styles.textInputGroupTextInput), "aria-label": ariaLabel, disabled: isDisabled, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, value: inputValue }))));
|
|
12
17
|
};
|
|
13
|
-
TextInputGroupMain.defaultProps = { 'aria-label': 'Type to filter' };
|
|
14
18
|
TextInputGroupMain.displayName = 'TextInputGroupMain';
|
|
15
19
|
//# sourceMappingURL=TextInputGroupMain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroupMain.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,yEAAyE,CAAC;AAC7F,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInputGroupMain.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,MAAM,MAAM,yEAAyE,CAAC;AAC7F,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAgCzD,MAAM,CAAC,MAAM,kBAAkB,GAAqD,CAAC,EAW3D,EAAE,EAAE;QAXuD,EACnF,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,GAAQ,EAAE,CAAC,SAAS,EAC/B,OAAO,EACP,MAAM,EACN,YAAY,EAAE,SAAS,GAAG,gBAAgB,EAC1C,KAAK,EAAE,UAAU,OAEO,EADrB,KAAK,cAV2E,iGAWpF,CADS;IAER,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;IAE/D,MAAM,YAAY,GAAG,CAAC,KAAwC,EAAE,EAAE;QAChE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC,CAAC;IAEF,OAAO,CACL,2CAAK,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,kBAAkB,EAAE,IAAI,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,IAAM,KAAK;QAChG,QAAQ;QACT,8BAAM,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC;YAC5C,IAAI,IAAI,8BAAM,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAG,IAAI,CAAQ;YACvE,+BACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,uBAAuB,CAAC,gBAClC,SAAS,EACrB,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,GACjB,CACG,CACH,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC"}
|
|
@@ -4,6 +4,9 @@ export interface TextInputGroupProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
/** Additional classes applied to the text input group container */
|
|
6
6
|
className?: string;
|
|
7
|
+
/** Adds disabled styling and a disabled context value which text input group main hooks into for the input itself */
|
|
8
|
+
isDisabled?: boolean;
|
|
7
9
|
}
|
|
10
|
+
export declare const TextInputGroupContext: React.Context<Partial<TextInputGroupProps>>;
|
|
8
11
|
export declare const TextInputGroup: React.FunctionComponent<TextInputGroupProps>;
|
|
9
12
|
//# sourceMappingURL=TextInputGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC1E,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInputGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC1E,mDAAmD;IACnD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qHAAqH;IACrH,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,qBAAqB,6CAEhC,CAAC;AAEH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAWvE,CAAC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextInputGroup = void 0;
|
|
3
|
+
exports.TextInputGroup = exports.TextInputGroupContext = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const text_input_group_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/TextInputGroup/text-input-group"));
|
|
7
7
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
8
|
+
exports.TextInputGroupContext = React.createContext({
|
|
9
|
+
isDisabled: false
|
|
10
|
+
});
|
|
8
11
|
const TextInputGroup = (_a) => {
|
|
9
|
-
var { children, className } = _a, props = tslib_1.__rest(_a, ["children", "className"]);
|
|
10
|
-
return (React.createElement(
|
|
12
|
+
var { children, className, isDisabled } = _a, props = tslib_1.__rest(_a, ["children", "className", "isDisabled"]);
|
|
13
|
+
return (React.createElement(exports.TextInputGroupContext.Provider, { value: { isDisabled } },
|
|
14
|
+
React.createElement("div", Object.assign({ className: react_styles_1.css(text_input_group_1.default.textInputGroup, isDisabled && text_input_group_1.default.modifiers.disabled, className) }, props), children)));
|
|
11
15
|
};
|
|
12
16
|
exports.TextInputGroup = TextInputGroup;
|
|
13
17
|
exports.TextInputGroup.displayName = 'TextInputGroup';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroup.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uIAA6F;AAC7F,2DAA+C;
|
|
1
|
+
{"version":3,"file":"TextInputGroup.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroup.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uIAA6F;AAC7F,2DAA+C;AAWlC,QAAA,qBAAqB,GAAG,KAAK,CAAC,aAAa,CAA+B;IACrF,UAAU,EAAE,KAAK;CAClB,CAAC,CAAC;AAEI,MAAM,cAAc,GAAiD,CAAC,EAKvD,EAAE,EAAE;QALmD,EAC3E,QAAQ,EACR,SAAS,EACT,UAAU,OAEU,EADjB,KAAK,sBAJmE,uCAK5E,CADS;IACiB,OAAA,CACzB,oBAAC,6BAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE;QACnD,2CAAK,SAAS,EAAE,kBAAG,CAAC,0BAAM,CAAC,cAAc,EAAE,UAAU,IAAI,0BAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,CAAC,IAAM,KAAK,GACtG,QAAQ,CACL,CACyB,CAClC,CAAA;CAAA,CAAC;AAXW,QAAA,cAAc,kBAWzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export interface TextInputGroupMainProps extends React.HTMLProps<HTMLDivElement> {
|
|
2
|
+
export interface TextInputGroupMainProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onChange'> {
|
|
3
3
|
/** Content rendered inside the text input group main div */
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
/** Additional classes applied to the text input group main container */
|
|
6
6
|
className?: string;
|
|
7
7
|
/** Icon to be shown on the left side of the text input group main container */
|
|
8
8
|
icon?: React.ReactNode;
|
|
9
|
+
/** Type that the input accepts. */
|
|
10
|
+
type?: 'text' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'time' | 'url';
|
|
9
11
|
/** Callback for when there is a change in the input field*/
|
|
10
|
-
onChange?: () => void;
|
|
12
|
+
onChange?: (value: string, event: React.FormEvent<HTMLInputElement>) => void;
|
|
13
|
+
/** Callback for when the input field is focused*/
|
|
14
|
+
onFocus?: (event?: any) => void;
|
|
15
|
+
/** Callback for when focus is lost on the input field*/
|
|
16
|
+
onBlur?: (event?: any) => void;
|
|
11
17
|
/** Accessibility label for the input */
|
|
12
18
|
'aria-label'?: string;
|
|
13
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroupMain.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInputGroupMain.d.ts","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAChG,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,mCAAmC;IACnC,IAAI,CAAC,EACD,MAAM,GACN,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,CAAC;IACV,4DAA4D;IAC5D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAC7E,kDAAkD;IAClD,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,wDAAwD;IACxD,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,iBAAiB,CAAC,uBAAuB,CAoC/E,CAAC"}
|
|
@@ -5,15 +5,19 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const text_input_group_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/TextInputGroup/text-input-group"));
|
|
7
7
|
const react_styles_1 = require("@patternfly/react-styles");
|
|
8
|
+
const TextInputGroup_1 = require("./TextInputGroup");
|
|
8
9
|
const TextInputGroupMain = (_a) => {
|
|
9
|
-
var { children, className, icon, onChange, 'aria-label': ariaLabel, value: inputValue } = _a, props = tslib_1.__rest(_a, ["children", "className", "icon", "onChange", 'aria-label', "value"]);
|
|
10
|
+
var { children, className, icon, type = 'text', onChange = () => undefined, onFocus, onBlur, 'aria-label': ariaLabel = 'Type to filter', value: inputValue } = _a, props = tslib_1.__rest(_a, ["children", "className", "icon", "type", "onChange", "onFocus", "onBlur", 'aria-label', "value"]);
|
|
11
|
+
const { isDisabled } = React.useContext(TextInputGroup_1.TextInputGroupContext);
|
|
12
|
+
const handleChange = (event) => {
|
|
13
|
+
onChange(event.currentTarget.value, event);
|
|
14
|
+
};
|
|
10
15
|
return (React.createElement("div", Object.assign({ className: react_styles_1.css(text_input_group_1.default.textInputGroupMain, icon && text_input_group_1.default.modifiers.icon, className) }, props),
|
|
11
16
|
children,
|
|
12
17
|
React.createElement("span", { className: react_styles_1.css(text_input_group_1.default.textInputGroupText) },
|
|
13
18
|
icon && React.createElement("span", { className: react_styles_1.css(text_input_group_1.default.textInputGroupIcon) }, icon),
|
|
14
|
-
React.createElement("input", { type:
|
|
19
|
+
React.createElement("input", { type: type, className: react_styles_1.css(text_input_group_1.default.textInputGroupTextInput), "aria-label": ariaLabel, disabled: isDisabled, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, value: inputValue }))));
|
|
15
20
|
};
|
|
16
21
|
exports.TextInputGroupMain = TextInputGroupMain;
|
|
17
|
-
exports.TextInputGroupMain.defaultProps = { 'aria-label': 'Type to filter' };
|
|
18
22
|
exports.TextInputGroupMain.displayName = 'TextInputGroupMain';
|
|
19
23
|
//# sourceMappingURL=TextInputGroupMain.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputGroupMain.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uIAA6F;AAC7F,2DAA+C;
|
|
1
|
+
{"version":3,"file":"TextInputGroupMain.js","sourceRoot":"","sources":["../../../../src/components/TextInputGroup/TextInputGroupMain.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uIAA6F;AAC7F,2DAA+C;AAC/C,qDAAyD;AAgClD,MAAM,kBAAkB,GAAqD,CAAC,EAW3D,EAAE,EAAE;QAXuD,EACnF,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,IAAI,GAAG,MAAM,EACb,QAAQ,GAAG,GAAQ,EAAE,CAAC,SAAS,EAC/B,OAAO,EACP,MAAM,EACN,YAAY,EAAE,SAAS,GAAG,gBAAgB,EAC1C,KAAK,EAAE,UAAU,OAEO,EADrB,KAAK,sBAV2E,iGAWpF,CADS;IAER,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,sCAAqB,CAAC,CAAC;IAE/D,MAAM,YAAY,GAAG,CAAC,KAAwC,EAAE,EAAE;QAChE,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC,CAAC;IAEF,OAAO,CACL,2CAAK,SAAS,EAAE,kBAAG,CAAC,0BAAM,CAAC,kBAAkB,EAAE,IAAI,IAAI,0BAAM,CAAC,SAAS,CAAC,IAAI,EAAE,SAAS,CAAC,IAAM,KAAK;QAChG,QAAQ;QACT,8BAAM,SAAS,EAAE,kBAAG,CAAC,0BAAM,CAAC,kBAAkB,CAAC;YAC5C,IAAI,IAAI,8BAAM,SAAS,EAAE,kBAAG,CAAC,0BAAM,CAAC,kBAAkB,CAAC,IAAG,IAAI,CAAQ;YACvE,+BACE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,kBAAG,CAAC,0BAAM,CAAC,uBAAuB,CAAC,gBAClC,SAAS,EACrB,QAAQ,EAAE,UAAU,EACpB,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,GACjB,CACG,CACH,CACP,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,kBAAkB,sBAoC7B;AAEF,0BAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC"}
|
package/dist/umd/react-core.css
CHANGED
|
@@ -15791,83 +15791,6 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
15791
15791
|
box-shadow: var(--pf-c-select__menu-footer--BoxShadow);
|
|
15792
15792
|
}
|
|
15793
15793
|
|
|
15794
|
-
.pf-c-simple-list {
|
|
15795
|
-
--pf-c-simple-list__item-link--PaddingTop: var(--pf-global--spacer--xs);
|
|
15796
|
-
--pf-c-simple-list__item-link--PaddingRight: var(--pf-global--spacer--md);
|
|
15797
|
-
--pf-c-simple-list__item-link--PaddingBottom: var(--pf-global--spacer--xs);
|
|
15798
|
-
--pf-c-simple-list__item-link--PaddingLeft: var(--pf-global--spacer--md);
|
|
15799
|
-
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
15800
|
-
--pf-c-simple-list__item-link--Color: var(--pf-global--Color--100);
|
|
15801
|
-
--pf-c-simple-list__item-link--FontSize: var(--pf-global--FontSize--sm);
|
|
15802
|
-
--pf-c-simple-list__item-link--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15803
|
-
--pf-c-simple-list__item-link--m-current--Color: var(--pf-global--link--Color);
|
|
15804
|
-
--pf-c-simple-list__item-link--m-current--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
15805
|
-
--pf-c-simple-list__item-link--m-current--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15806
|
-
--pf-c-simple-list__item-link--hover--Color: var(--pf-global--Color--100);
|
|
15807
|
-
--pf-c-simple-list__item-link--hover--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
15808
|
-
--pf-c-simple-list__item-link--focus--Color: var(--pf-global--Color--100);
|
|
15809
|
-
--pf-c-simple-list__item-link--focus--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
15810
|
-
--pf-c-simple-list__item-link--focus--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15811
|
-
--pf-c-simple-list__item-link--active--Color: var(--pf-global--Color--100);
|
|
15812
|
-
--pf-c-simple-list__item-link--active--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
15813
|
-
--pf-c-simple-list__item-link--active--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15814
|
-
--pf-c-simple-list__title--PaddingTop: var(--pf-global--spacer--sm);
|
|
15815
|
-
--pf-c-simple-list__title--PaddingRight: var(--pf-global--spacer--md);
|
|
15816
|
-
--pf-c-simple-list__title--PaddingBottom: var(--pf-global--spacer--sm);
|
|
15817
|
-
--pf-c-simple-list__title--PaddingLeft: var(--pf-global--spacer--md);
|
|
15818
|
-
--pf-c-simple-list__title--FontSize: var(--pf-global--FontSize--sm);
|
|
15819
|
-
--pf-c-simple-list__title--Color: var(--pf-global--Color--dark-200);
|
|
15820
|
-
--pf-c-simple-list__title--FontWeight: var(--pf-global--FontWeight--semi-bold);
|
|
15821
|
-
--pf-c-simple-list__section--section--MarginTop: var(--pf-global--spacer--sm);
|
|
15822
|
-
}
|
|
15823
|
-
|
|
15824
|
-
.pf-c-simple-list__item-link {
|
|
15825
|
-
display: block;
|
|
15826
|
-
width: 100%;
|
|
15827
|
-
padding: var(--pf-c-simple-list__item-link--PaddingTop) var(--pf-c-simple-list__item-link--PaddingRight) var(--pf-c-simple-list__item-link--PaddingBottom) var(--pf-c-simple-list__item-link--PaddingLeft);
|
|
15828
|
-
font-size: var(--pf-c-simple-list__item-link--FontSize);
|
|
15829
|
-
font-weight: var(--pf-c-simple-list__item-link--FontWeight);
|
|
15830
|
-
color: var(--pf-c-simple-list__item-link--Color);
|
|
15831
|
-
text-align: left;
|
|
15832
|
-
background-color: var(--pf-c-simple-list__item-link--BackgroundColor);
|
|
15833
|
-
border: none;
|
|
15834
|
-
}
|
|
15835
|
-
|
|
15836
|
-
.pf-c-simple-list__item-link:hover {
|
|
15837
|
-
text-decoration: none;
|
|
15838
|
-
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--hover--BackgroundColor);
|
|
15839
|
-
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--hover--Color);
|
|
15840
|
-
}
|
|
15841
|
-
|
|
15842
|
-
.pf-c-simple-list__item-link:focus {
|
|
15843
|
-
--pf-c-simple-list__item-link--FontWeight: var(--pf-c-simple-list__item-link--focus--FontWeight);
|
|
15844
|
-
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--focus--BackgroundColor);
|
|
15845
|
-
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--focus--Color);
|
|
15846
|
-
}
|
|
15847
|
-
|
|
15848
|
-
.pf-c-simple-list__item-link:active {
|
|
15849
|
-
--pf-c-simple-list__item-link--FontWeight: var(--pf-c-simple-list__item-link--active--FontWeight);
|
|
15850
|
-
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--active--BackgroundColor);
|
|
15851
|
-
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--active--Color);
|
|
15852
|
-
}
|
|
15853
|
-
|
|
15854
|
-
.pf-c-simple-list__item-link.pf-m-current {
|
|
15855
|
-
--pf-c-simple-list__item-link--FontWeight: var(--pf-c-simple-list__item-link--m-current--FontWeight);
|
|
15856
|
-
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--m-current--BackgroundColor);
|
|
15857
|
-
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--m-current--Color);
|
|
15858
|
-
}
|
|
15859
|
-
|
|
15860
|
-
.pf-c-simple-list__title {
|
|
15861
|
-
padding: var(--pf-c-simple-list__title--PaddingTop) var(--pf-c-simple-list__title--PaddingRight) var(--pf-c-simple-list__title--PaddingBottom) var(--pf-c-simple-list__title--PaddingLeft);
|
|
15862
|
-
font-size: var(--pf-c-simple-list__title--FontSize);
|
|
15863
|
-
font-weight: var(--pf-c-simple-list__title--FontWeight);
|
|
15864
|
-
color: var(--pf-c-simple-list__title--Color);
|
|
15865
|
-
}
|
|
15866
|
-
|
|
15867
|
-
.pf-c-simple-list__section + .pf-c-simple-list__section {
|
|
15868
|
-
margin-top: var(--pf-c-simple-list__section--section--MarginTop);
|
|
15869
|
-
}
|
|
15870
|
-
|
|
15871
15794
|
.pf-c-skeleton {
|
|
15872
15795
|
--pf-c-skeleton--BackgroundColor: var(--pf-global--palette--black-150);
|
|
15873
15796
|
--pf-c-skeleton--Width: auto;
|
|
@@ -16057,6 +15980,83 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
16057
15980
|
transform: translateX(100%);
|
|
16058
15981
|
}
|
|
16059
15982
|
}
|
|
15983
|
+
.pf-c-simple-list {
|
|
15984
|
+
--pf-c-simple-list__item-link--PaddingTop: var(--pf-global--spacer--xs);
|
|
15985
|
+
--pf-c-simple-list__item-link--PaddingRight: var(--pf-global--spacer--md);
|
|
15986
|
+
--pf-c-simple-list__item-link--PaddingBottom: var(--pf-global--spacer--xs);
|
|
15987
|
+
--pf-c-simple-list__item-link--PaddingLeft: var(--pf-global--spacer--md);
|
|
15988
|
+
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-global--BackgroundColor--100);
|
|
15989
|
+
--pf-c-simple-list__item-link--Color: var(--pf-global--Color--100);
|
|
15990
|
+
--pf-c-simple-list__item-link--FontSize: var(--pf-global--FontSize--sm);
|
|
15991
|
+
--pf-c-simple-list__item-link--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15992
|
+
--pf-c-simple-list__item-link--m-current--Color: var(--pf-global--link--Color);
|
|
15993
|
+
--pf-c-simple-list__item-link--m-current--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
15994
|
+
--pf-c-simple-list__item-link--m-current--FontWeight: var(--pf-global--FontWeight--normal);
|
|
15995
|
+
--pf-c-simple-list__item-link--hover--Color: var(--pf-global--Color--100);
|
|
15996
|
+
--pf-c-simple-list__item-link--hover--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
15997
|
+
--pf-c-simple-list__item-link--focus--Color: var(--pf-global--Color--100);
|
|
15998
|
+
--pf-c-simple-list__item-link--focus--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
15999
|
+
--pf-c-simple-list__item-link--focus--FontWeight: var(--pf-global--FontWeight--normal);
|
|
16000
|
+
--pf-c-simple-list__item-link--active--Color: var(--pf-global--Color--100);
|
|
16001
|
+
--pf-c-simple-list__item-link--active--BackgroundColor: var(--pf-global--BackgroundColor--200);
|
|
16002
|
+
--pf-c-simple-list__item-link--active--FontWeight: var(--pf-global--FontWeight--normal);
|
|
16003
|
+
--pf-c-simple-list__title--PaddingTop: var(--pf-global--spacer--sm);
|
|
16004
|
+
--pf-c-simple-list__title--PaddingRight: var(--pf-global--spacer--md);
|
|
16005
|
+
--pf-c-simple-list__title--PaddingBottom: var(--pf-global--spacer--sm);
|
|
16006
|
+
--pf-c-simple-list__title--PaddingLeft: var(--pf-global--spacer--md);
|
|
16007
|
+
--pf-c-simple-list__title--FontSize: var(--pf-global--FontSize--sm);
|
|
16008
|
+
--pf-c-simple-list__title--Color: var(--pf-global--Color--dark-200);
|
|
16009
|
+
--pf-c-simple-list__title--FontWeight: var(--pf-global--FontWeight--semi-bold);
|
|
16010
|
+
--pf-c-simple-list__section--section--MarginTop: var(--pf-global--spacer--sm);
|
|
16011
|
+
}
|
|
16012
|
+
|
|
16013
|
+
.pf-c-simple-list__item-link {
|
|
16014
|
+
display: block;
|
|
16015
|
+
width: 100%;
|
|
16016
|
+
padding: var(--pf-c-simple-list__item-link--PaddingTop) var(--pf-c-simple-list__item-link--PaddingRight) var(--pf-c-simple-list__item-link--PaddingBottom) var(--pf-c-simple-list__item-link--PaddingLeft);
|
|
16017
|
+
font-size: var(--pf-c-simple-list__item-link--FontSize);
|
|
16018
|
+
font-weight: var(--pf-c-simple-list__item-link--FontWeight);
|
|
16019
|
+
color: var(--pf-c-simple-list__item-link--Color);
|
|
16020
|
+
text-align: left;
|
|
16021
|
+
background-color: var(--pf-c-simple-list__item-link--BackgroundColor);
|
|
16022
|
+
border: none;
|
|
16023
|
+
}
|
|
16024
|
+
|
|
16025
|
+
.pf-c-simple-list__item-link:hover {
|
|
16026
|
+
text-decoration: none;
|
|
16027
|
+
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--hover--BackgroundColor);
|
|
16028
|
+
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--hover--Color);
|
|
16029
|
+
}
|
|
16030
|
+
|
|
16031
|
+
.pf-c-simple-list__item-link:focus {
|
|
16032
|
+
--pf-c-simple-list__item-link--FontWeight: var(--pf-c-simple-list__item-link--focus--FontWeight);
|
|
16033
|
+
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--focus--BackgroundColor);
|
|
16034
|
+
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--focus--Color);
|
|
16035
|
+
}
|
|
16036
|
+
|
|
16037
|
+
.pf-c-simple-list__item-link:active {
|
|
16038
|
+
--pf-c-simple-list__item-link--FontWeight: var(--pf-c-simple-list__item-link--active--FontWeight);
|
|
16039
|
+
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--active--BackgroundColor);
|
|
16040
|
+
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--active--Color);
|
|
16041
|
+
}
|
|
16042
|
+
|
|
16043
|
+
.pf-c-simple-list__item-link.pf-m-current {
|
|
16044
|
+
--pf-c-simple-list__item-link--FontWeight: var(--pf-c-simple-list__item-link--m-current--FontWeight);
|
|
16045
|
+
--pf-c-simple-list__item-link--BackgroundColor: var(--pf-c-simple-list__item-link--m-current--BackgroundColor);
|
|
16046
|
+
--pf-c-simple-list__item-link--Color: var(--pf-c-simple-list__item-link--m-current--Color);
|
|
16047
|
+
}
|
|
16048
|
+
|
|
16049
|
+
.pf-c-simple-list__title {
|
|
16050
|
+
padding: var(--pf-c-simple-list__title--PaddingTop) var(--pf-c-simple-list__title--PaddingRight) var(--pf-c-simple-list__title--PaddingBottom) var(--pf-c-simple-list__title--PaddingLeft);
|
|
16051
|
+
font-size: var(--pf-c-simple-list__title--FontSize);
|
|
16052
|
+
font-weight: var(--pf-c-simple-list__title--FontWeight);
|
|
16053
|
+
color: var(--pf-c-simple-list__title--Color);
|
|
16054
|
+
}
|
|
16055
|
+
|
|
16056
|
+
.pf-c-simple-list__section + .pf-c-simple-list__section {
|
|
16057
|
+
margin-top: var(--pf-c-simple-list__section--section--MarginTop);
|
|
16058
|
+
}
|
|
16059
|
+
|
|
16060
16060
|
.pf-c-skip-to-content {
|
|
16061
16061
|
--pf-c-skip-to-content--Top: var(--pf-global--spacer--md);
|
|
16062
16062
|
--pf-c-skip-to-content--ZIndex: var(--pf-global--ZIndex--2xl);
|
package/dist/umd/react-core.js
CHANGED
|
@@ -19823,21 +19823,28 @@
|
|
|
19823
19823
|
"textInputGroupUtilities": "pf-c-text-input-group__utilities"
|
|
19824
19824
|
};
|
|
19825
19825
|
|
|
19826
|
+
const TextInputGroupContext = React__namespace.createContext({
|
|
19827
|
+
isDisabled: false
|
|
19828
|
+
});
|
|
19826
19829
|
const TextInputGroup = (_a) => {
|
|
19827
|
-
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
19828
|
-
return (React__namespace.createElement(
|
|
19830
|
+
var { children, className, isDisabled } = _a, props = __rest$1(_a, ["children", "className", "isDisabled"]);
|
|
19831
|
+
return (React__namespace.createElement(TextInputGroupContext.Provider, { value: { isDisabled } },
|
|
19832
|
+
React__namespace.createElement("div", Object.assign({ className: css(_default$6.textInputGroup, isDisabled && _default$6.modifiers.disabled, className) }, props), children)));
|
|
19829
19833
|
};
|
|
19830
19834
|
TextInputGroup.displayName = 'TextInputGroup';
|
|
19831
19835
|
|
|
19832
19836
|
const TextInputGroupMain = (_a) => {
|
|
19833
|
-
var { children, className, icon, onChange, 'aria-label': ariaLabel, value: inputValue } = _a, props = __rest$1(_a, ["children", "className", "icon", "onChange", 'aria-label', "value"]);
|
|
19837
|
+
var { children, className, icon, type = 'text', onChange = () => undefined, onFocus, onBlur, 'aria-label': ariaLabel = 'Type to filter', value: inputValue } = _a, props = __rest$1(_a, ["children", "className", "icon", "type", "onChange", "onFocus", "onBlur", 'aria-label', "value"]);
|
|
19838
|
+
const { isDisabled } = React__namespace.useContext(TextInputGroupContext);
|
|
19839
|
+
const handleChange = (event) => {
|
|
19840
|
+
onChange(event.currentTarget.value, event);
|
|
19841
|
+
};
|
|
19834
19842
|
return (React__namespace.createElement("div", Object.assign({ className: css(_default$6.textInputGroupMain, icon && _default$6.modifiers.icon, className) }, props),
|
|
19835
19843
|
children,
|
|
19836
19844
|
React__namespace.createElement("span", { className: css(_default$6.textInputGroupText) },
|
|
19837
19845
|
icon && React__namespace.createElement("span", { className: css(_default$6.textInputGroupIcon) }, icon),
|
|
19838
|
-
React__namespace.createElement("input", { type:
|
|
19846
|
+
React__namespace.createElement("input", { type: type, className: css(_default$6.textInputGroupTextInput), "aria-label": ariaLabel, disabled: isDisabled, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, value: inputValue }))));
|
|
19839
19847
|
};
|
|
19840
|
-
TextInputGroupMain.defaultProps = { 'aria-label': 'Type to filter' };
|
|
19841
19848
|
TextInputGroupMain.displayName = 'TextInputGroupMain';
|
|
19842
19849
|
|
|
19843
19850
|
const TextInputGroupUtilities = (_a) => {
|
|
@@ -20998,6 +21005,7 @@
|
|
|
20998
21005
|
exports.TextInput = TextInput;
|
|
20999
21006
|
exports.TextInputBase = TextInputBase;
|
|
21000
21007
|
exports.TextInputGroup = TextInputGroup;
|
|
21008
|
+
exports.TextInputGroupContext = TextInputGroupContext;
|
|
21001
21009
|
exports.TextInputGroupMain = TextInputGroupMain;
|
|
21002
21010
|
exports.TextInputGroupUtilities = TextInputGroupUtilities;
|
|
21003
21011
|
exports.TextList = TextList;
|