smarthr-ui 62.2.3 → 62.3.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 (314) hide show
  1. package/esm/components/AppHeader/AppHeader.d.ts +3 -0
  2. package/esm/components/AppHeader/AppHeader.js +17 -0
  3. package/esm/components/AppHeader/AppHeader.js.map +1 -0
  4. package/esm/components/AppHeader/components/common/AppLauncherFeatures.d.ts +8 -0
  5. package/esm/components/AppHeader/components/common/AppLauncherFeatures.js +39 -0
  6. package/esm/components/AppHeader/components/common/AppLauncherFeatures.js.map +1 -0
  7. package/esm/components/AppHeader/components/common/AppLauncherSortDropdown.d.ts +8 -0
  8. package/esm/components/AppHeader/components/common/AppLauncherSortDropdown.js +55 -0
  9. package/esm/components/AppHeader/components/common/AppLauncherSortDropdown.js.map +1 -0
  10. package/esm/components/AppHeader/components/common/CommonButton.d.ts +92 -0
  11. package/esm/components/AppHeader/components/common/CommonButton.js +52 -0
  12. package/esm/components/AppHeader/components/common/CommonButton.js.map +1 -0
  13. package/esm/components/AppHeader/components/common/Translate.d.ts +4 -0
  14. package/esm/components/AppHeader/components/common/Translate.js +3 -0
  15. package/esm/components/AppHeader/components/common/Translate.js.map +1 -0
  16. package/esm/components/AppHeader/components/desktop/AppLauncher.d.ts +7 -0
  17. package/esm/components/AppHeader/components/desktop/AppLauncher.js +115 -0
  18. package/esm/components/AppHeader/components/desktop/AppLauncher.js.map +1 -0
  19. package/esm/components/AppHeader/components/desktop/DesktopHeader.d.ts +3 -0
  20. package/esm/components/AppHeader/components/desktop/DesktopHeader.js +61 -0
  21. package/esm/components/AppHeader/components/desktop/DesktopHeader.js.map +1 -0
  22. package/esm/components/AppHeader/components/desktop/Navigation.d.ts +11 -0
  23. package/esm/components/AppHeader/components/desktop/Navigation.js +77 -0
  24. package/esm/components/AppHeader/components/desktop/Navigation.js.map +1 -0
  25. package/esm/components/AppHeader/components/desktop/ReleaseNotesDropdown.d.ts +3 -0
  26. package/esm/components/AppHeader/components/desktop/ReleaseNotesDropdown.js +38 -0
  27. package/esm/components/AppHeader/components/desktop/ReleaseNotesDropdown.js.map +1 -0
  28. package/esm/components/AppHeader/components/desktop/UserInfo.d.ts +3 -0
  29. package/esm/components/AppHeader/components/desktop/UserInfo.js +104 -0
  30. package/esm/components/AppHeader/components/desktop/UserInfo.js.map +1 -0
  31. package/esm/components/AppHeader/components/mobile/AppLauncher.d.ts +7 -0
  32. package/esm/components/AppHeader/components/mobile/AppLauncher.js +52 -0
  33. package/esm/components/AppHeader/components/mobile/AppLauncher.js.map +1 -0
  34. package/esm/components/AppHeader/components/mobile/AppLauncherContext.d.ts +7 -0
  35. package/esm/components/AppHeader/components/mobile/AppLauncherContext.js +7 -0
  36. package/esm/components/AppHeader/components/mobile/AppLauncherContext.js.map +1 -0
  37. package/esm/components/AppHeader/components/mobile/AppLauncherFilterDropdown.d.ts +8 -0
  38. package/esm/components/AppHeader/components/mobile/AppLauncherFilterDropdown.js +48 -0
  39. package/esm/components/AppHeader/components/mobile/AppLauncherFilterDropdown.js.map +1 -0
  40. package/esm/components/AppHeader/components/mobile/Help.d.ts +7 -0
  41. package/esm/components/AppHeader/components/mobile/Help.js +24 -0
  42. package/esm/components/AppHeader/components/mobile/Help.js.map +1 -0
  43. package/esm/components/AppHeader/components/mobile/LanguageSelector.d.ts +8 -0
  44. package/esm/components/AppHeader/components/mobile/LanguageSelector.js +33 -0
  45. package/esm/components/AppHeader/components/mobile/LanguageSelector.js.map +1 -0
  46. package/esm/components/AppHeader/components/mobile/Menu.d.ts +8 -0
  47. package/esm/components/AppHeader/components/mobile/Menu.js +59 -0
  48. package/esm/components/AppHeader/components/mobile/Menu.js.map +1 -0
  49. package/esm/components/AppHeader/components/mobile/MenuAccordion.d.ts +8 -0
  50. package/esm/components/AppHeader/components/mobile/MenuAccordion.js +22 -0
  51. package/esm/components/AppHeader/components/mobile/MenuAccordion.js.map +1 -0
  52. package/esm/components/AppHeader/components/mobile/MenuButton.d.ts +7 -0
  53. package/esm/components/AppHeader/components/mobile/MenuButton.js +7 -0
  54. package/esm/components/AppHeader/components/mobile/MenuButton.js.map +1 -0
  55. package/esm/components/AppHeader/components/mobile/MenuDialog.d.ts +6 -0
  56. package/esm/components/AppHeader/components/mobile/MenuDialog.js +82 -0
  57. package/esm/components/AppHeader/components/mobile/MenuDialog.js.map +1 -0
  58. package/esm/components/AppHeader/components/mobile/MenuSubHeader.d.ts +7 -0
  59. package/esm/components/AppHeader/components/mobile/MenuSubHeader.js +15 -0
  60. package/esm/components/AppHeader/components/mobile/MenuSubHeader.js.map +1 -0
  61. package/esm/components/AppHeader/components/mobile/MobileHeader.d.ts +3 -0
  62. package/esm/components/AppHeader/components/mobile/MobileHeader.js +39 -0
  63. package/esm/components/AppHeader/components/mobile/MobileHeader.js.map +1 -0
  64. package/esm/components/AppHeader/components/mobile/Navigation.d.ts +8 -0
  65. package/esm/components/AppHeader/components/mobile/Navigation.js +22 -0
  66. package/esm/components/AppHeader/components/mobile/Navigation.js.map +1 -0
  67. package/esm/components/AppHeader/components/mobile/NavigationContext.d.ts +7 -0
  68. package/esm/components/AppHeader/components/mobile/NavigationContext.js +7 -0
  69. package/esm/components/AppHeader/components/mobile/NavigationContext.js.map +1 -0
  70. package/esm/components/AppHeader/components/mobile/NavigationGroupHeader.d.ts +5 -0
  71. package/esm/components/AppHeader/components/mobile/NavigationGroupHeader.js +8 -0
  72. package/esm/components/AppHeader/components/mobile/NavigationGroupHeader.js.map +1 -0
  73. package/esm/components/AppHeader/components/mobile/NavigationItem.d.ts +6 -0
  74. package/esm/components/AppHeader/components/mobile/NavigationItem.js +45 -0
  75. package/esm/components/AppHeader/components/mobile/NavigationItem.js.map +1 -0
  76. package/esm/components/AppHeader/components/mobile/ReleaseNote.d.ts +2 -0
  77. package/esm/components/AppHeader/components/mobile/ReleaseNote.js +40 -0
  78. package/esm/components/AppHeader/components/mobile/ReleaseNote.js.map +1 -0
  79. package/esm/components/AppHeader/components/mobile/ReleaseNoteContext.d.ts +7 -0
  80. package/esm/components/AppHeader/components/mobile/ReleaseNoteContext.js +7 -0
  81. package/esm/components/AppHeader/components/mobile/ReleaseNoteContext.js.map +1 -0
  82. package/esm/components/AppHeader/components/mobile/TenantSelector.d.ts +9 -0
  83. package/esm/components/AppHeader/components/mobile/TenantSelector.js +36 -0
  84. package/esm/components/AppHeader/components/mobile/TenantSelector.js.map +1 -0
  85. package/esm/components/AppHeader/components/mobile/UserInfo.d.ts +3 -0
  86. package/esm/components/AppHeader/components/mobile/UserInfo.js +54 -0
  87. package/esm/components/AppHeader/components/mobile/UserInfo.js.map +1 -0
  88. package/esm/components/AppHeader/hooks/useAppLauncher.d.ts +18 -0
  89. package/esm/components/AppHeader/hooks/useAppLauncher.js +79 -0
  90. package/esm/components/AppHeader/hooks/useAppLauncher.js.map +1 -0
  91. package/esm/components/AppHeader/hooks/useLocale.d.ts +11 -0
  92. package/esm/components/AppHeader/hooks/useLocale.js +7 -0
  93. package/esm/components/AppHeader/hooks/useLocale.js.map +1 -0
  94. package/esm/components/AppHeader/hooks/useMediaQuery.d.ts +5 -0
  95. package/esm/components/AppHeader/hooks/useMediaQuery.js +16 -0
  96. package/esm/components/AppHeader/hooks/useMediaQuery.js.map +1 -0
  97. package/esm/components/AppHeader/hooks/useTranslate.d.ts +31 -0
  98. package/esm/components/AppHeader/hooks/useTranslate.js +8 -0
  99. package/esm/components/AppHeader/hooks/useTranslate.js.map +1 -0
  100. package/esm/components/AppHeader/index.d.ts +1 -0
  101. package/esm/components/AppHeader/index.js +2 -0
  102. package/esm/components/AppHeader/index.js.map +1 -0
  103. package/esm/components/AppHeader/multilingualization/index.d.ts +3 -0
  104. package/esm/components/AppHeader/multilingualization/index.js +3 -0
  105. package/esm/components/AppHeader/multilingualization/index.js.map +1 -0
  106. package/esm/components/AppHeader/multilingualization/localeMap.d.ts +10 -0
  107. package/esm/components/AppHeader/multilingualization/localeMap.js +11 -0
  108. package/esm/components/AppHeader/multilingualization/localeMap.js.map +1 -0
  109. package/esm/components/AppHeader/multilingualization/messages.d.ts +272 -0
  110. package/esm/components/AppHeader/multilingualization/messages.js +243 -0
  111. package/esm/components/AppHeader/multilingualization/messages.js.map +1 -0
  112. package/esm/components/AppHeader/multilingualization/translate.d.ts +3 -0
  113. package/esm/components/AppHeader/multilingualization/translate.js +4 -0
  114. package/esm/components/AppHeader/multilingualization/translate.js.map +1 -0
  115. package/esm/components/AppHeader/multilingualization/types.d.ts +3 -0
  116. package/esm/components/AppHeader/multilingualization/types.js +2 -0
  117. package/esm/components/AppHeader/multilingualization/types.js.map +1 -0
  118. package/esm/components/AppHeader/stories/args.d.ts +3 -0
  119. package/esm/components/AppHeader/stories/args.js +140 -0
  120. package/esm/components/AppHeader/stories/args.js.map +1 -0
  121. package/esm/components/AppHeader/types.d.ts +87 -0
  122. package/esm/components/AppHeader/types.js +7 -0
  123. package/esm/components/AppHeader/types.js.map +1 -0
  124. package/esm/components/AppHeader/utils.d.ts +9 -0
  125. package/esm/components/AppHeader/utils.js +11 -0
  126. package/esm/components/AppHeader/utils.js.map +1 -0
  127. package/esm/components/Button/ButtonWrapper.js +0 -1
  128. package/esm/components/Button/ButtonWrapper.js.map +1 -1
  129. package/esm/components/ComboBox/ListBoxItemButton.js +1 -3
  130. package/esm/components/ComboBox/ListBoxItemButton.js.map +1 -1
  131. package/esm/components/DatePicker/DatePicker.d.ts +1 -0
  132. package/esm/components/DatePicker/DatePicker.js +1 -0
  133. package/esm/components/DatePicker/DatePicker.js.map +1 -1
  134. package/esm/components/Dialog/MessageDialog/MessageDialogContentInner.js.map +1 -1
  135. package/esm/components/Layout/Cluster/Cluster.js +2 -2
  136. package/esm/components/Layout/Cluster/Cluster.js.map +1 -1
  137. package/esm/components/Picker/DatetimeLocalPicker.d.ts +1 -0
  138. package/esm/components/Picker/DatetimeLocalPicker.js +1 -0
  139. package/esm/components/Picker/DatetimeLocalPicker.js.map +1 -1
  140. package/esm/components/Picker/MonthPicker.d.ts +1 -0
  141. package/esm/components/Picker/MonthPicker.js +1 -0
  142. package/esm/components/Picker/MonthPicker.js.map +1 -1
  143. package/esm/components/Picker/TimePicker.d.ts +1 -0
  144. package/esm/components/Picker/TimePicker.js +1 -0
  145. package/esm/components/Picker/TimePicker.js.map +1 -1
  146. package/esm/components/WarekiPicker/WarekiPicker.d.ts +5 -0
  147. package/esm/components/WarekiPicker/WarekiPicker.js +9 -0
  148. package/esm/components/WarekiPicker/WarekiPicker.js.map +1 -0
  149. package/esm/components/WarekiPicker/index.d.ts +1 -0
  150. package/esm/components/WarekiPicker/index.js +2 -0
  151. package/esm/components/WarekiPicker/index.js.map +1 -0
  152. package/esm/hooks/usePortal.js +0 -1
  153. package/esm/hooks/usePortal.js.map +1 -1
  154. package/esm/index.d.ts +2 -0
  155. package/esm/index.js +2 -0
  156. package/esm/index.js.map +1 -1
  157. package/lib/components/AppHeader/AppHeader.d.ts +3 -0
  158. package/lib/components/AppHeader/AppHeader.js +24 -0
  159. package/lib/components/AppHeader/AppHeader.js.map +1 -0
  160. package/lib/components/AppHeader/components/common/AppLauncherFeatures.d.ts +8 -0
  161. package/lib/components/AppHeader/components/common/AppLauncherFeatures.js +46 -0
  162. package/lib/components/AppHeader/components/common/AppLauncherFeatures.js.map +1 -0
  163. package/lib/components/AppHeader/components/common/AppLauncherSortDropdown.d.ts +8 -0
  164. package/lib/components/AppHeader/components/common/AppLauncherSortDropdown.js +92 -0
  165. package/lib/components/AppHeader/components/common/AppLauncherSortDropdown.js.map +1 -0
  166. package/lib/components/AppHeader/components/common/CommonButton.d.ts +92 -0
  167. package/lib/components/AppHeader/components/common/CommonButton.js +59 -0
  168. package/lib/components/AppHeader/components/common/CommonButton.js.map +1 -0
  169. package/lib/components/AppHeader/components/common/Translate.d.ts +4 -0
  170. package/lib/components/AppHeader/components/common/Translate.js +39 -0
  171. package/lib/components/AppHeader/components/common/Translate.js.map +1 -0
  172. package/lib/components/AppHeader/components/desktop/AppLauncher.d.ts +7 -0
  173. package/lib/components/AppHeader/components/desktop/AppLauncher.js +122 -0
  174. package/lib/components/AppHeader/components/desktop/AppLauncher.js.map +1 -0
  175. package/lib/components/AppHeader/components/desktop/DesktopHeader.d.ts +3 -0
  176. package/lib/components/AppHeader/components/desktop/DesktopHeader.js +68 -0
  177. package/lib/components/AppHeader/components/desktop/DesktopHeader.js.map +1 -0
  178. package/lib/components/AppHeader/components/desktop/Navigation.d.ts +11 -0
  179. package/lib/components/AppHeader/components/desktop/Navigation.js +114 -0
  180. package/lib/components/AppHeader/components/desktop/Navigation.js.map +1 -0
  181. package/lib/components/AppHeader/components/desktop/ReleaseNotesDropdown.d.ts +3 -0
  182. package/lib/components/AppHeader/components/desktop/ReleaseNotesDropdown.js +45 -0
  183. package/lib/components/AppHeader/components/desktop/ReleaseNotesDropdown.js.map +1 -0
  184. package/lib/components/AppHeader/components/desktop/UserInfo.d.ts +3 -0
  185. package/lib/components/AppHeader/components/desktop/UserInfo.js +111 -0
  186. package/lib/components/AppHeader/components/desktop/UserInfo.js.map +1 -0
  187. package/lib/components/AppHeader/components/mobile/AppLauncher.d.ts +7 -0
  188. package/lib/components/AppHeader/components/mobile/AppLauncher.js +59 -0
  189. package/lib/components/AppHeader/components/mobile/AppLauncher.js.map +1 -0
  190. package/lib/components/AppHeader/components/mobile/AppLauncherContext.d.ts +7 -0
  191. package/lib/components/AppHeader/components/mobile/AppLauncherContext.js +10 -0
  192. package/lib/components/AppHeader/components/mobile/AppLauncherContext.js.map +1 -0
  193. package/lib/components/AppHeader/components/mobile/AppLauncherFilterDropdown.d.ts +8 -0
  194. package/lib/components/AppHeader/components/mobile/AppLauncherFilterDropdown.js +55 -0
  195. package/lib/components/AppHeader/components/mobile/AppLauncherFilterDropdown.js.map +1 -0
  196. package/lib/components/AppHeader/components/mobile/Help.d.ts +7 -0
  197. package/lib/components/AppHeader/components/mobile/Help.js +31 -0
  198. package/lib/components/AppHeader/components/mobile/Help.js.map +1 -0
  199. package/lib/components/AppHeader/components/mobile/LanguageSelector.d.ts +8 -0
  200. package/lib/components/AppHeader/components/mobile/LanguageSelector.js +40 -0
  201. package/lib/components/AppHeader/components/mobile/LanguageSelector.js.map +1 -0
  202. package/lib/components/AppHeader/components/mobile/Menu.d.ts +8 -0
  203. package/lib/components/AppHeader/components/mobile/Menu.js +96 -0
  204. package/lib/components/AppHeader/components/mobile/Menu.js.map +1 -0
  205. package/lib/components/AppHeader/components/mobile/MenuAccordion.d.ts +8 -0
  206. package/lib/components/AppHeader/components/mobile/MenuAccordion.js +59 -0
  207. package/lib/components/AppHeader/components/mobile/MenuAccordion.js.map +1 -0
  208. package/lib/components/AppHeader/components/mobile/MenuButton.d.ts +7 -0
  209. package/lib/components/AppHeader/components/mobile/MenuButton.js +14 -0
  210. package/lib/components/AppHeader/components/mobile/MenuButton.js.map +1 -0
  211. package/lib/components/AppHeader/components/mobile/MenuDialog.d.ts +6 -0
  212. package/lib/components/AppHeader/components/mobile/MenuDialog.js +119 -0
  213. package/lib/components/AppHeader/components/mobile/MenuDialog.js.map +1 -0
  214. package/lib/components/AppHeader/components/mobile/MenuSubHeader.d.ts +7 -0
  215. package/lib/components/AppHeader/components/mobile/MenuSubHeader.js +22 -0
  216. package/lib/components/AppHeader/components/mobile/MenuSubHeader.js.map +1 -0
  217. package/lib/components/AppHeader/components/mobile/MobileHeader.d.ts +3 -0
  218. package/lib/components/AppHeader/components/mobile/MobileHeader.js +76 -0
  219. package/lib/components/AppHeader/components/mobile/MobileHeader.js.map +1 -0
  220. package/lib/components/AppHeader/components/mobile/Navigation.d.ts +8 -0
  221. package/lib/components/AppHeader/components/mobile/Navigation.js +59 -0
  222. package/lib/components/AppHeader/components/mobile/Navigation.js.map +1 -0
  223. package/lib/components/AppHeader/components/mobile/NavigationContext.d.ts +7 -0
  224. package/lib/components/AppHeader/components/mobile/NavigationContext.js +10 -0
  225. package/lib/components/AppHeader/components/mobile/NavigationContext.js.map +1 -0
  226. package/lib/components/AppHeader/components/mobile/NavigationGroupHeader.d.ts +5 -0
  227. package/lib/components/AppHeader/components/mobile/NavigationGroupHeader.js +45 -0
  228. package/lib/components/AppHeader/components/mobile/NavigationGroupHeader.js.map +1 -0
  229. package/lib/components/AppHeader/components/mobile/NavigationItem.d.ts +6 -0
  230. package/lib/components/AppHeader/components/mobile/NavigationItem.js +82 -0
  231. package/lib/components/AppHeader/components/mobile/NavigationItem.js.map +1 -0
  232. package/lib/components/AppHeader/components/mobile/ReleaseNote.d.ts +2 -0
  233. package/lib/components/AppHeader/components/mobile/ReleaseNote.js +77 -0
  234. package/lib/components/AppHeader/components/mobile/ReleaseNote.js.map +1 -0
  235. package/lib/components/AppHeader/components/mobile/ReleaseNoteContext.d.ts +7 -0
  236. package/lib/components/AppHeader/components/mobile/ReleaseNoteContext.js +10 -0
  237. package/lib/components/AppHeader/components/mobile/ReleaseNoteContext.js.map +1 -0
  238. package/lib/components/AppHeader/components/mobile/TenantSelector.d.ts +9 -0
  239. package/lib/components/AppHeader/components/mobile/TenantSelector.js +43 -0
  240. package/lib/components/AppHeader/components/mobile/TenantSelector.js.map +1 -0
  241. package/lib/components/AppHeader/components/mobile/UserInfo.d.ts +3 -0
  242. package/lib/components/AppHeader/components/mobile/UserInfo.js +91 -0
  243. package/lib/components/AppHeader/components/mobile/UserInfo.js.map +1 -0
  244. package/lib/components/AppHeader/hooks/useAppLauncher.d.ts +18 -0
  245. package/lib/components/AppHeader/hooks/useAppLauncher.js +84 -0
  246. package/lib/components/AppHeader/hooks/useAppLauncher.js.map +1 -0
  247. package/lib/components/AppHeader/hooks/useLocale.d.ts +11 -0
  248. package/lib/components/AppHeader/hooks/useLocale.js +45 -0
  249. package/lib/components/AppHeader/hooks/useLocale.js.map +1 -0
  250. package/lib/components/AppHeader/hooks/useMediaQuery.d.ts +5 -0
  251. package/lib/components/AppHeader/hooks/useMediaQuery.js +20 -0
  252. package/lib/components/AppHeader/hooks/useMediaQuery.js.map +1 -0
  253. package/lib/components/AppHeader/hooks/useTranslate.d.ts +31 -0
  254. package/lib/components/AppHeader/hooks/useTranslate.js +12 -0
  255. package/lib/components/AppHeader/hooks/useTranslate.js.map +1 -0
  256. package/lib/components/AppHeader/index.d.ts +1 -0
  257. package/lib/components/AppHeader/index.js +6 -0
  258. package/lib/components/AppHeader/index.js.map +1 -0
  259. package/lib/components/AppHeader/multilingualization/index.d.ts +3 -0
  260. package/lib/components/AppHeader/multilingualization/index.js +8 -0
  261. package/lib/components/AppHeader/multilingualization/index.js.map +1 -0
  262. package/lib/components/AppHeader/multilingualization/localeMap.d.ts +10 -0
  263. package/lib/components/AppHeader/multilingualization/localeMap.js +14 -0
  264. package/lib/components/AppHeader/multilingualization/localeMap.js.map +1 -0
  265. package/lib/components/AppHeader/multilingualization/messages.d.ts +272 -0
  266. package/lib/components/AppHeader/multilingualization/messages.js +246 -0
  267. package/lib/components/AppHeader/multilingualization/messages.js.map +1 -0
  268. package/lib/components/AppHeader/multilingualization/translate.d.ts +3 -0
  269. package/lib/components/AppHeader/multilingualization/translate.js +8 -0
  270. package/lib/components/AppHeader/multilingualization/translate.js.map +1 -0
  271. package/lib/components/AppHeader/multilingualization/types.d.ts +3 -0
  272. package/lib/components/AppHeader/multilingualization/types.js +5 -0
  273. package/lib/components/AppHeader/multilingualization/types.js.map +1 -0
  274. package/lib/components/AppHeader/stories/args.d.ts +3 -0
  275. package/lib/components/AppHeader/stories/args.js +146 -0
  276. package/lib/components/AppHeader/stories/args.js.map +1 -0
  277. package/lib/components/AppHeader/types.d.ts +87 -0
  278. package/lib/components/AppHeader/types.js +8 -0
  279. package/lib/components/AppHeader/types.js.map +1 -0
  280. package/lib/components/AppHeader/utils.d.ts +9 -0
  281. package/lib/components/AppHeader/utils.js +17 -0
  282. package/lib/components/AppHeader/utils.js.map +1 -0
  283. package/lib/components/Button/ButtonWrapper.js +0 -1
  284. package/lib/components/Button/ButtonWrapper.js.map +1 -1
  285. package/lib/components/ComboBox/ListBoxItemButton.js +1 -3
  286. package/lib/components/ComboBox/ListBoxItemButton.js.map +1 -1
  287. package/lib/components/DatePicker/DatePicker.d.ts +1 -0
  288. package/lib/components/DatePicker/DatePicker.js +1 -0
  289. package/lib/components/DatePicker/DatePicker.js.map +1 -1
  290. package/lib/components/Dialog/MessageDialog/MessageDialogContentInner.js.map +1 -1
  291. package/lib/components/Layout/Cluster/Cluster.js +2 -2
  292. package/lib/components/Layout/Cluster/Cluster.js.map +1 -1
  293. package/lib/components/Picker/DatetimeLocalPicker.d.ts +1 -0
  294. package/lib/components/Picker/DatetimeLocalPicker.js +1 -0
  295. package/lib/components/Picker/DatetimeLocalPicker.js.map +1 -1
  296. package/lib/components/Picker/MonthPicker.d.ts +1 -0
  297. package/lib/components/Picker/MonthPicker.js +1 -0
  298. package/lib/components/Picker/MonthPicker.js.map +1 -1
  299. package/lib/components/Picker/TimePicker.d.ts +1 -0
  300. package/lib/components/Picker/TimePicker.js +1 -0
  301. package/lib/components/Picker/TimePicker.js.map +1 -1
  302. package/lib/components/WarekiPicker/WarekiPicker.d.ts +5 -0
  303. package/lib/components/WarekiPicker/WarekiPicker.js +16 -0
  304. package/lib/components/WarekiPicker/WarekiPicker.js.map +1 -0
  305. package/lib/components/WarekiPicker/index.d.ts +1 -0
  306. package/lib/components/WarekiPicker/index.js +6 -0
  307. package/lib/components/WarekiPicker/index.js.map +1 -0
  308. package/lib/hooks/usePortal.js +0 -1
  309. package/lib/hooks/usePortal.js.map +1 -1
  310. package/lib/index.d.ts +2 -0
  311. package/lib/index.js +5 -2
  312. package/lib/index.js.map +1 -1
  313. package/package.json +4 -4
  314. package/smarthr-ui.css +452 -0
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { HeaderProps } from './types';
3
+ export declare const AppHeader: FC<HeaderProps>;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import React from 'react';
3
+ import { DesktopHeader } from './components/desktop/DesktopHeader';
4
+ import { MobileHeader } from './components/mobile/MobileHeader';
5
+ import { LocaleContextProvider } from './hooks/useLocale';
6
+ import { mediaQuery, useMediaQuery } from './hooks/useMediaQuery';
7
+ export const AppHeader = ({ locale, children, ...props }) => {
8
+ // NOTE: ヘッダーの出し分けは CSS によって行われているので、useMediaQuery による children の出し分けは本来不要ですが、
9
+ // wovn の言語切替カスタム UI の挿入対象となる DOM ("wovn-embedded-widget-anchor" クラスを持った div) が複数描画されていると、
10
+ // wovn のスクリプトの仕様上1つ目の DOM にしか UI が挿入されないため、やむを得ず children のみ React のレンダリングレベルでの出し分けをしています。
11
+ const isDesktop = useMediaQuery(mediaQuery.desktop);
12
+ const isMobile = useMediaQuery(mediaQuery.mobile);
13
+ return (React.createElement(LocaleContextProvider, { locale: locale },
14
+ React.createElement(DesktopHeader, { ...props }, isDesktop && children),
15
+ React.createElement(MobileHeader, { ...props }, isMobile && children)));
16
+ };
17
+ //# sourceMappingURL=AppHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppHeader.js","sourceRoot":"","sources":["../../../src/components/AppHeader/AppHeader.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,KAAa,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAGjE,MAAM,CAAC,MAAM,SAAS,GAAoB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC3E,8EAA8E;IAC9E,2FAA2F;IAC3F,4FAA4F;IAC5F,MAAM,SAAS,GAAG,aAAa,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;IACnD,MAAM,QAAQ,GAAG,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IAEjD,OAAO,CACL,oBAAC,qBAAqB,IAAC,MAAM,EAAE,MAAM;QACnC,oBAAC,aAAa,OAAK,KAAK,IAAG,SAAS,IAAI,QAAQ,CAAiB;QACjE,oBAAC,YAAY,OAAK,KAAK,IAAG,QAAQ,IAAI,QAAQ,CAAgB,CACxC,CACzB,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+ import { Launcher } from '../../types';
3
+ type Props = {
4
+ features: Array<Launcher['feature']>;
5
+ page: Launcher['page'];
6
+ };
7
+ export declare const AppLauncherFeatures: FC<Props>;
8
+ export {};
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { tv } from 'tailwind-variants';
3
+ import { AnchorButton } from '../../../Button';
4
+ import { FaArrowRightIcon, FaStarIcon } from '../../../Icon';
5
+ import { LineClamp } from '../../../LineClamp';
6
+ import { Text } from '../../../Text';
7
+ import { mediaQuery, useMediaQuery } from '../../hooks/useMediaQuery';
8
+ import { useTranslate } from '../../hooks/useTranslate';
9
+ import { Translate } from './Translate';
10
+ const appLauncherFeatures = tv({
11
+ slots: {
12
+ empty: ['shr-p-1 shr-text-center'],
13
+ list: ['shr-list-none', '[&>li]:shr-px-0.5 [&>li]:shr-py-0.25'],
14
+ listItem: [
15
+ 'smarthr-ui-AppLauncher-listItem',
16
+ 'shr-grid shr-grid-cols-[1rem_1fr_1rem] shr-gap-0.75 shr-min-h-[2.5rem] shr-px-1 shr-py-0 shr-leading-tight shr-text-left shr-whitespace-normal',
17
+ ],
18
+ },
19
+ variants: {
20
+ favorite: {
21
+ false: {
22
+ listItem: ['shr-grid-cols-[1fr_1rem]'],
23
+ },
24
+ },
25
+ },
26
+ });
27
+ export const AppLauncherFeatures = ({ features, page }) => {
28
+ const isDesktop = useMediaQuery(mediaQuery.desktop);
29
+ const translate = useTranslate();
30
+ const { empty, list, listItem } = appLauncherFeatures();
31
+ if (features.length === 0) {
32
+ return (React.createElement("div", { className: empty() },
33
+ React.createElement(Text, { size: "S" },
34
+ React.createElement(Translate, null, translate('Launcher/emptyText')))));
35
+ }
36
+ return (React.createElement("ul", { className: list() }, features.map((feature) => (React.createElement("li", { key: feature.id },
37
+ React.createElement(AnchorButton, { className: listItem({ favorite: page === 'favorite' }), variant: "text", href: feature.url, prefix: page === 'favorite' && React.createElement(FaStarIcon, null), suffix: React.createElement(FaArrowRightIcon, null), wide: true, target: "_blank" }, isDesktop ? React.createElement(LineClamp, { maxLines: 2 }, feature.name) : feature.name))))));
38
+ };
39
+ //# sourceMappingURL=AppLauncherFeatures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppLauncherFeatures.js","sourceRoot":"","sources":["../../../../../src/components/AppHeader/components/common/AppLauncherFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGvD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAEvC,MAAM,mBAAmB,GAAG,EAAE,CAAC;IAC7B,KAAK,EAAE;QACL,KAAK,EAAE,CAAC,yBAAyB,CAAC;QAClC,IAAI,EAAE,CAAC,eAAe,EAAE,sCAAsC,CAAC;QAC/D,QAAQ,EAAE;YACR,iCAAiC;YACjC,gJAAgJ;SACjJ;KACF;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,KAAK,EAAE;gBACL,QAAQ,EAAE,CAAC,0BAA0B,CAAC;aACvC;SACF;KACF;CACF,CAAC,CAAA;AA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+ sortType: Launcher['sortType'];
5
+ onSelectSortType: (sortType: Launcher['sortType']) => void;
6
+ };
7
+ export declare const AppLauncherSortDropdown: FC<Props>;
8
+ export {};
@@ -0,0 +1,55 @@
1
+ import React, { useRef } from 'react';
2
+ import { tv } from 'tailwind-variants';
3
+ import { textColor } from '../../../../themes';
4
+ import { Button } from '../../../Button';
5
+ import { Dropdown, DropdownContent, DropdownTrigger } from '../../../Dropdown';
6
+ import { FaCaretDownIcon, FaCheckIcon } from '../../../Icon';
7
+ import { Stack } from '../../../Layout';
8
+ import { useTranslate } from '../../hooks/useTranslate';
9
+ import { Translate } from '../common/Translate';
10
+ const sortDropdown = tv({
11
+ slots: {
12
+ trigger: [
13
+ 'smarthr-ui-AppLauncher-SortDropdown-trigger',
14
+ 'shr-gap-0.25 shr-text-grey',
15
+ '[&[aria-expanded="true"]>.smarthr-ui-Icon]:shr-rotate-180',
16
+ ],
17
+ stack: ['shr-px-0.25 shr-py-0.5'],
18
+ contentButton: ['shr-border-none shr-justify-start shr-py-0.75 shr-font-normal shr-pl-2.5'],
19
+ },
20
+ variants: {
21
+ selected: {
22
+ true: {
23
+ contentButton: ['shr-pl-1'],
24
+ },
25
+ },
26
+ },
27
+ });
28
+ export const AppLauncherSortDropdown = ({ sortType, onSelectSortType }) => {
29
+ const translate = useTranslate();
30
+ const triggerRef = useRef(null);
31
+ const { trigger, stack, contentButton } = sortDropdown();
32
+ const sortMap = {
33
+ default: translate('Launcher/sortDropdownOrderDefault'),
34
+ 'name/asc': translate('Launcher/sortDropdownOrderNameAsc'),
35
+ 'name/desc': translate('Launcher/sortDropdownOrderNameDesc'),
36
+ };
37
+ return (React.createElement(Dropdown, null,
38
+ React.createElement(DropdownTrigger, null,
39
+ React.createElement(Button, { className: trigger(), size: "s", variant: "text", suffix: React.createElement(FaCaretDownIcon, null), ref: triggerRef },
40
+ React.createElement(Translate, null, translate('Launcher/sortDropdownLabel')))),
41
+ React.createElement(DropdownContent, { controllable: true },
42
+ React.createElement(Stack, { className: stack(), gap: 0, align: "stretch" }, Object.entries(sortMap).map(([key, value], i) => (React.createElement(Button, { key: i, className: contentButton({ selected: key === sortType }), prefix: key === sortType && (React.createElement(FaCheckIcon, { color: textColor.main, alt: React.createElement(Translate, null, translate('Launcher/sortDropdownSelected')) })), onClick: () => {
43
+ onSelectSortType(key);
44
+ // Dropdown がネストしており、この Dropdown のみ閉じて親の Dropdown は開いたままというのができない
45
+ // そのため、無理矢理クリックイベントを発生させて実現している
46
+ setTimeout(() => {
47
+ if (triggerRef.current) {
48
+ triggerRef.current.click();
49
+ triggerRef.current.focus();
50
+ }
51
+ }, 0);
52
+ } },
53
+ React.createElement(Translate, null, value))))))));
54
+ };
55
+ //# sourceMappingURL=AppLauncherSortDropdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppLauncherSortDropdown.js","sourceRoot":"","sources":["../../../../../src/components/AppHeader/components/common/AppLauncherSortDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAM,MAAM,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,MAAM,YAAY,GAAG,EAAE,CAAC;IACtB,KAAK,EAAE;QACL,OAAO,EAAE;YACP,6CAA6C;YAC7C,4BAA4B;YAC5B,2DAA2D;SAC5D;QACD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aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,QAAQ,EAAE,CAAC,EACxD,MAAM,EACJ,GAAG,KAAK,QAAQ,IAAI,CAClB,oBAAC,WAAW,IACV,KAAK,EAAE,SAAS,CAAC,IAAI,EACrB,GAAG,EAAE,oBAAC,SAAS,QAAE,SAAS,CAAC,+BAA+B,CAAC,CAAa,GACxE,CACH,EAEH,OAAO,EAAE,GAAG,EAAE;oBACZ,gBAAgB,CAAC,GAA2B,CAAC,CAAA;oBAE7C,iEAAiE;oBACjE,gCAAgC;oBAChC,UAAU,CAAC,GAAG,EAAE;wBACd,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;4BACvB,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;4BAC1B,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,CAAA;wBAC5B,CAAC;oBACH,CAAC,EAAE,CAAC,CAAC,CAAA;gBACP,CAAC;gBAED,oBAAC,SAAS,QAAE,KAAK,CAAa,CACvB,CACV,CAAC,CACI,CACQ,CACT,CACZ,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,92 @@
1
+ import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
2
+ export declare const commonButton: import("tailwind-variants").TVReturnType<{
3
+ prefix: {
4
+ true: string[];
5
+ };
6
+ current: {
7
+ true: string[];
8
+ };
9
+ boldWhenCurrent: {
10
+ true: null;
11
+ false: string[];
12
+ };
13
+ }, undefined, string[], import("tailwind-variants/dist/config").TVConfig<{
14
+ prefix: {
15
+ true: string[];
16
+ };
17
+ current: {
18
+ true: string[];
19
+ };
20
+ boldWhenCurrent: {
21
+ true: null;
22
+ false: string[];
23
+ };
24
+ }, {
25
+ prefix: {
26
+ true: string[];
27
+ };
28
+ current: {
29
+ true: string[];
30
+ };
31
+ boldWhenCurrent: {
32
+ true: null;
33
+ false: string[];
34
+ };
35
+ }>, {
36
+ prefix: {
37
+ true: string[];
38
+ };
39
+ current: {
40
+ true: string[];
41
+ };
42
+ boldWhenCurrent: {
43
+ true: null;
44
+ false: string[];
45
+ };
46
+ }, undefined, import("tailwind-variants").TVReturnType<{
47
+ prefix: {
48
+ true: string[];
49
+ };
50
+ current: {
51
+ true: string[];
52
+ };
53
+ boldWhenCurrent: {
54
+ true: null;
55
+ false: string[];
56
+ };
57
+ }, undefined, string[], import("tailwind-variants/dist/config").TVConfig<{
58
+ prefix: {
59
+ true: string[];
60
+ };
61
+ current: {
62
+ true: string[];
63
+ };
64
+ boldWhenCurrent: {
65
+ true: null;
66
+ false: string[];
67
+ };
68
+ }, {
69
+ prefix: {
70
+ true: string[];
71
+ };
72
+ current: {
73
+ true: string[];
74
+ };
75
+ boldWhenCurrent: {
76
+ true: null;
77
+ false: string[];
78
+ };
79
+ }>, unknown, unknown, undefined>>;
80
+ type AnchorProps = Omit<ComponentPropsWithoutRef<'a'>, 'prefix'>;
81
+ type ButtonProps = Omit<ComponentPropsWithoutRef<'button'>, 'prefix'>;
82
+ type Props = (({
83
+ elementAs: 'a';
84
+ } & AnchorProps) | ({
85
+ elementAs: 'button';
86
+ } & ButtonProps)) & {
87
+ prefix?: ReactNode;
88
+ current?: boolean;
89
+ boldWhenCurrent?: boolean;
90
+ };
91
+ export declare const CommonButton: FC<Props>;
92
+ export {};
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { tv } from 'tailwind-variants';
3
+ export const commonButton = tv({
4
+ base: [
5
+ '[&&]:shr-flex [&&]:shr-items-center [&&]:shr-w-full [&&]:shr-px-1 [&&]:shr-py-0.5 [&&]:shr-box-border [&&]:shr-bg-transparent [&&]:shr-text-base [&&]:shr-text-black [&&]:shr-leading-normal [&&]:shr-no-underline [&&]:shr-rounded-m [&&]:shr-cursor-pointer [&&]:shr-border-none',
6
+ '[&&]:hover:shr-bg-white-darken',
7
+ '[&&]:focus-visible:shr-bg-white-darken',
8
+ ],
9
+ variants: {
10
+ prefix: {
11
+ true: ['[&&]:shr-gap-0.5'],
12
+ },
13
+ current: {
14
+ true: ['[&&]:shr-bg-white-darken'],
15
+ },
16
+ boldWhenCurrent: {
17
+ true: null,
18
+ false: ['[&&]:shr-font-normal'],
19
+ },
20
+ },
21
+ compoundVariants: [
22
+ {
23
+ boldWhenCurrent: true,
24
+ current: true,
25
+ className: ['[&&]:shr-font-bold'],
26
+ },
27
+ ],
28
+ });
29
+ export const CommonButton = ({ elementAs, prefix, current, boldWhenCurrent, className, ...props }) => {
30
+ const commonButtonStyle = commonButton({
31
+ prefix: Boolean(prefix),
32
+ current,
33
+ boldWhenCurrent,
34
+ className,
35
+ });
36
+ if (elementAs === 'a') {
37
+ return (React.createElement("a", { ...props, className: commonButtonStyle },
38
+ prefix,
39
+ props.children));
40
+ }
41
+ else if (elementAs === 'button') {
42
+ return (
43
+ // eslint-disable-next-line smarthr/best-practice-for-button-element
44
+ React.createElement("button", { ...props, className: commonButtonStyle },
45
+ prefix,
46
+ props.children));
47
+ }
48
+ else {
49
+ throw new Error(elementAs);
50
+ }
51
+ };
52
+ //# sourceMappingURL=CommonButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommonButton.js","sourceRoot":"","sources":["../../../../../src/components/AppHeader/components/common/CommonButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAA;AACtE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;IAC7B,IAAI,EAAE;QACJ,oRAAoR;QACpR,gCAAgC;QAChC,wCAAwC;KACzC;IACD,QAAQ,EAAE;QACR,MAAM,EAAE;YACN,IAAI,EAAE,CAAC,kBAAkB,CAAC;SAC3B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,CAAC,0BAA0B,CAAC;SACnC;QACD,eAAe,EAAE;YACf,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,CAAC,sBAAsB,CAAC;SAChC;KACF;IACD,gBAAgB,EAAE;QAChB;YACE,eAAe,EAAE,IAAI;YACrB,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,CAAC,oBAAoB,CAAC;SAClC;KACF;CACF,CAAC,CAAA;AAWF,MAAM,CAAC,MAAM,YAAY,GAAc,CAAC,EACtC,SAAS,EACT,MAAM,EACN,OAAO,EACP,eAAe,EACf,SAAS,EACT,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,iBAAiB,GAAG,YAAY,CAAC;QACrC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;QACvB,OAAO;QACP,eAAe;QACf,SAAS;KACV,CAAC,CAAA;IAEF,IAAI,SAAS,KAAK,GAAG,EAAE,CAAC;QACtB,OAAO,CACL,8BAAQ,KAAqB,EAAE,SAAS,EAAE,iBAAiB;YACxD,MAAM;YACN,KAAK,CAAC,QAAQ,CACb,CACL,CAAA;IACH,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO;QACL,oEAAoE;QACpE,mCAAa,KAAqB,EAAE,SAAS,EAAE,iBAAiB;YAC7D,MAAM;YACN,KAAK,CAAC,QAAQ,CACR,CACV,CAAA;IACH,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,SAAyB,CAAC,CAAA;IAC5C,CAAC;AACH,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const Translate: React.NamedExoticComponent<{
3
+ children?: React.ReactNode | undefined;
4
+ }>;
@@ -0,0 +1,3 @@
1
+ import React, { memo } from 'react';
2
+ export const Translate = memo(({ children }) => (React.createElement("span", { "data-wovn-enable": "true" }, children)));
3
+ //# sourceMappingURL=Translate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Translate.js","sourceRoot":"","sources":["../../../../../src/components/AppHeader/components/common/Translate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAqB,IAAI,EAAE,MAAM,OAAO,CAAA;AAEtD,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAoB,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACjE,kDAAuB,MAAM,IAAE,QAAQ,CAAQ,CAChD,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ import { Launcher } from '../../types';
3
+ type Props = {
4
+ features: Array<Launcher['feature']>;
5
+ };
6
+ export declare const AppLauncher: FC<Props>;
7
+ export {};
@@ -0,0 +1,115 @@
1
+ import React from 'react';
2
+ import { tv } from 'tailwind-variants';
3
+ import { textColor } from '../../../../themes';
4
+ import { UnstyledButton } from '../../../Button';
5
+ import { Heading } from '../../../Heading';
6
+ import { FaCircleXmarkIcon, FaStarIcon } from '../../../Icon';
7
+ import { SearchInput } from '../../../Input';
8
+ import { Cluster } from '../../../Layout';
9
+ import { Section } from '../../../SectioningContent';
10
+ import { SideNav } from '../../../SideNav';
11
+ import { TextLink } from '../../../TextLink';
12
+ import { useAppLauncher } from '../../hooks/useAppLauncher';
13
+ import { useTranslate } from '../../hooks/useTranslate';
14
+ import { AppLauncherFeatures } from '../common/AppLauncherFeatures';
15
+ import { AppLauncherSortDropdown } from '../common/AppLauncherSortDropdown';
16
+ import { Translate } from '../common/Translate';
17
+ const appLauncher = tv({
18
+ slots: {
19
+ wrapper: [
20
+ 'smarthr-ui-AppLauncher',
21
+ 'shr-grid shr-grid-rows-[auto_1fr] shr-w-[38rem] shr-h-[40rem]',
22
+ ],
23
+ searchArea: [
24
+ 'smarthr-ui-AppLauncher-searchArea',
25
+ 'shr-p-1 shr-border-b-shorthand',
26
+ '[&_.smarthr-ui-Input]:shr-h-[42px]',
27
+ ],
28
+ inner: ['smarthr-ui-AppLauncher-inner', 'shr-grid shr-grid-cols-[11rem_1fr] shr-min-h-0'],
29
+ side: [
30
+ 'smarthr-ui-AppLauncher-side',
31
+ 'shr-flex shr-flex-col shr-pt-0.5 shr-pb-1 shr-border-r-shorthand shr-bg-column',
32
+ '[&_hr]:shr-h-[1px] [&_hr]:shr-m-0.5 [&_hr]:shr-border-none [&_hr]:shr-bg-border',
33
+ ],
34
+ sideNav: [
35
+ '[&_.smarthr-ui-SideNav-item>button]:shr-py-0.75 [&_.smarthr-ui-SideNav-item>button]:shr-px-1',
36
+ '[&_.smarthr-ui-SideNav-item>button>span]:shr-flex-nowrap',
37
+ '[&_.smarthr-ui-SideNav-item>button_.smarthr-ui-Icon]:shr-shrink-0 [&_.smarthr-ui-SideNav-item>button_.smarthr-ui-Icon]:shr-align-bottom',
38
+ ],
39
+ sideNavHeading: ['shr-py-0.75 shr-px-1 shr-text-xs shr-text-black'],
40
+ help: ['smarthr-ui-AppLauncher-help', 'shr-mt-auto shr-px-1 shr-text-xs'],
41
+ main: ['smarthr-ui-AppLauncher-main', 'shr-grid shr-min-h-0'],
42
+ mainInner: ['shr-grid shr-grid-rows-[auto_1fr] shr-min-h-0'],
43
+ contentHead: [
44
+ 'shr-min-h-[2rem] shr-py-0.75 shr-px-1',
45
+ '[&_.smarthr-ui-Heading]:shr-text-black',
46
+ ],
47
+ scrollArea: ['shr-overflow-y-scroll shr-h-[509px]'],
48
+ },
49
+ variants: {
50
+ noIcon: {
51
+ true: {
52
+ sideNav: ['[&_.smarthr-ui-SideNav-item>button]:shr-pl-1.5'],
53
+ },
54
+ },
55
+ selected: {
56
+ false: {
57
+ sideNav: ['[&_.smarthr-ui-SideNav-item>button_.smarthr-ui-Icon]:shr-text-grey'],
58
+ },
59
+ },
60
+ },
61
+ });
62
+ export const AppLauncher = ({ features: baseFeatures }) => {
63
+ const translate = useTranslate();
64
+ const { features, page, mode, sortType, searchQuery, changePage, setSortType, changeSearchQuery, } = useAppLauncher(baseFeatures);
65
+ const { wrapper, searchArea, inner, side, sideNav, sideNavHeading, help, main, mainInner, contentHead, scrollArea, } = appLauncher();
66
+ const pageMap = {
67
+ favorite: React.createElement(Translate, null, translate('Launcher/favoriteModeText')),
68
+ all: React.createElement(Translate, null, translate('Launcher/allModeText')),
69
+ };
70
+ return (React.createElement("div", { className: wrapper() },
71
+ React.createElement("div", { className: searchArea() },
72
+ React.createElement(SearchInput, { name: "search", title: translate('Launcher/searchInputTitle'), tooltipMessage: React.createElement(Translate, null, translate('Launcher/searchInputTitle')), width: "100%", value: searchQuery, suffix: mode === 'search' && (React.createElement(UnstyledButton, { onClick: () => {
73
+ // 別のキューにしないとドロップダウンが閉じてしまう
74
+ setTimeout(() => {
75
+ changeSearchQuery('');
76
+ }, 0);
77
+ } },
78
+ React.createElement(FaCircleXmarkIcon, null))), onChange: (e) => changeSearchQuery(e.target.value) })),
79
+ React.createElement("div", { className: inner() },
80
+ React.createElement("div", { className: side() },
81
+ React.createElement(SideNav, { className: sideNav({ selected: false }), size: "s", items: [
82
+ {
83
+ id: 'favorite',
84
+ title: pageMap.favorite,
85
+ prefix: (React.createElement(FaStarIcon, { color: mode !== 'search' && page === 'favorite' ? textColor.white : undefined })),
86
+ isSelected: mode !== 'search' && page === 'favorite',
87
+ },
88
+ ], onClick: (_, id) => {
89
+ changePage(id);
90
+ } }),
91
+ React.createElement("hr", null),
92
+ React.createElement(Section, null,
93
+ React.createElement(Heading, { className: sideNavHeading(), type: "subSubBlockTitle" },
94
+ React.createElement(Translate, null, translate('Launcher/listText'))),
95
+ React.createElement(SideNav, { className: sideNav({ noIcon: true, selected: true }), size: "s", items: [
96
+ {
97
+ id: 'all',
98
+ title: pageMap.all,
99
+ isSelected: mode !== 'search' && page === 'all',
100
+ },
101
+ ], onClick: (_, id) => {
102
+ changePage(id);
103
+ } })),
104
+ React.createElement("div", { className: help() },
105
+ React.createElement(TextLink, { href: "https://support.smarthr.jp/ja/help/articles/2bfd350d-8e8b-4bbd-a209-426d2eb302cc/", target: "_blank" },
106
+ React.createElement(Translate, null, translate('Launcher/helpText'))))),
107
+ React.createElement("main", { className: main() },
108
+ React.createElement(Section, { className: mainInner() },
109
+ React.createElement(Cluster, { className: contentHead(), align: "center", justify: "space-between" },
110
+ React.createElement(Heading, { type: "subSubBlockTitle" }, mode === 'search' ? (React.createElement(Translate, null, translate('Launcher/searchResultText'))) : (pageMap[page])),
111
+ (mode === 'search' || page === 'all') && (React.createElement(AppLauncherSortDropdown, { sortType: sortType, onSelectSortType: (value) => setSortType(value) }))),
112
+ React.createElement("div", { className: scrollArea() },
113
+ React.createElement(AppLauncherFeatures, { features: features, page: page })))))));
114
+ };
115
+ //# sourceMappingURL=AppLauncher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppLauncher.js","sourceRoot":"","sources":["../../../../../src/components/AppHeader/components/desktop/AppLauncher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAM/C,MAAM,WAAW,GAAG,EAAE,CAAC;IACrB,KAAK,EAAE;QACL,OAAO,EAAE;YACP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AC7B,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CACnB,oBAAC,SAAS,QAAE,SAAS,CAAC,2BAA2B,CAAC,CAAa,CAChE,CAAC,CAAC,CAAC,CACF,OAAO,CAAC,IAAI,CAAC,CACd,CACO;wBAET,CAAC,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,KAAK,CAAC,IAAI,CACxC,oBAAC,uBAAuB,IACtB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,GAC/C,CACH,CACO;oBAEV,6BAAK,SAAS,EAAE,UAAU,EAAE;wBAC1B,oBAAC,mBAAmB,IAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAI,CACnD,CACE,CACL,CACH,CACF,CACP,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ import { FC } from 'react';
2
+ import { HeaderProps } from '../../types';
3
+ export declare const DesktopHeader: FC<HeaderProps>;
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import { tv } from 'tailwind-variants';
3
+ import { Button } from '../../../Button';
4
+ import { Dropdown, DropdownContent, DropdownTrigger } from '../../../Dropdown';
5
+ import { Header, HeaderLink, LanguageSwitcher } from '../../../Header';
6
+ import { FaCircleQuestionIcon, FaGraduationCapIcon, FaRegCircleQuestionIcon, FaToolboxIcon, } from '../../../Icon';
7
+ import { Cluster } from '../../../Layout';
8
+ import { useLocale } from '../../hooks/useLocale';
9
+ import { useTranslate } from '../../hooks/useTranslate';
10
+ import { localeMap } from '../../multilingualization';
11
+ import { Translate } from '../common/Translate';
12
+ import { AppLauncher } from './AppLauncher';
13
+ import { Navigation } from './Navigation';
14
+ import { UserInfo } from './UserInfo';
15
+ const desktopHeader = tv({
16
+ slots: {
17
+ wrapper: 'max-[751px]:!shr-hidden',
18
+ appsButton: [
19
+ 'shr-border-none shr-font-normal shr-text-white shr-bg-transparent shr-px-0.25',
20
+ 'hover:shr-border-transparent hover:shr-bg-transparent',
21
+ 'focus-visible:shr-border-transparent focus-visible:shr-bg-transparent',
22
+ 'forced-colors:shr-border-shorthand',
23
+ ],
24
+ },
25
+ variants: {
26
+ enableNew: {
27
+ true: {
28
+ appsButton: [
29
+ 'shr-px-0.5 shr-font-bold shr-text-black',
30
+ '[&_>_svg]:aria-expanded:shr-rotate-180',
31
+ 'hover:shr-bg-white-darken',
32
+ 'focus-visible:shr-bg-white-darken',
33
+ ],
34
+ },
35
+ },
36
+ },
37
+ });
38
+ export const DesktopHeader = ({ enableNew, className = '', appName, tenants, currentTenantId, schoolUrl, helpPageUrl, children, userInfo, desktopAdditionalContent, navigations, desktopNavigationAdditionalContent, releaseNote, features, ...props }) => {
39
+ const translate = useTranslate();
40
+ const { locale } = useLocale();
41
+ const { wrapper, appsButton } = desktopHeader();
42
+ return (React.createElement(React.Fragment, null,
43
+ React.createElement(Header, { ...props, enableNew: enableNew, className: `${className} ${wrapper()}`, featureName: appName, tenants: tenants, currentTenantId: currentTenantId },
44
+ React.createElement(Cluster, { align: "center", className: "shr--me-0.25" },
45
+ !enableNew && (React.createElement(React.Fragment, null,
46
+ features && features.length > 0 && (React.createElement(Dropdown, null,
47
+ React.createElement(DropdownTrigger, null,
48
+ React.createElement(Button, { prefix: enableNew ?? React.createElement(FaToolboxIcon, null), className: appsButton() },
49
+ React.createElement(Translate, null, translate('DesktopHeader/DesktopHeader/appLauncherLabel')))),
50
+ React.createElement(DropdownContent, { controllable: true },
51
+ React.createElement(AppLauncher, { features: features })))),
52
+ schoolUrl && (React.createElement(HeaderLink, { href: schoolUrl, prefix: React.createElement(FaGraduationCapIcon, null), className: "shr-flex shr-items-center shr-py-0.75 shr-leading-none" },
53
+ React.createElement(Translate, null, translate('common/school')))))),
54
+ helpPageUrl && (React.createElement(HeaderLink, { href: helpPageUrl, prefix: enableNew ? React.createElement(FaRegCircleQuestionIcon, null) : React.createElement(FaCircleQuestionIcon, null), className: enableNew ? undefined : 'shr-flex shr-items-center shr-py-0.75 shr-leading-none', enableNew: enableNew },
55
+ React.createElement(Translate, null, translate('common/help')))),
56
+ locale && (React.createElement(LanguageSwitcher, { localeMap: localeMap, locale: locale.selectedLocale, onLanguageSelect: locale.onSelectLocale, enableNew: enableNew })),
57
+ children,
58
+ userInfo && (React.createElement(UserInfo, { ...userInfo, tenants: tenants, currentTenantId: currentTenantId, desktopAdditionalContent: desktopAdditionalContent, enableNew: enableNew })))),
59
+ navigations && (React.createElement(Navigation, { appName: appName, navigations: navigations, additionalContent: desktopNavigationAdditionalContent, releaseNote: releaseNote, enableNew: enableNew }))));
60
+ };
61
+ //# sourceMappingURL=DesktopHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DesktopHeader.js","sourceRoot":"","sources":["../../../../../src/components/AppHeader/components/desktop/DesktopHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAA;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACtE,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,aAAa,GACd,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;A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OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,kCAAkC,EACrD,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,GACpB,CACH,CACA,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { FC, ReactNode } from 'react';
2
+ import { Navigation as NavigationType, ReleaseNoteProps } from '../../types';
3
+ type Props = {
4
+ appName: ReactNode;
5
+ navigations: NavigationType[];
6
+ additionalContent: ReactNode;
7
+ releaseNote?: ReleaseNoteProps | null;
8
+ enableNew?: boolean;
9
+ };
10
+ export declare const Navigation: FC<Props>;
11
+ export {};
@@ -0,0 +1,77 @@
1
+ import React, { Fragment } from 'react';
2
+ import { tv } from 'tailwind-variants';
3
+ import { AppNavi } from '../../../AppNavi';
4
+ import { Cluster } from '../../../Layout';
5
+ import { Text } from '../../../Text';
6
+ import { isChildNavigation, isChildNavigationGroup } from '../../utils';
7
+ import { CommonButton, commonButton } from '../common/CommonButton';
8
+ import { ReleaseNotesDropdown } from './ReleaseNotesDropdown';
9
+ const appNavi = tv({
10
+ base: ['shr-overflow-x-auto shr-min-w-[auto]', 'max-[751px]:!shr-hidden'],
11
+ variants: {
12
+ withReleaseNote: {
13
+ true: ['[&&]:shr-pe-0'],
14
+ },
15
+ },
16
+ });
17
+ export const Navigation = ({ appName, navigations, additionalContent, releaseNote, enableNew, }) => {
18
+ const buttons = buildButtonsFromNavigations(navigations);
19
+ return (React.createElement(AppNavi, { label: enableNew ? undefined : appName, buttons: buttons, className: appNavi({ withReleaseNote: !!releaseNote }), displayDropdownCaret: true, additionalArea: React.createElement(Cluster, { align: "center", className: "shr-flex-nowrap shr-ps-1" },
20
+ additionalContent,
21
+ releaseNote && React.createElement(ReleaseNotesDropdown, { ...releaseNote })) }));
22
+ };
23
+ const navigationTitle = tv({
24
+ base: ['shr-px-1 shr-pt-0.5 shr-pb-0.25'],
25
+ });
26
+ const separator = tv({
27
+ base: ['[&&]:shr-mx-0 [&&]:shr-my-0.5 [&&]:shr-border-b-shorthand'],
28
+ });
29
+ // TODO smarthr-ui 側でグループ化された Navigation が対応されたら AppNaviDropdownMenuButton を使った実装に変更する
30
+ const buildButtonsFromNavigations = (navigations) => navigations.map((navigation) => {
31
+ if (isChildNavigation(navigation)) {
32
+ // smarthr-ui の buttons props ではカスタムエレメントは elementAs ではなく tag という名前なので変換する必要がある
33
+ if ('elementAs' in navigation) {
34
+ const { elementAs, ...rest } = navigation;
35
+ return {
36
+ ...rest,
37
+ tag: elementAs,
38
+ };
39
+ }
40
+ return navigation;
41
+ }
42
+ // 子要素に current を持っているものがあるかどうか
43
+ const childrenHasCurrent = navigation.childNavigations.some((child) => {
44
+ if (isChildNavigation(child))
45
+ return child.current;
46
+ return child.childNavigations.some((c) => c.current);
47
+ });
48
+ return {
49
+ ...navigation,
50
+ current: navigation.current || childrenHasCurrent,
51
+ dropdownContent: (React.createElement("div", { className: "shr-py-0.5" }, navigation.childNavigations.map((childNavigation, i) => {
52
+ if (isChildNavigationGroup(childNavigation)) {
53
+ const { childNavigations } = childNavigation;
54
+ return (React.createElement(Fragment, { key: childNavigation.title.toString() },
55
+ React.createElement("div", { className: "shr-px-0.5" },
56
+ React.createElement(Text, { styleType: "subSubBlockTitle", as: "p", className: navigationTitle() }, childNavigation.title),
57
+ childNavigations.map((child) => (React.createElement(Fragment, { key: child.children.toString() }, buildDropdownItemFromNavigation(child))))),
58
+ i + 1 !== navigation.childNavigations.length && React.createElement("hr", { className: separator() })));
59
+ }
60
+ const nextChildNavigation = navigation.childNavigations[i + 1];
61
+ return (React.createElement(Fragment, { key: childNavigation.children.toString() },
62
+ React.createElement("div", { className: "shr-px-0.5" }, buildDropdownItemFromNavigation(childNavigation)),
63
+ isChildNavigationGroup(nextChildNavigation) && React.createElement("hr", { className: separator() })));
64
+ }))),
65
+ };
66
+ });
67
+ const buildDropdownItemFromNavigation = (navigation) => {
68
+ if ('elementAs' in navigation) {
69
+ const { elementAs: Tag, current: isCurrent, ...rest } = navigation;
70
+ return (React.createElement(Tag, { ...rest, className: commonButton({ current: isCurrent, className: rest.className }) }));
71
+ }
72
+ if ('href' in navigation) {
73
+ return React.createElement(CommonButton, { ...navigation, elementAs: "a", current: navigation.current });
74
+ }
75
+ return (React.createElement(CommonButton, { ...navigation, elementAs: "button", type: "button", current: navigation.current }));
76
+ };
77
+ //# sourceMappingURL=Navigation.js.map