@pega/cosmos-react-core 5.0.0-dev.9.3 → 6.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 (216) hide show
  1. package/SECURITY.md +11 -0
  2. package/lib/components/AppShell/AppShell.js +1 -1
  3. package/lib/components/AppShell/AppShell.js.map +1 -1
  4. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  5. package/lib/components/AppShell/Drawer.js +3 -3
  6. package/lib/components/AppShell/Drawer.js.map +1 -1
  7. package/lib/components/AppShell/Operator.d.ts.map +1 -1
  8. package/lib/components/AppShell/Operator.js +5 -2
  9. package/lib/components/AppShell/Operator.js.map +1 -1
  10. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  11. package/lib/components/Badges/Keyboard.js +10 -10
  12. package/lib/components/Badges/Keyboard.js.map +1 -1
  13. package/lib/components/Badges/Status.d.ts.map +1 -1
  14. package/lib/components/Badges/Status.js +2 -0
  15. package/lib/components/Badges/Status.js.map +1 -1
  16. package/lib/components/Banner/Banner.d.ts +5 -3
  17. package/lib/components/Banner/Banner.d.ts.map +1 -1
  18. package/lib/components/Banner/Banner.js +22 -15
  19. package/lib/components/Banner/Banner.js.map +1 -1
  20. package/lib/components/Banner/Banner.test-ids.d.ts +2 -0
  21. package/lib/components/Banner/Banner.test-ids.d.ts.map +1 -0
  22. package/lib/components/Banner/Banner.test-ids.js +10 -0
  23. package/lib/components/Banner/Banner.test-ids.js.map +1 -0
  24. package/lib/components/Button/Button.js +1 -1
  25. package/lib/components/Button/Button.js.map +1 -1
  26. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -1
  27. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  28. package/lib/components/Configuration/Configuration.d.ts +3 -0
  29. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  30. package/lib/components/Configuration/Configuration.js +20 -12
  31. package/lib/components/Configuration/Configuration.js.map +1 -1
  32. package/lib/components/Configuration/index.d.ts +1 -0
  33. package/lib/components/Configuration/index.d.ts.map +1 -1
  34. package/lib/components/Configuration/index.js +1 -0
  35. package/lib/components/Configuration/index.js.map +1 -1
  36. package/lib/components/Configuration/withConfiguration.d.ts +8 -0
  37. package/lib/components/Configuration/withConfiguration.d.ts.map +1 -0
  38. package/lib/components/Configuration/withConfiguration.js +9 -0
  39. package/lib/components/Configuration/withConfiguration.js.map +1 -0
  40. package/lib/components/DateTime/DateTime.types.d.ts +1 -4
  41. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  42. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  43. package/lib/components/DateTime/DurationDisplay.d.ts +7 -3
  44. package/lib/components/DateTime/DurationDisplay.d.ts.map +1 -1
  45. package/lib/components/DateTime/DurationDisplay.js +2 -2
  46. package/lib/components/DateTime/DurationDisplay.js.map +1 -1
  47. package/lib/components/DateTime/Input/DateInput.d.ts +3 -5
  48. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  49. package/lib/components/DateTime/Input/DateInput.js +2 -17
  50. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  51. package/lib/components/DateTime/Input/DateRangeInput.d.ts +2 -4
  52. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  53. package/lib/components/DateTime/Input/DateRangeInput.js +33 -84
  54. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  55. package/lib/components/DateTime/Input/DateTime.styles.d.ts.map +1 -1
  56. package/lib/components/DateTime/Input/DateTime.styles.js +2 -1
  57. package/lib/components/DateTime/Input/DateTime.styles.js.map +1 -1
  58. package/lib/components/DateTime/Input/DateTimeInput.d.ts +3 -0
  59. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  60. package/lib/components/DateTime/Input/DateTimeInput.js +17 -36
  61. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  62. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
  63. package/lib/components/DateTime/Input/Duration/NumberUnit.js +2 -1
  64. package/lib/components/DateTime/Input/Duration/NumberUnit.js.map +1 -1
  65. package/lib/components/DateTime/Input/MonthInput.d.ts +5 -0
  66. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  67. package/lib/components/DateTime/Input/MonthInput.js +14 -6
  68. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  69. package/lib/components/DateTime/Input/PartInput.js +1 -1
  70. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  71. package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
  72. package/lib/components/DateTime/Input/QuarterInput.js +5 -0
  73. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
  74. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  75. package/lib/components/DateTime/Input/TimeInput.js +13 -24
  76. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  77. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +2 -4
  78. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  79. package/lib/components/DateTime/Input/TimeRangeInput.js +25 -64
  80. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  81. package/lib/components/DateTime/Input/utils.d.ts +3 -2
  82. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  83. package/lib/components/DateTime/Input/utils.js +19 -16
  84. package/lib/components/DateTime/Input/utils.js.map +1 -1
  85. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  86. package/lib/components/DateTime/Picker/DatePicker.js +3 -3
  87. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  88. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts +2 -0
  89. package/lib/components/DateTime/Picker/DatePicker.styles.d.ts.map +1 -1
  90. package/lib/components/DateTime/Picker/DatePicker.styles.js +37 -1
  91. package/lib/components/DateTime/Picker/DatePicker.styles.js.map +1 -1
  92. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  93. package/lib/components/DateTime/Picker/DateRangePicker.js +3 -3
  94. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  95. package/lib/components/DateTime/Picker/TimePicker.js +1 -1
  96. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  97. package/lib/components/DateTime/utils.d.ts +13 -2
  98. package/lib/components/DateTime/utils.d.ts.map +1 -1
  99. package/lib/components/DateTime/utils.js +7 -13
  100. package/lib/components/DateTime/utils.js.map +1 -1
  101. package/lib/components/Dialog/FormDialog.js +1 -1
  102. package/lib/components/Dialog/FormDialog.js.map +1 -1
  103. package/lib/components/Dialog/InfoDialog.js +1 -1
  104. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  105. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  106. package/lib/components/FieldGroup/FieldGroupList.js +5 -2
  107. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  108. package/lib/components/FormField/FormField.d.ts +1 -0
  109. package/lib/components/FormField/FormField.d.ts.map +1 -1
  110. package/lib/components/FormField/FormField.js +1 -1
  111. package/lib/components/FormField/FormField.js.map +1 -1
  112. package/lib/components/HTML/HTML.js +1 -1
  113. package/lib/components/HTML/HTML.js.map +1 -1
  114. package/lib/components/Lightbox/Lightbox.d.ts +1 -1
  115. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  116. package/lib/components/Lightbox/Lightbox.js +66 -19
  117. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  118. package/lib/components/Lightbox/Lightbox.styles.d.ts +3 -3
  119. package/lib/components/Lightbox/Lightbox.styles.d.ts.map +1 -1
  120. package/lib/components/Lightbox/Lightbox.styles.js +29 -16
  121. package/lib/components/Lightbox/Lightbox.styles.js.map +1 -1
  122. package/lib/components/Lightbox/Lightbox.test-ids.d.ts +1 -1
  123. package/lib/components/Lightbox/Lightbox.test-ids.d.ts.map +1 -1
  124. package/lib/components/Lightbox/Lightbox.test-ids.js +3 -1
  125. package/lib/components/Lightbox/Lightbox.test-ids.js.map +1 -1
  126. package/lib/components/Lightbox/Lightbox.types.d.ts +19 -8
  127. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  128. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  129. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  130. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  131. package/lib/components/ListToolbar/ListToolbar.js +61 -51
  132. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  133. package/lib/components/ListToolbar/ListToolbar.styles.d.ts +4 -0
  134. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  135. package/lib/components/ListToolbar/ListToolbar.styles.js +41 -8
  136. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  137. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts +1 -1
  138. package/lib/components/ListToolbar/ListToolbar.test-ids.d.ts.map +1 -1
  139. package/lib/components/ListToolbar/ListToolbar.test-ids.js +2 -1
  140. package/lib/components/ListToolbar/ListToolbar.test-ids.js.map +1 -1
  141. package/lib/components/ListToolbar/ListToolbar.types.d.ts +1 -1
  142. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  143. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  144. package/lib/components/Menu/MenuItem.js +1 -1
  145. package/lib/components/Menu/MenuItem.js.map +1 -1
  146. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  147. package/lib/components/MenuButton/MenuButton.js +8 -4
  148. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  149. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  150. package/lib/components/Modal/MinimizedModal.js +3 -3
  151. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  152. package/lib/components/Modal/Modal.d.ts.map +1 -1
  153. package/lib/components/Modal/Modal.js +4 -4
  154. package/lib/components/Modal/Modal.js.map +1 -1
  155. package/lib/components/MultiStepForm/FormProgress.styles.d.ts +2 -0
  156. package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
  157. package/lib/components/MultiStepForm/FormProgress.styles.js +26 -2
  158. package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
  159. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +0 -1
  160. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
  161. package/lib/components/MultiStepForm/HorizontalFormProgress.js +26 -29
  162. package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
  163. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  164. package/lib/components/MultiStepForm/MultiStepForm.js +27 -11
  165. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  166. package/lib/components/NoValue/NoValue.d.ts.map +1 -1
  167. package/lib/components/NoValue/NoValue.js +6 -1
  168. package/lib/components/NoValue/NoValue.js.map +1 -1
  169. package/lib/components/Popover/Popover.d.ts.map +1 -1
  170. package/lib/components/Popover/Popover.js +9 -0
  171. package/lib/components/Popover/Popover.js.map +1 -1
  172. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  173. package/lib/components/RadioCheck/RadioCheck.js +3 -1
  174. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  175. package/lib/components/SearchInput/SearchInput.styles.d.ts.map +1 -1
  176. package/lib/components/SearchInput/SearchInput.styles.js +15 -0
  177. package/lib/components/SearchInput/SearchInput.styles.js.map +1 -1
  178. package/lib/components/ShortcutManager/ShortcutManager.js +1 -1
  179. package/lib/components/ShortcutManager/ShortcutManager.js.map +1 -1
  180. package/lib/components/TextArea/TextArea.d.ts +1 -1
  181. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  182. package/lib/components/TextArea/TextArea.js +16 -8
  183. package/lib/components/TextArea/TextArea.js.map +1 -1
  184. package/lib/components/TextArea/TextArea.styles.d.ts +1 -0
  185. package/lib/components/TextArea/TextArea.styles.d.ts.map +1 -1
  186. package/lib/components/TextArea/TextArea.styles.js +32 -4
  187. package/lib/components/TextArea/TextArea.styles.js.map +1 -1
  188. package/lib/components/Tooltip/Tooltip.js +1 -1
  189. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  190. package/lib/hooks/useArrows.d.ts +2 -1
  191. package/lib/hooks/useArrows.d.ts.map +1 -1
  192. package/lib/hooks/useArrows.js +47 -22
  193. package/lib/hooks/useArrows.js.map +1 -1
  194. package/lib/hooks/useFocusTrap.d.ts.map +1 -1
  195. package/lib/hooks/useFocusTrap.js +30 -3
  196. package/lib/hooks/useFocusTrap.js.map +1 -1
  197. package/lib/hooks/useI18n.d.ts +17 -0
  198. package/lib/hooks/useI18n.d.ts.map +1 -1
  199. package/lib/i18n/default.d.ts +17 -0
  200. package/lib/i18n/default.d.ts.map +1 -1
  201. package/lib/i18n/default.js +21 -2
  202. package/lib/i18n/default.js.map +1 -1
  203. package/lib/i18n/i18n.d.ts +17 -0
  204. package/lib/i18n/i18n.d.ts.map +1 -1
  205. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  206. package/lib/styles/GlobalStyle.js +11 -1
  207. package/lib/styles/GlobalStyle.js.map +1 -1
  208. package/lib/utils/focusHeadingOrContainer.d.ts +1 -1
  209. package/lib/utils/focusHeadingOrContainer.d.ts.map +1 -1
  210. package/lib/utils/focusHeadingOrContainer.js +1 -1
  211. package/lib/utils/focusHeadingOrContainer.js.map +1 -1
  212. package/lib/utils/getFocusables.d.ts +7 -3
  213. package/lib/utils/getFocusables.d.ts.map +1 -1
  214. package/lib/utils/getFocusables.js +31 -9
  215. package/lib/utils/getFocusables.js.map +1 -1
  216. package/package.json +5 -4
@@ -188,6 +188,7 @@ export declare const DefaultTranslation: Readonly<Readonly<{
188
188
  app_shell_main_navigation_label: string;
189
189
  shortcut_NextRegion: string;
190
190
  shortcut_PrevRegion: string;
191
+ app_shell_user_account: string;
191
192
  combobox_open_close: string;
192
193
  combobox_search_instructions: string;
193
194
  combobox_open_list_button_a11y: string;
@@ -207,6 +208,9 @@ export declare const DefaultTranslation: Readonly<Readonly<{
207
208
  modal_maximize: string;
208
209
  modal_dock: string;
209
210
  modal_close: string;
211
+ minimize: string;
212
+ maximize: string;
213
+ dock: string;
210
214
  selected_date_a11y: string;
211
215
  open_calendar_button_a11y: string;
212
216
  close_calendar_button_a11y: string;
@@ -261,6 +265,8 @@ export declare const DefaultTranslation: Readonly<Readonly<{
261
265
  enter_a_number: string;
262
266
  skip_navigation_menu_label: string;
263
267
  tab_error_tooltip: string;
268
+ non_previewable: string;
269
+ content_load_error: string;
264
270
  assignments: string;
265
271
  article_list_label_a11y: string;
266
272
  article_list_filter_label_a11y: string;
@@ -273,6 +279,9 @@ export declare const DefaultTranslation: Readonly<Readonly<{
273
279
  disclaimer: string;
274
280
  references: string;
275
281
  result_available: string;
282
+ ask: string;
283
+ error_message: string;
284
+ add_a_comment: string;
276
285
  article_label_a11y: string;
277
286
  article_related_links: string;
278
287
  article_more_like_this: string;
@@ -350,6 +359,11 @@ export declare const DefaultTranslation: Readonly<Readonly<{
350
359
  shortcut_GoToIncomingInteraction: string;
351
360
  shortcut_DismissIncomingInteraction: string;
352
361
  rte_heading_style: string;
362
+ rte_heading_style_normal: string;
363
+ rte_heading_style_heading_1: string;
364
+ rte_heading_style_heading_2: string;
365
+ rte_heading_style_heading_3: string;
366
+ rte_heading_style_heading_4: string;
353
367
  rte_bold: string;
354
368
  rte_italic: string;
355
369
  rte_strike_through: string;
@@ -642,10 +656,13 @@ export declare const DefaultTranslation: Readonly<Readonly<{
642
656
  follow_up_tasks: string;
643
657
  add_follow_up_task: string;
644
658
  agents_utterance: string;
659
+ due_on: string;
645
660
  sentiment_positive: string;
646
661
  sentiment_negative: string;
647
662
  sentiment_neutral: string;
648
663
  no_recommendations: string;
664
+ items_added_to_previous_list: string;
665
+ items_added_to_current_list: string;
649
666
  condition_builder_advanced_condition_label: string;
650
667
  condition_builder_advanced_condition_placeholder: string;
651
668
  condition_builder_advanced_mode_button_label: string;
@@ -1 +1 @@
1
- {"version":3,"file":"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oot":"","sources":["../../src/styles/GlobalStyle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,eAAO,MAAM,mBAAmB,wDAQ/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,wBAAyB,YAAY,WAUvE,CAAC;AAEF,eAAO,MAAM,sBAAsB,uMAShC,YAAY,WAgBd,CAAC;;AAEF,wBAyGG"}
@@ -38,7 +38,7 @@ export const createGlobalBodyStyles = ({ base: { 'font-size': baseFontSize, 'fon
38
38
  `.join('');
39
39
  };
40
40
  export default createGlobalStyle(({ theme }) => {
41
- const { base: { 'custom-scrollbar': customScrollbar, 'border-radius': borderRadius, palette: { 'foreground-color': foreground, 'scrollbar-track': scrollbarTrack, 'scrollbar-thumb': scrollbarThumb, 'scrollbar-thumb-hover': scrollbarThumbHover }, transparency: { 'transparent-3': transparent } }, components: { 'form-control': { 'background-color': backgroundColor } } } = theme;
41
+ const { base: { 'custom-scrollbar': customScrollbar, 'border-radius': borderRadius, palette: { 'foreground-color': foreground, 'scrollbar-track': scrollbarTrack, 'scrollbar-thumb': scrollbarThumb, 'scrollbar-thumb-hover': scrollbarThumbHover }, shadow: { focus }, transparency: { 'transparent-3': transparent } }, components: { 'form-control': { 'background-color': backgroundColor } } } = theme;
42
42
  return css `
43
43
  ${globalSpacingStyles}
44
44
 
@@ -46,6 +46,16 @@ export default createGlobalStyle(({ theme }) => {
46
46
  overscroll-behavior: none;
47
47
  }
48
48
 
49
+ h1:focus-visible,
50
+ h2:focus-visible,
51
+ h3:focus-visible,
52
+ h4:focus-visible,
53
+ h5:focus-visible,
54
+ h6:focus-visible {
55
+ outline: transparent;
56
+ box-shadow: ${focus};
57
+ }
58
+
49
59
  ::placeholder {
50
60
  color: ${mix(transparent, foreground, backgroundColor)};
51
61
  opacity: unset;
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalStyle.js","sourceRoot":"","sources":["../../src/styles/GlobalStyle.ts"],"names":[],"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AE,cAAc,EACjC,uBAAuB,EAAE,mBAAmB,EAC7C,EACD,YAAY,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,EAC/C,EACD,UAAU,EAAE,EACV,cAAc,EAAE,EAAE,kBAAkB,EAAE,eAAe,EAAE,EACxD,EACF,GAAG,KAAK,CAAC;IACV,OAAO,GAAG,CAAA;MACN,mBAAmB;;;;;;;eAOV,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,eAAe,CAAC;;;;MAItD,eAAe;QACjB,GAAG,CAAA;;2BAEoB,cAAc,IAAI,cAAc;;;;;;;;;;;;8BAY7B,cAAc;;;;8BAId,cAAc;;;;;;;wCAOJ,YAAY;0CACV,cAAc;;;;0CAId,mBAAmB;;;;;;;;;;;;;;;;;KAiBxD;;MAEC,sBAAsB,CAAC,KAAK,CAAC;;QAE3B,sBAAsB,CAAC,KAAK,CAAC;;;;;;;;;;;;GAYlC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { mix } from 'polished';\nimport { createGlobalStyle, css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\n\nimport { calculateFontSize } from './utils';\nimport type { FontSize } from './utils';\n\nexport const globalSpacingStyles = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n`;\n\nexport const createGlobalRootStyles = ({ base: { scale } }: DefaultTheme) => {\n return css`\n :root,\n :host {\n height: 100%;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n font-size: calc(${scale} * 1rem);\n }\n `.join('');\n};\n\nexport const createGlobalBodyStyles = ({\n base: {\n 'font-size': baseFontSize,\n 'font-scale': baseFontScale,\n 'font-family': fontFamily,\n palette: { 'foreground-color': foregroundColor },\n 'line-height': lineHeight\n },\n components: { text }\n}: DefaultTheme) => {\n // Can't call a hook here\n const fontSize = calculateFontSize(baseFontSize, baseFontScale);\n\n return css`\n body,\n :host {\n min-height: 100%;\n margin: 0;\n padding: 0;\n font-size: ${fontSize[text.primary['font-size'] as FontSize]};\n font-family: ${fontFamily};\n color: ${foregroundColor};\n line-height: ${lineHeight};\n }\n `.join('');\n};\n\nexport default createGlobalStyle(({ theme }) => {\n const {\n base: {\n 'custom-scrollbar': customScrollbar,\n 'border-radius': borderRadius,\n palette: {\n 'foreground-color': foreground,\n 'scrollbar-track': scrollbarTrack,\n 'scrollbar-thumb': scrollbarThumb,\n 'scrollbar-thumb-hover': scrollbarThumbHover\n },\n transparency: { 'transparent-3': transparent }\n },\n components: {\n 'form-control': { 'background-color': backgroundColor }\n }\n } = theme;\n return css`\n ${globalSpacingStyles}\n\n body {\n overscroll-behavior: none;\n }\n\n ::placeholder {\n color: ${mix(transparent, foreground, backgroundColor)};\n opacity: unset;\n }\n\n ${customScrollbar &&\n css`\n * {\n scrollbar-color: ${scrollbarThumb} ${scrollbarTrack};\n scrollbar-width: thin;\n }\n\n @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {\n /* stylelint-disable unit-allowed-list */\n *::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n *::-webkit-scrollbar-track {\n background-color: ${scrollbarTrack};\n }\n\n *::-webkit-scrollbar-corner {\n background-color: ${scrollbarTrack};\n border-bottom-right-radius: inherit;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: calc(1.125 * ${borderRadius});\n box-shadow: inset 0 0 2px 4px ${scrollbarThumb};\n }\n\n *::-webkit-scrollbar-thumb:hover {\n box-shadow: inset 0 0 2px 4px ${scrollbarThumbHover};\n }\n\n *::-webkit-scrollbar-track:horizontal {\n border-bottom-left-radius: inherit;\n }\n\n *::-webkit-scrollbar-track:vertical {\n border-top-right-radius: inherit;\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-no-unknown */\n *::-webkit-scrollbar-track:not(:corner-present) {\n border-bottom-right-radius: inherit;\n }\n /* stylelint-enable unit-allowed-list */\n }\n `}\n\n ${createGlobalRootStyles(theme)}\n\n ${createGlobalBodyStyles(theme)}\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n `;\n});\n"]}
1
+ {"version":3,"file":"GlobalStyle.js","sourceRoot":"","sources":["../../src/styles/GlobalStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAG5C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;;;;;;;;CAQrC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAgB,EAAE,EAAE;IAC1E,OAAO,GAAG,CAAA;;;;;;wBAMY,KAAK;;GAE1B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,IAAI,EAAE,EACJ,WAAW,EAAE,YAAY,EACzB,YAAY,EAAE,aAAa,EAC3B,aAAa,EAAE,UAAU,EACzB,OAAO,EAAE,EAAE,kBAAkB,EAAE,eAAe,EAAE,EAChD,aAAa,EAAE,UAAU,EAC1B,EACD,UAAU,EAAE,EAAE,IAAI,EAAE,EACP,EAAE,EAAE;IACjB,yBAAyB;IACzB,MAAM,QAAQ,GAAG,iBAAiB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;IAEhE,OAAO,GAAG,CAAA;;;;;;mBAMO,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAa,CAAC;qBAC7C,UAAU;eAChB,eAAe;qBACT,UAAU;;GAE5B,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACb,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IAC7C,MAAM,EACJ,IAAI,EAAE,EACJ,kBAAkB,EAAE,eAAe,EACnC,eAAe,EAAE,YAAY,EAC7B,OAAO,EAAE,EACP,kBAAkB,EAAE,UAAU,EAC9B,iBAAiB,EAAE,cAAc,EACjC,iBAAiB,EAAE,cAAc,EACjC,uBAAuB,EAAE,mBAAmB,EAC7C,EACD,MAAM,EAAE,EAAE,KAAK,EAAE,EACjB,YAAY,EAAE,EAAE,eAAe,EAAE,WAAW,EAAE,EAC/C,EACD,UAAU,EAAE,EACV,cAAc,EAAE,EAAE,kBAAkB,EAAE,eAAe,EAAE,EACxD,EACF,GAAG,KAAK,CAAC;IACV,OAAO,GAAG,CAAA;MACN,mBAAmB;;;;;;;;;;;;;oBAaL,KAAK;;;;eAIV,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,eAAe,CAAC;;;;MAItD,eAAe;QACjB,GAAG,CAAA;;2BAEoB,cAAc,IAAI,cAAc;;;;;;;;;;;;8BAY7B,cAAc;;;;8BAId,cAAc;;;;;;;wCAOJ,YAAY;0CACV,cAAc;;;;0CAId,mBAAmB;;;;;;;;;;;;;;;;;KAiBxD;;MAEC,sBAAsB,CAAC,KAAK,CAAC;;QAE3B,sBAAsB,CAAC,KAAK,CAAC;;;;;;;;;;;;GAYlC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import { mix } from 'polished';\nimport { createGlobalStyle, css } from 'styled-components';\nimport type { DefaultTheme } from 'styled-components';\n\nimport { calculateFontSize } from './utils';\nimport type { FontSize } from './utils';\n\nexport const globalSpacingStyles = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n }\n`;\n\nexport const createGlobalRootStyles = ({ base: { scale } }: DefaultTheme) => {\n return css`\n :root,\n :host {\n height: 100%;\n -webkit-text-size-adjust: 100%;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n font-size: calc(${scale} * 1rem);\n }\n `.join('');\n};\n\nexport const createGlobalBodyStyles = ({\n base: {\n 'font-size': baseFontSize,\n 'font-scale': baseFontScale,\n 'font-family': fontFamily,\n palette: { 'foreground-color': foregroundColor },\n 'line-height': lineHeight\n },\n components: { text }\n}: DefaultTheme) => {\n // Can't call a hook here\n const fontSize = calculateFontSize(baseFontSize, baseFontScale);\n\n return css`\n body,\n :host {\n min-height: 100%;\n margin: 0;\n padding: 0;\n font-size: ${fontSize[text.primary['font-size'] as FontSize]};\n font-family: ${fontFamily};\n color: ${foregroundColor};\n line-height: ${lineHeight};\n }\n `.join('');\n};\n\nexport default createGlobalStyle(({ theme }) => {\n const {\n base: {\n 'custom-scrollbar': customScrollbar,\n 'border-radius': borderRadius,\n palette: {\n 'foreground-color': foreground,\n 'scrollbar-track': scrollbarTrack,\n 'scrollbar-thumb': scrollbarThumb,\n 'scrollbar-thumb-hover': scrollbarThumbHover\n },\n shadow: { focus },\n transparency: { 'transparent-3': transparent }\n },\n components: {\n 'form-control': { 'background-color': backgroundColor }\n }\n } = theme;\n return css`\n ${globalSpacingStyles}\n\n body {\n overscroll-behavior: none;\n }\n\n h1:focus-visible,\n h2:focus-visible,\n h3:focus-visible,\n h4:focus-visible,\n h5:focus-visible,\n h6:focus-visible {\n outline: transparent;\n box-shadow: ${focus};\n }\n\n ::placeholder {\n color: ${mix(transparent, foreground, backgroundColor)};\n opacity: unset;\n }\n\n ${customScrollbar &&\n css`\n * {\n scrollbar-color: ${scrollbarThumb} ${scrollbarTrack};\n scrollbar-width: thin;\n }\n\n @supports not ((scrollbar-width: thin) or (scrollbar-color: black white)) {\n /* stylelint-disable unit-allowed-list */\n *::-webkit-scrollbar {\n width: 12px;\n height: 12px;\n }\n\n *::-webkit-scrollbar-track {\n background-color: ${scrollbarTrack};\n }\n\n *::-webkit-scrollbar-corner {\n background-color: ${scrollbarTrack};\n border-bottom-right-radius: inherit;\n }\n\n *::-webkit-scrollbar-thumb {\n background-color: transparent;\n border: 3px solid transparent;\n border-radius: calc(1.125 * ${borderRadius});\n box-shadow: inset 0 0 2px 4px ${scrollbarThumb};\n }\n\n *::-webkit-scrollbar-thumb:hover {\n box-shadow: inset 0 0 2px 4px ${scrollbarThumbHover};\n }\n\n *::-webkit-scrollbar-track:horizontal {\n border-bottom-left-radius: inherit;\n }\n\n *::-webkit-scrollbar-track:vertical {\n border-top-right-radius: inherit;\n }\n\n /* stylelint-disable-next-line selector-pseudo-class-no-unknown */\n *::-webkit-scrollbar-track:not(:corner-present) {\n border-bottom-right-radius: inherit;\n }\n /* stylelint-enable unit-allowed-list */\n }\n `}\n\n ${createGlobalRootStyles(theme)}\n\n ${createGlobalBodyStyles(theme)}\n\n input,\n button,\n select,\n optgroup,\n textarea {\n margin: 0;\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n }\n `;\n});\n"]}
@@ -4,6 +4,6 @@
4
4
  * @param label Fallback label to apply to the container if focused.
5
5
  * @returns boolean whether the focus was successful or not (eg. element is not visible).
6
6
  */
7
- declare const focusHeadingOrContainer: (container: ParentNode, label: string) => boolean;
7
+ declare const focusHeadingOrContainer: (container: ParentNode, label?: string) => boolean;
8
8
  export default focusHeadingOrContainer;
9
9
  //# sourceMappingURL=focusHeadingOrContainer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusHeadingOrContainer.d.ts","sourceRoot":"","sources":["../../src/utils/focusHeadingOrContainer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,QAAA,MAAM,uBAAuB,cAAe,UAAU,SAAS,MAAM,KAAG,OAmCvE,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
1
+ {"version":3,"file":"focusHeadingOrContainer.d.ts","sourceRoot":"","sources":["../../src/utils/focusHeadingOrContainer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,QAAA,MAAM,uBAAuB,cAAe,UAAU,UAAU,MAAM,KAAG,OAmCxE,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -9,7 +9,7 @@ const focusHeadingOrContainer = (container, label) => {
9
9
  const target = heading ?? container;
10
10
  if (!(target instanceof HTMLElement || target instanceof SVGElement))
11
11
  return false;
12
- if (target === container && !target.hasAttribute('aria-label')) {
12
+ if (target === container && !target.hasAttribute('aria-label') && label) {
13
13
  target.setAttribute('aria-label', label);
14
14
  target.addEventListener('focusout', () => {
15
15
  target.removeAttribute('aria-label');
@@ -1 +1 @@
1
- {"version":3,"file":"focusHeadingOrContainer.js","sourceRoot":"","sources":["../../src/utils/focusHeadingOrContainer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,CAAC,SAAqB,EAAE,KAAa,EAAW,EAAE;IAChF,MAAM,OAAO,GAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAW,CAAC,MAAM,CACpE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,IAAI,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,EAC/C,IAAI,CACL,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,IAAI,SAAS,CAAC;IAEpC,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,IAAI,MAAM,YAAY,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IAEnF,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE;QAC9D,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,gBAAgB,CACrB,UAAU,EACV,GAAG,EAAE;YACH,MAAM,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACvC,CAAC,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAC;KACH;IAED,IAAI,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE;QACnC,MAAM,CAAC,KAAK,EAAE,CAAC;KAChB;SAAM;QACL,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACtC,MAAM,CAAC,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,gBAAgB,CACrB,UAAU,EACV,GAAG,EAAE;YACH,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAC;KACH;IACD,OAAO,QAAQ,CAAC,aAAa,KAAK,MAAM,CAAC;AAC3C,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["/**\n * Focuses the highest level heading element in a container, or the container itself if there are no headings.\n * @param container Node to query for a heading.\n * @param label Fallback label to apply to the container if focused.\n * @returns boolean whether the focus was successful or not (eg. element is not visible).\n */\nconst focusHeadingOrContainer = (container: ParentNode, label: string): boolean => {\n const heading = (['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const).reduce<HTMLHeadingElement | null>(\n (el, tag) => el ?? container.querySelector(tag),\n null\n );\n\n const target = heading ?? container;\n\n if (!(target instanceof HTMLElement || target instanceof SVGElement)) return false;\n\n if (target === container && !target.hasAttribute('aria-label')) {\n target.setAttribute('aria-label', label);\n target.addEventListener(\n 'focusout',\n () => {\n target.removeAttribute('aria-label');\n },\n { once: true }\n );\n }\n\n if (target.hasAttribute('tabindex')) {\n target.focus();\n } else {\n target.setAttribute('tabindex', '-1');\n target.focus();\n target.addEventListener(\n 'focusout',\n () => {\n target.removeAttribute('tabindex');\n },\n { once: true }\n );\n }\n return document.activeElement === target;\n};\n\nexport default focusHeadingOrContainer;\n"]}
1
+ {"version":3,"file":"focusHeadingOrContainer.js","sourceRoot":"","sources":["../../src/utils/focusHeadingOrContainer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,uBAAuB,GAAG,CAAC,SAAqB,EAAE,KAAc,EAAW,EAAE;IACjF,MAAM,OAAO,GAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAW,CAAC,MAAM,CACpE,CAAC,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,IAAI,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC,EAC/C,IAAI,CACL,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,IAAI,SAAS,CAAC;IAEpC,IAAI,CAAC,CAAC,MAAM,YAAY,WAAW,IAAI,MAAM,YAAY,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IAEnF,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,KAAK,EAAE;QACvE,MAAM,CAAC,YAAY,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACzC,MAAM,CAAC,gBAAgB,CACrB,UAAU,EACV,GAAG,EAAE;YACH,MAAM,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;QACvC,CAAC,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAC;KACH;IAED,IAAI,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE;QACnC,MAAM,CAAC,KAAK,EAAE,CAAC;KAChB;SAAM;QACL,MAAM,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QACtC,MAAM,CAAC,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,gBAAgB,CACrB,UAAU,EACV,GAAG,EAAE;YACH,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACrC,CAAC,EACD,EAAE,IAAI,EAAE,IAAI,EAAE,CACf,CAAC;KACH;IACD,OAAO,QAAQ,CAAC,aAAa,KAAK,MAAM,CAAC;AAC3C,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["/**\n * Focuses the highest level heading element in a container, or the container itself if there are no headings.\n * @param container Node to query for a heading.\n * @param label Fallback label to apply to the container if focused.\n * @returns boolean whether the focus was successful or not (eg. element is not visible).\n */\nconst focusHeadingOrContainer = (container: ParentNode, label?: string): boolean => {\n const heading = (['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] as const).reduce<HTMLHeadingElement | null>(\n (el, tag) => el ?? container.querySelector(tag),\n null\n );\n\n const target = heading ?? container;\n\n if (!(target instanceof HTMLElement || target instanceof SVGElement)) return false;\n\n if (target === container && !target.hasAttribute('aria-label') && label) {\n target.setAttribute('aria-label', label);\n target.addEventListener(\n 'focusout',\n () => {\n target.removeAttribute('aria-label');\n },\n { once: true }\n );\n }\n\n if (target.hasAttribute('tabindex')) {\n target.focus();\n } else {\n target.setAttribute('tabindex', '-1');\n target.focus();\n target.addEventListener(\n 'focusout',\n () => {\n target.removeAttribute('tabindex');\n },\n { once: true }\n );\n }\n return document.activeElement === target;\n};\n\nexport default focusHeadingOrContainer;\n"]}
@@ -1,9 +1,13 @@
1
1
  import type { RefObject } from 'react';
2
2
  /**
3
3
  * Returns all valid focusable elements within a given ref.
4
- * @param focusablesRef The ref containing the element to search for focusable elements within.
5
- * @returns a list of valid focusable elements within the given ref.
4
+ * @param container The container element, or reference to the container element, to search for focusable elements within.
5
+ * @param options
6
+ * @param options.includeActiveEl If true, the active element will be included in the list, even if it does not match focusable criteria.
7
+ * @returns A list of valid focusable elements within the given ref.
6
8
  */
7
- declare const getFocusables: (focusablesRef: RefObject<HTMLElement>) => HTMLElement[];
9
+ declare const getFocusables: (container: RefObject<ParentNode> | ParentNode, { includeActiveEl }?: {
10
+ includeActiveEl?: boolean | undefined;
11
+ }) => HTMLElement[];
8
12
  export default getFocusables;
9
13
  //# sourceMappingURL=getFocusables.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFocusables.d.ts","sourceRoot":"","sources":["../../src/utils/getFocusables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;GAIG;AACH,QAAA,MAAM,aAAa,kBAAmB,UAAU,WAAW,CAAC,KAAG,WAAW,EAYzE,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"getFocusables.d.ts","sourceRoot":"","sources":["../../src/utils/getFocusables.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC;;;;;;GAMG;AACH,QAAA,MAAM,aAAa,cACN,UAAU,UAAU,CAAC,GAAG,UAAU;;MAM5C,WAAW,EAiCb,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,16 +1,38 @@
1
+ import hasProp from './hasProp';
2
+ import getActiveElement from './getActiveElement';
3
+ import createUID from './createUID';
1
4
  /**
2
5
  * Returns all valid focusable elements within a given ref.
3
- * @param focusablesRef The ref containing the element to search for focusable elements within.
4
- * @returns a list of valid focusable elements within the given ref.
6
+ * @param container The container element, or reference to the container element, to search for focusable elements within.
7
+ * @param options
8
+ * @param options.includeActiveEl If true, the active element will be included in the list, even if it does not match focusable criteria.
9
+ * @returns A list of valid focusable elements within the given ref.
5
10
  */
6
- const getFocusables = (focusablesRef) => {
7
- if (!focusablesRef.current)
11
+ const getFocusables = (container, { includeActiveEl = false } = {}) => {
12
+ const uid = createUID();
13
+ let activeId = uid;
14
+ let activeEl = null;
15
+ const containerEl = hasProp(container, 'current') ? container.current : container;
16
+ if (!containerEl)
8
17
  return [];
9
- const selector = 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
10
- return [...focusablesRef.current.querySelectorAll(selector)].filter(el => el instanceof HTMLElement &&
11
- !el.hasAttribute('disabled') &&
12
- el.getAttribute('tabindex') !== '-1' &&
13
- !el.closest('[inert]'));
18
+ let selector = 'a, button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
19
+ if (includeActiveEl) {
20
+ activeEl = getActiveElement();
21
+ if (activeEl) {
22
+ activeId = activeEl.id || uid;
23
+ activeEl.id = activeId;
24
+ selector = `${selector}, [id="${activeId}"]`;
25
+ }
26
+ }
27
+ const focusableElements = [...containerEl.querySelectorAll(selector)].filter(el => el instanceof HTMLElement &&
28
+ (el.id === activeId ||
29
+ (!el.hasAttribute('disabled') &&
30
+ el.getAttribute('tabindex') !== '-1' &&
31
+ !el.closest('[inert]'))));
32
+ if (activeEl?.id === uid) {
33
+ activeEl.removeAttribute('id');
34
+ }
35
+ return focusableElements;
14
36
  };
15
37
  export default getFocusables;
16
38
  //# sourceMappingURL=getFocusables.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getFocusables.js","sourceRoot":"","sources":["../../src/utils/getFocusables.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,aAAa,GAAG,CAAC,aAAqC,EAAiB,EAAE;IAC7E,IAAI,CAAC,aAAa,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAEtC,MAAM,QAAQ,GAAG,8EAA8E,CAAC;IAEhG,OAAQ,CAAC,GAAG,aAAa,CAAC,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAmB,CAAC,MAAM,CACpF,EAAE,CAAC,EAAE,CACH,EAAE,YAAY,WAAW;QACzB,CAAC,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC;QAC5B,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,KAAK,IAAI;QACpC,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type { RefObject } from 'react';\n\n/**\n * Returns all valid focusable elements within a given ref.\n * @param focusablesRef The ref containing the element to search for focusable elements within.\n * @returns a list of valid focusable elements within the given ref.\n */\nconst getFocusables = (focusablesRef: RefObject<HTMLElement>): HTMLElement[] => {\n if (!focusablesRef.current) return [];\n\n const selector = 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])';\n\n return ([...focusablesRef.current.querySelectorAll(selector)] as HTMLElement[]).filter(\n el =>\n el instanceof HTMLElement &&\n !el.hasAttribute('disabled') &&\n el.getAttribute('tabindex') !== '-1' &&\n !el.closest('[inert]')\n );\n};\n\nexport default getFocusables;\n"]}
1
+ {"version":3,"file":"getFocusables.js","s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/B,CAAC;IAEF,IAAI,QAAQ,EAAE,EAAE,KAAK,GAAG,EAAE;QACxB,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;KAChC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import type { RefObject } from 'react';\n\nimport hasProp from './hasProp';\nimport getActiveElement from './getActiveElement';\nimport createUID from './createUID';\n\n/**\n * Returns all valid focusable elements within a given ref.\n * @param container The container element, or reference to the container element, to search for focusable elements within.\n * @param options\n * @param options.includeActiveEl If true, the active element will be included in the list, even if it does not match focusable criteria.\n * @returns A list of valid focusable elements within the given ref.\n */\nconst getFocusables = (\n container: RefObject<ParentNode> | ParentNode,\n {\n includeActiveEl = false\n }: {\n includeActiveEl?: boolean;\n } = {}\n): HTMLElement[] => {\n const uid = createUID();\n let activeId = uid;\n let activeEl: ReturnType<typeof getActiveElement> = null;\n\n const containerEl = hasProp(container, 'current') ? container.current : container;\n if (!containerEl) return [];\n\n let selector = 'a, button, input, textarea, select, details, [tabindex]:not([tabindex=\"-1\"])';\n\n if (includeActiveEl) {\n activeEl = getActiveElement();\n if (activeEl) {\n activeId = activeEl.id || uid;\n activeEl.id = activeId;\n selector = `${selector}, [id=\"${activeId}\"]`;\n }\n }\n\n const focusableElements = ([...containerEl.querySelectorAll(selector)] as HTMLElement[]).filter(\n el =>\n el instanceof HTMLElement &&\n (el.id === activeId ||\n (!el.hasAttribute('disabled') &&\n el.getAttribute('tabindex') !== '-1' &&\n !el.closest('[inert]')))\n );\n\n if (activeEl?.id === uid) {\n activeEl.removeAttribute('id');\n }\n\n return focusableElements;\n};\n\nexport default getFocusables;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pega/cosmos-react-core",
3
- "version": "5.0.0-dev.9.3",
3
+ "version": "6.0.0",
4
4
  "description": "Cosmos is a visual design system and UI component collection. Its goal is to empower application developers in their pursuit to create engaging and rewarding user experiences.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -18,14 +18,15 @@
18
18
  "main": "lib/index.js",
19
19
  "types": "lib/index.d.ts",
20
20
  "files": [
21
- "lib"
21
+ "lib",
22
+ "SECURITY.md"
22
23
  ],
23
24
  "scripts": {
24
25
  "build": "tsc -b tsconfig.build.json"
25
26
  },
26
27
  "dependencies": {
27
28
  "@popperjs/core": "^2.11.6",
28
- "@types/dompurify": "^3.0.2",
29
+ "@types/dompurify": "^3.0.5",
29
30
  "@types/emoji-mart": "^3.0.4",
30
31
  "@types/emoji-regex": "^8.0.0",
31
32
  "@types/google.maps": "^3.49.2",
@@ -35,7 +36,7 @@
35
36
  "@types/styled-components": "^5.1.26",
36
37
  "bignumber.js": "^9.0.1",
37
38
  "credit-card-type": "^9.1.0",
38
- "dompurify": "^3.0.5",
39
+ "dompurify": "^3.0.7",
39
40
  "emoji-mart": "^3.0.1",
40
41
  "emoji-regex": "^9.2.0",
41
42
  "libphonenumber-js": "^1.9.9",