@helsenorge/designsystem-react 2.0.0 → 2.2.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.
Files changed (70) hide show
  1. package/CHANGELOG.md +229 -431
  2. package/ErrorWrapper.js +2 -0
  3. package/ErrorWrapper.js.map +1 -0
  4. package/FormGroup.js +1 -1
  5. package/FormGroup.js.map +1 -1
  6. package/HorizontalScroll.js +1 -1
  7. package/HorizontalScroll.js.map +1 -1
  8. package/Input.js +1 -1
  9. package/Input.js.map +1 -1
  10. package/Textarea.js +1 -1
  11. package/Textarea.js.map +1 -1
  12. package/components/ErrorWrapper/ErrorWrapper.d.ts +10 -0
  13. package/components/ErrorWrapper/ErrorWrapper.d.ts.map +1 -0
  14. package/components/ErrorWrapper/componentdata.json +1 -0
  15. package/components/ErrorWrapper/index.d.ts +4 -0
  16. package/components/ErrorWrapper/index.d.ts.map +1 -0
  17. package/components/ErrorWrapper/index.js +2 -0
  18. package/components/ErrorWrapper/index.js.map +1 -0
  19. package/components/ErrorWrapper/styles.module.scss +44 -0
  20. package/components/ErrorWrapper/styles.module.scss.d.ts +12 -0
  21. package/components/ExpanderList/styles.module.scss +1 -1
  22. package/components/FormExample/FormExample.d.ts.map +1 -1
  23. package/components/FormExample/index.js +3 -3
  24. package/components/FormExample/index.js.map +1 -1
  25. package/components/FormGroup/FormGroup.d.ts.map +1 -1
  26. package/components/FormGroup/index.js +1 -1
  27. package/components/FormGroup/styles.module.scss +3 -32
  28. package/components/FormGroup/styles.module.scss.d.ts +0 -3
  29. package/components/GridExample/GridExample.d.ts +4 -0
  30. package/components/GridExample/GridExample.d.ts.map +1 -0
  31. package/components/GridExample/componentdata.json +1 -0
  32. package/components/GridExample/index.d.ts +4 -0
  33. package/components/GridExample/index.d.ts.map +1 -0
  34. package/components/GridExample/index.js +2 -0
  35. package/components/GridExample/index.js.map +1 -0
  36. package/components/HorizontalScroll/HorizontalScroll.d.ts +7 -1
  37. package/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -1
  38. package/components/HorizontalScroll/componentdata.json +1 -1
  39. package/components/HorizontalScroll/index.js +1 -1
  40. package/components/HorizontalScroll/styles.module.scss +4 -4
  41. package/components/HorizontalScroll/styles.module.scss.d.ts +1 -0
  42. package/components/Input/Input.d.ts.map +1 -1
  43. package/components/Input/index.js +1 -1
  44. package/components/Progressbar/Dot.d.ts +10 -0
  45. package/components/Progressbar/Dot.d.ts.map +1 -0
  46. package/components/Progressbar/DotList.d.ts +9 -0
  47. package/components/Progressbar/DotList.d.ts.map +1 -0
  48. package/components/Progressbar/Progressbar.d.ts +28 -0
  49. package/components/Progressbar/Progressbar.d.ts.map +1 -0
  50. package/components/Progressbar/componentdata.json +1 -0
  51. package/components/Progressbar/index.d.ts +4 -0
  52. package/components/Progressbar/index.d.ts.map +1 -0
  53. package/components/Progressbar/index.js +2 -0
  54. package/components/Progressbar/index.js.map +1 -0
  55. package/components/Progressbar/styles.module.scss +91 -0
  56. package/components/Progressbar/styles.module.scss.d.ts +16 -0
  57. package/components/Progressbar/utils.d.ts +66 -0
  58. package/components/Progressbar/utils.d.ts.map +1 -0
  59. package/components/Table/Table.d.ts.map +1 -1
  60. package/components/Table/index.js +1 -1
  61. package/components/Table/index.js.map +1 -1
  62. package/components/Table/styles.module.scss +7 -4
  63. package/components/Textarea/Textarea.d.ts.map +1 -1
  64. package/components/Textarea/index.js +1 -1
  65. package/components/Validation/index.js +1 -1
  66. package/constants.d.ts +1 -0
  67. package/constants.d.ts.map +1 -1
  68. package/constants.js +1 -1
  69. package/constants.js.map +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"FormGroup.d.ts","sourceRoot":"","sources":["../../../src/components/FormGroup/FormGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAe,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAMrE,oBAAY,aAAa,GAAG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;IAC3C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,uFAkFpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../FormGroup.js";import{F as A,F as B}from"../../FormGroup.js";import"react";import"classnames";import"./styles.module.scss";import"../../Checkbox.js";import"../../uuid.js";import"../Icons/Check.js";import"../Icons/Icon.js";import"../../constants.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Checkbox/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../Input/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";export{A as FormGroup,B as default};
1
+ import"../../FormGroup.js";import{F as C,F as D}from"../../FormGroup.js";import"react";import"classnames";import"./styles.module.scss";import"../../Checkbox.js";import"../../uuid.js";import"../Icons/Check.js";import"../Icons/Icon.js";import"../../constants.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Checkbox/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../Input/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";export{C as FormGroup,D as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -9,48 +9,19 @@
9
9
  color: $white;
10
10
  }
11
11
  }
12
-
13
- &__errors {
14
- font-size: $font-size-sm;
15
- font-weight: 600;
16
- color: $cherry500;
17
- margin-top: 0;
18
- }
19
12
  }
20
13
 
21
14
  .form-group-wrapper:last-of-type {
22
15
  padding-bottom: 0;
23
16
  }
24
17
 
25
- .form-group {
26
- padding: 0 0 getSpacer(m);
27
-
28
- @media (min-width: map-get($grid-breakpoints, md)) {
29
- padding: 0 0 getSpacer(l);
30
- }
31
-
32
- &--invalid {
33
- padding-top: getSpacer(s);
34
- margin-left: getSpacer(xs) * -1;
35
- margin-right: getSpacer(xs) * -1;
36
- padding-left: getSpacer(2xs);
37
- padding-right: getSpacer(xs);
38
- background-color: $cherry100;
39
- border-left: getSpacer(3xs) solid $cherry500;
40
-
41
- @media (min-width: map-get($grid-breakpoints, md)) {
42
- margin-left: (getSpacer(m) + 0.25rem) * -1;
43
- margin-right: (getSpacer(m) + 0.25rem) * -1;
44
- padding-left: getSpacer(m);
45
- padding-right: getSpacer(m);
46
- }
47
- }
48
- }
49
-
50
18
  .field-set {
51
19
  border: none;
52
20
  padding: 0;
53
21
  margin: 0;
22
+ > div {
23
+ padding-bottom: 0;
24
+ }
54
25
 
55
26
  &__legend {
56
27
  font-size: $font-size-md;
@@ -2,10 +2,7 @@ export type Styles = {
2
2
  'field-set': string;
3
3
  'field-set__legend': string;
4
4
  'field-set__legend--on-dark': string;
5
- 'form-group': string;
6
- 'form-group--invalid': string;
7
5
  'form-group-wrapper': string;
8
- 'form-group-wrapper__errors': string;
9
6
  'form-group-wrapper__title--on-dark': string;
10
7
  };
11
8
 
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const GridExample: React.FC;
3
+ export default GridExample;
4
+ //# sourceMappingURL=GridExample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridExample.d.ts","sourceRoot":"","sources":["../../../src/components/GridExample/GridExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAM/B,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"props":{}}
@@ -0,0 +1,4 @@
1
+ import GridExample from './GridExample';
2
+ export * from './GridExample';
3
+ export default GridExample;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/GridExample/index.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,eAAe,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ import e from"react";const c=({children:a})=>e.createElement("div",{className:"container"},e.createElement("div",{className:"row"},e.createElement("div",{className:"col"},a)));export{c as GridExample,c as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/GridExample/GridExample.tsx"],"sourcesContent":["import React from 'react';\n\nexport const GridExample: React.FC = ({ children }) => (\n <div className=\"container\">\n <div className=\"row\">\n <div className=\"col\">{children}</div>\n </div>\n </div>\n);\n\nexport default GridExample;\n"],"names":["GridExample","children","React"],"mappings":"qBAEO,MAAMA,EAAwB,CAAC,CAAE,SAAAC,CAAA,IACrCC,EAAA,cAAA,MAAA,CAAI,UAAU,WAAA,EACZA,EAAA,cAAA,MAAA,CAAI,UAAU,KAAA,EACZA,EAAA,cAAA,MAAA,CAAI,UAAU,KAAA,EAAOD,CAAS,CACjC,CACF"}
@@ -1,4 +1,10 @@
1
1
  import React from 'react';
2
- export declare const HorizontalScroll: React.FC;
2
+ interface HorizontalScrollProps {
3
+ /**
4
+ * Bredden på elementet som potensielt vil scrolle horisontalt i px
5
+ */
6
+ childWidth: number;
7
+ }
8
+ export declare const HorizontalScroll: React.FC<HorizontalScrollProps>;
3
9
  export default HorizontalScroll;
4
10
  //# sourceMappingURL=HorizontalScroll.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalScroll.d.ts","sourceRoot":"","sources":["../../../src/components/HorizontalScroll/HorizontalScroll.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAQtC,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EA8BpC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"HorizontalScroll.d.ts","sourceRoot":"","sources":["../../../src/components/HorizontalScroll/HorizontalScroll.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,UAAU,qBAAqB;IAC7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkC5D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"props":{}}
1
+ {"props":{"childWidth":{"defaultValue":null,"description":"Bredden på elementet som potensielt vil scrolle horisontalt i px","name":"childWidth","parent":{"fileName":"src/components/HorizontalScroll/HorizontalScroll.tsx","name":"HorizontalScrollProps"},"declarations":[{"fileName":"src/components/HorizontalScroll/HorizontalScroll.tsx","name":"HorizontalScrollProps"}],"required":true,"type":{"name":"number"}}}}
@@ -1,2 +1,2 @@
1
- import"../../HorizontalScroll.js";import{H as f,H as s}from"../../HorizontalScroll.js";import"react";import"classnames";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"./styles.module.scss";export{f as HorizontalScroll,s as default};
1
+ import"../../HorizontalScroll.js";import{H as c,H as e}from"../../HorizontalScroll.js";import"react";import"classnames";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useSize.js";import"../../debounce.js";import"./styles.module.scss";export{c as HorizontalScroll,e as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -6,10 +6,10 @@ $gradient: rgba(0, 0, 0, 0.27), rgba(0, 0, 0, 0.27) 18%, transparent;
6
6
  transform: translateZ(0); // Gjør at position: fixed på child-elementer er relativ til denne parenten
7
7
  &__viewport {
8
8
  display: flex;
9
- overflow-x: auto;
10
- overflow-y: hidden;
11
- // overflow-settingene har en tendens til å klippe 1px av innholdet
12
- padding: 1px;
9
+ &--overflow {
10
+ overflow-x: auto;
11
+ overflow-y: hidden;
12
+ }
13
13
  }
14
14
  &__indicator {
15
15
  position: fixed;
@@ -5,6 +5,7 @@ export type Styles = {
5
5
  'horizontalscroll__indicator--right': string;
6
6
  'horizontalscroll__indicator--visible': string;
7
7
  horizontalscroll__viewport: string;
8
+ 'horizontalscroll__viewport--overflow': string;
8
9
  };
9
10
 
10
11
  export type ClassNames = keyof Styles;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAe,MAAM,iBAAiB,CAAC;AAErE,OAAa,EAAY,OAAO,EAAE,MAAM,UAAU,CAAC;AAMnD,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,UAAU,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,CAChG;IACD,uBAAuB;IACvB,IAAI,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAC/B,eAAe;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,IAAI,CAAC,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EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACtC;AAED,oBAAY,UAAU;IACpB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAU7C,QAAA,MAAM,KAAK,qFAuGT,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../Input.js";import{A as n,a as C,I as H}from"../../Input.js";import"react";import"classnames";import"../../constants.js";import"../../uuid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useBreakpoint.js";import"./styles.module.scss";export{n as AVERAGE_CHARACTER_WIDTH_PX,C as InputTypes,H as default};
1
+ import"../../Input.js";import{A as H,a as d,I as l}from"../../Input.js";import"react";import"classnames";import"../../constants.js";import"../../uuid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useBreakpoint.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"./styles.module.scss";export{H as AVERAGE_CHARACTER_WIDTH_PX,d as InputTypes,l as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface DotProps {
3
+ index?: number;
4
+ completed: boolean;
5
+ distanceBetweenDots?: number;
6
+ position?: 'left' | 'right';
7
+ }
8
+ declare const Dot: React.FC<DotProps>;
9
+ export default Dot;
10
+ //# sourceMappingURL=Dot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dot.d.ts","sourceRoot":"","sources":["../../../src/components/Progressbar/Dot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,UAAU,QAAQ;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,QAAA,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAY3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface DotListProps {
3
+ allowedValues: number[];
4
+ currentValue: number;
5
+ distanceBetweenDots: number;
6
+ }
7
+ declare const Dots: React.FC<DotListProps>;
8
+ export default Dots;
9
+ //# sourceMappingURL=DotList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DotList.d.ts","sourceRoot":"","sources":["../../../src/components/Progressbar/DotList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ export interface ProgressbarProps {
3
+ /**
4
+ * Sets aria-label of the progressbar. ariaLabel or ariaLabelledById MUST be set!
5
+ */
6
+ ariaLabel?: string;
7
+ /**
8
+ * Sets aria-labelledby of the progressbar. ariaLabel or ariaLabelledById MUST be set!
9
+ */
10
+ ariaLabelledById?: string;
11
+ /**
12
+ * Current value. Must be between min and max
13
+ */
14
+ value?: number;
15
+ /**
16
+ * Minimum value
17
+ */
18
+ min?: number;
19
+ /**
20
+ * Maximum value
21
+ */
22
+ max?: number;
23
+ /** Sets the data-testid attribute. */
24
+ testId?: string;
25
+ }
26
+ declare const Progressbar: React.FC<ProgressbarProps>;
27
+ export default Progressbar;
28
+ //# sourceMappingURL=Progressbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Progressbar.d.ts","sourceRoot":"","sources":["../../../src/components/Progressbar/Progressbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAYtC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA8C3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ {"props":{"ariaLabel":{"defaultValue":null,"description":"Sets aria-label of the progressbar. ariaLabel or ariaLabelledById MUST be set!","name":"ariaLabel","parent":{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"},"declarations":[{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"}],"required":false,"type":{"name":"string"}},"ariaLabelledById":{"defaultValue":null,"description":"Sets aria-labelledby of the progressbar. ariaLabel or ariaLabelledById MUST be set!","name":"ariaLabelledById","parent":{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"},"declarations":[{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"}],"required":false,"type":{"name":"string"}},"value":{"defaultValue":null,"description":"Current value. Must be between min and max","name":"value","parent":{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"},"declarations":[{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"}],"required":false,"type":{"name":"number"}},"min":{"defaultValue":{"value":"0"},"description":"Minimum value","name":"min","parent":{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"},"declarations":[{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"}],"required":false,"type":{"name":"number"}},"max":{"defaultValue":{"value":"2"},"description":"Maximum value","name":"max","parent":{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"},"declarations":[{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"}],"required":false,"type":{"name":"number"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"},"declarations":[{"fileName":"src/components/Progressbar/Progressbar.tsx","name":"ProgressbarProps"}],"required":false,"type":{"name":"string"}}}}
@@ -0,0 +1,4 @@
1
+ import Progressbar from './Progressbar';
2
+ export * from './Progressbar';
3
+ export default Progressbar;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Progressbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,eAAe,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ import r,{useRef as y}from"react";import{useSize as A}from"../../hooks/useSize.js";import R from"classnames";import l from"./styles.module.scss";import{g as N}from"../../accessibility.js";import{AnalyticsId as v}from"../../constants.js";import"../../debounce.js";const x=4,D=24,S=8,$=(e,t)=>e<t?e:t-1,k=(e,t)=>t<e?e:t,I=(e,t,s)=>typeof e>"u"||e<t?t:e>s?s:e,W=e=>Math.floor(e/(D+x)),X=(e,t)=>(e-D)/(t-1),O=(e,t)=>e*t,T=(e,t)=>Array.from(Array(t-e+1),(s,a)=>a+e),B=(e,t,s)=>{const a=$(t,s),o=k(a,s);return{validatedValue:I(e,a,o),validatedMin:a,validatedMax:o}},g=({index:e,completed:t,distanceBetweenDots:s,position:a})=>{const o=R(l.progressbar__dot,t&&l["progressbar__dot--completed"],a&&l[`progressbar__dot--${a}`]),i=!a&&typeof e<"u"&&typeof s<"u"?{left:`${e*s+S}px`}:void 0;return r.createElement("span",{className:o,style:i,"data-testid":"dot"})},C=({allowedValues:e,currentValue:t,distanceBetweenDots:s})=>r.createElement(r.Fragment,null,e.map((a,o)=>r.createElement(g,{index:o,key:a,completed:a<t,distanceBetweenDots:s}))),q=({ariaLabelledById:e,ariaLabel:t,value:s,min:a=0,max:o=2,testId:p})=>{const i=y(null),f=y(null),{width:M=0}=A(i)||{},{width:_=0}=A(f)||{},{validatedValue:n,validatedMin:m,validatedMax:c}=B(s,a,o),d=T(m,c),h=d.indexOf(n),P=W(M),b=X(_,d.length),E=O(b,h),u=d.length<=P,V=n===c,w=N({label:t,id:e});return r.createElement("div",{className:l["progressbar-wrapper"],ref:i},r.createElement("span",{role:"progressbar",...w,"aria-valuenow":n,"aria-valuemin":m,"aria-valuemax":c,className:l.progressbar,style:{backgroundPositionX:`${V?_:E}px`},ref:f,"data-testid":p,"data-analyticsid":v.Progressbar},u&&r.createElement(C,{allowedValues:d,currentValue:n,distanceBetweenDots:b}),!u&&r.createElement(r.Fragment,null,r.createElement(g,{completed:n>m,position:"left"}),r.createElement(g,{completed:n===c,position:"right"})),r.createElement("span",{className:l.progressbar__marker,style:{left:`${E}px`}})),!u&&r.createElement("span",{className:l.progressbar__number},`${n}/${c}`))};export{q as default};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Progressbar/utils.ts","../../../src/components/Progressbar/Dot.tsx","../../../src/components/Progressbar/DotList.tsx","../../../src/components/Progressbar/Progressbar.tsx"],"sourcesContent":["/**\n * Minimum avstand fra markør til prikk\n */\nconst MARKER_DOT_MIN_DISTANCE_PX = 4;\n\n/**\n * Bredde på markør\n */\nconst MARKER_WIDTH_PX = 24;\n\n/**\n * Horisontal padding på progressbar\n */\nexport const PROGRESS_BAR_PADDING_X_PX = 8;\n\n/**\n * Valider at minimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi\n */\nexport const getValidatedMin = (min: number, max: number): number => (min < max ? min : max - 1);\n\n/**\n * Valider at maksimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Maksimum-verdi, ikke mindre enn minimum-verdi\n */\nexport const getValidatedMax = (min: number, max: number): number => (max < min ? min : max);\n\n/**\n * Valider at verdi er innenfor gyldig område\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Verdi, ikke mindre enn 0, ikke mer enn max\n */\nexport const getValidatedValue = (value: number | undefined, min: number, max: number): number => {\n if (typeof value === 'undefined' || value < min) {\n return min;\n }\n\n return value > max ? max : value;\n};\n\n/**\n * Finn antall prikker det er plass til\n * @param progressbarWidth Bredde på progressbar\n * @returns Antall prikker\n */\nexport const getMaximumDots = (progressbarWidth: number): number =>\n Math.floor(progressbarWidth / (MARKER_WIDTH_PX + MARKER_DOT_MIN_DISTANCE_PX));\n\n/**\n * Beregn riktig distance mellom prikker\n * @param progressbarWidth Bredde på progressbar\n * @param dots Antall prikker som skal vises\n * @returns Distanse mellom prikker\n */\nexport const getDistanceBetweenDots = (progressbarWidth: number, dots: number): number => (progressbarWidth - MARKER_WIDTH_PX) / (dots - 1);\n\n/**\n * Beregn riktig plassering av markør\n * @param distanceBetweenDots Distanse mellom prikker\n * @param index Nåværende verdi i progressbar\n * @returns Plassering til markør fra venstre\n */\nexport const getMarkerPosition = (distanceBetweenDots: number, index: number): number => distanceBetweenDots * index;\n\n/**\n * Lag liste med tillate verdier fra min til maks\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Liste med verdier\n */\nexport const getAllowedValues = (min: number, max: number): number[] => Array.from(Array(max - min + 1), (_, index) => index + min);\n\n/**\n * Valider props som skal brukes til beregning av posisjon m.m.\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Objekt med gyldige verdier\n */\nexport const getValidatedProps = (\n value: number | undefined,\n min: number,\n max: number\n): { validatedValue: number; validatedMin: number; validatedMax: number } => {\n const validatedMin = getValidatedMin(min, max);\n const validatedMax = getValidatedMax(validatedMin, max);\n const validatedValue = getValidatedValue(value, validatedMin, validatedMax);\n\n return { validatedValue, validatedMin, validatedMax };\n};\n","import classNames from 'classnames';\nimport React from 'react';\n\nimport { PROGRESS_BAR_PADDING_X_PX } from './utils';\n\nimport styles from './styles.module.scss';\n\ninterface DotProps {\n index?: number;\n completed: boolean;\n distanceBetweenDots?: number;\n position?: 'left' | 'right';\n}\n\nconst Dot: React.FC<DotProps> = ({ index, completed, distanceBetweenDots, position }) => {\n const classes = classNames(\n styles.progressbar__dot,\n completed && styles['progressbar__dot--completed'],\n position && styles[`progressbar__dot--${position}`]\n );\n const positionWithStyle = !position && typeof index !== 'undefined' && typeof distanceBetweenDots !== 'undefined';\n const style: React.HTMLAttributes<HTMLSpanElement>['style'] = positionWithStyle\n ? { left: `${index * distanceBetweenDots + PROGRESS_BAR_PADDING_X_PX}px` }\n : undefined;\n\n return <span className={classes} style={style} data-testid=\"dot\" />;\n};\n\nexport default Dot;\n","import React from 'react';\n\nimport Dot from './Dot';\n\ninterface DotListProps {\n allowedValues: number[];\n currentValue: number;\n distanceBetweenDots: number;\n}\n\nconst Dots: React.FC<DotListProps> = ({ allowedValues, currentValue, distanceBetweenDots }) => (\n <>\n {allowedValues.map((value, index) => (\n <Dot index={index} key={value} completed={value < currentValue} distanceBetweenDots={distanceBetweenDots} />\n ))}\n </>\n);\n\nexport default Dots;\n","import React, { useRef } from 'react';\n\nimport { useSize } from '../../hooks/useSize';\n\nimport DotList from './DotList';\nimport Dot from './Dot';\nimport { getMaximumDots, getDistanceBetweenDots, getMarkerPosition, getAllowedValues, getValidatedProps } from './utils';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport interface ProgressbarProps {\n /**\n * Sets aria-label of the progressbar. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the progressbar. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /**\n * Current value. Must be between min and max\n */\n value?: number;\n /**\n * Minimum value\n */\n min?: number;\n /**\n * Maximum value\n */\n max?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Progressbar: React.FC<ProgressbarProps> = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const ref = useRef<HTMLSpanElement>(null);\n const { width: wrapperWidth = 0 } = useSize(wrapperRef) || {};\n const { width: progressbarWidth = 0 } = useSize(ref) || {};\n\n const { validatedValue, validatedMin, validatedMax } = getValidatedProps(value, min, max);\n const allowedValues = getAllowedValues(validatedMin, validatedMax);\n const index = allowedValues.indexOf(validatedValue);\n const maximumDots = getMaximumDots(wrapperWidth);\n const distanceBetweenDots = getDistanceBetweenDots(progressbarWidth, allowedValues.length);\n const markerPosition = getMarkerPosition(distanceBetweenDots, index);\n\n const showAllDots = allowedValues.length <= maximumDots;\n const isCompleted = validatedValue === validatedMax;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n\n return (\n <div className={styles['progressbar-wrapper']} ref={wrapperRef}>\n <span\n role=\"progressbar\"\n {...ariaLabelAttributes}\n aria-valuenow={validatedValue}\n aria-valuemin={validatedMin}\n aria-valuemax={validatedMax}\n className={styles.progressbar}\n style={{\n backgroundPositionX: `${isCompleted ? progressbarWidth : markerPosition}px`,\n }}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Progressbar}\n >\n {showAllDots && <DotList allowedValues={allowedValues} currentValue={validatedValue} distanceBetweenDots={distanceBetweenDots} />}\n {!showAllDots && (\n <>\n <Dot completed={validatedValue > validatedMin} position=\"left\" />\n <Dot completed={validatedValue === validatedMax} position=\"right\" />\n </>\n )}\n <span className={styles.progressbar__marker} style={{ left: `${markerPosition}px` }} />\n </span>\n {!showAllDots && <span className={styles.progressbar__number}>{`${validatedValue}/${validatedMax}`}</span>}\n </div>\n );\n};\n\nexport default Progressbar;\n"],"names":["MARKER_DOT_MIN_DISTANCE_PX","MARKER_WIDTH_PX","PROGRESS_BAR_PADDING_X_PX","getValidatedMin","min","max","getValidatedMax","getValidatedValue","value","getMaximumDots","progressbarWidth","getDistanceBetweenDots","dots","getMarkerPosition","distanceBetweenDots","index","getAllowedValues","_","getValidatedProps","validatedMin","validatedMax","Dot","completed","position","classes","classNames","styles","style","React","Dots","allowedValues","currentValue","Progressbar","ariaLabelledById","ariaLabel","testId","wrapperRef","useRef","ref","wrapperWidth","useSize","validatedValue","maximumDots","markerPosition","showAllDots","isCompleted","ariaLabelAttributes","getAriaLabelAttributes","AnalyticsId","DotList"],"mappings":"uQAGA,MAAMA,EAA6B,EAK7BC,EAAkB,GAKXC,EAA4B,EAQ5BC,EAAkB,CAACC,EAAaC,IAAyBD,EAAMC,EAAMD,EAAMC,EAAM,EAQjFC,EAAkB,CAACF,EAAaC,IAAyBA,EAAMD,EAAMA,EAAMC,EAS3EE,EAAoB,CAACC,EAA2BJ,EAAaC,IACpE,OAAOG,EAAU,KAAeA,EAAQJ,EACnCA,EAGFI,EAAQH,EAAMA,EAAMG,EAQhBC,EAAkBC,GAC7B,KAAK,MAAMA,GAAoBT,EAAkBD,EAA2B,EAQjEW,EAAyB,CAACD,EAA0BE,KAA0BF,EAAmBT,IAAoBW,EAAO,GAQ5HC,EAAoB,CAACC,EAA6BC,IAA0BD,EAAsBC,EAQlGC,EAAmB,CAACZ,EAAaC,IAA0B,MAAM,KAAK,MAAMA,EAAMD,EAAM,CAAC,EAAG,CAACa,EAAGF,IAAUA,EAAQX,CAAG,EASrHc,EAAoB,CAC/BV,EACAJ,EACAC,IAC2E,CACrE,MAAAc,EAAehB,EAAgBC,EAAKC,CAAG,EACvCe,EAAed,EAAgBa,EAAcd,CAAG,EAG/C,MAAA,CAAE,eAFcE,EAAkBC,EAAOW,EAAcC,CAAY,EAEjD,aAAAD,EAAc,aAAAC,EACzC,ECjFMC,EAA0B,CAAC,CAAE,MAAAN,EAAO,UAAAO,EAAW,oBAAAR,EAAqB,SAAAS,KAAe,CACvF,MAAMC,EAAUC,EACdC,EAAO,iBACPJ,GAAaI,EAAO,+BACpBH,GAAYG,EAAO,qBAAqBH,IAAA,EAGpCI,EADoB,CAACJ,GAAY,OAAOR,EAAU,KAAe,OAAOD,EAAwB,IAElG,CAAE,KAAM,GAAGC,EAAQD,EAAsBZ,KACzC,EAAA,OAEJ,OAAQ0B,EAAA,cAAA,OAAA,CAAK,UAAWJ,EAAS,MAAAG,EAA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mBAAkBa,EAAY,WAAA,EAE7BJ,GAAgBhB,EAAA,cAAAqB,EAAA,CAAQ,cAAAnB,EAA8B,aAAcW,EAAgB,oBAAA3B,CAA0C,CAAA,EAC9H,CAAC8B,GACAhB,EAAA,cAAAA,EAAA,SAAA,KACGA,EAAA,cAAAP,EAAA,CAAI,UAAWoB,EAAiBtB,EAAc,SAAS,MAAA,CAAO,EAC9DS,EAAA,cAAAP,EAAA,CAAI,UAAWoB,IAAmBrB,EAAc,SAAS,OAAQ,CAAA,CACpE,EAEDQ,EAAA,cAAA,OAAA,CAAK,UAAWF,EAAO,oBAAqB,MAAO,CAAE,KAAM,GAAGiB,KAAmB,CAAG,CAAA,CACvF,EACC,CAACC,GAAgBhB,EAAA,cAAA,OAAA,CAAK,UAAWF,EAAO,mBAAA,EAAsB,GAAGe,KAAkBrB,GAAe,CACrG,CAEJ"}
@@ -0,0 +1,91 @@
1
+ @import '../../scss/_breakpoints.scss';
2
+ @import '../../scss/_spacers.scss';
3
+ @import '../../scss/_palette.scss';
4
+ @import '../../scss/_font-settings.scss';
5
+
6
+ .progressbar-wrapper {
7
+ display: flex;
8
+ align-items: center;
9
+ min-height: getSpacer(l);
10
+ @media (min-width: map-get($grid-breakpoints, md)) {
11
+ min-height: getSpacer(xl);
12
+ }
13
+ }
14
+
15
+ $transition: 0.4s linear 0s;
16
+
17
+ /**
18
+ * Bredde og høyde på markør
19
+ */
20
+ $markerSize: 24px;
21
+
22
+ /**
23
+ * Bredde og høyde på prikk
24
+ */
25
+ $dotSize: 8px;
26
+
27
+ /**
28
+ * Høyde på progressbar
29
+ */
30
+ $progressbarHeight: 12px;
31
+
32
+ /**
33
+ * Horisontal padding på progressbar
34
+ */
35
+ $progressbarPaddingX: 8px;
36
+
37
+ /**
38
+ * Avstand fra venstre kant av progressbar til midten av første prikk
39
+ */
40
+ $dotOffset: calc($progressbarPaddingX + $dotSize / 2);
41
+
42
+ .progressbar {
43
+ flex-grow: 1;
44
+ position: relative;
45
+ display: block;
46
+ height: $progressbarHeight;
47
+ border-radius: 4px;
48
+ background: linear-gradient(to right, $blueberry600, $blueberry600 $dotOffset, $blueberry50 $dotOffset, $blueberry50), $blueberry600;
49
+ background-repeat: no-repeat;
50
+ transition: background-position $transition;
51
+
52
+ &__marker {
53
+ position: absolute;
54
+ width: $markerSize;
55
+ height: $markerSize;
56
+ top: calc(($progressbarHeight - $markerSize) / 2);
57
+ background-color: $white;
58
+ border: 6px solid $blueberry600;
59
+ border-radius: 50%;
60
+ transition: left $transition;
61
+ }
62
+
63
+ &__number {
64
+ min-width: 2.5rem;
65
+ text-align: right;
66
+ margin-left: getSpacer(xs);
67
+ font-size: $font-size-xs;
68
+ line-height: $lineheight-size-xs;
69
+ font-weight: 700;
70
+ color: $blueberry700;
71
+ }
72
+
73
+ &__dot {
74
+ position: absolute;
75
+ top: calc(($progressbarHeight - $dotSize) / 2);
76
+ width: $dotSize;
77
+ height: $dotSize;
78
+ background-color: $blueberry600;
79
+ border-radius: 50%;
80
+ transition: background-color $transition;
81
+ &--completed {
82
+ background-color: $blueberry50;
83
+ }
84
+ &--left {
85
+ left: $dotOffset;
86
+ }
87
+ &--right {
88
+ right: $dotOffset;
89
+ }
90
+ }
91
+ }
@@ -0,0 +1,16 @@
1
+ export type Styles = {
2
+ progressbar: string;
3
+ progressbar__dot: string;
4
+ 'progressbar__dot--completed': string;
5
+ 'progressbar__dot--left': string;
6
+ 'progressbar__dot--right': string;
7
+ progressbar__marker: string;
8
+ progressbar__number: string;
9
+ 'progressbar-wrapper': string;
10
+ };
11
+
12
+ export type ClassNames = keyof Styles;
13
+
14
+ declare const styles: Styles;
15
+
16
+ export default styles;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Horisontal padding på progressbar
3
+ */
4
+ export declare const PROGRESS_BAR_PADDING_X_PX = 8;
5
+ /**
6
+ * Valider at minimum-verdi er innenfor gyldig område
7
+ * @param min Mimimum-verdi
8
+ * @param max Maksimum-verdi
9
+ * @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi
10
+ */
11
+ export declare const getValidatedMin: (min: number, max: number) => number;
12
+ /**
13
+ * Valider at maksimum-verdi er innenfor gyldig område
14
+ * @param min Mimimum-verdi
15
+ * @param max Maksimum-verdi
16
+ * @returns Maksimum-verdi, ikke mindre enn minimum-verdi
17
+ */
18
+ export declare const getValidatedMax: (min: number, max: number) => number;
19
+ /**
20
+ * Valider at verdi er innenfor gyldig område
21
+ * @param value Nåværende verdi
22
+ * @param min Mimimum-verdi
23
+ * @param max Maksimum-verdi
24
+ * @returns Verdi, ikke mindre enn 0, ikke mer enn max
25
+ */
26
+ export declare const getValidatedValue: (value: number | undefined, min: number, max: number) => number;
27
+ /**
28
+ * Finn antall prikker det er plass til
29
+ * @param progressbarWidth Bredde på progressbar
30
+ * @returns Antall prikker
31
+ */
32
+ export declare const getMaximumDots: (progressbarWidth: number) => number;
33
+ /**
34
+ * Beregn riktig distance mellom prikker
35
+ * @param progressbarWidth Bredde på progressbar
36
+ * @param dots Antall prikker som skal vises
37
+ * @returns Distanse mellom prikker
38
+ */
39
+ export declare const getDistanceBetweenDots: (progressbarWidth: number, dots: number) => number;
40
+ /**
41
+ * Beregn riktig plassering av markør
42
+ * @param distanceBetweenDots Distanse mellom prikker
43
+ * @param index Nåværende verdi i progressbar
44
+ * @returns Plassering til markør fra venstre
45
+ */
46
+ export declare const getMarkerPosition: (distanceBetweenDots: number, index: number) => number;
47
+ /**
48
+ * Lag liste med tillate verdier fra min til maks
49
+ * @param min Mimimum-verdi
50
+ * @param max Maksimum-verdi
51
+ * @returns Liste med verdier
52
+ */
53
+ export declare const getAllowedValues: (min: number, max: number) => number[];
54
+ /**
55
+ * Valider props som skal brukes til beregning av posisjon m.m.
56
+ * @param value Nåværende verdi
57
+ * @param min Mimimum-verdi
58
+ * @param max Maksimum-verdi
59
+ * @returns Objekt med gyldige verdier
60
+ */
61
+ export declare const getValidatedProps: (value: number | undefined, min: number, max: number) => {
62
+ validatedValue: number;
63
+ validatedMin: number;
64
+ validatedMax: number;
65
+ };
66
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Progressbar/utils.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,OAAO,MAAM,KAAG,MAAqC,CAAC;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,OAAO,MAAM,KAAG,MAAiC,CAAC;AAE7F;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAW,MAAM,GAAG,SAAS,OAAO,MAAM,OAAO,MAAM,KAAG,MAMvF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,qBAAsB,MAAM,KAAG,MACqB,CAAC;AAEhF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,qBAAsB,MAAM,QAAQ,MAAM,KAAG,MAA2D,CAAC;AAE5I;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,wBAAyB,MAAM,SAAS,MAAM,KAAG,MAAqC,CAAC;AAErH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAS,MAAM,OAAO,MAAM,KAAG,MAAM,EAAiE,CAAC;AAEpI;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UACrB,MAAM,GAAG,SAAS,OACpB,MAAM,OACN,MAAM;oBACQ,MAAM;kBAAgB,MAAM;kBAAgB,MAAM;CAMtE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,gBAAgB,qBAAqB;IACrC;;OAEG;IACH,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,gBAAgB;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK,+DAMf,KAAK,gBAcP,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAStC,oBAAY,oBAAoB;IAC9B;;OAEG;IACH,gBAAgB,qBAAqB;IACrC;;OAEG;IACH,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,gBAAgB;IAChB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0BAA0B;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,KAAK,+DAMf,KAAK,gBAgBP,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- import r from"react";import s from"classnames";import t from"./styles.module.scss";import{AnalyticsId as c}from"../../constants.js";import{H as b}from"../../HorizontalScroll.js";import{T as P}from"../../TableBody.js";import{T as U,a as W}from"../../TableCell.js";import{T as Y}from"../../TableExpandedRow.js";import{T as _}from"../../TableExpanderCell.js";import{H as V,T as oo}from"../../TableHead.js";import{S as to,T as ao}from"../../TableHeadCell.js";import{T as lo}from"../../TableRow.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../HorizontalScroll/styles.module.scss";import"../../Button.js";import"../../uuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../../hooks/useSize.js";import"../../debounce.js";import"../Icons/ChevronUp.js";import"../Icons/ChevronDown.js";import"../Icons/ArrowUp.js";import"../Icons/ArrowDown.js";var n=(o=>(o.horizontalscroll="horizontalscroll",o.block="block",o))(n||{});const L=function({id:a,testId:e,className:l,children:m,smallViewportVariant:i="horizontalscroll"}){const p=s(t.table,{[t["table--collapse2col"]]:i==="block"},l);return r.createElement(b,null,r.createElement("table",{className:p,id:a,"data-testid":e,"data-analyticsid":c.Table},m))};export{V as HeaderCategory,n as SmallViewportVariant,to as SortDirection,L as Table,P as TableBody,U as TableCell,Y as TableExpandedRow,_ as TableExpanderCell,oo as TableHead,ao as TableHeadCell,lo as TableRow,W as TextAlign,L as default};
1
+ import r,{useRef as b}from"react";import n from"classnames";import e from"./styles.module.scss";import{AnalyticsId as f}from"../../constants.js";import{H as T}from"../../HorizontalScroll.js";import{useSize as d}from"../../hooks/useSize.js";import{T as X}from"../../TableBody.js";import{T as Z,a as _}from"../../TableCell.js";import{T as V}from"../../TableExpandedRow.js";import{T as to}from"../../TableExpanderCell.js";import{H as eo,T as ao}from"../../TableHead.js";import{S as mo,T as io}from"../../TableHeadCell.js";import{T as so}from"../../TableRow.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../HorizontalScroll/styles.module.scss";import"../../debounce.js";import"../../Button.js";import"../../uuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../hooks/useHover.js";import"../../hooks/useIcons.js";import"../../hooks/useBreakpoint.js";import"../Button/styles.module.scss";import"../Icons/ArrowRight.js";import"../Icons/ChevronUp.js";import"../Icons/ChevronDown.js";import"../Icons/ArrowUp.js";import"../Icons/ArrowDown.js";var x=(o=>(o.horizontalscroll="horizontalscroll",o.block="block",o))(x||{});const P=function({id:a,testId:l,className:m,children:i,smallViewportVariant:p="horizontalscroll"}){const t=b(null),{width:s=0}=d(t)||{},c=n(e.table,{[e["table--collapse2col"]]:p==="block"},m);return r.createElement(T,{childWidth:s},r.createElement("table",{className:c,id:a,"data-testid":l,"data-analyticsid":f.Table,ref:t},i))};export{eo as HeaderCategory,x as SmallViewportVariant,mo as SortDirection,P as Table,X as TableBody,Z as TableCell,V as TableExpandedRow,to as TableExpanderCell,ao as TableHead,io as TableHeadCell,so as TableRow,_ as TextAlign,P as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["import React from 'react';\nimport classNames from 'classnames';\n\nimport tableStyles from './styles.module.scss';\n\nimport { AnalyticsId } from '../../constants';\nimport HorizontalScroll from '../HorizontalScroll';\n\nexport enum SmallViewportVariant {\n /**\n * Show horizontal scrollbar when table is too big for the screen\n */\n horizontalscroll = 'horizontalscroll',\n /**\n * Collapse to two columns on small screens\n */\n block = 'block',\n}\n\nexport interface Props {\n /** Unique ID */\n id?: string;\n /** Id used for testing */\n testId?: string;\n /** Type of table view om small devices */\n smallViewportVariant?: SmallViewportVariant;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the table. Use TableHead and TableBody */\n children: React.ReactNode;\n}\n\nexport const Table = function Table({\n id,\n testId,\n className,\n children,\n smallViewportVariant = SmallViewportVariant.horizontalscroll,\n}: Props) {\n const tableClass = classNames(\n tableStyles['table'],\n { [tableStyles['table--collapse2col']]: smallViewportVariant === SmallViewportVariant.block },\n className\n );\n\n return (\n <HorizontalScroll>\n <table className={tableClass} id={id} data-testid={testId} data-analyticsid={AnalyticsId.Table}>\n {children}\n </table>\n </HorizontalScroll>\n );\n};\n\nexport default Table;\n"],"names":["SmallViewportVariant","Table","id","testId","className","children","smallViewportVariant","tableClass","classNames","tableStyles","React","HorizontalScroll","AnalyticsId"],"mappings":"2sCAQY,IAAAA,GAAAA,IAIVA,EAAA,iBAAmB,mBAInBA,EAAA,MAAQ,QAREA,IAAAA,GAAA,CAAA,CAAA,EAwBC,MAAAC,EAAQ,SAAe,CAClC,GAAAC,EACA,OAAAC,EACA,UAAAC,EACA,SAAAC,EACA,qBAAAC,EAAuB,kBACzB,EAAU,CACR,MAAMC,EAAaC,EACjBC,EAAY,MACZ,CAAE,CAACA,EAAY,wBAAyBH,IAAyB,OAA2B,EAC5FF,CAAA,EAIA,OAAAM,EAAA,cAACC,OACED,EAAA,cAAA,QAAA,CAAM,UAAWH,EAAY,GAAAL,EAAQ,cAAaC,EAAQ,mBAAkBS,EAAY,KAAA,EACtFP,CACH,CACF,CAEJ"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Table/Table.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport classNames from 'classnames';\n\nimport tableStyles from './styles.module.scss';\n\nimport { AnalyticsId } from '../../constants';\nimport HorizontalScroll from '../HorizontalScroll';\nimport { useSize } from '../../hooks/useSize';\n\nexport enum SmallViewportVariant {\n /**\n * Show horizontal scrollbar when table is too big for the screen\n */\n horizontalscroll = 'horizontalscroll',\n /**\n * Collapse to two columns on small screens\n */\n block = 'block',\n}\n\nexport interface Props {\n /** Unique ID */\n id?: string;\n /** Id used for testing */\n testId?: string;\n /** Type of table view om small devices */\n smallViewportVariant?: SmallViewportVariant;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the content of the table. Use TableHead and TableBody */\n children: React.ReactNode;\n}\n\nexport const Table = function Table({\n id,\n testId,\n className,\n children,\n smallViewportVariant = SmallViewportVariant.horizontalscroll,\n}: Props) {\n const tableRef = useRef<HTMLTableElement>(null);\n const { width: tableWidth = 0 } = useSize(tableRef) || {};\n const tableClass = classNames(\n tableStyles['table'],\n { [tableStyles['table--collapse2col']]: smallViewportVariant === SmallViewportVariant.block },\n className\n );\n\n return (\n <HorizontalScroll childWidth={tableWidth}>\n <table className={tableClass} id={id} data-testid={testId} data-analyticsid={AnalyticsId.Table} ref={tableRef}>\n {children}\n </table>\n </HorizontalScroll>\n );\n};\n\nexport default Table;\n"],"names":["SmallViewportVariant","Table","id","testId","className","children","smallViewportVariant","tableRef","useRef","tableWidth","useSize","tableClass","classNames","tableStyles","React","HorizontalScroll","AnalyticsId"],"mappings":"4uCASY,IAAAA,GAAAA,IAIVA,EAAA,iBAAmB,mBAInBA,EAAA,MAAQ,QAREA,IAAAA,GAAA,CAAA,CAAA,EAwBC,MAAAC,EAAQ,SAAe,CAClC,GAAAC,EACA,OAAAC,EACA,UAAAC,EACA,SAAAC,EACA,qBAAAC,EAAuB,kBACzB,EAAU,CACF,MAAAC,EAAWC,EAAyB,IAAI,EACxC,CAAE,MAAOC,EAAa,GAAMC,EAAQH,CAAQ,GAAK,GACjDI,EAAaC,EACjBC,EAAY,MACZ,CAAE,CAACA,EAAY,wBAAyBP,IAAyB,OAA2B,EAC5FF,CAAA,EAGF,OACGU,EAAA,cAAAC,EAAA,CAAiB,WAAYN,CAAA,EAC3BK,EAAA,cAAA,QAAA,CAAM,UAAWH,EAAY,GAAAT,EAAQ,cAAaC,EAAQ,mBAAkBa,EAAY,MAAO,IAAKT,CAAA,EAClGF,CACH,CACF,CAEJ"}
@@ -178,12 +178,15 @@ table tbody tr {
178
178
  }
179
179
 
180
180
  .table__head-cell {
181
+ // Fix for firefox hover feil
182
+ background-clip: padding-box;
183
+
181
184
  height: 3.625rem;
182
185
  font-size: $font-size-sm;
183
- line-height: 1.5rem;
186
+ line-height: $lineheight-size-xs;
184
187
  text-align: left;
185
188
  vertical-align: bottom;
186
- font-weight: 200;
189
+ font-weight: 700;
187
190
  padding: 0.5rem 0.75rem;
188
191
  border: 1px solid $neutral500;
189
192
 
@@ -209,8 +212,8 @@ table tbody tr {
209
212
  padding: 1rem;
210
213
  height: 5.5rem;
211
214
  font-size: $font-size-md;
212
- line-height: 1.75rem;
213
- font-weight: 200;
215
+ line-height: $lineheight-size-sm;
216
+ font-weight: 700;
214
217
  }
215
218
  }
216
219
 
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAAE,QAAQ,EAAe,MAAM,iBAAiB,CAAC;AAIxD,UAAU,aACR,SAAQ,IAAI,CACV,KAAK,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,EAC9C,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,cAAc,GAAG,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,cAAc,CAC9G;IACD,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kDAAkD;IAClD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAA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,MAAM,CAAC;IACnB,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACtC;AAUD,QAAA,MAAM,QAAQ,2FA+IZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../Textarea.js";import{T as j}from"../../Textarea.js";import"react";import"classnames";import"./styles.module.scss";import"../../constants.js";import"../../uuid.js";import"../../Input.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useBreakpoint.js";import"../Input/styles.module.scss";export{j as default};
1
+ import"../../Textarea.js";import{T as n}from"../../Textarea.js";import"react";import"classnames";import"./styles.module.scss";import"../../constants.js";import"../../uuid.js";import"../../Input.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useBreakpoint.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../Input/styles.module.scss";export{n as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import"../../Validation.js";import{V as D,V as E}from"../../Validation.js";import"react";import"classnames";import"../../FormGroup.js";import"../FormGroup/styles.module.scss";import"../../Checkbox.js";import"../../uuid.js";import"../Icons/Check.js";import"../Icons/Icon.js";import"../../constants.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Checkbox/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../Input/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";import"./styles.module.scss";export{D as Validation,E as default};
1
+ import"../../Validation.js";import{V as F,V as G}from"../../Validation.js";import"react";import"classnames";import"../../FormGroup.js";import"../FormGroup/styles.module.scss";import"../../Checkbox.js";import"../../uuid.js";import"../Icons/Check.js";import"../Icons/Icon.js";import"../../constants.js";import"../../hooks/useUuid.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Checkbox/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../Input/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";import"./styles.module.scss";export{F as Validation,G as default};
2
2
  //# sourceMappingURL=index.js.map
package/constants.d.ts CHANGED
@@ -75,6 +75,7 @@ export declare enum AnalyticsId {
75
75
  Panel = "panel",
76
76
  PanelList = "panel-list",
77
77
  Portal = "portal",
78
+ Progressbar = "progressbar",
78
79
  RadioButton = "radio-button",
79
80
  Slider = "slider",
80
81
  Spacer = "spacer",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,E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