@helsenorge/designsystem-react 2.5.0 → 2.6.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 (76) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/Checkbox.js +1 -1
  3. package/Checkbox.js.map +1 -1
  4. package/FormGroup.js +1 -1
  5. package/FormGroup.js.map +1 -1
  6. package/HelpBubble.js +1 -1
  7. package/HelpBubble.js.map +1 -1
  8. package/Input.js +1 -1
  9. package/Input.js.map +1 -1
  10. package/RadioButton.js +1 -1
  11. package/RadioButton.js.map +1 -1
  12. package/Select.js +1 -1
  13. package/Select.js.map +1 -1
  14. package/Textarea.js +1 -1
  15. package/Textarea.js.map +1 -1
  16. package/components/ButtonWithModal/index.js +1 -1
  17. package/components/ButtonWithModal/index.js.map +1 -1
  18. package/components/Checkbox/Checkbox.d.ts +1 -1
  19. package/components/Checkbox/Checkbox.d.ts.map +1 -1
  20. package/components/Checkbox/componentdata.json +1 -1
  21. package/components/Dropdown/Dropdown.d.ts.map +1 -1
  22. package/components/Dropdown/index.js +1 -1
  23. package/components/Dropdown/index.js.map +1 -1
  24. package/components/FormExample/FormExample.d.ts.map +1 -1
  25. package/components/FormExample/index.js +3 -3
  26. package/components/FormExample/index.js.map +1 -1
  27. package/components/FormGroup/FormGroup.d.ts.map +1 -1
  28. package/components/HelpBubble/HelpBubble.d.ts +1 -1
  29. package/components/HelpBubble/HelpBubble.d.ts.map +1 -1
  30. package/components/HelpBubble/componentdata.json +1 -1
  31. package/components/HelpBubble/index.js +1 -1
  32. package/components/HelpBubble/styles.module.scss +1 -1
  33. package/components/HelpBubbleExample/index.js +1 -1
  34. package/components/HelpBubbleExample/index.js.map +1 -1
  35. package/components/Input/Input.d.ts.map +1 -1
  36. package/components/Modal/index.js +1 -1
  37. package/components/RadioButton/RadioButton.d.ts.map +1 -1
  38. package/components/Select/Select.d.ts.map +1 -1
  39. package/components/Textarea/Textarea.d.ts +1 -1
  40. package/components/Textarea/Textarea.d.ts.map +1 -1
  41. package/components/Textarea/componentdata.json +1 -1
  42. package/components/Tooltip/index.js +1 -1
  43. package/components/TooltipExample/index.js +1 -1
  44. package/components/TooltipExample/index.js.map +1 -1
  45. package/hooks/useElementList.d.ts +9 -0
  46. package/hooks/useElementList.d.ts.map +1 -0
  47. package/hooks/useElementList.js +2 -0
  48. package/hooks/useElementList.js.map +1 -0
  49. package/hooks/useFocusToggle.d.ts.map +1 -1
  50. package/hooks/useFocusToggle.js +1 -1
  51. package/hooks/useFocusToggle.js.map +1 -1
  52. package/hooks/useFocusTrap.js +1 -1
  53. package/hooks/useFocusTrap.js.map +1 -1
  54. package/hooks/useFocusableElements.d.ts.map +1 -1
  55. package/hooks/useFocusableElements.js +1 -1
  56. package/hooks/useFocusableElements.js.map +1 -1
  57. package/hooks/useHover.d.ts +5 -6
  58. package/hooks/useHover.d.ts.map +1 -1
  59. package/hooks/useHover.js +1 -1
  60. package/hooks/useHover.js.map +1 -1
  61. package/hooks/useKeyboardEvent.d.ts +10 -1
  62. package/hooks/useKeyboardEvent.d.ts.map +1 -1
  63. package/hooks/useKeyboardEvent.js +1 -1
  64. package/hooks/useKeyboardEvent.js.map +1 -1
  65. package/hooks/useOutsideEvent.d.ts +1 -4
  66. package/hooks/useOutsideEvent.d.ts.map +1 -1
  67. package/hooks/useOutsideEvent.js +1 -1
  68. package/hooks/useOutsideEvent.js.map +1 -1
  69. package/index.js +1 -1
  70. package/package.json +1 -1
  71. package/{hooks/focus-utils.d.ts → utils/focus.d.ts} +1 -1
  72. package/utils/focus.d.ts.map +1 -0
  73. package/{hooks/focus-utils.js → utils/focus.js} +1 -1
  74. package/utils/focus.js.map +1 -0
  75. package/hooks/focus-utils.d.ts.map +0 -1
  76. package/hooks/focus-utils.js.map +0 -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;AAQrE,oBAAY,aAAa,GAAG,UAAU,GAAG,KAAK,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,2CAA2C;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,uFAyFpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
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;AAQrE,oBAAY,aAAa,GAAG,UAAU,GAAG,KAAK,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,2CAA2C;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,uFAwFpB,CAAC;AAEH,eAAe,SAAS,CAAC"}
@@ -35,6 +35,6 @@ export interface HelpBubbleProps {
35
35
  /** Sets the data-testid attribute. */
36
36
  testId?: string;
37
37
  }
38
- declare const HelpBubble: React.FC<HelpBubbleProps>;
38
+ declare const HelpBubble: React.ForwardRefExoticComponent<HelpBubbleProps & React.RefAttributes<HTMLDivElement>>;
39
39
  export default HelpBubble;
40
40
  //# sourceMappingURL=HelpBubble.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HelpBubble.d.ts","sourceRoot":"","sources":["../../../src/components/HelpBubble/HelpBubble.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAa3D,oBAAY,iBAAiB;IAC3B,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,aAAK,cAAc,GAAG,SAAS,CAAC;AAEhC,MAAM,WAAW,eAAe;IAC9B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yHAAyH;IACzH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,aAAa,CAAC,CAAC;IAC5D,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,OAAO,iBAAiB,CAAC;IACzC,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA2GzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"HelpBubble.d.ts","sourceRoot":"","sources":["../../../src/components/HelpBubble/HelpBubble.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAc3D,oBAAY,iBAAiB;IAC3B,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,aAAK,cAAc,GAAG,SAAS,CAAC;AAEhC,MAAM,WAAW,eAAe;IAC9B,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yHAAyH;IACzH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,aAAa,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,aAAa,CAAC,CAAC;IAC5D,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,OAAO,iBAAiB,CAAC;IACzC,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6FAA6F;IAC7F,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,UAAU,wFA2Gd,CAAC;AAIH,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"props":{"helpBubbleId":{"defaultValue":null,"description":"Id of the HelpBubble","name":"helpBubbleId","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Content shown inside HelpBubble. Note that if role=\"tooltip\", you must not include interactive/focusable elements.","name":"children","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"ReactNode"}},"controllerRef":{"defaultValue":null,"description":"Ref for the element the HelpBubble is placed upon","name":"controllerRef","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":true,"type":{"name":"RefObject<HTMLElement | SVGSVGElement>"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":null,"description":"Determines the placement of the helpbubble. Default: automatic positioning.","name":"variant","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"enum","raw":"\"positionautomatic\" | \"positionbelow\" | \"positionabove\"","value":[{"value":"\"positionautomatic\""},{"value":"\"positionbelow\""},{"value":"\"positionabove\""}]}},"showBubble":{"defaultValue":null,"description":"Show the bubble. Default: false.","name":"showBubble","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"boolean"}},"noCloseButton":{"defaultValue":null,"description":"Hide the close button in the bubble. Close button is never rendered if role=\"tooltip\".","name":"noCloseButton","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"boolean"}},"linkText":{"defaultValue":null,"description":"Visible text on the link. Link is never rendered if role=\"tooltip\".","name":"linkText","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"linkUrl":{"defaultValue":null,"description":"Url the link leads to","name":"linkUrl","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"onLinkClick":{"defaultValue":null,"description":"Function is called when link is clicked","name":"onLinkClick","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"(() => void)"}},"onClose":{"defaultValue":null,"description":"Function is called when user clicks the button","name":"onClose","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"(() => void)"}},"closeAriaLabel":{"defaultValue":null,"description":"aria-label to be passed onto Close","name":"closeAriaLabel","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"Sets role of the HelpBubble element. If set to \"tooltip\",","name":"role","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"enum","raw":"\"tooltip\"","value":[{"value":"\"tooltip\""}]}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}}}}
1
+ {"props":{"helpBubbleId":{"defaultValue":null,"description":"Id of the HelpBubble","name":"helpBubbleId","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"children":{"defaultValue":null,"description":"Content shown inside HelpBubble. Note that if role=\"tooltip\", you must not include interactive/focusable elements.","name":"children","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":true,"type":{"name":"ReactNode"}},"controllerRef":{"defaultValue":null,"description":"Ref for the element the HelpBubble is placed upon","name":"controllerRef","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":true,"type":{"name":"RefObject<HTMLElement | SVGSVGElement>"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"variant":{"defaultValue":null,"description":"Determines the placement of the helpbubble. Default: automatic positioning.","name":"variant","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"enum","raw":"\"positionautomatic\" | \"positionbelow\" | \"positionabove\"","value":[{"value":"\"positionautomatic\""},{"value":"\"positionbelow\""},{"value":"\"positionabove\""}]}},"showBubble":{"defaultValue":null,"description":"Show the bubble. Default: false.","name":"showBubble","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"boolean"}},"noCloseButton":{"defaultValue":null,"description":"Hide the close button in the bubble. Close button is never rendered if role=\"tooltip\".","name":"noCloseButton","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"boolean"}},"linkText":{"defaultValue":null,"description":"Visible text on the link. Link is never rendered if role=\"tooltip\".","name":"linkText","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"linkUrl":{"defaultValue":null,"description":"Url the link leads to","name":"linkUrl","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"onLinkClick":{"defaultValue":null,"description":"Function is called when link is clicked","name":"onLinkClick","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"(() => void)"}},"onClose":{"defaultValue":null,"description":"Function is called when user clicks the button","name":"onClose","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"(() => void)"}},"closeAriaLabel":{"defaultValue":null,"description":"aria-label to be passed onto Close","name":"closeAriaLabel","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}},"role":{"defaultValue":null,"description":"Sets role of the HelpBubble element. If set to \"tooltip\",","name":"role","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"enum","raw":"\"tooltip\"","value":[{"value":"\"tooltip\""}]}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"},"declarations":[{"fileName":"src/components/HelpBubble/HelpBubble.tsx","name":"HelpBubbleProps"}],"required":false,"type":{"name":"string"}}}}
@@ -1,2 +1,2 @@
1
- import"../../HelpBubble.js";import{a as D,H as E}from"../../HelpBubble.js";import"classnames";import"react";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"./styles.module.scss";export{D as HelpBubbleVariant,E as default};
1
+ import"../../HelpBubble.js";import{a as E,H as F}from"../../HelpBubble.js";import"classnames";import"react";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"./styles.module.scss";export{E as HelpBubbleVariant,F as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -74,7 +74,7 @@
74
74
  position: fixed;
75
75
  border-style: solid;
76
76
  border-color: transparent;
77
- z-index: 4;
77
+ z-index: 3;
78
78
 
79
79
  &--over {
80
80
  border-width: 10px 10px;
@@ -1,2 +1,2 @@
1
- import i,{useRef as o}from"react";import{H as r}from"../../HelpBubble.js";import"classnames";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../HelpBubble/styles.module.scss";const V=e=>{const t=o(null);return i.createElement("div",null,i.createElement("span",null,"Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non."),i.createElement("div",{style:{position:"relative",display:"inline"}},i.createElement("span",{ref:t,style:{display:"inline-block",color:"red"}},"Jeg er en tooltip tekst."),i.createElement(r,{...e,onClose:()=>{alert("Bubble closed")},controllerRef:t},e.children)),i.createElement("span",null,"Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non."))};export{V as default};
1
+ import i,{useRef as o}from"react";import{H as r}from"../../HelpBubble.js";import"classnames";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../HelpBubble/styles.module.scss";const J=e=>{const t=o(null);return i.createElement("div",null,i.createElement("span",null,"Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non."),i.createElement("div",{style:{position:"relative",display:"inline"}},i.createElement("span",{ref:t,style:{display:"inline-block",color:"red"}},"Jeg er en tooltip tekst."),i.createElement(r,{...e,onClose:()=>{alert("Bubble closed")},controllerRef:t},e.children)),i.createElement("span",null,"Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non."))};export{J as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/HelpBubbleExample/HelpBubbleExample.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport HelpBubble, { HelpBubbleProps } from '../HelpBubble/HelpBubble';\n\nconst HelpBubbleExample: React.FC<HelpBubbleProps> = props => {\n const controllerRef = useRef<HTMLSpanElement>(null);\n\n return (\n <div>\n <span>\n {\n 'Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non.'\n }\n </span>\n <div style={{ position: 'relative', display: 'inline' }}>\n <span ref={controllerRef} style={{ display: 'inline-block', color: 'red' }}>\n {'Jeg er en tooltip tekst.'}\n </span>\n <HelpBubble\n {...props}\n onClose={() => {\n alert('Bubble closed');\n }}\n controllerRef={controllerRef}\n >\n {props.children}\n </HelpBubble>\n </div>\n <span>\n {\n 'Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non.'\n }\n </span>\n </div>\n );\n};\n\nexport default HelpBubbleExample;\n"],"names":["HelpBubbleExample","props","controllerRef","useRef","React","HelpBubble"],"mappings":"o4BAIA,MAAMA,EAAwDC,GAAA,CACtD,MAAAC,EAAgBC,EAAwB,IAAI,EAElD,uBACG,MACC,KAAAC,EAAA,cAAC,OAEG,KAAA,+pBAEJ,EACCA,EAAA,cAAA,MAAA,CAAI,MAAO,CAAE,SAAU,WAAY,QAAS,QAAS,CAAA,EACnDA,EAAA,cAAA,OAAA,CAAK,IAAKF,EAAe,MAAO,CAAE,QAAS,eAAgB,MAAO,KAAM,CACtE,EAAA,0BACH,EACCE,EAAA,cAAAC,EAAA,CACE,GAAGJ,EACJ,QAAS,IAAM,CACb,MAAM,eAAe,CACvB,EACA,cAAAC,CAAA,EAECD,EAAM,QACT,CACF,EACCG,EAAA,cAAA,OAAA,KAEG,+pBAEJ,CACF,CAEJ"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/HelpBubbleExample/HelpBubbleExample.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport HelpBubble, { HelpBubbleProps } from '../HelpBubble/HelpBubble';\n\nconst HelpBubbleExample: React.FC<HelpBubbleProps> = props => {\n const controllerRef = useRef<HTMLSpanElement>(null);\n\n return (\n <div>\n <span>\n {\n 'Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non.'\n }\n </span>\n <div style={{ position: 'relative', display: 'inline' }}>\n <span ref={controllerRef} style={{ display: 'inline-block', color: 'red' }}>\n {'Jeg er en tooltip tekst.'}\n </span>\n <HelpBubble\n {...props}\n onClose={() => {\n alert('Bubble closed');\n }}\n controllerRef={controllerRef}\n >\n {props.children}\n </HelpBubble>\n </div>\n <span>\n {\n 'Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non.'\n }\n </span>\n </div>\n );\n};\n\nexport default HelpBubbleExample;\n"],"names":["HelpBubbleExample","props","controllerRef","useRef","React","HelpBubble"],"mappings":"g6BAIA,MAAMA,EAAwDC,GAAA,CACtD,MAAAC,EAAgBC,EAAwB,IAAI,EAElD,uBACG,MACC,KAAAC,EAAA,cAAC,OAEG,KAAA,+pBAEJ,EACCA,EAAA,cAAA,MAAA,CAAI,MAAO,CAAE,SAAU,WAAY,QAAS,QAAS,CAAA,EACnDA,EAAA,cAAA,OAAA,CAAK,IAAKF,EAAe,MAAO,CAAE,QAAS,eAAgB,MAAO,KAAM,CACtE,EAAA,0BACH,EACCE,EAAA,cAAAC,EAAA,CACE,GAAGJ,EACJ,QAAS,IAAM,CACb,MAAM,eAAe,CACvB,EACA,cAAAC,CAAA,EAECD,EAAM,QACT,CACF,EACCG,EAAA,cAAA,OAAA,KAEG,+pBAEJ,CACF,CAEJ"}
@@ -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,EAA2C,MAAM,iBAAiB,CAAC;AAEjG,OAAa,EAAY,OAAO,EAAE,MAAM,UAAU,CAAC;AAQnD,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,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;AAUD,QAAA,MAAM,KAAK,qFAuGT,CAAC;AAEH,eAAe,KAAK,CAAC"}
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,EAA2C,MAAM,iBAAiB,CAAC;AAEjG,OAAa,EAAY,OAAO,EAAE,MAAM,UAAU,CAAC;AAQnD,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,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;AAUD,QAAA,MAAM,KAAK,qFAyGT,CAAC;AAEH,eAAe,KAAK,CAAC"}
@@ -1,2 +1,2 @@
1
- import"../../Modal.js";import{b as L,a as N,M as O}from"../../Modal.js";import"react";import"classnames";import"../../theme/palette.js";import"../../Button.js";import"../../constants.js";import"../../utils/environment.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.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"../../utils/debounce.js";import"./styles.module.scss";import"../Icons/AlertSignStroke.js";import"../Icons/AlertSignFill.js";import"../../hooks/useFocusTrap.js";import"../../hooks/focus-utils.js";import"../../hooks/useFocusableElements.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../Title.js";import"../Title/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../Icons/CheckOutline.js";import"../Portal/index.js";import"react-dom";export{L as ModalSize,N as ModalVariants,O as default};
1
+ import"../../Modal.js";import{b as N,a as O,M as P}from"../../Modal.js";import"react";import"classnames";import"../../theme/palette.js";import"../../Button.js";import"../../constants.js";import"../../utils/environment.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.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"../../utils/debounce.js";import"./styles.module.scss";import"../Icons/AlertSignStroke.js";import"../Icons/AlertSignFill.js";import"../../hooks/useFocusTrap.js";import"../../utils/focus.js";import"../../hooks/useFocusableElements.js";import"../../hooks/useElementList.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../Title.js";import"../Title/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../Icons/CheckOutline.js";import"../Portal/index.js";import"react-dom";export{N as ModalSize,O as ModalVariants,P as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAe,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,gBAAgB,GAAG,UAAU,CAAC;IACxH,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,oHAAoH;IACpH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,2FAkEtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAe,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,gBAAgB,GAAG,UAAU,CAAC;IACxH,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,oHAAoH;IACpH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,2FAoEtB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAA2C,QAAQ,EAAY,MAAM,iBAAiB,CAAC;AAO9F,aAAK,aAAa,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE9C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IAClI,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,yHAAyH;IACzH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAaD,eAAO,MAAM,MAAM,uFAyEjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAA2C,QAAQ,EAAY,MAAM,iBAAiB,CAAC;AAO9F,aAAK,aAAa,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE9C,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,CAAC;IAClI,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACrC,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,CAAC;IAC7B,yHAAyH;IACzH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAaD,eAAO,MAAM,MAAM,uFA2EjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { FormMode } from '../../constants';
3
- interface TextareaProps extends Pick<React.InputHTMLAttributes<HTMLTextAreaElement>, 'autoFocus' | 'disabled' | 'name' | 'autoComplete' | 'placeholder' | 'readOnly' | 'required' | 'defaultValue'> {
3
+ interface TextareaProps extends Pick<React.InputHTMLAttributes<HTMLTextAreaElement>, 'autoFocus' | 'disabled' | 'name' | 'autoComplete' | 'placeholder' | 'readOnly' | 'required' | 'defaultValue' | 'onChange'> {
4
4
  /** max character limit in textarea */
5
5
  maxCharacters?: number;
6
6
  /** The text is displayed in the end of the text-counter */
@@ -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,EAA2C,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIpF,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,CAAC,EAAE,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
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAI3D,OAAO,EAA2C,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAIpF,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,GAAG,UAAU,CAC3H;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,CAAC,EAAE,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,2FAyJZ,CAAC;AAEH,eAAe,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"props":{"maxCharacters":{"defaultValue":null,"description":"max character limit in textarea","name":"maxCharacters","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"maxText":{"defaultValue":null,"description":"The text is displayed in the end of the text-counter","name":"maxText","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"width":{"defaultValue":null,"description":"Width of textarea in characters (approximate)","name":"width","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"marginBottom":{"defaultValue":null,"description":"If true, the component will have a bottom margin.","name":"marginBottom","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"boolean"}},"transparent":{"defaultValue":null,"description":"If true, the component will be transparent.","name":"transparent","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"boolean"}},"mode":{"defaultValue":null,"description":"Changes the visuals of the textarea","name":"mode","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"enum","raw":"\"onwhite\" | \"ongrey\" | \"onblueberry\" | \"ondark\" | \"oninvalid\"","value":[{"value":"\"onwhite\""},{"value":"\"ongrey\""},{"value":"\"onblueberry\""},{"value":"\"ondark\""},{"value":"\"oninvalid\""}]}},"label":{"defaultValue":null,"description":"Label of the input","name":"label","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"textareaId":{"defaultValue":null,"description":"id of the textarea","name":"textareaId","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"maxRows":{"defaultValue":null,"description":"max rows","name":"maxRows","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"minRows":{"defaultValue":null,"description":"min rows","name":"minRows","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"grow":{"defaultValue":null,"description":"auto-grows until maxRows","name":"grow","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"boolean"}},"errorText":{"defaultValue":null,"description":"Error text to show above the component","name":"errorText","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"afterLabelChildren":{"defaultValue":null,"description":"Component shown after label","name":"afterLabelChildren","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"ReactNode"}},"belowLabelChildren":{"defaultValue":null,"description":"Component shown under label","name":"belowLabelChildren","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"ReactNode"}},"autoFocus":{"defaultValue":null,"description":"","name":"autoFocus","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"","name":"disabled","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"name":{"defaultValue":null,"description":"","name":"name","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"string"}},"autoComplete":{"defaultValue":null,"description":"","name":"autoComplete","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"string"}},"placeholder":{"defaultValue":null,"description":"","name":"placeholder","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"string"}},"readOnly":{"defaultValue":null,"description":"","name":"readOnly","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"required":{"defaultValue":null,"description":"","name":"required","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"defaultValue":{"defaultValue":null,"description":"","name":"defaultValue","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"HTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"HTMLAttributes"}],"required":false,"type":{"name":"string | number | readonly string[]"}}}}
1
+ {"props":{"maxCharacters":{"defaultValue":null,"description":"max character limit in textarea","name":"maxCharacters","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"maxText":{"defaultValue":null,"description":"The text is displayed in the end of the text-counter","name":"maxText","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"width":{"defaultValue":null,"description":"Width of textarea in characters (approximate)","name":"width","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"marginBottom":{"defaultValue":null,"description":"If true, the component will have a bottom margin.","name":"marginBottom","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"boolean"}},"transparent":{"defaultValue":null,"description":"If true, the component will be transparent.","name":"transparent","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"boolean"}},"mode":{"defaultValue":null,"description":"Changes the visuals of the textarea","name":"mode","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"enum","raw":"\"onwhite\" | \"ongrey\" | \"onblueberry\" | \"ondark\" | \"oninvalid\"","value":[{"value":"\"onwhite\""},{"value":"\"ongrey\""},{"value":"\"onblueberry\""},{"value":"\"ondark\""},{"value":"\"oninvalid\""}]}},"label":{"defaultValue":null,"description":"Label of the input","name":"label","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"textareaId":{"defaultValue":null,"description":"id of the textarea","name":"textareaId","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"maxRows":{"defaultValue":null,"description":"max rows","name":"maxRows","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"minRows":{"defaultValue":null,"description":"min rows","name":"minRows","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"number"}},"grow":{"defaultValue":null,"description":"auto-grows until maxRows","name":"grow","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"boolean"}},"errorText":{"defaultValue":null,"description":"Error text to show above the component","name":"errorText","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"string"}},"afterLabelChildren":{"defaultValue":null,"description":"Component shown after label","name":"afterLabelChildren","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"ReactNode"}},"belowLabelChildren":{"defaultValue":null,"description":"Component shown under label","name":"belowLabelChildren","parent":{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"},"declarations":[{"fileName":"src/components/Textarea/Textarea.tsx","name":"TextareaProps"}],"required":false,"type":{"name":"ReactNode"}},"autoFocus":{"defaultValue":null,"description":"","name":"autoFocus","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"disabled":{"defaultValue":null,"description":"","name":"disabled","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"name":{"defaultValue":null,"description":"","name":"name","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"string"}},"autoComplete":{"defaultValue":null,"description":"","name":"autoComplete","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"string"}},"placeholder":{"defaultValue":null,"description":"","name":"placeholder","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"string"}},"readOnly":{"defaultValue":null,"description":"","name":"readOnly","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"required":{"defaultValue":null,"description":"","name":"required","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"defaultValue":{"defaultValue":null,"description":"","name":"defaultValue","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"HTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"HTMLAttributes"}],"required":false,"type":{"name":"string | number | readonly string[]"}},"onChange":{"defaultValue":null,"description":"","name":"onChange","parent":{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"},"declarations":[{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"InputHTMLAttributes"}],"required":false,"type":{"name":"ChangeEventHandler<HTMLTextAreaElement>"}}}}
@@ -1,2 +1,2 @@
1
- import"../../Tooltip.js";import{T as G,a as H,T as I}from"../../Tooltip.js";import"react";import"../../hooks/useDelayedState.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../HelpBubble.js";import"classnames";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../HelpBubble/styles.module.scss";import"../../TooltipWord.js";import"./TooltipWord/styles.module.scss";export{G as Tooltip,H as TooltipOpenProvider,I as default};
1
+ import"../../Tooltip.js";import{T as H,a as I,T as J}from"../../Tooltip.js";import"react";import"../../hooks/useDelayedState.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../HelpBubble.js";import"classnames";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../HelpBubble/styles.module.scss";import"../../TooltipWord.js";import"./TooltipWord/styles.module.scss";export{H as Tooltip,I as TooltipOpenProvider,J as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import t from"react";import{a as e,T as o}from"../../Tooltip.js";import{longLoremText as m}from"../../utils/loremtext.js";import"../../hooks/useDelayedState.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../HelpBubble.js";import"classnames";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../HelpBubble/styles.module.scss";import"../../TooltipWord.js";import"../Tooltip/TooltipWord/styles.module.scss";const G=r=>t.createElement(e,null,t.createElement(t.Fragment,null,t.createElement(o,{...r},"Et tooltip her.")," "+m,t.createElement("button",null,"Knapp"),"Dette er ",t.createElement(o,{...r},r.children)," som skal ha n\xE6rmere forklaring.",m,t.createElement(o,{...r},"Enda et tooltip her.")));export{G as default};
1
+ import t from"react";import{a as e,T as o}from"../../Tooltip.js";import{longLoremText as m}from"../../utils/loremtext.js";import"../../hooks/useDelayedState.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../HelpBubble.js";import"classnames";import"../../constants.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../../AnchorLink.js";import"../Icons/Icon.js";import"../Icons/ArrowUpRight.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../theme/grid.js";import"../../hooks/useHover.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../hooks/useBreakpoint.js";import"../HelpBubble/styles.module.scss";import"../../TooltipWord.js";import"../Tooltip/TooltipWord/styles.module.scss";const H=r=>t.createElement(e,null,t.createElement(t.Fragment,null,t.createElement(o,{...r},"Et tooltip her.")," "+m,t.createElement("button",null,"Knapp"),"Dette er ",t.createElement(o,{...r},r.children)," som skal ha n\xE6rmere forklaring.",m,t.createElement(o,{...r},"Enda et tooltip her.")));export{H as default};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/components/TooltipExample/TooltipExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport Tooltip, { TooltipProps, TooltipOpenProvider } from '../Tooltip';\nimport longLoremText from '../../utils/loremtext';\n\nconst TooltipExample: React.FC<TooltipProps> = props => {\n return (\n <TooltipOpenProvider>\n <>\n <Tooltip {...props}>{'Et tooltip her.'}</Tooltip>\n {' ' + longLoremText}\n <button>{'Knapp'}</button>\n {'Dette er '}\n <Tooltip {...props}>{props.children}</Tooltip>\n {' som skal ha nærmere forklaring.'}\n {longLoremText}\n <Tooltip {...props}>{'Enda et tooltip her.'}</Tooltip>\n </>\n </TooltipOpenProvider>\n );\n};\n\nexport default TooltipExample;\n"],"names":["TooltipExample","props","React","TooltipOpenProvider","Tooltip","longLoremText"],"mappings":"skCAKA,MAAMA,EAAkDC,GAEpDC,EAAA,cAACC,EACC,KAAAD,EAAA,cAAAA,EAAA,SAAA,KACGA,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAQ,EAAA,iBAAkB,EACtC,IAAMI,kBACN,SAAQ,KAAA,OAAQ,EAChB,YACAH,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAA,EAAQA,EAAM,QAAS,EACnC,sCACAI,EACAH,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAA,EAAQ,sBAAuB,CAC9C,CACF"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/TooltipExample/TooltipExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport Tooltip, { TooltipProps, TooltipOpenProvider } from '../Tooltip';\nimport longLoremText from '../../utils/loremtext';\n\nconst TooltipExample: React.FC<TooltipProps> = props => {\n return (\n <TooltipOpenProvider>\n <>\n <Tooltip {...props}>{'Et tooltip her.'}</Tooltip>\n {' ' + longLoremText}\n <button>{'Knapp'}</button>\n {'Dette er '}\n <Tooltip {...props}>{props.children}</Tooltip>\n {' som skal ha nærmere forklaring.'}\n {longLoremText}\n <Tooltip {...props}>{'Enda et tooltip her.'}</Tooltip>\n </>\n </TooltipOpenProvider>\n );\n};\n\nexport default TooltipExample;\n"],"names":["TooltipExample","props","React","TooltipOpenProvider","Tooltip","longLoremText"],"mappings":"kmCAKA,MAAMA,EAAkDC,GAEpDC,EAAA,cAACC,EACC,KAAAD,EAAA,cAAAA,EAAA,SAAA,KACGA,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAQ,EAAA,iBAAkB,EACtC,IAAMI,kBACN,SAAQ,KAAA,OAAQ,EAChB,YACAH,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAA,EAAQA,EAAM,QAAS,EACnC,sCACAI,EACAH,EAAA,cAAAE,EAAA,CAAS,GAAGH,CAAA,EAAQ,sBAAuB,CAC9C,CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Hent ut en liste med HTML-elementer. Bruker MutationObserver-APIet.
3
+ * @param ref Element som skal observeres
4
+ * @param selectors Selektorer som sendes til querySelectorAll for å hente ut liste med elementer
5
+ * @param options MutationObserver-options. Default er å lytte på endringer på child-elementer og deres attributter.
6
+ * @returns Liste med HTML-elementer
7
+ */
8
+ export declare const useElementList: (ref: React.RefObject<HTMLElement>, selectors: string, options?: MutationObserverInit) => NodeListOf<HTMLElement> | undefined;
9
+ //# sourceMappingURL=useElementList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementList.d.ts","sourceRoot":"","sources":["../../src/hooks/useElementList.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QACpB,MAAM,SAAS,CAAC,WAAW,CAAC,aACtB,MAAM,YACP,oBAAoB,KAC7B,WAAW,WAAW,CAAC,GAAG,SAsB5B,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{useState as l,useEffect as a}from"react";const b=(t,e,u)=>{const[o,c]=l();return a(()=>{const n=()=>{var r;const i=(r=t.current)==null?void 0:r.querySelectorAll(e);c(i)},s=new MutationObserver(n);return t!=null&&t.current&&s.observe(t.current,{subtree:!0,childList:!0,attributes:!0,...u}),n(),()=>{s.disconnect()}},[t,e]),o};export{b as useElementList};
2
+ //# sourceMappingURL=useElementList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useElementList.js","sources":["../../src/hooks/useElementList.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\n/**\n * Hent ut en liste med HTML-elementer. Bruker MutationObserver-APIet.\n * @param ref Element som skal observeres\n * @param selectors Selektorer som sendes til querySelectorAll for å hente ut liste med elementer\n * @param options MutationObserver-options. Default er å lytte på endringer på child-elementer og deres attributter.\n * @returns Liste med HTML-elementer\n */\nexport const useElementList = (\n ref: React.RefObject<HTMLElement>,\n selectors: string,\n options?: MutationObserverInit\n): NodeListOf<HTMLElement> | undefined => {\n const [elementList, setElementList] = useState<NodeListOf<HTMLElement>>();\n\n useEffect(() => {\n const handleMutationChange = () => {\n const elements = ref.current?.querySelectorAll<HTMLElement>(selectors);\n setElementList(elements);\n };\n\n const mutationObserver = new MutationObserver(handleMutationChange);\n if (ref?.current) {\n mutationObserver.observe(ref.current, { subtree: true, childList: true, attributes: true, ...options });\n }\n\n handleMutationChange();\n\n return (): void => {\n mutationObserver.disconnect();\n };\n }, [ref, selectors]);\n\n return elementList;\n};\n"],"names":["useElementList","ref","selectors","options","elementList","setElementList","useState","useEffect","handleMutationChange","elements","_a","mutationObserver"],"mappings":"gDASO,MAAMA,EAAiB,CAC5BC,EACAC,EACAC,IACwC,CACxC,KAAM,CAACC,EAAaC,CAAc,EAAIC,EAAkC,EAExE,OAAAC,EAAU,IAAM,CACd,MAAMC,EAAuB,IAAM,OACjC,MAAMC,GAAWC,EAAAT,EAAI,UAAJ,YAAAS,EAAa,iBAA8BR,GAC5DG,EAAeI,CAAQ,CAAA,EAGnBE,EAAmB,IAAI,iBAAiBH,CAAoB,EAClE,OAAIP,GAAA,MAAAA,EAAK,SACPU,EAAiB,QAAQV,EAAI,QAAS,CAAE,QAAS,GAAM,UAAW,GAAM,WAAY,GAAM,GAAGE,CAAS,CAAA,EAGnFK,IAEd,IAAY,CACjBG,EAAiB,WAAW,CAAA,CAC9B,EACC,CAACV,EAAKC,CAAS,CAAC,EAEZE,CACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusToggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAGzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,eAAe,OAAO,KAAG,IA4BxF,CAAC"}
1
+ {"version":3,"file":"useFocusToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusToggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,eAAe,OAAO,KAAG,IA6BxF,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useEffect as s}from"react";import{useFocusableElements as b}from"./useFocusableElements.js";const I=(o,A)=>{const e=b(o);s(()=>{const r="tabindex",T="data-tabindex";A?e==null||e.forEach(t=>{const i=t.getAttribute(T);i?t.setAttribute(r,i):t.removeAttribute(r)}):e==null||e.forEach(t=>{t.hasAttribute(r)&&t.setAttribute(T,`${t.tabIndex}`),t.tabIndex=-1})},[o,A,e])};export{I as useFocusToggle};
1
+ import{useEffect as T}from"react";import{useElementList as s}from"./useElementList.js";import{FOCUSABLE_SELECTORS as a}from"./useFocusableElements.js";const f=(i,o)=>{const r=s(i,a,{attributes:!1});T(()=>{const e="tabindex",A="data-tabindex";o?r==null||r.forEach(t=>{const E=t.getAttribute(A);E?t.setAttribute(e,E):t.removeAttribute(e)}):r==null||r.forEach(t=>{t.hasAttribute(e)&&t.setAttribute(A,`${t.tabIndex}`),t.tabIndex=-1})},[i,o,r])};export{f as useFocusToggle};
2
2
  //# sourceMappingURL=useFocusToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusToggle.js","sources":["../../src/hooks/useFocusToggle.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { useFocusableElements } from './useFocusableElements';\n\n/**\n * Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig\n * ikke kunne fokuseres/tabbes til med tastaturet.\n * @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare\n * @param allowFocus Om elementene skal være fokuserbare eller ikke\n * @returns void\n */\nexport const useFocusToggle = (ref: React.RefObject<HTMLElement>, allowFocus?: boolean): void => {\n const focusableElementList = useFocusableElements(ref);\n\n useEffect(() => {\n const TABINDEX_ATTRIBUTE_NAME = 'tabindex';\n const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = 'data-tabindex';\n if (allowFocus) {\n focusableElementList?.forEach(el => {\n // Sett tabIndex tilbake til verdien den hadde før, eller fjern tabIndex\n // slik at elementet kan tabbes til igjen.\n const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);\n if (prevTabIndex) {\n el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);\n } else {\n el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);\n }\n });\n } else {\n focusableElementList?.forEach(el => {\n // Hvis elementet allerede har tabIndex, ta vare på den før vi gjør det umulig å\n // tabbe til det.\n if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) {\n el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);\n }\n el.tabIndex = -1;\n });\n }\n }, [ref, allowFocus, focusableElementList]);\n};\n"],"names":["useFocusToggle","ref","allowFocus","focusableElementList","useFocusableElements","useEffect","TABINDEX_ATTRIBUTE_NAME","PREVIOUS_TABINDEX_ATTRIBUTE_NAME","el","prevTabIndex"],"mappings":"mGAUa,MAAAA,EAAiB,CAACC,EAAmCC,IAA+B,CACzF,MAAAC,EAAuBC,EAAqBH,CAAG,EAErDI,EAAU,IAAM,CACd,MAAMC,EAA0B,WAC1BC,EAAmC,gBACrCL,EACFC,GAAA,MAAAA,EAAsB,QAAcK,GAAA,CAG5B,MAAAC,EAAeD,EAAG,aAAaD,CAAgC,EACjEE,EACCD,EAAA,aAAaF,EAAyBG,CAAY,EAErDD,EAAG,gBAAgBF,CAAuB,CAC5C,GAGFH,GAAA,MAAAA,EAAsB,QAAcK,GAAA,CAG9BA,EAAG,aAAaF,CAAuB,GACzCE,EAAG,aAAaD,EAAkC,GAAGC,EAAG,UAAU,EAEpEA,EAAG,SAAW,EAAA,EAGjB,EAAA,CAACP,EAAKC,EAAYC,CAAoB,CAAC,CAC5C"}
1
+ {"version":3,"file":"useFocusToggle.js","sources":["../../src/hooks/useFocusToggle.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { useElementList } from './useElementList';\nimport { FOCUSABLE_SELECTORS } from './useFocusableElements';\n\n/**\n * Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig\n * ikke kunne fokuseres/tabbes til med tastaturet.\n * @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare\n * @param allowFocus Om elementene skal være fokuserbare eller ikke\n * @returns void\n */\nexport const useFocusToggle = (ref: React.RefObject<HTMLElement>, allowFocus?: boolean): void => {\n // Kan ikke lytte på endringer i attributter, fordi det vil føre til en loop når vi endrer dem etterpå\n const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });\n\n useEffect(() => {\n const TABINDEX_ATTRIBUTE_NAME = 'tabindex';\n const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = 'data-tabindex';\n if (allowFocus) {\n focusableElementList?.forEach(el => {\n // Sett tabIndex tilbake til verdien den hadde før, eller fjern tabIndex\n // slik at elementet kan tabbes til igjen.\n const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);\n if (prevTabIndex) {\n el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);\n } else {\n el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);\n }\n });\n } else {\n focusableElementList?.forEach(el => {\n // Hvis elementet allerede har tabIndex, ta vare på den før vi gjør det umulig å\n // tabbe til det.\n if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) {\n el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);\n }\n el.tabIndex = -1;\n });\n }\n }, [ref, allowFocus, focusableElementList]);\n};\n"],"names":["useFocusToggle","ref","allowFocus","focusableElementList","useElementList","FOCUSABLE_SELECTORS","useEffect","TABINDEX_ATTRIBUTE_NAME","PREVIOUS_TABINDEX_ATTRIBUTE_NAME","el","prevTabIndex"],"mappings":"uJAWa,MAAAA,EAAiB,CAACC,EAAmCC,IAA+B,CAE/F,MAAMC,EAAuBC,EAAeH,EAAKI,EAAqB,CAAE,WAAY,GAAO,EAE3FC,EAAU,IAAM,CACd,MAAMC,EAA0B,WAC1BC,EAAmC,gBACrCN,EACFC,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG5B,MAAAC,EAAeD,EAAG,aAAaD,CAAgC,EACjEE,EACCD,EAAA,aAAaF,EAAyBG,CAAY,EAErDD,EAAG,gBAAgBF,CAAuB,CAC5C,GAGFJ,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG9BA,EAAG,aAAaF,CAAuB,GACzCE,EAAG,aAAaD,EAAkC,GAAGC,EAAG,UAAU,EAEpEA,EAAG,SAAW,EAAA,EAGjB,EAAA,CAACR,EAAKC,EAAYC,CAAoB,CAAC,CAC5C"}
@@ -1,2 +1,2 @@
1
- import{useEffect as u}from"react";import{getDocumentActiveElement as f}from"./focus-utils.js";import{useFocusableElements as m}from"./useFocusableElements.js";const h=(n,o=!0,c=!1)=>{const e=m(n),i=t=>{if(o&&n.current&&(e==null?void 0:e.length)&&t.key==="Tab"){const r=f(n.current),s=e[0],l=e.length===1?s:e[e.length-1];t.shiftKey&&r===s?(l.focus(),t.preventDefault()):!t.shiftKey&&r===l&&(s.focus(),t.preventDefault())}};u(()=>{var t;return c&&o&&(e==null?void 0:e.length)&&e[0].focus(),(t=n.current)==null||t.addEventListener("keydown",i),()=>{var r;(r=n.current)==null||r.removeEventListener("keydown",i)}},[n,o,c,e])};export{h as default,h as useFocusTrap};
1
+ import{useEffect as m}from"react";import{getDocumentActiveElement as u}from"../utils/focus.js";import{useFocusableElements as f}from"./useFocusableElements.js";import"./useElementList.js";const p=(n,o=!0,c=!1)=>{const e=f(n),i=t=>{if(o&&n.current&&(e==null?void 0:e.length)&&t.key==="Tab"){const r=u(n.current),s=e[0],l=e.length===1?s:e[e.length-1];t.shiftKey&&r===s?(l.focus(),t.preventDefault()):!t.shiftKey&&r===l&&(s.focus(),t.preventDefault())}};m(()=>{var t;return c&&o&&(e==null?void 0:e.length)&&e[0].focus(),(t=n.current)==null||t.addEventListener("keydown",i),()=>{var r;(r=n.current)==null||r.removeEventListener("keydown",i)}},[n,o,c,e])};export{p as default,p as useFocusTrap};
2
2
  //# sourceMappingURL=useFocusTrap.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusTrap.js","sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { getDocumentActiveElement } from './focus-utils';\nimport { useFocusableElements } from './useFocusableElements';\n\n/**\n * Lås fokus til et bestemt element. Bruker vil bare kunne tabbe mellom fokuserbare elementer innenfor elementet.\n * @param ref Alle barn av dette elementet vil være fokuserbare, elementer utenfor vil ikke det\n * @param trapFocus Om fokus skal \"trappes\" innenfor elementet eller ikke. Default=true.\n * @param autofocus Om fokus automatisk skal settes til første fokuserbare element. Default=false.\n */\nexport const useFocusTrap = (ref: React.RefObject<HTMLElement>, trapFocus: boolean = true, autofocus: boolean = false): void => {\n const focusableElementList = useFocusableElements(ref);\n\n const handleKeyboardEvent = (e: KeyboardEvent): void => {\n if (trapFocus && ref.current && focusableElementList?.length && e.key === 'Tab') {\n const activeElement = getDocumentActiveElement(ref.current);\n const firstElement = focusableElementList[0];\n const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];\n\n if (e.shiftKey && activeElement === firstElement) {\n /* shift + tab */\n lastElement.focus();\n e.preventDefault();\n } else if (!e.shiftKey && activeElement === lastElement) {\n /* tab */\n firstElement.focus();\n e.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n if (autofocus && trapFocus && focusableElementList?.length) {\n focusableElementList[0].focus();\n }\n\n ref.current?.addEventListener('keydown', handleKeyboardEvent);\n\n return (): void => {\n ref.current?.removeEventListener('keydown', handleKeyboardEvent);\n };\n }, [ref, trapFocus, autofocus, focusableElementList]); // focusableElementList må være med som dependency for at handleKeyboardEvent skal få oppdatert state\n};\n\nexport default useFocusTrap;\n"],"names":["useFocusTrap","ref","trapFocus","autofocus","focusableElementList","useFocusableElements","handleKeyboardEvent","e","activeElement","getDocumentActiveElement","firstElement","lastElement","useEffect","_a"],"mappings":"+JAUO,MAAMA,EAAe,CAACC,EAAmCC,EAAqB,GAAMC,EAAqB,KAAgB,CACxH,MAAAC,EAAuBC,EAAqBJ,CAAG,EAE/CK,EAAuBC,GAA2B,CACtD,GAAIL,GAAaD,EAAI,UAAWG,GAAA,YAAAA,EAAsB,SAAUG,EAAE,MAAQ,MAAO,CACzE,MAAAC,EAAgBC,EAAyBR,EAAI,OAAO,EACpDS,EAAeN,EAAqB,GACpCO,EAAcP,EAAqB,SAAW,EAAIM,EAAeN,EAAqBA,EAAqB,OAAS,GAEtHG,EAAE,UAAYC,IAAkBE,GAElCC,EAAY,MAAM,EAClBJ,EAAE,eAAe,GACR,CAACA,EAAE,UAAYC,IAAkBG,IAE1CD,EAAa,MAAM,EACnBH,EAAE,eAAe,EAErB,CAAA,EAGFK,EAAU,IAAM,OACV,OAAAT,GAAaD,IAAaE,GAAA,YAAAA,EAAsB,SAClDA,EAAqB,GAAG,SAGtBS,EAAAZ,EAAA,UAAA,MAAAY,EAAS,iBAAiB,UAAWP,GAElC,IAAY,QACbO,EAAAZ,EAAA,UAAA,MAAAY,EAAS,oBAAoB,UAAWP,EAAmB,GAEhE,CAACL,EAAKC,EAAWC,EAAWC,CAAoB,CAAC,CACtD"}
1
+ {"version":3,"file":"useFocusTrap.js","sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { getDocumentActiveElement } from '../utils/focus';\nimport { useFocusableElements } from './useFocusableElements';\n\n/**\n * Lås fokus til et bestemt element. Bruker vil bare kunne tabbe mellom fokuserbare elementer innenfor elementet.\n * @param ref Alle barn av dette elementet vil være fokuserbare, elementer utenfor vil ikke det\n * @param trapFocus Om fokus skal \"trappes\" innenfor elementet eller ikke. Default=true.\n * @param autofocus Om fokus automatisk skal settes til første fokuserbare element. Default=false.\n */\nexport const useFocusTrap = (ref: React.RefObject<HTMLElement>, trapFocus: boolean = true, autofocus: boolean = false): void => {\n const focusableElementList = useFocusableElements(ref);\n\n const handleKeyboardEvent = (e: KeyboardEvent): void => {\n if (trapFocus && ref.current && focusableElementList?.length && e.key === 'Tab') {\n const activeElement = getDocumentActiveElement(ref.current);\n const firstElement = focusableElementList[0];\n const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];\n\n if (e.shiftKey && activeElement === firstElement) {\n /* shift + tab */\n lastElement.focus();\n e.preventDefault();\n } else if (!e.shiftKey && activeElement === lastElement) {\n /* tab */\n firstElement.focus();\n e.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n if (autofocus && trapFocus && focusableElementList?.length) {\n focusableElementList[0].focus();\n }\n\n ref.current?.addEventListener('keydown', handleKeyboardEvent);\n\n return (): void => {\n ref.current?.removeEventListener('keydown', handleKeyboardEvent);\n };\n }, [ref, trapFocus, autofocus, focusableElementList]); // focusableElementList må være med som dependency for at handleKeyboardEvent skal få oppdatert state\n};\n\nexport default useFocusTrap;\n"],"names":["useFocusTrap","ref","trapFocus","autofocus","focusableElementList","useFocusableElements","handleKeyboardEvent","e","activeElement","getDocumentActiveElement","firstElement","lastElement","useEffect","_a"],"mappings":"4LAUO,MAAMA,EAAe,CAACC,EAAmCC,EAAqB,GAAMC,EAAqB,KAAgB,CACxH,MAAAC,EAAuBC,EAAqBJ,CAAG,EAE/CK,EAAuBC,GAA2B,CACtD,GAAIL,GAAaD,EAAI,UAAWG,GAAA,YAAAA,EAAsB,SAAUG,EAAE,MAAQ,MAAO,CACzE,MAAAC,EAAgBC,EAAyBR,EAAI,OAAO,EACpDS,EAAeN,EAAqB,GACpCO,EAAcP,EAAqB,SAAW,EAAIM,EAAeN,EAAqBA,EAAqB,OAAS,GAEtHG,EAAE,UAAYC,IAAkBE,GAElCC,EAAY,MAAM,EAClBJ,EAAE,eAAe,GACR,CAACA,EAAE,UAAYC,IAAkBG,IAE1CD,EAAa,MAAM,EACnBH,EAAE,eAAe,EAErB,CAAA,EAGFK,EAAU,IAAM,OACV,OAAAT,GAAaD,IAAaE,GAAA,YAAAA,EAAsB,SAClDA,EAAqB,GAAG,SAGtBS,EAAAZ,EAAA,UAAA,MAAAY,EAAS,iBAAiB,UAAWP,GAElC,IAAY,QACbO,EAAAZ,EAAA,UAAA,MAAAY,EAAS,oBAAoB,UAAWP,EAAmB,GAEhE,CAACL,EAAKC,EAAWC,EAAWC,CAAoB,CAAC,CACtD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusableElements.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusableElements.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,QAarB,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,WAAW,WAAW,CAAC,GAAG,SAsBlG,CAAC"}
1
+ {"version":3,"file":"useFocusableElements.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusableElements.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,QAarB,CAAC;AAEZ;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,WAAW,WAAW,CAAC,GAAG,SACzD,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useState as s,useEffect as b}from"react";const r=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'].join(","),c=t=>{const[i,a]=s();return b(()=>{const e=()=>{var o;const d=(o=t.current)==null?void 0:o.querySelectorAll(r);a(d)},n=new MutationObserver(e);return t!=null&&t.current&&n.observe(t.current,{subtree:!0,childList:!0}),e(),()=>{n.disconnect()}},[t]),i};export{r as FOCUSABLE_SELECTORS,c as useFocusableElements};
1
+ import{useElementList as n}from"./useElementList.js";import"react";const e=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([type="hidden"]):not([type="radio"]):not([disabled]):not([tabindex^="-"])','input[type="radio"]:not([disabled]):not([tabindex^="-"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','iframe:not([tabindex^="-"])','audio[controls]:not([tabindex^="-"])','video[controls]:not([tabindex^="-"])','[contenteditable]:not([tabindex^="-"])','[tabindex]:not([tabindex^="-"])'].join(","),d=t=>n(t,e);export{e as FOCUSABLE_SELECTORS,d as useFocusableElements};
2
2
  //# sourceMappingURL=useFocusableElements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFocusableElements.js","sources":["../../src/hooks/useFocusableElements.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\n// Fra https://github.com/KittyGiraudel/focusable-selectors\nexport const FOCUSABLE_SELECTORS = [\n 'a[href]:not([tabindex^=\"-\"])',\n 'area[href]:not([tabindex^=\"-\"])',\n 'input:not([type=\"hidden\"]):not([type=\"radio\"]):not([disabled]):not([tabindex^=\"-\"])',\n 'input[type=\"radio\"]:not([disabled]):not([tabindex^=\"-\"])',\n 'select:not([disabled]):not([tabindex^=\"-\"])',\n 'textarea:not([disabled]):not([tabindex^=\"-\"])',\n 'button:not([disabled]):not([tabindex^=\"-\"])',\n 'iframe:not([tabindex^=\"-\"])',\n 'audio[controls]:not([tabindex^=\"-\"])',\n 'video[controls]:not([tabindex^=\"-\"])',\n '[contenteditable]:not([tabindex^=\"-\"])',\n '[tabindex]:not([tabindex^=\"-\"])',\n].join(',');\n\n/**\n * Overvåk et element og finn alle fokuserbare elementer inne i elementet. Bruker MutationObserver slik at eventuelle\n * nye elementer som legges til også vil inkluderes i listen.\n * @param ref Element som skal observeres\n * @returns Liste med fokuserbare HTML-elementer\n */\nexport const useFocusableElements = (ref: React.RefObject<HTMLElement>): NodeListOf<HTMLElement> | undefined => {\n const [focusableElementList, setFocusableElementList] = useState<NodeListOf<HTMLElement>>();\n\n useEffect(() => {\n const handleMutationChange = () => {\n const elementList = ref.current?.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTORS);\n setFocusableElementList(elementList);\n };\n\n const mutationObserver = new MutationObserver(handleMutationChange);\n if (ref?.current) {\n mutationObserver.observe(ref.current, { subtree: true, childList: true });\n }\n\n handleMutationChange();\n\n return (): void => {\n mutationObserver.disconnect();\n };\n }, [ref]);\n\n return focusableElementList;\n};\n"],"names":["FOCUSABLE_SELECTORS","useFocusableElements","ref","focusableElementList","setFocusableElementList","useState","useEffect","handleMutationChange","elementList","_a","mutationObserver"],"mappings":"gDAGO,MAAMA,EAAsB,CACjC,+BACA,kCACA,sFACA,2DACA,8CACA,gDACA,8CACA,8BACA,uCACA,uCACA,yCACA,iCACF,EAAE,KAAK,GAAG,EAQGC,EAAwBC,GAA2E,CAC9G,KAAM,CAACC,EAAsBC,CAAuB,EAAIC,EAAkC,EAE1F,OAAAC,EAAU,IAAM,CACd,MAAMC,EAAuB,IAAM,OACjC,MAAMC,GAAcC,EAAAP,EAAI,UAAJ,YAAAO,EAAa,iBAA8BT,GAC/DI,EAAwBI,CAAW,CAAA,EAG/BE,EAAmB,IAAI,iBAAiBH,CAAoB,EAClE,OAAIL,GAAA,MAAAA,EAAK,SACUQ,EAAA,QAAQR,EAAI,QAAS,CAAE,QAAS,GAAM,UAAW,GAAM,EAGrDK,IAEd,IAAY,CACjBG,EAAiB,WAAW,CAAA,CAC9B,EACC,CAACR,CAAG,CAAC,EAEDC,CACT"}
1
+ {"version":3,"file":"useFocusableElements.js","sources":["../../src/hooks/useFocusableElements.ts"],"sourcesContent":["import { useElementList } from './useElementList';\n\n// Fra https://github.com/KittyGiraudel/focusable-selectors\nexport const FOCUSABLE_SELECTORS = [\n 'a[href]:not([tabindex^=\"-\"])',\n 'area[href]:not([tabindex^=\"-\"])',\n 'input:not([type=\"hidden\"]):not([type=\"radio\"]):not([disabled]):not([tabindex^=\"-\"])',\n 'input[type=\"radio\"]:not([disabled]):not([tabindex^=\"-\"])',\n 'select:not([disabled]):not([tabindex^=\"-\"])',\n 'textarea:not([disabled]):not([tabindex^=\"-\"])',\n 'button:not([disabled]):not([tabindex^=\"-\"])',\n 'iframe:not([tabindex^=\"-\"])',\n 'audio[controls]:not([tabindex^=\"-\"])',\n 'video[controls]:not([tabindex^=\"-\"])',\n '[contenteditable]:not([tabindex^=\"-\"])',\n '[tabindex]:not([tabindex^=\"-\"])',\n].join(',');\n\n/**\n * Overvåk et element og finn alle fokuserbare elementer inne i elementet. Bruker MutationObserver slik at eventuelle\n * nye elementer som legges til også vil inkluderes i listen.\n * @param ref Element som skal observeres\n * @returns Liste med fokuserbare HTML-elementer\n */\nexport const useFocusableElements = (ref: React.RefObject<HTMLElement>): NodeListOf<HTMLElement> | undefined =>\n useElementList(ref, FOCUSABLE_SELECTORS);\n"],"names":["FOCUSABLE_SELECTORS","useFocusableElements","ref","useElementList"],"mappings":"mEAGO,MAAMA,EAAsB,CACjC,+BACA,kCACA,sFACA,2DACA,8CACA,gDACA,8CACA,8BACA,uCACA,uCACA,yCACA,iCACF,EAAE,KAAK,GAAG,EAQGC,EAAwBC,GACnCC,EAAeD,EAAKF,CAAmB"}
@@ -1,11 +1,10 @@
1
1
  import { RefObject } from 'react';
2
- /** ref: Reference object for the trigger of the hover state
3
- *
4
- * condition: Additional boolean condition to trigger the useEffect checking for hover.
5
- *
6
- * includeFocus: If focusing the ref should count as a hover or not. True by default.
2
+ /**
3
+ * Få vite når et element hovres over eller mottar fokus.
4
+ * @param ref Element som skal observeres
5
+ * @returns Objekt med ref og om objekt er hovered/focused
7
6
  */
8
- export declare const useHover: <T extends HTMLElement | SVGElement>(ref?: RefObject<T> | undefined, condition?: boolean, includeFocus?: boolean) => {
7
+ export declare const useHover: <T extends HTMLElement | SVGElement>(ref?: RefObject<T> | undefined) => {
9
8
  hoverRef: RefObject<T>;
10
9
  isHovered: boolean;
11
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"useHover.d.ts","sourceRoot":"","sources":["../../src/hooks/useHover.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,QAAQ,mFAAwE,OAAO,iBAAgB,OAAO;;;CAuB1H,CAAC"}
1
+ {"version":3,"file":"useHover.d.ts","sourceRoot":"","sources":["../../src/hooks/useHover.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,QAAQ;;eAAkG,OAAO;CAyB7H,CAAC"}
package/hooks/useHover.js CHANGED
@@ -1,2 +1,2 @@
1
- import{useRef as i,useState as d,useEffect as h}from"react";const H=(s,a,r=!0)=>{const o=s||i(null),[f,n]=d(!1);return h(()=>{const{current:t}=o,u=()=>n(!0),v=()=>n(!1),c=["mouseenter",r?"focusin":""],E=["mouseleave",r?"focusout":""];return c.forEach(e=>t==null?void 0:t.addEventListener(e,u)),E.forEach(e=>t==null?void 0:t.addEventListener(e,v)),()=>{c.forEach(e=>t==null?void 0:t.removeEventListener(e,u)),E.forEach(e=>t==null?void 0:t.removeEventListener(e,v))}},[o,a]),{hoverRef:o,isHovered:f}};export{H as useHover};
1
+ import{useRef as H,useState as L,useEffect as I}from"react";const M=t=>{const e=t||H(null),[h,n]=L(!1),[F,s]=L(!1);return I(()=>{var v,d,a,i;const r=()=>n(!0),o=()=>n(!1),u=()=>s(!0),c=()=>s(!1);return(v=e.current)==null||v.addEventListener("mouseenter",r),(d=e.current)==null||d.addEventListener("mouseleave",o),(a=e.current)==null||a.addEventListener("focusin",u),(i=e.current)==null||i.addEventListener("focusout",c),()=>{var f,l,m,E;(f=e.current)==null||f.removeEventListener("mouseenter",r),(l=e.current)==null||l.removeEventListener("mouseleave",o),(m=e.current)==null||m.removeEventListener("focusin",u),(E=e.current)==null||E.removeEventListener("focusout",c)}},[e]),{hoverRef:e,isHovered:h||F}};export{M as useHover};
2
2
  //# sourceMappingURL=useHover.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useHover.js","sources":["../../src/hooks/useHover.ts"],"sourcesContent":["import { useRef, useEffect, useState, RefObject } from 'react';\n\n/** ref: Reference object for the trigger of the hover state\n *\n * condition: Additional boolean condition to trigger the useEffect checking for hover.\n *\n * includeFocus: If focusing the ref should count as a hover or not. True by default.\n */\nexport const useHover = <T extends HTMLElement | SVGElement>(ref?: RefObject<T>, condition?: boolean, includeFocus: boolean = true) => {\n const hoverRef = ref ? ref : useRef<T>(null);\n const [isHovered, setIsHovered] = useState(false);\n\n useEffect(() => {\n const { current: element } = hoverRef;\n\n const handleInEvent = () => setIsHovered(true);\n\n const handleOutEvent = () => setIsHovered(false);\n\n const inEventList = ['mouseenter', includeFocus ? 'focusin' : ''];\n const outEventList = ['mouseleave', includeFocus ? 'focusout' : ''];\n inEventList.forEach(eventName => element?.addEventListener(eventName, handleInEvent));\n outEventList.forEach(eventName => element?.addEventListener(eventName, handleOutEvent));\n\n return (): void => {\n inEventList.forEach(eventName => element?.removeEventListener(eventName, handleInEvent));\n outEventList.forEach(eventName => element?.removeEventListener(eventName, handleOutEvent));\n };\n }, [hoverRef, condition]);\n\n return { hoverRef, isHovered };\n};\n"],"names":["useHover","ref","condition","includeFocus","hoverRef","useRef","isHovered","setIsHovered","useState","useEffect","element","handleInEvent","handleOutEvent","inEventList","outEventList","eventName"],"mappings":"4DAQO,MAAMA,EAAW,CAAqCC,EAAoBC,EAAqBC,EAAwB,KAAS,CACrI,MAAMC,EAAWH,GAAYI,EAAU,IAAI,EACrC,CAACC,EAAWC,CAAY,EAAIC,EAAS,EAAK,EAEhD,OAAAC,EAAU,IAAM,CACR,KAAA,CAAE,QAASC,CAAY,EAAAN,EAEvBO,EAAgB,IAAMJ,EAAa,EAAI,EAEvCK,EAAiB,IAAML,EAAa,EAAK,EAEzCM,EAAc,CAAC,aAAcV,EAAe,UAAY,EAAE,EAC1DW,EAAe,CAAC,aAAcX,EAAe,WAAa,EAAE,EAClE,OAAAU,EAAY,QAAqBE,GAAAL,GAAA,YAAAA,EAAS,iBAAiBK,EAAWJ,EAAc,EACpFG,EAAa,QAAqBC,GAAAL,GAAA,YAAAA,EAAS,iBAAiBK,EAAWH,EAAe,EAE/E,IAAY,CACjBC,EAAY,QAAqBE,GAAAL,GAAA,YAAAA,EAAS,oBAAoBK,EAAWJ,EAAc,EACvFG,EAAa,QAAqBC,GAAAL,GAAA,YAAAA,EAAS,oBAAoBK,EAAWH,EAAe,CAAA,CAC3F,EACC,CAACR,EAAUF,CAAS,CAAC,EAEjB,CAAE,SAAAE,EAAU,UAAAE,EACrB"}
1
+ {"version":3,"file":"useHover.js","sources":["../../src/hooks/useHover.ts"],"sourcesContent":["import { useRef, useEffect, useState, RefObject } from 'react';\n\n/**\n * vite når et element hovres over eller mottar fokus.\n * @param ref Element som skal observeres\n * @returns Objekt med ref og om objekt er hovered/focused\n */\nexport const useHover = <T extends HTMLElement | SVGElement>(ref?: RefObject<T>): { hoverRef: RefObject<T>; isHovered: boolean } => {\n const hoverRef = ref ? ref : useRef<T>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n\n useEffect(() => {\n const handleMouseEnter = () => setIsHovered(true);\n const handleMouseLeave = () => setIsHovered(false);\n const handleFocusIn = () => setIsFocused(true);\n const handleFocusOut = () => setIsFocused(false);\n\n hoverRef.current?.addEventListener('mouseenter', handleMouseEnter);\n hoverRef.current?.addEventListener('mouseleave', handleMouseLeave);\n hoverRef.current?.addEventListener('focusin', handleFocusIn);\n hoverRef.current?.addEventListener('focusout', handleFocusOut);\n\n return (): void => {\n hoverRef.current?.removeEventListener('mouseenter', handleMouseEnter);\n hoverRef.current?.removeEventListener('mouseleave', handleMouseLeave);\n hoverRef.current?.removeEventListener('focusin', handleFocusIn);\n hoverRef.current?.removeEventListener('focusout', handleFocusOut);\n };\n }, [hoverRef]);\n\n return { hoverRef, isHovered: isHovered || isFocused };\n};\n"],"names":["useHover","ref","hoverRef","useRef","isHovered","setIsHovered","useState","isFocused","setIsFocused","useEffect","handleMouseEnter","handleMouseLeave","handleFocusIn","handleFocusOut","_a","_b","_c","_d"],"mappings":"4DAOa,MAAAA,EAAgDC,GAAuE,CAClI,MAAMC,EAAWD,GAAYE,EAAU,IAAI,EACrC,CAACC,EAAWC,CAAY,EAAIC,EAAS,EAAK,EAC1C,CAACC,EAAWC,CAAY,EAAIF,EAAS,EAAK,EAEhD,OAAAG,EAAU,IAAM,aACR,MAAAC,EAAmB,IAAML,EAAa,EAAI,EAC1CM,EAAmB,IAAMN,EAAa,EAAK,EAC3CO,EAAgB,IAAMJ,EAAa,EAAI,EACvCK,EAAiB,IAAML,EAAa,EAAK,EAEtC,OAAAM,EAAAZ,EAAA,UAAA,MAAAY,EAAS,iBAAiB,aAAcJ,IACxCK,EAAAb,EAAA,UAAA,MAAAa,EAAS,iBAAiB,aAAcJ,IACxCK,EAAAd,EAAA,UAAA,MAAAc,EAAS,iBAAiB,UAAWJ,IACrCK,EAAAf,EAAA,UAAA,MAAAe,EAAS,iBAAiB,WAAYJ,GAExC,IAAY,cACRC,EAAAZ,EAAA,UAAA,MAAAY,EAAS,oBAAoB,aAAcJ,IAC3CK,EAAAb,EAAA,UAAA,MAAAa,EAAS,oBAAoB,aAAcJ,IAC3CK,EAAAd,EAAA,UAAA,MAAAc,EAAS,oBAAoB,UAAWJ,IACxCK,EAAAf,EAAA,UAAA,MAAAe,EAAS,oBAAoB,WAAYJ,EAAc,CAClE,EACC,CAACX,CAAQ,CAAC,EAEN,CAAE,SAAAA,EAAU,UAAWE,GAAaG,CAAU,CACvD"}
@@ -1,2 +1,11 @@
1
- export declare const useKeyboardEvent: <E extends "keydown" | "keypress" | "keyup">(eventName: E, ref: React.RefObject<HTMLElement>, key: string | string[], callback: (event: HTMLElementEventMap[E]) => void) => void;
1
+ declare type KeyboardEvents = keyof PickByValue<HTMLElementEventMap, KeyboardEvent>;
2
+ /**
3
+ * Kjør en callback når bruker skriver på tastaturet.
4
+ * @param ref Element som skal lyttes på.
5
+ * @param callback Callback som kjøres når det skjer en event.
6
+ * @param key Knapp, eller liste med knapper, som skal trigge callback
7
+ * @param events Liste med keyboard-events som skal trigge callback. Default: "keydown"
8
+ */
9
+ export declare const useKeyboardEvent: (ref: React.RefObject<HTMLElement>, callback: (event: HTMLElementEventMap[KeyboardEvents]) => void, key: string | string[], events?: KeyboardEvents[]) => void;
10
+ export {};
2
11
  //# sourceMappingURL=useKeyboardEvent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardEvent.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,kEAEtB,MAAM,SAAS,CAAC,WAAW,CAAC,OAC5B,MAAM,GAAG,MAAM,EAAE,+CACuB,IAAI,SAclD,CAAC"}
1
+ {"version":3,"file":"useKeyboardEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardEvent.ts"],"names":[],"mappings":"AAEA,aAAK,cAAc,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QACtB,MAAM,SAAS,CAAC,WAAW,CAAC,oBACf,mBAAmB,CAAC,cAAc,CAAC,KAAK,IAAI,OACzD,MAAM,GAAG,MAAM,EAAE,WACd,cAAc,EAAE,SAezB,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useEffect as i}from"react";const E=(n,e,t,o)=>{i(()=>{var d;const s=r=>{(r.key===t||Array.isArray(t)&&t.includes(r.key))&&o(r)};return(d=e.current)==null||d.addEventListener(n,s),()=>{var r;(r=e.current)==null||r.removeEventListener(n,s)}},[e,o])};export{E as useKeyboardEvent};
1
+ import{useEffect as a}from"react";const i=(n,d,o,t=["keydown"])=>{a(()=>{const E=r=>{(r.key===o||Array.isArray(o)&&o.includes(r.key))&&d(r)};return t.forEach(r=>{var e;return(e=n.current)==null?void 0:e.addEventListener(r,E)}),()=>{t.forEach(r=>{var e;return(e=n.current)==null?void 0:e.removeEventListener(r,E)})}},[n,d,t,o])};export{i as useKeyboardEvent};
2
2
  //# sourceMappingURL=useKeyboardEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardEvent.js","sources":["../../src/hooks/useKeyboardEvent.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nexport const useKeyboardEvent = <E extends keyof Pick<HTMLElementEventMap, 'keydown' | 'keypress' | 'keyup'>>(\n eventName: E,\n ref: React.RefObject<HTMLElement>,\n key: string | string[],\n callback: (event: HTMLElementEventMap[E]) => void\n) => {\n useEffect(() => {\n const handleKeyboardEvent = (event: HTMLElementEventMap[E]) => {\n if (event.key === key || (Array.isArray(key) && key.includes(event.key))) {\n callback(event);\n }\n };\n ref.current?.addEventListener(eventName, handleKeyboardEvent);\n\n return () => {\n ref.current?.removeEventListener(eventName, handleKeyboardEvent);\n };\n }, [ref, callback]);\n};\n"],"names":["useKeyboardEvent","eventName","ref","key","callback","useEffect","handleKeyboardEvent","event","_a"],"mappings":"kCAEO,MAAMA,EAAmB,CAC9BC,EACAC,EACAC,EACAC,IACG,CACHC,EAAU,IAAM,OACR,MAAAC,EAAuBC,GAAkC,EACzDA,EAAM,MAAQJ,GAAQ,MAAM,QAAQA,CAAG,GAAKA,EAAI,SAASI,EAAM,GAAG,IACpEH,EAASG,CAAK,CAChB,EAEE,OAAAC,EAAAN,EAAA,UAAA,MAAAM,EAAS,iBAAiBP,EAAWK,GAElC,IAAM,QACPE,EAAAN,EAAA,UAAA,MAAAM,EAAS,oBAAoBP,EAAWK,EAAmB,CACjE,EACC,CAACJ,EAAKE,CAAQ,CAAC,CACpB"}
1
+ {"version":3,"file":"useKeyboardEvent.js","sources":["../../src/hooks/useKeyboardEvent.ts"],"sourcesContent":["import { useEffect } from 'react';\n\ntype KeyboardEvents = keyof PickByValue<HTMLElementEventMap, KeyboardEvent>;\n\n/**\n * Kjør en callback når bruker skriver på tastaturet.\n * @param ref Element som skal lyttes på.\n * @param callback Callback som kjøres når det skjer en event.\n * @param key Knapp, eller liste med knapper, som skal trigge callback\n * @param events Liste med keyboard-events som skal trigge callback. Default: \"keydown\"\n */\nexport const useKeyboardEvent = (\n ref: React.RefObject<HTMLElement>,\n callback: (event: HTMLElementEventMap[KeyboardEvents]) => void,\n key: string | string[],\n events: KeyboardEvents[] = ['keydown']\n) => {\n useEffect(() => {\n const handleKeyboardEvent = (event: HTMLElementEventMap[KeyboardEvents]) => {\n if (event.key === key || (Array.isArray(key) && key.includes(event.key))) {\n callback(event);\n }\n };\n\n events.forEach(eventName => ref.current?.addEventListener(eventName, handleKeyboardEvent));\n\n return () => {\n events.forEach(eventName => ref.current?.removeEventListener(eventName, handleKeyboardEvent));\n };\n }, [ref, callback, events, key]);\n};\n"],"names":["useKeyboardEvent","ref","callback","key","events","useEffect","handleKeyboardEvent","event","eventName","_a"],"mappings":"kCAWa,MAAAA,EAAmB,CAC9BC,EACAC,EACAC,EACAC,EAA2B,CAAC,SAAS,IAClC,CACHC,EAAU,IAAM,CACR,MAAAC,EAAuBC,GAA+C,EACtEA,EAAM,MAAQJ,GAAQ,MAAM,QAAQA,CAAG,GAAKA,EAAI,SAASI,EAAM,GAAG,IACpEL,EAASK,CAAK,CAChB,EAGF,OAAAH,EAAO,QAAqBI,UAAA,OAAAC,EAAAR,EAAI,UAAJ,YAAAQ,EAAa,iBAAiBD,EAAWF,GAAoB,EAElF,IAAM,CACXF,EAAO,QAAqBI,UAAA,OAAAC,EAAAR,EAAI,UAAJ,YAAAQ,EAAa,oBAAoBD,EAAWF,GAAoB,CAAA,GAE7F,CAACL,EAAKC,EAAUE,EAAQD,CAAG,CAAC,CACjC"}
@@ -1,6 +1,3 @@
1
- declare type PickByValue<T, V> = Pick<T, {
2
- [K in keyof T]: T[K] extends V ? K : never;
3
- }[keyof T]>;
4
1
  declare type OutsideEvents = keyof PickByValue<HTMLElementEventMap, MouseEvent | FocusEvent>;
5
2
  /**
6
3
  * Custom hook for klikk eller fokus utenfor et gitt element
@@ -8,6 +5,6 @@ declare type OutsideEvents = keyof PickByValue<HTMLElementEventMap, MouseEvent |
8
5
  * @param handleClick Callback-funksjon ved klikk utenfor elementet
9
6
  * @param events Type eventer å lytte på. Default: mousedown
10
7
  */
11
- export declare const useOutsideEvent: (ref: React.RefObject<HTMLElement>, handleClick: () => void, events?: OutsideEvents[]) => void;
8
+ export declare const useOutsideEvent: (ref: React.RefObject<HTMLElement>, handleClick: (event: HTMLElementEventMap[OutsideEvents]) => void, events?: OutsideEvents[]) => void;
12
9
  export {};
13
10
  //# sourceMappingURL=useOutsideEvent.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOutsideEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideEvent.ts"],"names":[],"mappings":"AAEA,aAAK,WAAW,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK;CAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;AAE1F,aAAK,aAAa,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QACrB,MAAM,SAAS,CAAC,WAAW,CAAC,eACpB,MAAM,IAAI,WACf,aAAa,EAAE,KACtB,IAcF,CAAC"}
1
+ {"version":3,"file":"useOutsideEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideEvent.ts"],"names":[],"mappings":"AAEA,aAAK,aAAa,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QACrB,MAAM,SAAS,CAAC,WAAW,CAAC,uBACZ,mBAAmB,CAAC,aAAa,CAAC,KAAK,IAAI,WACxD,aAAa,EAAE,KACtB,IAcF,CAAC"}
@@ -1,2 +1,2 @@
1
- import{useEffect as s}from"react";const d=(r,c,t=["mousedown"])=>{const n=e=>{var o;(o=r.current)!=null&&o.contains(e.target)||c()};s(()=>(t.forEach(e=>document.addEventListener(e,n)),()=>{t.forEach(e=>document.removeEventListener(e,n))}))};export{d as useOutsideEvent};
1
+ import{useEffect as c}from"react";const d=(o,n,e=["mousedown"])=>{const r=t=>{var u;(u=o.current)!=null&&u.contains(t.target)||n(t)};c(()=>(e.forEach(t=>document.addEventListener(t,r)),()=>{e.forEach(t=>document.removeEventListener(t,r))}),[o,n,e])};export{d as useOutsideEvent};
2
2
  //# sourceMappingURL=useOutsideEvent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOutsideEvent.js","sources":["../../src/hooks/useOutsideEvent.ts"],"sourcesContent":["import { useEffect } from 'react';\n\ntype PickByValue<T, V> = Pick<T, { [K in keyof T]: T[K] extends V ? K : never }[keyof T]>;\n\ntype OutsideEvents = keyof PickByValue<HTMLElementEventMap, MouseEvent | FocusEvent>;\n\n/**\n * Custom hook for klikk eller fokus utenfor et gitt element\n * @param ref Sjekker om det klikkes utenfor dette elementet\n * @param handleClick Callback-funksjon ved klikk utenfor elementet\n * @param events Type eventer å lytte på. Default: mousedown\n */\nexport const useOutsideEvent = (\n ref: React.RefObject<HTMLElement>,\n handleClick: () => void,\n events: OutsideEvents[] = ['mousedown']\n): void => {\n const handleOutsideEvent = (event: HTMLElementEventMap[OutsideEvents]): void => {\n if (!ref.current?.contains(event.target as Node)) {\n handleClick();\n }\n };\n\n useEffect(() => {\n events.forEach(eventName => document.addEventListener(eventName, handleOutsideEvent));\n\n return () => {\n events.forEach(eventName => document.removeEventListener(eventName, handleOutsideEvent));\n };\n });\n};\n"],"names":["useOutsideEvent","ref","handleClick","events","handleOutsideEvent","event","_a","useEffect","eventName"],"mappings":"kCAYO,MAAMA,EAAkB,CAC7BC,EACAC,EACAC,EAA0B,CAAC,WAAW,IAC7B,CACH,MAAAC,EAAsBC,GAAoD,QACzEC,EAAAL,EAAI,UAAJ,MAAAK,EAAa,SAASD,EAAM,SACnBH,GACd,EAGFK,EAAU,KACRJ,EAAO,QAAqBK,GAAA,SAAS,iBAAiBA,EAAWJ,CAAkB,CAAC,EAE7E,IAAM,CACXD,EAAO,QAAqBK,GAAA,SAAS,oBAAoBA,EAAWJ,CAAkB,CAAC,CAAA,EAE1F,CACH"}
1
+ {"version":3,"file":"useOutsideEvent.js","sources":["../../src/hooks/useOutsideEvent.ts"],"sourcesContent":["import { useEffect } from 'react';\n\ntype OutsideEvents = keyof PickByValue<HTMLElementEventMap, MouseEvent | FocusEvent>;\n\n/**\n * Custom hook for klikk eller fokus utenfor et gitt element\n * @param ref Sjekker om det klikkes utenfor dette elementet\n * @param handleClick Callback-funksjon ved klikk utenfor elementet\n * @param events Type eventer å lytte på. Default: mousedown\n */\nexport const useOutsideEvent = (\n ref: React.RefObject<HTMLElement>,\n handleClick: (event: HTMLElementEventMap[OutsideEvents]) => void,\n events: OutsideEvents[] = ['mousedown']\n): void => {\n const handleOutsideEvent = (event: HTMLElementEventMap[OutsideEvents]): void => {\n if (!ref.current?.contains(event.target as Node)) {\n handleClick(event);\n }\n };\n\n useEffect(() => {\n events.forEach(eventName => document.addEventListener(eventName, handleOutsideEvent));\n\n return () => {\n events.forEach(eventName => document.removeEventListener(eventName, handleOutsideEvent));\n };\n }, [ref, handleClick, events]);\n};\n"],"names":["useOutsideEvent","ref","handleClick","events","handleOutsideEvent","event","_a","useEffect","eventName"],"mappings":"kCAUO,MAAMA,EAAkB,CAC7BC,EACAC,EACAC,EAA0B,CAAC,WAAW,IAC7B,CACH,MAAAC,EAAsBC,GAAoD,QACzEC,EAAAL,EAAI,UAAJ,MAAAK,EAAa,SAASD,EAAM,SAC/BH,EAAYG,CAAK,CACnB,EAGFE,EAAU,KACRJ,EAAO,QAAqBK,GAAA,SAAS,iBAAiBA,EAAWJ,CAAkB,CAAC,EAE7E,IAAM,CACXD,EAAO,QAAqBK,GAAA,SAAS,oBAAoBA,EAAWJ,CAAkB,CAAC,CAAA,GAExF,CAACH,EAAKC,EAAaC,CAAM,CAAC,CAC/B"}
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{theme as f}from"./theme/index.js";import{Breakpoint as a,useBreakpoint as d}from"./hooks/useBreakpoint.js";import{useFocusToggle as E}from"./hooks/useFocusToggle.js";import{useFocusTrap as y}from"./hooks/useFocusTrap.js";import{useHover as b}from"./hooks/useHover.js";import{useIntersectionObserver as T}from"./hooks/useIntersectionObserver.js";import{useIsVisible as l}from"./hooks/useIsVisible.js";import{useLayoutEvent as R}from"./hooks/useLayoutEvent.js";import{usePrevious as z}from"./hooks/usePrevious.js";import{useSticky as K}from"./hooks/useSticky.js";import{useSize as S}from"./hooks/useSize.js";import{useResizeObserver as _}from"./hooks/useResizeObserver.js";import{useToggle as C}from"./hooks/useToggle.js";import{useKeyboardEvent as h}from"./hooks/useKeyboardEvent.js";import{useOutsideEvent as G}from"./hooks/useOutsideEvent.js";import{useUuid as M}from"./hooks/useUuid.js";import{a as W}from"./uuid.js";import{AVERAGE_CHARACTER_WIDTH_PX as Z,AnalyticsId as j,FormMode as q,FormVariant as w,IconSize as J,KeyboardEventKey as N,ZIndex as Q}from"./constants.js";import"./theme/palette.js";import"./theme/spacers.js";import"./theme/grid.js";import"react";import"./hooks/useFocusableElements.js";import"./hooks/focus-utils.js";import"./utils/debounce.js";import"./utils/environment.js";export{Z as AVERAGE_CHARACTER_WIDTH_PX,j as AnalyticsId,a as Breakpoint,q as FormMode,w as FormVariant,J as IconSize,N as KeyboardEventKey,Q as ZIndex,f as theme,d as useBreakpoint,E as useFocusToggle,y as useFocusTrap,b as useHover,T as useIntersectionObserver,l as useIsVisible,h as useKeyboardEvent,R as useLayoutEvent,G as useOutsideEvent,z as usePrevious,_ as useResizeObserver,S as useSize,K as useSticky,C as useToggle,M as useUuid,W as uuid};
1
+ import{theme as n}from"./theme/index.js";import{Breakpoint as d,useBreakpoint as v}from"./hooks/useBreakpoint.js";import{useFocusToggle as c}from"./hooks/useFocusToggle.js";import{useFocusTrap as I}from"./hooks/useFocusTrap.js";import{useHover as A}from"./hooks/useHover.js";import{useIntersectionObserver as g}from"./hooks/useIntersectionObserver.js";import{useIsVisible as F}from"./hooks/useIsVisible.js";import{useLayoutEvent as k}from"./hooks/useLayoutEvent.js";import{usePrevious as H}from"./hooks/usePrevious.js";import{useSticky as O}from"./hooks/useSticky.js";import{useSize as V}from"./hooks/useSize.js";import{useResizeObserver as B}from"./hooks/useResizeObserver.js";import{useToggle as P}from"./hooks/useToggle.js";import{useKeyboardEvent as D}from"./hooks/useKeyboardEvent.js";import{useOutsideEvent as L}from"./hooks/useOutsideEvent.js";import{useUuid as U}from"./hooks/useUuid.js";import{a as X}from"./uuid.js";import{AVERAGE_CHARACTER_WIDTH_PX as j,AnalyticsId as q,FormMode as w,FormVariant as J,IconSize as N,KeyboardEventKey as Q,ZIndex as Y}from"./constants.js";import"./theme/palette.js";import"./theme/spacers.js";import"./theme/grid.js";import"react";import"./hooks/useElementList.js";import"./hooks/useFocusableElements.js";import"./utils/focus.js";import"./utils/debounce.js";import"./utils/environment.js";export{j as AVERAGE_CHARACTER_WIDTH_PX,q as AnalyticsId,d as Breakpoint,w as FormMode,J as FormVariant,N as IconSize,Q as KeyboardEventKey,Y as ZIndex,n as theme,v as useBreakpoint,c as useFocusToggle,I as useFocusTrap,A as useHover,g as useIntersectionObserver,F as useIsVisible,D as useKeyboardEvent,k as useLayoutEvent,L as useOutsideEvent,H as usePrevious,B as useResizeObserver,V as useSize,O as useSticky,P as useToggle,U as useUuid,X as uuid};
2
2
  //# sourceMappingURL=index.js.map