smarthr-ui 100.0.0 → 101.0.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 (772) hide show
  1. package/lib/components/AccordionPanel/client/AccordionPanel.cjs.map +1 -1
  2. package/lib/components/AccordionPanel/client/AccordionPanel.d.ts +2 -2
  3. package/lib/components/AccordionPanel/client/AccordionPanel.js.map +1 -1
  4. package/lib/components/AccordionPanel/client/AccordionPanelItem.cjs.map +1 -1
  5. package/lib/components/AccordionPanel/client/AccordionPanelItem.d.ts +2 -2
  6. package/lib/components/AccordionPanel/client/AccordionPanelItem.js.map +1 -1
  7. package/lib/components/AccordionPanel/client/AccordionPanelTrigger.cjs.map +1 -1
  8. package/lib/components/AccordionPanel/client/AccordionPanelTrigger.d.ts +2 -2
  9. package/lib/components/AccordionPanel/client/AccordionPanelTrigger.js.map +1 -1
  10. package/lib/components/AppHeader/AppHeader.cjs +3 -3
  11. package/lib/components/AppHeader/AppHeader.cjs.map +1 -1
  12. package/lib/components/AppHeader/AppHeader.js +3 -3
  13. package/lib/components/AppHeader/AppHeader.js.map +1 -1
  14. package/lib/components/AppHeader/components/common/AppLauncherFeatures.cjs +2 -3
  15. package/lib/components/AppHeader/components/common/AppLauncherFeatures.cjs.map +1 -1
  16. package/lib/components/AppHeader/components/common/AppLauncherFeatures.js +2 -3
  17. package/lib/components/AppHeader/components/common/AppLauncherFeatures.js.map +1 -1
  18. package/lib/components/AppHeader/components/common/AppLauncherSortDropdown.cjs +2 -3
  19. package/lib/components/AppHeader/components/common/AppLauncherSortDropdown.cjs.map +1 -1
  20. package/lib/components/AppHeader/components/common/AppLauncherSortDropdown.js +2 -3
  21. package/lib/components/AppHeader/components/common/AppLauncherSortDropdown.js.map +1 -1
  22. package/lib/components/AppHeader/components/common/CommonButton.cjs +2 -2
  23. package/lib/components/AppHeader/components/common/CommonButton.cjs.map +1 -1
  24. package/lib/components/AppHeader/components/common/CommonButton.js +3 -3
  25. package/lib/components/AppHeader/components/common/CommonButton.js.map +1 -1
  26. package/lib/components/AppHeader/components/desktop/AppLauncher.cjs +8 -7
  27. package/lib/components/AppHeader/components/desktop/AppLauncher.cjs.map +1 -1
  28. package/lib/components/AppHeader/components/desktop/AppLauncher.js +8 -7
  29. package/lib/components/AppHeader/components/desktop/AppLauncher.js.map +1 -1
  30. package/lib/components/AppHeader/components/desktop/DesktopHeader.cjs +2 -3
  31. package/lib/components/AppHeader/components/desktop/DesktopHeader.cjs.map +1 -1
  32. package/lib/components/AppHeader/components/desktop/DesktopHeader.js +2 -3
  33. package/lib/components/AppHeader/components/desktop/DesktopHeader.js.map +1 -1
  34. package/lib/components/AppHeader/components/desktop/ReleaseNotesDropdown.cjs +3 -4
  35. package/lib/components/AppHeader/components/desktop/ReleaseNotesDropdown.cjs.map +1 -1
  36. package/lib/components/AppHeader/components/desktop/ReleaseNotesDropdown.js +3 -4
  37. package/lib/components/AppHeader/components/desktop/ReleaseNotesDropdown.js.map +1 -1
  38. package/lib/components/AppHeader/components/desktop/UserInfo.cjs +3 -4
  39. package/lib/components/AppHeader/components/desktop/UserInfo.cjs.map +1 -1
  40. package/lib/components/AppHeader/components/desktop/UserInfo.js +3 -4
  41. package/lib/components/AppHeader/components/desktop/UserInfo.js.map +1 -1
  42. package/lib/components/AppHeader/components/mobile/AppLauncher.cjs +5 -4
  43. package/lib/components/AppHeader/components/mobile/AppLauncher.cjs.map +1 -1
  44. package/lib/components/AppHeader/components/mobile/AppLauncher.js +5 -4
  45. package/lib/components/AppHeader/components/mobile/AppLauncher.js.map +1 -1
  46. package/lib/components/AppHeader/components/mobile/AppLauncherFilterDropdown.cjs +3 -4
  47. package/lib/components/AppHeader/components/mobile/AppLauncherFilterDropdown.cjs.map +1 -1
  48. package/lib/components/AppHeader/components/mobile/AppLauncherFilterDropdown.js +3 -4
  49. package/lib/components/AppHeader/components/mobile/AppLauncherFilterDropdown.js.map +1 -1
  50. package/lib/components/AppHeader/components/mobile/Help.cjs +1 -2
  51. package/lib/components/AppHeader/components/mobile/Help.cjs.map +1 -1
  52. package/lib/components/AppHeader/components/mobile/Help.js +1 -2
  53. package/lib/components/AppHeader/components/mobile/Help.js.map +1 -1
  54. package/lib/components/AppHeader/components/mobile/Menu.cjs +1 -2
  55. package/lib/components/AppHeader/components/mobile/Menu.cjs.map +1 -1
  56. package/lib/components/AppHeader/components/mobile/Menu.js +1 -2
  57. package/lib/components/AppHeader/components/mobile/Menu.js.map +1 -1
  58. package/lib/components/AppHeader/components/mobile/MenuAccordion.cjs +1 -2
  59. package/lib/components/AppHeader/components/mobile/MenuAccordion.cjs.map +1 -1
  60. package/lib/components/AppHeader/components/mobile/MenuAccordion.js +1 -2
  61. package/lib/components/AppHeader/components/mobile/MenuAccordion.js.map +1 -1
  62. package/lib/components/AppHeader/components/mobile/MenuButton.cjs +1 -2
  63. package/lib/components/AppHeader/components/mobile/MenuButton.cjs.map +1 -1
  64. package/lib/components/AppHeader/components/mobile/MenuButton.d.ts +4 -2
  65. package/lib/components/AppHeader/components/mobile/MenuButton.js +1 -2
  66. package/lib/components/AppHeader/components/mobile/MenuButton.js.map +1 -1
  67. package/lib/components/AppHeader/components/mobile/MenuDialog.cjs +5 -5
  68. package/lib/components/AppHeader/components/mobile/MenuDialog.js +5 -5
  69. package/lib/components/AppHeader/components/mobile/MenuSubHeading.cjs +1 -2
  70. package/lib/components/AppHeader/components/mobile/MenuSubHeading.cjs.map +1 -1
  71. package/lib/components/AppHeader/components/mobile/MenuSubHeading.js +1 -2
  72. package/lib/components/AppHeader/components/mobile/MenuSubHeading.js.map +1 -1
  73. package/lib/components/AppHeader/components/mobile/Navigation.cjs.map +1 -1
  74. package/lib/components/AppHeader/components/mobile/Navigation.js.map +1 -1
  75. package/lib/components/AppHeader/components/mobile/NavigationItem.cjs +3 -4
  76. package/lib/components/AppHeader/components/mobile/NavigationItem.cjs.map +1 -1
  77. package/lib/components/AppHeader/components/mobile/NavigationItem.js +3 -4
  78. package/lib/components/AppHeader/components/mobile/NavigationItem.js.map +1 -1
  79. package/lib/components/AppHeader/components/mobile/ReleaseNote.cjs +2 -3
  80. package/lib/components/AppHeader/components/mobile/ReleaseNote.cjs.map +1 -1
  81. package/lib/components/AppHeader/components/mobile/ReleaseNote.js +2 -3
  82. package/lib/components/AppHeader/components/mobile/ReleaseNote.js.map +1 -1
  83. package/lib/components/AppHeader/components/mobile/UserInfo.cjs +6 -7
  84. package/lib/components/AppHeader/components/mobile/UserInfo.cjs.map +1 -1
  85. package/lib/components/AppHeader/components/mobile/UserInfo.js +6 -7
  86. package/lib/components/AppHeader/components/mobile/UserInfo.js.map +1 -1
  87. package/lib/components/AppNavi/AppNavi.cjs.map +1 -1
  88. package/lib/components/AppNavi/AppNavi.d.ts +2 -2
  89. package/lib/components/AppNavi/AppNavi.js.map +1 -1
  90. package/lib/components/Badge/Badge.cjs +3 -3
  91. package/lib/components/Badge/Badge.cjs.map +1 -1
  92. package/lib/components/Badge/Badge.d.ts +4 -9
  93. package/lib/components/Badge/Badge.js +3 -3
  94. package/lib/components/Badge/Badge.js.map +1 -1
  95. package/lib/components/BottomFixedArea/BottomFixedArea.cjs.map +1 -1
  96. package/lib/components/BottomFixedArea/BottomFixedArea.d.ts +2 -2
  97. package/lib/components/BottomFixedArea/BottomFixedArea.js.map +1 -1
  98. package/lib/components/Browser/Browser.cjs.map +1 -1
  99. package/lib/components/Browser/Browser.d.ts +2 -2
  100. package/lib/components/Browser/Browser.js.map +1 -1
  101. package/lib/components/Browser/BrowserColumn.cjs.map +1 -1
  102. package/lib/components/Browser/BrowserColumn.d.ts +2 -2
  103. package/lib/components/Browser/BrowserColumn.js.map +1 -1
  104. package/lib/components/Button/AnchorButton.cjs.map +1 -1
  105. package/lib/components/Button/AnchorButton.d.ts +2 -2
  106. package/lib/components/Button/AnchorButton.js.map +1 -1
  107. package/lib/components/Button/Button.cjs.map +1 -1
  108. package/lib/components/Button/Button.d.ts +2 -2
  109. package/lib/components/Button/Button.js.map +1 -1
  110. package/lib/components/Button/UnstyledButton.cjs.map +1 -1
  111. package/lib/components/Button/UnstyledButton.d.ts +3 -1
  112. package/lib/components/Button/UnstyledButton.js.map +1 -1
  113. package/lib/components/Button/client/ActualButton.cjs.map +1 -1
  114. package/lib/components/Button/client/ActualButton.d.ts +2 -2
  115. package/lib/components/Button/client/ActualButton.js.map +1 -1
  116. package/lib/components/Button/client/AnchorButtonInner.cjs +2 -2
  117. package/lib/components/Button/client/AnchorButtonInner.cjs.map +1 -1
  118. package/lib/components/Button/client/AnchorButtonInner.d.ts +3 -3
  119. package/lib/components/Button/client/AnchorButtonInner.js +2 -2
  120. package/lib/components/Button/client/AnchorButtonInner.js.map +1 -1
  121. package/lib/components/Button/style.cjs +12 -0
  122. package/lib/components/Button/style.cjs.map +1 -1
  123. package/lib/components/Button/style.js +12 -0
  124. package/lib/components/Button/style.js.map +1 -1
  125. package/lib/components/Checkbox/Checkbox.cjs.map +1 -1
  126. package/lib/components/Checkbox/Checkbox.d.ts +2 -2
  127. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  128. package/lib/components/Checkbox/client/ActualCheckbox.cjs +8 -4
  129. package/lib/components/Checkbox/client/ActualCheckbox.cjs.map +1 -1
  130. package/lib/components/Checkbox/client/ActualCheckbox.d.ts +2 -2
  131. package/lib/components/Checkbox/client/ActualCheckbox.js +8 -4
  132. package/lib/components/Checkbox/client/ActualCheckbox.js.map +1 -1
  133. package/lib/components/Chip/Chip.cjs.map +1 -1
  134. package/lib/components/Chip/Chip.d.ts +2 -2
  135. package/lib/components/Chip/Chip.js.map +1 -1
  136. package/lib/components/Combobox/client/MultiCombobox/MultiCombobox.cjs.map +1 -1
  137. package/lib/components/Combobox/client/MultiCombobox/MultiCombobox.d.ts +2 -2
  138. package/lib/components/Combobox/client/MultiCombobox/MultiCombobox.js.map +1 -1
  139. package/lib/components/Combobox/client/SingleCombobox/SingleCombobox.cjs +11 -9
  140. package/lib/components/Combobox/client/SingleCombobox/SingleCombobox.cjs.map +1 -1
  141. package/lib/components/Combobox/client/SingleCombobox/SingleCombobox.d.ts +5 -5
  142. package/lib/components/Combobox/client/SingleCombobox/SingleCombobox.js +11 -9
  143. package/lib/components/Combobox/client/SingleCombobox/SingleCombobox.js.map +1 -1
  144. package/lib/components/DefinitionList/DefinitionList.cjs +2 -2
  145. package/lib/components/DefinitionList/DefinitionList.cjs.map +1 -1
  146. package/lib/components/DefinitionList/DefinitionList.d.ts +2 -4
  147. package/lib/components/DefinitionList/DefinitionList.js +2 -2
  148. package/lib/components/DefinitionList/DefinitionList.js.map +1 -1
  149. package/lib/components/DefinitionList/DefinitionListItem.cjs +2 -2
  150. package/lib/components/DefinitionList/DefinitionListItem.cjs.map +1 -1
  151. package/lib/components/DefinitionList/DefinitionListItem.d.ts +4 -5
  152. package/lib/components/DefinitionList/DefinitionListItem.js +2 -2
  153. package/lib/components/DefinitionList/DefinitionListItem.js.map +1 -1
  154. package/lib/components/DefinitionList/client/ItemWrapper.cjs +9 -6
  155. package/lib/components/DefinitionList/client/ItemWrapper.cjs.map +1 -1
  156. package/lib/components/DefinitionList/client/ItemWrapper.d.ts +3 -3
  157. package/lib/components/DefinitionList/client/ItemWrapper.js +9 -6
  158. package/lib/components/DefinitionList/client/ItemWrapper.js.map +1 -1
  159. package/lib/components/Dialog/ControlledActionDialog/{ActionDialogContentInner.cjs → ActionDialogContent.cjs} +5 -5
  160. package/lib/components/Dialog/ControlledActionDialog/ActionDialogContent.cjs.map +1 -0
  161. package/lib/components/Dialog/ControlledActionDialog/{ActionDialogContentInner.d.ts → ActionDialogContent.d.ts} +3 -3
  162. package/lib/components/Dialog/ControlledActionDialog/{ActionDialogContentInner.js → ActionDialogContent.js} +5 -5
  163. package/lib/components/Dialog/ControlledActionDialog/ActionDialogContent.js.map +1 -0
  164. package/lib/components/Dialog/ControlledActionDialog/ControlledActionDialog.cjs +3 -3
  165. package/lib/components/Dialog/ControlledActionDialog/ControlledActionDialog.cjs.map +1 -1
  166. package/lib/components/Dialog/ControlledActionDialog/ControlledActionDialog.d.ts +9 -9
  167. package/lib/components/Dialog/ControlledActionDialog/ControlledActionDialog.js +3 -3
  168. package/lib/components/Dialog/ControlledActionDialog/ControlledActionDialog.js.map +1 -1
  169. package/lib/components/Dialog/ControlledFormDialog/ControlledFormDialog.cjs +3 -3
  170. package/lib/components/Dialog/ControlledFormDialog/ControlledFormDialog.cjs.map +1 -1
  171. package/lib/components/Dialog/ControlledFormDialog/ControlledFormDialog.d.ts +8 -8
  172. package/lib/components/Dialog/ControlledFormDialog/ControlledFormDialog.js +3 -3
  173. package/lib/components/Dialog/ControlledFormDialog/ControlledFormDialog.js.map +1 -1
  174. package/lib/components/Dialog/ControlledFormDialog/{FormDialogContentInner.cjs → FormDialogContent.cjs} +7 -7
  175. package/lib/components/Dialog/ControlledFormDialog/FormDialogContent.cjs.map +1 -0
  176. package/lib/components/Dialog/ControlledFormDialog/{FormDialogContentInner.d.ts → FormDialogContent.d.ts} +3 -3
  177. package/lib/components/Dialog/ControlledFormDialog/{FormDialogContentInner.js → FormDialogContent.js} +7 -7
  178. package/lib/components/Dialog/ControlledFormDialog/FormDialogContent.js.map +1 -0
  179. package/lib/components/Dialog/ControlledMessageDialog/ControlledMessageDialog.cjs +3 -3
  180. package/lib/components/Dialog/ControlledMessageDialog/ControlledMessageDialog.cjs.map +1 -1
  181. package/lib/components/Dialog/ControlledMessageDialog/ControlledMessageDialog.d.ts +6 -6
  182. package/lib/components/Dialog/ControlledMessageDialog/ControlledMessageDialog.js +3 -3
  183. package/lib/components/Dialog/ControlledMessageDialog/ControlledMessageDialog.js.map +1 -1
  184. package/lib/components/Dialog/ControlledMessageDialog/{MessageDialogContentInner.cjs → MessageDialogContent.cjs} +5 -5
  185. package/lib/components/Dialog/ControlledMessageDialog/MessageDialogContent.cjs.map +1 -0
  186. package/lib/components/Dialog/ControlledMessageDialog/{MessageDialogContentInner.d.ts → MessageDialogContent.d.ts} +3 -3
  187. package/lib/components/Dialog/ControlledMessageDialog/{MessageDialogContentInner.js → MessageDialogContent.js} +5 -5
  188. package/lib/components/Dialog/ControlledMessageDialog/MessageDialogContent.js.map +1 -0
  189. package/lib/components/Dialog/ControlledStepFormDialog/ControlledStepFormDialog.cjs +3 -3
  190. package/lib/components/Dialog/ControlledStepFormDialog/ControlledStepFormDialog.cjs.map +1 -1
  191. package/lib/components/Dialog/ControlledStepFormDialog/ControlledStepFormDialog.d.ts +7 -7
  192. package/lib/components/Dialog/ControlledStepFormDialog/ControlledStepFormDialog.js +3 -3
  193. package/lib/components/Dialog/ControlledStepFormDialog/ControlledStepFormDialog.js.map +1 -1
  194. package/lib/components/Dialog/ControlledStepFormDialog/{StepFormDialogContentInner.cjs → StepFormDialogContent.cjs} +5 -5
  195. package/lib/components/Dialog/ControlledStepFormDialog/StepFormDialogContent.cjs.map +1 -0
  196. package/lib/components/Dialog/ControlledStepFormDialog/{StepFormDialogContentInner.d.ts → StepFormDialogContent.d.ts} +3 -3
  197. package/lib/components/Dialog/ControlledStepFormDialog/{StepFormDialogContentInner.js → StepFormDialogContent.js} +5 -5
  198. package/lib/components/Dialog/ControlledStepFormDialog/StepFormDialogContent.js.map +1 -0
  199. package/lib/components/Dialog/Dialog.cjs +2 -2
  200. package/lib/components/Dialog/Dialog.cjs.map +1 -1
  201. package/lib/components/Dialog/Dialog.d.ts +3 -3
  202. package/lib/components/Dialog/Dialog.js +2 -2
  203. package/lib/components/Dialog/Dialog.js.map +1 -1
  204. package/lib/components/Dialog/DialogBody.cjs.map +1 -1
  205. package/lib/components/Dialog/DialogBody.d.ts +2 -2
  206. package/lib/components/Dialog/DialogBody.js.map +1 -1
  207. package/lib/components/Dialog/{DialogContentInner.cjs → DialogContent.cjs} +4 -3
  208. package/lib/components/Dialog/DialogContent.cjs.map +1 -0
  209. package/lib/components/Dialog/{DialogContentInner.d.ts → DialogContent.d.ts} +3 -3
  210. package/lib/components/Dialog/{DialogContentInner.js → DialogContent.js} +4 -3
  211. package/lib/components/Dialog/DialogContent.js.map +1 -0
  212. package/lib/components/Dialog/DialogOverlap.cjs +2 -2
  213. package/lib/components/Dialog/DialogOverlap.cjs.map +1 -1
  214. package/lib/components/Dialog/DialogOverlap.d.ts +5 -5
  215. package/lib/components/Dialog/DialogOverlap.js +2 -2
  216. package/lib/components/Dialog/DialogOverlap.js.map +1 -1
  217. package/lib/components/Dialog/DialogPortal.cjs.map +1 -1
  218. package/lib/components/Dialog/DialogPortal.d.ts +2 -2
  219. package/lib/components/Dialog/DialogPortal.js.map +1 -1
  220. package/lib/components/Dialog/FocusTrap.cjs +2 -2
  221. package/lib/components/Dialog/FocusTrap.cjs.map +1 -1
  222. package/lib/components/Dialog/FocusTrap.d.ts +3 -2
  223. package/lib/components/Dialog/FocusTrap.js +2 -2
  224. package/lib/components/Dialog/FocusTrap.js.map +1 -1
  225. package/lib/components/Dialog/ModelessDialog/ModelessDialog.cjs +2 -2
  226. package/lib/components/Dialog/ModelessDialog/ModelessDialog.cjs.map +1 -1
  227. package/lib/components/Dialog/ModelessDialog/ModelessDialog.d.ts +2 -2
  228. package/lib/components/Dialog/ModelessDialog/ModelessDialog.js +2 -2
  229. package/lib/components/Dialog/ModelessDialog/ModelessDialog.js.map +1 -1
  230. package/lib/components/Dialog/RemoteDialogTrigger/ActionDialog.cjs.map +1 -1
  231. package/lib/components/Dialog/RemoteDialogTrigger/ActionDialog.d.ts +2 -2
  232. package/lib/components/Dialog/RemoteDialogTrigger/ActionDialog.js.map +1 -1
  233. package/lib/components/Dialog/RemoteDialogTrigger/FormDialog.cjs.map +1 -1
  234. package/lib/components/Dialog/RemoteDialogTrigger/FormDialog.d.ts +2 -2
  235. package/lib/components/Dialog/RemoteDialogTrigger/FormDialog.js.map +1 -1
  236. package/lib/components/Dialog/RemoteDialogTrigger/MessageDialog.cjs.map +1 -1
  237. package/lib/components/Dialog/RemoteDialogTrigger/MessageDialog.d.ts +2 -2
  238. package/lib/components/Dialog/RemoteDialogTrigger/MessageDialog.js.map +1 -1
  239. package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.cjs +2 -2
  240. package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.cjs.map +1 -1
  241. package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.d.ts +8 -3
  242. package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.js +2 -2
  243. package/lib/components/Dialog/RemoteDialogTrigger/RemoteDialogTrigger.js.map +1 -1
  244. package/lib/components/Dialog/RemoteDialogTrigger/StepFormDialog.cjs.map +1 -1
  245. package/lib/components/Dialog/RemoteDialogTrigger/StepFormDialog.d.ts +2 -2
  246. package/lib/components/Dialog/RemoteDialogTrigger/StepFormDialog.js.map +1 -1
  247. package/lib/components/Dialog/{dialogInnerStyle.cjs → dialogContentStyle.cjs} +3 -3
  248. package/lib/components/Dialog/{dialogInnerStyle.js.map → dialogContentStyle.cjs.map} +1 -1
  249. package/lib/components/Dialog/{dialogInnerStyle.d.ts → dialogContentStyle.d.ts} +1 -1
  250. package/lib/components/Dialog/{dialogInnerStyle.js → dialogContentStyle.js} +3 -3
  251. package/lib/components/Dialog/dialogContentStyle.js.map +1 -0
  252. package/lib/components/Dialog/types.d.ts +3 -3
  253. package/lib/components/Disclosure/client/DisclosureContent.cjs.map +1 -1
  254. package/lib/components/Disclosure/client/DisclosureContent.d.ts +2 -2
  255. package/lib/components/Disclosure/client/DisclosureContent.js.map +1 -1
  256. package/lib/components/DropZone/client/DropZone.cjs.map +1 -1
  257. package/lib/components/DropZone/client/DropZone.d.ts +2 -2
  258. package/lib/components/DropZone/client/DropZone.js.map +1 -1
  259. package/lib/components/Dropdown/DropdownCloser.cjs.map +1 -1
  260. package/lib/components/Dropdown/DropdownCloser.d.ts +2 -2
  261. package/lib/components/Dropdown/DropdownCloser.js.map +1 -1
  262. package/lib/components/Dropdown/DropdownMenuGroup/DropdownMenuGroup.cjs +2 -2
  263. package/lib/components/Dropdown/DropdownMenuGroup/DropdownMenuGroup.cjs.map +1 -1
  264. package/lib/components/Dropdown/DropdownMenuGroup/DropdownMenuGroup.d.ts +5 -3
  265. package/lib/components/Dropdown/DropdownMenuGroup/DropdownMenuGroup.js +2 -2
  266. package/lib/components/Dropdown/DropdownMenuGroup/DropdownMenuGroup.js.map +1 -1
  267. package/lib/components/Dropdown/FilterDropdown/FilterDropdown.cjs.map +1 -1
  268. package/lib/components/Dropdown/FilterDropdown/FilterDropdown.d.ts +2 -2
  269. package/lib/components/Dropdown/FilterDropdown/FilterDropdown.js.map +1 -1
  270. package/lib/components/Dropdown/client/Dropdown.cjs +11 -5
  271. package/lib/components/Dropdown/client/Dropdown.cjs.map +1 -1
  272. package/lib/components/Dropdown/client/Dropdown.js +11 -5
  273. package/lib/components/Dropdown/client/Dropdown.js.map +1 -1
  274. package/lib/components/Dropdown/client/DropdownContent.cjs.map +1 -1
  275. package/lib/components/Dropdown/client/DropdownContent.d.ts +2 -2
  276. package/lib/components/Dropdown/client/DropdownContent.js.map +1 -1
  277. package/lib/components/Dropdown/client/DropdownMenuButton/DropdownMenuButton.cjs.map +1 -1
  278. package/lib/components/Dropdown/client/DropdownMenuButton/DropdownMenuButton.d.ts +2 -2
  279. package/lib/components/Dropdown/client/DropdownMenuButton/DropdownMenuButton.js.map +1 -1
  280. package/lib/components/Dropdown/client/DropdownTrigger.cjs +2 -2
  281. package/lib/components/Dropdown/client/DropdownTrigger.cjs.map +1 -1
  282. package/lib/components/Dropdown/client/DropdownTrigger.d.ts +5 -3
  283. package/lib/components/Dropdown/client/DropdownTrigger.js +2 -2
  284. package/lib/components/Dropdown/client/DropdownTrigger.js.map +1 -1
  285. package/lib/components/Dropdown/client/FilterDropdownForm.cjs +1 -1
  286. package/lib/components/Dropdown/client/FilterDropdownForm.cjs.map +1 -1
  287. package/lib/components/Dropdown/client/FilterDropdownForm.d.ts +4 -2
  288. package/lib/components/Dropdown/client/FilterDropdownForm.js +1 -1
  289. package/lib/components/Dropdown/client/FilterDropdownForm.js.map +1 -1
  290. package/lib/components/Dropdown/client/SortDropdown/SortDropdown.cjs.map +1 -1
  291. package/lib/components/Dropdown/client/SortDropdown/SortDropdown.d.ts +2 -2
  292. package/lib/components/Dropdown/client/SortDropdown/SortDropdown.js.map +1 -1
  293. package/lib/components/ErrorScreen/ErrorScreen.cjs.map +1 -1
  294. package/lib/components/ErrorScreen/ErrorScreen.d.ts +2 -2
  295. package/lib/components/ErrorScreen/ErrorScreen.js.map +1 -1
  296. package/lib/components/Experimental/Tuck/client/Tuck.cjs.map +1 -1
  297. package/lib/components/Experimental/Tuck/client/Tuck.d.ts +2 -2
  298. package/lib/components/Experimental/Tuck/client/Tuck.js.map +1 -1
  299. package/lib/components/FileViewer/client/PDFViewer.cjs +20 -1
  300. package/lib/components/FileViewer/client/PDFViewer.cjs.map +1 -1
  301. package/lib/components/FileViewer/client/PDFViewer.js +20 -1
  302. package/lib/components/FileViewer/client/PDFViewer.js.map +1 -1
  303. package/lib/components/FileViewer/client/SearchController.cjs +2 -0
  304. package/lib/components/FileViewer/client/SearchController.cjs.map +1 -1
  305. package/lib/components/FileViewer/client/SearchController.js +2 -0
  306. package/lib/components/FileViewer/client/SearchController.js.map +1 -1
  307. package/lib/components/FloatArea/FloatArea.cjs +23 -22
  308. package/lib/components/FloatArea/FloatArea.cjs.map +1 -1
  309. package/lib/components/FloatArea/FloatArea.d.ts +2 -2
  310. package/lib/components/FloatArea/FloatArea.js +23 -22
  311. package/lib/components/FloatArea/FloatArea.js.map +1 -1
  312. package/lib/components/FormGroup/client/FormGroup.cjs +1 -1
  313. package/lib/components/FormGroup/client/FormGroup.cjs.map +1 -1
  314. package/lib/components/FormGroup/client/FormGroup.d.ts +8 -8
  315. package/lib/components/FormGroup/client/FormGroup.js +1 -1
  316. package/lib/components/FormGroup/client/FormGroup.js.map +1 -1
  317. package/lib/components/FormGroup/client/type.d.ts +2 -2
  318. package/lib/components/Header/AppLauncher/AppLauncher.cjs.map +1 -1
  319. package/lib/components/Header/AppLauncher/AppLauncher.d.ts +2 -2
  320. package/lib/components/Header/AppLauncher/AppLauncher.js.map +1 -1
  321. package/lib/components/Header/Header.cjs.map +1 -1
  322. package/lib/components/Header/Header.d.ts +2 -2
  323. package/lib/components/Header/Header.js.map +1 -1
  324. package/lib/components/Header/HeaderLink.cjs.map +1 -1
  325. package/lib/components/Header/HeaderLink.d.ts +2 -2
  326. package/lib/components/Header/HeaderLink.js.map +1 -1
  327. package/lib/components/Header/LanguageSwitcher/LanguageSwitcher.cjs.map +1 -1
  328. package/lib/components/Header/LanguageSwitcher/LanguageSwitcher.d.ts +2 -2
  329. package/lib/components/Header/LanguageSwitcher/LanguageSwitcher.js.map +1 -1
  330. package/lib/components/Heading/client/Heading.cjs.map +1 -1
  331. package/lib/components/Heading/client/Heading.d.ts +2 -2
  332. package/lib/components/Heading/client/Heading.js.map +1 -1
  333. package/lib/components/Heading/client/PageHeading/PageHeading.cjs.map +1 -1
  334. package/lib/components/Heading/client/PageHeading/PageHeading.d.ts +2 -2
  335. package/lib/components/Heading/client/PageHeading/PageHeading.js.map +1 -1
  336. package/lib/components/Icon/FaIcon.js +1 -1
  337. package/lib/components/Icon/StatusIcon.cjs.map +1 -1
  338. package/lib/components/Icon/StatusIcon.d.ts +2 -2
  339. package/lib/components/Icon/StatusIcon.js.map +1 -1
  340. package/lib/components/Icon/generateIcon.cjs.map +1 -1
  341. package/lib/components/Icon/generateIcon.d.ts +2 -2
  342. package/lib/components/Icon/generateIcon.js.map +1 -1
  343. package/lib/components/InformationPanel/client/InformationPanel.cjs.map +1 -1
  344. package/lib/components/InformationPanel/client/InformationPanel.d.ts +2 -2
  345. package/lib/components/InformationPanel/client/InformationPanel.js.map +1 -1
  346. package/lib/components/Input/InputWithTooltip/InputWithTooltip.cjs.map +1 -1
  347. package/lib/components/Input/InputWithTooltip/InputWithTooltip.d.ts +2 -2
  348. package/lib/components/Input/InputWithTooltip/InputWithTooltip.js.map +1 -1
  349. package/lib/components/Input/SearchInput/AiMagnifyingGlassIcon.cjs +22 -0
  350. package/lib/components/Input/SearchInput/AiMagnifyingGlassIcon.cjs.map +1 -0
  351. package/lib/components/Input/SearchInput/AiMagnifyingGlassIcon.d.ts +6 -0
  352. package/lib/components/Input/SearchInput/AiMagnifyingGlassIcon.js +20 -0
  353. package/lib/components/Input/SearchInput/AiMagnifyingGlassIcon.js.map +1 -0
  354. package/lib/components/Input/SearchInput/SearchInput.cjs +3 -2
  355. package/lib/components/Input/SearchInput/SearchInput.cjs.map +1 -1
  356. package/lib/components/Input/SearchInput/SearchInput.d.ts +6 -1
  357. package/lib/components/Input/SearchInput/SearchInput.js +3 -2
  358. package/lib/components/Input/SearchInput/SearchInput.js.map +1 -1
  359. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/Calendar.cjs +30 -30
  360. package/lib/components/Input/WarekiPicker/client/Calendar/Calendar.cjs.map +1 -0
  361. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/Calendar.d.ts +2 -2
  362. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/Calendar.js +21 -21
  363. package/lib/components/Input/WarekiPicker/client/Calendar/Calendar.js.map +1 -0
  364. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/CalendarTable.cjs +12 -12
  365. package/lib/components/Input/WarekiPicker/client/Calendar/CalendarTable.cjs.map +1 -0
  366. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/CalendarTable.d.ts +2 -2
  367. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/CalendarTable.js +10 -10
  368. package/lib/components/Input/WarekiPicker/client/Calendar/CalendarTable.js.map +1 -0
  369. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/YearPicker.cjs +10 -10
  370. package/lib/components/Input/WarekiPicker/client/Calendar/YearPicker.cjs.map +1 -0
  371. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/YearPicker.d.ts +2 -2
  372. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/YearPicker.js +10 -10
  373. package/lib/components/Input/WarekiPicker/client/Calendar/YearPicker.js.map +1 -0
  374. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/calendarHelper.cjs +2 -2
  375. package/lib/components/Input/WarekiPicker/client/Calendar/calendarHelper.cjs.map +1 -0
  376. package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/calendarHelper.js +2 -2
  377. package/lib/components/Input/WarekiPicker/client/Calendar/calendarHelper.js.map +1 -0
  378. package/lib/components/Input/WarekiPicker/client/Calendar/index.cjs +8 -0
  379. package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/DatePicker.cjs +30 -24
  380. package/lib/components/Input/WarekiPicker/client/DatePicker/DatePicker.cjs.map +1 -0
  381. package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/DatePicker.d.ts +5 -3
  382. package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/DatePicker.js +28 -22
  383. package/lib/components/Input/WarekiPicker/client/DatePicker/DatePicker.js.map +1 -0
  384. package/lib/components/{DatePicker/client → Input/WarekiPicker/client/DatePicker}/Portal.cjs +3 -3
  385. package/lib/components/Input/WarekiPicker/client/DatePicker/Portal.cjs.map +1 -0
  386. package/lib/components/Input/WarekiPicker/client/DatePicker/Portal.d.ts +10 -0
  387. package/lib/components/{DatePicker/client → Input/WarekiPicker/client/DatePicker}/Portal.js +3 -3
  388. package/lib/components/Input/WarekiPicker/client/DatePicker/Portal.js.map +1 -0
  389. package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/datePickerHelper.cjs +2 -2
  390. package/lib/components/Input/WarekiPicker/client/DatePicker/datePickerHelper.cjs.map +1 -0
  391. package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/datePickerHelper.js +2 -2
  392. package/lib/components/Input/WarekiPicker/client/DatePicker/datePickerHelper.js.map +1 -0
  393. package/lib/components/Input/WarekiPicker/client/DatePicker/index.cjs +8 -0
  394. package/lib/components/Input/WarekiPicker/client/WarekiPicker.cjs +40 -0
  395. package/lib/components/Input/WarekiPicker/client/WarekiPicker.cjs.map +1 -0
  396. package/lib/components/Input/WarekiPicker/client/WarekiPicker.d.ts +9 -0
  397. package/lib/components/Input/WarekiPicker/client/WarekiPicker.js +38 -0
  398. package/lib/components/Input/WarekiPicker/client/WarekiPicker.js.map +1 -0
  399. package/lib/components/Input/WarekiPicker/client/index.cjs +10 -0
  400. package/lib/components/{DatePicker/client/DatePicker → Input/WarekiPicker/client}/index.cjs.map +1 -1
  401. package/lib/components/{WarekiPicker → Input/WarekiPicker}/client/index.d.ts +1 -0
  402. package/lib/components/{WarekiPicker → Input/WarekiPicker}/client/index.js +1 -0
  403. package/lib/components/{DatePicker/client/DatePicker → Input/WarekiPicker/client}/index.js.map +1 -1
  404. package/lib/components/Input/WarekiPicker/index.cjs +10 -0
  405. package/lib/components/{DatePicker/client → Input/WarekiPicker}/index.cjs.map +1 -1
  406. package/lib/components/Input/WarekiPicker/index.d.ts +1 -0
  407. package/lib/components/{WarekiPicker → Input/WarekiPicker}/index.js +1 -0
  408. package/lib/components/{DatePicker/client → Input/WarekiPicker}/index.js.map +1 -1
  409. package/lib/components/Input/client/CurrencyInput/CurrencyInput.cjs.map +1 -1
  410. package/lib/components/Input/client/CurrencyInput/CurrencyInput.d.ts +2 -2
  411. package/lib/components/Input/client/CurrencyInput/CurrencyInput.js.map +1 -1
  412. package/lib/components/Input/client/Input.cjs +3 -2
  413. package/lib/components/Input/client/Input.cjs.map +1 -1
  414. package/lib/components/Input/client/Input.d.ts +4 -2
  415. package/lib/components/Input/client/Input.js +3 -2
  416. package/lib/components/Input/client/Input.js.map +1 -1
  417. package/lib/components/Input/index.cjs +4 -0
  418. package/lib/components/Input/index.cjs.map +1 -1
  419. package/lib/components/Input/index.d.ts +1 -0
  420. package/lib/components/Input/index.js +2 -0
  421. package/lib/components/Input/index.js.map +1 -1
  422. package/lib/components/InputFile/client/DownloadAnchorButton.cjs +23 -3
  423. package/lib/components/InputFile/client/DownloadAnchorButton.cjs.map +1 -1
  424. package/lib/components/InputFile/client/DownloadAnchorButton.d.ts +3 -1
  425. package/lib/components/InputFile/client/DownloadAnchorButton.js +23 -4
  426. package/lib/components/InputFile/client/DownloadAnchorButton.js.map +1 -1
  427. package/lib/components/InputFile/client/FilePreviewDialog.cjs +10 -6
  428. package/lib/components/InputFile/client/FilePreviewDialog.cjs.map +1 -1
  429. package/lib/components/InputFile/client/FilePreviewDialog.d.ts +2 -1
  430. package/lib/components/InputFile/client/FilePreviewDialog.js +10 -6
  431. package/lib/components/InputFile/client/FilePreviewDialog.js.map +1 -1
  432. package/lib/components/InputFile/client/InputFileMultiplyAppendable.cjs +31 -10
  433. package/lib/components/InputFile/client/InputFileMultiplyAppendable.cjs.map +1 -1
  434. package/lib/components/InputFile/client/InputFileMultiplyAppendable.js +31 -10
  435. package/lib/components/InputFile/client/InputFileMultiplyAppendable.js.map +1 -1
  436. package/lib/components/InputFile/client/InputFileNative.cjs +40 -7
  437. package/lib/components/InputFile/client/InputFileNative.cjs.map +1 -1
  438. package/lib/components/InputFile/client/InputFileNative.js +40 -7
  439. package/lib/components/InputFile/client/InputFileNative.js.map +1 -1
  440. package/lib/components/InputFile/client/parts.cjs +5 -1
  441. package/lib/components/InputFile/client/parts.cjs.map +1 -1
  442. package/lib/components/InputFile/client/parts.d.ts +5 -4
  443. package/lib/components/InputFile/client/parts.js +5 -1
  444. package/lib/components/InputFile/client/parts.js.map +1 -1
  445. package/lib/components/InputFile/types.d.ts +14 -2
  446. package/lib/components/Layout/Center/Center.cjs +4 -3
  447. package/lib/components/Layout/Center/Center.cjs.map +1 -1
  448. package/lib/components/Layout/Center/Center.d.ts +2 -2
  449. package/lib/components/Layout/Center/Center.js +4 -3
  450. package/lib/components/Layout/Center/Center.js.map +1 -1
  451. package/lib/components/Layout/Cluster/Cluster.cjs.map +1 -1
  452. package/lib/components/Layout/Cluster/Cluster.d.ts +2 -2
  453. package/lib/components/Layout/Cluster/Cluster.js.map +1 -1
  454. package/lib/components/Layout/Reel/Reel.cjs.map +1 -1
  455. package/lib/components/Layout/Reel/Reel.d.ts +2 -2
  456. package/lib/components/Layout/Reel/Reel.js.map +1 -1
  457. package/lib/components/Layout/Sidebar/Sidebar.cjs.map +1 -1
  458. package/lib/components/Layout/Sidebar/Sidebar.d.ts +2 -2
  459. package/lib/components/Layout/Sidebar/Sidebar.js.map +1 -1
  460. package/lib/components/Layout/Stack/Stack.cjs.map +1 -1
  461. package/lib/components/Layout/Stack/Stack.d.ts +2 -2
  462. package/lib/components/Layout/Stack/Stack.js.map +1 -1
  463. package/lib/components/Layout/client/Container/Container.cjs.map +1 -1
  464. package/lib/components/Layout/client/Container/Container.d.ts +2 -2
  465. package/lib/components/Layout/client/Container/Container.js.map +1 -1
  466. package/lib/components/LineClamp/LineClamp.cjs.map +1 -1
  467. package/lib/components/LineClamp/LineClamp.d.ts +2 -2
  468. package/lib/components/LineClamp/LineClamp.js.map +1 -1
  469. package/lib/components/LiveRegion/LiveRegion.cjs.map +1 -1
  470. package/lib/components/LiveRegion/LiveRegion.d.ts +2 -2
  471. package/lib/components/LiveRegion/LiveRegion.js.map +1 -1
  472. package/lib/components/Loader/Loader.cjs.map +1 -1
  473. package/lib/components/Loader/Loader.d.ts +2 -2
  474. package/lib/components/Loader/Loader.js.map +1 -1
  475. package/lib/components/NotificationBar/NotificationBar.cjs.map +1 -1
  476. package/lib/components/NotificationBar/NotificationBar.d.ts +2 -2
  477. package/lib/components/NotificationBar/NotificationBar.js.map +1 -1
  478. package/lib/components/PageCounter/PageCounter.cjs.map +1 -1
  479. package/lib/components/PageCounter/PageCounter.d.ts +2 -2
  480. package/lib/components/PageCounter/PageCounter.js.map +1 -1
  481. package/lib/components/Pagination/Pagination.cjs.map +1 -1
  482. package/lib/components/Pagination/Pagination.d.ts +3 -3
  483. package/lib/components/Pagination/Pagination.js.map +1 -1
  484. package/lib/components/Pagination/client/Wrapper.cjs.map +1 -1
  485. package/lib/components/Pagination/client/Wrapper.d.ts +2 -2
  486. package/lib/components/Pagination/client/Wrapper.js.map +1 -1
  487. package/lib/components/Panel/Groupbox/Groupbox.cjs.map +1 -1
  488. package/lib/components/Panel/Groupbox/Groupbox.d.ts +2 -2
  489. package/lib/components/Panel/Groupbox/Groupbox.js.map +1 -1
  490. package/lib/components/Panel/Panel.cjs.map +1 -1
  491. package/lib/components/Panel/Panel.d.ts +2 -2
  492. package/lib/components/Panel/Panel.js.map +1 -1
  493. package/lib/components/Picker/DatetimeLocalPicker.cjs.map +1 -1
  494. package/lib/components/Picker/DatetimeLocalPicker.d.ts +2 -2
  495. package/lib/components/Picker/DatetimeLocalPicker.js.map +1 -1
  496. package/lib/components/Picker/MonthPicker.cjs.map +1 -1
  497. package/lib/components/Picker/MonthPicker.d.ts +2 -2
  498. package/lib/components/Picker/MonthPicker.js.map +1 -1
  499. package/lib/components/Picker/TimePicker.cjs.map +1 -1
  500. package/lib/components/Picker/TimePicker.d.ts +2 -2
  501. package/lib/components/Picker/TimePicker.js.map +1 -1
  502. package/lib/components/Portal/client/Portal.cjs.map +1 -1
  503. package/lib/components/Portal/client/Portal.d.ts +2 -2
  504. package/lib/components/Portal/client/Portal.js.map +1 -1
  505. package/lib/components/RadioButton/RadioButton.cjs +1 -1
  506. package/lib/components/RadioButton/RadioButton.cjs.map +1 -1
  507. package/lib/components/RadioButton/RadioButton.js +1 -1
  508. package/lib/components/RadioButton/RadioButton.js.map +1 -1
  509. package/lib/components/RadioButtonPanel/RadioButtonPanel.cjs +6 -5
  510. package/lib/components/RadioButtonPanel/RadioButtonPanel.cjs.map +1 -1
  511. package/lib/components/RadioButtonPanel/RadioButtonPanel.d.ts +2 -2
  512. package/lib/components/RadioButtonPanel/RadioButtonPanel.js +6 -5
  513. package/lib/components/RadioButtonPanel/RadioButtonPanel.js.map +1 -1
  514. package/lib/components/RadioButtonPanel/client/ClickablePanel.cjs.map +1 -1
  515. package/lib/components/RadioButtonPanel/client/ClickablePanel.d.ts +2 -2
  516. package/lib/components/RadioButtonPanel/client/ClickablePanel.js.map +1 -1
  517. package/lib/components/ResponseMessage/ResponseMessage.cjs.map +1 -1
  518. package/lib/components/ResponseMessage/ResponseMessage.d.ts +2 -2
  519. package/lib/components/ResponseMessage/ResponseMessage.js.map +1 -1
  520. package/lib/components/Scroller/client/Scroller.cjs.map +1 -1
  521. package/lib/components/Scroller/client/Scroller.d.ts +2 -2
  522. package/lib/components/Scroller/client/Scroller.js.map +1 -1
  523. package/lib/components/SectioningContent/SectioningContent.cjs.map +1 -1
  524. package/lib/components/SectioningContent/SectioningContent.d.ts +2 -2
  525. package/lib/components/SectioningContent/SectioningContent.js.map +1 -1
  526. package/lib/components/SegmentedControl/client/SegmentedControl.cjs +15 -11
  527. package/lib/components/SegmentedControl/client/SegmentedControl.cjs.map +1 -1
  528. package/lib/components/SegmentedControl/client/SegmentedControl.d.ts +4 -2
  529. package/lib/components/SegmentedControl/client/SegmentedControl.js +15 -11
  530. package/lib/components/SegmentedControl/client/SegmentedControl.js.map +1 -1
  531. package/lib/components/Select/Select.cjs.map +1 -1
  532. package/lib/components/Select/Select.d.ts +2 -2
  533. package/lib/components/Select/Select.js.map +1 -1
  534. package/lib/components/Select/client/ActualSelect.cjs.map +1 -1
  535. package/lib/components/Select/client/ActualSelect.d.ts +4 -4
  536. package/lib/components/Select/client/ActualSelect.js.map +1 -1
  537. package/lib/components/SideMenu/SideMenu.cjs +2 -2
  538. package/lib/components/SideMenu/SideMenu.cjs.map +1 -1
  539. package/lib/components/SideMenu/SideMenu.d.ts +3 -3
  540. package/lib/components/SideMenu/SideMenu.js +2 -2
  541. package/lib/components/SideMenu/SideMenu.js.map +1 -1
  542. package/lib/components/SideMenu/SideMenuGroup.cjs.map +1 -1
  543. package/lib/components/SideMenu/SideMenuGroup.d.ts +2 -2
  544. package/lib/components/SideMenu/SideMenuGroup.js.map +1 -1
  545. package/lib/components/SideMenu/SideMenuItem.cjs.map +1 -1
  546. package/lib/components/SideMenu/SideMenuItem.d.ts +4 -4
  547. package/lib/components/SideMenu/SideMenuItem.js.map +1 -1
  548. package/lib/components/SideNav/SideNav.cjs.map +1 -1
  549. package/lib/components/SideNav/SideNav.d.ts +2 -2
  550. package/lib/components/SideNav/SideNav.js.map +1 -1
  551. package/lib/components/SideNav/SideNavItemButton.cjs.map +1 -1
  552. package/lib/components/SideNav/SideNavItemButton.d.ts +3 -3
  553. package/lib/components/SideNav/SideNavItemButton.js.map +1 -1
  554. package/lib/components/SmartHRAILogo/SmartHRAILogo.cjs.map +1 -1
  555. package/lib/components/SmartHRAILogo/SmartHRAILogo.d.ts +2 -2
  556. package/lib/components/SmartHRAILogo/SmartHRAILogo.js.map +1 -1
  557. package/lib/components/SmartHRLogo/SmartHRLogo.cjs.map +1 -1
  558. package/lib/components/SmartHRLogo/SmartHRLogo.d.ts +2 -2
  559. package/lib/components/SmartHRLogo/SmartHRLogo.js.map +1 -1
  560. package/lib/components/SpreadsheetTable/SpreadsheetTable.cjs.map +1 -1
  561. package/lib/components/SpreadsheetTable/SpreadsheetTable.d.ts +2 -2
  562. package/lib/components/SpreadsheetTable/SpreadsheetTable.js.map +1 -1
  563. package/lib/components/StatusLabel/StatusLabel.cjs.map +1 -1
  564. package/lib/components/StatusLabel/StatusLabel.d.ts +2 -2
  565. package/lib/components/StatusLabel/StatusLabel.js.map +1 -1
  566. package/lib/components/Stepper/HorizontalStepItem.cjs.map +1 -1
  567. package/lib/components/Stepper/HorizontalStepItem.d.ts +2 -2
  568. package/lib/components/Stepper/HorizontalStepItem.js.map +1 -1
  569. package/lib/components/Stepper/StepStatusIcon.cjs.map +1 -1
  570. package/lib/components/Stepper/StepStatusIcon.d.ts +2 -2
  571. package/lib/components/Stepper/StepStatusIcon.js.map +1 -1
  572. package/lib/components/Stepper/VerticalStepItem.cjs.map +1 -1
  573. package/lib/components/Stepper/VerticalStepItem.d.ts +2 -2
  574. package/lib/components/Stepper/VerticalStepItem.js.map +1 -1
  575. package/lib/components/Switch/Switch.cjs +2 -2
  576. package/lib/components/Switch/Switch.cjs.map +1 -1
  577. package/lib/components/Switch/Switch.d.ts +2 -2
  578. package/lib/components/Switch/Switch.js +2 -2
  579. package/lib/components/Switch/Switch.js.map +1 -1
  580. package/lib/components/TabBar/TabBar.cjs.map +1 -1
  581. package/lib/components/TabBar/TabBar.d.ts +2 -2
  582. package/lib/components/TabBar/TabBar.js.map +1 -1
  583. package/lib/components/TabBar/client/TabItem.cjs +3 -3
  584. package/lib/components/TabBar/client/TabItem.cjs.map +1 -1
  585. package/lib/components/TabBar/client/TabItem.d.ts +2 -2
  586. package/lib/components/TabBar/client/TabItem.js +3 -3
  587. package/lib/components/TabBar/client/TabItem.js.map +1 -1
  588. package/lib/components/Table/ActualTable.cjs.map +1 -1
  589. package/lib/components/Table/ActualTable.d.ts +2 -2
  590. package/lib/components/Table/ActualTable.js.map +1 -1
  591. package/lib/components/Table/EmptyTableBody.cjs.map +1 -1
  592. package/lib/components/Table/EmptyTableBody.d.ts +2 -2
  593. package/lib/components/Table/EmptyTableBody.js.map +1 -1
  594. package/lib/components/Table/ScrollerSwitcher.cjs.map +1 -1
  595. package/lib/components/Table/ScrollerSwitcher.d.ts +2 -2
  596. package/lib/components/Table/ScrollerSwitcher.js.map +1 -1
  597. package/lib/components/Table/Table.cjs.map +1 -1
  598. package/lib/components/Table/Table.d.ts +2 -2
  599. package/lib/components/Table/Table.js.map +1 -1
  600. package/lib/components/Table/TableScroller.cjs.map +1 -1
  601. package/lib/components/Table/TableScroller.d.ts +2 -2
  602. package/lib/components/Table/TableScroller.js.map +1 -1
  603. package/lib/components/Table/Td.cjs.map +1 -1
  604. package/lib/components/Table/Td.d.ts +2 -2
  605. package/lib/components/Table/Td.js.map +1 -1
  606. package/lib/components/Table/TdCheckbox.cjs.map +1 -1
  607. package/lib/components/Table/TdCheckbox.d.ts +2 -2
  608. package/lib/components/Table/TdCheckbox.js.map +1 -1
  609. package/lib/components/Table/TdRadioButton.cjs.map +1 -1
  610. package/lib/components/Table/TdRadioButton.d.ts +2 -2
  611. package/lib/components/Table/TdRadioButton.js.map +1 -1
  612. package/lib/components/Table/Th/Th.cjs.map +1 -1
  613. package/lib/components/Table/Th/Th.d.ts +2 -2
  614. package/lib/components/Table/Th/Th.js.map +1 -1
  615. package/lib/components/Table/Th/ThSortButton.cjs +2 -2
  616. package/lib/components/Table/Th/ThSortButton.cjs.map +1 -1
  617. package/lib/components/Table/Th/ThSortButton.d.ts +5 -2
  618. package/lib/components/Table/Th/ThSortButton.js +2 -2
  619. package/lib/components/Table/Th/ThSortButton.js.map +1 -1
  620. package/lib/components/Table/ThCheckbox.cjs.map +1 -1
  621. package/lib/components/Table/ThCheckbox.d.ts +2 -2
  622. package/lib/components/Table/ThCheckbox.js.map +1 -1
  623. package/lib/components/Table/client/AutoColSpanTd.cjs +2 -2
  624. package/lib/components/Table/client/AutoColSpanTd.cjs.map +1 -1
  625. package/lib/components/Table/client/AutoColSpanTd.d.ts +3 -4
  626. package/lib/components/Table/client/AutoColSpanTd.js +2 -2
  627. package/lib/components/Table/client/AutoColSpanTd.js.map +1 -1
  628. package/lib/components/Table/client/FixedHeadTableScroller.cjs.map +1 -1
  629. package/lib/components/Table/client/FixedHeadTableScroller.d.ts +2 -2
  630. package/lib/components/Table/client/FixedHeadTableScroller.js.map +1 -1
  631. package/lib/components/Table/client/TableReel.cjs.map +1 -1
  632. package/lib/components/Table/client/TableReel.d.ts +2 -2
  633. package/lib/components/Table/client/TableReel.js.map +1 -1
  634. package/lib/components/Text/Text.cjs +16 -1
  635. package/lib/components/Text/Text.cjs.map +1 -1
  636. package/lib/components/Text/Text.d.ts +2 -2
  637. package/lib/components/Text/Text.js +16 -1
  638. package/lib/components/Text/Text.js.map +1 -1
  639. package/lib/components/Text/client/TextOverflowTooltip.cjs.map +1 -1
  640. package/lib/components/Text/client/TextOverflowTooltip.d.ts +2 -2
  641. package/lib/components/Text/client/TextOverflowTooltip.js.map +1 -1
  642. package/lib/components/TextLink/TextLink.cjs.map +1 -1
  643. package/lib/components/TextLink/TextLink.d.ts +2 -2
  644. package/lib/components/TextLink/TextLink.js.map +1 -1
  645. package/lib/components/TextLink/client/UpwardLink.cjs.map +1 -1
  646. package/lib/components/TextLink/client/UpwardLink.d.ts +2 -2
  647. package/lib/components/TextLink/client/UpwardLink.js.map +1 -1
  648. package/lib/components/Textarea/client/Textarea.cjs.map +1 -1
  649. package/lib/components/Textarea/client/Textarea.d.ts +2 -2
  650. package/lib/components/Textarea/client/Textarea.js.map +1 -1
  651. package/lib/components/Timeline/Timeline.cjs.map +1 -1
  652. package/lib/components/Timeline/Timeline.d.ts +2 -2
  653. package/lib/components/Timeline/Timeline.js.map +1 -1
  654. package/lib/components/Timeline/TimelineItem.cjs.map +1 -1
  655. package/lib/components/Timeline/TimelineItem.d.ts +2 -2
  656. package/lib/components/Timeline/TimelineItem.js.map +1 -1
  657. package/lib/components/Tooltip/ControlledTooltip.cjs.map +1 -1
  658. package/lib/components/Tooltip/ControlledTooltip.d.ts +2 -2
  659. package/lib/components/Tooltip/ControlledTooltip.js.map +1 -1
  660. package/lib/components/Tooltip/client/Tooltip.cjs.map +1 -1
  661. package/lib/components/Tooltip/client/Tooltip.d.ts +2 -2
  662. package/lib/components/Tooltip/client/Tooltip.js.map +1 -1
  663. package/lib/components/Tooltip/client/TooltipPortal.cjs +2 -2
  664. package/lib/components/Tooltip/client/TooltipPortal.cjs.map +1 -1
  665. package/lib/components/Tooltip/client/TooltipPortal.d.ts +5 -2
  666. package/lib/components/Tooltip/client/TooltipPortal.js +2 -2
  667. package/lib/components/Tooltip/client/TooltipPortal.js.map +1 -1
  668. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.cjs.map +1 -1
  669. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts +2 -2
  670. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.js.map +1 -1
  671. package/lib/hooks/client/useEnvironment/useEnvironment.cjs +4 -11
  672. package/lib/hooks/client/useEnvironment/useEnvironment.cjs.map +1 -1
  673. package/lib/hooks/client/useEnvironment/useEnvironment.js +4 -11
  674. package/lib/hooks/client/useEnvironment/useEnvironment.js.map +1 -1
  675. package/lib/index.cjs +4 -6
  676. package/lib/index.cjs.map +1 -1
  677. package/lib/index.d.ts +1 -7
  678. package/lib/index.js +2 -3
  679. package/lib/index.js.map +1 -1
  680. package/lib/smarthr-ui-preset.cjs +40 -0
  681. package/lib/smarthr-ui-preset.cjs.map +1 -1
  682. package/lib/smarthr-ui-preset.js +41 -1
  683. package/lib/smarthr-ui-preset.js.map +1 -1
  684. package/lib/themes/createColor.cjs +12 -0
  685. package/lib/themes/createColor.cjs.map +1 -1
  686. package/lib/themes/createColor.d.ts +9 -0
  687. package/lib/themes/createColor.js +12 -1
  688. package/lib/themes/createColor.js.map +1 -1
  689. package/lib/themes/index.cjs +1 -0
  690. package/lib/themes/index.cjs.map +1 -1
  691. package/lib/themes/index.d.ts +1 -1
  692. package/lib/themes/index.js +1 -1
  693. package/lib/types/ExtendProps.cjs +3 -0
  694. package/lib/types/ExtendProps.cjs.map +1 -0
  695. package/lib/types/ExtendProps.d.ts +21 -0
  696. package/lib/types/ExtendProps.js +2 -0
  697. package/lib/types/ExtendProps.js.map +1 -0
  698. package/lib/types/index.d.ts +1 -1
  699. package/metadata.json +1 -1
  700. package/package.json +2 -2
  701. package/smarthr-ui.css +74 -0
  702. package/lib/components/AppHeader/components/common/Translate.cjs +0 -9
  703. package/lib/components/AppHeader/components/common/Translate.cjs.map +0 -1
  704. package/lib/components/AppHeader/components/common/Translate.d.ts +0 -3
  705. package/lib/components/AppHeader/components/common/Translate.js +0 -7
  706. package/lib/components/AppHeader/components/common/Translate.js.map +0 -1
  707. package/lib/components/Calendar/client/Calendar.cjs.map +0 -1
  708. package/lib/components/Calendar/client/Calendar.js.map +0 -1
  709. package/lib/components/Calendar/client/CalendarTable.cjs.map +0 -1
  710. package/lib/components/Calendar/client/CalendarTable.js.map +0 -1
  711. package/lib/components/Calendar/client/YearPicker.cjs.map +0 -1
  712. package/lib/components/Calendar/client/YearPicker.js.map +0 -1
  713. package/lib/components/Calendar/client/calendarHelper.cjs.map +0 -1
  714. package/lib/components/Calendar/client/calendarHelper.js.map +0 -1
  715. package/lib/components/Calendar/client/index.cjs +0 -8
  716. package/lib/components/Calendar/index.cjs +0 -8
  717. package/lib/components/Calendar/index.d.ts +0 -1
  718. package/lib/components/Calendar/index.js +0 -2
  719. package/lib/components/DatePicker/client/DatePicker/DatePicker.cjs.map +0 -1
  720. package/lib/components/DatePicker/client/DatePicker/DatePicker.js.map +0 -1
  721. package/lib/components/DatePicker/client/DatePicker/datePickerHelper.cjs.map +0 -1
  722. package/lib/components/DatePicker/client/DatePicker/datePickerHelper.js.map +0 -1
  723. package/lib/components/DatePicker/client/DatePicker/index.cjs +0 -8
  724. package/lib/components/DatePicker/client/Portal.cjs.map +0 -1
  725. package/lib/components/DatePicker/client/Portal.d.ts +0 -6
  726. package/lib/components/DatePicker/client/Portal.js.map +0 -1
  727. package/lib/components/DatePicker/client/index.cjs +0 -8
  728. package/lib/components/DatePicker/client/index.d.ts +0 -1
  729. package/lib/components/DatePicker/client/index.js +0 -2
  730. package/lib/components/DatePicker/index.cjs +0 -8
  731. package/lib/components/DatePicker/index.cjs.map +0 -1
  732. package/lib/components/DatePicker/index.d.ts +0 -1
  733. package/lib/components/DatePicker/index.js +0 -2
  734. package/lib/components/DatePicker/index.js.map +0 -1
  735. package/lib/components/Dialog/ControlledActionDialog/ActionDialogContentInner.cjs.map +0 -1
  736. package/lib/components/Dialog/ControlledActionDialog/ActionDialogContentInner.js.map +0 -1
  737. package/lib/components/Dialog/ControlledFormDialog/FormDialogContentInner.cjs.map +0 -1
  738. package/lib/components/Dialog/ControlledFormDialog/FormDialogContentInner.js.map +0 -1
  739. package/lib/components/Dialog/ControlledMessageDialog/MessageDialogContentInner.cjs.map +0 -1
  740. package/lib/components/Dialog/ControlledMessageDialog/MessageDialogContentInner.js.map +0 -1
  741. package/lib/components/Dialog/ControlledStepFormDialog/StepFormDialogContentInner.cjs.map +0 -1
  742. package/lib/components/Dialog/ControlledStepFormDialog/StepFormDialogContentInner.js.map +0 -1
  743. package/lib/components/Dialog/DialogContentInner.cjs.map +0 -1
  744. package/lib/components/Dialog/DialogContentInner.js.map +0 -1
  745. package/lib/components/Dialog/dialogInnerStyle.cjs.map +0 -1
  746. package/lib/components/WarekiPicker/client/WarekiPicker.cjs +0 -32
  747. package/lib/components/WarekiPicker/client/WarekiPicker.cjs.map +0 -1
  748. package/lib/components/WarekiPicker/client/WarekiPicker.d.ts +0 -5
  749. package/lib/components/WarekiPicker/client/WarekiPicker.js +0 -30
  750. package/lib/components/WarekiPicker/client/WarekiPicker.js.map +0 -1
  751. package/lib/components/WarekiPicker/client/index.cjs +0 -8
  752. package/lib/components/WarekiPicker/client/index.cjs.map +0 -1
  753. package/lib/components/WarekiPicker/client/index.js.map +0 -1
  754. package/lib/components/WarekiPicker/index.cjs +0 -8
  755. package/lib/components/WarekiPicker/index.cjs.map +0 -1
  756. package/lib/components/WarekiPicker/index.d.ts +0 -1
  757. package/lib/components/WarekiPicker/index.js.map +0 -1
  758. package/lib/types/SHRComponentProps.cjs +0 -3
  759. package/lib/types/SHRComponentProps.cjs.map +0 -1
  760. package/lib/types/SHRComponentProps.d.ts +0 -21
  761. package/lib/types/SHRComponentProps.js +0 -2
  762. package/lib/types/SHRComponentProps.js.map +0 -1
  763. /package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/calendarHelper.d.ts +0 -0
  764. /package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/index.cjs.map +0 -0
  765. /package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/index.d.ts +0 -0
  766. /package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/index.js +0 -0
  767. /package/lib/components/{Calendar/client → Input/WarekiPicker/client/Calendar}/index.js.map +0 -0
  768. /package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/datePickerHelper.d.ts +0 -0
  769. /package/lib/components/{Calendar → Input/WarekiPicker/client/DatePicker}/index.cjs.map +0 -0
  770. /package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/index.d.ts +0 -0
  771. /package/lib/components/{DatePicker → Input/WarekiPicker}/client/DatePicker/index.js +0 -0
  772. /package/lib/components/{Calendar → Input/WarekiPicker/client/DatePicker}/index.js.map +0 -0
@@ -136,6 +136,12 @@ const buttonClassNameGenerator = index.tv({
136
136
  /* disabled ではなく aria-disabled で文字色が変わらないため、強制カラーモード時の色を指定 */
137
137
  'aria-disabled:forced-colors:shr-border-[GrayText] aria-disabled:forced-colors:shr-text-[GrayText]',
138
138
  '[&_.smarthr-ui-Icon]:forced-colors:aria-disabled:shr-fill-[GrayText]',
139
+ /* アイコンにcolor propで固定色が指定されていても、aria-disabled時は無効化色に揃える。
140
+ react-icons(IconBase)はcolor propをstyle="color: ..."というインラインスタイルとしても
141
+ 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の
142
+ みでインラインスタイルを持たないため!importantなしで上書きできる) */
143
+ '[&_.smarthr-ui-Icon]:aria-disabled:!shr-text-color-inherit',
144
+ '[&_.smarthr-ui-Icon]:aria-disabled:shr-fill-current',
139
145
  ],
140
146
  loader: [
141
147
  'shr-align-bottom',
@@ -220,6 +226,12 @@ const anchorClassNameGenerator = index.tv({
220
226
  '[&:not([href])]:shr-bg-clip-padding',
221
227
  '[&_.smarthr-ui-Icon]:forced-colors:shr-fill-[LinkText]',
222
228
  '[&:not([href])_.smarthr-ui-Icon]:forced-colors:shr-fill-[CanvasText]',
229
+ /* アイコンにcolor propで固定色が指定されていても、無効化時は無効化色に揃える。
230
+ react-icons(IconBase)はcolor propをstyle="color: ..."というインラインスタイルとしても
231
+ 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の
232
+ みでインラインスタイルを持たないため!importantなしで上書きできる) */
233
+ '[&:not([href])_.smarthr-ui-Icon]:!shr-text-color-inherit',
234
+ '[&:not([href])_.smarthr-ui-Icon]:shr-fill-current',
223
235
  ],
224
236
  },
225
237
  variants: {
@@ -1 +1 @@
1
- {"version":3,"file":"style.cjs","sources":["../../../src/components/Button/style.ts"],"sourcesContent":["import { tv } from 'tailwind-variants'\n\nconst baseClassNameGenerator = tv({\n slots: {\n wrapper: [\n 'shr-box-border',\n 'shr-cursor-pointer',\n 'shr-inline-flex',\n 'shr-justify-center',\n 'shr-items-center',\n 'shr-gap-0.5',\n 'shr-text-center',\n 'shr-whitespace-nowrap',\n 'shr-rounded-m',\n /* ボタンの高さを合わせるために指定 */\n 'shr-border-shorthand',\n 'shr-font-inherit',\n 'shr-font-bold',\n 'shr-leading-none',\n 'focus-visible:shr-focus-indicator',\n 'contrast-more:shr-border-high-contrast',\n /* baseline より下の leading などの余白を埋める */\n '[&_.smarthr-ui-Icon]:shr-block',\n /** selector list は使えない\n * via https://github.com/tailwindlabs/tailwindcss/issues/10576#issuecomment-1440703413\n */\n '[&_svg]:shr-block',\n 'data-[loading]:shr-flex-row-reverse',\n ],\n inner: [\n 'smarthr-ui-Button-body',\n /* LineClamp を併用する場合に、幅を計算してもらうために指定 */\n 'shr-min-w-0',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'shr-border-main',\n 'shr-bg-main',\n 'shr-text-white',\n 'focus-visible:shr-border-main-darken',\n 'focus-visible:shr-bg-main-darken',\n 'hover:shr-border-main-darken',\n 'hover:shr-bg-main-darken',\n ],\n },\n secondary: {\n wrapper: [\n 'shr-border-default',\n 'shr-bg-white',\n 'shr-text-black',\n 'focus-visible:shr-border-darken',\n 'focus-visible:shr-bg-white-darken',\n 'focus-visible:contrast-more:shr-border-high-contrast',\n 'hover:shr-border-darken',\n 'hover:shr-bg-white-darken',\n 'hover:contrast-more:shr-border-high-contrast',\n ],\n },\n danger: {\n wrapper: [\n 'shr-border-danger',\n 'shr-bg-danger',\n 'shr-text-white',\n 'focus-visible:shr-border-danger-darken',\n 'focus-visible:shr-bg-danger-darken',\n 'hover:shr-border-danger-darken',\n 'hover:shr-bg-danger-darken',\n ],\n },\n skeleton: {\n wrapper: [\n 'shr-border-white',\n 'shr-bg-transparent',\n 'shr-text-white',\n 'focus-visible:shr-border-white-darken',\n 'focus-visible:shr-bg-overlay',\n 'focus-visible:shr-text-white-darken',\n 'hover:shr-border-white-darken',\n 'hover:shr-bg-overlay',\n 'hover:shr-text-white-darken',\n ],\n },\n text: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-black',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n ],\n },\n tertiary: {},\n },\n size: {\n M: {\n wrapper: [\n 'shr-text-base',\n 'shr-px-1',\n 'shr-py-0.75',\n /* data-squareは子要素(inner span)に設定されるため:has()で検知する。\n 上記px/pyより詳細度が高くshr-p-0.75相当に上書きされる */\n '[&:has([data-square])]:shr-p-0.75',\n ],\n },\n S: {\n wrapper: [\n 'shr-p-0.5',\n 'shr-text-sm',\n /* ボタンラベルの line-height を 0 にしたため、高さを担保する */\n 'shr-min-h-[calc(theme(fontSize.sm)+theme(spacing.1)+theme(borderWidth.2))]',\n ],\n /* SVG とテキストコンテンツの縦位置を揃えるために指定 */\n inner: 'shr-leading-[0]',\n },\n },\n wide: {\n true: {\n wrapper: 'shr-w-full',\n },\n },\n },\n})\n\nexport const buttonClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-Button',\n 'aria-disabled:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n 'aria-disabled:shr-bg-clip-padding',\n /* disabled ではなく aria-disabled で文字色が変わらないため、強制カラーモード時の色を指定 */\n 'aria-disabled:forced-colors:shr-border-[GrayText] aria-disabled:forced-colors:shr-text-[GrayText]',\n '[&_.smarthr-ui-Icon]:forced-colors:aria-disabled:shr-fill-[GrayText]',\n ],\n loader: [\n 'shr-align-bottom',\n '[&_.smarthr-ui-Loader-spinner]:shr-h-em [&_.smarthr-ui-Loader-spinner]:shr-w-em',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'aria-disabled:shr-border-main/50',\n 'aria-disabled:shr-bg-main/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n secondary: {\n wrapper: [\n 'aria-disabled:shr-border-disabled',\n 'aria-disabled:shr-bg-white-darken',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n tertiary: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-link',\n 'shr-font-normal',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-link/50',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-link/50',\n },\n danger: {\n wrapper: [\n 'aria-disabled:shr-border-danger/50',\n 'aria-disabled:shr-bg-danger/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n skeleton: {\n wrapper: [\n 'aria-disabled:shr-border-white/50',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n text: {\n wrapper: [\n 'aria-disabled:shr-border-transparent',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n },\n },\n})\n\nexport const anchorClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-AnchorButton',\n 'shr-no-underline',\n '[&:not([href])]:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n '[&:not([href])]:shr-bg-clip-padding',\n '[&_.smarthr-ui-Icon]:forced-colors:shr-fill-[LinkText]',\n '[&:not([href])_.smarthr-ui-Icon]:forced-colors:shr-fill-[CanvasText]',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n '[&:not([href])]:shr-border-main/50',\n '[&:not([href])]:shr-bg-main/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n secondary: {\n wrapper: [\n '[&:not([href])]:shr-border-disabled',\n '[&:not([href])]:shr-bg-white-darken',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n danger: {\n wrapper: [\n '[&:not([href])]:shr-border-danger/50',\n '[&:not([href])]:shr-bg-danger/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n skeleton: {\n wrapper: [\n '[&:not([href])]:shr-border-white/50',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n text: {\n wrapper: [\n '[&:not([href])]:shr-border-transparent',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n },\n },\n})\n"],"names":["tv"],"mappings":";;;;AAEA,MAAM,sBAAsB,GAAGA,QAAE,CAAC;AAChC,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE;YACP,gBAAgB;YAChB,oBAAoB;YACpB,iBAAiB;YACjB,oBAAoB;YACpB,kBAAkB;YAClB,aAAa;YACb,iBAAiB;YACjB,uBAAuB;YACvB,eAAe;;YAEf,sBAAsB;YACtB,kBAAkB;YAClB,eAAe;YACf,kBAAkB;YAClB,mCAAmC;YACnC,wCAAwC;;YAExC,gCAAgC;AAChC;;AAEG;YACH,mBAAmB;YACnB,qCAAqC;AACtC,SAAA;AACD,QAAA,KAAK,EAAE;YACL,wBAAwB;;YAExB,aAAa;AACd,SAAA;AAC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AA,OAAO,EAAE;oBACP,wCAAwC;oBACxC,oCAAoC;oBACpC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;AACF,CAAA;;;"}
1
+ {"version":3,"file":"style.cjs","sources":["../../../src/components/Button/style.ts"],"sourcesContent":["import { tv } from 'tailwind-variants'\n\nconst baseClassNameGenerator = tv({\n slots: {\n wrapper: [\n 'shr-box-border',\n 'shr-cursor-pointer',\n 'shr-inline-flex',\n 'shr-justify-center',\n 'shr-items-center',\n 'shr-gap-0.5',\n 'shr-text-center',\n 'shr-whitespace-nowrap',\n 'shr-rounded-m',\n /* ボタンの高さを合わせるために指定 */\n 'shr-border-shorthand',\n 'shr-font-inherit',\n 'shr-font-bold',\n 'shr-leading-none',\n 'focus-visible:shr-focus-indicator',\n 'contrast-more:shr-border-high-contrast',\n /* baseline より下の leading などの余白を埋める */\n '[&_.smarthr-ui-Icon]:shr-block',\n /** selector list は使えない\n * via https://github.com/tailwindlabs/tailwindcss/issues/10576#issuecomment-1440703413\n */\n '[&_svg]:shr-block',\n 'data-[loading]:shr-flex-row-reverse',\n ],\n inner: [\n 'smarthr-ui-Button-body',\n /* LineClamp を併用する場合に、幅を計算してもらうために指定 */\n 'shr-min-w-0',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'shr-border-main',\n 'shr-bg-main',\n 'shr-text-white',\n 'focus-visible:shr-border-main-darken',\n 'focus-visible:shr-bg-main-darken',\n 'hover:shr-border-main-darken',\n 'hover:shr-bg-main-darken',\n ],\n },\n secondary: {\n wrapper: [\n 'shr-border-default',\n 'shr-bg-white',\n 'shr-text-black',\n 'focus-visible:shr-border-darken',\n 'focus-visible:shr-bg-white-darken',\n 'focus-visible:contrast-more:shr-border-high-contrast',\n 'hover:shr-border-darken',\n 'hover:shr-bg-white-darken',\n 'hover:contrast-more:shr-border-high-contrast',\n ],\n },\n danger: {\n wrapper: [\n 'shr-border-danger',\n 'shr-bg-danger',\n 'shr-text-white',\n 'focus-visible:shr-border-danger-darken',\n 'focus-visible:shr-bg-danger-darken',\n 'hover:shr-border-danger-darken',\n 'hover:shr-bg-danger-darken',\n ],\n },\n skeleton: {\n wrapper: [\n 'shr-border-white',\n 'shr-bg-transparent',\n 'shr-text-white',\n 'focus-visible:shr-border-white-darken',\n 'focus-visible:shr-bg-overlay',\n 'focus-visible:shr-text-white-darken',\n 'hover:shr-border-white-darken',\n 'hover:shr-bg-overlay',\n 'hover:shr-text-white-darken',\n ],\n },\n text: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-black',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n ],\n },\n tertiary: {},\n },\n size: {\n M: {\n wrapper: [\n 'shr-text-base',\n 'shr-px-1',\n 'shr-py-0.75',\n /* data-squareは子要素(inner span)に設定されるため:has()で検知する。\n 上記px/pyより詳細度が高くshr-p-0.75相当に上書きされる */\n '[&:has([data-square])]:shr-p-0.75',\n ],\n },\n S: {\n wrapper: [\n 'shr-p-0.5',\n 'shr-text-sm',\n /* ボタンラベルの line-height を 0 にしたため、高さを担保する */\n 'shr-min-h-[calc(theme(fontSize.sm)+theme(spacing.1)+theme(borderWidth.2))]',\n ],\n /* SVG とテキストコンテンツの縦位置を揃えるために指定 */\n inner: 'shr-leading-[0]',\n },\n },\n wide: {\n true: {\n wrapper: 'shr-w-full',\n },\n },\n },\n})\n\nexport const buttonClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-Button',\n 'aria-disabled:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n 'aria-disabled:shr-bg-clip-padding',\n /* disabled ではなく aria-disabled で文字色が変わらないため、強制カラーモード時の色を指定 */\n 'aria-disabled:forced-colors:shr-border-[GrayText] aria-disabled:forced-colors:shr-text-[GrayText]',\n '[&_.smarthr-ui-Icon]:forced-colors:aria-disabled:shr-fill-[GrayText]',\n /* アイコンにcolor propで固定色が指定されていても、aria-disabled時は無効化色に揃える。\n react-icons(IconBase)はcolor propをstyle=\"color: ...\"というインラインスタイルとしても\n 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の\n みでインラインスタイルを持たないため!importantなしで上書きできる) */\n '[&_.smarthr-ui-Icon]:aria-disabled:!shr-text-color-inherit',\n '[&_.smarthr-ui-Icon]:aria-disabled:shr-fill-current',\n ],\n loader: [\n 'shr-align-bottom',\n '[&_.smarthr-ui-Loader-spinner]:shr-h-em [&_.smarthr-ui-Loader-spinner]:shr-w-em',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'aria-disabled:shr-border-main/50',\n 'aria-disabled:shr-bg-main/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n secondary: {\n wrapper: [\n 'aria-disabled:shr-border-disabled',\n 'aria-disabled:shr-bg-white-darken',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n tertiary: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-link',\n 'shr-font-normal',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-link/50',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-link/50',\n },\n danger: {\n wrapper: [\n 'aria-disabled:shr-border-danger/50',\n 'aria-disabled:shr-bg-danger/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n skeleton: {\n wrapper: [\n 'aria-disabled:shr-border-white/50',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n text: {\n wrapper: [\n 'aria-disabled:shr-border-transparent',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n },\n },\n})\n\nexport const anchorClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-AnchorButton',\n 'shr-no-underline',\n '[&:not([href])]:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n '[&:not([href])]:shr-bg-clip-padding',\n '[&_.smarthr-ui-Icon]:forced-colors:shr-fill-[LinkText]',\n '[&:not([href])_.smarthr-ui-Icon]:forced-colors:shr-fill-[CanvasText]',\n /* アイコンにcolor propで固定色が指定されていても、無効化時は無効化色に揃える。\n react-icons(IconBase)はcolor propをstyle=\"color: ...\"というインラインスタイルとしても\n 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の\n みでインラインスタイルを持たないため!importantなしで上書きできる) */\n '[&:not([href])_.smarthr-ui-Icon]:!shr-text-color-inherit',\n '[&:not([href])_.smarthr-ui-Icon]:shr-fill-current',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n '[&:not([href])]:shr-border-main/50',\n '[&:not([href])]:shr-bg-main/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n secondary: {\n wrapper: [\n '[&:not([href])]:shr-border-disabled',\n '[&:not([href])]:shr-bg-white-darken',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n danger: {\n wrapper: [\n '[&:not([href])]:shr-border-danger/50',\n '[&:not([href])]:shr-bg-danger/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n skeleton: {\n wrapper: [\n '[&:not([href])]:shr-border-white/50',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n text: {\n wrapper: [\n '[&:not([href])]:shr-border-transparent',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n },\n },\n})\n"],"names":["tv"],"mappings":";;;;AAEA,MAAM,sBAAsB,GAAGA,QAAE,CAAC;AAChC,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE;YACP,gBAAgB;YAChB,oBAAoB;YACpB,iBAAiB;YACjB,oBAAoB;YACpB,kBAAkB;YAClB,aAAa;YACb,iBAAiB;YACjB,uBAAuB;YACvB,eAAe;;YAEf,sBAAsB;YACtB,kBAAkB;YAClB,eAAe;YACf,kBAAkB;YAClB,mCAAmC;YACnC,wCAAwC;;YAExC,gCAAgC;AAChC;;AAEG;YACH,mBAAmB;YACnB,qCAAqC;AACtC,SAAA;AACD,QAAA,KAAK,EAAE;YACL,wBAAwB;;YAExB,aAAa;AACd,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE;oBACP,iBAAiB;oBACjB,aAAa;oBACb,gBAAgB;oBAChB,sCAAsC;oBACtC,kCAAkC;oBAClC,8BAA8B;oBAC9B,0BAA0B;AAC3B,iBAAA;AACF,aAAA;AACD,YAAA,SAAS,EAAE;AACT,gBAAA,OAAO,EAAE;oBACP,oBAAoB;oBACpB,cAAc;oBACd,gBAAgB;oBAChB,iCAAiC;oBACjC,mCAAmC;oBACnC,sDAAsD;oBACtD,yBAAyB;oBACzB,2BAA2B;oBAC3B,8CAA8C;AAC/C,iBAAA;AACF,aAAA;AACD,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE;oBACP,mBAAmB;oBACnB,eAAe;oBACf,gBAAgB;oBAChB,wCAAwC;oBACxC,oCAAoC;oBACpC,gCAAgC;oBAChC,4BAA4B;AAC7B,iBAAA;AACF,aAAA;AACD,YAAA,QAAQ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zB,kBAAkB;YAClB,wCAAwC;;YAExC,qCAAqC;YACrC,wDAAwD;YACxD,sEAAsE;AACtE;;;AAGyC;YACzC,0DAA0D;YAC1D,mDAAmD;AACpD,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE;oBACP,oCAAoC;oBACpC,gCAAgC;oBAChC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,SAAS,EAAE;AACT,gBAAA,OAAO,EAAE;oBACP,qCAAqC;oBACrC,qCAAqC;oBACrC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE;oBACP,sCAAsC;oBACtC,kCAAkC;oBAClC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE;oBACP,qCAAqC;oBACrC,oCAAoC;oBACpC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,IAAI,EAAE;AACJ,gBAAA,OAAO,EAAE;oBACP,wCAAwC;oBACxC,oCAAoC;oBACpC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;AACF,CAAA;;;"}
@@ -134,6 +134,12 @@ const buttonClassNameGenerator = ce({
134
134
  /* disabled ではなく aria-disabled で文字色が変わらないため、強制カラーモード時の色を指定 */
135
135
  'aria-disabled:forced-colors:shr-border-[GrayText] aria-disabled:forced-colors:shr-text-[GrayText]',
136
136
  '[&_.smarthr-ui-Icon]:forced-colors:aria-disabled:shr-fill-[GrayText]',
137
+ /* アイコンにcolor propで固定色が指定されていても、aria-disabled時は無効化色に揃える。
138
+ react-icons(IconBase)はcolor propをstyle="color: ..."というインラインスタイルとしても
139
+ 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の
140
+ みでインラインスタイルを持たないため!importantなしで上書きできる) */
141
+ '[&_.smarthr-ui-Icon]:aria-disabled:!shr-text-color-inherit',
142
+ '[&_.smarthr-ui-Icon]:aria-disabled:shr-fill-current',
137
143
  ],
138
144
  loader: [
139
145
  'shr-align-bottom',
@@ -218,6 +224,12 @@ const anchorClassNameGenerator = ce({
218
224
  '[&:not([href])]:shr-bg-clip-padding',
219
225
  '[&_.smarthr-ui-Icon]:forced-colors:shr-fill-[LinkText]',
220
226
  '[&:not([href])_.smarthr-ui-Icon]:forced-colors:shr-fill-[CanvasText]',
227
+ /* アイコンにcolor propで固定色が指定されていても、無効化時は無効化色に揃える。
228
+ react-icons(IconBase)はcolor propをstyle="color: ..."というインラインスタイルとしても
229
+ 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の
230
+ みでインラインスタイルを持たないため!importantなしで上書きできる) */
231
+ '[&:not([href])_.smarthr-ui-Icon]:!shr-text-color-inherit',
232
+ '[&:not([href])_.smarthr-ui-Icon]:shr-fill-current',
221
233
  ],
222
234
  },
223
235
  variants: {
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../src/components/Button/style.ts"],"sourcesContent":["import { tv } from 'tailwind-variants'\n\nconst baseClassNameGenerator = tv({\n slots: {\n wrapper: [\n 'shr-box-border',\n 'shr-cursor-pointer',\n 'shr-inline-flex',\n 'shr-justify-center',\n 'shr-items-center',\n 'shr-gap-0.5',\n 'shr-text-center',\n 'shr-whitespace-nowrap',\n 'shr-rounded-m',\n /* ボタンの高さを合わせるために指定 */\n 'shr-border-shorthand',\n 'shr-font-inherit',\n 'shr-font-bold',\n 'shr-leading-none',\n 'focus-visible:shr-focus-indicator',\n 'contrast-more:shr-border-high-contrast',\n /* baseline より下の leading などの余白を埋める */\n '[&_.smarthr-ui-Icon]:shr-block',\n /** selector list は使えない\n * via https://github.com/tailwindlabs/tailwindcss/issues/10576#issuecomment-1440703413\n */\n '[&_svg]:shr-block',\n 'data-[loading]:shr-flex-row-reverse',\n ],\n inner: [\n 'smarthr-ui-Button-body',\n /* LineClamp を併用する場合に、幅を計算してもらうために指定 */\n 'shr-min-w-0',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'shr-border-main',\n 'shr-bg-main',\n 'shr-text-white',\n 'focus-visible:shr-border-main-darken',\n 'focus-visible:shr-bg-main-darken',\n 'hover:shr-border-main-darken',\n 'hover:shr-bg-main-darken',\n ],\n },\n secondary: {\n wrapper: [\n 'shr-border-default',\n 'shr-bg-white',\n 'shr-text-black',\n 'focus-visible:shr-border-darken',\n 'focus-visible:shr-bg-white-darken',\n 'focus-visible:contrast-more:shr-border-high-contrast',\n 'hover:shr-border-darken',\n 'hover:shr-bg-white-darken',\n 'hover:contrast-more:shr-border-high-contrast',\n ],\n },\n danger: {\n wrapper: [\n 'shr-border-danger',\n 'shr-bg-danger',\n 'shr-text-white',\n 'focus-visible:shr-border-danger-darken',\n 'focus-visible:shr-bg-danger-darken',\n 'hover:shr-border-danger-darken',\n 'hover:shr-bg-danger-darken',\n ],\n },\n skeleton: {\n wrapper: [\n 'shr-border-white',\n 'shr-bg-transparent',\n 'shr-text-white',\n 'focus-visible:shr-border-white-darken',\n 'focus-visible:shr-bg-overlay',\n 'focus-visible:shr-text-white-darken',\n 'hover:shr-border-white-darken',\n 'hover:shr-bg-overlay',\n 'hover:shr-text-white-darken',\n ],\n },\n text: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-black',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n ],\n },\n tertiary: {},\n },\n size: {\n M: {\n wrapper: [\n 'shr-text-base',\n 'shr-px-1',\n 'shr-py-0.75',\n /* data-squareは子要素(inner span)に設定されるため:has()で検知する。\n 上記px/pyより詳細度が高くshr-p-0.75相当に上書きされる */\n '[&:has([data-square])]:shr-p-0.75',\n ],\n },\n S: {\n wrapper: [\n 'shr-p-0.5',\n 'shr-text-sm',\n /* ボタンラベルの line-height を 0 にしたため、高さを担保する */\n 'shr-min-h-[calc(theme(fontSize.sm)+theme(spacing.1)+theme(borderWidth.2))]',\n ],\n /* SVG とテキストコンテンツの縦位置を揃えるために指定 */\n inner: 'shr-leading-[0]',\n },\n },\n wide: {\n true: {\n wrapper: 'shr-w-full',\n },\n },\n },\n})\n\nexport const buttonClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-Button',\n 'aria-disabled:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n 'aria-disabled:shr-bg-clip-padding',\n /* disabled ではなく aria-disabled で文字色が変わらないため、強制カラーモード時の色を指定 */\n 'aria-disabled:forced-colors:shr-border-[GrayText] aria-disabled:forced-colors:shr-text-[GrayText]',\n '[&_.smarthr-ui-Icon]:forced-colors:aria-disabled:shr-fill-[GrayText]',\n ],\n loader: [\n 'shr-align-bottom',\n '[&_.smarthr-ui-Loader-spinner]:shr-h-em [&_.smarthr-ui-Loader-spinner]:shr-w-em',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'aria-disabled:shr-border-main/50',\n 'aria-disabled:shr-bg-main/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n secondary: {\n wrapper: [\n 'aria-disabled:shr-border-disabled',\n 'aria-disabled:shr-bg-white-darken',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n tertiary: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-link',\n 'shr-font-normal',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-link/50',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-link/50',\n },\n danger: {\n wrapper: [\n 'aria-disabled:shr-border-danger/50',\n 'aria-disabled:shr-bg-danger/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n skeleton: {\n wrapper: [\n 'aria-disabled:shr-border-white/50',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n text: {\n wrapper: [\n 'aria-disabled:shr-border-transparent',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n },\n },\n})\n\nexport const anchorClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-AnchorButton',\n 'shr-no-underline',\n '[&:not([href])]:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n '[&:not([href])]:shr-bg-clip-padding',\n '[&_.smarthr-ui-Icon]:forced-colors:shr-fill-[LinkText]',\n '[&:not([href])_.smarthr-ui-Icon]:forced-colors:shr-fill-[CanvasText]',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n '[&:not([href])]:shr-border-main/50',\n '[&:not([href])]:shr-bg-main/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n secondary: {\n wrapper: [\n '[&:not([href])]:shr-border-disabled',\n '[&:not([href])]:shr-bg-white-darken',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n danger: {\n wrapper: [\n '[&:not([href])]:shr-border-danger/50',\n '[&:not([href])]:shr-bg-danger/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n skeleton: {\n wrapper: [\n '[&:not([href])]:shr-border-white/50',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n text: {\n wrapper: [\n '[&:not([href])]:shr-border-transparent',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n },\n },\n})\n"],"names":["tv"],"mappings":";;AAEA,MAAM,sBAAsB,GAAGA,EAAE,CAAC;AAChC,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE;YACP,gBAAgB;YAChB,oBAAoB;YACpB,iBAAiB;YACjB,oBAAoB;YACpB,kBAAkB;YAClB,aAAa;YACb,iBAAiB;YACjB,uBAAuB;YACvB,eAAe;;YAEf,sBAAsB;YACtB,kBAAkB;YAClB,eAAe;YACf,kBAAkB;YAClB,mCAAmC;YACnC,wCAAwC;;YAExC,gCAAgC;AAChC;;AAEG;YACH,mBAAmB;YACnB,qCAAqC;AACtC,SAAA;AACD,QAAA,KAAK,EAAE;YACL,wBAAwB;;YAExB,aAAa;AACd,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE;oBACP,iBAAiB;oBACjB,aAAa;oBACb,gBAAgB;oBAChB,sCAAsC;oBACtC,kCAAkC;oBAClC,8BAA8B;oBAC9B,0BAA0B;AAC3B,iBAAA;AACF,aAAA;AACD,YAAA,SAAS,EAAE;AACT,gBAAA,OAAO,EAAE;oBACP,oBAAoB;oBACpB,cAAc;oBACd,gBAAgB;oBAChB,iCAAiC;oBACjC,mCAAmC;oBACnC,sDAAsD;oBACtD,yBAAyB;oBACzB,2BAA2B;oBAC3B,8CAA8C;AAC/C,iBAAA;AACF,aAAA;AACD,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE;oBACP,mBAAmB;oBACnB,eAAe;oBACf,gBAAgB;oBAChB,wCAAwC;oBACxC,oCAAoC;oBACpC,gCAAgC;oBAChC,4BAA4B;AAC7B,iBAAA;AACF,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OA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sE;AACvE,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;AACP,gBAAA,OAAO,EAAE;oBACP,oCAAoC;oBACpC,gCAAgC;oBAChC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,SAAS,EAAE;AACT,gBAAA,OAAO,EAAE;oBACP,qCAAqC;oBACrC,qCAAqC;oBACrC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,MAAM,EAAE;AACN,gBAAA,OAAO,EAAE;oBACP,sCAAsC;oBACtC,kCAAkC;oBAClC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,QAAQ,EAAE;AACR,gBAAA,OAAO,EAAE;oBACP,qCAAqC;oBACrC,oCAAoC;oBACpC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACD,YAAA,IAAI,EAAE;AACJ,gBAAA,OAAO,EAAE;oBACP,wCAAwC;oBACxC,oCAAoC;oBACpC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;AACF,CAAA;;"}
1
+ {"version":3,"file":"style.js","sources":["../../../src/components/Button/style.ts"],"sourcesContent":["import { tv } from 'tailwind-variants'\n\nconst baseClassNameGenerator = tv({\n slots: {\n wrapper: [\n 'shr-box-border',\n 'shr-cursor-pointer',\n 'shr-inline-flex',\n 'shr-justify-center',\n 'shr-items-center',\n 'shr-gap-0.5',\n 'shr-text-center',\n 'shr-whitespace-nowrap',\n 'shr-rounded-m',\n /* ボタンの高さを合わせるために指定 */\n 'shr-border-shorthand',\n 'shr-font-inherit',\n 'shr-font-bold',\n 'shr-leading-none',\n 'focus-visible:shr-focus-indicator',\n 'contrast-more:shr-border-high-contrast',\n /* baseline より下の leading などの余白を埋める */\n '[&_.smarthr-ui-Icon]:shr-block',\n /** selector list は使えない\n * via https://github.com/tailwindlabs/tailwindcss/issues/10576#issuecomment-1440703413\n */\n '[&_svg]:shr-block',\n 'data-[loading]:shr-flex-row-reverse',\n ],\n inner: [\n 'smarthr-ui-Button-body',\n /* LineClamp を併用する場合に、幅を計算してもらうために指定 */\n 'shr-min-w-0',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'shr-border-main',\n 'shr-bg-main',\n 'shr-text-white',\n 'focus-visible:shr-border-main-darken',\n 'focus-visible:shr-bg-main-darken',\n 'hover:shr-border-main-darken',\n 'hover:shr-bg-main-darken',\n ],\n },\n secondary: {\n wrapper: [\n 'shr-border-default',\n 'shr-bg-white',\n 'shr-text-black',\n 'focus-visible:shr-border-darken',\n 'focus-visible:shr-bg-white-darken',\n 'focus-visible:contrast-more:shr-border-high-contrast',\n 'hover:shr-border-darken',\n 'hover:shr-bg-white-darken',\n 'hover:contrast-more:shr-border-high-contrast',\n ],\n },\n danger: {\n wrapper: [\n 'shr-border-danger',\n 'shr-bg-danger',\n 'shr-text-white',\n 'focus-visible:shr-border-danger-darken',\n 'focus-visible:shr-bg-danger-darken',\n 'hover:shr-border-danger-darken',\n 'hover:shr-bg-danger-darken',\n ],\n },\n skeleton: {\n wrapper: [\n 'shr-border-white',\n 'shr-bg-transparent',\n 'shr-text-white',\n 'focus-visible:shr-border-white-darken',\n 'focus-visible:shr-bg-overlay',\n 'focus-visible:shr-text-white-darken',\n 'hover:shr-border-white-darken',\n 'hover:shr-bg-overlay',\n 'hover:shr-text-white-darken',\n ],\n },\n text: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-black',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n ],\n },\n tertiary: {},\n },\n size: {\n M: {\n wrapper: [\n 'shr-text-base',\n 'shr-px-1',\n 'shr-py-0.75',\n /* data-squareは子要素(inner span)に設定されるため:has()で検知する。\n 上記px/pyより詳細度が高くshr-p-0.75相当に上書きされる */\n '[&:has([data-square])]:shr-p-0.75',\n ],\n },\n S: {\n wrapper: [\n 'shr-p-0.5',\n 'shr-text-sm',\n /* ボタンラベルの line-height を 0 にしたため、高さを担保する */\n 'shr-min-h-[calc(theme(fontSize.sm)+theme(spacing.1)+theme(borderWidth.2))]',\n ],\n /* SVG とテキストコンテンツの縦位置を揃えるために指定 */\n inner: 'shr-leading-[0]',\n },\n },\n wide: {\n true: {\n wrapper: 'shr-w-full',\n },\n },\n },\n})\n\nexport const buttonClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-Button',\n 'aria-disabled:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n 'aria-disabled:shr-bg-clip-padding',\n /* disabled ではなく aria-disabled で文字色が変わらないため、強制カラーモード時の色を指定 */\n 'aria-disabled:forced-colors:shr-border-[GrayText] aria-disabled:forced-colors:shr-text-[GrayText]',\n '[&_.smarthr-ui-Icon]:forced-colors:aria-disabled:shr-fill-[GrayText]',\n /* アイコンにcolor propで固定色が指定されていても、aria-disabled時は無効化色に揃える。\n react-icons(IconBase)はcolor propをstyle=\"color: ...\"というインラインスタイルとしても\n 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の\n みでインラインスタイルを持たないため!importantなしで上書きできる) */\n '[&_.smarthr-ui-Icon]:aria-disabled:!shr-text-color-inherit',\n '[&_.smarthr-ui-Icon]:aria-disabled:shr-fill-current',\n ],\n loader: [\n 'shr-align-bottom',\n '[&_.smarthr-ui-Loader-spinner]:shr-h-em [&_.smarthr-ui-Loader-spinner]:shr-w-em',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n 'aria-disabled:shr-border-main/50',\n 'aria-disabled:shr-bg-main/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n secondary: {\n wrapper: [\n 'aria-disabled:shr-border-disabled',\n 'aria-disabled:shr-bg-white-darken',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n tertiary: {\n wrapper: [\n 'shr-border-transparent',\n 'shr-bg-transparent',\n 'shr-text-link',\n 'shr-font-normal',\n 'focus-visible:shr-bg-white-darken',\n 'hover:shr-bg-white-darken',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-link/50',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-link/50',\n },\n danger: {\n wrapper: [\n 'aria-disabled:shr-border-danger/50',\n 'aria-disabled:shr-bg-danger/50',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n skeleton: {\n wrapper: [\n 'aria-disabled:shr-border-white/50',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-white/50',\n ],\n loader: [\n '[&_.smarthr-ui-Loader-line]:shr-border-white/50',\n '[&_.smarthr-ui-Loader-line]:forced-colors:shr-border-[ButtonBorder]',\n ],\n },\n text: {\n wrapper: [\n 'aria-disabled:shr-border-transparent',\n 'aria-disabled:shr-bg-transparent',\n 'aria-disabled:shr-text-disabled',\n ],\n loader: '[&_.smarthr-ui-Loader-line]:shr-border-disabled',\n },\n },\n },\n})\n\nexport const anchorClassNameGenerator = tv({\n extend: baseClassNameGenerator,\n slots: {\n wrapper: [\n 'smarthr-ui-AnchorButton',\n 'shr-no-underline',\n '[&:not([href])]:shr-cursor-not-allowed',\n /* alpha color を使用しているので、背景色と干渉させない */\n '[&:not([href])]:shr-bg-clip-padding',\n '[&_.smarthr-ui-Icon]:forced-colors:shr-fill-[LinkText]',\n '[&:not([href])_.smarthr-ui-Icon]:forced-colors:shr-fill-[CanvasText]',\n /* アイコンにcolor propで固定色が指定されていても、無効化時は無効化色に揃える。\n react-icons(IconBase)はcolor propをstyle=\"color: ...\"というインラインスタイルとしても\n 出力するため、通常のクラスセレクタでは上書きできず!importantが必要(fillはプレゼンテーション属性の\n みでインラインスタイルを持たないため!importantなしで上書きできる) */\n '[&:not([href])_.smarthr-ui-Icon]:!shr-text-color-inherit',\n '[&:not([href])_.smarthr-ui-Icon]:shr-fill-current',\n ],\n },\n variants: {\n variant: {\n primary: {\n wrapper: [\n '[&:not([href])]:shr-border-main/50',\n '[&:not([href])]:shr-bg-main/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n secondary: {\n wrapper: [\n '[&:not([href])]:shr-border-disabled',\n '[&:not([href])]:shr-bg-white-darken',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n danger: {\n wrapper: [\n '[&:not([href])]:shr-border-danger/50',\n '[&:not([href])]:shr-bg-danger/50',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n skeleton: {\n wrapper: [\n '[&:not([href])]:shr-border-white/50',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-white/50',\n ],\n },\n text: {\n wrapper: [\n '[&:not([href])]:shr-border-transparent',\n '[&:not([href])]:shr-bg-transparent',\n '[&:not([href])]:shr-text-disabled',\n ],\n },\n },\n },\n})\n"],"names":["tv"],"mappings":";;AAEA,MAAM,sBAAsB,GAAGA,EAAE,CAAC;AAChC,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE;YACP,gBAAgB;YAChB,oBAAoB;YACpB,iBAAiB;YACjB,oBAAoB;YACpB,kBAAkB;YAClB,aAAa;YACb,iBAAiB;YACjB,uBAAuB;YACvB,eAAe;;YAEf,sBAAsB;YACtB,kBAAkB;YAClB,eAAe;YACf,kBAAkB;YAClB,mCAAmC;YACnC,wCAAwC;;YAExC,gCAAgC;AAChC;;AAEG;YACH,mBAAmB;YACnB,qCAAqC;AACtC,SAAA;AACD,QAAA,KAAK,EAAE;YACL,wBAAwB;;YAExB,aAAa;AACd,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OA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,IAAI,EAAE;AACJ,gBAAA,OAAO,EAAE;oBACP,wCAAwC;oBACxC,oCAAoC;oBACpC,mCAAmC;AACpC,iBAAA;AACF,aAAA;AACF,SAAA;AACF,KAAA;AACF,CAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.cjs","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, memo, useId, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { FaCheckIcon, FaMinusIcon } from '../Icon'\n\nimport { ActualCheckbox } from './client'\n\nimport type { SHRComponentPropsWithRef } from '../../types'\n\ntype Props = SHRComponentPropsWithRef<\n typeof ActualCheckbox,\n PropsWithChildren<{\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n }>\n>\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: 'smarthr-ui-Checkbox shr-inline-flex shr-items-baseline',\n box: [\n 'shr-border-shorthand shr-pointer-events-none shr-absolute shr-box-border shr-h-full shr-w-full shr-rounded-s shr-bg-white',\n 'contrast-more:shr-border-high-contrast',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-hidden',\n 'peer-checked:shr-border-main peer-checked:shr-bg-main contrast-more:peer-checked:shr-border-high-contrast',\n 'peer-indeterminate:shr-border-main peer-indeterminate:shr-bg-main contrast-more:peer-indeterminate:shr-border-high-contrast',\n 'peer-disabled:shr-border-disabled peer-disabled:shr-bg-white-darken',\n 'peer-disabled:peer-checked:shr-border-default peer-disabled:peer-checked:shr-bg-border',\n 'peer-disabled:peer-indeterminate:shr-border-default peer-disabled:peer-indeterminate:shr-bg-border',\n 'peer-focus-visible:shr-focus-indicator--outer',\n 'peer-hover:shr-shadow-input-hover',\n 'shr-border-default',\n 'peer-[[aria-invalid]]:shr-border-danger',\n ],\n input: [\n 'smarthr-ui-Checkbox-checkbox shr-peer shr-absolute shr-left-0 shr-top-0 shr-m-0 shr-h-full shr-w-full shr-cursor-pointer shr-opacity-0 disabled:shr-pointer-events-none',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-static forced-colors:shr-opacity-100',\n ],\n icon: 'shr-fill-current',\n iconWrap: [\n 'shr-pointer-events-none shr-absolute shr-left-1/2 shr-top-1/2 shr-inline-block shr-h-[theme(fontSize.2xs)] shr-w-[theme(fontSize.2xs)] -shr-translate-x-1/2 -shr-translate-y-1/2 shr-text-2xs',\n 'shr-text-transparent peer-checked:shr-text-white peer-indeterminate:shr-text-white',\n 'peer-disabled:peer-checked:shr-text-white-darken peer-disabled:peer-indeterminate:shr-text-white-darken',\n 'forced-colors:shr-hidden',\n ],\n innerWrapper:\n 'shr-relative shr-box-border shr-inline-block shr-h-[theme(fontSize.base)] shr-w-[theme(fontSize.base)] shr-shrink-0 shr-translate-y-[0.125em] shr-leading-none',\n label: [\n 'smarthr-ui-Checkbox-label shr-ms-0.5 shr-cursor-pointer shr-text-base shr-leading-tight',\n '[[data-disabled=true]>&]:shr-pointer-events-none [[data-disabled=true]>&]:shr-cursor-not-allowed [[data-disabled=true]>&]:shr-text-disabled',\n ],\n },\n})\n\nexport const Checkbox: FC<Props> = ({ mixed, className, children, disabled, id, ...rest }) => {\n const classNames = useMemo(() => {\n const { wrapper, innerWrapper, box, input, iconWrap, icon, label } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n innerWrapper: innerWrapper(),\n box: box(),\n input: input(),\n iconWrap: iconWrap(),\n icon: icon(),\n label: label(),\n }\n }, [className])\n\n const defaultId = useId()\n const checkBoxId = id || defaultId\n\n return (\n <span className={classNames.wrapper} data-disabled={disabled}>\n <span className={classNames.innerWrapper}>\n <ActualCheckbox\n {...rest}\n id={checkBoxId}\n disabled={disabled}\n mixed={mixed}\n className={classNames.input}\n />\n <AriaHiddenBox className={classNames.box} />\n <CheckIconArea mixed={mixed} classNames={classNames} />\n </span>\n {children && (\n <label htmlFor={checkBoxId} className={classNames.label}>\n {children}\n </label>\n )}\n </span>\n )\n}\n\nconst AriaHiddenBox = memo<{ className: string }>(({ className }) => (\n <span className={className} aria-hidden=\"true\" />\n))\n\nconst CheckIconArea = memo<\n Pick<Props, 'mixed'> & { classNames: { iconWrap: string; icon: string } }\n>(({ mixed, classNames }) => {\n const Icon = mixed ? FaMinusIcon : FaCheckIcon\n\n return (\n <span className={classNames.iconWrap}>\n <Icon className={classNames.icon} />\n </span>\n )\n})\n"],"names":["tv","useMemo","useId","_jsxs","_jsx","ActualCheckbox","memo","FaMinusIcon","FaCheckIcon"],"mappings":";;;;;;;;;;;AAmBA,MAAM,kBAAkB,GAAGA,QAAE,CAAC;AAC5B,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE,wDAAwD;AACjE,QAAA,GAAG,EAAE;YACH,2HAA2H;YAC3H,wCAAwC;;YAExC,0BAA0B;YAC1B,2GAA2G;YAC3G,6HAA6H;YAC7H,qEAAqE;YACrE,wFAAwF;YACxF,oGAAoG;YACpG,+CAA+C;YAC/C,mCAAmC;YACnC,oBAAoB;YACpB,yCAAyC;AAC1C,SAAA;AACD,QAAA,KAAK,EAAE;YACL,yKAAyK;;YAEzK,wDAAwD;AACzD,SAAA;AACD,QAAA,IAAI,EAAE,kBAAkB;AACxB,QAAA,QAAQ,EAAE;YACR,+LAA+L;YAC/L,oFAAoF;YACpF,yGAAyG;YACzG,0BAA0B;AAC3B,SAAA;AACD,QAAA,YAAY,EACV,gKAAgK;AAClK,QAAA,KAAK,EAAE;YACL,yFAAyF;YACzF,6IAA6I;AAC9I,SAAA;AACF,KAAA;AACF,CAAA,CAAC;MAEW,QAAQ,GAAc,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,KAAI;AAC3F,IAAA,MAAM,UAAU,GAAGC,aAAO,CAAC,MAAK;AAC9B,QAAA,MAAM,EAAE,OAAO,EAAE,YAAY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F,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,SAAS,iBAAc,MAAM,EAAA,CAAG,CAClD,CAAC;AAEF,MAAM,aAAa,GAAGE,UAAI,CAExB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAI;IAC1B,MAAM,IAAI,GAAG,KAAK,GAAGC,kCAAW,GAAGC,kCAAW;AAE9C,IAAA,QACEJ,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAA,QAAA,EAClCA,cAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAE,UAAU,CAAC,IAAI,EAAA,CAAI,EAAA,CAC/B;AAEX,CAAC,CAAC;;"}
1
+ {"version":3,"file":"Checkbox.cjs","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, memo, useId, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { FaCheckIcon, FaMinusIcon } from '../Icon'\n\nimport { ActualCheckbox } from './client'\n\nimport type { ExtendElementPropsWithRef } from '../../types'\n\ntype Props = ExtendElementPropsWithRef<\n typeof ActualCheckbox,\n PropsWithChildren<{\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n }>\n>\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: 'smarthr-ui-Checkbox shr-inline-flex shr-items-baseline',\n box: [\n 'shr-border-shorthand shr-pointer-events-none shr-absolute shr-box-border shr-h-full shr-w-full shr-rounded-s shr-bg-white',\n 'contrast-more:shr-border-high-contrast',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-hidden',\n 'peer-checked:shr-border-main peer-checked:shr-bg-main contrast-more:peer-checked:shr-border-high-contrast',\n 'peer-indeterminate:shr-border-main peer-indeterminate:shr-bg-main contrast-more:peer-indeterminate:shr-border-high-contrast',\n 'peer-disabled:shr-border-disabled peer-disabled:shr-bg-white-darken',\n 'peer-disabled:peer-checked:shr-border-default peer-disabled:peer-checked:shr-bg-border',\n 'peer-disabled:peer-indeterminate:shr-border-default peer-disabled:peer-indeterminate:shr-bg-border',\n 'peer-focus-visible:shr-focus-indicator--outer',\n 'peer-hover:shr-shadow-input-hover',\n 'shr-border-default',\n 'peer-[[aria-invalid]]:shr-border-danger',\n ],\n input: [\n 'smarthr-ui-Checkbox-checkbox shr-peer shr-absolute shr-left-0 shr-top-0 shr-m-0 shr-h-full shr-w-full shr-cursor-pointer shr-opacity-0 disabled:shr-pointer-events-none',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-static forced-colors:shr-opacity-100',\n ],\n icon: 'shr-fill-current',\n iconWrap: [\n 'shr-pointer-events-none shr-absolute shr-left-1/2 shr-top-1/2 shr-inline-block shr-h-[theme(fontSize.2xs)] shr-w-[theme(fontSize.2xs)] -shr-translate-x-1/2 -shr-translate-y-1/2 shr-text-2xs',\n 'shr-text-transparent peer-checked:shr-text-white peer-indeterminate:shr-text-white',\n 'peer-disabled:peer-checked:shr-text-white-darken peer-disabled:peer-indeterminate:shr-text-white-darken',\n 'forced-colors:shr-hidden',\n ],\n innerWrapper:\n 'shr-relative shr-box-border shr-inline-block shr-h-[theme(fontSize.base)] shr-w-[theme(fontSize.base)] shr-shrink-0 shr-translate-y-[0.125em] shr-leading-none',\n label: [\n 'smarthr-ui-Checkbox-label shr-ms-0.5 shr-cursor-pointer shr-text-base shr-leading-tight',\n '[[data-disabled=true]>&]:shr-pointer-events-none [[data-disabled=true]>&]:shr-cursor-not-allowed [[data-disabled=true]>&]:shr-text-disabled',\n ],\n },\n})\n\nexport const Checkbox: FC<Props> = ({ mixed, className, children, disabled, id, ...rest }) => {\n const classNames = useMemo(() => {\n const { wrapper, innerWrapper, box, input, iconWrap, icon, label } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n innerWrapper: innerWrapper(),\n box: box(),\n input: input(),\n iconWrap: iconWrap(),\n icon: icon(),\n label: label(),\n }\n }, [className])\n\n const defaultId = useId()\n const checkBoxId = id || defaultId\n\n return (\n <span className={classNames.wrapper} data-disabled={disabled}>\n <span className={classNames.innerWrapper}>\n <ActualCheckbox\n {...rest}\n id={checkBoxId}\n disabled={disabled}\n mixed={mixed}\n className={classNames.input}\n />\n <AriaHiddenBox className={classNames.box} />\n <CheckIconArea mixed={mixed} classNames={classNames} />\n </span>\n {children && (\n <label htmlFor={checkBoxId} className={classNames.label}>\n {children}\n </label>\n )}\n </span>\n )\n}\n\nconst AriaHiddenBox = memo<{ className: string }>(({ className }) => (\n <span className={className} aria-hidden=\"true\" />\n))\n\nconst CheckIconArea = memo<\n Pick<Props, 'mixed'> & { classNames: { iconWrap: string; icon: string } }\n>(({ mixed, classNames }) => {\n const Icon = mixed ? FaMinusIcon : FaCheckIcon\n\n return (\n <span className={classNames.iconWrap}>\n <Icon className={classNames.icon} />\n </span>\n )\n})\n"],"names":["tv","useMemo","useId","_jsxs","_jsx","ActualCheckbox","memo","FaMinusIcon","FaCheckIcon"],"mappings":";;;;;;;;;;;AAmBA,MAAM,kBAAkB,GAAGA,QAAE,CAAC;AAC5B,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE,wDAAwD;AACjE,QAAA,GAAG,EAAE;YACH,2HAA2H;YAC3H,wCAAwC;;YAExC,0BAA0B;YAC1B,2GAA2G;YAC3G,6HAA6H;YAC7H,qEAAqE;YACrE,wFAAwF;YACxF,oGAAoG;YACpG,+CAA+C;YAC/C,mCAAmC;YACnC,oBAAoB;YACpB,yCAAyC;AAC1C,SAAA;AACD,QAAA,KAAK,EAAE;YACL,yKAAyK;;YAEzK,wDAAwD;AACzD,SAAA;AACD,QAAA,IAAI,EAAE,kBAAkB;AACxB,QAAA,QAAQ,EAAE;YACR,+LAA+L;YAC/L,oFAAoF;YACpF,yGAAyG;YACzG,0BAA0B;AAC3B,SAAA;AACD,QAAA,YAAY,EACV,gKAAgK;AAClK,QAAA,KAAK,EAAE;Y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,UAAU,EAAE,UAAU,EAAA,CAAI,CAAA,EAAA,CAClD,EACN,QAAQ,KACPA,cAAA,CAAA,OAAA,EAAA,EAAO,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,CAAC,KAAK,EAAA,QAAA,EACpD,QAAQ,GACH,CACT,CAAA,EAAA,CACI;AAEX;AAEA,MAAM,aAAa,GAAGE,UAAI,CAAwB,CAAC,EAAE,SAAS,EAAE,MAC9DF,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,SAAS,iBAAc,MAAM,EAAA,CAAG,CAClD,CAAC;AAEF,MAAM,aAAa,GAAGE,UAAI,CAExB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAI;IAC1B,MAAM,IAAI,GAAG,KAAK,GAAGC,kCAAW,GAAGC,kCAAW;AAE9C,IAAA,QACEJ,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAA,QAAA,EAClCA,cAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAE,UAAU,CAAC,IAAI,EAAA,CAAI,EAAA,CAC/B;AAEX,CAAC,CAAC;;"}
@@ -1,7 +1,7 @@
1
1
  import { type FC, type PropsWithChildren } from 'react';
2
2
  import { ActualCheckbox } from './client';
3
- import type { SHRComponentPropsWithRef } from '../../types';
4
- type Props = SHRComponentPropsWithRef<typeof ActualCheckbox, PropsWithChildren<{
3
+ import type { ExtendElementPropsWithRef } from '../../types';
4
+ type Props = ExtendElementPropsWithRef<typeof ActualCheckbox, PropsWithChildren<{
5
5
  /** `true` のとき、チェック状態を `mixed` にする */
6
6
  mixed?: boolean;
7
7
  /** チェックボックスにエラーがあるかどうか */
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, memo, useId, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { FaCheckIcon, FaMinusIcon } from '../Icon'\n\nimport { ActualCheckbox } from './client'\n\nimport type { SHRComponentPropsWithRef } from '../../types'\n\ntype Props = SHRComponentPropsWithRef<\n typeof ActualCheckbox,\n PropsWithChildren<{\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n }>\n>\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: 'smarthr-ui-Checkbox shr-inline-flex shr-items-baseline',\n box: [\n 'shr-border-shorthand shr-pointer-events-none shr-absolute shr-box-border shr-h-full shr-w-full shr-rounded-s shr-bg-white',\n 'contrast-more:shr-border-high-contrast',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-hidden',\n 'peer-checked:shr-border-main peer-checked:shr-bg-main contrast-more:peer-checked:shr-border-high-contrast',\n 'peer-indeterminate:shr-border-main peer-indeterminate:shr-bg-main contrast-more:peer-indeterminate:shr-border-high-contrast',\n 'peer-disabled:shr-border-disabled peer-disabled:shr-bg-white-darken',\n 'peer-disabled:peer-checked:shr-border-default peer-disabled:peer-checked:shr-bg-border',\n 'peer-disabled:peer-indeterminate:shr-border-default peer-disabled:peer-indeterminate:shr-bg-border',\n 'peer-focus-visible:shr-focus-indicator--outer',\n 'peer-hover:shr-shadow-input-hover',\n 'shr-border-default',\n 'peer-[[aria-invalid]]:shr-border-danger',\n ],\n input: [\n 'smarthr-ui-Checkbox-checkbox shr-peer shr-absolute shr-left-0 shr-top-0 shr-m-0 shr-h-full shr-w-full shr-cursor-pointer shr-opacity-0 disabled:shr-pointer-events-none',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-static forced-colors:shr-opacity-100',\n ],\n icon: 'shr-fill-current',\n iconWrap: [\n 'shr-pointer-events-none shr-absolute shr-left-1/2 shr-top-1/2 shr-inline-block shr-h-[theme(fontSize.2xs)] shr-w-[theme(fontSize.2xs)] -shr-translate-x-1/2 -shr-translate-y-1/2 shr-text-2xs',\n 'shr-text-transparent peer-checked:shr-text-white peer-indeterminate:shr-text-white',\n 'peer-disabled:peer-checked:shr-text-white-darken peer-disabled:peer-indeterminate:shr-text-white-darken',\n 'forced-colors:shr-hidden',\n ],\n innerWrapper:\n 'shr-relative shr-box-border shr-inline-block shr-h-[theme(fontSize.base)] shr-w-[theme(fontSize.base)] shr-shrink-0 shr-translate-y-[0.125em] shr-leading-none',\n label: [\n 'smarthr-ui-Checkbox-label shr-ms-0.5 shr-cursor-pointer shr-text-base shr-leading-tight',\n '[[data-disabled=true]>&]:shr-pointer-events-none [[data-disabled=true]>&]:shr-cursor-not-allowed [[data-disabled=true]>&]:shr-text-disabled',\n ],\n },\n})\n\nexport const Checkbox: FC<Props> = ({ mixed, className, children, disabled, id, ...rest }) => {\n const classNames = useMemo(() => {\n const { wrapper, innerWrapper, box, input, iconWrap, icon, label } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n innerWrapper: innerWrapper(),\n box: box(),\n input: input(),\n iconWrap: iconWrap(),\n icon: icon(),\n label: label(),\n }\n }, [className])\n\n const defaultId = useId()\n const checkBoxId = id || defaultId\n\n return (\n <span className={classNames.wrapper} data-disabled={disabled}>\n <span className={classNames.innerWrapper}>\n <ActualCheckbox\n {...rest}\n id={checkBoxId}\n disabled={disabled}\n mixed={mixed}\n className={classNames.input}\n />\n <AriaHiddenBox className={classNames.box} />\n <CheckIconArea mixed={mixed} classNames={classNames} />\n </span>\n {children && (\n <label htmlFor={checkBoxId} className={classNames.label}>\n {children}\n </label>\n )}\n </span>\n )\n}\n\nconst AriaHiddenBox = memo<{ className: string }>(({ className }) => (\n <span className={className} aria-hidden=\"true\" />\n))\n\nconst CheckIconArea = memo<\n Pick<Props, 'mixed'> & { classNames: { iconWrap: string; icon: string } }\n>(({ mixed, classNames }) => {\n const Icon = mixed ? FaMinusIcon : FaCheckIcon\n\n return (\n <span className={classNames.iconWrap}>\n <Icon className={classNames.icon} />\n </span>\n )\n})\n"],"names":["tv","_jsxs","_jsx"],"mapp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A,CAAI,EAAA,CAC/B;AAEX,CAAC,CAAC;;"}
1
+ {"version":3,"file":"Checkbox.js","sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren, memo, useId, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { FaCheckIcon, FaMinusIcon } from '../Icon'\n\nimport { ActualCheckbox } from './client'\n\nimport type { ExtendElementPropsWithRef } from '../../types'\n\ntype Props = ExtendElementPropsWithRef<\n typeof ActualCheckbox,\n PropsWithChildren<{\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n }>\n>\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: 'smarthr-ui-Checkbox shr-inline-flex shr-items-baseline',\n box: [\n 'shr-border-shorthand shr-pointer-events-none shr-absolute shr-box-border shr-h-full shr-w-full shr-rounded-s shr-bg-white',\n 'contrast-more:shr-border-high-contrast',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-hidden',\n 'peer-checked:shr-border-main peer-checked:shr-bg-main contrast-more:peer-checked:shr-border-high-contrast',\n 'peer-indeterminate:shr-border-main peer-indeterminate:shr-bg-main contrast-more:peer-indeterminate:shr-border-high-contrast',\n 'peer-disabled:shr-border-disabled peer-disabled:shr-bg-white-darken',\n 'peer-disabled:peer-checked:shr-border-default peer-disabled:peer-checked:shr-bg-border',\n 'peer-disabled:peer-indeterminate:shr-border-default peer-disabled:peer-indeterminate:shr-bg-border',\n 'peer-focus-visible:shr-focus-indicator--outer',\n 'peer-hover:shr-shadow-input-hover',\n 'shr-border-default',\n 'peer-[[aria-invalid]]:shr-border-danger',\n ],\n input: [\n 'smarthr-ui-Checkbox-checkbox shr-peer shr-absolute shr-left-0 shr-top-0 shr-m-0 shr-h-full shr-w-full shr-cursor-pointer shr-opacity-0 disabled:shr-pointer-events-none',\n /* 強制カラーモードのときは、ブラウザ標準のUIを表示する */\n 'forced-colors:shr-static forced-colors:shr-opacity-100',\n ],\n icon: 'shr-fill-current',\n iconWrap: [\n 'shr-pointer-events-none shr-absolute shr-left-1/2 shr-top-1/2 shr-inline-block shr-h-[theme(fontSize.2xs)] shr-w-[theme(fontSize.2xs)] -shr-translate-x-1/2 -shr-translate-y-1/2 shr-text-2xs',\n 'shr-text-transparent peer-checked:shr-text-white peer-indeterminate:shr-text-white',\n 'peer-disabled:peer-checked:shr-text-white-darken peer-disabled:peer-indeterminate:shr-text-white-darken',\n 'forced-colors:shr-hidden',\n ],\n innerWrapper:\n 'shr-relative shr-box-border shr-inline-block shr-h-[theme(fontSize.base)] shr-w-[theme(fontSize.base)] shr-shrink-0 shr-translate-y-[0.125em] shr-leading-none',\n label: [\n 'smarthr-ui-Checkbox-label shr-ms-0.5 shr-cursor-pointer shr-text-base shr-leading-tight',\n '[[data-disabled=true]>&]:shr-pointer-events-none [[data-disabled=true]>&]:shr-cursor-not-allowed [[data-disabled=true]>&]:shr-text-disabled',\n ],\n },\n})\n\nexport const Checkbox: FC<Props> = ({ mixed, className, children, disabled, id, ...rest }) => {\n const classNames = useMemo(() => {\n const { wrapper, innerWrapper, box, input, iconWrap, icon, label } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n innerWrapper: innerWrapper(),\n box: box(),\n input: input(),\n iconWrap: iconWrap(),\n icon: icon(),\n label: label(),\n }\n }, [className])\n\n const defaultId = useId()\n const checkBoxId = id || defaultId\n\n return (\n <span className={classNames.wrapper} data-disabled={disabled}>\n <span className={classNames.innerWrapper}>\n <ActualCheckbox\n {...rest}\n id={checkBoxId}\n disabled={disabled}\n mixed={mixed}\n className={classNames.input}\n />\n <AriaHiddenBox className={classNames.box} />\n <CheckIconArea mixed={mixed} classNames={classNames} />\n </span>\n {children && (\n <label htmlFor={checkBoxId} className={classNames.label}>\n {children}\n </label>\n )}\n </span>\n )\n}\n\nconst AriaHiddenBox = memo<{ className: string }>(({ className }) => (\n <span className={className} aria-hidden=\"true\" />\n))\n\nconst CheckIconArea = memo<\n Pick<Props, 'mixed'> & { classNames: { iconWrap: string; icon: string } }\n>(({ mixed, classNames }) => {\n const Icon = mixed ? FaMinusIcon : FaCheckIcon\n\n return (\n <span className={classNames.iconWrap}>\n <Icon className={classNames.icon} />\n </span>\n )\n})\n"],"names":["tv","_jsxs","_jsx"],"mappings":";;;;;;;;;AAmBA,MAAM,kBAAkB,GAAGA,EAAE,CAAC;AAC5B,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE,wDAAwD;AACjE,QAAA,GAAG,EAAE;YACH,2HAA2H;YAC3H,wCAAwC;;YAExC,0BAA0B;YAC1B,2GAA2G;YAC3G,6HAA6H;YAC7H,qEAAqE;YACrE,wFAAwF;YACxF,oGAAoG;YACpG,+CAA+C;YAC/C,mCAAmC;YACnC,oBAAoB;YACpB,yCAAyC;AAC1C,SAAA;AACD,QAAA,KAAK,EAAE;YACL,yKAAyK;;YAEzK,wDAAwD;AACzD,SAAA;AACD,QAAA,IAAI,EAAE,kBAAkB;AACxB,QAAA,QAAQ,EAAE;YACR,+LAA+L;YAC/L,oFAAoF;YACpF,yGAAyG;YACzG,0BAA0B;AAC3B,SAAA;AACD,QAAA,YAAY,EACV,gKAAgK;AAClK,QAAA,KAAK,EAAE;YACL,yFAAyF;YACzF,6IAA6I;AAC9I,SAAA;AACF,KAAA;AACF,CAAA,CAAC;MAEW,QAAQ,GAAc,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,IAAI,EAAE,KAAI;AAC3F,IAAA,MAAM,UAAU,GAAG,OAAO,CAAC,MAAK;AAC9B,QAAA,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,kBAAkB,EAAE;QAEzF,OAAO;AACL,YAAA,OAAO,EAAE,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;YAC/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B,MAAM,IAAI,GAAG,KAAK,GAAG,WAAW,GAAG,WAAW;AAE9C,IAAA,QACEA,GAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAE,UAAU,CAAC,QAAQ,EAAA,QAAA,EAClCA,GAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAE,UAAU,CAAC,IAAI,EAAA,CAAI,EAAA,CAC/B;AAEX,CAAC,CAAC;;"}
@@ -8,19 +8,23 @@ const callbackRef = (node) => {
8
8
  if (!node) {
9
9
  return;
10
10
  }
11
- // checkedはcontrolled propとしてinput.checkedプロパティにのみ反映され、
12
- // HTML属性としては反映されないため、data-checked属性で代替判定する
11
+ // mixedはchecked===trueの場合の見た目を変えるフラグのため、
12
+ // 実DOMのcheckedプロパティとdata-mixed属性の両方を見て判定する
13
13
  const action = () => {
14
- node.indeterminate =
15
- node.getAttribute('data-checked') === 'true' && node.getAttribute('data-mixed') === 'true';
14
+ node.indeterminate = node.checked && node.getAttribute('data-mixed') === 'true';
16
15
  };
17
16
  action();
17
+ // ユーザー操作でcheckedが変わった場合も再評価する
18
+ node.addEventListener('change', action);
19
+ // data-checkedはchecked(controlled prop)が変化したことをMutationObserverに伝えるトリガーとしてのみ使う
20
+ // (判定自体はnode.checkedを見るため、data-checkedの値そのものは判定に使わない)
18
21
  const observer = new MutationObserver(action);
19
22
  observer.observe(node, {
20
23
  attributes: true,
21
24
  attributeFilter: ['data-checked', 'data-mixed'],
22
25
  });
23
26
  return () => {
27
+ node.removeEventListener('change', action);
24
28
  observer.disconnect();
25
29
  };
26
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ActualCheckbox.cjs","sources":["../../../../src/components/Checkbox/client/ActualCheckbox.tsx"],"sourcesContent":["'use client'\n\nimport { useMergeRefs } from '../../../hooks/client/useMergeRefs'\n\nimport type { SHRComponentPropsWithRef } from '../../../types'\nimport type { FC } from 'react'\n\ntype Props = SHRComponentPropsWithRef<\n 'input',\n {\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n },\n { omit: 'children' }\n>\n\nconst callbackRef = (node: HTMLInputElement | null) => {\n if (!node) {\n return\n }\n\n // checkedはcontrolled propとしてinput.checkedプロパティにのみ反映され、\n // HTML属性としては反映されないため、data-checked属性で代替判定する\n const action = () => {\n node.indeterminate =\n node.getAttribute('data-checked') === 'true' && node.getAttribute('data-mixed') === 'true'\n }\n\n action()\n\n const observer = new MutationObserver(action)\n\n observer.observe(node, {\n attributes: true,\n attributeFilter: ['data-checked', 'data-mixed'],\n })\n\n return () => {\n observer.disconnect()\n }\n}\n\nexport const ActualCheckbox: FC<Props> = ({ ref, checked, mixed, error, ...rest }) => {\n const mergedRef = useMergeRefs(callbackRef, ref)\n const errorAttr = error || undefined\n\n return (\n <input\n {...rest}\n ref={mergedRef}\n type=\"checkbox\"\n checked={checked}\n aria-invalid={errorAttr}\n data-smarthr-ui-input-error={errorAttr}\n data-smarthr-ui-input=\"true\"\n // checkedはDOM属性ではなくプロパティとしてのみ反映されるため、data-checkedをMutationObserverで監視\n data-checked={checked || undefined}\n data-mixed={mixed || undefined}\n />\n )\n}\n"],"names":[],"mappings":";;;;;;AAkBA;;;;;;;AAQI;AACE;AACJ;AAEA;AAEA;AAEA;AACE;AACA;AACD;AAED;;AAEA;AACF;AAEO;;AAEL;AAEA;AAcF;;"}
1
+ {"version":3,"file":"ActualCheckbox.cjs","sources":["../../../../src/components/Checkbox/client/ActualCheckbox.tsx"],"sourcesContent":["'use client'\n\nimport { useMergeRefs } from '../../../hooks/client/useMergeRefs'\n\nimport type { ExtendElementPropsWithRef } from '../../../types'\nimport type { FC } from 'react'\n\ntype Props = ExtendElementPropsWithRef<\n 'input',\n {\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n },\n { omit: 'children' }\n>\n\nconst callbackRef = (node: HTMLInputElement | null) => {\n if (!node) {\n return\n }\n\n // mixedはchecked===trueの場合の見た目を変えるフラグのため、\n // 実DOMのcheckedプロパティとdata-mixed属性の両方を見て判定する\n const action = () => {\n node.indeterminate = node.checked && node.getAttribute('data-mixed') === 'true'\n }\n\n action()\n\n // ユーザー操作でcheckedが変わった場合も再評価する\n node.addEventListener('change', action)\n\n // data-checkedはchecked(controlled prop)が変化したことをMutationObserverに伝えるトリガーとしてのみ使う\n // (判定自体はnode.checkedを見るため、data-checkedの値そのものは判定に使わない)\n const observer = new MutationObserver(action)\n\n observer.observe(node, {\n attributes: true,\n attributeFilter: ['data-checked', 'data-mixed'],\n })\n\n return () => {\n node.removeEventListener('change', action)\n observer.disconnect()\n }\n}\n\nexport const ActualCheckbox: FC<Props> = ({ ref, checked, mixed, error, ...rest }) => {\n const mergedRef = useMergeRefs(callbackRef, ref)\n const errorAttr = error || undefined\n\n return (\n <input\n {...rest}\n ref={mergedRef}\n type=\"checkbox\"\n checked={checked}\n aria-invalid={errorAttr}\n data-smarthr-ui-input-error={errorAttr}\n data-smarthr-ui-input=\"true\"\n data-checked={checked || undefined}\n data-mixed={mixed || undefined}\n />\n )\n}\n"],"names":[],"mappings":";;;;;;AAkBA;;;;;;;AAQI;AACF;AAEA;;AAGA;;;AAIA;AAEA;AACE;AACA;AACD;AAED;AACE;;AAEF;AACF;AAEO;;AAEL;AAEA;AAaF;;"}
@@ -1,6 +1,6 @@
1
- import type { SHRComponentPropsWithRef } from '../../../types';
1
+ import type { ExtendElementPropsWithRef } from '../../../types';
2
2
  import type { FC } from 'react';
3
- type Props = SHRComponentPropsWithRef<'input', {
3
+ type Props = ExtendElementPropsWithRef<'input', {
4
4
  /** `true` のとき、チェック状態を `mixed` にする */
5
5
  mixed?: boolean;
6
6
  /** チェックボックスにエラーがあるかどうか */
@@ -6,19 +6,23 @@ const callbackRef = (node) => {
6
6
  if (!node) {
7
7
  return;
8
8
  }
9
- // checkedはcontrolled propとしてinput.checkedプロパティにのみ反映され、
10
- // HTML属性としては反映されないため、data-checked属性で代替判定する
9
+ // mixedはchecked===trueの場合の見た目を変えるフラグのため、
10
+ // 実DOMのcheckedプロパティとdata-mixed属性の両方を見て判定する
11
11
  const action = () => {
12
- node.indeterminate =
13
- node.getAttribute('data-checked') === 'true' && node.getAttribute('data-mixed') === 'true';
12
+ node.indeterminate = node.checked && node.getAttribute('data-mixed') === 'true';
14
13
  };
15
14
  action();
15
+ // ユーザー操作でcheckedが変わった場合も再評価する
16
+ node.addEventListener('change', action);
17
+ // data-checkedはchecked(controlled prop)が変化したことをMutationObserverに伝えるトリガーとしてのみ使う
18
+ // (判定自体はnode.checkedを見るため、data-checkedの値そのものは判定に使わない)
16
19
  const observer = new MutationObserver(action);
17
20
  observer.observe(node, {
18
21
  attributes: true,
19
22
  attributeFilter: ['data-checked', 'data-mixed'],
20
23
  });
21
24
  return () => {
25
+ node.removeEventListener('change', action);
22
26
  observer.disconnect();
23
27
  };
24
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ActualCheckbox.js","sources":["../../../../src/components/Checkbox/client/ActualCheckbox.tsx"],"sourcesContent":["'use client'\n\nimport { useMergeRefs } from '../../../hooks/client/useMergeRefs'\n\nimport type { SHRComponentPropsWithRef } from '../../../types'\nimport type { FC } from 'react'\n\ntype Props = SHRComponentPropsWithRef<\n 'input',\n {\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n },\n { omit: 'children' }\n>\n\nconst callbackRef = (node: HTMLInputElement | null) => {\n if (!node) {\n return\n }\n\n // checkedはcontrolled propとしてinput.checkedプロパティにのみ反映され、\n // HTML属性としては反映されないため、data-checked属性で代替判定する\n const action = () => {\n node.indeterminate =\n node.getAttribute('data-checked') === 'true' && node.getAttribute('data-mixed') === 'true'\n }\n\n action()\n\n const observer = new MutationObserver(action)\n\n observer.observe(node, {\n attributes: true,\n attributeFilter: ['data-checked', 'data-mixed'],\n })\n\n return () => {\n observer.disconnect()\n }\n}\n\nexport const ActualCheckbox: FC<Props> = ({ ref, checked, mixed, error, ...rest }) => {\n const mergedRef = useMergeRefs(callbackRef, ref)\n const errorAttr = error || undefined\n\n return (\n <input\n {...rest}\n ref={mergedRef}\n type=\"checkbox\"\n checked={checked}\n aria-invalid={errorAttr}\n data-smarthr-ui-input-error={errorAttr}\n data-smarthr-ui-input=\"true\"\n // checkedはDOM属性ではなくプロパティとしてのみ反映されるため、data-checkedをMutationObserverで監視\n data-checked={checked || undefined}\n data-mixed={mixed || undefined}\n />\n )\n}\n"],"names":[],"mappings":";;;;AAkBA;;;;;;;AAQI;AACE;AACJ;AAEA;AAEA;AAEA;AACE;AACA;AACD;AAED;;AAEA;AACF;AAEO;;AAEL;AAEA;AAcF;;"}
1
+ {"version":3,"file":"ActualCheckbox.js","sources":["../../../../src/components/Checkbox/client/ActualCheckbox.tsx"],"sourcesContent":["'use client'\n\nimport { useMergeRefs } from '../../../hooks/client/useMergeRefs'\n\nimport type { ExtendElementPropsWithRef } from '../../../types'\nimport type { FC } from 'react'\n\ntype Props = ExtendElementPropsWithRef<\n 'input',\n {\n /** `true` のとき、チェック状態を `mixed` にする */\n mixed?: boolean\n /** チェックボックスにエラーがあるかどうか */\n error?: boolean\n },\n { omit: 'children' }\n>\n\nconst callbackRef = (node: HTMLInputElement | null) => {\n if (!node) {\n return\n }\n\n // mixedはchecked===trueの場合の見た目を変えるフラグのため、\n // 実DOMのcheckedプロパティとdata-mixed属性の両方を見て判定する\n const action = () => {\n node.indeterminate = node.checked && node.getAttribute('data-mixed') === 'true'\n }\n\n action()\n\n // ユーザー操作でcheckedが変わった場合も再評価する\n node.addEventListener('change', action)\n\n // data-checkedはchecked(controlled prop)が変化したことをMutationObserverに伝えるトリガーとしてのみ使う\n // (判定自体はnode.checkedを見るため、data-checkedの値そのものは判定に使わない)\n const observer = new MutationObserver(action)\n\n observer.observe(node, {\n attributes: true,\n attributeFilter: ['data-checked', 'data-mixed'],\n })\n\n return () => {\n node.removeEventListener('change', action)\n observer.disconnect()\n }\n}\n\nexport const ActualCheckbox: FC<Props> = ({ ref, checked, mixed, error, ...rest }) => {\n const mergedRef = useMergeRefs(callbackRef, ref)\n const errorAttr = error || undefined\n\n return (\n <input\n {...rest}\n ref={mergedRef}\n type=\"checkbox\"\n checked={checked}\n aria-invalid={errorAttr}\n data-smarthr-ui-input-error={errorAttr}\n data-smarthr-ui-input=\"true\"\n data-checked={checked || undefined}\n data-mixed={mixed || undefined}\n />\n )\n}\n"],"names":[],"mappings":";;;;AAkBA;;;;;;;AAQI;AACF;AAEA;;AAGA;;;AAIA;AAEA;AACE;AACA;AACD;AAED;AACE;;AAEF;AACF;AAEO;;AAEL;AAEA;AAaF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.cjs","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import { type FC, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport type { SHRComponentPropsWithoutRef } from '../../types'\n\ntype Props = SHRComponentPropsWithoutRef<\n 'span',\n {\n disabled?: boolean\n color?: 'grey' | 'blue' | 'green' | 'orange' | 'red'\n size?: 'S'\n }\n>\n\nconst classNameGenerator = tv({\n base: [\n 'smarthr-ui-Chip',\n 'shr-border-shorthand shr-rounded-full shr-bg-white shr-leading-none shr-text-black',\n 'contrast-more:shr-border-high-contrast',\n 'data-[disabled]:shr-bg-white/50 data-[disabled]:shr-text-disabled',\n ],\n variants: {\n color: {\n grey: 'shr-border-grey-20',\n blue: 'shr-border-main',\n green: 'shr-border-green',\n orange: 'shr-border-orange',\n red: 'shr-border-danger',\n } satisfies Record<NonNullable<Props['color']>, string>,\n size: {\n S: 'shr-px-0.5 shr-py-0.25 shr-text-sm',\n } satisfies Record<NonNullable<Props['size']>, string>,\n },\n})\n\nexport const Chip: FC<Props> = ({ size, color, disabled, className, ...rest }) => {\n const actualClassName = useMemo(\n () => classNameGenerator({ size: size || 'S', color: color || 'grey', className }),\n [size, color, className],\n )\n\n return <span {...rest} className={actualClassName} data-disabled={disabled || undefined} />\n}\n"],"names":["tv","useMemo","_jsx"],"mappings":";;;;;;AAcA,MAAM,kBAAkB,GAAGA,QAAE,CAAC;AAC5B,IAAA,IAAI,EAAE;QACJ,iBAAiB;QACjB,oFAAoF;QACpF,wCAAwC;QACxC,mEAAmE;AACpE,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,IAAI,EAAE,iBAAiB;AACvB,YAAA,KAAK,EAAE,kBAAkB;AACzB,YAAA,MAAM,EAAE,mBAAmB;AAC3B,YAAA,GAAG,EAAE,mBAAmB;AAC6B,SAAA;AACvD,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAE,oCAAoC;AACa,SAAA;AACvD,KAAA;AACF,CAAA,CAAC;AAEK,MAAM,IAAI,GAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,KAAI;AAC/E,IAAA,MAAM,eAAe,GAAGC,aAAO,CAC7B,MAAM,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,GAAG,EAAE,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,EAClF,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CACzB;IAED,OAAOC,cAAA,CAAA,MAAA,EAAA,EAAA,GAAU,IAAI,EAAE,SAAS,EAAE,eAAe,EAAA,eAAA,EAAiB,QAAQ,IAAI,SAAS,EAAA,CAAI;AAC7F;;"}
1
+ {"version":3,"file":"Chip.cjs","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import { type FC, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport type { ExtendElementPropsWithoutRef } from '../../types'\n\ntype Props = ExtendElementPropsWithoutRef<\n 'span',\n {\n disabled?: boolean\n color?: 'grey' | 'blue' | 'green' | 'orange' | 'red'\n size?: 'S'\n }\n>\n\nconst classNameGenerator = tv({\n base: [\n 'smarthr-ui-Chip',\n 'shr-border-shorthand shr-rounded-full shr-bg-white shr-leading-none shr-text-black',\n 'contrast-more:shr-border-high-contrast',\n 'data-[disabled]:shr-bg-white/50 data-[disabled]:shr-text-disabled',\n ],\n variants: {\n color: {\n grey: 'shr-border-grey-20',\n blue: 'shr-border-main',\n green: 'shr-border-green',\n orange: 'shr-border-orange',\n red: 'shr-border-danger',\n } satisfies Record<NonNullable<Props['color']>, string>,\n size: {\n S: 'shr-px-0.5 shr-py-0.25 shr-text-sm',\n } satisfies Record<NonNullable<Props['size']>, string>,\n },\n})\n\nexport const Chip: FC<Props> = ({ size, color, disabled, className, ...rest }) => {\n const actualClassName = useMemo(\n () => classNameGenerator({ size: size || 'S', color: color || 'grey', className }),\n [size, color, className],\n )\n\n return <span {...rest} className={actualClassName} data-disabled={disabled || undefined} />\n}\n"],"names":["tv","useMemo","_jsx"],"mappings":";;;;;;AAcA,MAAM,kBAAkB,GAAGA,QAAE,CAAC;AAC5B,IAAA,IAAI,EAAE;QACJ,iBAAiB;QACjB,oFAAoF;QACpF,wCAAwC;QACxC,mEAAmE;AACpE,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,IAAI,EAAE,iBAAiB;AACvB,YAAA,KAAK,EAAE,kBAAkB;AACzB,YAAA,MAAM,EAAE,mBAAmB;AAC3B,YAAA,GAAG,EAAE,mBAAmB;AAC6B,SAAA;AACvD,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAE,oCAAoC;AACa,SAAA;AACvD,KAAA;AACF,CAAA,CAAC;AAEK,MAAM,IAAI,GAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,KAAI;AAC/E,IAAA,MAAM,eAAe,GAAGC,aAAO,CAC7B,MAAM,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,GAAG,EAAE,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,EAClF,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CACzB;IAED,OAAOC,cAAA,CAAA,MAAA,EAAA,EAAA,GAAU,IAAI,EAAE,SAAS,EAAE,eAAe,EAAA,eAAA,EAAiB,QAAQ,IAAI,SAAS,EAAA,CAAI;AAC7F;;"}
@@ -1,6 +1,6 @@
1
1
  import { type FC } from 'react';
2
- import type { SHRComponentPropsWithoutRef } from '../../types';
3
- type Props = SHRComponentPropsWithoutRef<'span', {
2
+ import type { ExtendElementPropsWithoutRef } from '../../types';
3
+ type Props = ExtendElementPropsWithoutRef<'span', {
4
4
  disabled?: boolean;
5
5
  color?: 'grey' | 'blue' | 'green' | 'orange' | 'red';
6
6
  size?: 'S';
@@ -1 +1 @@
1
- {"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import { type FC, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport type { SHRComponentPropsWithoutRef } from '../../types'\n\ntype Props = SHRComponentPropsWithoutRef<\n 'span',\n {\n disabled?: boolean\n color?: 'grey' | 'blue' | 'green' | 'orange' | 'red'\n size?: 'S'\n }\n>\n\nconst classNameGenerator = tv({\n base: [\n 'smarthr-ui-Chip',\n 'shr-border-shorthand shr-rounded-full shr-bg-white shr-leading-none shr-text-black',\n 'contrast-more:shr-border-high-contrast',\n 'data-[disabled]:shr-bg-white/50 data-[disabled]:shr-text-disabled',\n ],\n variants: {\n color: {\n grey: 'shr-border-grey-20',\n blue: 'shr-border-main',\n green: 'shr-border-green',\n orange: 'shr-border-orange',\n red: 'shr-border-danger',\n } satisfies Record<NonNullable<Props['color']>, string>,\n size: {\n S: 'shr-px-0.5 shr-py-0.25 shr-text-sm',\n } satisfies Record<NonNullable<Props['size']>, string>,\n },\n})\n\nexport const Chip: FC<Props> = ({ size, color, disabled, className, ...rest }) => {\n const actualClassName = useMemo(\n () => classNameGenerator({ size: size || 'S', color: color || 'grey', className }),\n [size, color, className],\n )\n\n return <span {...rest} className={actualClassName} data-disabled={disabled || undefined} />\n}\n"],"names":["tv","_jsx"],"mappings":";;;;AAcA,MAAM,kBAAkB,GAAGA,EAAE,CAAC;AAC5B,IAAA,IAAI,EAAE;QACJ,iBAAiB;QACjB,oFAAoF;QACpF,wCAAwC;QACxC,mEAAmE;AACpE,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,IAAI,EAAE,iBAAiB;AACvB,YAAA,KAAK,EAAE,kBAAkB;AACzB,YAAA,MAAM,EAAE,mBAAmB;AAC3B,YAAA,GAAG,EAAE,mBAAmB;AAC6B,SAAA;AACvD,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAE,oCAAoC;AACa,SAAA;AACvD,KAAA;AACF,CAAA,CAAC;AAEK,MAAM,IAAI,GAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,KAAI;AAC/E,IAAA,MAAM,eAAe,GAAG,OAAO,CAC7B,MAAM,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,GAAG,EAAE,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,EAClF,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CACzB;IAED,OAAOC,GAAA,CAAA,MAAA,EAAA,EAAA,GAAU,IAAI,EAAE,SAAS,EAAE,eAAe,EAAA,eAAA,EAAiB,QAAQ,IAAI,SAAS,EAAA,CAAI;AAC7F;;"}
1
+ {"version":3,"file":"Chip.js","sources":["../../../src/components/Chip/Chip.tsx"],"sourcesContent":["import { type FC, useMemo } from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport type { ExtendElementPropsWithoutRef } from '../../types'\n\ntype Props = ExtendElementPropsWithoutRef<\n 'span',\n {\n disabled?: boolean\n color?: 'grey' | 'blue' | 'green' | 'orange' | 'red'\n size?: 'S'\n }\n>\n\nconst classNameGenerator = tv({\n base: [\n 'smarthr-ui-Chip',\n 'shr-border-shorthand shr-rounded-full shr-bg-white shr-leading-none shr-text-black',\n 'contrast-more:shr-border-high-contrast',\n 'data-[disabled]:shr-bg-white/50 data-[disabled]:shr-text-disabled',\n ],\n variants: {\n color: {\n grey: 'shr-border-grey-20',\n blue: 'shr-border-main',\n green: 'shr-border-green',\n orange: 'shr-border-orange',\n red: 'shr-border-danger',\n } satisfies Record<NonNullable<Props['color']>, string>,\n size: {\n S: 'shr-px-0.5 shr-py-0.25 shr-text-sm',\n } satisfies Record<NonNullable<Props['size']>, string>,\n },\n})\n\nexport const Chip: FC<Props> = ({ size, color, disabled, className, ...rest }) => {\n const actualClassName = useMemo(\n () => classNameGenerator({ size: size || 'S', color: color || 'grey', className }),\n [size, color, className],\n )\n\n return <span {...rest} className={actualClassName} data-disabled={disabled || undefined} />\n}\n"],"names":["tv","_jsx"],"mappings":";;;;AAcA,MAAM,kBAAkB,GAAGA,EAAE,CAAC;AAC5B,IAAA,IAAI,EAAE;QACJ,iBAAiB;QACjB,oFAAoF;QACpF,wCAAwC;QACxC,mEAAmE;AACpE,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,KAAK,EAAE;AACL,YAAA,IAAI,EAAE,oBAAoB;AAC1B,YAAA,IAAI,EAAE,iBAAiB;AACvB,YAAA,KAAK,EAAE,kBAAkB;AACzB,YAAA,MAAM,EAAE,mBAAmB;AAC3B,YAAA,GAAG,EAAE,mBAAmB;AAC6B,SAAA;AACvD,QAAA,IAAI,EAAE;AACJ,YAAA,CAAC,EAAE,oCAAoC;AACa,SAAA;AACvD,KAAA;AACF,CAAA,CAAC;AAEK,MAAM,IAAI,GAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,KAAI;AAC/E,IAAA,MAAM,eAAe,GAAG,OAAO,CAC7B,MAAM,kBAAkB,CAAC,EAAE,IAAI,EAAE,IAAI,IAAI,GAAG,EAAE,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,SAAS,EAAE,CAAC,EAClF,CAAC,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,CACzB;IAED,OAAOC,GAAA,CAAA,MAAA,EAAA,EAAA,GAAU,IAAI,EAAE,SAAS,EAAE,eAAe,EAAA,eAAA,EAAiB,QAAQ,IAAI,SAAS,EAAA,CAAI;AAC7F;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"MultiCombobox.cjs","sources":["../../../../../src/components/Combobox/client/MultiCombobox/MultiCombobox.tsx"],"sourcesContent":["'use client'\n\nimport {\n type ChangeEvent,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n memo,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { useAnimationFrame } from '../../../../hooks/client/useAnimationFrame'\nimport { useAreaClickCallbackRef } from '../../../../hooks/client/useAreaClickCallbackRef'\nimport { useLayoutEffectRef } from '../../../../hooks/client/useLayoutEffectRef'\nimport { useMergeRefs } from '../../../../hooks/client/useMergeRefs'\nimport { useTheme } from '../../../../hooks/client/useTheme'\nimport { useLatest } from '../../../../hooks/useLatest'\nimport { useLocalize } from '../../../../intl'\nimport { findDelegateTarget } from '../../../../libs/delegate'\nimport { FaCaretDownIcon } from '../../../Icon'\nimport { Scroller } from '../../../Scroller'\nimport { areItemsEqual, getSelectedLabelText } from '../helper'\nimport { ListBox, useListbox } from '../useListbox'\nimport { useMultiOptions } from '../useOptions'\n\nimport { DELETE_BUTTON_SELECTOR, MultiSelectedItem } from './MultiSelectedItem'\n\nimport type { SHRComponentPropsWithRef } from '../../../../types'\nimport type { BaseProps, ComboboxItem } from '../types'\n\ntype Props<T> = SHRComponentPropsWithRef<\n 'input',\n BaseProps<T> & {\n /**\n * 選択されているアイテムのリスト\n */\n selectedItems: Array<ComboboxItem<T> & { deletable?: boolean }>\n /**\n * 選択されているアイテムのラベルを省略表示するかどうか\n */\n selectedItemEllipsis?: boolean\n /**\n * テキストボックスの `value` 属性の値。\n * `onChangeInput` と併せて設定することで、テキストボックスの挙動が制御可能になる。\n */\n inputValue?: string\n /**\n * 選択されているアイテムの削除ボタンがクリックされた時に発火するコールバック関数\n */\n onDelete?: (item: ComboboxItem<T>) => void\n /**\n * 選択されているアイテムのリストが変わった時に発火するコールバック関数\n */\n onChangeSelected?: (selectedItems: Array<ComboboxItem<T>>) => void\n /**\n * コンポーネントがフォーカスされたときに発火するコールバック関数\n */\n onFocus?: () => void\n /**\n * コンポーネントからフォーカスが外れた時に発火するコールバック関数\n */\n onBlur?: () => void\n /**\n * アイテムが選択されたときに選択済みかどうかを判定するコールバック関数/\n */\n isItemSelected?: (targetItem: ComboboxItem<T>, selectedItems: Array<ComboboxItem<T>>) => boolean\n /**\n * 検索結果が0件の時に表示するコンテンツ\n */\n noResultText?: ReactNode\n },\n { omit: 'children' }\n>\n\nconst NOOP = () => undefined\n\nconst preventDefaultWithPressEnter = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n e.preventDefault()\n }\n}\n\nconst ESCAPE_KEY_REGEX = /^Esc(ape)?$/\nconst ARROW_LEFT_KEY_REGEX = /^(Arrow)?Left$/\nconst ARROW_RIGHT_KEY_REGEX = /^(Arrow)?Right/\nconst ARROW_UP_AND_DOWN_KEY_REGEX = /^(Arrow)?(Up|Down)$/\n\nconst EMPTY_INPUT_CHANGE_EVENT = {\n currentTarget: { value: '' },\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>\n\nconst DELETE_BUTTON_CLASSNAME = `.${DELETE_BUTTON_SELECTOR}`\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: [\n 'smarthr-ui-MultiCombobox',\n 'shr-box-border shr-inline-flex shr-min-w-[15em] shr-rounded-m shr-border shr-border-solid shr-px-0.5 shr-py-0.25 shr-align-bottom',\n 'contrast-more:shr-border-high-contrast',\n 'has-[[role=combobox][aria-expanded=true]]:shr-focus-indicator',\n 'shr-cursor-text shr-border-default shr-bg-white',\n 'has-[[role=combobox]:disabled]:shr-cursor-not-allowed',\n 'has-[[role=combobox]:disabled]:shr-border-default/50',\n 'has-[[role=combobox]:disabled]:shr-bg-white-darken',\n 'has-[[role=combobox]:disabled]:shr-text-disabled',\n // HINT: disabled と詳細度が同じ [0,2,0] のため、CSS ソース順でこちらを後に置くことで error 時の border 色を優先させる\n 'has-[[role=combobox][aria-invalid]]:shr-border-danger',\n ],\n inputArea: 'shr-flex shr-flex-1 shr-flex-wrap shr-gap-0.5',\n selectedList:\n 'smarthr-ui-MultiCombobox-selectedList shr-contents shr-list-none [&_li]:shr-min-w-0',\n inputWrapper: [\n 'shr-flex shr-flex-1 shr-items-center',\n 'has-[[role=combobox][aria-expanded=false]]:shr-pointer-events-none',\n 'has-[[role=combobox][aria-expanded=false]]:shr-absolute',\n 'has-[[role=combobox][aria-expanded=false]]:shr-opacity-0',\n ],\n input: [\n 'smarthr-ui-MultiCombobox-input',\n 'shr-w-full shr-min-w-[5em] shr-border-none shr-text-base shr-text-black shr-outline-none shr-outline-0',\n 'disabled:shr-hidden',\n ],\n placeholderEl: 'smarthr-ui-MultiCombobox-placeholder shr-my-0 shr-self-center',\n suffixWrapper: [\n 'shr-relative -shr-me-0.5 shr-ms-0.5 shr-p-0.5',\n 'before:shr-absolute before:shr-inset-x-0 before:shr-inset-y-0.25 before:shr-w-0 before:shr-border-0 before:shr-border-l before:shr-border-solid before:shr-border-default before:shr-content-[\"\"]',\n ],\n suffixIcon: 'shr-block',\n },\n})\n\nexport const MultiCombobox = <T,>({\n items,\n selectedItems,\n name,\n disabled = false,\n required = false,\n error = false,\n creatable = false,\n placeholder = '',\n autoComplete,\n dropdownHelpMessage,\n isLoading,\n selectedItemEllipsis,\n width,\n dropdownWidth = 'auto',\n inputValue: controlledInputValue,\n className,\n onChange,\n onChangeInput,\n onAdd,\n onDelete,\n onSelect,\n onChangeSelected,\n onFocus,\n onBlur,\n onKeyPress,\n isItemSelected,\n noResultText,\n style,\n ref,\n ...rest\n}: Props<T>) => {\n const triggerRef = useRef<HTMLDivElement>(null)\n const [isExpanded, setIsExpanded] = useState(false)\n const [highlighted, setHighlighted] = useState(false)\n const [uncontrolledInputValue, setUncontrolledInputValue] = useState('')\n const [isComposing, setIsComposing] = useState(false)\n\n const selectedListId = useId()\n\n const isInputControlled = controlledInputValue !== undefined\n const inputValue = isInputControlled ? controlledInputValue : uncontrolledInputValue\n const setInputValueIfUncontrolled = isInputControlled ? NOOP : setUncontrolledInputValue\n const isInputEmpty = !inputValue\n\n const { options } = useMultiOptions({\n items,\n selected: selectedItems,\n creatable,\n inputValue,\n isItemSelected,\n })\n const deleteFrame = useAnimationFrame()\n const selectFrame = useAnimationFrame()\n\n // eslint-disable-next-line local-rules/best-practice-for-use-latest\n const latestForListBox = useLatest({\n onDelete,\n onChangeSelected,\n onSelect,\n onChangeInput,\n selectedItems,\n deleteFrame,\n selectFrame,\n })\n\n const listBoxFunctions = useMemo(() => {\n const handleDelete = (item: ComboboxItem<T>) => {\n const handlers: Array<(deletingItem: ComboboxItem<T>) => void> = []\n\n if (latestForListBox.onDelete) {\n handlers.push((deletingItem: ComboboxItem<T>) => latestForListBox.onDelete!(deletingItem))\n }\n if (latestForListBox.onChangeSelected) {\n handlers.push((deletingItem: ComboboxItem<T>) =>\n latestForListBox.onChangeSelected!(\n latestForListBox.selectedItems.filter(\n (selected) => !areItemsEqual(selected, deletingItem),\n ),\n ),\n )\n }\n\n if (handlers.length > 0) {\n // HINT: Dropdown系コンポーネント内でComboboxを使うと、選択肢がportalで表現されている関係上Dropdownが閉じてしまう\n // 処理を遅延させることで正常に閉じる/閉じないの判定を行えるようにする\n latestForListBox.deleteFrame.request(() => {\n handlers.forEach((h) => h(item))\n })\n }\n }\n\n return {\n cleanupFrame: () => {\n latestForListBox.deleteFrame.cancel()\n latestForListBox.selectFrame.cancel()\n },\n handleDelete,\n handleSelect: (selected: ComboboxItem<T>) => {\n // HINT: Dropdown系コンポーネント内でComboboxを使うと、選択肢がportalで表現されている関係上Dropdownが閉じてしまう\n // 処理を遅延させることで正常に閉じる/閉じないの判定を行えるようにする\n latestForListBox.selectFrame.request(() => {\n const matchedSelectedItem = latestForListBox.selectedItems.find((item) =>\n areItemsEqual(item, selected),\n )\n\n if (matchedSelectedItem === undefined) {\n latestForListBox.onSelect?.(selected)\n latestForListBox.onChangeSelected?.(latestForListBox.selectedItems.concat(selected))\n\n // 制御コンポーネントの場合に親側でinputValueを更新できるように、選択時にonChangeInputを空文字で発火する\n latestForListBox.onChangeInput?.(EMPTY_INPUT_CHANGE_EVENT)\n } else if (matchedSelectedItem.deletable !== false) {\n handleDelete(selected)\n }\n })\n },\n }\n }, [latestForListBox])\n\n const { listBoxProps, activeOption, cleanupAddFrame, handleKeyDownListBox, listBoxId } =\n useListbox({\n options,\n dropdownHelpMessage,\n dropdownWidth,\n onAdd,\n onSelect: listBoxFunctions.handleSelect,\n isExpanded,\n isLoading,\n triggerRef,\n noResultText,\n })\n\n const focusFrame = useAnimationFrame()\n\n const latest = useLatest({\n onChange,\n onChangeInput,\n onFocus,\n onBlur,\n onKeyPress,\n disabled,\n isExpanded,\n highlighted,\n isComposing,\n isInputEmpty,\n selectedItems,\n setInputValueIfUncontrolled,\n handleKeyDownListBox,\n cleanupAddFrame,\n focusFrame,\n })\n\n const functions = useMemo(() => {\n let input: HTMLInputElement | null = null\n\n const handleDelete = listBoxFunctions.handleDelete\n\n const getDeletionButtons = () => {\n if (triggerRef.current) {\n const buttons =\n triggerRef.current.querySelectorAll<HTMLButtonElement>(DELETE_BUTTON_CLASSNAME)\n\n if (buttons.length > 0) {\n const actualButtons = Array.from(buttons)\n\n return {\n buttons: actualButtons,\n currentIndex: actualButtons.indexOf(document.activeElement as HTMLButtonElement),\n }\n }\n }\n\n return null\n }\n\n const focusPrevDeletionButton = () => {\n const result = getDeletionButtons()\n\n if (!result) return\n\n const { buttons, currentIndex } = result\n\n if (currentIndex !== -1) {\n buttons[Math.max(currentIndex - 1, 0)].focus()\n } else if (input?.selectionStart === 0) {\n buttons[buttons.length - 1].focus()\n }\n }\n\n const focusNextDeletionButton = () => {\n const result = getDeletionButtons()\n\n if (!result) return\n\n const { buttons, currentIndex } = result\n\n if (currentIndex === -1) return\n\n const nextIndex = currentIndex + 1\n\n if (nextIndex < buttons.length) {\n buttons[nextIndex].focus()\n } else {\n // キー入力が input に影響しないようにフォーカスタイミングを遅らせる\n latest.focusFrame.request(() => {\n input?.focus()\n })\n }\n }\n\n const focus = () => {\n latest.onFocus?.()\n setIsExpanded(true)\n }\n\n const blur = () => {\n if (latest.isExpanded) {\n latest.onBlur?.()\n setIsExpanded(false)\n }\n }\n\n return {\n handleDelete,\n blur,\n inputCallbackRef: (node: HTMLInputElement | null) => {\n input = node\n if (!node) {\n listBoxFunctions.cleanupFrame()\n latest.cleanupAddFrame()\n latest.focusFrame.cancel()\n }\n },\n handleDelegateKeyDown: (e: KeyboardEvent<HTMLElement>) => {\n if (latest.isComposing) return\n\n if (ESCAPE_KEY_REGEX.test(e.key)) {\n if (latest.isExpanded) {\n e.stopPropagation()\n }\n\n blur()\n } else if (e.key === 'Tab') {\n if (latest.isExpanded) {\n // フォーカスがコンポーネントを抜けるように先に input をフォーカスしておく\n input?.focus()\n }\n\n blur()\n } else if (ARROW_LEFT_KEY_REGEX.test(e.key)) {\n e.stopPropagation()\n focusPrevDeletionButton()\n } else if (ARROW_RIGHT_KEY_REGEX.test(e.key)) {\n e.stopPropagation()\n focusNextDeletionButton()\n } else if (\n e.key === 'Backspace' &&\n latest.isInputEmpty &&\n latest.selectedItems.length > 0 &&\n latest.selectedItems[latest.selectedItems.length - 1].deletable !== false\n ) {\n e.preventDefault()\n e.stopPropagation()\n\n const lastItem = latest.selectedItems[latest.selectedItems.length - 1]\n\n handleDelete(lastItem)\n setHighlighted(true)\n latest.setInputValueIfUncontrolled(getSelectedLabelText(lastItem))\n } else {\n e.stopPropagation()\n input?.focus()\n }\n\n latest.handleKeyDownListBox(e)\n },\n handleDelegateClick: (e: MouseEvent<HTMLElement>) => {\n if (\n !latest.disabled &&\n !latest.isExpanded &&\n !findDelegateTarget(e, DELETE_BUTTON_CLASSNAME)\n ) {\n focus()\n }\n },\n handleChangeInput: (e: ChangeEvent<HTMLInputElement>) => {\n const handlers = [latest.onChange, latest.onChangeInput].filter((h) => !!h)\n\n handlers.forEach((h) => h(e))\n latest.setInputValueIfUncontrolled(e.currentTarget.value)\n },\n handleFocusInput: () => {\n if (!latest.isExpanded) {\n focus()\n }\n },\n handleCompositionStart: () => setIsComposing(true),\n handleCompositionEnd: () => setIsComposing(false),\n handleKeyDownInput: (e: KeyboardEvent<HTMLInputElement>) => {\n if (ARROW_UP_AND_DOWN_KEY_REGEX.test(e.key)) {\n // 上下キー入力はリストボックスの activeDescendant の移動に用いるため、input 内では作用させない\n e.preventDefault()\n }\n },\n // HINT: form内にcomboboxを設置 & 検索inputにfocusした状態で\n // アイテムをキーボードで選択し、Enterを押すとinput上でEnterを押したことになるため、\n // submitイベントが発生し、formが送信される場合がある\n handleDelegateKeyPress: (e: KeyboardEvent<HTMLInputElement>) => {\n preventDefaultWithPressEnter(e)\n latest.onKeyPress?.(e)\n },\n }\n }, [listBoxFunctions, latest])\n\n const listBoxCallbackRef = useAreaClickCallbackRef(\n isExpanded ? [triggerRef] : null,\n functions.blur,\n )\n\n // TODO: inputFocusEffectRef, inputSelectEffectRef は一つにまとめられないか検討する\n const inputFocusEffectRef = useLayoutEffectRef(\n (node: HTMLInputElement | null) => {\n if (node && isExpanded) {\n node.focus()\n }\n },\n [isExpanded, selectedItems, isInputControlled],\n )\n const inputSelectEffectRef = useLayoutEffectRef(\n (node: HTMLInputElement | null) => {\n if (!node) {\n return\n }\n\n if (latest.highlighted) {\n setHighlighted(false)\n node.select()\n } else {\n setInputValueIfUncontrolled('')\n }\n },\n [selectedItems, setInputValueIfUncontrolled, latest],\n )\n\n const mergedInputRef = useMergeRefs(\n functions.inputCallbackRef,\n inputFocusEffectRef,\n inputSelectEffectRef,\n ref,\n )\n\n const classNames = useMemo(() => {\n const {\n wrapper,\n inputArea,\n selectedList,\n inputWrapper,\n input,\n placeholderEl,\n suffixWrapper,\n suffixIcon,\n } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n inputArea: inputArea(),\n selectedList: selectedList(),\n inputWrapper: inputWrapper(),\n input: input(),\n placeholder: placeholderEl(),\n suffixWrapper: suffixWrapper(),\n suffixIcon: suffixIcon(),\n }\n }, [className])\n\n const localized = useLocalize({\n selectedListAriaLabel: {\n id: 'smarthr-ui/MultiCombobox/selectedListAriaLabel',\n defaultText: '選択済みアイテム',\n },\n })\n\n const errorAttr = error || undefined\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <div\n ref={triggerRef}\n role=\"group\"\n className={classNames.wrapper}\n style={{\n ...style,\n width: typeof width === 'number' ? `${width}px` : width,\n }}\n onClick={functions.handleDelegateClick}\n onKeyDown={functions.handleDelegateKeyDown}\n onKeyPress={functions.handleDelegateKeyPress}\n >\n <Scroller className={classNames.inputArea}>\n <ul\n id={selectedListId}\n className={classNames.selectedList}\n aria-label={localized.selectedListAriaLabel}\n >\n {selectedItems.map((selectedItem) => (\n <li key={`${getSelectedLabelText(selectedItem)}-${selectedItem.value}`}>\n <MultiSelectedItem\n disabled={disabled}\n item={selectedItem}\n enableEllipsis={selectedItemEllipsis}\n handleDelete={functions.handleDelete}\n />\n </li>\n ))}\n </ul>\n\n <div className={classNames.inputWrapper}>\n <input\n {...rest}\n ref={mergedInputRef}\n role=\"combobox\"\n type=\"text\"\n name={name}\n required={required && selectedItems.length === 0}\n disabled={disabled}\n value={inputValue}\n autoComplete={autoComplete ?? 'off'}\n tabIndex={0}\n className={classNames.input}\n aria-activedescendant={activeOption?.id}\n aria-controls={`${listBoxId} ${selectedListId}`}\n aria-haspopup=\"listbox\"\n aria-expanded={isExpanded}\n aria-invalid={errorAttr}\n aria-disabled={disabled}\n aria-autocomplete=\"list\"\n data-smarthr-ui-input-error={errorAttr}\n data-smarthr-ui-input=\"true\"\n onChange={functions.handleChangeInput}\n onFocus={functions.handleFocusInput}\n onCompositionStart={functions.handleCompositionStart}\n onCompositionEnd={functions.handleCompositionEnd}\n onKeyDown={functions.handleKeyDownInput}\n />\n </div>\n\n {selectedItems.length === 0 && placeholder && !isExpanded && (\n <p className={classNames.placeholder}>{placeholder}</p>\n )}\n </Scroller>\n\n <MemoizedCaretDown disabled={disabled} isExpanded={isExpanded} classNames={classNames} />\n\n <ListBox {...listBoxProps} callbackRef={listBoxCallbackRef} />\n </div>\n )\n}\n\nconst MemoizedCaretDown = memo<{\n disabled: boolean\n isExpanded: boolean\n classNames: {\n suffixWrapper: string\n suffixIcon: string\n }\n}>(({ disabled, isExpanded, classNames }) => {\n const theme = useTheme()\n const caretIconColor = isExpanded\n ? theme.textColor.black\n : disabled\n ? theme.textColor.disabled\n : theme.textColor.grey\n\n return (\n <div className={classNames.suffixWrapper}>\n <FaCaretDownIcon color={caretIconColor} className={classNames.suffixIcon} />\n </div>\n )\n})\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA;AAEA;AACE;;;AAGF;AAEA;AACA;AACA;AACA;AAEA;AACE;AACA;;AAGF;AAEA;AACE;AACE;;;;;;;;;;;;AAYC;AACD;AACA;AAEA;;;;;AAKC;AACD;;;;AAIC;AACD;AACA;;;AAGC;AACD;AACD;AACF;AAEM;AAgCL;;;;;AAMA;AAEA;;;AAGA;AAEA;;AAEE;;;;AAID;AACD;AACA;;;;;;;;;;AAWC;AAED;AACE;;AAGE;AACE;;AAEF;AACE;;AASF;;;AAGE;AACE;AACF;;AAEJ;;;AAII;AACA;;;AAGF;;;AAGE;;AAKE;AACE;AACA;;AAGA;;AACK;;;AAGT;;;AAGN;AAEA;;;;;;;;;;AAWG;AAEH;;;;;;;;;;;;;;;;;AAkBC;AAED;;AAGE;;AAGE;;AAIE;;;AAII;;;;;AAMN;AACF;;AAGE;AAEA;;AAEA;AAEA;AACE;;AACK;;;AAGT;;AAGE;AAEA;;AAEA;;;AAIA;AAEA;AACE;;;;AAGA;;AAEA;;AAEJ;;AAGE;;AAEF;;AAGE;AACE;;;AAGJ;;;;AAKE;;;;;AAKI;;;AAGJ;;;;AAII;;;AAIA;;AACK;AACL;;;;AAKA;;;;AAGA;;;;AAGA;;AACK;AAEL;AACA;AACA;;;AAKA;;;;;;;;;AAUF;;AAEF;;;AAII;AAEA;;;AAGJ;;AAGE;;;;AAIA;AACE;;;AAGJ;AACA;AACA;;;;;;;;;AASA;;AAEE;;;AAGN;;;AAQA;AAEI;;;;AAMJ;;;;AAMI;;;;;;;;AAUJ;AAOA;;;AAaI;;;;;;;;;AASJ;;AAGE;AACE;AACA;AACD;AACF;AAED;;;AAIE;AAKI;AACA;AACD;AA+DP;AAEA;AAQE;;AAEE;AACA;AACE;AACA;;AAON;;"}
1
+ {"version":3,"file":"MultiCombobox.cjs","sources":["../../../../../src/components/Combobox/client/MultiCombobox/MultiCombobox.tsx"],"sourcesContent":["'use client'\n\nimport {\n type ChangeEvent,\n type KeyboardEvent,\n type MouseEvent,\n type ReactNode,\n memo,\n useId,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { tv } from 'tailwind-variants'\n\nimport { useAnimationFrame } from '../../../../hooks/client/useAnimationFrame'\nimport { useAreaClickCallbackRef } from '../../../../hooks/client/useAreaClickCallbackRef'\nimport { useLayoutEffectRef } from '../../../../hooks/client/useLayoutEffectRef'\nimport { useMergeRefs } from '../../../../hooks/client/useMergeRefs'\nimport { useTheme } from '../../../../hooks/client/useTheme'\nimport { useLatest } from '../../../../hooks/useLatest'\nimport { useLocalize } from '../../../../intl'\nimport { findDelegateTarget } from '../../../../libs/delegate'\nimport { FaCaretDownIcon } from '../../../Icon'\nimport { Scroller } from '../../../Scroller'\nimport { areItemsEqual, getSelectedLabelText } from '../helper'\nimport { ListBox, useListbox } from '../useListbox'\nimport { useMultiOptions } from '../useOptions'\n\nimport { DELETE_BUTTON_SELECTOR, MultiSelectedItem } from './MultiSelectedItem'\n\nimport type { ExtendElementPropsWithRef } from '../../../../types'\nimport type { BaseProps, ComboboxItem } from '../types'\n\ntype Props<T> = ExtendElementPropsWithRef<\n 'input',\n BaseProps<T> & {\n /**\n * 選択されているアイテムのリスト\n */\n selectedItems: Array<ComboboxItem<T> & { deletable?: boolean }>\n /**\n * 選択されているアイテムのラベルを省略表示するかどうか\n */\n selectedItemEllipsis?: boolean\n /**\n * テキストボックスの `value` 属性の値。\n * `onChangeInput` と併せて設定することで、テキストボックスの挙動が制御可能になる。\n */\n inputValue?: string\n /**\n * 選択されているアイテムの削除ボタンがクリックされた時に発火するコールバック関数\n */\n onDelete?: (item: ComboboxItem<T>) => void\n /**\n * 選択されているアイテムのリストが変わった時に発火するコールバック関数\n */\n onChangeSelected?: (selectedItems: Array<ComboboxItem<T>>) => void\n /**\n * コンポーネントがフォーカスされたときに発火するコールバック関数\n */\n onFocus?: () => void\n /**\n * コンポーネントからフォーカスが外れた時に発火するコールバック関数\n */\n onBlur?: () => void\n /**\n * アイテムが選択されたときに選択済みかどうかを判定するコールバック関数/\n */\n isItemSelected?: (targetItem: ComboboxItem<T>, selectedItems: Array<ComboboxItem<T>>) => boolean\n /**\n * 検索結果が0件の時に表示するコンテンツ\n */\n noResultText?: ReactNode\n },\n { omit: 'children' }\n>\n\nconst NOOP = () => undefined\n\nconst preventDefaultWithPressEnter = (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'Enter') {\n e.preventDefault()\n }\n}\n\nconst ESCAPE_KEY_REGEX = /^Esc(ape)?$/\nconst ARROW_LEFT_KEY_REGEX = /^(Arrow)?Left$/\nconst ARROW_RIGHT_KEY_REGEX = /^(Arrow)?Right/\nconst ARROW_UP_AND_DOWN_KEY_REGEX = /^(Arrow)?(Up|Down)$/\n\nconst EMPTY_INPUT_CHANGE_EVENT = {\n currentTarget: { value: '' },\n target: { value: '' },\n} as ChangeEvent<HTMLInputElement>\n\nconst DELETE_BUTTON_CLASSNAME = `.${DELETE_BUTTON_SELECTOR}`\n\nconst classNameGenerator = tv({\n slots: {\n wrapper: [\n 'smarthr-ui-MultiCombobox',\n 'shr-box-border shr-inline-flex shr-min-w-[15em] shr-rounded-m shr-border shr-border-solid shr-px-0.5 shr-py-0.25 shr-align-bottom',\n 'contrast-more:shr-border-high-contrast',\n 'has-[[role=combobox][aria-expanded=true]]:shr-focus-indicator',\n 'shr-cursor-text shr-border-default shr-bg-white',\n 'has-[[role=combobox]:disabled]:shr-cursor-not-allowed',\n 'has-[[role=combobox]:disabled]:shr-border-default/50',\n 'has-[[role=combobox]:disabled]:shr-bg-white-darken',\n 'has-[[role=combobox]:disabled]:shr-text-disabled',\n // HINT: disabled と詳細度が同じ [0,2,0] のため、CSS ソース順でこちらを後に置くことで error 時の border 色を優先させる\n 'has-[[role=combobox][aria-invalid]]:shr-border-danger',\n ],\n inputArea: 'shr-flex shr-flex-1 shr-flex-wrap shr-gap-0.5',\n selectedList:\n 'smarthr-ui-MultiCombobox-selectedList shr-contents shr-list-none [&_li]:shr-min-w-0',\n inputWrapper: [\n 'shr-flex shr-flex-1 shr-items-center',\n 'has-[[role=combobox][aria-expanded=false]]:shr-pointer-events-none',\n 'has-[[role=combobox][aria-expanded=false]]:shr-absolute',\n 'has-[[role=combobox][aria-expanded=false]]:shr-opacity-0',\n ],\n input: [\n 'smarthr-ui-MultiCombobox-input',\n 'shr-w-full shr-min-w-[5em] shr-border-none shr-text-base shr-text-black shr-outline-none shr-outline-0',\n 'disabled:shr-hidden',\n ],\n placeholderEl: 'smarthr-ui-MultiCombobox-placeholder shr-my-0 shr-self-center',\n suffixWrapper: [\n 'shr-relative -shr-me-0.5 shr-ms-0.5 shr-p-0.5',\n 'before:shr-absolute before:shr-inset-x-0 before:shr-inset-y-0.25 before:shr-w-0 before:shr-border-0 before:shr-border-l before:shr-border-solid before:shr-border-default before:shr-content-[\"\"]',\n ],\n suffixIcon: 'shr-block',\n },\n})\n\nexport const MultiCombobox = <T,>({\n items,\n selectedItems,\n name,\n disabled = false,\n required = false,\n error = false,\n creatable = false,\n placeholder = '',\n autoComplete,\n dropdownHelpMessage,\n isLoading,\n selectedItemEllipsis,\n width,\n dropdownWidth = 'auto',\n inputValue: controlledInputValue,\n className,\n onChange,\n onChangeInput,\n onAdd,\n onDelete,\n onSelect,\n onChangeSelected,\n onFocus,\n onBlur,\n onKeyPress,\n isItemSelected,\n noResultText,\n style,\n ref,\n ...rest\n}: Props<T>) => {\n const triggerRef = useRef<HTMLDivElement>(null)\n const [isExpanded, setIsExpanded] = useState(false)\n const [highlighted, setHighlighted] = useState(false)\n const [uncontrolledInputValue, setUncontrolledInputValue] = useState('')\n const [isComposing, setIsComposing] = useState(false)\n\n const selectedListId = useId()\n\n const isInputControlled = controlledInputValue !== undefined\n const inputValue = isInputControlled ? controlledInputValue : uncontrolledInputValue\n const setInputValueIfUncontrolled = isInputControlled ? NOOP : setUncontrolledInputValue\n const isInputEmpty = !inputValue\n\n const { options } = useMultiOptions({\n items,\n selected: selectedItems,\n creatable,\n inputValue,\n isItemSelected,\n })\n const deleteFrame = useAnimationFrame()\n const selectFrame = useAnimationFrame()\n\n // eslint-disable-next-line local-rules/best-practice-for-use-latest\n const latestForListBox = useLatest({\n onDelete,\n onChangeSelected,\n onSelect,\n onChangeInput,\n selectedItems,\n deleteFrame,\n selectFrame,\n })\n\n const listBoxFunctions = useMemo(() => {\n const handleDelete = (item: ComboboxItem<T>) => {\n const handlers: Array<(deletingItem: ComboboxItem<T>) => void> = []\n\n if (latestForListBox.onDelete) {\n handlers.push((deletingItem: ComboboxItem<T>) => latestForListBox.onDelete!(deletingItem))\n }\n if (latestForListBox.onChangeSelected) {\n handlers.push((deletingItem: ComboboxItem<T>) =>\n latestForListBox.onChangeSelected!(\n latestForListBox.selectedItems.filter(\n (selected) => !areItemsEqual(selected, deletingItem),\n ),\n ),\n )\n }\n\n if (handlers.length > 0) {\n // HINT: Dropdown系コンポーネント内でComboboxを使うと、選択肢がportalで表現されている関係上Dropdownが閉じてしまう\n // 処理を遅延させることで正常に閉じる/閉じないの判定を行えるようにする\n latestForListBox.deleteFrame.request(() => {\n handlers.forEach((h) => h(item))\n })\n }\n }\n\n return {\n cleanupFrame: () => {\n latestForListBox.deleteFrame.cancel()\n latestForListBox.selectFrame.cancel()\n },\n handleDelete,\n handleSelect: (selected: ComboboxItem<T>) => {\n // HINT: Dropdown系コンポーネント内でComboboxを使うと、選択肢がportalで表現されている関係上Dropdownが閉じてしまう\n // 処理を遅延させることで正常に閉じる/閉じないの判定を行えるようにする\n latestForListBox.selectFrame.request(() => {\n const matchedSelectedItem = latestForListBox.selectedItems.find((item) =>\n areItemsEqual(item, selected),\n )\n\n if (matchedSelectedItem === undefined) {\n latestForListBox.onSelect?.(selected)\n latestForListBox.onChangeSelected?.(latestForListBox.selectedItems.concat(selected))\n\n // 制御コンポーネントの場合に親側でinputValueを更新できるように、選択時にonChangeInputを空文字で発火する\n latestForListBox.onChangeInput?.(EMPTY_INPUT_CHANGE_EVENT)\n } else if (matchedSelectedItem.deletable !== false) {\n handleDelete(selected)\n }\n })\n },\n }\n }, [latestForListBox])\n\n const { listBoxProps, activeOption, cleanupAddFrame, handleKeyDownListBox, listBoxId } =\n useListbox({\n options,\n dropdownHelpMessage,\n dropdownWidth,\n onAdd,\n onSelect: listBoxFunctions.handleSelect,\n isExpanded,\n isLoading,\n triggerRef,\n noResultText,\n })\n\n const focusFrame = useAnimationFrame()\n\n const latest = useLatest({\n onChange,\n onChangeInput,\n onFocus,\n onBlur,\n onKeyPress,\n disabled,\n isExpanded,\n highlighted,\n isComposing,\n isInputEmpty,\n selectedItems,\n setInputValueIfUncontrolled,\n handleKeyDownListBox,\n cleanupAddFrame,\n focusFrame,\n })\n\n const functions = useMemo(() => {\n let input: HTMLInputElement | null = null\n\n const handleDelete = listBoxFunctions.handleDelete\n\n const getDeletionButtons = () => {\n if (triggerRef.current) {\n const buttons =\n triggerRef.current.querySelectorAll<HTMLButtonElement>(DELETE_BUTTON_CLASSNAME)\n\n if (buttons.length > 0) {\n const actualButtons = Array.from(buttons)\n\n return {\n buttons: actualButtons,\n currentIndex: actualButtons.indexOf(document.activeElement as HTMLButtonElement),\n }\n }\n }\n\n return null\n }\n\n const focusPrevDeletionButton = () => {\n const result = getDeletionButtons()\n\n if (!result) return\n\n const { buttons, currentIndex } = result\n\n if (currentIndex !== -1) {\n buttons[Math.max(currentIndex - 1, 0)].focus()\n } else if (input?.selectionStart === 0) {\n buttons[buttons.length - 1].focus()\n }\n }\n\n const focusNextDeletionButton = () => {\n const result = getDeletionButtons()\n\n if (!result) return\n\n const { buttons, currentIndex } = result\n\n if (currentIndex === -1) return\n\n const nextIndex = currentIndex + 1\n\n if (nextIndex < buttons.length) {\n buttons[nextIndex].focus()\n } else {\n // キー入力が input に影響しないようにフォーカスタイミングを遅らせる\n latest.focusFrame.request(() => {\n input?.focus()\n })\n }\n }\n\n const focus = () => {\n latest.onFocus?.()\n setIsExpanded(true)\n }\n\n const blur = () => {\n if (latest.isExpanded) {\n latest.onBlur?.()\n setIsExpanded(false)\n }\n }\n\n return {\n handleDelete,\n blur,\n inputCallbackRef: (node: HTMLInputElement | null) => {\n input = node\n if (!node) {\n listBoxFunctions.cleanupFrame()\n latest.cleanupAddFrame()\n latest.focusFrame.cancel()\n }\n },\n handleDelegateKeyDown: (e: KeyboardEvent<HTMLElement>) => {\n if (latest.isComposing) return\n\n if (ESCAPE_KEY_REGEX.test(e.key)) {\n if (latest.isExpanded) {\n e.stopPropagation()\n }\n\n blur()\n } else if (e.key === 'Tab') {\n if (latest.isExpanded) {\n // フォーカスがコンポーネントを抜けるように先に input をフォーカスしておく\n input?.focus()\n }\n\n blur()\n } else if (ARROW_LEFT_KEY_REGEX.test(e.key)) {\n e.stopPropagation()\n focusPrevDeletionButton()\n } else if (ARROW_RIGHT_KEY_REGEX.test(e.key)) {\n e.stopPropagation()\n focusNextDeletionButton()\n } else if (\n e.key === 'Backspace' &&\n latest.isInputEmpty &&\n latest.selectedItems.length > 0 &&\n latest.selectedItems[latest.selectedItems.length - 1].deletable !== false\n ) {\n e.preventDefault()\n e.stopPropagation()\n\n const lastItem = latest.selectedItems[latest.selectedItems.length - 1]\n\n handleDelete(lastItem)\n setHighlighted(true)\n latest.setInputValueIfUncontrolled(getSelectedLabelText(lastItem))\n } else {\n e.stopPropagation()\n input?.focus()\n }\n\n latest.handleKeyDownListBox(e)\n },\n handleDelegateClick: (e: MouseEvent<HTMLElement>) => {\n if (\n !latest.disabled &&\n !latest.isExpanded &&\n !findDelegateTarget(e, DELETE_BUTTON_CLASSNAME)\n ) {\n focus()\n }\n },\n handleChangeInput: (e: ChangeEvent<HTMLInputElement>) => {\n const handlers = [latest.onChange, latest.onChangeInput].filter((h) => !!h)\n\n handlers.forEach((h) => h(e))\n latest.setInputValueIfUncontrolled(e.currentTarget.value)\n },\n handleFocusInput: () => {\n if (!latest.isExpanded) {\n focus()\n }\n },\n handleCompositionStart: () => setIsComposing(true),\n handleCompositionEnd: () => setIsComposing(false),\n handleKeyDownInput: (e: KeyboardEvent<HTMLInputElement>) => {\n if (ARROW_UP_AND_DOWN_KEY_REGEX.test(e.key)) {\n // 上下キー入力はリストボックスの activeDescendant の移動に用いるため、input 内では作用させない\n e.preventDefault()\n }\n },\n // HINT: form内にcomboboxを設置 & 検索inputにfocusした状態で\n // アイテムをキーボードで選択し、Enterを押すとinput上でEnterを押したことになるため、\n // submitイベントが発生し、formが送信される場合がある\n handleDelegateKeyPress: (e: KeyboardEvent<HTMLInputElement>) => {\n preventDefaultWithPressEnter(e)\n latest.onKeyPress?.(e)\n },\n }\n }, [listBoxFunctions, latest])\n\n const listBoxCallbackRef = useAreaClickCallbackRef(\n isExpanded ? [triggerRef] : null,\n functions.blur,\n )\n\n // TODO: inputFocusEffectRef, inputSelectEffectRef は一つにまとめられないか検討する\n const inputFocusEffectRef = useLayoutEffectRef(\n (node: HTMLInputElement | null) => {\n if (node && isExpanded) {\n node.focus()\n }\n },\n [isExpanded, selectedItems, isInputControlled],\n )\n const inputSelectEffectRef = useLayoutEffectRef(\n (node: HTMLInputElement | null) => {\n if (!node) {\n return\n }\n\n if (latest.highlighted) {\n setHighlighted(false)\n node.select()\n } else {\n setInputValueIfUncontrolled('')\n }\n },\n [selectedItems, setInputValueIfUncontrolled, latest],\n )\n\n const mergedInputRef = useMergeRefs(\n functions.inputCallbackRef,\n inputFocusEffectRef,\n inputSelectEffectRef,\n ref,\n )\n\n const classNames = useMemo(() => {\n const {\n wrapper,\n inputArea,\n selectedList,\n inputWrapper,\n input,\n placeholderEl,\n suffixWrapper,\n suffixIcon,\n } = classNameGenerator()\n\n return {\n wrapper: wrapper({ className }),\n inputArea: inputArea(),\n selectedList: selectedList(),\n inputWrapper: inputWrapper(),\n input: input(),\n placeholder: placeholderEl(),\n suffixWrapper: suffixWrapper(),\n suffixIcon: suffixIcon(),\n }\n }, [className])\n\n const localized = useLocalize({\n selectedListAriaLabel: {\n id: 'smarthr-ui/MultiCombobox/selectedListAriaLabel',\n defaultText: '選択済みアイテム',\n },\n })\n\n const errorAttr = error || undefined\n\n return (\n // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions\n <div\n ref={triggerRef}\n role=\"group\"\n className={classNames.wrapper}\n style={{\n ...style,\n width: typeof width === 'number' ? `${width}px` : width,\n }}\n onClick={functions.handleDelegateClick}\n onKeyDown={functions.handleDelegateKeyDown}\n onKeyPress={functions.handleDelegateKeyPress}\n >\n <Scroller className={classNames.inputArea}>\n <ul\n id={selectedListId}\n className={classNames.selectedList}\n aria-label={localized.selectedListAriaLabel}\n >\n {selectedItems.map((selectedItem) => (\n <li key={`${getSelectedLabelText(selectedItem)}-${selectedItem.value}`}>\n <MultiSelectedItem\n disabled={disabled}\n item={selectedItem}\n enableEllipsis={selectedItemEllipsis}\n handleDelete={functions.handleDelete}\n />\n </li>\n ))}\n </ul>\n\n <div className={classNames.inputWrapper}>\n <input\n {...rest}\n ref={mergedInputRef}\n role=\"combobox\"\n type=\"text\"\n name={name}\n required={required && selectedItems.length === 0}\n disabled={disabled}\n value={inputValue}\n autoComplete={autoComplete ?? 'off'}\n tabIndex={0}\n className={classNames.input}\n aria-activedescendant={activeOption?.id}\n aria-controls={`${listBoxId} ${selectedListId}`}\n aria-haspopup=\"listbox\"\n aria-expanded={isExpanded}\n aria-invalid={errorAttr}\n aria-disabled={disabled}\n aria-autocomplete=\"list\"\n data-smarthr-ui-input-error={errorAttr}\n data-smarthr-ui-input=\"true\"\n onChange={functions.handleChangeInput}\n onFocus={functions.handleFocusInput}\n onCompositionStart={functions.handleCompositionStart}\n onCompositionEnd={functions.handleCompositionEnd}\n onKeyDown={functions.handleKeyDownInput}\n />\n </div>\n\n {selectedItems.length === 0 && placeholder && !isExpanded && (\n <p className={classNames.placeholder}>{placeholder}</p>\n )}\n </Scroller>\n\n <MemoizedCaretDown disabled={disabled} isExpanded={isExpanded} classNames={classNames} />\n\n <ListBox {...listBoxProps} callbackRef={listBoxCallbackRef} />\n </div>\n )\n}\n\nconst MemoizedCaretDown = memo<{\n disabled: boolean\n isExpanded: boolean\n classNames: {\n suffixWrapper: string\n suffixIcon: string\n }\n}>(({ disabled, isExpanded, classNames }) => {\n const theme = useTheme()\n const caretIconColor = isExpanded\n ? theme.textColor.black\n : disabled\n ? theme.textColor.disabled\n : theme.textColor.grey\n\n return (\n <div className={classNames.suffixWrapper}>\n <FaCaretDownIcon color={caretIconColor} className={classNames.suffixIcon} />\n </div>\n )\n})\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8EA;AAEA;AACE;;;AAGF;AAEA;AACA;AACA;AACA;AAEA;AACE;AACA;;AAGF;AAEA;AACE;AACE;;;;;;;;;;;;AAYC;AACD;AACA;AAEA;;;;;AAKC;AACD;;;;AAIC;AACD;AACA;;;AAGC;AACD;AACD;AACF;AAEM;AAgCL;;;;;AAMA;AAEA;;;AAGA;AAEA;;AAEE;;;;AAID;AACD;AACA;;;;;;;;;;AAWC;AAED;AACE;;AAGE;AACE;;AAEF;AACE;;AASF;;;AAGE;AACE;AACF;;AAEJ;;;AAII;AACA;;;AAGF;;;AAGE;;AAKE;AACE;AACA;;AAGA;;AACK;;;AAGT;;;AAGN;AAEA;;;;;;;;;;AAWG;AAEH;;;;;;;;;;;;;;;;;AAkBC;AAED;;AAGE;;AAGE;;AAIE;;;AAII;;;;;AAMN;AACF;;AAGE;AAEA;;AAEA;AAEA;AACE;;AACK;;;AAGT;;AAGE;AAEA;;AAEA;;;AAIA;AAEA;AACE;;;;AAGA;;AAEA;;AAEJ;;AAGE;;AAEF;;AAGE;AACE;;;AAGJ;;;;AAKE;;;;;AAKI;;;AAGJ;;;;AAII;;;AAIA;;AACK;AACL;;;;AAKA;;;;AAGA;;;;AAGA;;AACK;AAEL;AACA;AACA;;;AAKA;;;;;;;;;AAUF;;AAEF;;;AAII;AAEA;;;AAGJ;;AAGE;;;;AAIA;AACE;;;AAGJ;AACA;AACA;;;;;;;;;AASA;;AAEE;;;AAGN;;;AAQA;AAEI;;;;AAMJ;;;;AAMI;;;;;;;;AAUJ;AAOA;;;AAaI;;;;;;;;;AASJ;;AAGE;AACE;AACA;AACD;AACF;AAED;;;AAIE;AAKI;AACA;AACD;AA+DP;AAEA;AAQE;;AAEE;AACA;AACE;AACA;;AAON;;"}
@@ -1,7 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { SHRComponentPropsWithRef } from '../../../../types';
2
+ import type { ExtendElementPropsWithRef } from '../../../../types';
3
3
  import type { BaseProps, ComboboxItem } from '../types';
4
- type Props<T> = SHRComponentPropsWithRef<'input', BaseProps<T> & {
4
+ type Props<T> = ExtendElementPropsWithRef<'input', BaseProps<T> & {
5
5
  /**
6
6
  * 選択されているアイテムのリスト
7
7
  */