@happeouikit/form-elements 2.3.6 → 2.3.9
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 +13 -0
- package/dist/Badge.js +1 -1
- package/dist/Checkbox.js +10 -9
- package/dist/DatePicker.js +21 -13
- package/dist/DateTimePicker.js +1 -1
- package/dist/Dropdown.js +7 -6
- package/dist/Input.js +11 -9
- package/dist/Link.js +7 -7
- package/dist/RadioButton.js +4 -3
- package/dist/Switch.js +24 -11
- package/dist/Tag.js +5 -4
- package/dist/Textarea.js +15 -7
- package/dist/Typeahead/TypeaheadDropdown.js +2 -2
- package/dist/Typeahead/TypeaheadList.js +2 -2
- package/dist/messages.js +4 -0
- package/dist/utils.js +1 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2.3.9
|
|
4
|
+
|
|
5
|
+
- [Added] DatePicker. Added accessible description for DatePicker input
|
|
6
|
+
## 2.3.8
|
|
7
|
+
|
|
8
|
+
- [Fixed] Switch a11y issues.
|
|
9
|
+
- [Fixed] Switch changed to button.
|
|
10
|
+
|
|
11
|
+
## 2.3.7
|
|
12
|
+
|
|
13
|
+
- [Added] Textarea. Added id autogeneration to the label and aria-labelledby to the textarea. Accessibility issue.
|
|
14
|
+
- [Added] Textarea. Added a label to the documentation textarea example.
|
|
15
|
+
|
|
3
16
|
## 2.3.6
|
|
4
17
|
|
|
5
18
|
- [Added] Added data-testids for datepicker components
|
package/dist/Badge.js
CHANGED
|
@@ -25,7 +25,7 @@ var Badge = function Badge(_ref) {
|
|
|
25
25
|
|
|
26
26
|
var Wrapper = styled.span.withConfig({
|
|
27
27
|
displayName: "Badge__Wrapper",
|
|
28
|
-
componentId: "xyqvne-0"
|
|
28
|
+
componentId: "sc-xyqvne-0"
|
|
29
29
|
})(["display:inline-block;background:", ";padding:4px 8px;border-radius:100px;"], function (_ref2) {
|
|
30
30
|
var color = _ref2.color,
|
|
31
31
|
isFilled = _ref2.isFilled;
|
package/dist/Checkbox.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["label", "background", "role"];
|
|
3
4
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
6
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
8
|
|
|
8
9
|
import { useRef } from "react";
|
|
9
10
|
import styled from "styled-components";
|
|
@@ -18,7 +19,7 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
18
19
|
var label = _ref.label,
|
|
19
20
|
background = _ref.background,
|
|
20
21
|
role = _ref.role,
|
|
21
|
-
rest = _objectWithoutProperties(_ref,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
22
23
|
|
|
23
24
|
var checkboxRef = useRef();
|
|
24
25
|
|
|
@@ -41,10 +42,10 @@ var Checkbox = function Checkbox(_ref) {
|
|
|
41
42
|
type: "checkbox",
|
|
42
43
|
tabIndex: "-1",
|
|
43
44
|
role: role
|
|
44
|
-
}, rest)), /*#__PURE__*/_jsx(StyledCheckbox, _objectSpread({
|
|
45
|
+
}, rest)), /*#__PURE__*/_jsx(StyledCheckbox, _objectSpread(_objectSpread({
|
|
45
46
|
onKeyDown: onKeyDown,
|
|
46
47
|
tabIndex: 0
|
|
47
|
-
}, rest, {
|
|
48
|
+
}, rest), {}, {
|
|
48
49
|
children: /*#__PURE__*/_jsx(Checkmark, {})
|
|
49
50
|
})), label && /*#__PURE__*/_jsx(Label, {
|
|
50
51
|
children: label
|
|
@@ -64,15 +65,15 @@ Checkbox.defaultProps = {
|
|
|
64
65
|
};
|
|
65
66
|
var StyledCheckbox = styled.span.withConfig({
|
|
66
67
|
displayName: "Checkbox__StyledCheckbox",
|
|
67
|
-
componentId: "tc08iy-0"
|
|
68
|
+
componentId: "sc-tc08iy-0"
|
|
68
69
|
})(["cursor:pointer;position:absolute;height:18px;width:18px;border-radius:3px;background-color:", ";border:2px solid ", ";box-sizing:content-box !important;&:focus-visible{outline:0;box-shadow:0 0 0 1px ", ";}"], white, gray06, active);
|
|
69
70
|
var Checkmark = styled(IconCheck).withConfig({
|
|
70
71
|
displayName: "Checkbox__Checkmark",
|
|
71
|
-
componentId: "tc08iy-1"
|
|
72
|
+
componentId: "sc-tc08iy-1"
|
|
72
73
|
})(["position:absolute;display:none;fill:", ";width:18px;height:16px;top:50%;transform:translateY(-50%);"], white);
|
|
73
74
|
var CheckboxWrapper = styled.label.withConfig({
|
|
74
75
|
displayName: "Checkbox__CheckboxWrapper",
|
|
75
|
-
componentId: "tc08iy-2"
|
|
76
|
+
componentId: "sc-tc08iy-2"
|
|
76
77
|
})(["display:flex;align-items:center;position:relative;cursor:", ";user-select:none;padding:4px 0;input{opacity:0;width:0;height:0;}input:checked + ", "{background:", ";border:", ";}input:checked + ", " > svg{display:block;}input:disabled + ", "{cursor:not-allowed;background:", ";border:2px solid ", ";}input:disabled ~ p{color:", ";}"], function (_ref2) {
|
|
77
78
|
var disabled = _ref2.disabled;
|
|
78
79
|
return disabled ? "not-allowed" : " pointer";
|
|
@@ -85,6 +86,6 @@ var CheckboxWrapper = styled.label.withConfig({
|
|
|
85
86
|
}, StyledCheckbox, StyledCheckbox, gray08, gray08, gray06);
|
|
86
87
|
var Label = styled(TextZeta).withConfig({
|
|
87
88
|
displayName: "Checkbox__Label",
|
|
88
|
-
componentId: "tc08iy-3"
|
|
89
|
+
componentId: "sc-tc08iy-3"
|
|
89
90
|
})(["display:inline-block;position:relative;margin-left:30px;color:", ";"], gray01);
|
|
90
91
|
export default Checkbox;
|
package/dist/DatePicker.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
var _excluded = ["label", "locale", "width", "date", "type", "fromMonth", "disabledDays", "value", "pickerRef", "inputProps", "dayPickerProps"],
|
|
5
|
+
_excluded2 = ["children"];
|
|
4
6
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
7
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
8
|
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
9
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
10
|
|
|
9
11
|
import React, { useState, useRef } from "react";
|
|
10
12
|
import PropTypes from "prop-types";
|
|
@@ -72,7 +74,7 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
72
74
|
inputProps = _ref$inputProps === void 0 ? {} : _ref$inputProps,
|
|
73
75
|
_ref$dayPickerProps = _ref.dayPickerProps,
|
|
74
76
|
dayPickerProps = _ref$dayPickerProps === void 0 ? {} : _ref$dayPickerProps,
|
|
75
|
-
props = _objectWithoutProperties(_ref,
|
|
77
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
76
78
|
|
|
77
79
|
// Stores the ID of the input field. If "id" isn't provided, it will be generated
|
|
78
80
|
// to improve accessibility by linking label to the input field.
|
|
@@ -86,8 +88,10 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
86
88
|
|
|
87
89
|
var from = date.from,
|
|
88
90
|
to = date.to;
|
|
91
|
+
var localeFormat = moment.localeData(locale).longDateFormat("L");
|
|
89
92
|
var formattedValue = formatValue(value || date[type], locale);
|
|
90
93
|
var isRangeMode = Boolean(from) && Boolean(to);
|
|
94
|
+
var intl = useIntl();
|
|
91
95
|
useDevWarningOnce(value && date[type], "[DatePicker] Both the `value` and `date` props have been used.\n The `date` prop will be ignored. To get rid of this warning, remove one of these props.");
|
|
92
96
|
|
|
93
97
|
var onChangeMonthYear = function onChangeMonthYear(_ref2) {
|
|
@@ -140,7 +144,11 @@ var DatePicker = function DatePicker(_ref) {
|
|
|
140
144
|
}, dayPickerProps),
|
|
141
145
|
ref: pickerRef,
|
|
142
146
|
inputProps: _objectSpread({
|
|
143
|
-
id: datePickerId
|
|
147
|
+
id: datePickerId,
|
|
148
|
+
"aria-label": label,
|
|
149
|
+
"aria-description": intl.formatMessage(messages.selectDateFormatDescription, {
|
|
150
|
+
localeFormat: localeFormat
|
|
151
|
+
})
|
|
144
152
|
}, inputProps)
|
|
145
153
|
}, props), date[type])]
|
|
146
154
|
});
|
|
@@ -301,7 +309,7 @@ var MonthPicker = function MonthPicker(_ref4) {
|
|
|
301
309
|
|
|
302
310
|
var DropdownYearOption = function DropdownYearOption(_ref6) {
|
|
303
311
|
var children = _ref6.children,
|
|
304
|
-
props = _objectWithoutProperties(_ref6,
|
|
312
|
+
props = _objectWithoutProperties(_ref6, _excluded2);
|
|
305
313
|
|
|
306
314
|
return components.Option && /*#__PURE__*/_jsx("div", {
|
|
307
315
|
onMouseDown: function onMouseDown(e) {
|
|
@@ -310,7 +318,7 @@ var MonthPicker = function MonthPicker(_ref4) {
|
|
|
310
318
|
role: "option",
|
|
311
319
|
"aria-selected": true,
|
|
312
320
|
tabIndex: "0",
|
|
313
|
-
children: /*#__PURE__*/_jsx(components.Option, _objectSpread({}, props, {
|
|
321
|
+
children: /*#__PURE__*/_jsx(components.Option, _objectSpread(_objectSpread({}, props), {}, {
|
|
314
322
|
children: children
|
|
315
323
|
}))
|
|
316
324
|
});
|
|
@@ -372,23 +380,23 @@ var MonthPicker = function MonthPicker(_ref4) {
|
|
|
372
380
|
|
|
373
381
|
var YearMonthSelectContainer = styled.div.withConfig({
|
|
374
382
|
displayName: "DatePicker__YearMonthSelectContainer",
|
|
375
|
-
componentId: "ce3xgi-0"
|
|
383
|
+
componentId: "sc-ce3xgi-0"
|
|
376
384
|
})(["position:absolute;z-index:1;top:0;bottom:0;left:0;right:0;background-color:", ";padding:", ";"], white, padding300);
|
|
377
385
|
var ActionList = styled.div.withConfig({
|
|
378
386
|
displayName: "DatePicker__ActionList",
|
|
379
|
-
componentId: "ce3xgi-1"
|
|
387
|
+
componentId: "sc-ce3xgi-1"
|
|
380
388
|
})(["display:flex;align-items:center;justify-content:flex-end;margin-top:", ";"], padding300);
|
|
381
389
|
var YearSelectContainer = styled.div.withConfig({
|
|
382
390
|
displayName: "DatePicker__YearSelectContainer",
|
|
383
|
-
componentId: "ce3xgi-2"
|
|
391
|
+
componentId: "sc-ce3xgi-2"
|
|
384
392
|
})(["align-items:center;justify-content:center;margin-bottom:", ";> div{width:100%;}"], margin200);
|
|
385
393
|
var MonthUl = styled.ul.withConfig({
|
|
386
394
|
displayName: "DatePicker__MonthUl",
|
|
387
|
-
componentId: "ce3xgi-3"
|
|
395
|
+
componentId: "sc-ce3xgi-3"
|
|
388
396
|
})(["display:grid;grid-template-columns:1fr 1fr 1fr 1fr;grid-gap:8px;width:100%;margin:", " 0 0 0;padding:0;list-style:none;li{width:100%;}"], padding300);
|
|
389
397
|
var MonthSelectButton2 = styled(ButtonSecondary).withConfig({
|
|
390
398
|
displayName: "DatePicker__MonthSelectButton2",
|
|
391
|
-
componentId: "ce3xgi-4"
|
|
399
|
+
componentId: "sc-ce3xgi-4"
|
|
392
400
|
})(["padding:8px;", ""], function (_ref7) {
|
|
393
401
|
var $isActive = _ref7.$isActive;
|
|
394
402
|
return $isActive && css(["background-color:", ";p{color:", ";font-weight:bold;}"], lighten(active, 0.9), active);
|
|
@@ -396,7 +404,7 @@ var MonthSelectButton2 = styled(ButtonSecondary).withConfig({
|
|
|
396
404
|
var borderRadius = "100px";
|
|
397
405
|
var Wrapper = styled.div.withConfig({
|
|
398
406
|
displayName: "DatePicker__Wrapper",
|
|
399
|
-
componentId: "ce3xgi-5"
|
|
407
|
+
componentId: "sc-ce3xgi-5"
|
|
400
408
|
})(["display:flex;flex-direction:column;width:", ";.DayPickerInput-Overlay{margin-top:8px;box-shadow:", ";border-radius:", ";}.DayPickerInput{.Range{.DayPicker-Day{min-width:21px;:focus{outline:none;}&.DayPicker-Day--selected:not(.DayPicker-Day--before):not(.DayPicker-Day--after){", "}&.DayPicker-Day--selected{background-color:", ";color:", ";}&.DayPicker-Day--before{position:relative;", "}&.DayPicker-Day--after{position:relative;", "}&.DayPicker-Day--today:not(.DayPicker-Day--selected){color:", ";}&.DayPicker-Day--outside{&.DayPicker-Day--before,&.DayPicker-Day--after{color:", ";}}}}input{font-family:", ";width:100%;border-radius:4px;border:solid 1px ", ";box-sizing:border-box;box-shadow:none;font-size:14px;padding:9px 12px 9px 38px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.43;letter-spacing:0.3px;color:", ";:hover{border-color:", ";}:active{outline:none;box-shadow:none;border-color:", ";}:focus{outline:none;border-color:", ";}}.DayPicker-wrapper{font-family:", ";color:", ";letter-spacing:-0.3px;font-size:14px;font-weight:normal;}.DayPicker-Week{", " .DayPicker-Day--selected{&:first-child{&.DayPicker-Day--after{::before{content:none;}}}&:last-child{&.DayPicker-Day--before{::before{content:none;}}}}}.DayPicker-Caption{display:none;}}"], function (_ref8) {
|
|
401
409
|
var width = _ref8.width;
|
|
402
410
|
return width || "200px";
|
|
@@ -415,6 +423,6 @@ var Wrapper = styled.div.withConfig({
|
|
|
415
423
|
});
|
|
416
424
|
var NavBarContainer = styled.div.withConfig({
|
|
417
425
|
displayName: "DatePicker__NavBarContainer",
|
|
418
|
-
componentId: "ce3xgi-6"
|
|
426
|
+
componentId: "sc-ce3xgi-6"
|
|
419
427
|
})(["display:flex;align-items:center;justify-content:space-between;padding:16px 14px 0px 14px;"]);
|
|
420
428
|
export default DatePicker;
|
package/dist/DateTimePicker.js
CHANGED
|
@@ -194,7 +194,7 @@ var DateTimePicker = function DateTimePicker(_ref) {
|
|
|
194
194
|
|
|
195
195
|
var Wrapper = styled.div.withConfig({
|
|
196
196
|
displayName: "DateTimePicker__Wrapper",
|
|
197
|
-
componentId: "sdui13-0"
|
|
197
|
+
componentId: "sc-sdui13-0"
|
|
198
198
|
})(["display:grid;grid-template-columns:180px 90px 90px;column-gap:8px;"]);
|
|
199
199
|
DateTimePicker.propTypes = {
|
|
200
200
|
onChange: PropTypes.func.isRequired,
|
package/dist/Dropdown.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["label"];
|
|
3
4
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
6
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
8
|
|
|
8
9
|
import React, { Fragment, forwardRef, useRef, useImperativeHandle } from "react";
|
|
9
10
|
import styled, { css } from "styled-components";
|
|
@@ -17,7 +18,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
17
18
|
|
|
18
19
|
var Dropdown = function Dropdown(_ref, ref) {
|
|
19
20
|
var label = _ref.label,
|
|
20
|
-
props = _objectWithoutProperties(_ref,
|
|
21
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
22
|
|
|
22
23
|
var dropdownRef = useRef();
|
|
23
24
|
useImperativeHandle(ref, function () {
|
|
@@ -46,7 +47,7 @@ var Dropdown = function Dropdown(_ref, ref) {
|
|
|
46
47
|
};
|
|
47
48
|
|
|
48
49
|
var DropdownIndicator = function DropdownIndicator(props) {
|
|
49
|
-
return components.DropdownIndicator && /*#__PURE__*/_jsx(components.DropdownIndicator, _objectSpread({}, props, {
|
|
50
|
+
return components.DropdownIndicator && /*#__PURE__*/_jsx(components.DropdownIndicator, _objectSpread(_objectSpread({}, props), {}, {
|
|
50
51
|
children: /*#__PURE__*/_jsx(IconArrowDropDown, {
|
|
51
52
|
width: "24px",
|
|
52
53
|
height: "24px",
|
|
@@ -61,10 +62,10 @@ export var dropdownStyles = css(["min-width:200px;width:auto;font-family:", ";le
|
|
|
61
62
|
});
|
|
62
63
|
var StyledDropdown = styled(Select).withConfig({
|
|
63
64
|
displayName: "Dropdown__StyledDropdown",
|
|
64
|
-
componentId: "pcee56-0"
|
|
65
|
+
componentId: "sc-pcee56-0"
|
|
65
66
|
})(["", ""], dropdownStyles);
|
|
66
67
|
var Label = styled.div.withConfig({
|
|
67
68
|
displayName: "Dropdown__Label",
|
|
68
|
-
componentId: "pcee56-1"
|
|
69
|
+
componentId: "sc-pcee56-1"
|
|
69
70
|
})(["margin:4px 0;"]);
|
|
70
71
|
export default /*#__PURE__*/forwardRef(Dropdown);
|
package/dist/Input.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["label", "icon", "iconProps", "state", "errorMessage"],
|
|
4
|
+
_excluded2 = ["label"];
|
|
3
5
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
7
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
9
|
|
|
8
10
|
import React from "react";
|
|
9
11
|
import styled from "styled-components";
|
|
@@ -29,7 +31,7 @@ export var Input = function Input(_ref) {
|
|
|
29
31
|
iconProps = _ref.iconProps,
|
|
30
32
|
state = _ref.state,
|
|
31
33
|
errorMessage = _ref.errorMessage,
|
|
32
|
-
rest = _objectWithoutProperties(_ref,
|
|
34
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
33
35
|
|
|
34
36
|
var id = React.useMemo(uuidv4, []);
|
|
35
37
|
var accessibility = label ? {
|
|
@@ -42,11 +44,11 @@ export var Input = function Input(_ref) {
|
|
|
42
44
|
color: gray01,
|
|
43
45
|
children: label
|
|
44
46
|
})
|
|
45
|
-
}), icon && new IconWrapper(icon, iconProps)(), /*#__PURE__*/_jsx(StyledInput, _objectSpread({
|
|
47
|
+
}), icon && new IconWrapper(icon, iconProps)(), /*#__PURE__*/_jsx(StyledInput, _objectSpread(_objectSpread({
|
|
46
48
|
title: label || "Styled input",
|
|
47
49
|
hasIcon: (icon || "").toString(),
|
|
48
50
|
state: state || "default"
|
|
49
|
-
}, accessibility,
|
|
51
|
+
}, accessibility), rest)), state === "error" && errorMessage && /*#__PURE__*/_jsx(ErrorMessage, {
|
|
50
52
|
color: alert,
|
|
51
53
|
children: errorMessage
|
|
52
54
|
})]
|
|
@@ -72,11 +74,11 @@ var IconWrapper = function IconWrapper(IconComponent, iconProps) {
|
|
|
72
74
|
fontSize: "18px"
|
|
73
75
|
};
|
|
74
76
|
|
|
75
|
-
var props = _objectSpread({}, iconDefaults,
|
|
77
|
+
var props = _objectSpread(_objectSpread({}, iconDefaults), iconProps);
|
|
76
78
|
|
|
77
79
|
return function () {
|
|
78
80
|
return /*#__PURE__*/_jsx(InputIconWrapper, {
|
|
79
|
-
children: /*#__PURE__*/_jsx(IconComponent, _objectSpread({}, props, {
|
|
81
|
+
children: /*#__PURE__*/_jsx(IconComponent, _objectSpread(_objectSpread({}, props), {}, {
|
|
80
82
|
style: style
|
|
81
83
|
}))
|
|
82
84
|
});
|
|
@@ -141,10 +143,10 @@ var InputIconWrapper = styled.span.withConfig({
|
|
|
141
143
|
|
|
142
144
|
export var InputNumber = function InputNumber(_ref8) {
|
|
143
145
|
var label = _ref8.label,
|
|
144
|
-
props = _objectWithoutProperties(_ref8,
|
|
146
|
+
props = _objectWithoutProperties(_ref8, _excluded2);
|
|
145
147
|
|
|
146
148
|
return /*#__PURE__*/_jsxs(InputNumberContainer, {
|
|
147
|
-
children: [/*#__PURE__*/_jsx(StyledInputNumber, _objectSpread({}, props, {
|
|
149
|
+
children: [/*#__PURE__*/_jsx(StyledInputNumber, _objectSpread(_objectSpread({}, props), {}, {
|
|
148
150
|
type: "number"
|
|
149
151
|
})), label && /*#__PURE__*/_jsx(InputNumberLabel, {
|
|
150
152
|
children: label
|
package/dist/Link.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
4
|
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
|
|
7
7
|
import React from "react";
|
|
8
8
|
import PropTypes from "prop-types";
|
|
@@ -11,26 +11,26 @@ import { BodyUI } from "@happeouikit/typography";
|
|
|
11
11
|
import { active } from "@happeouikit/colors";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
export var Link = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
14
|
-
return /*#__PURE__*/_jsx(StyledLink, _objectSpread({
|
|
14
|
+
return /*#__PURE__*/_jsx(StyledLink, _objectSpread(_objectSpread({
|
|
15
15
|
ref: ref,
|
|
16
16
|
as: "a"
|
|
17
|
-
}, props, {
|
|
17
|
+
}, props), {}, {
|
|
18
18
|
children: props.children
|
|
19
19
|
}));
|
|
20
20
|
});
|
|
21
21
|
export var LinkExternal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
22
|
-
return /*#__PURE__*/_jsx(StyledLink, _objectSpread({
|
|
22
|
+
return /*#__PURE__*/_jsx(StyledLink, _objectSpread(_objectSpread({
|
|
23
23
|
ref: ref,
|
|
24
24
|
as: "a",
|
|
25
25
|
target: "_blank",
|
|
26
26
|
rel: "nofollow noopener"
|
|
27
|
-
}, props, {
|
|
27
|
+
}, props), {}, {
|
|
28
28
|
children: props.children
|
|
29
29
|
}));
|
|
30
30
|
});
|
|
31
31
|
var StyledLink = styled(BodyUI).withConfig({
|
|
32
32
|
displayName: "Link__StyledLink",
|
|
33
|
-
componentId: "jezurh-0"
|
|
33
|
+
componentId: "sc-jezurh-0"
|
|
34
34
|
})(["text-decoration:", ";color:", ";:hover{color:", ";text-decoration:underline;}"], function (_ref) {
|
|
35
35
|
var underline = _ref.underline;
|
|
36
36
|
return underline ? "underline" : "none";
|
package/dist/RadioButton.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["label"];
|
|
3
4
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
6
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
8
|
|
|
8
9
|
import React from "react";
|
|
9
10
|
import styled from "styled-components";
|
|
@@ -15,7 +16,7 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
16
|
|
|
16
17
|
var RadioButton = function RadioButton(_ref) {
|
|
17
18
|
var label = _ref.label,
|
|
18
|
-
props = _objectWithoutProperties(_ref,
|
|
19
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
19
20
|
|
|
20
21
|
return /*#__PURE__*/_jsxs(RadioButtonWrapper, {
|
|
21
22
|
children: [/*#__PURE__*/_jsx("input", _objectSpread({
|
package/dist/Switch.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["label", "tabIndex"];
|
|
3
4
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
6
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
8
|
|
|
8
9
|
import React, { useRef } from "react";
|
|
9
10
|
import styled from "styled-components";
|
|
@@ -16,27 +17,39 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
16
17
|
var Switch = function Switch(_ref) {
|
|
17
18
|
var label = _ref.label,
|
|
18
19
|
tabIndex = _ref.tabIndex,
|
|
19
|
-
props = _objectWithoutProperties(_ref,
|
|
20
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
20
21
|
|
|
21
22
|
var checkboxRef = useRef();
|
|
22
23
|
|
|
24
|
+
var onClick = function onClick(event) {
|
|
25
|
+
event.preventDefault(); // Since this component can be used as controlled or uncontrolled
|
|
26
|
+
// it should have the ability to change aria-label based on its state
|
|
27
|
+
// eslint-disable-next-line no-param-reassign
|
|
28
|
+
|
|
29
|
+
event.currentTarget.ariaChecked = !checkboxRef.current.checked;
|
|
30
|
+
checkboxRef.current.checked = !checkboxRef.current.checked;
|
|
31
|
+
props.onChange(event);
|
|
32
|
+
};
|
|
33
|
+
|
|
23
34
|
var onKeyDown = function onKeyDown(event) {
|
|
24
35
|
if (typeof props.onChange === "function" && event.key.match(/enter|spacebar|\W{1}/i)) {
|
|
25
|
-
event
|
|
26
|
-
checkboxRef.current.checked = !checkboxRef.current.checked;
|
|
27
|
-
props.onChange(event);
|
|
36
|
+
onClick(event);
|
|
28
37
|
}
|
|
29
38
|
};
|
|
30
39
|
|
|
31
40
|
return /*#__PURE__*/_jsxs(ToggleSwitchWrapper, {
|
|
32
|
-
children: [/*#__PURE__*/_jsx("input", _objectSpread({
|
|
41
|
+
children: [/*#__PURE__*/_jsx("input", _objectSpread(_objectSpread({
|
|
33
42
|
ref: checkboxRef,
|
|
34
43
|
type: "checkbox"
|
|
35
|
-
}, props, {
|
|
44
|
+
}, props), {}, {
|
|
36
45
|
tabIndex: -1
|
|
37
46
|
})), /*#__PURE__*/_jsx(StyledSwitch, _objectSpread({
|
|
47
|
+
type: "button",
|
|
38
48
|
onKeyDown: onKeyDown,
|
|
39
|
-
|
|
49
|
+
onClick: onClick,
|
|
50
|
+
tabIndex: tabIndex,
|
|
51
|
+
role: "switch",
|
|
52
|
+
"aria-checked": props.checked || props.defaultChecked
|
|
40
53
|
}, props)), label && /*#__PURE__*/_jsx(Label, {
|
|
41
54
|
children: label
|
|
42
55
|
})]
|
|
@@ -51,10 +64,10 @@ Switch.defaultProps = {
|
|
|
51
64
|
label: undefined,
|
|
52
65
|
tabIndex: 0
|
|
53
66
|
};
|
|
54
|
-
var StyledSwitch = styled.
|
|
67
|
+
var StyledSwitch = styled.button.withConfig({
|
|
55
68
|
displayName: "Switch__StyledSwitch",
|
|
56
69
|
componentId: "sc-1pn4n4-0"
|
|
57
|
-
})(["position:relative;top:0;left:0;right:0;bottom:0;box-sizing:content-box;width:40px;height:20px;background-color:white;border:2px solid ", ";border-radius:13px;transition:0.4s;:before{position:absolute;content:\"\";height:14px;width:14px;left:3px;bottom:3px;border-radius:50%;background-color:", ";transition:0.4s;}&:focus-visible{outline:0;box-shadow:0 0 0 1px ", ";}"], gray08, gray08, active);
|
|
70
|
+
})(["all:unset;position:relative;top:0;left:0;right:0;bottom:0;box-sizing:content-box;width:40px;height:20px;background-color:white;border:2px solid ", ";border-radius:13px;transition:0.4s;:before{position:absolute;content:\"\";height:14px;width:14px;left:3px;bottom:3px;border-radius:50%;background-color:", ";transition:0.4s;}&:focus-visible{outline:0;box-shadow:0 0 0 1px ", ";}"], gray08, gray08, active);
|
|
58
71
|
var ToggleSwitchWrapper = styled.label.withConfig({
|
|
59
72
|
displayName: "Switch__ToggleSwitchWrapper",
|
|
60
73
|
componentId: "sc-1pn4n4-1"
|
package/dist/Tag.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["text", "closeCallback", "isUppercase"];
|
|
4
5
|
|
|
5
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
7
|
|
|
7
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
8
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
9
|
|
|
9
10
|
import React, { useState } from "react";
|
|
10
11
|
import styled from "styled-components";
|
|
@@ -19,7 +20,7 @@ var Tag = function Tag(_ref) {
|
|
|
19
20
|
var text = _ref.text,
|
|
20
21
|
closeCallback = _ref.closeCallback,
|
|
21
22
|
isUppercase = _ref.isUppercase,
|
|
22
|
-
props = _objectWithoutProperties(_ref,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
23
24
|
|
|
24
25
|
var _useState = useState(true),
|
|
25
26
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -31,7 +32,7 @@ var Tag = function Tag(_ref) {
|
|
|
31
32
|
closeCallback && closeCallback();
|
|
32
33
|
};
|
|
33
34
|
|
|
34
|
-
return show && /*#__PURE__*/_jsxs(TagWrapper, _objectSpread({}, props, {
|
|
35
|
+
return show && /*#__PURE__*/_jsxs(TagWrapper, _objectSpread(_objectSpread({}, props), {}, {
|
|
35
36
|
children: [/*#__PURE__*/_jsx(Text, {
|
|
36
37
|
bold: true,
|
|
37
38
|
uppercase: isUppercase,
|
package/dist/Textarea.js
CHANGED
|
@@ -1,34 +1,42 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["cols", "rows", "label"];
|
|
3
4
|
|
|
4
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
6
|
|
|
6
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
7
8
|
|
|
8
|
-
import React, {
|
|
9
|
+
import React, { useState } from "react";
|
|
9
10
|
import styled from "styled-components";
|
|
10
11
|
import { active, gray01, gray04, gray06 } from "@happeouikit/colors";
|
|
11
12
|
import PropTypes from "prop-types";
|
|
12
13
|
import { BodyUI, sansFamily } from "@happeouikit/typography";
|
|
14
|
+
import { uuidv4 } from "./utils";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
18
|
|
|
16
19
|
var Textarea = function Textarea(_ref) {
|
|
17
20
|
var cols = _ref.cols,
|
|
18
21
|
rows = _ref.rows,
|
|
19
22
|
label = _ref.label,
|
|
20
|
-
props = _objectWithoutProperties(_ref,
|
|
23
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
21
24
|
|
|
22
|
-
|
|
25
|
+
var id = useState(uuidv4)[0];
|
|
26
|
+
var accessibility = label ? {
|
|
27
|
+
"aria-labelledby": id
|
|
28
|
+
} : {};
|
|
29
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
23
30
|
children: [!!label && /*#__PURE__*/_jsx(Label, {
|
|
31
|
+
id: id,
|
|
24
32
|
children: /*#__PURE__*/_jsx(BodyUI, {
|
|
25
33
|
color: gray01,
|
|
26
34
|
children: label
|
|
27
35
|
})
|
|
28
|
-
}), /*#__PURE__*/_jsx(StyledTextarea, _objectSpread({
|
|
36
|
+
}), /*#__PURE__*/_jsx(StyledTextarea, _objectSpread(_objectSpread({
|
|
29
37
|
cols: cols,
|
|
30
38
|
rows: rows
|
|
31
|
-
}, props))]
|
|
39
|
+
}, accessibility), props))]
|
|
32
40
|
});
|
|
33
41
|
};
|
|
34
42
|
|
|
@@ -16,11 +16,11 @@ var TypeaheadDropdown = function TypeaheadDropdown(_ref) {
|
|
|
16
16
|
|
|
17
17
|
var Dropdown = styled.div.withConfig({
|
|
18
18
|
displayName: "TypeaheadDropdown__Dropdown",
|
|
19
|
-
componentId: "c2clla-0"
|
|
19
|
+
componentId: "sc-c2clla-0"
|
|
20
20
|
})(["position:relative;display:block;width:100%;z-index:1000;"]);
|
|
21
21
|
var DropdownContent = styled.div.withConfig({
|
|
22
22
|
displayName: "TypeaheadDropdown__DropdownContent",
|
|
23
|
-
componentId: "c2clla-1"
|
|
23
|
+
componentId: "sc-c2clla-1"
|
|
24
24
|
})(["position:absolute;display:block;width:100%;background:", ";margin-top:8px;padding-top:8px;padding-bottom:8px;box-shadow:", ";border-radius:4px;max-height:", ";overflow-y:auto;"], white, shadow400, function (props) {
|
|
25
25
|
return props.maxHeight;
|
|
26
26
|
});
|
|
@@ -28,10 +28,10 @@ var TypeaheadList = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
28
28
|
});
|
|
29
29
|
var Container = styled.ul.withConfig({
|
|
30
30
|
displayName: "TypeaheadList__Container",
|
|
31
|
-
componentId: "ce1llk-0"
|
|
31
|
+
componentId: "sc-ce1llk-0"
|
|
32
32
|
})(["padding:0px;margin:0px;"]);
|
|
33
33
|
var Row = styled.li.withConfig({
|
|
34
34
|
displayName: "TypeaheadList__Row",
|
|
35
|
-
componentId: "ce1llk-1"
|
|
35
|
+
componentId: "sc-ce1llk-1"
|
|
36
36
|
})(["padding:9px 15px 9px 15px;border:solid 1px transparent;list-style-type:none;&:hover{background:", ";}"], toBgLight(active));
|
|
37
37
|
export default TypeaheadList;
|
package/dist/messages.js
CHANGED
|
@@ -28,6 +28,10 @@ export default defineMessages({
|
|
|
28
28
|
id: "datePicker.message.invalid.time",
|
|
29
29
|
defaultMessage: "Invalid Time"
|
|
30
30
|
},
|
|
31
|
+
selectDateFormatDescription: {
|
|
32
|
+
id: "datePicker.message.formatDescription",
|
|
33
|
+
defaultMessage: "Provide a date using the format {localeFormat}"
|
|
34
|
+
},
|
|
31
35
|
wrongFormat: {
|
|
32
36
|
id: "datePicker.message.invalid.format",
|
|
33
37
|
defaultMessage: "Invalid Format"
|
package/dist/utils.js
CHANGED
|
@@ -7,7 +7,7 @@ export var toCamelCase = function toCamelCase(str) {
|
|
|
7
7
|
var HASHTAG_MAX_LENGTH = 64;
|
|
8
8
|
export var sanitiseHashtag = function sanitiseHashtag(hashtag) {
|
|
9
9
|
if (hashtag && typeof hashtag === "string") {
|
|
10
|
-
var regex = new RegExp(/(?:[
|
|
10
|
+
var regex = new RegExp(/(?:(?![#0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06E1-\u06E8\u06DF-\u06E4\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u24B6-\u24E9\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA672\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])[\s\S])/);
|
|
11
11
|
var withoutConsecutiveUnderscores = hashtag.replace(/_+/g, "_");
|
|
12
12
|
var match = withoutConsecutiveUnderscores.match(regex);
|
|
13
13
|
var firstDisallowedCharIndex = match && match.index || withoutConsecutiveUnderscores.length;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happeouikit/form-elements",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -44,5 +44,6 @@
|
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
47
|
-
}
|
|
47
|
+
},
|
|
48
|
+
"gitHead": "e9777d7e463eb24f1023c2eecf5ebbe35fed92a6"
|
|
48
49
|
}
|