@helsenorge/designsystem-react 15.7.1 → 16.0.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 (230) hide show
  1. package/lib/Button.js +2 -2
  2. package/lib/Button.js.map +1 -1
  3. package/lib/CHANGELOG.md +2657 -996
  4. package/lib/Close.js +1 -1
  5. package/lib/Close.js.map +1 -1
  6. package/lib/Drawer.js +2 -4
  7. package/lib/Drawer.js.map +1 -1
  8. package/lib/DrawerNavigation.js +1 -0
  9. package/lib/DrawerNavigation.js.map +1 -1
  10. package/lib/Duolist.js +5 -1
  11. package/lib/Duolist.js.map +1 -1
  12. package/lib/ElementHeader.js.map +1 -1
  13. package/lib/FilterLinkList.js +1 -1
  14. package/lib/FilterLinkList.js.map +1 -1
  15. package/lib/FormGroup.js +3 -3
  16. package/lib/FormGroup.js.map +1 -1
  17. package/lib/HelpDetails.js +1 -1
  18. package/lib/HelpTriggerIcon.js +2 -2
  19. package/lib/HelpTriggerIcon.js.map +1 -1
  20. package/lib/HelpTriggerStandalone.js +1 -1
  21. package/lib/HelpTriggerStandalone.js.map +1 -1
  22. package/lib/LazyIcon.js +1 -0
  23. package/lib/LazyIcon.js.map +1 -1
  24. package/lib/LazyIllustration.js +2 -0
  25. package/lib/LazyIllustration.js.map +1 -1
  26. package/lib/LinkList.js +10 -10
  27. package/lib/LinkList.js.map +1 -1
  28. package/lib/ListEditMode.js +1 -1
  29. package/lib/ListEditMode.js.map +1 -1
  30. package/lib/PopOver.js +2 -2
  31. package/lib/PopOver.js.map +1 -1
  32. package/lib/Radio.js +65 -55
  33. package/lib/Radio.js.map +1 -1
  34. package/lib/Radio2.js +74 -0
  35. package/lib/Radio2.js.map +1 -0
  36. package/lib/RadioMarker.js +2 -2
  37. package/lib/RadioMarker.js.map +1 -1
  38. package/lib/TabList.js +5 -5
  39. package/lib/TabList.js.map +1 -1
  40. package/lib/Toggle.js +2 -2
  41. package/lib/Toggle.js.map +1 -1
  42. package/lib/VisualRadio.js +1 -1
  43. package/lib/VisualRadio.js.map +1 -1
  44. package/lib/components/AnchorLink/styles.module.scss +3 -4
  45. package/lib/components/ArticleTeaser/styles.module.scss +12 -12
  46. package/lib/components/Button/Button.d.ts +1 -1
  47. package/lib/components/Button/styles.module.scss +111 -60
  48. package/lib/components/Button/styles.module.scss.d.ts +1 -1
  49. package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +6 -6
  50. package/lib/components/Chip/styles.module.scss +2 -3
  51. package/lib/components/Close/styles.module.scss +2 -3
  52. package/lib/components/DictionaryTrigger/index.js +26 -1
  53. package/lib/{DictionaryTrigger.js.map → components/DictionaryTrigger/index.js.map} +1 -1
  54. package/lib/components/DictionaryTrigger/styles.module.scss +6 -8
  55. package/lib/components/Drawer/Drawer.d.ts +0 -4
  56. package/lib/components/Drawer/DrawerBackButton.module.scss +1 -2
  57. package/lib/components/Drawer/styles.module.scss +6 -3
  58. package/lib/components/Dropdown/SingleSelect/styles.module.scss +0 -2
  59. package/lib/components/Dropdown/index.js +9 -17
  60. package/lib/components/Dropdown/index.js.map +1 -1
  61. package/lib/components/Dropdown/styles.module.scss +12 -14
  62. package/lib/components/Duolist/Duolist.d.ts +14 -2
  63. package/lib/components/Duolist/styles.module.scss +32 -8
  64. package/lib/components/Duolist/styles.module.scss.d.ts +3 -0
  65. package/lib/components/ElementHeader/ElementHeader.d.ts +1 -1
  66. package/lib/components/ElementHeader/styles.module.scss +1 -1
  67. package/lib/components/EmptyState/styles.module.scss +1 -2
  68. package/lib/components/ErrorWrapper/styles.module.scss +3 -3
  69. package/lib/components/Expander/styles.module.scss +0 -2
  70. package/lib/components/Expander/styles.module.scss.d.ts +1 -1
  71. package/lib/components/ExpanderList/index.js +20 -19
  72. package/lib/components/ExpanderList/index.js.map +1 -1
  73. package/lib/components/ExpanderList/styles.module.scss +10 -11
  74. package/lib/components/FavoriteButton/index.js +3 -3
  75. package/lib/components/FavoriteButton/index.js.map +1 -1
  76. package/lib/components/FavoriteButton/styles.module.scss +0 -1
  77. package/lib/components/Filter/FilterButton/styles.module.scss +5 -6
  78. package/lib/components/Filter/FilterButtonAndChipsWrapper/styles.module.scss +0 -1
  79. package/lib/components/Filter/FilterDrawer/styles.module.scss +0 -1
  80. package/lib/components/Filter/FilterLinkList/FilterLinkList.module.scss +5 -6
  81. package/lib/components/Filter/FilterOverviewSearch/styles.module.scss +1 -4
  82. package/lib/components/Filter/FilterSearch/styles.module.scss +14 -15
  83. package/lib/components/Filter/FilterSort/styles.module.scss +1 -2
  84. package/lib/components/Filter/FilterStateWrapper/styles.module.scss +0 -2
  85. package/lib/components/Filter/LoaderSpinner/styles.module.scss +2 -4
  86. package/lib/components/FormFieldTag/styles.module.scss +0 -1
  87. package/lib/components/FormGroup/styles.module.scss +0 -1
  88. package/lib/components/HelpBubble/styles.module.scss +0 -1
  89. package/lib/components/HelpDetails/styles.module.scss +2 -4
  90. package/lib/components/HelpDrawer/styles.module.scss +1 -2
  91. package/lib/components/HelpPanel/HelpPanel.d.ts +2 -2
  92. package/lib/components/HelpPanel/index.js +1 -17
  93. package/lib/components/HelpPanel/index.js.map +1 -1
  94. package/lib/components/HelpPanel/styles.module.scss +2 -22
  95. package/lib/components/HelpPanel/styles.module.scss.d.ts +0 -4
  96. package/lib/components/HelpTeaser/styles.module.scss +7 -9
  97. package/lib/components/HelpTriggerIcon/HelpTriggerIcon.d.ts +2 -2
  98. package/lib/components/HelpTriggerIcon/styles.module.scss +20 -22
  99. package/lib/components/HelpTriggerIcon/styles.module.scss.d.ts +1 -1
  100. package/lib/components/HelpTriggerInline/styles.module.scss +3 -5
  101. package/lib/components/HelpTriggerStandalone/styles.module.scss +3 -5
  102. package/lib/components/HighlightPanel/styles.module.scss +2 -3
  103. package/lib/components/Icons/AdditionalIconInformation.d.ts +4 -0
  104. package/lib/components/Icons/AdditionalIconInformation.js +14 -10
  105. package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
  106. package/lib/components/Icons/HealthcarePersonnelSecurity.js +4 -4
  107. package/lib/components/Icons/HealthcarePersonnelSecurity.js.map +1 -1
  108. package/lib/components/Icons/HistoryDocument.js +6 -7
  109. package/lib/components/Icons/HistoryDocument.js.map +1 -1
  110. package/lib/components/Icons/IconNames.d.ts +1 -1
  111. package/lib/components/Icons/IconNames.js +1 -0
  112. package/lib/components/Icons/IconNames.js.map +1 -1
  113. package/lib/components/Icons/YesNo.d.ts +3 -0
  114. package/lib/components/Icons/YesNo.js +53 -0
  115. package/lib/components/Icons/YesNo.js.map +1 -0
  116. package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
  117. package/lib/components/Illustrations/IllustrationNames.js +2 -0
  118. package/lib/components/Illustrations/IllustrationNames.js.map +1 -1
  119. package/lib/components/Illustrations/MoveAway.d.ts +11 -0
  120. package/lib/components/Illustrations/MoveAway.js +18 -0
  121. package/lib/components/Illustrations/MoveAway.js.map +1 -0
  122. package/lib/components/Illustrations/MoveAwayMedium.d.ts +3 -0
  123. package/lib/components/Illustrations/MoveAwayMedium.js +114 -0
  124. package/lib/components/Illustrations/MoveAwayMedium.js.map +1 -0
  125. package/lib/components/InfoTeaser/styles.module.scss +6 -8
  126. package/lib/components/Label/styles.module.scss +1 -1
  127. package/lib/components/LinkList/LinkList.d.ts +1 -1
  128. package/lib/components/LinkList/styles.module.scss +9 -11
  129. package/lib/components/LinkList/styles.module.scss.d.ts +1 -1
  130. package/lib/components/ListEditMode/styles.module.scss +5 -7
  131. package/lib/components/Loader/Loader.d.ts +1 -1
  132. package/lib/components/Loader/index.js +4 -4
  133. package/lib/components/Loader/index.js.map +1 -1
  134. package/lib/components/Loader/styles.module.scss +7 -7
  135. package/lib/components/Loader/styles.module.scss.d.ts +3 -3
  136. package/lib/components/Modal/constants.d.ts +1 -1
  137. package/lib/components/Modal/index.js +2 -2
  138. package/lib/components/Modal/index.js.map +1 -1
  139. package/lib/components/Modal/styles.module.scss +14 -19
  140. package/lib/components/Modal/styles.module.scss.d.ts +2 -3
  141. package/lib/components/Panel/index.js +1 -1
  142. package/lib/components/Panel/index.js.map +1 -1
  143. package/lib/components/Panel/styles.module.scss +15 -16
  144. package/lib/components/Panel/styles.module.scss.d.ts +1 -1
  145. package/lib/components/PopMenu/index.js +7 -4
  146. package/lib/components/PopMenu/index.js.map +1 -1
  147. package/lib/components/PopOver/styles.module.scss +1 -3
  148. package/lib/components/Progressbar/Progressbar.d.ts +1 -1
  149. package/lib/components/Progressbar/constants.d.ts +1 -1
  150. package/lib/components/Progressbar/index.js +4 -4
  151. package/lib/components/Progressbar/index.js.map +1 -1
  152. package/lib/components/Radio/Radio.d.ts +28 -0
  153. package/lib/components/Radio/index.d.ts +3 -0
  154. package/lib/components/Radio/index.js +7 -0
  155. package/lib/components/Radio/index.js.map +1 -0
  156. package/lib/components/{RadioButton → Radio}/styles.module.scss +8 -9
  157. package/lib/components/Radio/styles.module.scss.d.ts +26 -0
  158. package/lib/components/ServiceMessage/styles.module.scss +20 -22
  159. package/lib/components/Slider/styles.module.scss +1 -2
  160. package/lib/components/StatusDot/styles.module.scss +4 -5
  161. package/lib/components/StickyNote/index.js +2 -2
  162. package/lib/components/StickyNote/index.js.map +1 -1
  163. package/lib/components/StickyNote/styles.module.scss +9 -10
  164. package/lib/components/Tabs/TabList/styles.module.scss +20 -18
  165. package/lib/components/Tabs/TabPanel/styles.module.scss +2 -3
  166. package/lib/components/Tabs/styles.module.scss +0 -1
  167. package/lib/components/Tag/styles.module.scss +0 -1
  168. package/lib/components/Tile/styles.module.scss +5 -7
  169. package/lib/components/Toast/styles.module.scss +0 -1
  170. package/lib/components/Toggle/styles.module.scss +9 -10
  171. package/lib/components/Validation/index.js +2 -2
  172. package/lib/components/Validation/index.js.map +1 -1
  173. package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +0 -2
  174. package/lib/components/VisualCheckboxCloud/styles.module.scss +0 -1
  175. package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +0 -2
  176. package/lib/components/VisualCheckboxGroup/styles.module.scss +0 -1
  177. package/lib/components/VisualContentgroupWithImage/styles.module.scss +0 -1
  178. package/lib/components/VisualRadioCloud/Radio/index.js +1 -1
  179. package/lib/components/VisualRadioCloud/Radio/styles.module.scss +0 -2
  180. package/lib/components/VisualRadioCloud/index.js +1 -1
  181. package/lib/components/VisualRadioCloud/styles.module.scss +0 -1
  182. package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +0 -2
  183. package/lib/components/VisualRadioGroup/styles.module.scss +0 -1
  184. package/lib/constants.d.ts +2 -3
  185. package/lib/constants.js +2 -3
  186. package/lib/constants.js.map +1 -1
  187. package/lib/floating-ui.react.js +1 -458
  188. package/lib/floating-ui.react.js.map +1 -1
  189. package/lib/hooks/useDismissablePopover.d.ts +20 -0
  190. package/lib/hooks/useDismissablePopover.js +66 -0
  191. package/lib/hooks/useDismissablePopover.js.map +1 -0
  192. package/lib/hooks/useOutsideEvent.d.ts +3 -0
  193. package/lib/hooks/useOutsideEvent.js +24 -3
  194. package/lib/hooks/useOutsideEvent.js.map +1 -1
  195. package/lib/hooks/useReturnFocusOnClose.d.ts +7 -0
  196. package/lib/hooks/useReturnFocusOnClose.js +22 -0
  197. package/lib/hooks/useReturnFocusOnClose.js.map +1 -0
  198. package/lib/index.d.ts +2 -0
  199. package/lib/index.js +3 -1
  200. package/lib/scss/_visual-form.scss +47 -47
  201. package/lib/scss/helsenorge.scss +1 -0
  202. package/lib/scss/supernova/styles/colors.css +177 -122
  203. package/lib/scss/supernova/styles/typography.css +58 -51
  204. package/lib/scss/supernova-legacy/index.css +2 -0
  205. package/lib/scss/supernova-legacy/styles/legacy-colors.css +111 -0
  206. package/lib/utils/formSpacing.js +3 -3
  207. package/lib/utils/formSpacing.js.map +1 -1
  208. package/package.json +8 -14
  209. package/scss/_visual-form.scss +47 -47
  210. package/scss/helsenorge.scss +1 -0
  211. package/scss/supernova/styles/colors.css +177 -122
  212. package/scss/supernova/styles/typography.css +58 -51
  213. package/scss/supernova-legacy/index.css +2 -0
  214. package/scss/supernova-legacy/styles/legacy-colors.css +111 -0
  215. package/lib/DictionaryTrigger.js +0 -27
  216. package/lib/RadioButton.js +0 -84
  217. package/lib/RadioButton.js.map +0 -1
  218. package/lib/components/HelpTooltip/HelpTooltip.d.ts +0 -12
  219. package/lib/components/HelpTooltip/index.d.ts +0 -3
  220. package/lib/components/HelpTooltip/index.js +0 -48
  221. package/lib/components/HelpTooltip/index.js.map +0 -1
  222. package/lib/components/RadioButton/RadioButton.d.ts +0 -28
  223. package/lib/components/RadioButton/index.d.ts +0 -3
  224. package/lib/components/RadioButton/index.js +0 -7
  225. package/lib/components/RadioButton/index.js.map +0 -1
  226. package/lib/components/RadioButton/styles.module.scss.d.ts +0 -26
  227. package/lib/designsystem-react.css +0 -273
  228. /package/lib/components/{RadioButton → Radio}/RadioMarker/RadioMarker.d.ts +0 -0
  229. /package/lib/components/{RadioButton → Radio}/RadioMarker/styles.module.scss +0 -0
  230. /package/lib/components/{RadioButton → Radio}/RadioMarker/styles.module.scss.d.ts +0 -0
@@ -3,7 +3,6 @@
3
3
  @use '../../scss/font-settings' as font-settings;
4
4
  @use '../../scss/font-mixins' as fonts;
5
5
  @use '../../scss/breakpoints' as breakpoints;
6
- @import '../../scss/supernova/styles/colors.css';
7
6
 
8
7
  .toggle-container {
9
8
  $toggle-container: &;
@@ -92,7 +91,7 @@
92
91
  word-break: break-all;
93
92
 
94
93
  &--checked {
95
- color: var(--color-action-text-onlight);
94
+ color: var(--color-action-text-dark-normal);
96
95
  }
97
96
 
98
97
  #{$toggle-container}--disabled & {
@@ -118,12 +117,12 @@
118
117
  display: inline-block;
119
118
  width: 2.75rem;
120
119
  height: 1.75rem;
121
- background-color: var(--color-base-background-white);
120
+ background-color: var(--color-base-background-light);
122
121
  border-radius: 60px;
123
- border: 2px solid var(--color-base-border-onlight-emphasized);
122
+ border: 2px solid var(--color-base-emphasized-border-dark);
124
123
 
125
124
  #{$toggle-container}--disabled & {
126
- color: var(--color-disabled-border);
125
+ color: var(--color-disabled-border-dark);
127
126
  border-style: dashed;
128
127
  }
129
128
 
@@ -142,7 +141,7 @@
142
141
  height: 1.125rem;
143
142
  left: 3px;
144
143
  bottom: 3px;
145
- background-color: var(--brandcolor-neutral-dark);
144
+ background-color: var(--brand-color-neutral-dark);
146
145
  border-radius: 50%;
147
146
  display: flex;
148
147
  align-items: center;
@@ -154,7 +153,7 @@
154
153
 
155
154
  &__icon {
156
155
  opacity: 0;
157
- stroke: var(--color-action-graphics-onlight);
156
+ stroke: var(--color-action-graphics-dark-normal);
158
157
 
159
158
  #{$toggle-container}--disabled & {
160
159
  stroke: var(--core-color-white);
@@ -170,8 +169,8 @@
170
169
  height: 0;
171
170
 
172
171
  &:focus-visible + .toggle-container__toggle {
173
- border-color: var(--color-action-border-onlight-focus);
174
- outline: 2px solid var(--color-action-border-onlight-focus);
172
+ border-color: var(--color-action-border-dark-focus);
173
+ outline: 2px solid var(--color-action-border-dark-focus);
175
174
 
176
175
  &::after {
177
176
  content: '';
@@ -179,7 +178,7 @@
179
178
  width: 100%;
180
179
  height: 100%;
181
180
  border-radius: 60px;
182
- border: 1px solid var(--color-action-border-ondark-focus);
181
+ border: 1px solid var(--color-action-border-light-focus);
183
182
  }
184
183
  }
185
184
  }
@@ -9,7 +9,7 @@ import { t as Textarea_default } from "../../Textarea.js";
9
9
  import { t as FormGroup } from "../../FormGroup.js";
10
10
  import Input_default from "../Input/index.js";
11
11
  import { t as List_default } from "../../List.js";
12
- import RadioButton_default from "../RadioButton/index.js";
12
+ import Radio_default from "../Radio/index.js";
13
13
  import classNames from "classnames";
14
14
  import React, { useId } from "react";
15
15
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -74,7 +74,7 @@ var Validation = (props) => {
74
74
  });
75
75
  };
76
76
  const renderChild = (child) => {
77
- if (isComponent(child, FormGroup) || isComponent(child, Checkbox_default) || isComponent(child, RadioButton_default) || isComponent(child, Textarea_default) || isComponent(child, Input_default) || isComponent(child, Select_default) || isComponent(child, Slider_default) || isComponentWithDisplayName(child, "DateTimePickerWrapper") || isComponentWithDisplayName(child, "DatePicker") || isComponentWithDisplayName(child, "DateTime")) return cloneFormElement(child);
77
+ if (isComponent(child, FormGroup) || isComponent(child, Checkbox_default) || isComponent(child, Radio_default) || isComponent(child, Textarea_default) || isComponent(child, Input_default) || isComponent(child, Select_default) || isComponent(child, Slider_default) || isComponentWithDisplayName(child, "DateTimePickerWrapper") || isComponentWithDisplayName(child, "DatePicker") || isComponentWithDisplayName(child, "DateTime")) return cloneFormElement(child);
78
78
  if (isComponent(child, React.Fragment)) return React.Children.map(child.props.children, (child) => {
79
79
  return renderChild(child);
80
80
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Validation/ErrorListItem.tsx","../../../src/components/Validation/ErrorList.tsx","../../../src/components/Validation/ValidationSummary.tsx","../../../src/components/Validation/Validation.tsx","../../../src/components/Validation/index.ts"],"sourcesContent":["import type { ErrorDetails, FocusableElement } from './types';\nimport type { AnchorLinkOnClickEvent } from '../AnchorLink';\n\nimport AnchorLink from '../AnchorLink';\n\ninterface ErrorElementProps {\n name: string;\n error: ErrorDetails;\n}\n\nconst ErrorListItem: React.FC<ErrorElementProps> = props => {\n const handleClick = (event?: AnchorLinkOnClickEvent, element?: FocusableElement): void => {\n event?.preventDefault();\n if (element?.focus) element?.focus();\n };\n\n if (props.error.ref) {\n return (\n <AnchorLink href={`#${props.name}`} onClick={(e): void => handleClick(e, props.error.ref)}>\n {props.error.message}\n </AnchorLink>\n );\n }\n\n return <>{props.error.message}</>;\n};\n\nexport default ErrorListItem;\n","import type { ValidationErrors } from './types';\n\nimport ErrorListItem from './ErrorListItem';\nimport List from '../List';\n\ninterface ErrorListProps {\n errors: ValidationErrors;\n}\n\nconst ErrorList: React.FC<ErrorListProps> = props => (\n <List>\n {Object.entries(props.errors).map(([name, error]) => (\n <List.Item key={name}>\n <ErrorListItem name={name} error={error} />\n </List.Item>\n ))}\n </List>\n);\n\nexport default ErrorList;\n","import { useId } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ValidationErrors } from './types';\nimport type { TitleTags } from '../Title';\n\nimport ErrorList from './ErrorList';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationSummaryProps {\n /** Error summary title */\n errorTitle?: string;\n /** Error list */\n errors?: ValidationErrors;\n /** Markup props for error summary title. Default: h2 */\n errorTitleHtmlMarkup?: TitleTags;\n /** Will be shown last */\n children?: React.ReactNode;\n /** Hides the list visually - summary is still announced by screen readers */\n visuallyHidden?: boolean;\n}\n\nconst ValidationSummary: React.FC<ValidationSummaryProps> = props => {\n const { errorTitleHtmlMarkup = 'h2' } = props;\n const titleId = useId();\n\n const hasErrors = !!props.errors && Object.entries(props.errors).length > 0;\n const visuallyHidden = props.visuallyHidden;\n\n const summaryClasses = classNames(styles['validation__summary'], {\n [styles['validation__summary--visible']]: hasErrors && !visuallyHidden,\n [styles['validation__summary--sr-only']]: visuallyHidden,\n });\n\n return (\n <div\n role={'status'}\n aria-atomic={'true'}\n aria-live={'polite'}\n aria-relevant={'all'}\n aria-labelledby={hasErrors && props.errorTitle ? titleId : undefined}\n className={summaryClasses}\n >\n {hasErrors && (\n <>\n {props.errorTitle && (\n <Title appearance=\"title4\" id={titleId} htmlMarkup={errorTitleHtmlMarkup} margin={{ marginTop: 0, marginBottom: 1 }}>\n {props.errorTitle}\n </Title>\n )}\n <ErrorList errors={props.errors!} />\n </>\n )}\n {props.children}\n </div>\n );\n};\n\nexport default ValidationSummary;\n","import React from 'react';\n\nimport type { ValidationErrors } from './types';\nimport type { FormSize } from '../../constants';\nimport type { CheckboxProps } from '../Checkbox';\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\nimport type { FormGroupProps } from '../FormGroup/FormGroup';\nimport type { InputProps } from '../Input';\nimport type { RadioButtonProps } from '../RadioButton';\nimport type { SelectProps } from '../Select';\nimport type { SliderProps } from '../Slider';\nimport type { TextareaProps } from '../Textarea';\n\nimport ValidationSummary from './ValidationSummary';\nimport { AnalyticsId } from '../../constants';\nimport { isComponent, isComponentWithDisplayName } from '../../utils/component';\nimport Checkbox from '../Checkbox';\nimport FormGroup from '../FormGroup/FormGroup';\nimport Input from '../Input';\nimport RadioButton from '../RadioButton';\nimport Select from '../Select';\nimport Slider from '../Slider';\nimport Textarea from '../Textarea';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationProps {\n /** Error summary title */\n errorTitle?: string;\n /** Validation errors. If errors include references to HTML elements, the errors will be rendered as links with an onClick handler to focus the element. */\n errors?: ValidationErrors;\n /** Items in the Validation compontent */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Hides the ValidationSummary list visually - summary is still announced by screen readers */\n visuallyHiddenSummary?: boolean;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLDivElement | null>;\n}\n\nexport const Validation: React.FC<ValidationProps> = (props: ValidationProps) => {\n const validationErrorClass = styles['validation__error-wrapper'];\n\n const cloneFormElement = <T extends ErrorWrapperClassNameProps>(child: React.ReactElement<T>): React.ReactElement<T> => {\n return React.cloneElement(child, {\n ...child.props,\n errorWrapperClassName: validationErrorClass,\n });\n };\n\n const renderChild = (child: React.ReactNode): React.ReactNode => {\n if (\n isComponent<FormGroupProps>(child, FormGroup) ||\n isComponent<CheckboxProps>(child, Checkbox) ||\n isComponent<RadioButtonProps>(child, RadioButton) ||\n isComponent<TextareaProps>(child, Textarea) ||\n isComponent<InputProps>(child, Input) ||\n isComponent<SelectProps>(child, Select) ||\n isComponent<SliderProps>(child, Slider) ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTimePickerWrapper') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DatePicker') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTime')\n ) {\n return cloneFormElement<ErrorWrapperClassNameProps>(child);\n }\n if (isComponent<React.FragmentProps>(child, React.Fragment)) {\n return React.Children.map(child.props.children, (child: React.ReactNode) => {\n return renderChild(child);\n });\n }\n\n return child;\n };\n\n return (\n <>\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.Validation} className={props.className} ref={props.ref}>\n {React.Children.map(props.children, (child: React.ReactNode) => renderChild(child))}\n </div>\n <ValidationSummary errorTitle={props.errorTitle} errors={props.errors} visuallyHidden={props.visuallyHiddenSummary} />\n </>\n );\n};\n\nValidation.displayName = 'Validation';\n\nexport default Validation;\n","import Validation from './Validation';\nexport * from './Validation';\nexport default Validation;\n"],"mappings":";;;;;;;;;;;;;;;;;AAUA,IAAM,iBAA6C,UAAS;CAC1D,MAAM,eAAe,OAAgC,YAAqC;EACxF,OAAO,eAAe;EACtB,IAAI,SAAS,OAAO,SAAS,MAAM;CACrC;CAEA,IAAI,MAAM,MAAM,KACd,OACE,oBAAC,oBAAD;EAAY,MAAM,IAAI,MAAM;EAAQ,UAAU,MAAY,YAAY,GAAG,MAAM,MAAM,GAAG;EACrF,UAAA,MAAM,MAAM;CACH,CAAA;CAIhB,OAAO,oBAAA,UAAA,EAAA,UAAG,MAAM,MAAM,QAAU,CAAA;AAClC;;;AChBA,IAAM,aAAsC,UAC1C,oBAAC,cAAD,EAAA,UACG,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,WACxC,oBAAC,aAAK,MAAN,EAAA,UACE,oBAAC,eAAD;CAAqB;CAAa;AAAQ,CAAA,EACjC,GAFK,IAEL,CACZ,EACG,CAAA;;;ACSR,IAAM,qBAAsD,UAAS;CACnE,MAAM,EAAE,uBAAuB,SAAS;CACxC,MAAM,UAAU,MAAM;CAEtB,MAAM,YAAY,CAAC,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,SAAS;CAC1E,MAAM,iBAAiB,MAAM;CAE7B,MAAM,iBAAiB,WAAW,OAAO,wBAAwB;GAC9D,OAA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AC9G,UAAA,MAAM,SAAS,IAAI,MAAM,WAAW,UAA2B,YAAY,KAAK,CAAC;CAC/E,CAAA,GACL,oBAAC,mBAAD;EAAmB,YAAY,MAAM;EAAY,QAAQ,MAAM;EAAQ,gBAAgB,MAAM;CAAwB,CAAA,CACrH,EAAA,CAAA;AAEN;AAEA,WAAW,cAAc;;;ACvFzB,IAAA,qBAAe"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Validation/ErrorListItem.tsx","../../../src/components/Validation/ErrorList.tsx","../../../src/components/Validation/ValidationSummary.tsx","../../../src/components/Validation/Validation.tsx","../../../src/components/Validation/index.ts"],"sourcesContent":["import type { ErrorDetails, FocusableElement } from './types';\nimport type { AnchorLinkOnClickEvent } from '../AnchorLink';\n\nimport AnchorLink from '../AnchorLink';\n\ninterface ErrorElementProps {\n name: string;\n error: ErrorDetails;\n}\n\nconst ErrorListItem: React.FC<ErrorElementProps> = props => {\n const handleClick = (event?: AnchorLinkOnClickEvent, element?: FocusableElement): void => {\n event?.preventDefault();\n if (element?.focus) element?.focus();\n };\n\n if (props.error.ref) {\n return (\n <AnchorLink href={`#${props.name}`} onClick={(e): void => handleClick(e, props.error.ref)}>\n {props.error.message}\n </AnchorLink>\n );\n }\n\n return <>{props.error.message}</>;\n};\n\nexport default ErrorListItem;\n","import type { ValidationErrors } from './types';\n\nimport ErrorListItem from './ErrorListItem';\nimport List from '../List';\n\ninterface ErrorListProps {\n errors: ValidationErrors;\n}\n\nconst ErrorList: React.FC<ErrorListProps> = props => (\n <List>\n {Object.entries(props.errors).map(([name, error]) => (\n <List.Item key={name}>\n <ErrorListItem name={name} error={error} />\n </List.Item>\n ))}\n </List>\n);\n\nexport default ErrorList;\n","import { useId } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ValidationErrors } from './types';\nimport type { TitleTags } from '../Title';\n\nimport ErrorList from './ErrorList';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationSummaryProps {\n /** Error summary title */\n errorTitle?: string;\n /** Error list */\n errors?: ValidationErrors;\n /** Markup props for error summary title. Default: h2 */\n errorTitleHtmlMarkup?: TitleTags;\n /** Will be shown last */\n children?: React.ReactNode;\n /** Hides the list visually - summary is still announced by screen readers */\n visuallyHidden?: boolean;\n}\n\nconst ValidationSummary: React.FC<ValidationSummaryProps> = props => {\n const { errorTitleHtmlMarkup = 'h2' } = props;\n const titleId = useId();\n\n const hasErrors = !!props.errors && Object.entries(props.errors).length > 0;\n const visuallyHidden = props.visuallyHidden;\n\n const summaryClasses = classNames(styles['validation__summary'], {\n [styles['validation__summary--visible']]: hasErrors && !visuallyHidden,\n [styles['validation__summary--sr-only']]: visuallyHidden,\n });\n\n return (\n <div\n role={'status'}\n aria-atomic={'true'}\n aria-live={'polite'}\n aria-relevant={'all'}\n aria-labelledby={hasErrors && props.errorTitle ? titleId : undefined}\n className={summaryClasses}\n >\n {hasErrors && (\n <>\n {props.errorTitle && (\n <Title appearance=\"title4\" id={titleId} htmlMarkup={errorTitleHtmlMarkup} margin={{ marginTop: 0, marginBottom: 1 }}>\n {props.errorTitle}\n </Title>\n )}\n <ErrorList errors={props.errors!} />\n </>\n )}\n {props.children}\n </div>\n );\n};\n\nexport default ValidationSummary;\n","import React from 'react';\n\nimport type { ValidationErrors } from './types';\nimport type { FormSize } from '../../constants';\nimport type { CheckboxProps } from '../Checkbox';\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\nimport type { FormGroupProps } from '../FormGroup/FormGroup';\nimport type { InputProps } from '../Input';\nimport type { RadioProps } from '../Radio';\nimport type { SelectProps } from '../Select';\nimport type { SliderProps } from '../Slider';\nimport type { TextareaProps } from '../Textarea';\n\nimport ValidationSummary from './ValidationSummary';\nimport { AnalyticsId } from '../../constants';\nimport { isComponent, isComponentWithDisplayName } from '../../utils/component';\nimport Checkbox from '../Checkbox';\nimport FormGroup from '../FormGroup/FormGroup';\nimport Input from '../Input';\nimport Radio from '../Radio';\nimport Select from '../Select';\nimport Slider from '../Slider';\nimport Textarea from '../Textarea';\n\nimport styles from './styles.module.scss';\n\ninterface ValidationProps {\n /** Error summary title */\n errorTitle?: string;\n /** Validation errors. If errors include references to HTML elements, the errors will be rendered as links with an onClick handler to focus the element. */\n errors?: ValidationErrors;\n /** Items in the Validation compontent */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Hides the ValidationSummary list visually - summary is still announced by screen readers */\n visuallyHiddenSummary?: boolean;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLDivElement | null>;\n}\n\nexport const Validation: React.FC<ValidationProps> = (props: ValidationProps) => {\n const validationErrorClass = styles['validation__error-wrapper'];\n\n const cloneFormElement = <T extends ErrorWrapperClassNameProps>(child: React.ReactElement<T>): React.ReactElement<T> => {\n return React.cloneElement(child, {\n ...child.props,\n errorWrapperClassName: validationErrorClass,\n });\n };\n\n const renderChild = (child: React.ReactNode): React.ReactNode => {\n if (\n isComponent<FormGroupProps>(child, FormGroup) ||\n isComponent<CheckboxProps>(child, Checkbox) ||\n isComponent<RadioProps>(child, Radio) ||\n isComponent<TextareaProps>(child, Textarea) ||\n isComponent<InputProps>(child, Input) ||\n isComponent<SelectProps>(child, Select) ||\n isComponent<SliderProps>(child, Slider) ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTimePickerWrapper') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DatePicker') ||\n isComponentWithDisplayName<ErrorWrapperClassNameProps>(child, 'DateTime')\n ) {\n return cloneFormElement<ErrorWrapperClassNameProps>(child);\n }\n if (isComponent<React.FragmentProps>(child, React.Fragment)) {\n return React.Children.map(child.props.children, (child: React.ReactNode) => {\n return renderChild(child);\n });\n }\n\n return child;\n };\n\n return (\n <>\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.Validation} className={props.className} ref={props.ref}>\n {React.Children.map(props.children, (child: React.ReactNode) => renderChild(child))}\n </div>\n <ValidationSummary errorTitle={props.errorTitle} errors={props.errors} visuallyHidden={props.visuallyHiddenSummary} />\n </>\n );\n};\n\nValidation.displayName = 'Validation';\n\nexport default Validation;\n","import Validation from './Validation';\nexport * from './Validation';\nexport default Validation;\n"],"mappings":";;;;;;;;;;;;;;;;;AAUA,IAAM,iBAA6C,UAAS;CAC1D,MAAM,eAAe,OAAgC,YAAqC;EACxF,OAAO,eAAe;EACtB,IAAI,SAAS,OAAO,SAAS,MAAM;CACrC;CAEA,IAAI,MAAM,MAAM,KACd,OACE,oBAAC,oBAAD;EAAY,MAAM,IAAI,MAAM;EAAQ,UAAU,MAAY,YAAY,GAAG,MAAM,MAAM,GAAG;EACrF,UAAA,MAAM,MAAM;CACH,CAAA;CAIhB,OAAO,oBAAA,UAAA,EAAA,UAAG,MAAM,MAAM,QAAU,CAAA;AAClC;;;AChBA,IAAM,aAAsC,UAC1C,oBAAC,cAAD,EAAA,UACG,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,WACxC,oBAAC,aAAK,MAAN,EAAA,UACE,oBAAC,eAAD;CAAqB;CAAa;AAAQ,CAAA,EACjC,GAFK,IAEL,CACZ,EACG,CAAA;;;ACSR,IAAM,qBAAsD,UAAS;CACnE,MAAM,EAAE,uBAAuB,SAAS;CACxC,MAAM,UAAU,MAAM;CAEtB,MAAM,YAAY,CAAC,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,MAAM,CAAC,CAAC,SAAS;CAC1E,MAAM,iBAAiB,MAAM;CAE7B,MAAM,iBAAiB,WAAW,OAAO,wBAAwB;GAC9D,OAAO,kCAAkC,aAAa,CAAC;GACvD,OAAO,kCAAkC;CAC5C,CAAC;CAED,OACE,qBAAC,OAAD;EACE,MAAM;EACN,eAAa;EACb,aAAW;EACX,iBAAe;EACf,mBAAiB,aAAa,MAAM,aAAa,UAAU,KAAA;EAC3D,WAAW;EANb,UAAA,CAQG,aACC,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WAAW,cAAc;;;ACvFzB,IAAA,qBAAe"}
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-checkbox {
6
4
  @include visual-form.visual-form-pill(
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-checkbox-cloud {
5
4
  @include visual-form.visual-form-cloud;
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-checkbox {
6
4
  @include visual-form.visual-form-card;
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-checkbox-group {
5
4
  @include visual-form.visual-form-group;
@@ -1,6 +1,5 @@
1
1
  @use 'sass:map';
2
2
  @use '../../scss/breakpoints' as breakpoints;
3
- @import '../../scss/supernova/styles/spacers.css';
4
3
 
5
4
  .visual-contentgroup-with-image {
6
5
  display: flex;
@@ -1,4 +1,4 @@
1
- import { t as Radio } from "../../../Radio.js";
1
+ import { t as Radio } from "../../../Radio2.js";
2
2
  //#region src/components/VisualRadioCloud/Radio/index.ts
3
3
  var Radio_default = Radio;
4
4
  //#endregion
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-radio {
6
4
  @include visual-form.visual-form-pill;
@@ -1,7 +1,7 @@
1
1
  import { isComponent } from "../../utils/component.js";
2
2
  import { useIdWithFallback } from "../../hooks/useIdWithFallback.js";
3
3
  import { t as ErrorWrapper_default } from "../../ErrorWrapper.js";
4
- import { t as Radio } from "../../Radio.js";
4
+ import { t as Radio } from "../../Radio2.js";
5
5
  import classNames from "classnames";
6
6
  import React, { useState } from "react";
7
7
  import { jsx } from "react/jsx-runtime";
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-radio-cloud {
5
4
  @include visual-form.visual-form-cloud;
@@ -1,6 +1,4 @@
1
1
  @use '../../../scss/visual-form' as visual-form;
2
- @import '../../../scss/supernova/styles/colors.css';
3
- @import '../../../scss/supernova/styles/spacers.css';
4
2
 
5
3
  .visual-radio {
6
4
  @include visual-form.visual-form-card;
@@ -1,5 +1,4 @@
1
1
  @use '../../scss/visual-form' as visual-form;
2
- @import '../../scss/supernova/styles/spacers.css';
3
2
 
4
3
  .visual-radio-group {
5
4
  @include visual-form.visual-form-group;
@@ -46,7 +46,7 @@ export declare enum FormOnColor {
46
46
  oninvalid = "oninvalid"
47
47
  }
48
48
  export declare enum FormSize {
49
- medium = "medium",
49
+ normal = "normal",
50
50
  large = "large"
51
51
  }
52
52
  export declare enum AnalyticsId {
@@ -77,7 +77,6 @@ export declare enum AnalyticsId {
77
77
  HelpDrawer = "help-drawer",
78
78
  HelpExpanderInline = "help-expander-inline",
79
79
  HelpExpanderStandalone = "help-expander-standalone",
80
- HelpTooltip = "help-tooltip",
81
80
  HelpTriggerIcon = "help-trigger-icon",
82
81
  HelpTriggerInline = "help-trigger-inline",
83
82
  HelpTriggerStandalone = "help-trigger-standalone",
@@ -100,7 +99,7 @@ export declare enum AnalyticsId {
100
99
  PopOver = "pop-over",
101
100
  Portal = "portal",
102
101
  PromoPanel = "promo-panel",
103
- RadioButton = "radio-button",
102
+ Radio = "radio-button",
104
103
  Select = "select",
105
104
  SharingStatus = "sharing-status",
106
105
  Slider = "slider",
package/lib/constants.js CHANGED
@@ -24,7 +24,7 @@ var FormOnColor = /* @__PURE__ */ function(FormOnColor) {
24
24
  return FormOnColor;
25
25
  }({});
26
26
  var FormSize = /* @__PURE__ */ function(FormSize) {
27
- FormSize["medium"] = "medium";
27
+ FormSize["normal"] = "normal";
28
28
  FormSize["large"] = "large";
29
29
  return FormSize;
30
30
  }({});
@@ -56,7 +56,6 @@ var AnalyticsId = /* @__PURE__ */ function(AnalyticsId) {
56
56
  AnalyticsId["HelpDrawer"] = "help-drawer";
57
57
  AnalyticsId["HelpExpanderInline"] = "help-expander-inline";
58
58
  AnalyticsId["HelpExpanderStandalone"] = "help-expander-standalone";
59
- AnalyticsId["HelpTooltip"] = "help-tooltip";
60
59
  AnalyticsId["HelpTriggerIcon"] = "help-trigger-icon";
61
60
  AnalyticsId["HelpTriggerInline"] = "help-trigger-inline";
62
61
  AnalyticsId["HelpTriggerStandalone"] = "help-trigger-standalone";
@@ -79,7 +78,7 @@ var AnalyticsId = /* @__PURE__ */ function(AnalyticsId) {
79
78
  AnalyticsId["PopOver"] = "pop-over";
80
79
  AnalyticsId["Portal"] = "portal";
81
80
  AnalyticsId["PromoPanel"] = "promo-panel";
82
- AnalyticsId["RadioButton"] = "radio-button";
81
+ AnalyticsId["Radio"] = "radio-button";
83
82
  AnalyticsId["Select"] = "select";
84
83
  AnalyticsId["SharingStatus"] = "sharing-status";
85
84
  AnalyticsId["Slider"] = "slider";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"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 OverlayScreen = 1300000,\n PopOver = 11000,\n LightBoxButtons = 1000,\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 FormOnColor {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormSize {\n medium = 'medium',\n large = 'large',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n ArticleTeaser = 'article-teaser',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Chip = 'chip',\n Close = 'close',\n DictionaryTrigger = 'dictionary-trigger',\n Drawer = 'Drawer',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n EmptyState = 'empty-state',\n Expander = 'expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n EyebrowHeader = 'eyebrow-header',\n FavoriteButton = 'favorite-button',\n FormFieldTag = 'form-field-tag',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HelpDrawer = 'help-drawer',\n HelpExpanderInline = 'help-expander-inline',\n HelpExpanderStandalone = 'help-expander-standalone',\n HelpTooltip = 'help-tooltip',\n HelpTriggerIcon = 'help-trigger-icon',\n HelpTriggerInline = 'help-trigger-inline',\n HelpTriggerStandalone = 'help-trigger-standalone',\n HighlightPanel = 'highlight-panel',\n Icon = 'icon',\n Illustration = 'Illustration',\n InfoTeaser = 'info-teaser',\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 PanelOld = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n PromoPanel = 'promo-panel',\n RadioButton = 'radio-button',\n Select = 'select',\n SharingStatus = 'sharing-status',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Step = 'step',\n StepButtons = 'step-buttons',\n Stepper = 'stepper',\n Sublabel = 'sublabel',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Toggle = 'toggle',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n ArrowRight = 'ArrowRight',\n ArrowLeft = 'ArrowLeft',\n Home = 'Home',\n End = 'End',\n Space = ' ',\n Tab = 'Tab',\n Backspace = 'Backspace',\n}\n\nexport enum LanguageLocales {\n NORWEGIAN = 'nb-NO',\n NORWEGIAN_NYNORSK = 'nn-NO',\n ENGLISH = 'en-GB',\n SAMI_NORTHERN = 'se-NO',\n}\n"],"mappings":";AAAA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,SAAA,aAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,SAAA,SAAA,YAAA,OAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,SAAL,yBAAA,QAAA;CACL,OAAA,OAAA,mBAAA,QAAA;CACA,OAAA,OAAA,aAAA,QAAA;CACA,OAAA,OAAA,qBAAA,OAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,6BAA6B;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,eAAA;CACA,YAAA,UAAA;CACA,YAAA,iBAAA;CACA,YAAA,aAAA;CACA,YAAA,cAAA;CACA,YAAA,WAAA;CACA,YAAA,SAAA;CACA,YAAA,aAAA;CACA,YAAA,cAAA;CACA,YAAA,UAAA;CACA,YAAA,WAAA;CACA,YAAA,YAAA;CACA,YAAA,gBAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,mBAAL,yBAAA,kBAAA;CACL,iBAAA,WAAA;CACA,iBAAA,YAAA;CACA,iBAAA,eAAA;CACA,iBAAA,aAAA;CACA,iBAAA,gBAAA;CACA,iBAAA,eAAA;CACA,iBAAA,UAAA;CACA,iBAAA,SAAA;CACA,iBAAA,WAAA;CACA,iBAAA,SAAA;CACA,iBAAA,eAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,kBAAL,yBAAA,iBAAA;CACL,gBAAA,eAAA;CACA,gBAAA,uBAAA;CACA,gBAAA,aAAA;CACA,gBAAA,mBAAA;;AACF,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"constants.js","names":[],"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 OverlayScreen = 1300000,\n PopOver = 11000,\n LightBoxButtons = 1000,\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 FormOnColor {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormSize {\n normal = 'normal',\n large = 'large',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n ArticleTeaser = 'article-teaser',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Chip = 'chip',\n Close = 'close',\n DictionaryTrigger = 'dictionary-trigger',\n Drawer = 'Drawer',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n EmptyState = 'empty-state',\n Expander = 'expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n EyebrowHeader = 'eyebrow-header',\n FavoriteButton = 'favorite-button',\n FormFieldTag = 'form-field-tag',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HelpDrawer = 'help-drawer',\n HelpExpanderInline = 'help-expander-inline',\n HelpExpanderStandalone = 'help-expander-standalone',\n HelpTriggerIcon = 'help-trigger-icon',\n HelpTriggerInline = 'help-trigger-inline',\n HelpTriggerStandalone = 'help-trigger-standalone',\n HighlightPanel = 'highlight-panel',\n Icon = 'icon',\n Illustration = 'Illustration',\n InfoTeaser = 'info-teaser',\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 PanelOld = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n PromoPanel = 'promo-panel',\n Radio = 'radio-button',\n Select = 'select',\n SharingStatus = 'sharing-status',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Step = 'step',\n StepButtons = 'step-buttons',\n Stepper = 'stepper',\n Sublabel = 'sublabel',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Toggle = 'toggle',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n ArrowRight = 'ArrowRight',\n ArrowLeft = 'ArrowLeft',\n Home = 'Home',\n End = 'End',\n Space = ' ',\n Tab = 'Tab',\n Backspace = 'Backspace',\n}\n\nexport enum LanguageLocales {\n NORWEGIAN = 'nb-NO',\n NORWEGIAN_NYNORSK = 'nn-NO',\n ENGLISH = 'en-GB',\n SAMI_NORTHERN = 'se-NO',\n}\n"],"mappings":";AAAA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,SAAA,aAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,SAAA,SAAA,YAAA,MAAA;CACA,SAAA,SAAA,WAAA,MAAA;CACA,SAAA,SAAA,YAAA,OAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,SAAL,yBAAA,QAAA;CACL,OAAA,OAAA,mBAAA,QAAA;CACA,OAAA,OAAA,aAAA,QAAA;CACA,OAAA,OAAA,qBAAA,OAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAa,6BAA6B;AAyC1C,IAAY,cAAL,yBAAA,aAAA;CACL,YAAA,aAAA;CACA,YAAA,YAAA;CACA,YAAA,iBAAA;CACA,YAAA,YAAA;CACA,YAAA,eAAA;;AACF,EAAA,CAAA,CAAA;AAEA,IAAY,WAAL,yBAAA,UAAA;CACL,SAAA,YAAA;CACA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