@bbl-digital/snorre 3.1.55 → 3.1.57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/bundle.js +68 -42
  2. package/esm/core/ImageCarousel/index.js +70 -0
  3. package/esm/core/ImageCarousel/styles.js +58 -0
  4. package/esm/core/InfoButton/index.js +2 -1
  5. package/esm/core/InfoButton/styles.js +13 -13
  6. package/esm/core/Select/index.js +16 -2
  7. package/esm/core/Select/styles.js +37 -24
  8. package/esm/enums/ModifierKey.js +13 -0
  9. package/lib/core/ImageCarousel/index.d.ts +11 -0
  10. package/lib/core/ImageCarousel/index.d.ts.map +1 -0
  11. package/lib/core/ImageCarousel/index.js +70 -0
  12. package/lib/core/ImageCarousel/styles.d.ts +26 -0
  13. package/lib/core/ImageCarousel/styles.d.ts.map +1 -0
  14. package/lib/core/ImageCarousel/styles.js +58 -0
  15. package/lib/core/InfoButton/index.d.ts +2 -0
  16. package/lib/core/InfoButton/index.d.ts.map +1 -1
  17. package/lib/core/InfoButton/index.js +2 -1
  18. package/lib/core/InfoButton/styles.d.ts.map +1 -1
  19. package/lib/core/InfoButton/styles.js +13 -13
  20. package/lib/core/Select/index.d.ts +4 -0
  21. package/lib/core/Select/index.d.ts.map +1 -1
  22. package/lib/core/Select/index.js +16 -2
  23. package/lib/core/Select/styles.d.ts +3 -0
  24. package/lib/core/Select/styles.d.ts.map +1 -1
  25. package/lib/core/Select/styles.js +37 -24
  26. package/lib/enums/ModifierKey.d.ts +12 -0
  27. package/lib/enums/ModifierKey.d.ts.map +1 -0
  28. package/lib/enums/ModifierKey.js +13 -0
  29. package/package.json +1 -1
  30. package/esm/core/Autocomplete/index.d.js +0 -1
  31. package/esm/core/DatepickerRange/YearMonthForm.js +0 -56
  32. package/lib/core/Autocomplete/index.d.js +0 -1
  33. package/lib/core/DatepickerRange/YearMonthForm.d.ts +0 -10
  34. package/lib/core/DatepickerRange/YearMonthForm.d.ts.map +0 -1
  35. package/lib/core/DatepickerRange/YearMonthForm.js +0 -56
@@ -0,0 +1,13 @@
1
+ export let ModifierKey;
2
+
3
+ (function (ModifierKey) {
4
+ ModifierKey["enter"] = "Enter";
5
+ ModifierKey["tab"] = "Tab";
6
+ ModifierKey["space"] = " ";
7
+ ModifierKey["escape"] = "Escape";
8
+ ModifierKey["shift"] = "Shift";
9
+ ModifierKey["right"] = "ArrowRight";
10
+ ModifierKey["left"] = "ArrowLeft";
11
+ ModifierKey["up"] = "ArrowUp";
12
+ ModifierKey["down"] = "ArrowDown";
13
+ })(ModifierKey || (ModifierKey = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "3.1.55",
3
+ "version": "3.1.57",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",
@@ -1 +0,0 @@
1
- export {};
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
- import { MONTHS } from '../../utils/dates';
3
- import { StyledSelect, Div } from './styles';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
-
7
- const YearMonthForm = ({
8
- onChange,
9
- date,
10
- fromDate,
11
- toDate
12
- }) => {
13
- const months = MONTHS;
14
- const years = [];
15
-
16
- for (let i = fromDate.getFullYear(); i <= toDate.getFullYear(); i += 1) {
17
- years.push(i);
18
- }
19
-
20
- const changeMonth = e => {
21
- let newDate = date;
22
- newDate.setMonth(e.target.value);
23
- if (newDate > toDate) newDate = toDate;
24
- onChange(newDate);
25
- };
26
-
27
- const changeYear = e => {
28
- let newDate = date;
29
- newDate.setFullYear(e.target.value);
30
- if (newDate > toDate) newDate = toDate;
31
- onChange(newDate);
32
- };
33
-
34
- return /*#__PURE__*/_jsxs(Div, {
35
- className: "DayPicker-Caption",
36
- children: [/*#__PURE__*/_jsx(StyledSelect, {
37
- name: "month",
38
- onChange: changeMonth,
39
- value: date.getMonth(),
40
- children: months.map((month, i) => /*#__PURE__*/_jsx("option", {
41
- value: i,
42
- children: month
43
- }, month))
44
- }), /*#__PURE__*/_jsx(StyledSelect, {
45
- name: "year",
46
- onChange: changeYear,
47
- value: date.getFullYear(),
48
- children: years.map(year => /*#__PURE__*/_jsx("option", {
49
- value: year,
50
- children: year
51
- }, year))
52
- })]
53
- });
54
- };
55
-
56
- export default YearMonthForm;
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- interface IProps {
3
- date: Date;
4
- onChange: (e: Date) => void;
5
- fromDate: Date;
6
- toDate: Date;
7
- }
8
- declare const YearMonthForm: React.FC<IProps>;
9
- export default YearMonthForm;
10
- //# sourceMappingURL=YearMonthForm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"YearMonthForm.d.ts","sourceRoot":"","sources":["../../../src/packages/core/DatepickerRange/YearMonthForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,UAAU,MAAM;IACd,IAAI,EAAE,IAAI,CAAA;IACV,QAAQ,EAAE,CAAC,CAAC,EAAE,IAAI,KAAK,IAAI,CAAA;IAC3B,QAAQ,EAAE,IAAI,CAAA;IACd,MAAM,EAAE,IAAI,CAAA;CACb;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAmDnC,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -1,56 +0,0 @@
1
- import React from 'react';
2
- import { MONTHS } from '../../utils/dates';
3
- import { StyledSelect, Div } from './styles';
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- import { jsxs as _jsxs } from "react/jsx-runtime";
6
-
7
- const YearMonthForm = ({
8
- onChange,
9
- date,
10
- fromDate,
11
- toDate
12
- }) => {
13
- const months = MONTHS;
14
- const years = [];
15
-
16
- for (let i = fromDate.getFullYear(); i <= toDate.getFullYear(); i += 1) {
17
- years.push(i);
18
- }
19
-
20
- const changeMonth = e => {
21
- let newDate = date;
22
- newDate.setMonth(e.target.value);
23
- if (newDate > toDate) newDate = toDate;
24
- onChange(newDate);
25
- };
26
-
27
- const changeYear = e => {
28
- let newDate = date;
29
- newDate.setFullYear(e.target.value);
30
- if (newDate > toDate) newDate = toDate;
31
- onChange(newDate);
32
- };
33
-
34
- return /*#__PURE__*/_jsxs(Div, {
35
- className: "DayPicker-Caption",
36
- children: [/*#__PURE__*/_jsx(StyledSelect, {
37
- name: "month",
38
- onChange: changeMonth,
39
- value: date.getMonth(),
40
- children: months.map((month, i) => /*#__PURE__*/_jsx("option", {
41
- value: i,
42
- children: month
43
- }, month))
44
- }), /*#__PURE__*/_jsx(StyledSelect, {
45
- name: "year",
46
- onChange: changeYear,
47
- value: date.getFullYear(),
48
- children: years.map(year => /*#__PURE__*/_jsx("option", {
49
- value: year,
50
- children: year
51
- }, year))
52
- })]
53
- });
54
- };
55
-
56
- export default YearMonthForm;