@sebgroup/green-react 1.4.0 → 1.5.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/index.js +19 -6
- package/package.json +2 -2
- package/src/lib/accordion/accordion.d.ts +1 -0
- package/src/lib/datepicker/datepicker.d.ts +1 -0
- package/src/lib/dropdown/dropdown.d.ts +1 -0
- package/src/lib/form/input/input.d.ts +1 -1
- package/src/lib/icons/bankId.d.ts +1 -0
- package/src/lib/icons/check.d.ts +1 -0
- package/src/lib/icons/chevronDown.d.ts +1 -0
- package/src/lib/icons/infoCircle.d.ts +1 -0
- package/src/lib/icons/square-exclamation.d.ts +1 -0
- package/src/lib/icons/square-info.d.ts +1 -0
- package/src/lib/icons/times.d.ts +1 -0
- package/src/lib/slider/slider.d.ts +2 -1
- package/src/lib/stepper/stepper.d.ts +1 -0
- package/src/types/props/index.d.ts +1 -0
package/index.js
CHANGED
|
@@ -3092,6 +3092,20 @@ const OptionGroup = ({
|
|
|
3092
3092
|
}));
|
|
3093
3093
|
};
|
|
3094
3094
|
|
|
3095
|
+
const InputWrapper = ({
|
|
3096
|
+
children,
|
|
3097
|
+
unitLabel
|
|
3098
|
+
}) => jsx(Fragment, {
|
|
3099
|
+
children: unitLabel ? jsxs("div", Object.assign({
|
|
3100
|
+
className: "group group-border"
|
|
3101
|
+
}, {
|
|
3102
|
+
children: [children, jsx("span", Object.assign({
|
|
3103
|
+
className: "form-text"
|
|
3104
|
+
}, {
|
|
3105
|
+
children: unitLabel
|
|
3106
|
+
}))]
|
|
3107
|
+
})) : children
|
|
3108
|
+
});
|
|
3095
3109
|
function Slider({
|
|
3096
3110
|
name = `${randomId()}-slider`,
|
|
3097
3111
|
defaultValue,
|
|
@@ -3102,6 +3116,7 @@ function Slider({
|
|
|
3102
3116
|
instruction,
|
|
3103
3117
|
errorMessage,
|
|
3104
3118
|
hasTextbox = false,
|
|
3119
|
+
unitLabel,
|
|
3105
3120
|
disabled = false,
|
|
3106
3121
|
onChange
|
|
3107
3122
|
}) {
|
|
@@ -3134,10 +3149,10 @@ function Slider({
|
|
|
3134
3149
|
})), instruction && jsx("p", {
|
|
3135
3150
|
children: instruction
|
|
3136
3151
|
})]
|
|
3137
|
-
}), hasTextbox &&
|
|
3138
|
-
|
|
3152
|
+
}), hasTextbox && jsx(InputWrapper, Object.assign({
|
|
3153
|
+
unitLabel: unitLabel
|
|
3139
3154
|
}, {
|
|
3140
|
-
children:
|
|
3155
|
+
children: jsx("input", {
|
|
3141
3156
|
type: "number",
|
|
3142
3157
|
value: sliderValue,
|
|
3143
3158
|
id: `${name}-textbox`,
|
|
@@ -3145,9 +3160,7 @@ function Slider({
|
|
|
3145
3160
|
className: errorMessage ? 'is-invalid' : '',
|
|
3146
3161
|
disabled: disabled,
|
|
3147
3162
|
onChange: handleChange
|
|
3148
|
-
})
|
|
3149
|
-
className: "form-info"
|
|
3150
|
-
})]
|
|
3163
|
+
})
|
|
3151
3164
|
}))]
|
|
3152
3165
|
})), jsx("input", {
|
|
3153
3166
|
type: "range",
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sebgroup/green-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"react": "^17 || ^18",
|
|
6
6
|
"react-dom": "^17 || ^18"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@sebgroup/chlorophyll": "^1.
|
|
9
|
+
"@sebgroup/chlorophyll": "^1.8.0",
|
|
10
10
|
"@sebgroup/extract": "^1.3.1",
|
|
11
11
|
"classnames": "^2.3.2"
|
|
12
12
|
},
|
|
@@ -7,4 +7,4 @@ export declare const TextInput: ({ label, info, testId, onChange, onChangeInput,
|
|
|
7
7
|
export declare const EmailInput: ({ label, info, onChange, onChangeInput, validator, testId, ...props }: TextInputProps) => JSX.Element;
|
|
8
8
|
export declare const NumberInput: ({ label, info, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, testId, ...props }: NumberInputProps) => JSX.Element;
|
|
9
9
|
export declare const Checkbox: ({ label, onChange, validator, testId, ...props }: CheckboxProps) => JSX.Element;
|
|
10
|
-
export declare const RadioButton: React.ForwardRefExoticComponent<
|
|
10
|
+
export declare const RadioButton: React.ForwardRefExoticComponent<Omit<RadioButtonProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
package/src/lib/icons/check.d.ts
CHANGED
package/src/lib/icons/times.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { SliderProps } from '../../types';
|
|
2
|
-
export declare function Slider({ name, defaultValue, min, max, step, label, instruction, errorMessage, hasTextbox, disabled, onChange, }: SliderProps): JSX.Element;
|
|
3
|
+
export declare function Slider({ name, defaultValue, min, max, step, label, instruction, errorMessage, hasTextbox, unitLabel, disabled, onChange, }: SliderProps): JSX.Element;
|
|
3
4
|
export default Slider;
|