@helsenorge/designsystem-react 3.1.4 → 3.2.1-beta.1

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 (120) hide show
  1. package/CHANGELOG.md +551 -590
  2. package/Checkbox.js +1 -1
  3. package/Checkbox.js.map +1 -1
  4. package/Input.js +1 -1
  5. package/Input.js.map +1 -1
  6. package/Label.js +2 -0
  7. package/Label.js.map +1 -0
  8. package/Panel.js +1 -1
  9. package/Panel.js.map +1 -1
  10. package/README.md +0 -8
  11. package/RadioButton.js +1 -1
  12. package/RadioButton.js.map +1 -1
  13. package/Select.js +1 -1
  14. package/Select.js.map +1 -1
  15. package/StatusDot.js +1 -1
  16. package/StatusDot.js.map +1 -1
  17. package/Textarea.js +1 -1
  18. package/Textarea.js.map +1 -1
  19. package/components/Button/componentdata.json +1 -1
  20. package/components/Checkbox/Checkbox.d.ts +3 -3
  21. package/components/Checkbox/Checkbox.d.ts.map +1 -1
  22. package/components/Checkbox/componentdata.json +1 -1
  23. package/components/Checkbox/index.js +1 -1
  24. package/components/Checkbox/styles.module.scss +223 -59
  25. package/components/Checkbox/styles.module.scss.d.ts +25 -3
  26. package/components/Dropdown/componentdata.json +1 -1
  27. package/components/ErrorWrapper/componentdata.json +1 -1
  28. package/components/Expander/componentdata.json +1 -1
  29. package/components/FormExample/FormExample.d.ts.map +1 -1
  30. package/components/FormExample/index.js +3 -3
  31. package/components/FormExample/index.js.map +1 -1
  32. package/components/FormGroup/index.js +1 -1
  33. package/components/HelpBubbleExample/componentdata.json +1 -1
  34. package/components/HighlightBox/componentdata.json +1 -1
  35. package/components/Input/Input.d.ts +2 -8
  36. package/components/Input/Input.d.ts.map +1 -1
  37. package/components/Input/componentdata.json +1 -1
  38. package/components/Input/index.js +1 -1
  39. package/components/Input/styles.module.scss.d.ts +0 -3
  40. package/components/Label/Label.d.ts +41 -0
  41. package/components/Label/Label.d.ts.map +1 -0
  42. package/components/Label/SubLabel.d.ts +17 -0
  43. package/components/Label/SubLabel.d.ts.map +1 -0
  44. package/components/Label/componentdata.json +1 -0
  45. package/components/Label/index.d.ts +5 -0
  46. package/components/Label/index.d.ts.map +1 -0
  47. package/components/Label/index.js +2 -0
  48. package/components/Label/index.js.map +1 -0
  49. package/components/Label/styles.module.scss +66 -0
  50. package/components/Label/styles.module.scss.d.ts +17 -0
  51. package/components/Panel/Panel.d.ts +2 -0
  52. package/components/Panel/Panel.d.ts.map +1 -1
  53. package/components/Panel/componentdata.json +1 -1
  54. package/components/Panel/styles.module.scss +65 -2
  55. package/components/Panel/styles.module.scss.d.ts +7 -0
  56. package/components/PopMenu/componentdata.json +1 -1
  57. package/components/RadioButton/RadioButton.d.ts +3 -3
  58. package/components/RadioButton/RadioButton.d.ts.map +1 -1
  59. package/components/RadioButton/componentdata.json +1 -1
  60. package/components/RadioButton/index.js +1 -1
  61. package/components/RadioButton/styles.module.scss +228 -52
  62. package/components/RadioButton/styles.module.scss.d.ts +15 -3
  63. package/components/Select/Select.d.ts +2 -2
  64. package/components/Select/Select.d.ts.map +1 -1
  65. package/components/Select/componentdata.json +1 -1
  66. package/components/Select/index.js +1 -1
  67. package/components/Select/styles.module.scss +0 -22
  68. package/components/Select/styles.module.scss.d.ts +0 -3
  69. package/components/ServiceMessage/ServiceMessage.d.ts.map +1 -1
  70. package/components/ServiceMessage/index.js +1 -1
  71. package/components/ServiceMessage/index.js.map +1 -1
  72. package/components/ServiceMessage/styles.module.scss +18 -0
  73. package/components/ServiceMessage/styles.module.scss.d.ts +4 -0
  74. package/components/StatusDot/StatusDot.d.ts +9 -0
  75. package/components/StatusDot/StatusDot.d.ts.map +1 -1
  76. package/components/StatusDot/componentdata.json +1 -1
  77. package/components/StatusDot/index.js +1 -1
  78. package/components/StatusDot/styles.module.scss +14 -3
  79. package/components/StatusDot/styles.module.scss.d.ts +1 -0
  80. package/components/Step/componentdata.json +1 -1
  81. package/components/Table/Table.d.ts.map +1 -1
  82. package/components/Table/TableBody/TableBody.d.ts +1 -1
  83. package/components/Table/TableBody/TableBody.d.ts.map +1 -1
  84. package/components/Table/TableCell/TableCell.d.ts +1 -1
  85. package/components/Table/TableCell/TableCell.d.ts.map +1 -1
  86. package/components/Table/TableExpandedRow/TableExpandedRow.d.ts +1 -1
  87. package/components/Table/TableExpandedRow/TableExpandedRow.d.ts.map +1 -1
  88. package/components/Table/TableExpanderCell/TableExpanderCell.d.ts +2 -2
  89. package/components/Table/TableExpanderCell/TableExpanderCell.d.ts.map +1 -1
  90. package/components/Table/TableHead/TableHead.d.ts +1 -1
  91. package/components/Table/TableHead/TableHead.d.ts.map +1 -1
  92. package/components/Table/TableHeadCell/TableHeadCell.d.ts +1 -1
  93. package/components/Table/TableHeadCell/TableHeadCell.d.ts.map +1 -1
  94. package/components/Table/TableRow/componentdata.json +1 -1
  95. package/components/Table/index.js +1 -1
  96. package/components/Table/index.js.map +1 -1
  97. package/components/Table/styles.module.scss +0 -2
  98. package/components/Table/utils.d.ts +8 -0
  99. package/components/Table/utils.d.ts.map +1 -1
  100. package/components/Tag/componentdata.json +1 -1
  101. package/components/Textarea/Textarea.d.ts +2 -6
  102. package/components/Textarea/Textarea.d.ts.map +1 -1
  103. package/components/Textarea/componentdata.json +1 -1
  104. package/components/Textarea/index.js +1 -1
  105. package/components/Textarea/styles.module.scss.d.ts +0 -3
  106. package/components/Tooltip/TooltipWord/styles.module.scss +4 -1
  107. package/components/Tooltip/componentdata.json +1 -1
  108. package/components/TooltipExample/componentdata.json +1 -1
  109. package/components/Validation/index.js +1 -1
  110. package/constants.d.ts +2 -0
  111. package/constants.d.ts.map +1 -1
  112. package/constants.js +1 -1
  113. package/constants.js.map +1 -1
  114. package/hooks/usePseudoClasses.d.ts +12 -0
  115. package/hooks/usePseudoClasses.d.ts.map +1 -0
  116. package/hooks/usePseudoClasses.js +2 -0
  117. package/hooks/usePseudoClasses.js.map +1 -0
  118. package/package.json +1 -1
  119. package/scss/_input.scss +6 -28
  120. package/scss/_spacers.scss +1 -1
@@ -1 +1 @@
1
- {"props":{"children":{"defaultValue":null,"description":"Ordet som skal ha en tilhørende tooltip","name":"children","parent":{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},{"fileName":"s/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string & ReactNode"}},"description":{"defaultValue":null,"description":"Teksten som skal vises i tooltip","name":"description","parent":{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":true,"type":{"name":"ReactNode"}},"testId":{"defaultValue":null,"description":"Valgfri test-id","name":"testId","parent":{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":false,"type":{"name":"string"}}}}
1
+ {"props":{"children":{"defaultValue":null,"description":"Ordet som skal ha en tilhørende tooltip","name":"children","parent":{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string & ReactNode"}},"description":{"defaultValue":null,"description":"Teksten som skal vises i tooltip","name":"description","parent":{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":true,"type":{"name":"ReactNode"}},"testId":{"defaultValue":null,"description":"Valgfri test-id","name":"testId","parent":{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":false,"type":{"name":"string"}}}}
@@ -1 +1 @@
1
- {"props":{"children":{"defaultValue":null,"description":"Ordet som skal ha en tilhørende tooltip","name":"children","parent":{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},{"fileName":"s/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string & ReactNode"}},"description":{"defaultValue":null,"description":"Teksten som skal vises i tooltip","name":"description","parent":{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":true,"type":{"name":"ReactNode"}},"testId":{"defaultValue":null,"description":"Valgfri test-id","name":"testId","parent":{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":false,"type":{"name":"string"}}}}
1
+ {"props":{"children":{"defaultValue":null,"description":"Ordet som skal ha en tilhørende tooltip","name":"children","parent":{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},{"fileName":"designsystem/node_modules/@types/react/index.d.ts","name":"TypeLiteral"}],"required":false,"type":{"name":"string & ReactNode"}},"description":{"defaultValue":null,"description":"Teksten som skal vises i tooltip","name":"description","parent":{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":true,"type":{"name":"ReactNode"}},"testId":{"defaultValue":null,"description":"Valgfri test-id","name":"testId","parent":{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"},"declarations":[{"fileName":"designsystem/src/components/Tooltip/Tooltip.tsx","name":"TooltipProps"}],"required":false,"type":{"name":"string"}}}}
@@ -1,2 +1,2 @@
1
- import{V as t}from"../../Validation.js";import{a as M}from"../../Validation.js";import"react";import"classnames";import"../../constants.js";import"../../FormGroup.js";import"../../utils/component.js";import"../../Checkbox.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../Icons/Check.js";import"../Checkbox/styles.module.scss";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../../MaxCharacters.js";import"../MaxCharacters/styles.module.scss";import"../Input/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Select.js";import"../Icons/ChevronDown.js";import"../Select/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../FormGroup/styles.module.scss";import"./styles.module.scss";export{M as Validation,t as default};
1
+ import{V as t}from"../../Validation.js";import{a as Y}from"../../Validation.js";import"react";import"classnames";import"../../constants.js";import"../../FormGroup.js";import"../../utils/component.js";import"../../Checkbox.js";import"../../hooks/usePseudoClasses.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../Icons/Check.js";import"../../Label.js";import"../../Spacer.js";import"../Spacer/styles.module.scss";import"../Label/styles.module.scss";import"../../StatusDot.js";import"../../hooks/useBreakpoint.js";import"../Icons/Attachment.js";import"../Icons/Group.js";import"../Icons/NoAccess.js";import"../Icons/Undo.js";import"../StatusDot/styles.module.scss";import"../Checkbox/styles.module.scss";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";import"../../Input.js";import"../../MaxCharacters.js";import"../MaxCharacters/styles.module.scss";import"../Input/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Select.js";import"../Icons/ChevronDown.js";import"../Select/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../FormGroup/styles.module.scss";import"./styles.module.scss";export{Y as Validation,t as default};
2
2
  //# sourceMappingURL=index.js.map
package/constants.d.ts CHANGED
@@ -68,6 +68,7 @@ export declare enum AnalyticsId {
68
68
  HighlightBox = "highlight-box",
69
69
  Icon = "icon",
70
70
  Input = "input",
71
+ Label = "label",
71
72
  Link = "link",
72
73
  LinkList = "link-list",
73
74
  List = "list",
@@ -86,6 +87,7 @@ export declare enum AnalyticsId {
86
87
  Slider = "slider",
87
88
  Spacer = "spacer",
88
89
  StatusDot = "status-dot",
90
+ Sublabel = "sublabel",
89
91
  Table = "table",
90
92
  Tag = "tag",
91
93
  TagList = "tag-list",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;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AAoB,2BAA2B;IAC/C,iBAAiB,uBAAuB;IACxC,yBAAyB,gCAAgC;IACzD,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,iBAAiB,uBAAuB;IACxC,KAAK,UAAU;IACf,SAAS,eAAe;IACxB,OAAO,aAAa;IACpB,OAAO,aAAa;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,eAAe;IACxB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,aAAa;IACpB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ"}
package/constants.js CHANGED
@@ -1,2 +1,2 @@
1
- var e=(r=>(r[r.XXSmall=24]="XXSmall",r[r.XSmall=38]="XSmall",r[r.Small=48]="Small",r[r.Medium=64]="Medium",r[r.Large=80]="Large",r[r.XLarge=130]="XLarge",r))(e||{}),o=(r=>(r[r.Modal=13e5]="Modal",r[r.ExpanderTrigger=1e4]="ExpanderTrigger",r))(o||{});const t=12;var p=(r=>(r.onwhite="onwhite",r.ongrey="ongrey",r.onblueberry="onblueberry",r.ondark="ondark",r.oninvalid="oninvalid",r))(p||{}),a=(r=>(r.normal="normal",r.bigform="bigform",r))(a||{}),u=(r=>(r.AnchorLink="anchor-link",r.Avatar="avatar",r.Badge="badge",r.Button="button",r.Checkbox="checkbox",r.Close="close",r.Dropdown="dropdown",r.Duolist="duolist",r.Expander="expander",r.ExpanderList="expander-list",r.ExpanderListExpander="expander-list-expander",r.ExpanderHierarchy="expander-hierarchy",r.ExpanderHierarchyExpander="expander-hierarchy-expander",r.FormGroup="form-group",r.FormLayout="form-layout",r.HelpBubble="help-bubble",r.HighlightBox="highlight-box",r.Icon="icon",r.Input="input",r.Link="link",r.LinkList="link-list",r.List="list",r.Loader="loader",r.Logo="logo",r.Modal="modal",r.NotificationPanel="notification-panel",r.Panel="panel",r.PanelList="panel-list",r.PopMenu="pop-menu",r.PopOver="pop-over",r.Portal="portal",r.Stepper="stepper",r.RadioButton="radio-button",r.Select="select",r.Slider="slider",r.Spacer="spacer",r.StatusDot="status-dot",r.Table="table",r.Tag="tag",r.TagList="tag-list",r.Textarea="textarea",r.Tile="tile",r.Title="title",r.Tooltip="tooltip",r.Validation="validation",r))(u||{}),g=(r=>(r.Enter="Enter",r.Escape="Escape",r.ArrowDown="ArrowDown",r.ArrowUp="ArrowUp",r.Home="Home",r.End="End",r))(g||{});export{t as AVERAGE_CHARACTER_WIDTH_PX,u as AnalyticsId,p as FormMode,a as FormVariant,e as IconSize,g as KeyboardEventKey,o as ZIndex};
1
+ var e=(r=>(r[r.XXSmall=24]="XXSmall",r[r.XSmall=38]="XSmall",r[r.Small=48]="Small",r[r.Medium=64]="Medium",r[r.Large=80]="Large",r[r.XLarge=130]="XLarge",r))(e||{}),o=(r=>(r[r.Modal=13e5]="Modal",r[r.ExpanderTrigger=1e4]="ExpanderTrigger",r))(o||{});const g=12;var p=(r=>(r.onwhite="onwhite",r.ongrey="ongrey",r.onblueberry="onblueberry",r.ondark="ondark",r.oninvalid="oninvalid",r))(p||{}),a=(r=>(r.normal="normal",r.bigform="bigform",r))(a||{}),u=(r=>(r.AnchorLink="anchor-link",r.Avatar="avatar",r.Badge="badge",r.Button="button",r.Checkbox="checkbox",r.Close="close",r.Dropdown="dropdown",r.Duolist="duolist",r.Expander="expander",r.ExpanderList="expander-list",r.ExpanderListExpander="expander-list-expander",r.ExpanderHierarchy="expander-hierarchy",r.ExpanderHierarchyExpander="expander-hierarchy-expander",r.FormGroup="form-group",r.FormLayout="form-layout",r.HelpBubble="help-bubble",r.HighlightBox="highlight-box",r.Icon="icon",r.Input="input",r.Label="label",r.Link="link",r.LinkList="link-list",r.List="list",r.Loader="loader",r.Logo="logo",r.Modal="modal",r.NotificationPanel="notification-panel",r.Panel="panel",r.PanelList="panel-list",r.PopMenu="pop-menu",r.PopOver="pop-over",r.Portal="portal",r.Stepper="stepper",r.RadioButton="radio-button",r.Select="select",r.Slider="slider",r.Spacer="spacer",r.StatusDot="status-dot",r.Sublabel="sublabel",r.Table="table",r.Tag="tag",r.TagList="tag-list",r.Textarea="textarea",r.Tile="tile",r.Title="title",r.Tooltip="tooltip",r.Validation="validation",r))(u||{}),l=(r=>(r.Enter="Enter",r.Escape="Escape",r.ArrowDown="ArrowDown",r.ArrowUp="ArrowUp",r.Home="Home",r.End="End",r))(l||{});export{g as AVERAGE_CHARACTER_WIDTH_PX,u as AnalyticsId,p as FormMode,a as FormVariant,e as IconSize,l as KeyboardEventKey,o as ZIndex};
2
2
  //# sourceMappingURL=constants.js.map
package/constants.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n Stepper = 'stepper',\n RadioButton = 'radio-button',\n Select = 'select',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Tooltip = 'tooltip',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n Home = 'Home',\n End = 'End',\n}\n"],"names":["IconSize","ZIndex","AVERAGE_CHARACTER_WIDTH_PX","FormMode","FormVariant","AnalyticsId","KeyboardEventKey"],"mappings":"AAAY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,QAAU,EAAV,EAAA,UACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,GAAT,EAAA,SANUA,IAAAA,GAAA,CAAA,CAAA,EASAC,GAAAA,IACVA,EAAAA,EAAA,MAAQ,IAAR,EAAA,QACAA,EAAAA,EAAA,gBAAkB,GAAlB,EAAA,kBAFUA,IAAAA,GAAA,CAAA,CAAA,EAKL,MAAMC,EAA6B,GAyC9B,IAAAC,GAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,UAAY,YALFA,IAAAA,GAAA,CAAA,CAAA,EAQAC,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UAFAA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACVA,EAAA,WAAa,cACbA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,aAAe,gBACfA,EAAA,qBAAuB,yBACvBA,EAAA,kBAAoB,qBACpBA,EAAA,0BAA4B,8BAC5BA,EAAA,UAAY,aACZA,EAAA,WAAa,cACbA,EAAA,WAAa,cACbA,EAAA,aAAe,gBACfA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,SAAW,YACXA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,kBAAoB,qBACpBA,EAAA,MAAQ,QACRA,EAAA,UAAY,aACZA,EAAA,QAAU,WACVA,EAAA,QAAU,WACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,YAAc,eACdA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,UAAY,aACZA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,QAAU,WACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,WAAa,aA7CHA,IAAAA,GAAA,CAAA,CAAA,EAgDAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,KAAO,OACPA,EAAA,IAAM,MANIA,IAAAA,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Label = 'label',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n Stepper = 'stepper',\n RadioButton = 'radio-button',\n Select = 'select',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Sublabel = 'sublabel',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Tooltip = 'tooltip',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n Home = 'Home',\n End = 'End',\n}\n"],"names":["IconSize","ZIndex","AVERAGE_CHARACTER_WIDTH_PX","FormMode","FormVariant","AnalyticsId","KeyboardEventKey"],"mappings":"AAAY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,QAAU,EAAV,EAAA,UACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,GAAT,EAAA,SANUA,IAAAA,GAAA,CAAA,CAAA,EASAC,GAAAA,IACVA,EAAAA,EAAA,MAAQ,IAAR,EAAA,QACAA,EAAAA,EAAA,gBAAkB,GAAlB,EAAA,kBAFUA,IAAAA,GAAA,CAAA,CAAA,EAKL,MAAMC,EAA6B,GAyC9B,IAAAC,GAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,UAAY,YALFA,IAAAA,GAAA,CAAA,CAAA,EAQAC,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UAFAA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACVA,EAAA,WAAa,cACbA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,aAAe,gBACfA,EAAA,qBAAuB,yBACvBA,EAAA,kBAAoB,qBACpBA,EAAA,0BAA4B,8BAC5BA,EAAA,UAAY,aACZA,EAAA,WAAa,cACbA,EAAA,WAAa,cACbA,EAAA,aAAe,gBACfA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,SAAW,YACXA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,kBAAoB,qBACpBA,EAAA,MAAQ,QACRA,EAAA,UAAY,aACZA,EAAA,QAAU,WACVA,EAAA,QAAU,WACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,YAAc,eACdA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,UAAY,aACZA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,QAAU,WACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,WAAa,aA/CHA,IAAAA,GAAA,CAAA,CAAA,EAkDAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,KAAO,OACPA,EAAA,IAAM,MANIA,IAAAA,GAAA,CAAA,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { RefObject } from 'react';
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
6
+ */
7
+ export declare const usePseudoClasses: <T extends HTMLElement | SVGElement>(ref?: RefObject<T> | null | undefined) => {
8
+ refObject: RefObject<T>;
9
+ isHovered: boolean;
10
+ isFocused: boolean;
11
+ };
12
+ //# sourceMappingURL=usePseudoClasses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePseudoClasses.d.ts","sourceRoot":"","sources":["../../src/hooks/usePseudoClasses.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;eAEY,OAAO;eAAa,OAAO;CAyBnE,CAAC"}
@@ -0,0 +1,2 @@
1
+ import{useRef as I,useState as L,useEffect as p}from"react";const M=t=>{const e=t||I(null),[h,s]=L(!1),[F,n]=L(!1);return p(()=>{var a,d,v,i;const r=()=>s(!0),u=()=>s(!1),o=()=>n(!0),c=()=>n(!1);return(a=e.current)==null||a.addEventListener("mouseenter",r),(d=e.current)==null||d.addEventListener("mouseleave",u),(v=e.current)==null||v.addEventListener("focusin",o),(i=e.current)==null||i.addEventListener("focusout",c),()=>{var l,f,m,E;(l=e.current)==null||l.removeEventListener("mouseenter",r),(f=e.current)==null||f.removeEventListener("mouseleave",u),(m=e.current)==null||m.removeEventListener("focusin",o),(E=e.current)==null||E.removeEventListener("focusout",c)}},[e]),{refObject:e,isHovered:h,isFocused:F}};export{M as usePseudoClasses};
2
+ //# sourceMappingURL=usePseudoClasses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePseudoClasses.js","sources":["../../src/hooks/usePseudoClasses.ts"],"sourcesContent":["import { useRef, useEffect, useState, RefObject } from 'react';\n\n/**\n * Få 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 usePseudoClasses = <T extends HTMLElement | SVGElement>(\n ref?: RefObject<T> | null\n): { refObject: RefObject<T>; isHovered: boolean; isFocused: boolean } => {\n const refObject = ref ? ref : useRef<T>(null);\n const [isHovered, setIsHovered] = useState(false);\n const [isFocused, setIsFocused] = useState(false);\n\n useEffect(() => {\n const handleMouseEnter = (): void => setIsHovered(true);\n const handleMouseLeave = (): void => setIsHovered(false);\n const handleFocusIn = (): void => setIsFocused(true);\n const handleFocusOut = (): void => setIsFocused(false);\n\n refObject.current?.addEventListener('mouseenter', handleMouseEnter);\n refObject.current?.addEventListener('mouseleave', handleMouseLeave);\n refObject.current?.addEventListener('focusin', handleFocusIn);\n refObject.current?.addEventListener('focusout', handleFocusOut);\n\n return (): void => {\n refObject.current?.removeEventListener('mouseenter', handleMouseEnter);\n refObject.current?.removeEventListener('mouseleave', handleMouseLeave);\n refObject.current?.removeEventListener('focusin', handleFocusIn);\n refObject.current?.removeEventListener('focusout', handleFocusOut);\n };\n }, [refObject]);\n\n return { refObject, isHovered, isFocused };\n};\n"],"names":["usePseudoClasses","ref","refObject","useRef","isHovered","setIsHovered","useState","isFocused","setIsFocused","useEffect","handleMouseEnter","handleMouseLeave","handleFocusIn","handleFocusOut","_a","_b","_c","_d"],"mappings":"4DAOa,MAAAA,EACXC,GACwE,CACxE,MAAMC,EAAYD,GAAYE,EAAU,IAAI,EACtC,CAACC,EAAWC,CAAY,EAAIC,EAAS,EAAK,EAC1C,CAACC,EAAWC,CAAY,EAAIF,EAAS,EAAK,EAEhD,OAAAG,EAAU,IAAM,aACR,MAAAC,EAAmB,IAAYL,EAAa,EAAI,EAChDM,EAAmB,IAAYN,EAAa,EAAK,EACjDO,EAAgB,IAAYJ,EAAa,EAAI,EAC7CK,EAAiB,IAAYL,EAAa,EAAK,EAE3C,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,GAEzC,IAAY,cACPC,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,CACnE,EACC,CAACX,CAAS,CAAC,EAEP,CAAE,UAAAA,EAAW,UAAAE,EAAW,UAAAG,EACjC"}
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "description": "The official design system for Helsenorge built with React.",
5
5
  "homepage": "https://helsenorge.design",
6
- "version": "3.1.4",
6
+ "version": "3.2.1-beta.1",
7
7
  "author": "Helsenorge",
8
8
  "license": "MIT",
9
9
  "peerDependencies": {
package/scss/_input.scss CHANGED
@@ -2,28 +2,6 @@
2
2
 
3
3
  @mixin input-wrapper {
4
4
  width: 100%;
5
-
6
- &__label-wrapper {
7
- display: inline-flex;
8
- align-items: center;
9
- line-height: getSpacer(m);
10
- font-size: $font-size-sm;
11
- font-weight: 600;
12
- padding-bottom: getSpacer(xs);
13
-
14
- @media (min-width: map.get($grid-breakpoints, md)) {
15
- line-height: getSpacer(l);
16
- font-size: $font-size-md;
17
- }
18
-
19
- &--on-dark {
20
- color: $white;
21
- }
22
- }
23
-
24
- &__after-label-children {
25
- padding-left: 0.75rem;
26
- }
27
5
  }
28
6
 
29
7
  @mixin content-wrapper {
@@ -54,6 +32,12 @@
54
32
  }
55
33
  }
56
34
 
35
+ &:focus-within {
36
+ background: $white;
37
+ border-color: $neutral900;
38
+ box-shadow: 0 0 0 2px $neutral900;
39
+ }
40
+
57
41
  &:hover {
58
42
  background: $neutral50;
59
43
  border-color: $neutral700;
@@ -65,12 +49,6 @@
65
49
  }
66
50
  }
67
51
 
68
- &:focus-within {
69
- background: $white;
70
- border-color: $neutral900;
71
- box-shadow: 0 0 0 2px $neutral900;
72
- }
73
-
74
52
  &--on-blueberry {
75
53
  border-color: $blueberry500;
76
54
 
@@ -17,7 +17,7 @@ $spacers: (
17
17
  12: $spacer * 7,
18
18
  13: $spacer * 8,
19
19
  );
20
-
20
+ /* stylelint-disable-next-line */
21
21
  @function getSpacer($spacerSize) {
22
22
  $spacer-value: map.get(
23
23
  (