@reykjavik/hanna-react 0.10.103 → 0.10.104

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 (136) hide show
  1. package/AccordionList.js +2 -2
  2. package/Alert.d.ts +2 -2
  3. package/Alert.js +1 -0
  4. package/AutosuggestSearch.d.ts +40 -0
  5. package/AutosuggestSearch.js +70 -0
  6. package/BasicTable.d.ts +24 -4
  7. package/BasicTable.js +20 -19
  8. package/BreadCrumbs.d.ts +2 -2
  9. package/CHANGELOG.md +34 -0
  10. package/ContactBubble.d.ts +4 -3
  11. package/ContactBubble.js +7 -4
  12. package/Datepicker.d.ts +8 -3
  13. package/Datepicker.js +36 -14
  14. package/FileInput.d.ts +2 -1
  15. package/FileInput.js +2 -2
  16. package/FormField.js +2 -2
  17. package/Gallery.d.ts +2 -1
  18. package/Gallery.js +5 -0
  19. package/Layout.d.ts +4 -3
  20. package/Layout.js +0 -3
  21. package/MainMenu/_PrimaryPanel.d.ts +3 -4
  22. package/MainMenu/_PrimaryPanel.js +1 -1
  23. package/MainMenu.d.ts +6 -4
  24. package/MainMenu.js +8 -16
  25. package/Multiselect.d.ts +2 -1
  26. package/Multiselect.js +4 -3
  27. package/NameCard.d.ts +2 -1
  28. package/NameCard.js +7 -0
  29. package/Pagination.d.ts +2 -2
  30. package/ReadSpeakerPlayer.js +13 -5
  31. package/SearchInput.d.ts +24 -2
  32. package/SearchInput.js +13 -3
  33. package/SearchResults.d.ts +2 -1
  34. package/SearchResults.js +10 -2
  35. package/ShareButtons.d.ts +3 -2
  36. package/SiteSearchAutocomplete.d.ts +11 -11
  37. package/SiteSearchAutocomplete.js +21 -7
  38. package/SiteSearchCurtain.js +2 -2
  39. package/SiteSearchInput.d.ts +19 -10
  40. package/SiteSearchInput.js +9 -6
  41. package/Tooltip.js +4 -3
  42. package/VerticalTabsTOC.js +2 -2
  43. package/_abstract/_ScrollWrapper.d.ts +10 -0
  44. package/_abstract/_ScrollWrapper.js +21 -0
  45. package/_abstract/_Table.d.ts +71 -0
  46. package/_abstract/_Table.js +55 -0
  47. package/_abstract/_TogglerGroup.js +2 -2
  48. package/_abstract/_TogglerInput.js +2 -2
  49. package/_mixed_export_resolution_/ReactDatepicker.d.ts +3 -0
  50. package/esm/AccordionList.js +1 -1
  51. package/esm/Alert.d.ts +2 -2
  52. package/esm/Alert.js +1 -0
  53. package/esm/AutosuggestSearch.d.ts +40 -0
  54. package/esm/AutosuggestSearch.js +66 -0
  55. package/esm/BasicTable.d.ts +24 -4
  56. package/esm/BasicTable.js +19 -18
  57. package/esm/BreadCrumbs.d.ts +2 -2
  58. package/esm/ContactBubble.d.ts +4 -3
  59. package/esm/ContactBubble.js +6 -3
  60. package/esm/Datepicker.d.ts +8 -3
  61. package/esm/Datepicker.js +35 -13
  62. package/esm/FileInput.d.ts +2 -1
  63. package/esm/FileInput.js +1 -1
  64. package/esm/FormField.js +1 -1
  65. package/esm/Gallery.d.ts +2 -1
  66. package/esm/Gallery.js +5 -0
  67. package/esm/Layout.d.ts +4 -3
  68. package/esm/Layout.js +0 -3
  69. package/esm/MainMenu/_PrimaryPanel.d.ts +3 -4
  70. package/esm/MainMenu/_PrimaryPanel.js +1 -1
  71. package/esm/MainMenu.d.ts +6 -4
  72. package/esm/MainMenu.js +8 -16
  73. package/esm/Multiselect.d.ts +2 -1
  74. package/esm/Multiselect.js +2 -1
  75. package/esm/NameCard.d.ts +2 -1
  76. package/esm/NameCard.js +7 -0
  77. package/esm/Pagination.d.ts +2 -2
  78. package/esm/ReadSpeakerPlayer.js +13 -5
  79. package/esm/SearchInput.d.ts +24 -2
  80. package/esm/SearchInput.js +13 -3
  81. package/esm/SearchResults.d.ts +2 -1
  82. package/esm/SearchResults.js +9 -1
  83. package/esm/ShareButtons.d.ts +3 -2
  84. package/esm/SiteSearchAutocomplete.d.ts +11 -11
  85. package/esm/SiteSearchAutocomplete.js +21 -7
  86. package/esm/SiteSearchCurtain.js +1 -1
  87. package/esm/SiteSearchInput.d.ts +19 -10
  88. package/esm/SiteSearchInput.js +8 -6
  89. package/esm/Tooltip.js +2 -1
  90. package/esm/VerticalTabsTOC.js +1 -1
  91. package/esm/_abstract/_ScrollWrapper.d.ts +10 -0
  92. package/esm/_abstract/_ScrollWrapper.js +16 -0
  93. package/esm/_abstract/_Table.d.ts +71 -0
  94. package/esm/_abstract/_Table.js +51 -0
  95. package/esm/_abstract/_TogglerGroup.js +1 -1
  96. package/esm/_abstract/_TogglerInput.js +1 -1
  97. package/esm/_mixed_export_resolution_/ReactDatepicker.d.ts +3 -0
  98. package/esm/index.d.ts +1 -0
  99. package/esm/utils/browserSide.d.ts +119 -1
  100. package/esm/utils/browserSide.js +152 -1
  101. package/esm/utils/config.d.ts +1 -14
  102. package/esm/utils/config.js +0 -2
  103. package/esm/utils/useCallbackOnEsc.d.ts +6 -0
  104. package/esm/utils/useCallbackOnEsc.js +25 -0
  105. package/esm/utils/useDomid.d.ts +8 -0
  106. package/esm/utils/useDomid.js +17 -0
  107. package/esm/utils/useLaggedState.d.ts +18 -0
  108. package/esm/utils/useLaggedState.js +84 -0
  109. package/esm/utils/useOnClickOutside.d.ts +9 -0
  110. package/esm/utils/useOnClickOutside.js +32 -0
  111. package/esm/utils/useScrollEdgeDetect.d.ts +15 -0
  112. package/esm/utils/useScrollEdgeDetect.js +45 -0
  113. package/esm/utils/useShortState.d.ts +2 -0
  114. package/esm/utils/useShortState.js +34 -0
  115. package/esm/utils.d.ts +1 -0
  116. package/esm/utils.js +1 -0
  117. package/index.d.ts +1 -0
  118. package/package.json +6 -2
  119. package/utils/browserSide.d.ts +119 -1
  120. package/utils/browserSide.js +156 -4
  121. package/utils/config.d.ts +1 -14
  122. package/utils/config.js +1 -4
  123. package/utils/useCallbackOnEsc.d.ts +6 -0
  124. package/utils/useCallbackOnEsc.js +29 -0
  125. package/utils/useDomid.d.ts +8 -0
  126. package/utils/useDomid.js +21 -0
  127. package/utils/useLaggedState.d.ts +18 -0
  128. package/utils/useLaggedState.js +88 -0
  129. package/utils/useOnClickOutside.d.ts +9 -0
  130. package/utils/useOnClickOutside.js +35 -0
  131. package/utils/useScrollEdgeDetect.d.ts +15 -0
  132. package/utils/useScrollEdgeDetect.js +50 -0
  133. package/utils/useShortState.d.ts +2 -0
  134. package/utils/useShortState.js +38 -0
  135. package/utils.d.ts +1 -0
  136. package/utils.js +1 -0
package/Layout.js CHANGED
@@ -11,19 +11,16 @@ const _Link_js_1 = require("./_abstract/_Link.js");
11
11
  const utils_js_1 = require("./utils.js");
12
12
  exports.defaultLayoutTexts = {
13
13
  is: {
14
- lang: 'is',
15
14
  skipLinkLabel: 'Valmynd',
16
15
  closeMenuLabel: 'Loka',
17
16
  closeMenuLabelLong: 'Loka valmynd',
18
17
  },
19
18
  en: {
20
- lang: 'en',
21
19
  skipLinkLabel: 'Skip to navigation',
22
20
  closeMenuLabel: 'Close',
23
21
  closeMenuLabelLong: 'Close menu',
24
22
  },
25
23
  pl: {
26
- lang: 'pl',
27
24
  skipLinkLabel: 'Przejdź do nawigacji',
28
25
  closeMenuLabel: 'Zamknij',
29
26
  closeMenuLabelLong: 'Zamknij menu',
@@ -1,19 +1,18 @@
1
1
  import React, { RefObject } from 'react';
2
- import { Modifiers } from '@hugsmidjan/react/types';
3
2
  import { EitherObj } from '@reykjavik/hanna-utils';
3
+ import { BemModifierProps } from '../utils/types.js';
4
4
  export type PrimaryPanelI18n = {
5
5
  backToMenu: string;
6
6
  backToMenuLong?: string;
7
7
  };
8
8
  export type MegaMenuItem = {
9
9
  current?: boolean;
10
- /** Puts a modifier className on the menu item element. */
11
- modifier?: Modifiers;
12
- } & EitherObj<{
10
+ } & BemModifierProps & EitherObj<{
13
11
  label: string;
14
12
  summary?: string;
15
13
  href: string;
16
14
  lang?: string;
15
+ hrefLang?: string;
17
16
  target?: React.HTMLAttributeAnchorTarget;
18
17
  }, {
19
18
  Content: () => JSX.Element;
@@ -16,7 +16,7 @@ const PrimaryPanel = (props) => {
16
16
  react_1.default.createElement("h3", { className: "PrimaryPanel__title" },
17
17
  ' ',
18
18
  isBrowser && !isActive ? (react_1.default.createElement("button", { className: "MainMenu__mega__title-toggler", "aria-controls": panel.id, onClick: () => setActivePanel(panel, false), "aria-pressed": isActive, type: "button" }, panel.title)) : (panel.title)),
19
- react_1.default.createElement("ul", { className: "PrimaryPanel__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: (0, classUtils_1.modifiedClass)('PrimaryPanel__item', item.modifier), "aria-current": item.current || undefined }, item.Content ? (react_1.default.createElement(item.Content, null)) : (react_1.default.createElement(_Link_js_1.Link, { className: "PrimaryPanel__link", href: item.href, target: item.target, lang: item.lang },
19
+ react_1.default.createElement("ul", { className: "PrimaryPanel__items" }, items.map((item, i) => (react_1.default.createElement("li", { key: i, className: (0, classUtils_1.modifiedClass)('PrimaryPanel__item', item.modifier), "aria-current": item.current || undefined }, item.Content ? (react_1.default.createElement(item.Content, null)) : (react_1.default.createElement(_Link_js_1.Link, { className: "PrimaryPanel__link", href: item.href, target: item.target, lang: item.lang, hrefLang: item.hrefLang },
20
20
  react_1.default.createElement("span", { className: "PrimaryPanel__linkTitle" }, item.label),
21
21
  ' ',
22
22
  react_1.default.createElement("small", { className: "PrimaryPanel__summary" }, item.summary),
package/MainMenu.d.ts CHANGED
@@ -1,21 +1,23 @@
1
1
  import React from 'react';
2
2
  import { Modifiers } from '@hugsmidjan/qj/classUtils';
3
3
  import { Cleanup } from '@reykjavik/hanna-utils';
4
- import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
4
+ import { DefaultTexts, HannaLang } from '@reykjavik/hanna-utils/i18n';
5
5
  import { AuxilaryPanelIllustration, AuxiliaryPanelProps } from './MainMenu/_Auxiliary.js';
6
6
  import { MegaMenuItem, MegaMenuItemList, MegaMenuPanel, PrimaryPanelI18n } from './MainMenu/_PrimaryPanel.js';
7
7
  import { SSRSupportProps, WrapperElmProps } from './utils.js';
8
8
  export type MainMenuI18n = Cleanup<{
9
- lang?: string;
10
9
  homeLabel?: string;
11
10
  title: string;
11
+ /** @deprecated Not used (Will be removed in v0.11) */
12
+ lang?: string;
12
13
  } & PrimaryPanelI18n>;
13
- export declare const defaultMainMenuTexts: DefaultTexts<Required<MainMenuI18n>>;
14
+ export declare const defaultMainMenuTexts: DefaultTexts<Required<Omit<MainMenuI18n, 'lang'>>>;
14
15
  export type { AuxilaryPanelIllustration, AuxiliaryPanelProps, MegaMenuItem, MegaMenuItemList, MegaMenuPanel, };
15
16
  export type MainMenuItem = {
16
17
  label: string;
17
18
  labelLong?: string;
18
19
  lang?: string;
20
+ hrefLang?: string;
19
21
  /**
20
22
  * Puts a modifier className on the menu item element.
21
23
  *
@@ -63,7 +65,7 @@ export type MainMenuProps = {
63
65
  onItemClick?: (index: number, item: MainMenuItem) => void | boolean;
64
66
  activePanelId?: string;
65
67
  texts?: MainMenuI18n;
66
- lang?: string;
68
+ lang?: HannaLang;
67
69
  } & SSRSupportProps & WrapperElmProps<null, 'aria-label'>;
68
70
  export declare const MainMenu: (props: MainMenuProps) => JSX.Element | null;
69
71
  export default MainMenu;
package/MainMenu.js CHANGED
@@ -5,32 +5,29 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const classUtils_1 = require("@hugsmidjan/qj/classUtils");
7
7
  const focusElm_1 = require("@hugsmidjan/qj/focusElm");
8
- const useShortState_1 = tslib_1.__importDefault(require("@hugsmidjan/react/hooks/useShortState"));
9
8
  const i18n_1 = require("@reykjavik/hanna-utils/i18n");
10
9
  const _Link_js_1 = require("./_abstract/_Link.js");
11
10
  const _Auxiliary_js_1 = require("./MainMenu/_Auxiliary.js");
12
11
  const _PrimaryPanel_js_1 = require("./MainMenu/_PrimaryPanel.js");
13
12
  const HannaUIState_js_1 = require("./utils/HannaUIState.js");
14
13
  const useFormatMonitor_js_1 = require("./utils/useFormatMonitor.js");
14
+ const useShortState_js_1 = require("./utils/useShortState.js");
15
15
  const utils_js_1 = require("./utils.js");
16
16
  const findActivePanel = (megaPanels, activeId) => activeId ? megaPanels.find((panel) => activeId === panel.id) : undefined;
17
17
  exports.defaultMainMenuTexts = {
18
18
  is: {
19
- lang: 'is',
20
19
  title: 'Aðalvalmynd',
21
20
  homeLabel: 'Forsíða',
22
21
  backToMenu: 'Loka',
23
22
  backToMenuLong: 'Til baka í valmynd',
24
23
  },
25
24
  en: {
26
- lang: 'en',
27
25
  title: 'Main Menu',
28
26
  homeLabel: 'Home page',
29
27
  backToMenu: 'Close',
30
28
  backToMenuLong: 'Close and return to menu',
31
29
  },
32
30
  pl: {
33
- lang: 'pl',
34
31
  title: 'Menu główne',
35
32
  homeLabel: 'Strona główna',
36
33
  backToMenu: 'Zamknij',
@@ -70,16 +67,11 @@ const normalizeMenuItems = (itemsProp, megaPanels, homeLink, texts) => {
70
67
  }
71
68
  if (!hasHomeItem) {
72
69
  if (!homeLink || typeof homeLink === 'string') {
73
- let label = texts.homeLabel;
74
- let lang;
75
- if (label == null) {
76
- const def = exports.defaultMainMenuTexts[texts.lang || 'en'] ||
77
- exports.defaultMainMenuTexts.en ||
78
- exports.defaultMainMenuTexts.is;
79
- label = def.homeLabel;
80
- lang = def.lang;
81
- }
82
- homeLink = { href: homeLink || '/', label, lang };
70
+ homeLink = {
71
+ href: homeLink || '/',
72
+ label: texts.homeLabel || exports.defaultMainMenuTexts[i18n_1.DEFAULT_LANG].homeLabel,
73
+ lang: texts.homeLabel ? undefined : i18n_1.DEFAULT_LANG,
74
+ };
83
75
  }
84
76
  items.unshift(Object.assign(Object.assign({}, homeLink), { modifier: 'home' }));
85
77
  }
@@ -99,7 +91,7 @@ const MainMenu = (props) => {
99
91
  const pressedLinkRef = (0, react_1.useRef)(null);
100
92
  const activePanelRef = (0, react_1.useRef)(null);
101
93
  const [activePanel, _setActivePanel] = (0, react_1.useState)(() => isBrowser && findActivePanel(megaPanels, props.activePanelId));
102
- const [laggyActivePanel, setLaggyActivePanel] = (0, useShortState_1.default)();
94
+ const [laggyActivePanel, setLaggyActivePanel] = (0, useShortState_js_1.useShortState)();
103
95
  const setActivePanel = (0, react_1.useMemo)(() => isBrowser
104
96
  ? (newActive, setFocus = true) => {
105
97
  const htmlElm = document.documentElement;
@@ -215,7 +207,7 @@ const MainMenu = (props) => {
215
207
  react_1.default.createElement(_Link_js_1.Link, { className: "MainMenu__link", href: item.href, target: item.target, "aria-label": labelLong, title: labelLong, onClick: () => {
216
208
  const keepOpen = onItemClick && onItemClick(i, item) === false;
217
209
  !keepOpen && closeHamburgerMenu();
218
- }, lang: lang }, label)) : undefined // skip rendering non-link menu items server side
210
+ }, lang: lang, hrefLang: item.hrefLang }, label)) : undefined // skip rendering non-link menu items server side
219
211
  ));
220
212
  })),
221
213
  '\n\n',
package/Multiselect.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { HannaLang } from '@reykjavik/hanna-utils/i18n';
1
2
  import { TogglerGroupFieldProps } from './_abstract/_TogglerGroupField.js';
2
3
  import { SearchScoringfn } from './Multiselect/_Multiselect.search.js';
3
4
  export type MultiselectI18n = {
@@ -46,7 +47,7 @@ export type MultiselectProps = TogglerGroupFieldProps<string> & {
46
47
  */
47
48
  forceSearchable?: boolean;
48
49
  texts?: MultiselectI18n;
49
- lang?: string;
50
+ lang?: HannaLang;
50
51
  };
51
52
  export declare const Multiselect: {
52
53
  (props: MultiselectProps): JSX.Element;
package/Multiselect.js CHANGED
@@ -5,11 +5,12 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const classUtils_1 = require("@hugsmidjan/qj/classUtils");
7
7
  const domid_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/domid"));
8
- const hooks_1 = require("@hugsmidjan/react/hooks");
9
8
  const hanna_utils_1 = require("@reykjavik/hanna-utils");
10
9
  const i18n_1 = require("@reykjavik/hanna-utils/i18n");
11
10
  const _FocusTrap_js_1 = require("./_abstract/_FocusTrap.js");
12
11
  const _Multiselect_search_js_1 = require("./Multiselect/_Multiselect.search.js");
12
+ const useDomid_js_1 = require("./utils/useDomid.js");
13
+ const useOnClickOutside_js_1 = require("./utils/useOnClickOutside.js");
13
14
  const Checkbox_js_1 = tslib_1.__importDefault(require("./Checkbox.js"));
14
15
  const FormField_js_1 = tslib_1.__importStar(require("./FormField.js"));
15
16
  const TagPill_js_1 = tslib_1.__importDefault(require("./TagPill.js"));
@@ -62,7 +63,7 @@ const Multiselect = (props) => {
62
63
  const { onSelected, options: _options, disabled: _disabled, readOnly } = props;
63
64
  const disabled = _disabled === true;
64
65
  const disableds = !disabled && _disabled;
65
- const name = (0, hooks_1.useDomid)(props.name);
66
+ const name = (0, useDomid_js_1.useDomid)(props.name);
66
67
  const [values, setValues] = (0, utils_js_1.useMixedControlState)(props, 'value', []);
67
68
  const filled = values.length > 0;
68
69
  const empty = !filled && !props.placeholder;
@@ -84,7 +85,7 @@ const Multiselect = (props) => {
84
85
  return newIsOpen;
85
86
  });
86
87
  };
87
- (0, hooks_1.useOnClickOutside)(inputWrapperRef, () => toggleOpen(false));
88
+ (0, useOnClickOutside_js_1.useOnClickOutside)(inputWrapperRef, () => toggleOpen(false));
88
89
  const options = (0, react_1.useMemo)(() => _options.map((item) => (typeof item === 'string' ? { value: item } : item)), [_options]);
89
90
  const isSearchable = props.forceSearchable || options.length >= searchableLimit;
90
91
  /*
package/NameCard.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { HannaLang } from '@reykjavik/hanna-utils/i18n';
1
2
  import { WrapperElmProps } from './utils.js';
2
3
  export type NameCardI18n = {
3
4
  updatedLabel: string;
@@ -54,8 +55,8 @@ export type NameCardProps = {
54
55
  available?: boolean;
55
56
  /** Meta data about freshness status, etc. */
56
57
  updated?: string | Date;
57
- lang?: string;
58
58
  texts?: NameCardI18n;
59
+ lang?: HannaLang;
59
60
  /** @deprecated Use `available` instead (will be removed in v0.11) */
60
61
  vacancy?: boolean;
61
62
  /** @deprecated Use `contactInfo` instead (will be removed in v0.11) */
package/NameCard.js CHANGED
@@ -38,6 +38,13 @@ const defaultTexts = {
38
38
  vacancyLabel: 'Laus pláss',
39
39
  noVacancyLabel: 'Ekki laus pláss',
40
40
  },
41
+ pl: {
42
+ updatedLabel: 'Zaktualizowano',
43
+ availableLabel: '',
44
+ unavailableLabel: '',
45
+ vacancyLabel: 'Wakat',
46
+ noVacancyLabel: 'Brak wakatów',
47
+ },
41
48
  };
42
49
  const NameCard = (props) => {
43
50
  const { name, location, hours, aboutText, available = props.vacancy, // eslint-disable-line deprecation/deprecation
package/Pagination.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { MouseEvent } from 'react';
2
2
  import { EitherObj } from '@reykjavik/hanna-utils';
3
- import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
3
+ import { DefaultTexts, HannaLang } from '@reykjavik/hanna-utils/i18n';
4
4
  import { SSRSupportProps, WrapperElmProps } from './utils.js';
5
5
  type StringContaining<Token extends string> = `${string}${Token}${string}`;
6
6
  export type PageTemplateString = StringContaining<'${page}'>;
@@ -19,8 +19,8 @@ export type PaginationProps = {
19
19
  'aria-controls'?: string;
20
20
  title?: string;
21
21
  submit?: boolean;
22
- lang?: string;
23
22
  texts?: PaginationI18n;
23
+ lang?: HannaLang;
24
24
  } & EitherObj<{
25
25
  href: PageTemplateString | ((page: number) => string);
26
26
  onChange?: (page: number, clickEvent: MouseEvent) => void;
@@ -7,6 +7,13 @@ const classUtils_1 = require("@hugsmidjan/qj/classUtils");
7
7
  const i18n_1 = require("@reykjavik/hanna-utils/i18n");
8
8
  const scriptTagId = 'rs_req_Init';
9
9
  const scriptTagSelector = `script#${scriptTagId}`;
10
+ /**
11
+ * Counts the number of ReadSpeaker buttons mounted on the page.
12
+ * When mounting the first button, a script tag will be added to the page,
13
+ * and this counter incremented. When unmounting, this counter is decremented,
14
+ * and when it reaches `0`, the script tag will be removed from the page.
15
+ * GC FTW!
16
+ */
10
17
  let buttons = 0;
11
18
  exports.defaultReadSpeakerPlayerTexts = {
12
19
  en: { linkText: 'Listen', linkLabel: 'Listen to this page read outloud' },
@@ -23,13 +30,14 @@ const ReadSpeakerPlayer = (props) => {
23
30
  const { linkText, linkLabel } = (0, i18n_1.getTexts)({ lang: lang.slice(0, 2), texts }, exports.defaultReadSpeakerPlayerTexts);
24
31
  (0, react_1.useEffect)(() => {
25
32
  var _a, _b;
26
- if (buttons < 0) {
27
- return;
28
- }
29
33
  if (buttons === 0) {
30
34
  if (document.querySelector(scriptTagSelector)) {
31
- buttons = -1;
35
+ // If the script element has been already added to the page
36
+ // while our `button` count is at 0, then someone else
37
+ // must have injected the script, and is presumably managing it.
38
+ // Therefore, our job is done here.
32
39
  return;
40
+ // NOTE: We check this every time, in case the script gets removed.
33
41
  }
34
42
  const script = document.createElement('script');
35
43
  script.id = scriptTagId;
@@ -50,7 +58,7 @@ const ReadSpeakerPlayer = (props) => {
50
58
  },
51
59
  // eslint-disable-next-line react-hooks/exhaustive-deps
52
60
  [
53
- // We're not trying to support dynamic changes to `customerId`
61
+ // NOTE: We do not support dynamic changes to `customerId`
54
62
  // or multiple different `customerId`s on the same page.
55
63
  // If you try that, things will be weird and wonky.
56
64
  ]);
package/SearchInput.d.ts CHANGED
@@ -1,12 +1,34 @@
1
1
  import { RefObject } from 'react';
2
2
  import { FormFieldWrappingProps } from './FormField.js';
3
+ type InputElmProps = Omit<JSX.IntrinsicElements['input'], 'className' | 'type' | 'disabled' | 'readOnly' | 'required' | 'onSubmit' | 'ref' | 'value'> & {
4
+ value?: string;
5
+ };
3
6
  export type SearchInputProps = FormFieldWrappingProps & {
4
7
  small?: boolean;
5
8
  type?: string;
6
- onButtonClick?: () => void;
9
+ /**
10
+ * Triggered when user hits ENTER key with the focus inside the input field.
11
+ *
12
+ * Return `true` to __allow__ the browser's default submit hehavior.
13
+ */
14
+ onSubmit?: (value: string) => boolean | void;
15
+ /**
16
+ * Custom action to perform when the user clicks the search button.
17
+ *
18
+ * Return `true` to __allow__ the browser's default submit hehavior.
19
+ *
20
+ * Defaults to `onSubmit`.
21
+ */
22
+ onButtonClick?: (value: string) => boolean | void;
23
+ /**
24
+ * Toggle the search `<button/>`.
25
+ *
26
+ * Defaults to `true` if onButtonClick is passed, otherwise false.
27
+ */
28
+ button?: boolean;
7
29
  buttonText?: string;
8
30
  inputRef?: RefObject<HTMLInputElement>;
9
31
  buttonRef?: RefObject<HTMLButtonElement>;
10
- } & JSX.IntrinsicElements['input'];
32
+ } & InputElmProps;
11
33
  export declare const SearchInput: (props: SearchInputProps) => JSX.Element;
12
34
  export default SearchInput;
package/SearchInput.js CHANGED
@@ -6,7 +6,7 @@ const react_1 = tslib_1.__importStar(require("react"));
6
6
  const FormField_js_1 = tslib_1.__importStar(require("./FormField.js"));
7
7
  const SearchInput = (props) => {
8
8
  var _a;
9
- const _b = (0, FormField_js_1.groupFormFieldWrapperProps)(props), { onChange, onButtonClick, buttonText = 'Leita', fieldWrapperProps } = _b, inputElementProps = tslib_1.__rest(_b, ["onChange", "onButtonClick", "buttonText", "fieldWrapperProps"]);
9
+ const _b = (0, FormField_js_1.groupFormFieldWrapperProps)(props), { onChange, onKeyDown, onSubmit, onButtonClick, button, buttonText = 'Leita', inputRef, buttonRef, fieldWrapperProps } = _b, inputElementProps = tslib_1.__rest(_b, ["onChange", "onKeyDown", "onSubmit", "onButtonClick", "button", "buttonText", "inputRef", "buttonRef", "fieldWrapperProps"]);
10
10
  const { value, defaultValue, placeholder } = inputElementProps;
11
11
  const [hasValue, setHasValue] = (0, react_1.useState)(undefined);
12
12
  const filled = !!((_a = value !== null && value !== void 0 ? value : hasValue) !== null && _a !== void 0 ? _a : !!defaultValue);
@@ -17,10 +17,20 @@ const SearchInput = (props) => {
17
17
  setHasValue(!!e.target.value);
18
18
  onChange && onChange(e);
19
19
  };
20
+ const showButton = !!onButtonClick || button;
21
+ const handleButtonClick = onButtonClick || onSubmit;
20
22
  return (react_1.default.createElement(FormField_js_1.default, Object.assign({ extraClassName: "SearchInput", empty: empty, filled: filled }, fieldWrapperProps, { renderInput: (className, inputProps, addFocusProps) => (react_1.default.createElement("div", Object.assign({ className: className.input }, addFocusProps()),
21
- react_1.default.createElement("input", Object.assign({ className: "SearchInput__input", onChange: _onChange }, inputProps, inputElementProps, { ref: props.inputRef })),
23
+ react_1.default.createElement("input", Object.assign({ className: "SearchInput__input", onChange: _onChange }, inputProps, { onKeyDown: onSubmit
24
+ ? (e) => {
25
+ if (e.key === 'Enter' && !onSubmit(e.currentTarget.value)) {
26
+ e.preventDefault();
27
+ }
28
+ onKeyDown && onKeyDown(e);
29
+ }
30
+ : onKeyDown }, inputElementProps, { ref: inputRef })),
22
31
  ' ',
23
- onButtonClick && (react_1.default.createElement("button", { className: "SearchInput__button", type: "button", onClick: onButtonClick, title: buttonText, ref: props.buttonRef, disabled: props.disabled || props.readOnly }, buttonText)))) })));
32
+ showButton && (react_1.default.createElement("button", { className: "SearchInput__button", type: "submit", onClick: handleButtonClick &&
33
+ ((e) => !handleButtonClick(e.currentTarget.value) && e.preventDefault()), title: buttonText, ref: buttonRef, disabled: props.disabled || props.readOnly }, buttonText)))) })));
24
34
  };
25
35
  exports.SearchInput = SearchInput;
26
36
  exports.default = exports.SearchInput;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { HannaLang } from '@reykjavik/hanna-utils/i18n';
2
3
  import { SearchResultsItemProps } from './SearchResults/_SearchResultsItem.js';
3
4
  import { WrapperElmProps } from './utils.js';
4
5
  export type SearchReesultI18n = {
@@ -32,7 +33,7 @@ export type SearchResultsProps = {
32
33
  pages?: number;
33
34
  loadMore?: () => void;
34
35
  texts?: SearchReesultI18n;
35
- lang?: string;
36
+ lang?: HannaLang;
36
37
  } & WrapperElmProps;
37
38
  export declare const SearchResults: (props: SearchResultsProps) => JSX.Element;
38
39
  export default SearchResults;
package/SearchResults.js CHANGED
@@ -7,9 +7,9 @@ const react_intersection_observer_1 = require("react-intersection-observer");
7
7
  const classUtils_1 = require("@hugsmidjan/qj/classUtils");
8
8
  const prettyNum_1 = require("@hugsmidjan/qj/prettyNum");
9
9
  const range_1 = tslib_1.__importDefault(require("@hugsmidjan/qj/range"));
10
- const hooks_1 = require("@hugsmidjan/react/hooks");
11
10
  const i18n_1 = require("@reykjavik/hanna-utils/i18n");
12
11
  const _SearchResultsItem_js_1 = require("./SearchResults/_SearchResultsItem.js");
12
+ const useDomid_js_1 = require("./utils/useDomid.js");
13
13
  const Alert_js_1 = tslib_1.__importDefault(require("./Alert.js"));
14
14
  const Tabs_js_1 = tslib_1.__importDefault(require("./Tabs.js"));
15
15
  const renderDefaultErrorText = () => (react_1.default.createElement(react_1.default.Fragment, null,
@@ -33,6 +33,14 @@ const defaultTexts = {
33
33
  loadMore: 'Sækja fleiri',
34
34
  // loadingMore: 'Sæki fleiri...',
35
35
  },
36
+ pl: {
37
+ lang: 'pl',
38
+ loadQueryTitle: 'Ładowanie wyników...',
39
+ resultsTitle: 'wyniki wyszukiwania dla',
40
+ noResultsTitle: 'Nie znaleziono wyników dla',
41
+ loadMore: 'Załaduj więcej',
42
+ // loadingMore: 'Ładowanie...',
43
+ },
36
44
  };
37
45
  const SearchResults_Tabs = (props) => {
38
46
  const { domid, filters, activeIdx, setFilter, lang } = props;
@@ -100,7 +108,7 @@ const renderLoadMore = (props, texts) => {
100
108
  const SearchResults = (props) => {
101
109
  const { filters, activeFilterIdx, setFilter, status, errorText, wrapperProps } = props;
102
110
  const texts = (0, i18n_1.getTexts)(props, defaultTexts);
103
- const domid = (0, hooks_1.useDomid)();
111
+ const domid = (0, useDomid_js_1.useDomid)();
104
112
  return (react_1.default.createElement("div", Object.assign({}, wrapperProps, { className: (0, classUtils_1.modifiedClass)('SearchResults', status !== 'results' && status, (wrapperProps || {}).className) }),
105
113
  renderTitle(props, texts),
106
114
  react_1.default.createElement(SearchResults_Tabs, { domid: domid, filters: filters, activeIdx: activeFilterIdx, setFilter: setFilter, lang: texts.lang }),
package/ShareButtons.d.ts CHANGED
@@ -1,8 +1,9 @@
1
+ import { HannaLang } from '@reykjavik/hanna-utils/i18n';
1
2
  import { ShareButtonI18n, ShareButtonPlatforms } from '@reykjavik/hanna-utils/shareButtonsUtils';
2
3
  import { SSRSupportProps, WrapperElmProps } from './utils.js';
3
4
  export type ShareButtonsProps = {
4
- texts?: Readonly<ShareButtonI18n>;
5
- lang?: string;
5
+ texts?: ShareButtonI18n;
6
+ lang?: HannaLang;
6
7
  } & SSRSupportProps & WrapperElmProps<null, 'aria-label'> & Partial<Record<ShareButtonPlatforms, boolean>>;
7
8
  export declare const ShareButtons: (props: ShareButtonsProps) => JSX.Element | null;
8
9
  export default ShareButtons;
@@ -1,18 +1,22 @@
1
1
  import React from 'react';
2
2
  import Autosuggest, { RenderSuggestion } from 'react-autosuggest';
3
- import { DefaultTexts } from '@reykjavik/hanna-utils/i18n';
3
+ import { DefaultTexts, HannaLang } from '@reykjavik/hanna-utils/i18n';
4
4
  import { BemProps } from './utils/types.js';
5
+ import { SiteSearchInputProps } from './SiteSearchInput.js';
5
6
  import { WrapperElmProps } from './utils.js';
6
7
  export type SiteSearchACI18n = {
7
- lang?: string;
8
8
  /** Label for the autocomplete's combobox container div */
9
9
  label: string;
10
10
  /** Label for the text input */
11
11
  inputLabel: string;
12
12
  /** Placeholder text for the text input */
13
13
  placeholder?: string;
14
+ /** Label for the search button */
15
+ buttonText?: string;
14
16
  /** Label for the suggestions item list container */
15
17
  suggestionsLabel: string;
18
+ /** @deprecated Not used (Will be removed in v0.11) */
19
+ lang?: string;
16
20
  };
17
21
  export declare const defaultSiteSearchACTexts: DefaultTexts<SiteSearchACI18n>;
18
22
  export type SiteSearchAutocompleteProps<T> = {
@@ -25,17 +29,13 @@ export type SiteSearchAutocompleteProps<T> = {
25
29
  onSuggestionHighlighted?: (params: {
26
30
  suggestion: T;
27
31
  }) => void;
28
- /** Triggered when user hits ENTER key with the focus inside the input field */
29
- onSubmit?: (value: string) => void;
30
- /** Custom action to perform when the user clicks the search button
31
- *
32
- * Defaults to `onSubmit`
33
- */
34
- onButtonClick?: (value: string) => void;
35
- lang?: string;
36
32
  texts?: SiteSearchACI18n;
33
+ lang?: HannaLang;
37
34
  /** @deprecated Use `text` prop instead (will be removed in v0.11) */
38
35
  label?: string;
39
- } & BemProps & WrapperElmProps;
36
+ } & Pick<SiteSearchInputProps, 'onSubmit' | 'onButtonClick'> & Pick<BemProps, 'bem'> & WrapperElmProps;
37
+ /**
38
+ * @deprecated Use `<AutosuggestSearch InputComponent={SiteSearchInput} itemActionIcon="search" />` instead (Will be removed in v0.11)
39
+ */
40
40
  export declare const SiteSearchAutocomplete: <T>(props: SiteSearchAutocompleteProps<T>) => JSX.Element;
41
41
  export default SiteSearchAutocomplete;
@@ -5,28 +5,41 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const react_autosuggest_1 = tslib_1.__importDefault(require("react-autosuggest"));
7
7
  const i18n_1 = require("@reykjavik/hanna-utils/i18n");
8
- const SiteSearchInput_js_1 = tslib_1.__importDefault(require("./SiteSearchInput.js"));
8
+ const SiteSearchInput_js_1 = require("./SiteSearchInput.js");
9
9
  exports.defaultSiteSearchACTexts = {
10
10
  is: {
11
- lang: 'is',
12
11
  label: 'Leit á vefnum',
13
12
  inputLabel: 'Leitarorð',
13
+ buttonText: 'Leita',
14
14
  placeholder: 'Sláðu inn leitarorð',
15
15
  suggestionsLabel: 'Tillögur',
16
16
  },
17
17
  en: {
18
- lang: 'en',
19
18
  label: 'Site search',
20
19
  inputLabel: 'Search terms',
20
+ buttonText: 'Search',
21
21
  placeholder: 'Enter search terms',
22
22
  suggestionsLabel: 'Suggestions',
23
23
  },
24
+ pl: {
25
+ label: 'Wyszukiwanie na stronie',
26
+ inputLabel: 'Wyszukiwane słowa',
27
+ buttonText: 'Szukaj',
28
+ placeholder: 'Wpisz wyszukiwane słowa',
29
+ suggestionsLabel: 'Sugestie',
30
+ },
24
31
  };
32
+ /**
33
+ * @deprecated Use `<AutosuggestSearch InputComponent={SiteSearchInput} itemActionIcon="search" />` instead (Will be removed in v0.11)
34
+ */
25
35
  const SiteSearchAutocomplete = (props) => {
26
- const { suggestions, setSuggestions, renderSuggestion, getSuggestionValue, onSuggestionsFetchRequested, onSuggestionSelected, onSuggestionHighlighted, onSubmit, onButtonClick = onSubmit, bem = 'SiteSearchAutocomplete', wrapperProps, } = props;
36
+ const { suggestions, setSuggestions, renderSuggestion, getSuggestionValue, onSuggestionsFetchRequested, onSuggestionSelected, onSuggestionHighlighted, onSubmit, onButtonClick, bem = 'SiteSearchAutocomplete', wrapperProps, } = props;
27
37
  const [value, setValue] = (0, react_1.useState)('');
28
38
  const inputRef = (0, react_1.createRef)();
29
39
  const txt = (0, i18n_1.getTexts)(props, exports.defaultSiteSearchACTexts);
40
+ if (process.env.NODE_ENV !== 'production' && !txt.buttonText) {
41
+ console.warn('SiteSearchAutocomplete: Missing translation: `buttonText`');
42
+ }
30
43
  return (react_1.default.createElement(react_autosuggest_1.default, { theme: {
31
44
  container: bem,
32
45
  containerOpen: bem + '--open',
@@ -35,7 +48,7 @@ const SiteSearchAutocomplete = (props) => {
35
48
  suggestionsList: bem + '__list',
36
49
  suggestion: bem + '__item',
37
50
  suggestionHighlighted: bem + '__item--highlighted',
38
- }, focusInputOnSuggestionClick: true, suggestions: suggestions, onSuggestionsClearRequested: () => setSuggestions([]), onSuggestionsFetchRequested: onSuggestionsFetchRequested, getSuggestionValue: getSuggestionValue, onSuggestionSelected: onSuggestionSelected, onSuggestionHighlighted: onSuggestionHighlighted, renderSuggestion: renderSuggestion || ((s) => String(s)), containerProps: { 'aria-label': txt.label }, renderSuggestionsContainer: ({ containerProps, children }) => (react_1.default.createElement("div", Object.assign({}, containerProps, { "aria-label": suggestions.length ? txt.suggestionsLabel : undefined }), children)), inputProps: {
51
+ }, focusInputOnSuggestionClick: true, suggestions: suggestions, onSuggestionsClearRequested: () => setSuggestions([]), onSuggestionsFetchRequested: onSuggestionsFetchRequested, getSuggestionValue: getSuggestionValue, onSuggestionSelected: onSuggestionSelected, onSuggestionHighlighted: onSuggestionHighlighted, renderSuggestion: renderSuggestion || ((s) => String(s)), containerProps: Object.assign(Object.assign({}, wrapperProps), { 'aria-label': txt.label }), renderSuggestionsContainer: ({ containerProps, children }) => (react_1.default.createElement("div", Object.assign({}, containerProps, { "aria-label": suggestions.length ? txt.suggestionsLabel : undefined }), children)), inputProps: {
39
52
  ref: inputRef,
40
53
  value: value,
41
54
  onChange: (_, { newValue }) => {
@@ -44,9 +57,10 @@ const SiteSearchAutocomplete = (props) => {
44
57
  }, renderInputComponent: (inputProps) => {
45
58
  /* prettier-ignore */
46
59
  const { className, type, disabled, readOnly, required, children } = inputProps, siteSearchProps = tslib_1.__rest(inputProps, ["className", "type", "disabled", "readOnly", "required", "children"]);
47
- return (react_1.default.createElement(SiteSearchInput_js_1.default, Object.assign({}, siteSearchProps, { wrapperProps: wrapperProps, label: props.label || // eslint-disable-line deprecation/deprecation
48
- txt.inputLabel, placeholder: txt.placeholder, onSubmit: onSubmit && (() => onSubmit(value)), onButtonClick: onButtonClick && (() => onButtonClick(value)) })));
60
+ return (react_1.default.createElement(SiteSearchInput_js_1.SiteSearchInput, Object.assign({}, siteSearchProps, { label: props.label || // eslint-disable-line deprecation/deprecation
61
+ txt.inputLabel, placeholder: txt.placeholder, buttonText: txt.buttonText, onSubmit: onSubmit && (() => onSubmit(value)), onButtonClick: onButtonClick && (() => onButtonClick(value)) })));
49
62
  } }));
50
63
  };
51
64
  exports.SiteSearchAutocomplete = SiteSearchAutocomplete;
65
+ // eslint-disable-next-line deprecation/deprecation
52
66
  exports.default = exports.SiteSearchAutocomplete;
@@ -4,12 +4,12 @@ exports.SiteSearchCurtain = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importStar(require("react"));
6
6
  const classUtils_1 = require("@hugsmidjan/qj/classUtils");
7
- const hooks_1 = require("@hugsmidjan/react/hooks");
8
7
  const env_js_1 = require("./utils/env.js");
8
+ const useLaggedState_js_1 = require("./utils/useLaggedState.js");
9
9
  // NOTE: This component is too low-level (and too esoteric and rarely used)
10
10
  // to justify `wrapperProps`
11
11
  const SiteSearchCurtain = (props) => {
12
- const [focused, setFocused] = (0, hooks_1.useLaggedState)(false);
12
+ const [focused, setFocused] = (0, useLaggedState_js_1.useLaggedState)(false);
13
13
  (0, react_1.useEffect)(() => {
14
14
  const closeSearch = (e) => {
15
15
  if (e.key === 'Escape') {
@@ -1,20 +1,29 @@
1
- import React from 'react';
2
1
  import { FormFieldWrappingProps } from './FormField.js';
3
- type InputElmProps = Omit<JSX.IntrinsicElements['input'], 'className' | 'type' | 'disabled' | 'readOnly' | 'required' | 'onSubmit'>;
2
+ type InputElmProps = Omit<JSX.IntrinsicElements['input'], 'className' | 'type' | 'disabled' | 'readOnly' | 'required' | 'onSubmit' | 'ref' | 'value'> & {
3
+ value?: string;
4
+ };
4
5
  export type SiteSearchInputProps = Pick<FormFieldWrappingProps, 'id' | 'label' | 'ssr' | 'wrapperProps'> & {
5
- /** Triggered when user hits ENTER key with the focus inside the input field
6
+ /**
7
+ * Triggered when user hits ENTER key with the focus inside the input field.
6
8
  *
7
- * Return `true` to __allow__ the browser's default submit hehavior
9
+ * Return `true` to __allow__ the browser's default submit hehavior.
8
10
  */
9
- onSubmit?: () => boolean | void;
10
- /** Custom action to perform when the user clicks the search button
11
+ onSubmit?: (value: string) => boolean | void;
12
+ /**
13
+ * Custom action to perform when the user clicks the search button.
11
14
  *
12
- * Return `true` to __allow__ the browser's default submit hehavior
15
+ * Return `true` to __allow__ the browser's default submit hehavior.
13
16
  *
14
- * Defaults to `onSearch`
17
+ * Defaults to `onSubmit`.
15
18
  */
16
- onButtonClick?: () => boolean | void;
19
+ onButtonClick?: (value: string) => boolean | void;
20
+ /**
21
+ * Toggle the search `<button/>`.
22
+ *
23
+ * Defaults to `true`.
24
+ */
25
+ button?: boolean;
17
26
  buttonText?: string;
18
27
  } & InputElmProps;
19
- export declare const SiteSearchInput: React.ForwardRefExoticComponent<Pick<SiteSearchInputProps, "form" | "label" | "slot" | "style" | "title" | "key" | "list" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "step" | "value" | "pattern" | "name" | "wrapperProps" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "size" | "src" | "multiple" | "alt" | "ssr" | "accept" | "autoComplete" | "capture" | "checked" | "crossOrigin" | "enterKeyHint" | "height" | "max" | "maxLength" | "min" | "minLength" | "width" | "onButtonClick" | "buttonText"> & React.RefAttributes<HTMLInputElement>>;
28
+ export declare const SiteSearchInput: (props: SiteSearchInputProps) => JSX.Element;
20
29
  export default SiteSearchInput;