@rhc-shared-components/form-select-component 0.0.3 → 0.1.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 +70 -0
- package/dist/FormSelectComponent.d.ts +1 -1
- package/dist/index.js +48 -106
- package/dist/index.modern.js +45 -79
- package/package.json +5 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [0.1.1](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.1.0...@rhc-shared-components/form-select-component@0.1.1) (2022-10-20)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @rhc-shared-components/form-select-component
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.1.0](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.4...@rhc-shared-components/form-select-component@0.1.0) (2022-10-20)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* adding order prop for vulnerability summaries severity ([24e0c7c](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/commit/24e0c7c992058f0c3e42e8c7ba6ad1bd98e70c4f))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [0.0.6](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.5...@rhc-shared-components/form-select-component@0.0.6) (2022-08-22)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @rhc-shared-components/form-select-component
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [0.0.5](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.4...@rhc-shared-components/form-select-component@0.0.5) (2022-08-22)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @rhc-shared-components/form-select-component
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [0.0.4](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.3...@rhc-shared-components/form-select-component@0.0.4) (2022-08-22)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* added ReactNode type to subLabel prop for formselect component ([060d955](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/commit/060d9557e708e8f1a722f158c6f07ff6416aed60))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
## [0.0.3](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.2...@rhc-shared-components/form-select-component@0.0.3) (2022-01-05)
|
|
53
|
+
|
|
54
|
+
**Note:** Version bump only for package @rhc-shared-components/form-select-component
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## [0.0.2](https://gitlab.cee.redhat.com/customer-platform/rhc-shared-components/compare/@rhc-shared-components/form-select-component@0.0.1...@rhc-shared-components/form-select-component@0.0.2) (2021-12-29)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @rhc-shared-components/form-select-component
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## 0.0.1 (2021-12-06)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @rhc-shared-components/form-select-component
|
package/dist/index.js
CHANGED
|
@@ -23,22 +23,6 @@ function _interopNamespace(e) {
|
|
|
23
23
|
|
|
24
24
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
25
25
|
|
|
26
|
-
function _inheritsLoose(subClass, superClass) {
|
|
27
|
-
subClass.prototype = Object.create(superClass.prototype);
|
|
28
|
-
subClass.prototype.constructor = subClass;
|
|
29
|
-
|
|
30
|
-
_setPrototypeOf(subClass, superClass);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function _setPrototypeOf(o, p) {
|
|
34
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
35
|
-
o.__proto__ = p;
|
|
36
|
-
return o;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return _setPrototypeOf(o, p);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
26
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
43
27
|
if (source == null) return {};
|
|
44
28
|
var target = {};
|
|
@@ -9553,110 +9537,68 @@ function __rest(s, e) {
|
|
|
9553
9537
|
}
|
|
9554
9538
|
|
|
9555
9539
|
var IconSize;
|
|
9556
|
-
|
|
9557
9540
|
(function (IconSize) {
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9541
|
+
IconSize["sm"] = "sm";
|
|
9542
|
+
IconSize["md"] = "md";
|
|
9543
|
+
IconSize["lg"] = "lg";
|
|
9544
|
+
IconSize["xl"] = "xl";
|
|
9562
9545
|
})(IconSize || (IconSize = {}));
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
return '3em';
|
|
9577
|
-
|
|
9578
|
-
default:
|
|
9579
|
-
return '1em';
|
|
9580
|
-
}
|
|
9546
|
+
const getSize = (size) => {
|
|
9547
|
+
switch (size) {
|
|
9548
|
+
case IconSize.sm:
|
|
9549
|
+
return '1em';
|
|
9550
|
+
case IconSize.md:
|
|
9551
|
+
return '1.5em';
|
|
9552
|
+
case IconSize.lg:
|
|
9553
|
+
return '2em';
|
|
9554
|
+
case IconSize.xl:
|
|
9555
|
+
return '3em';
|
|
9556
|
+
default:
|
|
9557
|
+
return '1em';
|
|
9558
|
+
}
|
|
9581
9559
|
};
|
|
9582
|
-
|
|
9560
|
+
let currentId = 0;
|
|
9583
9561
|
/**
|
|
9584
9562
|
* Factory to create Icon class components for consumers
|
|
9585
9563
|
*/
|
|
9586
|
-
|
|
9587
|
-
|
|
9588
|
-
|
|
9589
|
-
|
|
9590
|
-
|
|
9591
|
-
|
|
9592
|
-
|
|
9593
|
-
|
|
9594
|
-
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
_proto.render = function render() {
|
|
9613
|
-
var _a = this.props,
|
|
9614
|
-
size = _a.size,
|
|
9615
|
-
color = _a.color,
|
|
9616
|
-
title = _a.title,
|
|
9617
|
-
noVerticalAlign = _a.noVerticalAlign,
|
|
9618
|
-
props = __rest(_a, ["size", "color", "title", "noVerticalAlign"]);
|
|
9619
|
-
|
|
9620
|
-
var hasTitle = Boolean(title);
|
|
9621
|
-
var heightWidth = getSize(size);
|
|
9622
|
-
var baseAlign = -0.125 * Number.parseFloat(heightWidth);
|
|
9623
|
-
var style = noVerticalAlign ? null : {
|
|
9624
|
-
verticalAlign: baseAlign + "em"
|
|
9625
|
-
};
|
|
9626
|
-
var viewBox = [xOffset, yOffset, width, height].join(' ');
|
|
9627
|
-
return React__namespace.createElement("svg", Object.assign({
|
|
9628
|
-
style: style,
|
|
9629
|
-
fill: color,
|
|
9630
|
-
height: heightWidth,
|
|
9631
|
-
width: heightWidth,
|
|
9632
|
-
viewBox: viewBox,
|
|
9633
|
-
"aria-labelledby": hasTitle ? this.id : null,
|
|
9634
|
-
"aria-hidden": hasTitle ? null : true,
|
|
9635
|
-
role: "img"
|
|
9636
|
-
}, props), hasTitle && React__namespace.createElement("title", {
|
|
9637
|
-
id: this.id
|
|
9638
|
-
}, title), React__namespace.createElement("path", {
|
|
9639
|
-
d: svgPath
|
|
9640
|
-
}));
|
|
9641
|
-
};
|
|
9642
|
-
|
|
9643
|
-
return SVGIcon;
|
|
9644
|
-
}(React__namespace.Component), _a.displayName = name, _a.defaultProps = {
|
|
9645
|
-
color: 'currentColor',
|
|
9646
|
-
size: IconSize.sm,
|
|
9647
|
-
noVerticalAlign: false
|
|
9648
|
-
}, _a;
|
|
9564
|
+
function createIcon({ name, xOffset = 0, yOffset = 0, width, height, svgPath }) {
|
|
9565
|
+
var _a;
|
|
9566
|
+
return _a = class SVGIcon extends React__namespace.Component {
|
|
9567
|
+
constructor() {
|
|
9568
|
+
super(...arguments);
|
|
9569
|
+
this.id = `icon-title-${currentId++}`;
|
|
9570
|
+
}
|
|
9571
|
+
render() {
|
|
9572
|
+
const _a = this.props, { size, color, title, noVerticalAlign } = _a, props = __rest(_a, ["size", "color", "title", "noVerticalAlign"]);
|
|
9573
|
+
const hasTitle = Boolean(title);
|
|
9574
|
+
const heightWidth = getSize(size);
|
|
9575
|
+
const baseAlign = -0.125 * Number.parseFloat(heightWidth);
|
|
9576
|
+
const style = noVerticalAlign ? null : { verticalAlign: `${baseAlign}em` };
|
|
9577
|
+
const viewBox = [xOffset, yOffset, width, height].join(' ');
|
|
9578
|
+
return (React__namespace.createElement("svg", Object.assign({ style: style, fill: color, height: heightWidth, width: heightWidth, viewBox: viewBox, "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
|
|
9579
|
+
hasTitle && React__namespace.createElement("title", { id: this.id }, title),
|
|
9580
|
+
React__namespace.createElement("path", { d: svgPath })));
|
|
9581
|
+
}
|
|
9582
|
+
},
|
|
9583
|
+
_a.displayName = name,
|
|
9584
|
+
_a.defaultProps = {
|
|
9585
|
+
color: 'currentColor',
|
|
9586
|
+
size: IconSize.sm,
|
|
9587
|
+
noVerticalAlign: false
|
|
9588
|
+
},
|
|
9589
|
+
_a;
|
|
9649
9590
|
}
|
|
9650
9591
|
|
|
9651
|
-
|
|
9592
|
+
const InfoCircleIconConfig = {
|
|
9652
9593
|
name: 'InfoCircleIcon',
|
|
9653
9594
|
height: 512,
|
|
9654
9595
|
width: 512,
|
|
9655
9596
|
svgPath: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z',
|
|
9656
9597
|
yOffset: 0,
|
|
9657
|
-
xOffset: 0
|
|
9598
|
+
xOffset: 0,
|
|
9658
9599
|
};
|
|
9659
|
-
|
|
9600
|
+
|
|
9601
|
+
const InfoCircleIcon = createIcon(InfoCircleIconConfig);
|
|
9660
9602
|
|
|
9661
9603
|
var _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "subLabel", "subInfo"];
|
|
9662
9604
|
|
package/dist/index.modern.js
CHANGED
|
@@ -9515,91 +9515,56 @@ function __rest(s, e) {
|
|
|
9515
9515
|
}
|
|
9516
9516
|
|
|
9517
9517
|
var IconSize;
|
|
9518
|
-
|
|
9519
9518
|
(function (IconSize) {
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9519
|
+
IconSize["sm"] = "sm";
|
|
9520
|
+
IconSize["md"] = "md";
|
|
9521
|
+
IconSize["lg"] = "lg";
|
|
9522
|
+
IconSize["xl"] = "xl";
|
|
9524
9523
|
})(IconSize || (IconSize = {}));
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
return '3em';
|
|
9539
|
-
|
|
9540
|
-
default:
|
|
9541
|
-
return '1em';
|
|
9542
|
-
}
|
|
9524
|
+
const getSize = (size) => {
|
|
9525
|
+
switch (size) {
|
|
9526
|
+
case IconSize.sm:
|
|
9527
|
+
return '1em';
|
|
9528
|
+
case IconSize.md:
|
|
9529
|
+
return '1.5em';
|
|
9530
|
+
case IconSize.lg:
|
|
9531
|
+
return '2em';
|
|
9532
|
+
case IconSize.xl:
|
|
9533
|
+
return '3em';
|
|
9534
|
+
default:
|
|
9535
|
+
return '1em';
|
|
9536
|
+
}
|
|
9543
9537
|
};
|
|
9544
9538
|
let currentId = 0;
|
|
9545
9539
|
/**
|
|
9546
9540
|
* Factory to create Icon class components for consumers
|
|
9547
9541
|
*/
|
|
9548
|
-
|
|
9549
|
-
|
|
9550
|
-
|
|
9551
|
-
|
|
9552
|
-
|
|
9553
|
-
|
|
9554
|
-
|
|
9555
|
-
|
|
9556
|
-
})
|
|
9557
|
-
|
|
9558
|
-
|
|
9559
|
-
|
|
9560
|
-
|
|
9561
|
-
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
const hasTitle = Boolean(title);
|
|
9576
|
-
const heightWidth = getSize(size);
|
|
9577
|
-
const baseAlign = -0.125 * Number.parseFloat(heightWidth);
|
|
9578
|
-
const style = noVerticalAlign ? null : {
|
|
9579
|
-
verticalAlign: `${baseAlign}em`
|
|
9580
|
-
};
|
|
9581
|
-
const viewBox = [xOffset, yOffset, width, height].join(' ');
|
|
9582
|
-
return React.createElement("svg", Object.assign({
|
|
9583
|
-
style: style,
|
|
9584
|
-
fill: color,
|
|
9585
|
-
height: heightWidth,
|
|
9586
|
-
width: heightWidth,
|
|
9587
|
-
viewBox: viewBox,
|
|
9588
|
-
"aria-labelledby": hasTitle ? this.id : null,
|
|
9589
|
-
"aria-hidden": hasTitle ? null : true,
|
|
9590
|
-
role: "img"
|
|
9591
|
-
}, props), hasTitle && React.createElement("title", {
|
|
9592
|
-
id: this.id
|
|
9593
|
-
}, title), React.createElement("path", {
|
|
9594
|
-
d: svgPath
|
|
9595
|
-
}));
|
|
9596
|
-
}
|
|
9597
|
-
|
|
9598
|
-
}, _a.displayName = name, _a.defaultProps = {
|
|
9599
|
-
color: 'currentColor',
|
|
9600
|
-
size: IconSize.sm,
|
|
9601
|
-
noVerticalAlign: false
|
|
9602
|
-
}, _a;
|
|
9542
|
+
function createIcon({ name, xOffset = 0, yOffset = 0, width, height, svgPath }) {
|
|
9543
|
+
var _a;
|
|
9544
|
+
return _a = class SVGIcon extends React.Component {
|
|
9545
|
+
constructor() {
|
|
9546
|
+
super(...arguments);
|
|
9547
|
+
this.id = `icon-title-${currentId++}`;
|
|
9548
|
+
}
|
|
9549
|
+
render() {
|
|
9550
|
+
const _a = this.props, { size, color, title, noVerticalAlign } = _a, props = __rest(_a, ["size", "color", "title", "noVerticalAlign"]);
|
|
9551
|
+
const hasTitle = Boolean(title);
|
|
9552
|
+
const heightWidth = getSize(size);
|
|
9553
|
+
const baseAlign = -0.125 * Number.parseFloat(heightWidth);
|
|
9554
|
+
const style = noVerticalAlign ? null : { verticalAlign: `${baseAlign}em` };
|
|
9555
|
+
const viewBox = [xOffset, yOffset, width, height].join(' ');
|
|
9556
|
+
return (React.createElement("svg", Object.assign({ style: style, fill: color, height: heightWidth, width: heightWidth, viewBox: viewBox, "aria-labelledby": hasTitle ? this.id : null, "aria-hidden": hasTitle ? null : true, role: "img" }, props),
|
|
9557
|
+
hasTitle && React.createElement("title", { id: this.id }, title),
|
|
9558
|
+
React.createElement("path", { d: svgPath })));
|
|
9559
|
+
}
|
|
9560
|
+
},
|
|
9561
|
+
_a.displayName = name,
|
|
9562
|
+
_a.defaultProps = {
|
|
9563
|
+
color: 'currentColor',
|
|
9564
|
+
size: IconSize.sm,
|
|
9565
|
+
noVerticalAlign: false
|
|
9566
|
+
},
|
|
9567
|
+
_a;
|
|
9603
9568
|
}
|
|
9604
9569
|
|
|
9605
9570
|
const InfoCircleIconConfig = {
|
|
@@ -9608,8 +9573,9 @@ const InfoCircleIconConfig = {
|
|
|
9608
9573
|
width: 512,
|
|
9609
9574
|
svgPath: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z',
|
|
9610
9575
|
yOffset: 0,
|
|
9611
|
-
xOffset: 0
|
|
9576
|
+
xOffset: 0,
|
|
9612
9577
|
};
|
|
9578
|
+
|
|
9613
9579
|
const InfoCircleIcon = createIcon(InfoCircleIconConfig);
|
|
9614
9580
|
|
|
9615
9581
|
const _excluded = ["label", "isRequired", "children", "selectOptions", "ariaLabel", "placeholder", "helperText", "subLabel", "subInfo"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhc-shared-components/form-select-component",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "project description",
|
|
5
5
|
"author": "redhatofficial",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"eslint-plugin-react": "^7.17.0",
|
|
53
53
|
"eslint-plugin-standard": "^4.0.1",
|
|
54
54
|
"microbundle": "^0.13.3",
|
|
55
|
-
"node-sass": "^4.0.0",
|
|
56
55
|
"npm-run-all": "^4.1.5",
|
|
57
56
|
"prettier": "^2.0.4",
|
|
58
57
|
"react": "^16.13.1",
|
|
59
58
|
"react-dom": "^16.13.1",
|
|
60
59
|
"react-scripts": "^3.4.1",
|
|
61
60
|
"rimraf": "^3.0.2",
|
|
61
|
+
"sass": "^1.57.1",
|
|
62
62
|
"typescript": "^3.7.5"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@patternfly/react-core": "^4.
|
|
66
|
-
"@rhc-shared-components/form-group-container": "^0.2
|
|
65
|
+
"@patternfly/react-core": "^4.276.6",
|
|
66
|
+
"@rhc-shared-components/form-group-container": "^0.3.2",
|
|
67
67
|
"formik": "^2.1.4",
|
|
68
68
|
"react": "^16.13.1",
|
|
69
69
|
"react-dom": "^16.13.1"
|
|
@@ -74,5 +74,5 @@
|
|
|
74
74
|
"publishConfig": {
|
|
75
75
|
"access": "public"
|
|
76
76
|
},
|
|
77
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "e3ffbb8f2793c6be4ea9d3d4ec916fc0d9faba5d"
|
|
78
78
|
}
|