@netlify/spark-ui 1.6.0 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/assets/AskNetlify.css +1 -0
  2. package/dist/assets/SearchHeading.css +1 -1
  3. package/dist/assets/SearchLink.css +1 -1
  4. package/dist/assets/SearchModal.css +1 -1
  5. package/dist/components/preact/AskNetlify/AskNetlify.d.ts +7 -0
  6. package/dist/components/preact/AskNetlify/AskNetlify.js +20 -0
  7. package/dist/components/preact/AskNetlify/components/BackButton.d.ts +5 -0
  8. package/dist/components/preact/AskNetlify/components/BackButton.js +20 -0
  9. package/dist/components/preact/AskNetlify/components/ChatInterface.d.ts +7 -0
  10. package/dist/components/preact/AskNetlify/components/ChatInterface.js +53 -0
  11. package/dist/components/preact/AskNetlify/components/ChatMessages.d.ts +3 -0
  12. package/dist/components/preact/AskNetlify/components/ChatMessages.js +19 -0
  13. package/dist/components/preact/AskNetlify/components/QuestionList/QuestionList.d.ts +4 -0
  14. package/dist/components/preact/AskNetlify/components/QuestionList/QuestionList.js +23 -0
  15. package/dist/components/preact/AskNetlify/components/QuestionList/questions.d.ts +1 -0
  16. package/dist/components/preact/AskNetlify/components/QuestionList/questions.js +10 -0
  17. package/dist/components/preact/Icon/index.d.ts +2 -2
  18. package/dist/components/preact/Icon/index.js +108 -72
  19. package/dist/components/preact/SearchModal/components/SearchInput.d.ts +2 -0
  20. package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.d.ts +1 -1
  21. package/dist/components/preact/SearchModal/components/SearchLink/SearchLink.js +34 -16
  22. package/dist/components/preact/SearchModal/components/SearchModal/SearchModal.js +76 -53
  23. package/dist/components/preact/SearchModal/components/SearchWindow.d.ts +1 -1
  24. package/dist/components/preact/SearchModal/components/SearchWindow.js +49 -29
  25. package/dist/components/preact/SearchModal/hooks/useKeyboardNav.js +6 -6
  26. package/dist/components/preact/SearchModal/hooks/useSearchToggles.d.ts +3 -1
  27. package/dist/components/preact/SearchModal/hooks/useSearchToggles.js +13 -10
  28. package/dist/components/preact/SearchModal/types/search.types.d.ts +6 -1
  29. package/dist/components/preact/SpriteIcon/index.d.ts +7 -0
  30. package/dist/components/preact/SpriteIcon/index.js +7 -0
  31. package/dist/components/preact/index.d.ts +1 -0
  32. package/dist/components/preact/index.js +6 -4
  33. package/dist/utils/theme.d.ts +3 -0
  34. package/package.json +4 -1
  35. package/packages/components/Ticker.astro +29 -18
  36. package/packages/components/TrustBarTicker.astro +26 -0
  37. package/packages/components/TrustBarTickerItem.astro +54 -0
  38. package/packages/components/preact/AskNetlify/AskNetlify.css +282 -0
  39. package/packages/components/preact/AskNetlify/AskNetlify.tsx +22 -0
  40. package/packages/components/preact/AskNetlify/components/BackButton.tsx +19 -0
  41. package/packages/components/preact/AskNetlify/components/ChatInterface.tsx +79 -0
  42. package/packages/components/preact/AskNetlify/components/ChatMessages.tsx +33 -0
  43. package/packages/components/preact/AskNetlify/components/QuestionList/QuestionList.tsx +27 -0
  44. package/packages/components/preact/AskNetlify/components/QuestionList/questions.ts +10 -0
  45. package/packages/components/preact/Icon/index.tsx +72 -53
  46. package/packages/components/preact/SearchModal/components/SearchHeading/SearchHeading.css +4 -3
  47. package/packages/components/preact/SearchModal/components/SearchInput.tsx +9 -7
  48. package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.css +20 -10
  49. package/packages/components/preact/SearchModal/components/SearchLink/SearchLink.tsx +27 -7
  50. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.css +68 -29
  51. package/packages/components/preact/SearchModal/components/SearchModal/SearchModal.tsx +59 -30
  52. package/packages/components/preact/SearchModal/components/SearchWindow.tsx +34 -18
  53. package/packages/components/preact/SearchModal/hooks/useKeyboardNav.ts +2 -2
  54. package/packages/components/preact/SearchModal/hooks/useSearchToggles.ts +11 -3
  55. package/packages/components/preact/SearchModal/types/search.types.tsx +5 -2
  56. package/packages/components/preact/SpriteIcon/index.tsx +13 -0
  57. package/packages/components/preact/index.ts +1 -0
  58. package/packages/styles/tokens.css +72 -24
  59. package/packages/utils/theme.ts +16 -0
@@ -7,92 +7,93 @@ type Props = {
7
7
  export default function Icon(props: Props) {
8
8
  const IconPath = iconPathMap[props.name];
9
9
 
10
+ if (!IconPath) return;
11
+
10
12
  return (
11
- <svg data-icon={props.name} viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
12
- <IconPath />
13
+ <svg
14
+ id={`icon-${props.name}`}
15
+ data-icon={props.name}
16
+ viewBox="0 0 16 16"
17
+ fill="none"
18
+ xmlns="http://www.w3.org/2000/svg"
19
+ {...props}
20
+ >
21
+ <IconPath />;
13
22
  </svg>
14
23
  );
15
24
  }
16
25
 
17
- const SearchIcon: FunctionComponent = () => {
18
- return (
19
- <path
20
- d="M8.5328 26.6769C8.5328 16.6562 16.6562 8.5328 26.6769 8.5328C36.6977 8.5328 44.8211 16.6562 44.8211 26.6769C44.8211 36.6977 36.6977 44.8211 26.6769 44.8211C16.6562 44.8211 8.5328 36.6977 8.5328 26.6769ZM26.6769 0C11.9437 0 0 11.9437 0 26.6769C0 41.4102 11.9437 53.3539 26.6769 53.3539C32.5038 53.3539 37.8943 51.4858 42.2822 48.3158L56.7168 62.7504C58.3829 64.4165 61.0843 64.4165 62.7504 62.7504C64.4165 61.0843 64.4165 58.3829 62.7504 56.7168L48.3158 42.2822C51.4858 37.8943 53.3539 32.5038 53.3539 26.6769C53.3539 11.9437 41.4102 0 26.6769 0Z"
21
- fill="currentColor"
22
- />
23
- );
24
- };
25
-
26
- const SparklesIcon: FunctionComponent = () => {
27
- return (
28
- <path
29
- d="M45.264 17.719L37.08 15.439C35.64 14.987 35.64 13.011 37.08 12.631L45.264 10.275C45.4922 10.1958 45.6994 10.0656 45.8699 9.89446C46.0404 9.72329 46.1697 9.51555 46.248 9.287L48.6 1.083C49.052 -0.361 51.024 -0.361 51.4 1.083L53.676 9.287C53.7543 9.51555 53.8836 9.72329 54.0541 9.89446C54.2246 10.0656 54.4318 10.1958 54.66 10.275L62.92 12.635C64.36 13.087 64.36 15.063 62.92 15.443L54.736 17.723C54.5078 17.8022 54.3006 17.9324 54.1301 18.1035C53.9596 18.2747 53.8303 18.4824 53.752 18.711L51.4 26.915C50.948 28.359 48.976 28.359 48.6 26.915L46.248 18.711C46.1694 18.4826 46.0401 18.275 45.8696 18.1039C45.6992 17.9327 45.4921 17.8025 45.264 17.723V17.719ZM29.36 33.663L42.348 37.615C44.536 38.271 44.536 41.643 42.424 42.383L29.436 46.335C29.0506 46.4707 28.7043 46.6988 28.4274 46.9994C28.1506 47.2999 27.9516 47.6637 27.848 48.059L24.224 62.211C24.1201 62.7151 23.8456 63.1679 23.4466 63.4931C23.0476 63.8182 22.5487 63.9958 22.034 63.9958C21.5193 63.9958 21.0204 63.8182 20.6214 63.4931C20.2224 63.1679 19.9479 62.7151 19.844 62.211L16.22 48.059C16.1164 47.6637 15.9174 47.2999 15.6406 46.9994C15.3637 46.6988 15.0174 46.4707 14.632 46.335L1.644 42.383C-0.548 41.727 -0.548 38.271 1.644 37.615L14.556 33.663C14.9414 33.5273 15.2877 33.2992 15.5646 32.9986C15.8414 32.6981 16.0404 32.3343 16.144 31.939L19.768 17.787C19.8719 17.2829 20.1464 16.8301 20.5454 16.5049C20.9444 16.1798 21.4433 16.0022 21.958 16.0022C22.4727 16.0022 22.9716 16.1798 23.3706 16.5049C23.7696 16.8301 24.0441 17.2829 24.148 17.787L27.772 31.939C28 32.759 28.604 33.419 29.36 33.663Z"
30
- fill="currentColor"
31
- />
32
- );
33
- };
34
-
35
- const NetlifyIcon: FunctionComponent = () => {
26
+ const AskNetlify: FunctionComponent = () => {
36
27
  return (
37
28
  <>
38
29
  <path
39
- d="M35.9844 32.8064H28.0101L27.3492 32.1231V23.877L28.0101 23.1936H35.9844L36.6452 23.877V32.1231L35.9844 32.8064Z"
30
+ id="ask-netlify-tick-3"
31
+ d="M9.26465 1.02094L9.31322 0.921348L10.0528 0.666687L10.1524 0.715259L10.5563 1.9638L10.2999 2.4895L10.195 2.52628L9.6685 2.26948L9.26465 1.02094Z"
40
32
  fill="currentColor"
41
33
  />
42
34
  <path
43
- d="M19.3916 45.233H18.7141L15.3322 41.7359V41.041L20.5022 35.6891L24.084 35.6948L24.5616 36.1829V39.8868L19.3916 45.233Z"
35
+ id="ask-netlify-tick-1"
36
+ d="M15.5915 3.11667L15.6942 3.15818L15.9999 3.8782L15.9584 3.98093L14.741 4.4709L14.1987 4.25179L14.1547 4.14977L14.3742 3.60663L15.5915 3.11667Z"
44
37
  fill="currentColor"
45
38
  />
46
39
  <path
47
- d="M15.3322 14.9647V14.2642L18.7141 10.767H19.3916L24.5616 16.1132V19.8113L24.084 20.3109H20.5022L15.3322 14.9647Z"
40
+ id="ask-netlify-tick-2"
41
+ d="M12.8306 0.944052L12.9353 0.907978L13.6384 1.25087L13.6744 1.35564L12.9408 2.91375L12.3877 3.10417L12.2876 3.05604L12.0969 2.50216L12.8306 0.944052Z"
48
42
  fill="currentColor"
49
43
  />
50
44
  <path
51
- d="M20.0913 30.9746H0.410933L0 30.5496V25.4504L0.410933 25.0254H20.0913L20.5022 25.4504V30.5496L20.0913 30.9746Z"
45
+ id="ask-netlify-eye-left"
46
+ d="M5.60625 10.7823C5.60625 11.421 5.09138 11.9387 4.45625 11.9387C3.82112 11.9387 3.30625 11.421 3.30625 10.7823C3.30625 10.1436 3.82112 9.62585 4.45625 9.62585C5.09138 9.62585 5.60625 10.1436 5.60625 10.7823Z"
52
47
  fill="currentColor"
53
48
  />
54
49
  <path
55
- d="M63.5891 30.9746H43.9087L43.4978 30.5496V25.4504L43.9087 25.0254H63.5891L64 25.4504V30.5496L63.5891 30.9746Z"
50
+ id="ask-netlify-eye-right"
51
+ d="M10.8777 11.9387C11.5129 11.9387 12.0277 11.421 12.0277 10.7823C12.0277 10.1436 11.5129 9.62585 10.8777 9.62585C10.2426 9.62585 9.72774 10.1436 9.72774 10.7823C9.72774 11.421 10.2426 11.9387 10.8777 11.9387Z"
56
52
  fill="currentColor"
57
53
  />
58
54
  <path
59
- d="M29.1263 15.6883V0.424938L29.5372 0H34.4684L34.8793 0.424938V15.6883L34.4684 16.1132H29.5372L29.1263 15.6883Z"
55
+ d="M8.41582 10.9491L8.43331 10.994L8.43337 11.2417L8.41589 11.2866L7.86046 12.4215L7.78018 12.4806H7.5763L7.49602 12.4215L6.91751 11.2866L6.90003 11.2417L6.89997 11.2114V10.994L6.91745 10.9491L7.55316 10.526H7.75704L8.41582 10.9491Z"
60
56
  fill="currentColor"
61
57
  />
62
58
  <path
63
- d="M29.1263 55.5751V40.3117L29.5372 39.8868H34.4684L34.8793 40.3117V55.5751L34.4684 56H29.5372L29.1263 55.5751Z"
59
+ fill-rule="evenodd"
60
+ clip-rule="evenodd"
61
+ d="M7.86997 4.00002C11.9918 4.00002 15.3333 6.70814 15.3333 10.853C15.3333 13.3274 13.3386 15.3334 10.878 15.3334H0V10.853C0 6.70814 3.34157 4.00002 7.46336 4.00002H7.86997ZM0.990302 10.5245C0.990302 8.69571 2.51537 7.15558 4.33747 7.15558C5.71877 7.15558 6.90206 7.9938 7.41504 9.19232C7.41751 9.1981 7.42291 9.20918 7.42291 9.20918H7.91072C7.91072 9.20918 7.91612 9.1981 7.91859 9.19232C8.43157 7.9938 9.61486 7.15558 10.9962 7.15558C12.8183 7.15558 14.3433 8.69571 14.3433 10.5245C14.3433 12.2311 12.9812 13.8499 11.447 13.8845H4.15184C2.38987 13.7867 0.990302 12.323 0.990302 10.5245Z"
64
62
  fill="currentColor"
65
63
  />
66
- <path
67
- d="M36.6452 32.1231L35.9844 32.8064H28.0101L27.3492 32.1231V23.877L28.0101 23.1936H35.9844L36.6452 23.877V32.1231ZM35.0452 24.7936H28.9492V31.2064H35.0452V24.7936ZM18.7141 45.233L15.3322 41.7359V41.041L20.5022 35.6891L24.084 35.6948L24.5616 36.1829V39.8868L19.3916 45.233H18.7141ZM22.9616 39.2397L19.0528 43.2816L17.2216 41.388L21.1802 37.2902L22.9616 37.293V39.2397ZM17.2193 14.6144L21.1807 18.7109H22.9616V16.7603L19.0528 12.7184L17.2193 14.6144ZM15.3322 14.2642L18.7141 10.767H19.3916L24.5616 16.1132V19.8113L24.084 20.3109H20.5022L15.3322 14.9647V14.2642ZM20.5022 30.5496L20.0913 30.9746H0.410933L0 30.5496V25.4504L0.410933 25.0254H20.0913L20.5022 25.4504V30.5496ZM18.9022 26.6254V29.3746H1.6V26.6254H18.9022ZM62.4 29.3746V26.6254H45.0978V29.3746H62.4ZM43.4978 30.5496V25.4504L43.9087 25.0254H63.5891L64 25.4504V30.5496L63.5891 30.9746H43.9087L43.4978 30.5496ZM30.7263 14.5132H33.2793V1.6H30.7263V14.5132ZM29.5372 0H34.4684L34.8793 0.424938V15.6883L34.4684 16.1132H29.5372L29.1263 15.6883V0.424938L29.5372 0ZM30.7263 54.4H33.2793V41.4868H30.7263V54.4ZM29.5372 39.8868H34.4684L34.8793 40.3117V55.5751L34.4684 56H29.5372L29.1263 55.5751V40.3117L29.5372 39.8868Z"
68
- fill="currentColor"
64
+ <rect
65
+ id="ask-netlify-eyelid-left"
66
+ x="3"
67
+ y="7.3"
68
+ width="3"
69
+ height="2"
70
+ fill="var(--search-bg-color, currentColor)"
71
+ />
72
+ <rect
73
+ id="ask-netlify-eyelid-right"
74
+ x="9.7"
75
+ y="7.3"
76
+ width="3"
77
+ height="2"
78
+ fill="var(--search-bg-color, currentColor)"
69
79
  />
70
80
  </>
71
81
  );
72
82
  };
73
83
 
74
- const BookIcon: FunctionComponent = () => {
75
- return (
76
- <path
77
- d="M0 11C0 4.925 4.925 0 11 0H49C52.8625 0 56 3.1375 56 7V43C56 45.7875 54.3625 48.2 52 49.325V58H53C54.6625 58 56 59.3375 56 61C56 62.6625 54.6625 64 53 64H10C4.475 64 0 59.525 0 54C0 53.6625 0.0125 53.325 0.05 53H0V11ZM10 50C7.7875 50 6 51.7875 6 54C6 56.2125 7.7875 58 10 58H46V50H10ZM6 44.8375C7.225 44.3 8.575 44 10 44H49C49.55 44 50 43.55 50 43V7C50 6.45 49.55 6 49 6H11C8.2375 6 6 8.2375 6 11V44.8375ZM19 14H41C42.6625 14 44 15.3375 44 17C44 18.6625 42.6625 20 41 20H19C17.3375 20 16 18.6625 16 17C16 15.3375 17.3375 14 19 14ZM19 24H41C42.6625 24 44 25.3375 44 27C44 28.6625 42.6625 30 41 30H19C17.3375 30 16 28.6625 16 27C16 25.3375 17.3375 24 19 24Z"
78
- fill="currentColor"
79
- />
80
- );
81
- };
82
-
83
- const PencilIcon: FunctionComponent = () => {
84
+ const SearchIcon: FunctionComponent = () => {
84
85
  return (
85
86
  <path
86
- d="M50.963 8.1111C50.1278 8.1111 49.3269 8.44286 48.7364 9.03338L9.92665 47.8431L8.44226 53.7807L14.3798 52.2963L53.1896 13.4865C53.482 13.1941 53.7139 12.847 53.8722 12.465C54.0304 12.0829 54.1118 11.6735 54.1118 11.26C54.1118 10.8465 54.0304 10.437 53.8722 10.0549C53.7139 9.67291 53.482 9.32578 53.1896 9.03338C52.8972 8.74098 52.55 8.50904 52.168 8.3508C51.786 8.19255 51.3765 8.1111 50.963 8.1111ZM43.7081 4.00507C45.6322 2.08096 48.2419 1 50.963 1C52.3103 1 53.6445 1.26538 54.8893 1.78099C56.1341 2.29661 57.2651 3.05235 58.2179 4.00507C59.1706 4.9578 59.9263 6.08884 60.4419 7.33364C60.9576 8.57844 61.2229 9.9126 61.2229 11.26C61.2229 12.6073 60.9576 13.9415 60.4419 15.1863C59.9263 16.4311 59.1706 17.5621 58.2179 18.5149L18.7117 58.021C18.2561 58.4767 17.6851 58.7999 17.0599 58.9562L4.41798 62.1167C3.20633 62.4196 1.9246 62.0646 1.04147 61.1815C0.158343 60.2983 -0.196675 59.0166 0.106235 57.805L3.26673 45.163C3.42302 44.5378 3.74629 43.9669 4.20196 43.5112L43.7081 4.00507ZM28.4445 58.6673C28.4445 56.7036 30.0364 55.1118 32 55.1118H60.4444C62.4081 55.1118 64 56.7036 64 58.6673C64 60.631 62.4081 62.2229 60.4444 62.2229H32C30.0364 62.2229 28.4445 60.631 28.4445 58.6673Z"
87
+ d="M12.3756 6.68667C12.3756 7.94156 11.9681 9.10077 11.2818 10.0413L14.7436 13.5052C15.0855 13.8469 15.0855 14.4019 14.7436 14.7437C14.4018 15.0854 13.8467 15.0854 13.5049 14.7437L10.043 11.2797C9.10235 11.9687 7.94292 12.3733 6.68778 12.3733C3.54583 12.3733 1 9.828 1 6.68667C1 3.54533 3.54583 1 6.68778 1C9.82973 1 12.3756 3.54533 12.3756 6.68667ZM6.68778 10.6236C7.20488 10.6236 7.71692 10.5218 8.19467 10.3239C8.67241 10.1261 9.1065 9.83607 9.47215 9.47049C9.83779 9.10491 10.1278 8.67091 10.3257 8.19326C10.5236 7.71561 10.6255 7.20367 10.6255 6.68667C10.6255 6.16966 10.5236 5.65772 10.3257 5.18007C10.1278 4.70242 9.83779 4.26842 9.47215 3.90284C9.1065 3.53726 8.67241 3.24727 8.19467 3.04942C7.71692 2.85158 7.20488 2.74974 6.68778 2.74974C6.17067 2.74974 5.65863 2.85158 5.18089 3.04942C4.70315 3.24727 4.26906 3.53726 3.90341 3.90284C3.53776 4.26842 3.24771 4.70242 3.04982 5.18007C2.85194 5.65772 2.75009 6.16966 2.75009 6.68667C2.75009 7.20367 2.85194 7.71561 3.04982 8.19326C3.24771 8.67091 3.53776 9.10491 3.90341 9.47049C4.26906 9.83607 4.70315 10.1261 5.18089 10.3239C5.65863 10.5218 6.17067 10.6236 6.68778 10.6236Z"
87
88
  fill="currentColor"
88
89
  />
89
90
  );
90
91
  };
91
92
 
92
- const CubeIcon: FunctionComponent = () => {
93
+ const BookIcon: FunctionComponent = () => {
93
94
  return (
94
95
  <path
95
- d="M50.963 8.1111C50.1278 8.1111 49.3269 8.44286 48.7364 9.03338L9.92665 47.8431L8.44226 53.7807L14.3798 52.2963L53.1896 13.4865C53.482 13.1941 53.7139 12.847 53.8722 12.465C54.0304 12.0829 54.1118 11.6735 54.1118 11.26C54.1118 10.8465 54.0304 10.437 53.8722 10.0549C53.7139 9.67291 53.482 9.32578 53.1896 9.03338C52.8972 8.74098 52.55 8.50904 52.168 8.3508C51.786 8.19255 51.3765 8.1111 50.963 8.1111ZM43.7081 4.00507C45.6322 2.08096 48.2419 1 50.963 1C52.3103 1 53.6445 1.26538 54.8893 1.78099C56.1341 2.29661 57.2651 3.05235 58.2179 4.00507C59.1706 4.9578 59.9263 6.08884 60.4419 7.33364C60.9576 8.57844 61.2229 9.9126 61.2229 11.26C61.2229 12.6073 60.9576 13.9415 60.4419 15.1863C59.9263 16.4311 59.1706 17.5621 58.2179 18.5149L18.7117 58.021C18.2561 58.4767 17.6851 58.7999 17.0599 58.9562L4.41798 62.1167C3.20633 62.4196 1.9246 62.0646 1.04147 61.1815C0.158343 60.2983 -0.196675 59.0166 0.106235 57.805L3.26673 45.163C3.42302 44.5378 3.74629 43.9669 4.20196 43.5112L43.7081 4.00507ZM28.4445 58.6673C28.4445 56.7036 30.0364 55.1118 32 55.1118H60.4444C62.4081 55.1118 64 56.7036 64 58.6673C64 60.631 62.4081 62.2229 60.4444 62.2229H32C30.0364 62.2229 28.4445 60.631 28.4445 58.6673Z"
96
+ d="M4.57143 1C3.15179 1 2 2.17578 2 3.625V12.375C2 13.8242 3.15179 15 4.57143 15H12.2857H13.1429C13.617 15 14 14.609 14 14.125C14 13.641 13.617 13.25 13.1429 13.25V11.5C13.617 11.5 14 11.109 14 10.625V1.875C14 1.39102 13.617 1 13.1429 1H12.2857H4.57143ZM4.57143 11.5H11.4286V13.25H4.57143C4.09732 13.25 3.71429 12.859 3.71429 12.375C3.71429 11.891 4.09732 11.5 4.57143 11.5ZM5.42857 4.9375C5.42857 4.69687 5.62143 4.5 5.85714 4.5H11C11.2357 4.5 11.4286 4.69687 11.4286 4.9375C11.4286 5.17813 11.2357 5.375 11 5.375H5.85714C5.62143 5.375 5.42857 5.17813 5.42857 4.9375ZM5.85714 6.25H11C11.2357 6.25 11.4286 6.44687 11.4286 6.6875C11.4286 6.92813 11.2357 7.125 11 7.125H5.85714C5.62143 7.125 5.42857 6.92813 5.42857 6.6875C5.42857 6.44687 5.62143 6.25 5.85714 6.25Z"
96
97
  fill="currentColor"
97
98
  />
98
99
  );
@@ -101,7 +102,7 @@ const CubeIcon: FunctionComponent = () => {
101
102
  const CaretRightIcon: FunctionComponent = () => {
102
103
  return (
103
104
  <path
104
- d="M44.0011 24.0013L51.9987 31.9989L52.0008 32.0011L20.0018 64L12.0021 56.0003L36.0013 32.0011L12 7.99974L19.9997 0L44.0011 24.0013Z"
105
+ d="M11.7071 7.29399C12.0976 7.68448 12.0976 8.31864 11.7071 8.70914L5.70826 14.7071C5.31771 15.0976 4.68346 15.0976 4.29291 14.7071C3.90236 14.3166 3.90236 13.6825 4.29291 13.292L9.58563 8L4.29604 2.70802C3.90549 2.31753 3.90549 1.68336 4.29604 1.29287C4.68658 0.902376 5.32084 0.902376 5.71138 1.29287L11.7102 7.29086L11.7071 7.29399Z"
105
106
  fill="currentColor"
106
107
  />
107
108
  );
@@ -119,12 +120,29 @@ const RSSIcon: FunctionComponent = () => {
119
120
  const CommentIcon: FunctionComponent = () => {
120
121
  return (
121
122
  <path
122
- d="M15.4623 44.9025C17.0744 43.7277 19.1614 43.4278 21.0359 44.1027C24.3475 45.3024 28.0591 45.9897 32.0081 45.9897C47.5917 45.9897 58.0015 35.9295 58.0015 25.9942C58.0015 16.0589 47.5917 5.99866 32.0081 5.99866C16.4246 5.99866 6.01468 16.0589 6.01468 25.9942C6.01468 29.9933 7.56429 33.8424 10.4761 37.1417C11.5508 38.3539 12.0756 39.9536 11.9507 41.5782C11.7757 43.8402 11.2384 45.9148 10.5385 47.7518C12.663 46.7646 14.4251 45.6648 15.4623 44.915V44.9025ZM2.66553 49.9763C2.89048 49.6389 3.10292 49.3015 3.30287 48.9641C4.55255 46.8895 5.73975 44.1651 5.97719 41.1033C2.22814 36.8418 0.0162028 31.6304 0.0162028 25.9942C0.0162028 11.6349 14.3376 0 32.0081 0C49.6786 0 64 11.6349 64 25.9942C64 40.3535 49.6786 51.9884 32.0081 51.9884C27.3718 51.9884 22.9729 51.1886 18.9989 49.7514C17.5118 50.8387 15.0874 52.3258 12.2131 53.5755C10.3261 54.4004 8.17664 55.1502 5.9522 55.5876C5.85222 55.6126 5.75225 55.6251 5.65228 55.6501C5.10241 55.7501 4.56505 55.8375 4.00269 55.8875C3.9777 55.8875 3.94021 55.9 3.91522 55.9C3.27788 55.9625 2.64054 56 2.0032 56C1.19091 56 0.466089 55.5126 0.153668 54.7628C-0.158753 54.0129 0.0162028 53.1631 0.57856 52.5883C1.09093 52.0634 1.55331 51.501 1.9907 50.9011C2.20315 50.6137 2.4031 50.3263 2.59055 50.0388L2.62804 49.9763H2.66553Z"
123
+ d="M15 7.57143C15 10.6491 11.8666 13.1429 8.00041 13.1429C6.98601 13.1429 6.02357 12.9714 5.15409 12.6634C4.82871 12.8964 4.29828 13.2152 3.66941 13.483C3.01319 13.7616 2.22301 14 1.43829 14C1.26056 14 1.10198 13.8955 1.03362 13.7348C0.965266 13.5741 1.00355 13.392 1.12658 13.2688L1.13479 13.2607C1.14299 13.2527 1.15393 13.242 1.17033 13.2232C1.20041 13.1911 1.24689 13.1402 1.30431 13.0705C1.41641 12.9366 1.56679 12.7384 1.71991 12.492C1.99333 12.0473 2.25308 11.4634 2.30503 10.8071C1.48477 9.89643 1.00081 8.77946 1.00081 7.57143C1.00081 4.49375 4.13422 2 8.00041 2C11.8666 2 15 4.49375 15 7.57143Z"
123
124
  fill="currentColor"
124
125
  />
125
126
  );
126
127
  };
127
128
 
129
+ const LightbulbIcon: FunctionComponent = () => {
130
+ return (
131
+ <>
132
+ <path
133
+ fill-rule="evenodd"
134
+ clip-rule="evenodd"
135
+ d="M4.04938 8.73798C3.2407 7.81172 2.75 6.59946 2.75 5.27071C2.75 2.48473 4.94068 0.00930912 7.98359 2.55322e-05C10.8908 -0.00895859 13.25 2.35416 13.25 5.27071C13.25 6.59946 12.7593 7.81172 11.9506 8.73798C11.4578 9.30248 10.687 10.9818 10.3932 11.9766L10.3899 12H5.61006L5.60678 11.9766C5.31295 10.9818 4.54216 9.30248 4.04938 8.73798ZM8.34274 2.03953C8.42611 2.41703 8.18767 2.79064 7.81017 2.87402C6.80315 3.09642 6.06073 3.89938 5.85994 4.87157C5.78174 5.25018 5.41143 5.49371 5.03282 5.41552C4.65421 5.33732 4.41068 4.96701 4.48888 4.5884C4.79524 3.10505 5.93379 1.85468 7.50825 1.50696C7.88575 1.42359 8.25936 1.66203 8.34274 2.03953Z"
136
+ fill="currentColor"
137
+ />
138
+ <path
139
+ d="M5.76932 14.9479C5.67636 14.81 5.62681 14.6478 5.62655 14.4823L5.62521 13.5L10.3752 13.5L10.3741 14.4823C10.374 14.648 10.3243 14.81 10.2314 14.9479L9.77614 15.6241C9.69838 15.7397 9.5929 15.8345 9.46909 15.9001C9.34529 15.9657 9.207 16 9.06653 16L6.93417 16C6.7937 16 6.65541 15.9657 6.5316 15.9001C6.4078 15.8345 6.30232 15.7397 6.22455 15.6241L5.76932 14.9479Z"
140
+ fill="currentColor"
141
+ />
142
+ </>
143
+ );
144
+ };
145
+
128
146
  const LinkIcon: FunctionComponent = () => {
129
147
  return (
130
148
  <path
@@ -146,7 +164,7 @@ const CodeIcon: FunctionComponent = () => {
146
164
  const PageWithLinesIcon: FunctionComponent = () => {
147
165
  return (
148
166
  <path
149
- d="M8 58C6.9 58 6 57.1 6 56V8C6 6.9 6.9 6 8 6H28V16C28 18.2125 29.7875 20 32 20H42V56C42 57.1 41.1 58 40 58H8ZM8 0C3.5875 0 0 3.5875 0 8V56C0 60.4125 3.5875 64 8 64H40C44.4125 64 48 60.4125 48 56V19.3125C48 17.1875 47.1625 15.15 45.6625 13.65L34.3375 2.3375C32.8375 0.8375 30.8125 0 28.6875 0H8ZM15 32C13.3375 32 12 33.3375 12 35C12 36.6625 13.3375 38 15 38H33C34.6625 38 36 36.6625 36 35C36 33.3375 34.6625 32 33 32H15ZM15 44C13.3375 44 12 45.3375 12 47C12 48.6625 13.3375 50 15 50H33C34.6625 50 36 48.6625 36 47C36 45.3375 34.6625 44 33 44H15Z"
167
+ d="M4.83333 1C3.82214 1 3 1.78477 3 2.75V13.25C3 14.2152 3.82214 15 4.83333 15H12.1667C13.1779 15 14 14.2152 14 13.25V5.375H10.3333C9.8263 5.375 9.41667 4.98398 9.41667 4.5V1H4.83333ZM10.3333 1V4.5H14L10.3333 1ZM6.20833 8H10.7917C11.0438 8 11.25 8.19687 11.25 8.4375C11.25 8.67813 11.0438 8.875 10.7917 8.875H6.20833C5.95625 8.875 5.75 8.67813 5.75 8.4375C5.75 8.19687 5.95625 8 6.20833 8ZM6.20833 9.75H10.7917C11.0438 9.75 11.25 9.94687 11.25 10.1875C11.25 10.4281 11.0438 10.625 10.7917 10.625H6.20833C5.95625 10.625 5.75 10.4281 5.75 10.1875C5.75 9.94687 5.95625 9.75 6.20833 9.75ZM6.20833 11.5H10.7917C11.0438 11.5 11.25 11.6969 11.25 11.9375C11.25 12.1781 11.0438 12.375 10.7917 12.375H6.20833C5.95625 12.375 5.75 12.1781 5.75 11.9375C5.75 11.6969 5.95625 11.5 6.20833 11.5Z"
150
168
  fill="currentColor"
151
169
  />
152
170
  );
@@ -164,7 +182,9 @@ const TerminalIcon: FunctionComponent = () => {
164
182
  const QuestionIcon: FunctionComponent = () => {
165
183
  return (
166
184
  <path
167
- d="M8 20.0002C8 14.4752 12.475 10.0002 18 10.0002H22C27.525 10.0002 32 14.4752 32 20.0002V20.5752C32 23.5877 30.5 26.4002 27.9875 28.0627L21.45 32.4252C18.675 34.2752 17 37.4002 17 40.7502V41.0002C17 42.6627 18.3375 44.0002 20 44.0002C21.6625 44.0002 23 42.6627 23 41.0002V40.7502C23 39.4127 23.6625 38.1627 24.775 37.4252L31.3125 33.0627C35.4875 30.2752 37.9875 25.6002 37.9875 20.5877V20.0127C37.9875 11.1752 30.825 4.01271 21.9875 4.01271H17.9875C9.1625 4.00021 2 11.1627 2 20.0002C2 21.6627 3.3375 23.0002 5 23.0002C6.6625 23.0002 8 21.6627 8 20.0002ZM20 60.0002C21.0609 60.0002 22.0783 59.5788 22.8284 58.8286C23.5786 58.0785 24 57.0611 24 56.0002C24 54.9393 23.5786 53.9219 22.8284 53.1718C22.0783 52.4216 21.0609 52.0002 20 52.0002C18.9391 52.0002 17.9217 52.4216 17.1716 53.1718C16.4214 53.9219 16 54.9393 16 56.0002C16 57.0611 16.4214 58.0785 17.1716 58.8286C17.9217 59.5788 18.9391 60.0002 20 60.0002Z"
185
+ fill-rule="evenodd"
186
+ clip-rule="evenodd"
187
+ d="M15 8C15 11.866 11.866 15 8 15C4.13401 15 1 11.866 1 8C1 4.13401 4.13401 1 8 1C11.866 1 15 4.13401 15 8ZM7.48998 7.58293C7.24532 7.9418 7.1073 8.36489 7.09243 8.80158L7.09232 9.00062C7.09232 9.21263 7.17498 9.41595 7.32211 9.56587C7.46924 9.71578 7.6688 9.8 7.87688 9.8C8.08495 9.8 8.28451 9.71578 8.43164 9.56587C8.57878 9.41595 8.66143 9.21263 8.66143 9.00062V8.8172C8.67459 8.68789 8.72283 8.56481 8.80083 8.46179C8.82284 8.43271 8.87624 8.39281 8.96482 8.34893C9.04677 8.30834 9.13665 8.27475 9.21483 8.24583L9.2194 8.24414L9.22961 8.24053L9.23662 8.2376C9.7635 8.01739 10.1981 7.61624 10.4651 7.10372C10.7321 6.5912 10.8149 5.99957 10.6987 5.43153L10.6962 5.42197C10.5641 4.91215 10.2876 4.45323 9.90133 4.10235C9.51593 3.7523 9.03819 3.52522 8.52737 3.44924C8.1077 3.37054 7.67619 3.38633 7.26312 3.49553C6.849 3.605 6.46349 3.80568 6.13376 4.08342C5.58181 4.54443 5.25866 5.23048 5.25 5.95706V5.95934C5.25 6.17135 5.33266 6.37468 5.47979 6.52459C5.62692 6.6745 5.82648 6.75872 6.03456 6.75872C6.24264 6.75872 6.44219 6.6745 6.58933 6.52459C6.73595 6.37519 6.81855 6.17275 6.81911 5.96153C6.82486 5.70702 6.94287 5.46722 7.13988 5.30865C7.29566 5.18188 7.47721 5.09021 7.67067 5.04112C7.86413 4.99203 8.06566 4.98632 8.26159 5.02383L8.2716 5.02518C8.47683 5.05273 8.67003 5.13962 8.82831 5.27556C8.98372 5.40903 9.09909 5.5843 9.16133 5.78128C9.23237 6.20988 8.99652 6.63061 8.59639 6.78484L8.59136 6.78696C8.22065 6.94277 7.74615 7.20718 7.48998 7.58293ZM7.87406 12.6C8.42636 12.6 8.8741 12.1523 8.8741 11.6C8.8741 11.0477 8.42636 10.6 7.87406 10.6C7.32175 10.6 6.87402 11.0477 6.87402 11.6C6.87402 12.1523 7.32175 12.6 7.87406 12.6Z"
168
188
  fill="currentColor"
169
189
  />
170
190
  );
@@ -207,17 +227,18 @@ const YouTubeIcon: FunctionComponent = () => {
207
227
  };
208
228
 
209
229
  export type IconName =
230
+ | 'askNetlify'
210
231
  | 'book'
211
232
  | 'caretRight'
212
233
  | 'code'
213
234
  | 'comment'
214
235
  | 'cube'
236
+ | 'lightbulb'
215
237
  | 'link'
216
238
  | 'pageWithLines'
217
239
  | 'pencil'
218
240
  | 'rss'
219
241
  | 'search'
220
- | 'sparkles'
221
242
  | 'terminal'
222
243
  | 'question'
223
244
  | 'linkedin'
@@ -227,22 +248,20 @@ export type IconName =
227
248
  | 'youtube';
228
249
 
229
250
  const iconPathMap: Record<IconName, FunctionComponent> = {
251
+ askNetlify: AskNetlify,
230
252
  book: BookIcon,
231
253
  caretRight: CaretRightIcon,
232
254
  code: CodeIcon,
233
255
  comment: CommentIcon,
234
- cube: CubeIcon,
235
256
  link: LinkIcon,
257
+ lightbulb: LightbulbIcon,
236
258
  pageWithLines: PageWithLinesIcon,
237
- pencil: PencilIcon,
238
259
  rss: RSSIcon,
239
260
  search: SearchIcon,
240
- sparkles: SparklesIcon,
241
261
  terminal: TerminalIcon,
242
262
  question: QuestionIcon,
243
263
  bluesky: BlueSkyIcon,
244
264
  linkedin: LinkedInIcon,
245
- netlify: NetlifyIcon,
246
265
  twitter: TwitterIcon,
247
266
  youtube: YouTubeIcon,
248
267
  };
@@ -1,12 +1,13 @@
1
1
  .n-search-heading {
2
- --n-search-heading-weight: var(--font-weight-regular, 400);
3
- --n-search-heading-size: var(--font-size-text-sm, 13px);
2
+ --n-search-heading-weight: var(--font-weight-semibold, 400);
3
+ --n-search-heading-size: var(--font-size-text-xs, 13px);
4
4
  --n-search-heading-color: var(--color-text-weak, #757575);
5
5
 
6
6
  font-size: var(--n-search-heading-size);
7
7
  font-weight: var(--n-search-heading-weight);
8
+ font-family: var(--font-family-mono);
8
9
  color: var(--n-search-heading-color);
9
- padding-inline: 1rem;
10
+ padding-inline: var(--space-xs);
10
11
  margin-block: var(--space-xs);
11
12
  letter-spacing: 0.2px;
12
13
  }
@@ -6,20 +6,22 @@ interface Props {
6
6
  setSearchTerm: (term: string) => void;
7
7
  placeholder?: string;
8
8
  initialValue?: string;
9
+ isGeneratingAnswer?: boolean;
10
+ isPreparingAnswer?: boolean;
9
11
  }
10
12
 
11
13
  const SearchInput = (props: Props) => {
12
14
  const [value, setValue] = useState<string>('');
13
15
 
14
- const { reset, run } = useTimeout((query: string) => {
15
- props.setSearchTerm(query);
16
- }, 300);
17
-
18
- const handleInput = (e: InputEvent) => {
16
+ const { reset, run } = useTimeout((query: string) => {
17
+ props.setSearchTerm(query);
18
+ }, 300);
19
+
20
+ const handleInput = (e: InputEvent) => {
19
21
  const target = e.target as HTMLInputElement;
20
22
  setValue(target.value);
21
- reset()
22
- run(target.value)
23
+ reset();
24
+ run(target.value);
23
25
  };
24
26
 
25
27
  useEffect(() => {
@@ -1,6 +1,6 @@
1
1
  .n-search-link {
2
- --n-search-icon-size: 1em;
3
- all: unset;
2
+ --n-search-icon-size: 1.25em;
3
+ box-sizing: border-box;
4
4
  display: flex;
5
5
  justify-content: space-between;
6
6
  flex-wrap: wrap;
@@ -11,6 +11,11 @@
11
11
  font-weight: var(--font-weight-regular);
12
12
  text-decoration: none;
13
13
  cursor: pointer;
14
+ width: 100%;
15
+ border: none;
16
+ text-align: left;
17
+ outline: none;
18
+ border-radius: var(--radius-l);
14
19
  }
15
20
 
16
21
  .n-search-link-body {
@@ -20,17 +25,22 @@
20
25
  text-wrap: pretty;
21
26
  }
22
27
 
23
- .n-search-link:is(:hover, :focus-within) {
28
+ .n-search-link:is(:hover, :focus-visible) {
24
29
  background: var(--n-search-color-bg-2);
25
30
 
26
31
  & .n-search-link-icon [data-icon='caretRight'] {
27
- display: block;
32
+ opacity: 1;
33
+ }
34
+
35
+ & .n-search-link-icon :where(#ask-netlify-eyelid-left, #ask-netlify-eyelid-right) {
36
+ animation: askEyeBlink 4s infinite;
37
+ animation-delay: 500ms;
28
38
  }
29
39
  }
30
40
 
31
41
  .n-search-link-title {
32
42
  font-weight: var(--font-weight-medium);
33
- color: var(--color-text);
43
+ color: var(--color-text-1);
34
44
  line-height: 1.5;
35
45
  }
36
46
 
@@ -49,17 +59,17 @@
49
59
  background-color: var(--mark-bg, var(--color-highlight));
50
60
  }
51
61
 
52
- .n-search-link-icon {
62
+ .n-search-link-icon,
63
+ .n-search-link-icon svg {
53
64
  display: flex;
54
65
  width: var(--n-search-icon-size);
55
66
  height: var(--n-search-icon-size);
56
- color: var(--n-search-color-text-secondary);
67
+ color: var(--n-search-color-icon);
57
68
  }
58
69
 
59
70
  .n-search-link-icon [data-icon='caretRight'] {
60
- display: none;
61
- width: 0.8em;
62
- opacity: 0.3;
71
+ width: 1em;
72
+ opacity: 0;
63
73
  }
64
74
 
65
75
  .n-search-link-label {
@@ -4,20 +4,40 @@ import './SearchLink.css';
4
4
 
5
5
  import Icon from '../../../Icon';
6
6
 
7
- const SearchLink = ({ icon, label, url, excerpt, resource }: SearchLinkProps) => {
8
- const { handleClick } = useSearchLogger()
9
-
7
+ const SearchLink = ({
8
+ as: Component = 'a',
9
+ icon,
10
+ label,
11
+ url,
12
+ excerpt,
13
+ resource,
14
+ onClick,
15
+ }: SearchLinkProps) => {
16
+ const { handleClick: log } = useSearchLogger();
17
+
10
18
  return (
11
- <a className="n-search-link" href={url} onClick={handleClick}>
19
+ <Component
20
+ className="n-search-link"
21
+ href={url}
22
+ onClick={(e: Event) => {
23
+ onClick && onClick();
24
+ log(e);
25
+ }}
26
+ >
12
27
  {icon && (
13
28
  <span className="n-search-link-icon">
14
29
  <Icon name={icon} />
15
30
  </span>
16
31
  )}
17
32
  <div className="n-search-link-body">
18
-
19
33
  <p className="n-search-link-title">
20
- <span className="n-search-link-label">{label}</span> {resource && <span className="n-search-link-badge" data-resource={resource}>{resource}</span>}</p>
34
+ <span className="n-search-link-label">{label}</span>{' '}
35
+ {resource && (
36
+ <span className="n-search-link-badge" data-resource={resource}>
37
+ {resource}
38
+ </span>
39
+ )}
40
+ </p>
21
41
  {excerpt && (
22
42
  <p className="n-search-link-excerpt" dangerouslySetInnerHTML={{ __html: excerpt }} />
23
43
  )}
@@ -25,7 +45,7 @@ const SearchLink = ({ icon, label, url, excerpt, resource }: SearchLinkProps) =>
25
45
  <div className="n-search-link-icon">
26
46
  <Icon name="caretRight" />
27
47
  </div>
28
- </a>
48
+ </Component>
29
49
  );
30
50
  };
31
51
 
@@ -4,15 +4,19 @@
4
4
 
5
5
  /* Root Variables */
6
6
  .n-search-modal {
7
- --n-search-padding-inline: 0.5em;
8
- --n-search-color-text: var(--color-text, currentColor);
7
+ --n-search-padding-inline: var(--space-s);
8
+ --n-search-color-text: var(--color-text-1, currentColor);
9
9
  --n-search-color-text-secondary: var(--color-text-weak, currentColor);
10
+ --n-search-color-icon: var(--search-icon-color);
10
11
  --n-search-color-bg: var(--search-bg-color);
11
- --n-search-color-bg-2: var(--color-bg-2);
12
+ --n-search-color-bg-2: var(--color-bg-3);
12
13
  --n-search-color-border: var(--color-bg-3);
13
- --n-search-border-radius: 8px;
14
+ --n-search-border-radius: 1.3rem;
14
15
  --n-search-max-w: 600px;
15
16
  --n-search-text-highlight: var(--search-highlight-color);
17
+ --n-search-input-height: 50px;
18
+ --n-search-footer-height: 40px;
19
+ --n-search-container-height: min(50dvh, 26.5rem);
16
20
  }
17
21
 
18
22
  .n-search-modal {
@@ -21,13 +25,17 @@
21
25
  border-radius: var(--n-search-border-radius);
22
26
  width: min(var(--n-search-max-w), 100%);
23
27
  margin: auto;
28
+ background: var(--n-search-color-bg);
29
+ }
30
+
31
+ .n-search-modal-ask {
32
+ --n-search-max-w: 800px;
24
33
  }
25
34
 
26
35
  .n-search-container {
27
36
  --mark-bg: var(--n-search-text-highlight);
28
37
  display: grid;
29
38
  width: min(var(--n-search-max-w), 100%);
30
- min-height: 470px;
31
39
  background-color: var(--n-search-color-bg);
32
40
  border-radius: var(--n-search-border-radius);
33
41
  overflow: hidden;
@@ -43,16 +51,17 @@
43
51
  }
44
52
 
45
53
  .n-search-input-wrapper {
46
- all: unset;
54
+ position: relative;
47
55
  display: flex;
48
56
  width: 100%;
49
- border-bottom: 1px solid var(--n-search-color-border);
57
+ height: var(--n-search-input-height);
50
58
  }
51
59
 
52
60
  .n-search-input {
61
+ position: relative;
53
62
  display: inline-flex;
54
63
  box-sizing: border-box;
55
- background: var(--n-search-color-bg);
64
+ background: transparent;
56
65
  inline-size: 100%;
57
66
  padding-block: 0.75rem;
58
67
  padding-inline: var(--n-search-padding-inline);
@@ -60,16 +69,32 @@
60
69
  border: none;
61
70
  outline: none;
62
71
  font-size: 1rem;
63
- color: var(--color-text);
72
+ color: var(--color-text-1);
73
+ }
74
+
75
+ .n-search-input-wrapper::after,
76
+ .n-search-footer::after {
77
+ content: '';
78
+ display: block;
79
+ width: 200%;
80
+ height: 1px;
81
+ background: var(--n-search-color-border);
82
+ position: absolute;
83
+ bottom: 0;
84
+ left: 0;
64
85
  }
65
86
 
66
87
  .n-search-input::placeholder {
67
- color: var(--n-search-color-text);
88
+ color: var(--n-search-color-text-secondary);
89
+ }
90
+
91
+ .n-search-links {
92
+ padding: var(--space-2xs);
68
93
  }
69
94
 
70
95
  .n-search-label {
71
96
  display: flex;
72
- padding-inline: var(--n-search-padding-inline);
97
+ padding-inline-start: var(--n-search-padding-inline);
73
98
  align-items: center;
74
99
  }
75
100
 
@@ -80,8 +105,8 @@
80
105
 
81
106
  .n-search-icon {
82
107
  display: flex;
83
- width: var(--n-search-icon-size, 0.8em);
84
- height: var(--n-search-icon-size, 0.8em);
108
+ width: var(--n-search-icon-size, 1em);
109
+ height: var(--n-search-icon-size, 1em);
85
110
  color: var(--n-search-color-text-secondary);
86
111
  }
87
112
 
@@ -92,28 +117,26 @@
92
117
 
93
118
  /* Search Results */
94
119
  .n-search-window {
95
- height: 400px;
120
+ height: var(--n-search-container-height);
96
121
  overflow-x: hidden;
97
122
  overflow-y: auto;
98
123
  overscroll-behavior: contain;
124
+ scroll-padding-block: var(--space-s);
99
125
  margin-block: 0;
100
126
  background: var(--n-search-color-bg);
101
127
  }
102
128
 
103
- .n-results-list-item {
104
- border-bottom: 1px solid var(--color-bg-3);
105
- }
106
- .n-results-list-item:first-of-type {
107
- border-top: 1px solid var(--color-bg-3);
108
- }
109
-
110
129
  /* Footer */
111
130
  .n-search-footer {
112
- border-top: 1px solid var(--n-search-color-border);
113
- padding: var(--space-2xs) var(--space-s);
114
- background: var(--color-bg-2);
131
+ position: relative;
115
132
  display: flex;
116
133
  gap: var(--space-m);
134
+ padding: var(--space-2xs) var(--space-s);
135
+ height: var(--n-search-footer-height);
136
+ }
137
+
138
+ .n-search-footer::after {
139
+ top: 0;
117
140
  }
118
141
 
119
142
  .n-search-footer-tip {
@@ -128,7 +151,8 @@
128
151
  .n-search-modal {
129
152
  transition:
130
153
  display 0.2s allow-discrete,
131
- overlay 0.2s allow-discrete;
154
+ overlay 0.2s allow-discrete,
155
+ width 0.15s ease-in-out;
132
156
  animation: closeSearch 0.2s forwards;
133
157
  }
134
158
 
@@ -136,28 +160,43 @@
136
160
  animation: openSearch 0.2s forwards;
137
161
  }
138
162
 
163
+ .n-search-modal[data-state='search'] > * {
164
+ opacity: 0;
165
+ animation: appearContainer 120ms ease-in-out forwards;
166
+ animation-delay: 140ms;
167
+ }
168
+
169
+ @keyframes appearContainer {
170
+ 0% {
171
+ opacity: 0;
172
+ }
173
+ 100% {
174
+ opacity: 1;
175
+ }
176
+ }
177
+
139
178
  @keyframes openSearch {
140
179
  from {
141
180
  opacity: 0;
142
- transform: translateY(20px) scale(0.9);
181
+ transform: scale(0.9);
143
182
  }
144
183
  to {
145
184
  opacity: 1;
146
- transform: translateY(0px) scale(1);
185
+ transform: scale(1);
147
186
  }
148
187
  }
149
188
 
150
189
  @keyframes closeSearch {
151
190
  from {
152
191
  opacity: 1;
153
- transform: translateY(0px) scale(1);
192
+ transform: scale(1);
154
193
  }
155
194
  50% {
156
195
  opacity: 0.3;
157
196
  }
158
197
  to {
159
198
  opacity: 0;
160
- transform: translateY(20px) scale(0.9);
199
+ transform: scale(0.9);
161
200
  }
162
201
  }
163
202