@servicetitan/navigation 12.0.3 → 13.0.0-canary.256.5761ed1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/components/counter-tag.d.ts +1 -1
  2. package/dist/components/counter-tag.d.ts.map +1 -1
  3. package/dist/components/counter-tag.js.map +1 -1
  4. package/dist/components/profile-dropdown/interface.d.ts +55 -0
  5. package/dist/components/profile-dropdown/interface.d.ts.map +1 -0
  6. package/dist/components/profile-dropdown/interface.js.map +1 -0
  7. package/dist/components/profile-dropdown/profile-dropdown-legacy.stories.d.ts +13 -0
  8. package/dist/components/profile-dropdown/profile-dropdown-legacy.stories.d.ts.map +1 -0
  9. package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts +5 -1
  10. package/dist/components/profile-dropdown/profile-dropdown-stacked.stories.d.ts.map +1 -1
  11. package/dist/components/profile-dropdown/profile-dropdown.d.ts +9 -79
  12. package/dist/components/profile-dropdown/profile-dropdown.d.ts.map +1 -1
  13. package/dist/components/profile-dropdown/profile-dropdown.js +22 -22
  14. package/dist/components/profile-dropdown/profile-dropdown.js.map +1 -1
  15. package/dist/components/profile-dropdown/profile-dropdown.stories.d.ts +5 -1
  16. package/dist/components/profile-dropdown/profile-dropdown.stories.d.ts.map +1 -1
  17. package/dist/components/titan-layout/interface-internal.d.ts +12 -0
  18. package/dist/components/titan-layout/interface-internal.d.ts.map +1 -1
  19. package/dist/components/titan-layout/interface-internal.js.map +1 -1
  20. package/dist/components/titan-layout/interface.d.ts +66 -13
  21. package/dist/components/titan-layout/interface.d.ts.map +1 -1
  22. package/dist/components/titan-layout/interface.js.map +1 -1
  23. package/dist/components/titan-layout/layout-header-dark.d.ts.map +1 -1
  24. package/dist/components/titan-layout/layout-header-dark.js +21 -11
  25. package/dist/components/titan-layout/layout-header-dark.js.map +1 -1
  26. package/dist/components/titan-layout/layout-header-links-internal.d.ts +22 -3
  27. package/dist/components/titan-layout/layout-header-links-internal.d.ts.map +1 -1
  28. package/dist/components/titan-layout/layout-header-links-internal.js +15 -18
  29. package/dist/components/titan-layout/layout-header-links-internal.js.map +1 -1
  30. package/dist/components/titan-layout/layout-header-links.d.ts +3 -4
  31. package/dist/components/titan-layout/layout-header-links.d.ts.map +1 -1
  32. package/dist/components/titan-layout/layout-header-links.js +25 -5
  33. package/dist/components/titan-layout/layout-header-links.js.map +1 -1
  34. package/dist/components/titan-layout/layout-header.d.ts +2 -2
  35. package/dist/components/titan-layout/layout-header.d.ts.map +1 -1
  36. package/dist/components/titan-layout/layout-header.js.map +1 -1
  37. package/dist/components/titan-layout/layout-header.module.less +31 -0
  38. package/dist/components/titan-layout/layout-header.module.less.d.ts +2 -0
  39. package/dist/components/titan-layout/layout-profile.d.ts +8 -5
  40. package/dist/components/titan-layout/layout-profile.d.ts.map +1 -1
  41. package/dist/components/titan-layout/layout-profile.js +30 -28
  42. package/dist/components/titan-layout/layout-profile.js.map +1 -1
  43. package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts +48 -25
  44. package/dist/components/titan-layout/layout-sidebar-links-internal.d.ts.map +1 -1
  45. package/dist/components/titan-layout/layout-sidebar-links-internal.js +56 -52
  46. package/dist/components/titan-layout/layout-sidebar-links-internal.js.map +1 -1
  47. package/dist/components/titan-layout/layout-sidebar-links.d.ts +3 -3
  48. package/dist/components/titan-layout/layout-sidebar-links.d.ts.map +1 -1
  49. package/dist/components/titan-layout/layout-sidebar-links.js +33 -18
  50. package/dist/components/titan-layout/layout-sidebar-links.js.map +1 -1
  51. package/dist/components/titan-layout/layout-sidebar.d.ts.map +1 -1
  52. package/dist/components/titan-layout/layout-sidebar.js +49 -24
  53. package/dist/components/titan-layout/layout-sidebar.js.map +1 -1
  54. package/dist/components/titan-layout/titan-layout-default.stories.d.ts +16 -0
  55. package/dist/components/titan-layout/titan-layout-default.stories.d.ts.map +1 -0
  56. package/dist/components/titan-layout/titan-layout-legacy.stories.d.ts +10 -0
  57. package/dist/components/titan-layout/titan-layout-legacy.stories.d.ts.map +1 -0
  58. package/dist/components/titan-layout/titan-layout-links.d.ts +5 -0
  59. package/dist/components/titan-layout/titan-layout-links.d.ts.map +1 -0
  60. package/dist/components/titan-layout/titan-layout-links.js +34 -0
  61. package/dist/components/titan-layout/titan-layout-links.js.map +1 -0
  62. package/dist/components/titan-layout/titan-layout-stacked.stories.d.ts +10 -0
  63. package/dist/components/titan-layout/titan-layout-stacked.stories.d.ts.map +1 -0
  64. package/dist/components/titan-layout/titan-layout.d.ts +5 -4
  65. package/dist/components/titan-layout/titan-layout.d.ts.map +1 -1
  66. package/dist/components/titan-layout/titan-layout.js +10 -8
  67. package/dist/components/titan-layout/titan-layout.js.map +1 -1
  68. package/dist/index.d.ts +1 -6
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +0 -4
  71. package/dist/index.js.map +1 -1
  72. package/dist/test/data.d.ts +26 -23
  73. package/dist/test/data.d.ts.map +1 -1
  74. package/dist/test/data.js +26 -69
  75. package/dist/test/data.js.map +1 -1
  76. package/dist/test/titan-layout.d.ts +16 -0
  77. package/dist/test/titan-layout.d.ts.map +1 -0
  78. package/dist/test/titan-layout.js +21 -0
  79. package/dist/test/titan-layout.js.map +1 -0
  80. package/dist/utils/navigation-context.d.ts +3 -22
  81. package/dist/utils/navigation-context.d.ts.map +1 -1
  82. package/dist/utils/navigation-context.js +2 -10
  83. package/dist/utils/navigation-context.js.map +1 -1
  84. package/dist/utils/navigation.d.ts +2 -7
  85. package/dist/utils/navigation.d.ts.map +1 -1
  86. package/dist/utils/navigation.js.map +1 -1
  87. package/package.json +2 -2
  88. package/src/components/counter-tag.tsx +1 -1
  89. package/src/components/profile-dropdown/interface.ts +47 -0
  90. package/src/components/profile-dropdown/profile-dropdown-legacy.stories.tsx +25 -0
  91. package/src/components/profile-dropdown/profile-dropdown-stacked.stories.tsx +15 -7
  92. package/src/components/profile-dropdown/profile-dropdown.stories.tsx +50 -43
  93. package/src/components/profile-dropdown/profile-dropdown.tsx +39 -115
  94. package/src/components/titan-layout/interface-internal.ts +13 -0
  95. package/src/components/titan-layout/interface.ts +72 -16
  96. package/src/components/titan-layout/layout-header-dark.tsx +17 -4
  97. package/src/components/titan-layout/layout-header-links-internal.tsx +41 -54
  98. package/src/components/titan-layout/layout-header-links.tsx +65 -12
  99. package/src/components/titan-layout/layout-header.module.less +31 -0
  100. package/src/components/titan-layout/layout-header.module.less.d.ts +2 -0
  101. package/src/components/titan-layout/layout-header.tsx +2 -2
  102. package/src/components/titan-layout/layout-profile.tsx +53 -34
  103. package/src/components/titan-layout/layout-sidebar-links-internal.tsx +169 -116
  104. package/src/components/titan-layout/layout-sidebar-links.tsx +73 -24
  105. package/src/components/titan-layout/layout-sidebar.tsx +52 -28
  106. package/src/components/titan-layout/{titan-layout.stories.tsx → titan-layout-default.stories.tsx} +125 -113
  107. package/src/components/titan-layout/titan-layout-legacy.stories.tsx +24 -0
  108. package/src/components/titan-layout/titan-layout-links.tsx +34 -0
  109. package/src/components/titan-layout/titan-layout-stacked.stories.tsx +30 -0
  110. package/src/components/titan-layout/titan-layout.tsx +12 -9
  111. package/src/index.ts +1 -12
  112. package/src/test/data.tsx +31 -83
  113. package/src/test/titan-layout.tsx +34 -0
  114. package/src/utils/navigation-context.tsx +9 -35
  115. package/src/utils/navigation.ts +3 -10
  116. package/dist/components/header-navigation/header-navigation-content.d.ts +0 -30
  117. package/dist/components/header-navigation/header-navigation-content.d.ts.map +0 -1
  118. package/dist/components/header-navigation/header-navigation-content.js +0 -58
  119. package/dist/components/header-navigation/header-navigation-content.js.map +0 -1
  120. package/dist/components/header-navigation/header-navigation-extra-stacked.stories.d.ts +0 -9
  121. package/dist/components/header-navigation/header-navigation-extra-stacked.stories.d.ts.map +0 -1
  122. package/dist/components/header-navigation/header-navigation-extra.stories.d.ts +0 -12
  123. package/dist/components/header-navigation/header-navigation-extra.stories.d.ts.map +0 -1
  124. package/dist/components/header-navigation/header-navigation-links.d.ts +0 -11
  125. package/dist/components/header-navigation/header-navigation-links.d.ts.map +0 -1
  126. package/dist/components/header-navigation/header-navigation-links.js +0 -62
  127. package/dist/components/header-navigation/header-navigation-links.js.map +0 -1
  128. package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts +0 -12
  129. package/dist/components/header-navigation/header-navigation-stacked.stories.d.ts.map +0 -1
  130. package/dist/components/header-navigation/header-navigation-stories.module.less +0 -6
  131. package/dist/components/header-navigation/header-navigation-stories.module.less.d.ts +0 -3
  132. package/dist/components/header-navigation/header-navigation.d.ts +0 -59
  133. package/dist/components/header-navigation/header-navigation.d.ts.map +0 -1
  134. package/dist/components/header-navigation/header-navigation.js +0 -228
  135. package/dist/components/header-navigation/header-navigation.js.map +0 -1
  136. package/dist/components/header-navigation/header-navigation.module.less +0 -260
  137. package/dist/components/header-navigation/header-navigation.module.less.d.ts +0 -22
  138. package/dist/components/header-navigation/header-navigation.stories.d.ts +0 -12
  139. package/dist/components/header-navigation/header-navigation.stories.d.ts.map +0 -1
  140. package/dist/components/header-navigation/index.d.ts +0 -2
  141. package/dist/components/header-navigation/index.d.ts.map +0 -1
  142. package/dist/components/header-navigation/index.js +0 -3
  143. package/dist/components/header-navigation/index.js.map +0 -1
  144. package/dist/components/header-navigation/with-tooltip.d.ts +0 -4
  145. package/dist/components/header-navigation/with-tooltip.d.ts.map +0 -1
  146. package/dist/components/header-navigation/with-tooltip.js +0 -10
  147. package/dist/components/header-navigation/with-tooltip.js.map +0 -1
  148. package/dist/components/layout.stories.d.ts +0 -13
  149. package/dist/components/layout.stories.d.ts.map +0 -1
  150. package/dist/components/left-navigation/header-navigation-extra-tiny.stories.d.ts +0 -9
  151. package/dist/components/left-navigation/header-navigation-extra-tiny.stories.d.ts.map +0 -1
  152. package/dist/components/left-navigation/header-navigation-tiny-links.d.ts +0 -18
  153. package/dist/components/left-navigation/header-navigation-tiny-links.d.ts.map +0 -1
  154. package/dist/components/left-navigation/header-navigation-tiny-links.js +0 -79
  155. package/dist/components/left-navigation/header-navigation-tiny-links.js.map +0 -1
  156. package/dist/components/left-navigation/header-navigation-tiny.d.ts +0 -23
  157. package/dist/components/left-navigation/header-navigation-tiny.d.ts.map +0 -1
  158. package/dist/components/left-navigation/header-navigation-tiny.js +0 -32
  159. package/dist/components/left-navigation/header-navigation-tiny.js.map +0 -1
  160. package/dist/components/left-navigation/header-navigation-tiny.module.less +0 -117
  161. package/dist/components/left-navigation/header-navigation-tiny.module.less.d.ts +0 -15
  162. package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts +0 -12
  163. package/dist/components/left-navigation/header-navigation-tiny.stories.d.ts.map +0 -1
  164. package/dist/components/left-navigation/index.d.ts +0 -5
  165. package/dist/components/left-navigation/index.d.ts.map +0 -1
  166. package/dist/components/left-navigation/index.js +0 -5
  167. package/dist/components/left-navigation/index.js.map +0 -1
  168. package/dist/components/left-navigation/interface-internal.d.ts +0 -10
  169. package/dist/components/left-navigation/interface-internal.d.ts.map +0 -1
  170. package/dist/components/left-navigation/interface-internal.js +0 -3
  171. package/dist/components/left-navigation/interface-internal.js.map +0 -1
  172. package/dist/components/left-navigation/interface.d.ts +0 -20
  173. package/dist/components/left-navigation/interface.d.ts.map +0 -1
  174. package/dist/components/left-navigation/interface.js.map +0 -1
  175. package/dist/components/left-navigation/side-navigation-context.d.ts +0 -8
  176. package/dist/components/left-navigation/side-navigation-context.d.ts.map +0 -1
  177. package/dist/components/left-navigation/side-navigation-context.js +0 -8
  178. package/dist/components/left-navigation/side-navigation-context.js.map +0 -1
  179. package/dist/components/left-navigation/side-navigation-links-internal.d.ts +0 -28
  180. package/dist/components/left-navigation/side-navigation-links-internal.d.ts.map +0 -1
  181. package/dist/components/left-navigation/side-navigation-links-internal.js +0 -89
  182. package/dist/components/left-navigation/side-navigation-links-internal.js.map +0 -1
  183. package/dist/components/left-navigation/side-navigation-links.d.ts +0 -6
  184. package/dist/components/left-navigation/side-navigation-links.d.ts.map +0 -1
  185. package/dist/components/left-navigation/side-navigation-links.js +0 -48
  186. package/dist/components/left-navigation/side-navigation-links.js.map +0 -1
  187. package/dist/components/left-navigation/side-navigation.d.ts +0 -29
  188. package/dist/components/left-navigation/side-navigation.d.ts.map +0 -1
  189. package/dist/components/left-navigation/side-navigation.js +0 -411
  190. package/dist/components/left-navigation/side-navigation.js.map +0 -1
  191. package/dist/components/left-navigation/side-navigation.module.less +0 -530
  192. package/dist/components/left-navigation/side-navigation.module.less.d.ts +0 -48
  193. package/dist/components/left-navigation/side-navigation.stories.d.ts +0 -17
  194. package/dist/components/left-navigation/side-navigation.stories.d.ts.map +0 -1
  195. package/dist/components/left-navigation/with-tooltip.d.ts +0 -4
  196. package/dist/components/left-navigation/with-tooltip.d.ts.map +0 -1
  197. package/dist/components/left-navigation/with-tooltip.js +0 -15
  198. package/dist/components/left-navigation/with-tooltip.js.map +0 -1
  199. package/dist/components/links.d.ts +0 -5
  200. package/dist/components/links.d.ts.map +0 -1
  201. package/dist/components/links.js +0 -35
  202. package/dist/components/links.js.map +0 -1
  203. package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.d.ts +0 -9
  204. package/dist/components/profile-dropdown/profile-dropdown-tiny.stories.d.ts.map +0 -1
  205. package/dist/components/titan-layout/layout-profile.stories.d.ts +0 -13
  206. package/dist/components/titan-layout/layout-profile.stories.d.ts.map +0 -1
  207. package/dist/components/titan-layout/titan-layout.stories.d.ts +0 -29
  208. package/dist/components/titan-layout/titan-layout.stories.d.ts.map +0 -1
  209. package/dist/utils/navigation-legacy.d.ts +0 -88
  210. package/dist/utils/navigation-legacy.d.ts.map +0 -1
  211. package/dist/utils/navigation-legacy.js +0 -3
  212. package/dist/utils/navigation-legacy.js.map +0 -1
  213. package/src/components/header-navigation/header-navigation-content.tsx +0 -120
  214. package/src/components/header-navigation/header-navigation-extra-stacked.stories.tsx +0 -19
  215. package/src/components/header-navigation/header-navigation-extra.stories.tsx +0 -142
  216. package/src/components/header-navigation/header-navigation-links.tsx +0 -141
  217. package/src/components/header-navigation/header-navigation-stacked.stories.tsx +0 -146
  218. package/src/components/header-navigation/header-navigation-stories.module.less +0 -6
  219. package/src/components/header-navigation/header-navigation-stories.module.less.d.ts +0 -3
  220. package/src/components/header-navigation/header-navigation.module.less +0 -260
  221. package/src/components/header-navigation/header-navigation.module.less.d.ts +0 -22
  222. package/src/components/header-navigation/header-navigation.stories.tsx +0 -165
  223. package/src/components/header-navigation/header-navigation.tsx +0 -327
  224. package/src/components/header-navigation/index.ts +0 -1
  225. package/src/components/header-navigation/with-tooltip.tsx +0 -15
  226. package/src/components/layout.stories.tsx +0 -103
  227. package/src/components/left-navigation/header-navigation-extra-tiny.stories.tsx +0 -21
  228. package/src/components/left-navigation/header-navigation-tiny-links.tsx +0 -145
  229. package/src/components/left-navigation/header-navigation-tiny.module.less +0 -117
  230. package/src/components/left-navigation/header-navigation-tiny.module.less.d.ts +0 -15
  231. package/src/components/left-navigation/header-navigation-tiny.stories.tsx +0 -178
  232. package/src/components/left-navigation/header-navigation-tiny.tsx +0 -65
  233. package/src/components/left-navigation/index.ts +0 -4
  234. package/src/components/left-navigation/interface-internal.ts +0 -11
  235. package/src/components/left-navigation/interface.ts +0 -26
  236. package/src/components/left-navigation/side-navigation-context.tsx +0 -13
  237. package/src/components/left-navigation/side-navigation-links-internal.tsx +0 -151
  238. package/src/components/left-navigation/side-navigation-links.tsx +0 -57
  239. package/src/components/left-navigation/side-navigation.module.less +0 -530
  240. package/src/components/left-navigation/side-navigation.module.less.d.ts +0 -48
  241. package/src/components/left-navigation/side-navigation.stories.tsx +0 -226
  242. package/src/components/left-navigation/side-navigation.tsx +0 -543
  243. package/src/components/left-navigation/with-tooltip.tsx +0 -16
  244. package/src/components/links.tsx +0 -54
  245. package/src/components/profile-dropdown/profile-dropdown-tiny.stories.tsx +0 -25
  246. package/src/components/titan-layout/layout-profile.stories.tsx +0 -46
  247. package/src/utils/navigation-legacy.ts +0 -106
  248. /package/dist/components/{left-navigation → profile-dropdown}/interface.js +0 -0
@@ -1,27 +1,8 @@
1
- import { FC, HTMLAttributeAnchorTarget, ReactNode } from 'react';
2
- import { NavigationLinkData } from './navigation';
3
- export interface NavLinkComponentPropsStrict {
1
+ import { ComponentPropsWithoutRef, FC } from 'react';
2
+ export type NavLinkComponentProps = ComponentPropsWithoutRef<'a'> & {
4
3
  to: string;
5
- title?: string;
6
- className?: string;
7
4
  activeClassName?: string;
8
- children: ReactNode;
9
5
  isActive?: (pathname: string) => boolean;
10
- target?: HTMLAttributeAnchorTarget;
11
- }
12
- export interface NavLinkComponentProps extends NavLinkComponentPropsStrict {
13
- [key: string]: any;
14
- }
6
+ };
15
7
  export declare const DefaultNavLinkComponent: FC<NavLinkComponentProps>;
16
- export interface NavigationLocationInfo {
17
- pathname: string;
18
- }
19
- export type NavigationActiveLinkMatcher = (location: NavigationLocationInfo, link: NavigationLinkData) => boolean;
20
- export interface NavigationLocationContextType {
21
- location: NavigationLocationInfo;
22
- isLinkActive: NavigationActiveLinkMatcher;
23
- }
24
- export declare const NavigationComponentContext: import("react").Context<FC<NavLinkComponentProps>>;
25
- export declare const NavigationLegacyContext: import("react").Context<boolean>;
26
- export declare const NavigationLocationContext: import("react").Context<NavigationLocationContextType>;
27
8
  //# sourceMappingURL=navigation-context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-context.d.ts","sourceRoot":"","sources":["../../src/utils/navigation-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,yBAAyB,EAAE,SAAS,EAAiB,MAAM,OAAO,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,WAAW,2BAA2B;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,MAAM,CAAC,EAAE,yBAAyB,CAAC;CACtC;AAED,MAAM,WAAW,qBAAsB,SAAQ,2BAA2B;IACtE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,qBAAqB,CAK5B,CAAC;AAEnC,MAAM,WAAW,sBAAsB;IACnC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,2BAA2B,GAAG,CACtC,QAAQ,EAAE,sBAAsB,EAChC,IAAI,EAAE,kBAAkB,KACvB,OAAO,CAAC;AAEb,MAAM,WAAW,6BAA6B;IAC1C,QAAQ,EAAE,sBAAsB,CAAC;IACjC,YAAY,EAAE,2BAA2B,CAAC;CAC7C;AAED,eAAO,MAAM,0BAA0B,oDAC8B,CAAC;AACtE,eAAO,MAAM,uBAAuB,kCAAuB,CAAC;AAC5D,eAAO,MAAM,yBAAyB,wDAGpC,CAAC"}
1
+ {"version":3,"file":"navigation-context.d.ts","sourceRoot":"","sources":["../../src/utils/navigation-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,GAAG,CAAC,GAAG;IAChE,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,qBAAqB,CAU7D,CAAC"}
@@ -1,16 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createContext } from 'react';
3
- export const DefaultNavLinkComponent = ({ children, activeClassName, isActive, ...props })=>/*#__PURE__*/ _jsx("a", {
2
+ export const DefaultNavLinkComponent = ({ children, to, activeClassName, isActive, ...props })=>/*#__PURE__*/ _jsx("a", {
3
+ href: to,
4
4
  ...props,
5
5
  children: children
6
6
  });
7
- export const NavigationComponentContext = /*#__PURE__*/ createContext(DefaultNavLinkComponent);
8
- export const NavigationLegacyContext = /*#__PURE__*/ createContext(false);
9
- export const NavigationLocationContext = /*#__PURE__*/ createContext({
10
- location: {
11
- pathname: ''
12
- },
13
- isLinkActive: ()=>false
14
- });
15
7
 
16
8
  //# sourceMappingURL=navigation-context.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/navigation-context.tsx"],"sourcesContent":["import { FC, HTMLAttributeAnchorTarget, ReactNode, createContext } from 'react';\nimport { NavigationLinkData } from './navigation';\n\nexport interface NavLinkComponentPropsStrict {\n to: string;\n title?: string;\n className?: string;\n activeClassName?: string;\n children: ReactNode;\n isActive?: (pathname: string) => boolean;\n target?: HTMLAttributeAnchorTarget;\n}\n\nexport interface NavLinkComponentProps extends NavLinkComponentPropsStrict {\n [key: string]: any;\n}\n\nexport const DefaultNavLinkComponent: FC<NavLinkComponentProps> = ({\n children,\n activeClassName,\n isActive,\n ...props\n}) => <a {...props}>{children}</a>;\n\nexport interface NavigationLocationInfo {\n pathname: string;\n}\n\nexport type NavigationActiveLinkMatcher = (\n location: NavigationLocationInfo,\n link: NavigationLinkData\n) => boolean;\n\nexport interface NavigationLocationContextType {\n location: NavigationLocationInfo;\n isLinkActive: NavigationActiveLinkMatcher;\n}\n\nexport const NavigationComponentContext =\n createContext<FC<NavLinkComponentProps>>(DefaultNavLinkComponent);\nexport const NavigationLegacyContext = createContext(false);\nexport const NavigationLocationContext = createContext<NavigationLocationContextType>({\n location: { pathname: '' },\n isLinkActive: () => false,\n});\n"],"names":["createContext","DefaultNavLinkComponent","children","activeClassName","isActive","props","a","NavigationComponentContext","NavigationLegacyContext","NavigationLocationContext","location","pathname","isLinkActive"],"mappings":";AAAA,SAAmDA,aAAa,QAAQ,QAAQ;AAiBhF,OAAO,MAAMC,0BAAqD,CAAC,EAC/DC,QAAQ,EACRC,eAAe,EACfC,QAAQ,EACR,GAAGC,OACN,iBAAK,KAACC;QAAG,GAAGD,KAAK;kBAAGH;OAAc;AAgBnC,OAAO,MAAMK,2CACTP,cAAyCC,yBAAyB;AACtE,OAAO,MAAMO,wCAA0BR,cAAc,OAAO;AAC5D,OAAO,MAAMS,0CAA4BT,cAA6C;IAClFU,UAAU;QAAEC,UAAU;IAAG;IACzBC,cAAc,IAAM;AACxB,GAAG"}
1
+ {"version":3,"sources":["../../src/utils/navigation-context.tsx"],"sourcesContent":["import { ComponentPropsWithoutRef, FC } from 'react';\n\nexport type NavLinkComponentProps = ComponentPropsWithoutRef<'a'> & {\n to: string;\n activeClassName?: string;\n isActive?: (pathname: string) => boolean;\n};\n\nexport const DefaultNavLinkComponent: FC<NavLinkComponentProps> = ({\n children,\n to,\n activeClassName,\n isActive,\n ...props\n}) => (\n <a href={to} {...props}>\n {children}\n </a>\n);\n"],"names":["DefaultNavLinkComponent","children","to","activeClassName","isActive","props","a","href"],"mappings":";AAQA,OAAO,MAAMA,0BAAqD,CAAC,EAC/DC,QAAQ,EACRC,EAAE,EACFC,eAAe,EACfC,QAAQ,EACR,GAAGC,OACN,iBACG,KAACC;QAAEC,MAAML;QAAK,GAAGG,KAAK;kBACjBJ;OAEP"}
@@ -1,17 +1,10 @@
1
1
  import { IconProps } from '@servicetitan/anvil2';
2
- import { FC } from 'react';
3
2
  import { CounterTagData, CounterTagValue } from './counter-tag';
4
3
  export interface NavigationItemData extends NavigationLinkData {
5
- /** flag if the link is not shown (based on FG and/or user permissions) */
6
- isHidden?: boolean;
7
- /** custom className (can be used for mdi icons) */
8
- iconClassName?: string;
9
4
  /** svg icon (anvil2) of inactive item */
10
5
  icon: IconProps['svg'] | undefined;
11
6
  /** svg icon (anvil2) of active item */
12
7
  iconActive: IconProps['svg'] | undefined;
13
- /** icon component of item (<svg />) */
14
- iconComponent?: FC;
15
8
  /** item tag (optional). shown if it is set and true or greater than 0 */
16
9
  counter?: CounterTagValue;
17
10
  tag?: CounterTagData;
@@ -19,6 +12,8 @@ export interface NavigationItemData extends NavigationLinkData {
19
12
  className?: string;
20
13
  /** optional submenu of link item */
21
14
  submenu?: NavigationSubmenuData;
15
+ iconClassName?: never;
16
+ iconComponent?: never;
22
17
  }
23
18
  export interface NavigationLinkData {
24
19
  /** link id */
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/utils/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhE,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC1D,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,yCAAyC;IACzC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAEnC,uCAAuC;IACvC,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAEzC,uCAAuC;IACvC,aAAa,CAAC,EAAE,EAAE,CAAC;IAEnB,yEAAyE;IACzE,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,GAAG,CAAC,EAAE,cAAc,CAAC;IAErB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,oCAAoC;IACpC,OAAO,CAAC,EAAE,qBAAqB,CAAC;CACnC;AAED,MAAM,WAAW,kBAAkB;IAC/B,cAAc;IACd,EAAE,EAAE,MAAM,CAAC;IAEX,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAC;IAEX,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IAEd,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,qBAAqB;IAClC,qBAAqB;IACrB,MAAM,EAAE,0BAA0B,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACjE,+EAA+E;IAC/E,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,GAAG,CAAC,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B;IACvC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IAEd,0BAA0B;IAC1B,KAAK,EAAE,yBAAyB,EAAE,CAAC;CACtC"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/utils/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhE,MAAM,WAAW,kBAAmB,SAAQ,kBAAkB;IAC1D,yCAAyC;IACzC,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAEnC,uCAAuC;IACvC,UAAU,EAAE,SAAS,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAEzC,yEAAyE;IACzE,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,GAAG,CAAC,EAAE,cAAc,CAAC;IAErB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,oCAAoC;IACpC,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAEhC,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,aAAa,CAAC,EAAE,KAAK,CAAC;CACzB;AAED,MAAM,WAAW,kBAAkB;IAC/B,cAAc;IACd,EAAE,EAAE,MAAM,CAAC;IAEX,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAC;IAEX,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAC;IAEd,+FAA+F;IAC/F,QAAQ,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;CACxD;AAED,MAAM,WAAW,qBAAqB;IAClC,qBAAqB;IACrB,MAAM,EAAE,0BAA0B,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACjE,+EAA+E;IAC/E,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,GAAG,CAAC,EAAE,cAAc,CAAC;CACxB;AAED,MAAM,WAAW,0BAA0B;IACvC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IAEd,0BAA0B;IAC1B,KAAK,EAAE,yBAAyB,EAAE,CAAC;CACtC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/navigation.ts"],"sourcesContent":["import { IconProps } from '@servicetitan/anvil2';\nimport { FC } from 'react';\nimport { CounterTagData, CounterTagValue } from './counter-tag';\n\nexport interface NavigationItemData extends NavigationLinkData {\n /** flag if the link is not shown (based on FG and/or user permissions) */\n isHidden?: boolean;\n\n /** custom className (can be used for mdi icons) */\n iconClassName?: string;\n\n /** svg icon (anvil2) of inactive item */\n icon: IconProps['svg'] | undefined;\n\n /** svg icon (anvil2) of active item */\n iconActive: IconProps['svg'] | undefined;\n\n /** icon component of item (<svg />) */\n iconComponent?: FC;\n\n /** item tag (optional). shown if it is set and true or greater than 0 */\n counter?: CounterTagValue;\n tag?: CounterTagData;\n\n /** class name of link item */\n className?: string;\n\n /** optional submenu of link item */\n submenu?: NavigationSubmenuData;\n}\n\nexport interface NavigationLinkData {\n /** link id */\n id: string;\n\n /** link href */\n to: string;\n\n /** link title */\n title: string;\n\n /** callback to return active state. By default, it compares link href with current pathname */\n isActive?: boolean | ((pathname: string) => boolean);\n}\n\nexport interface NavigationSubmenuData {\n /** submenu groups */\n groups: NavigationSubmenuGroupData[];\n}\n\nexport interface NavigationSubmenuItemData extends NavigationLinkData {\n /** item tag (optional) value. shown if it is set and true or greater than 0 */\n counter?: CounterTagValue;\n tag?: CounterTagData;\n}\n\nexport interface NavigationSubmenuGroupData {\n /** submenu group title */\n title: string;\n\n /** submenu group links */\n links: NavigationSubmenuItemData[];\n}\n"],"names":[],"mappings":"AAwDA,WAMC"}
1
+ {"version":3,"sources":["../../src/utils/navigation.ts"],"sourcesContent":["import { IconProps } from '@servicetitan/anvil2';\nimport { CounterTagData, CounterTagValue } from './counter-tag';\n\nexport interface NavigationItemData extends NavigationLinkData {\n /** svg icon (anvil2) of inactive item */\n icon: IconProps['svg'] | undefined;\n\n /** svg icon (anvil2) of active item */\n iconActive: IconProps['svg'] | undefined;\n\n /** item tag (optional). shown if it is set and true or greater than 0 */\n counter?: CounterTagValue;\n tag?: CounterTagData;\n\n /** class name of link item */\n className?: string;\n\n /** optional submenu of link item */\n submenu?: NavigationSubmenuData;\n\n iconClassName?: never;\n iconComponent?: never;\n}\n\nexport interface NavigationLinkData {\n /** link id */\n id: string;\n\n /** link href */\n to: string;\n\n /** link title */\n title: string;\n\n /** callback to return active state. By default, it compares link href with current pathname */\n isActive?: boolean | ((pathname: string) => boolean);\n}\n\nexport interface NavigationSubmenuData {\n /** submenu groups */\n groups: NavigationSubmenuGroupData[];\n}\n\nexport interface NavigationSubmenuItemData extends NavigationLinkData {\n /** item tag (optional) value. shown if it is set and true or greater than 0 */\n counter?: CounterTagValue;\n tag?: CounterTagData;\n}\n\nexport interface NavigationSubmenuGroupData {\n /** submenu group title */\n title: string;\n\n /** submenu group links */\n links: NavigationSubmenuItemData[];\n}\n"],"names":[],"mappings":"AAiDA,WAMC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/navigation",
3
- "version": "12.0.3",
3
+ "version": "13.0.0-canary.256.5761ed1.0",
4
4
  "description": "Navigation components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,5 +42,5 @@
42
42
  "less": true,
43
43
  "webpack": false
44
44
  },
45
- "gitHead": "c4d3e8b44fbf7d1fc7849c475ddeb32547bcac8b"
45
+ "gitHead": "5761ed1e46eb6357f79785dce570a744a4baff2b"
46
46
  }
@@ -5,7 +5,7 @@ import { CounterTagData } from '../utils/counter-tag';
5
5
 
6
6
  export interface CounterTagProps extends CounterTagData {
7
7
  [key: string]: any;
8
- className: string;
8
+ className?: string;
9
9
  }
10
10
 
11
11
  export const CounterTag: FC<{
@@ -0,0 +1,47 @@
1
+ import { PopoverPropsStrict } from '@servicetitan/design-system';
2
+ import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
3
+ import { CounterTagData, CounterTagValue } from '../../utils/counter-tag';
4
+
5
+ export type ProfileDropdownTriggerProps = {
6
+ info?: { title: string; text: string };
7
+ imageSrc?: string | null;
8
+ avatarBadge?: boolean | string;
9
+ badge?: { content?: number | string; className: string };
10
+ } & Omit<ComponentPropsWithoutRef<'div'>, 'onClick'>;
11
+
12
+ export type ProfileDropdownProps = {
13
+ direction?: PopoverPropsStrict['direction'];
14
+ trigger?: Omit<ProfileDropdownTriggerProps, 'onClick' | 'open' | 'hintArrow'>;
15
+ hintPopup?: {
16
+ className?: string;
17
+ content: FC<{ openProfile(): void }>;
18
+ width?: PopoverPropsStrict['width'];
19
+ onClose?: () => void;
20
+ };
21
+ portal?: boolean;
22
+ width?: PopoverPropsStrict['width'];
23
+ onClose?(): void;
24
+ onOpen?(): void;
25
+ } & ComponentPropsWithoutRef<'div'>;
26
+
27
+ export type ProfileItemContent =
28
+ | { children: string; text?: string }
29
+ | { children: ReactNode; text: string };
30
+
31
+ export type ProfileDropdownSectionProps = Omit<ComponentPropsWithoutRef<'div'>, 'children'> & {
32
+ children: ReactNode;
33
+ id: string;
34
+ tooltip?: string;
35
+ tag?: CounterTagData;
36
+ counter?: CounterTagValue;
37
+ } & ProfileItemContent;
38
+
39
+ export type ProfileDropdownLinkProps = Omit<ComponentPropsWithoutRef<'a'>, 'children'> & {
40
+ id: string;
41
+ children: ReactNode;
42
+ external?: boolean;
43
+ tooltip?: string;
44
+ to: string;
45
+ tag?: CounterTagData;
46
+ counter?: CounterTagValue;
47
+ } & ProfileItemContent;
@@ -0,0 +1,25 @@
1
+ import { NavLinkMock, withAnvil, withMemoryRouter } from '../../test/data';
2
+ import { TitanLayout } from '../titan-layout';
3
+ import { DesktopProfileDropdown } from './profile-dropdown';
4
+
5
+ const withLayout = (Story: any) => (
6
+ <TitanLayout navVariant="top" profile={<Story />} navigationComponent={NavLinkMock} />
7
+ );
8
+
9
+ export default {
10
+ title: 'Navigation/DesktopProfileDropdown/Legacy',
11
+ component: DesktopProfileDropdown,
12
+ parameters: {},
13
+ decorators: [withMemoryRouter, withAnvil, withLayout],
14
+ };
15
+
16
+ export {
17
+ ProfileDropdownDefault,
18
+ ProfileDropdownWithBothBadges,
19
+ ProfileDropdownWithCounter,
20
+ ProfileDropdownWithErrorLogo,
21
+ ProfileDropdownWithInfo,
22
+ ProfileDropdownWithHintAndInfoPopup,
23
+ ProfileDropdownWithHintPopup,
24
+ ProfileDropdownWithLogo,
25
+ } from './profile-dropdown.stories';
@@ -1,14 +1,22 @@
1
- import { withAnvil, withMemoryRouter } from '../../test/data';
2
- import { HeaderNavigationStacked } from '../header-navigation';
3
- import { ProfileDropdown } from './profile-dropdown';
1
+ import { NavLinkMock, navItems, withAnvil, withMemoryRouter } from '../../test/data';
2
+ import { TitanLayout } from '../titan-layout';
3
+ import { DesktopProfileDropdown } from './profile-dropdown';
4
4
 
5
- const withHeaderNavigationStacked = (Story: any) => <HeaderNavigationStacked right={<Story />} />;
5
+ const withStackedLayout = (Story: any) => (
6
+ <TitanLayout
7
+ navVariant="top"
8
+ top={<div />}
9
+ profile={<Story />}
10
+ navigationMainItems={[navItems.accounting]}
11
+ navigationComponent={NavLinkMock}
12
+ />
13
+ );
6
14
 
7
15
  export default {
8
- title: 'Navigation/ProfileDropdown/Stacked',
9
- component: ProfileDropdown,
16
+ title: 'Navigation/DesktopProfileDropdown/Stacked',
17
+ component: DesktopProfileDropdown,
10
18
  parameters: {},
11
- decorators: [withMemoryRouter, withAnvil, withHeaderNavigationStacked],
19
+ decorators: [withStackedLayout, withMemoryRouter, withAnvil],
12
20
  };
13
21
 
14
22
  export {
@@ -1,58 +1,65 @@
1
1
  import { Button } from '@servicetitan/design-system';
2
- import { withAnvil, withMemoryRouter } from '../../test/data';
3
- import { HeaderNavigation } from '../header-navigation';
4
- import { ProfileDropdown } from './profile-dropdown';
2
+ import { NavLinkMock, withAnvil, withMemoryRouter } from '../../test/data';
3
+ import { TitanLayout } from '../titan-layout';
4
+ import { DesktopProfileDropdown } from './profile-dropdown';
5
5
 
6
- const withHeaderNavigation = (Story: any) => (
7
- <HeaderNavigation>
8
- <Story />
9
- </HeaderNavigation>
6
+ const withLegacyLayout = (Story: any) => (
7
+ <TitanLayout navigationComponent={NavLinkMock} profile={<Story />} />
10
8
  );
11
9
 
12
10
  export default {
13
- title: 'Navigation/ProfileDropdown/Legacy',
14
- component: ProfileDropdown,
11
+ title: 'Navigation/DesktopProfileDropdown/Default',
12
+ component: DesktopProfileDropdown,
15
13
  parameters: {},
16
- decorators: [withMemoryRouter, withAnvil, withHeaderNavigation],
14
+ decorators: [withLegacyLayout, withMemoryRouter, withAnvil],
17
15
  };
18
16
 
19
17
  export const ProfileDropdownDefault = () => (
20
- <ProfileDropdown>
21
- <ProfileDropdown.Link id="first" to="https://google.com">
18
+ <DesktopProfileDropdown>
19
+ <DesktopProfileDropdown.Link id="first" to="https://google.com" external>
22
20
  first link
23
- </ProfileDropdown.Link>
24
- <ProfileDropdown.Section id="second" onClick={() => alert('second click')}>
21
+ </DesktopProfileDropdown.Link>
22
+ <DesktopProfileDropdown.Section id="second" onClick={() => alert('second click')}>
25
23
  second link
26
- </ProfileDropdown.Section>
27
- <ProfileDropdown.Divider />
28
- <ProfileDropdown.Section id="content">some content</ProfileDropdown.Section>
29
- <ProfileDropdown.Divider />
30
- <ProfileDropdown.Divider />
31
- <ProfileDropdown.Divider />
32
- <ProfileDropdown.Link id="third" to="third">
24
+ </DesktopProfileDropdown.Section>
25
+ <DesktopProfileDropdown.Divider />
26
+ <DesktopProfileDropdown.Section id="content">some content</DesktopProfileDropdown.Section>
27
+ <DesktopProfileDropdown.Divider />
28
+ <DesktopProfileDropdown.Divider />
29
+ <DesktopProfileDropdown.Divider />
30
+ <DesktopProfileDropdown.Link id="third" to="third">
33
31
  third link
34
- </ProfileDropdown.Link>
35
- <ProfileDropdown.Divider />
36
- </ProfileDropdown>
32
+ </DesktopProfileDropdown.Link>
33
+ <DesktopProfileDropdown.Divider />
34
+ <DesktopProfileDropdown.Section
35
+ id="forth"
36
+ onClick={() => alert('forth click')}
37
+ text="Sign Out user"
38
+ >
39
+ Sign Out
40
+ <span className="c-neutral-60 m-l-1">user</span>
41
+ </DesktopProfileDropdown.Section>
42
+ <DesktopProfileDropdown.Divider />
43
+ </DesktopProfileDropdown>
37
44
  );
38
45
 
39
46
  export const ProfileDropdownWithLogo = () => (
40
- <ProfileDropdown
47
+ <DesktopProfileDropdown
41
48
  trigger={{
42
49
  imageSrc: 'https://upload.wikimedia.org/wikipedia/en/1/11/Milhouse_Van_Houten.png',
43
50
  }}
44
51
  >
45
- <ProfileDropdown.Link id="first" to="https://google.com">
52
+ <DesktopProfileDropdown.Link id="first" to="https://google.com">
46
53
  first link
47
- </ProfileDropdown.Link>
48
- <ProfileDropdown.Section id="second" onClick={() => alert('second click')}>
54
+ </DesktopProfileDropdown.Link>
55
+ <DesktopProfileDropdown.Section id="second" onClick={() => alert('second click')}>
49
56
  second link
50
- </ProfileDropdown.Section>
51
- </ProfileDropdown>
57
+ </DesktopProfileDropdown.Section>
58
+ </DesktopProfileDropdown>
52
59
  );
53
60
 
54
61
  export const ProfileDropdownWithErrorLogo = () => (
55
- <ProfileDropdown
62
+ <DesktopProfileDropdown
56
63
  trigger={{
57
64
  imageSrc: 'https://some.incorrect.url/logo.png',
58
65
  }}
@@ -60,7 +67,7 @@ export const ProfileDropdownWithErrorLogo = () => (
60
67
  );
61
68
 
62
69
  export const ProfileDropdownWithInfo = () => (
63
- <ProfileDropdown
70
+ <DesktopProfileDropdown
64
71
  trigger={{
65
72
  info: { text: 'first', title: 'tenant user' },
66
73
  avatarBadge: true,
@@ -69,7 +76,7 @@ export const ProfileDropdownWithInfo = () => (
69
76
  );
70
77
 
71
78
  export const ProfileDropdownWithCounter = () => (
72
- <ProfileDropdown
79
+ <DesktopProfileDropdown
73
80
  trigger={{
74
81
  info: { text: 'first', title: 'tenant user' },
75
82
  avatarBadge: true,
@@ -79,7 +86,7 @@ export const ProfileDropdownWithCounter = () => (
79
86
  );
80
87
 
81
88
  export const ProfileDropdownWithBothBadges = () => (
82
- <ProfileDropdown
89
+ <DesktopProfileDropdown
83
90
  trigger={{
84
91
  avatarBadge: 'yellow-500',
85
92
  badge: { className: 'bg-red-400' },
@@ -91,7 +98,7 @@ export const ProfileDropdownWithBothBadges = () => (
91
98
  const log = (text: string) => console.log(text);
92
99
 
93
100
  export const ProfileDropdownWithHintPopup = () => (
94
- <ProfileDropdown
101
+ <DesktopProfileDropdown
95
102
  trigger={{
96
103
  avatarBadge: 'yellow-500',
97
104
  badge: { className: 'bg-red-400' },
@@ -112,19 +119,19 @@ export const ProfileDropdownWithHintPopup = () => (
112
119
  onOpen={() => log('open profile dropdown')}
113
120
  onClose={() => log('close profile dropdown')}
114
121
  >
115
- <ProfileDropdown.Link id="first" to="https://google.com" counter={12}>
122
+ <DesktopProfileDropdown.Link id="first" to="https://google.com" counter={12}>
116
123
  first item
117
- </ProfileDropdown.Link>
118
- <ProfileDropdown.Divider />
119
- <ProfileDropdown.Section id="second">second item</ProfileDropdown.Section>
120
- <ProfileDropdown.Link id="third" to="https://google.com" tag={{ value: 1 }}>
124
+ </DesktopProfileDropdown.Link>
125
+ <DesktopProfileDropdown.Divider />
126
+ <DesktopProfileDropdown.Section id="second">second item</DesktopProfileDropdown.Section>
127
+ <DesktopProfileDropdown.Link id="third" to="https://google.com" tag={{ value: 1 }}>
121
128
  third item
122
- </ProfileDropdown.Link>
123
- </ProfileDropdown>
129
+ </DesktopProfileDropdown.Link>
130
+ </DesktopProfileDropdown>
124
131
  );
125
132
 
126
133
  export const ProfileDropdownWithHintAndInfoPopup = () => (
127
- <ProfileDropdown
134
+ <DesktopProfileDropdown
128
135
  trigger={{
129
136
  avatarBadge: 'yellow-500',
130
137
  badge: { className: 'bg-red-400' },