@redneckz/wildless-cms-uni-blocks 0.14.945 → 0.14.947

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 (73) hide show
  1. package/bundle/bundle.umd.js +6 -6
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/ui-kit/SearchBar/SearchBar.d.ts +2 -1
  4. package/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +2 -0
  5. package/dist/components/Footer/renderLogoSearchBar.js +2 -2
  6. package/dist/components/Footer/renderLogoSearchBar.js.map +1 -1
  7. package/dist/ui-kit/SearchBar/SearchBar.d.ts +2 -1
  8. package/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  9. package/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  10. package/dist/ui-kit/SearchDialog/SearchDialog.d.ts +2 -0
  11. package/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
  12. package/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  13. package/fonts/notosanssc/notosanssc.css +32 -0
  14. package/fonts/notosanssc/notosansscbold.ttf +0 -0
  15. package/fonts/notosanssc/notosansscbold.woff +0 -0
  16. package/fonts/notosanssc/notosansscbold.woff2 +0 -0
  17. package/fonts/notosanssc/notosanssclight.ttf +0 -0
  18. package/fonts/notosanssc/notosanssclight.woff +0 -0
  19. package/fonts/notosanssc/notosanssclight.woff2 +0 -0
  20. package/fonts/notosanssc/notosansscmedium.ttf +0 -0
  21. package/fonts/notosanssc/notosansscmedium.woff +0 -0
  22. package/fonts/notosanssc/notosansscmedium.woff2 +0 -0
  23. package/fonts/notosanssc/notosansscregular.ttf +0 -0
  24. package/fonts/notosanssc/notosansscregular.woff +0 -0
  25. package/fonts/notosanssc/notosansscregular.woff2 +0 -0
  26. package/lib/common.css +1 -1
  27. package/lib/components/Footer/renderLogoSearchBar.js +2 -2
  28. package/lib/components/Footer/renderLogoSearchBar.js.map +1 -1
  29. package/lib/ui-kit/SearchBar/SearchBar.d.ts +2 -1
  30. package/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  31. package/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  32. package/lib/ui-kit/SearchDialog/SearchDialog.d.ts +2 -0
  33. package/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
  34. package/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  35. package/mobile/bundle/bundle.umd.js +1 -1
  36. package/mobile/bundle/bundle.umd.min.js +1 -1
  37. package/mobile/bundle/ui-kit/SearchBar/SearchBar.d.ts +2 -1
  38. package/mobile/bundle/ui-kit/SearchDialog/SearchDialog.d.ts +2 -0
  39. package/mobile/dist/ui-kit/SearchBar/SearchBar.d.ts +2 -1
  40. package/mobile/dist/ui-kit/SearchBar/SearchBar.js +1 -1
  41. package/mobile/dist/ui-kit/SearchBar/SearchBar.js.map +1 -1
  42. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.d.ts +2 -0
  43. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js +2 -2
  44. package/mobile/dist/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  45. package/mobile/fonts/notosanssc/notosanssc.css +32 -0
  46. package/mobile/fonts/notosanssc/notosansscbold.ttf +0 -0
  47. package/mobile/fonts/notosanssc/notosansscbold.woff +0 -0
  48. package/mobile/fonts/notosanssc/notosansscbold.woff2 +0 -0
  49. package/mobile/fonts/notosanssc/notosanssclight.ttf +0 -0
  50. package/mobile/fonts/notosanssc/notosanssclight.woff +0 -0
  51. package/mobile/fonts/notosanssc/notosanssclight.woff2 +0 -0
  52. package/mobile/fonts/notosanssc/notosansscmedium.ttf +0 -0
  53. package/mobile/fonts/notosanssc/notosansscmedium.woff +0 -0
  54. package/mobile/fonts/notosanssc/notosansscmedium.woff2 +0 -0
  55. package/mobile/fonts/notosanssc/notosansscregular.ttf +0 -0
  56. package/mobile/fonts/notosanssc/notosansscregular.woff +0 -0
  57. package/mobile/fonts/notosanssc/notosansscregular.woff2 +0 -0
  58. package/mobile/lib/common.css +1 -1
  59. package/mobile/lib/ui-kit/SearchBar/SearchBar.d.ts +2 -1
  60. package/mobile/lib/ui-kit/SearchBar/SearchBar.js +1 -1
  61. package/mobile/lib/ui-kit/SearchBar/SearchBar.js.map +1 -1
  62. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.d.ts +2 -0
  63. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js +2 -2
  64. package/mobile/lib/ui-kit/SearchDialog/SearchDialog.js.map +1 -1
  65. package/mobile/src/common.css +1 -0
  66. package/mobile/src/ui-kit/SearchBar/SearchBar.tsx +3 -1
  67. package/mobile/src/ui-kit/SearchDialog/SearchDialog.tsx +39 -28
  68. package/package.json +2 -1
  69. package/src/common.css +1 -0
  70. package/src/components/Footer/renderLogoSearchBar.tsx +7 -2
  71. package/src/ui-kit/SearchBar/SearchBar.tsx +3 -1
  72. package/src/ui-kit/SearchDialog/SearchDialog.tsx +39 -28
  73. package/tailwind.config.cjs +1 -1
@@ -5,14 +5,19 @@ import { SearchBar } from '../../ui-kit/SearchBar/SearchBar';
5
5
  import { LEFT_COLUMN_STYLE } from './leftColumnStyle';
6
6
 
7
7
  export const renderLogoSearchBar = (common?: CommonData, navigationItems?: TopMenuItemProps[]) => {
8
- const { logo } = common ?? {};
8
+ const { logo, search } = common ?? {};
9
9
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
10
10
  const { dataHeader, dataFooter, ...logoProps } = logo ?? {};
11
11
 
12
12
  return (
13
13
  <div className="flex items-stretch gap-3xl">
14
14
  <Logo className={LEFT_COLUMN_STYLE} logo={logoProps} data={dataFooter} showTitle={false} />
15
- <SearchBar className="grow" navigationItems={navigationItems} {...common} />
15
+ <SearchBar
16
+ className="grow"
17
+ navigationItems={navigationItems}
18
+ placeholder={search?.placeholder}
19
+ {...common}
20
+ />
16
21
  </div>
17
22
  );
18
23
  };
@@ -3,13 +3,14 @@ import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type SearchHeaderProps } from '../../data/CommonData';
4
4
  import { type TopMenuItemProps } from '../../data/NavigationData';
5
5
  import { type ComponentType } from '../../model/ComponentType';
6
+ import { type PlaceholderProps } from '../../model/PlaceholderProps';
6
7
  import { style } from '../../utils/style';
7
8
  import { CloseButton } from '../DialogManager/CloseButton';
8
9
  import { useDialog } from '../DialogManager/useDialog';
9
10
  import { SearchDialog } from '../SearchDialog/SearchDialog';
10
11
  import { SearchInput } from '../SearchDialog/SearchInput';
11
12
 
12
- interface SearchBarProps extends ComponentType {
13
+ interface SearchBarProps extends ComponentType, PlaceholderProps {
13
14
  search?: SearchHeaderProps;
14
15
  navigationItems?: TopMenuItemProps[];
15
16
  }
@@ -38,6 +39,7 @@ export const SearchBar = JSX<SearchBarProps>(({ className, search, ...rest }) =>
38
39
  value={value}
39
40
  placeholder={search?.placeholder}
40
41
  onChange={handleInitialInputChange}
42
+ {...rest}
41
43
  />
42
44
  <CloseButton className="absolute top-0 right-0 sm:hidden" onClose={resetQueryOnDialogClose} />
43
45
  </div>
@@ -1,5 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
+ import type { SearchHeaderProps } from '../../data/CommonData';
3
4
  import { type TopMenuItemProps } from '../../data/NavigationData';
4
5
  import { env } from '../../Env';
5
6
  import { type LinkProps } from '../../model/LinkProps';
@@ -15,38 +16,48 @@ import { SearchInput } from './SearchInput';
15
16
  export interface SearchDialogProps extends OnCloseProps {
16
17
  initialQuery?: string;
17
18
  navigationItems?: TopMenuItemProps[];
19
+ search?: SearchHeaderProps;
18
20
  }
19
21
 
20
22
  const IS_SINGLE_SEARCH_INDEX = Boolean(env.SINGLE_SEARCH_INDEX);
21
23
 
22
- export const SearchDialog = JSX<SearchDialogProps>(({ initialQuery, navigationItems, onClose }) => {
23
- const basePath = getBasePath(env.SITE_URL);
24
-
25
- const basePathList = useMemo(
26
- () => (IS_SINGLE_SEARCH_INDEX ? [basePath] : navigationItems?.map((_) => _.href || '/')),
27
- [navigationItems],
28
- );
29
-
30
- const [searchResult, searchInputProps] = useSearch({
31
- basePathList,
32
- initialQuery,
33
- });
34
-
35
- const searchItems = useMemo(
36
- () => combineTopItemsAndSearchResult(navigationItems)(searchResult),
37
- [navigationItems, searchResult],
38
- );
39
-
40
- return (
41
- <Dialog
42
- maxWidth="none"
43
- head={<SearchInput className="mt-s" autoFocus={true} {...searchInputProps} />}
44
- onClose={onClose}
45
- >
46
- <Sitemap navigationItems={searchItems} isSearchPanel={true} />
47
- </Dialog>
48
- );
49
- });
24
+ export const SearchDialog = JSX<SearchDialogProps>(
25
+ ({ initialQuery, navigationItems, onClose, search }) => {
26
+ const basePath = getBasePath(env.SITE_URL);
27
+
28
+ const basePathList = useMemo(
29
+ () => (IS_SINGLE_SEARCH_INDEX ? [basePath] : navigationItems?.map((_) => _.href || '/')),
30
+ [navigationItems],
31
+ );
32
+
33
+ const [searchResult, searchInputProps] = useSearch({
34
+ basePathList,
35
+ initialQuery,
36
+ });
37
+
38
+ const searchItems = useMemo(
39
+ () => combineTopItemsAndSearchResult(navigationItems)(searchResult),
40
+ [navigationItems, searchResult],
41
+ );
42
+
43
+ return (
44
+ <Dialog
45
+ maxWidth="none"
46
+ head={
47
+ <SearchInput
48
+ className="mt-s"
49
+ autoFocus={true}
50
+ placeholder={search?.placeholder}
51
+ {...searchInputProps}
52
+ />
53
+ }
54
+ onClose={onClose}
55
+ >
56
+ <Sitemap navigationItems={searchItems} isSearchPanel={true} />
57
+ </Dialog>
58
+ );
59
+ },
60
+ );
50
61
 
51
62
  const combineTopItemsAndSearchResult =
52
63
  (topItems: TopMenuItemProps[] | undefined) =>
@@ -67,7 +67,7 @@ module.exports = {
67
67
  },
68
68
  flexShrink: { '1/2': '0.5' },
69
69
  fontFamily: {
70
- sans: ['Ubuntu', ...defaultTheme.fontFamily.sans],
70
+ sans: ['Ubuntu', 'NotoSansSC', ...defaultTheme.fontFamily.sans],
71
71
  mohave: ['Mohave', ...defaultTheme.fontFamily.sans],
72
72
  },
73
73
  fontSize: {