@tinyweb_dev/oe-exam-sdk 0.1.1 → 0.1.2

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 (485) hide show
  1. package/dist/api/exam-create.js +1 -179
  2. package/dist/api/exam-create.types.js +1 -1
  3. package/dist/api/exam-questions.js +1 -98
  4. package/dist/api/exam-questions.types.js +1 -1
  5. package/dist/api/exam-taking.js +1 -73
  6. package/dist/api/exam-taking.types.js +1 -1
  7. package/dist/api/index.js +1 -6
  8. package/dist/api/result-review.js +1 -50
  9. package/dist/api/result-review.types.js +1 -1
  10. package/dist/components/CueCardEditor.js +1 -58
  11. package/dist/components/common/ResolvedImage.js +1 -15
  12. package/dist/components/exams/CreateExamInfoForm.js +1 -35
  13. package/dist/components/exams/CreateExamPageContainer.js +1 -103
  14. package/dist/components/exams/ExamCreator.js +1 -89
  15. package/dist/components/exams/ExamPartTabs.js +1 -40
  16. package/dist/components/exams/ExamQuestionGrid.js +1 -18
  17. package/dist/components/exams/ExamQuestionsPageContainer.js +1 -90
  18. package/dist/components/exams/PartAudioUploader.js +1 -9
  19. package/dist/components/exams/TemplateSelector.js +1 -66
  20. package/dist/components/exams/api.js +1 -3
  21. package/dist/components/exams/create-exam.validation.js +1 -18
  22. package/dist/components/exams/exam-template.utils.js +1 -18
  23. package/dist/components/exams/index.js +1 -10
  24. package/dist/components/exams/take/ExamTakingPageContainer.js +1 -153
  25. package/dist/components/exams/take/GenericQuestionRenderer.js +1 -14
  26. package/dist/components/exams/take/exam-taking.utils.js +1 -88
  27. package/dist/components/exams/take/hooks/useSpeakingRecorder.js +1 -24
  28. package/dist/components/exams/take/index.js +1 -2
  29. package/dist/components/exams/take/types.js +1 -1
  30. package/dist/components/index.js +1 -42
  31. package/dist/components/questions/_shared/config/question-types.config.js +1 -333
  32. package/dist/components/questions/_shared/constants/color-palette.js +1 -21
  33. package/dist/components/questions/_shared/hooks/useAnswerGroupQuestionGroup.js +1 -105
  34. package/dist/components/questions/_shared/hooks/useBasicQuestionGroup.js +1 -222
  35. package/dist/components/questions/_shared/hooks/useCompareImagesGroup.js +1 -140
  36. package/dist/components/questions/_shared/hooks/useImageQuestionGroup.js +1 -123
  37. package/dist/components/questions/_shared/hooks/useInfoExchangeGroup.js +1 -50
  38. package/dist/components/questions/_shared/hooks/useQuestionFormState.js +1 -54
  39. package/dist/components/questions/_shared/hooks/useQuestionInitialization.js +1 -123
  40. package/dist/components/questions/_shared/hooks/useQuestionListGroup.js +1 -121
  41. package/dist/components/questions/_shared/hooks/useQuestionOnChange.js +1 -70
  42. package/dist/components/questions/_shared/hooks/useSceneQuestionGroup.js +1 -194
  43. package/dist/components/questions/_shared/index.js +1 -7
  44. package/dist/components/questions/_shared/types/answer-the-question.type.js +1 -1
  45. package/dist/components/questions/_shared/types/arrange-letters-into-words.type.js +1 -1
  46. package/dist/components/questions/_shared/types/choose-correct-adjective.type.js +1 -3
  47. package/dist/components/questions/_shared/types/color-region.config.js +1 -1
  48. package/dist/components/questions/_shared/types/fill-in-blank.type.js +1 -1
  49. package/dist/components/questions/_shared/types/fill-missing-words-in-grid.type.js +1 -1
  50. package/dist/components/questions/_shared/types/gn-speaking-interview.type.js +1 -1
  51. package/dist/components/questions/_shared/types/index.js +1 -12
  52. package/dist/components/questions/_shared/types/label-the-picture.type.js +1 -1
  53. package/dist/components/questions/_shared/types/listen-and-choose-from-answer-group.type.js +1 -1
  54. package/dist/components/questions/_shared/types/listen-and-choose-objects-in-scene.type.js +1 -1
  55. package/dist/components/questions/_shared/types/listen-and-drag-objects-into-scene.type.js +1 -1
  56. package/dist/components/questions/_shared/types/listen-and-speak-answer.type.js +1 -1
  57. package/dist/components/questions/_shared/types/listen-and-speak-compare-images.type.js +1 -1
  58. package/dist/components/questions/_shared/types/listen-and-speak-image-group.type.js +1 -1
  59. package/dist/components/questions/_shared/types/listen-and-speak-info-exchange.type.js +1 -1
  60. package/dist/components/questions/_shared/types/listen-and-speak-odd-one-out.type.js +1 -3
  61. package/dist/components/questions/_shared/types/listen-and-speak-question-list.type.js +1 -1
  62. package/dist/components/questions/_shared/types/listen-and-speak-with-story-images.type.js +1 -3
  63. package/dist/components/questions/_shared/types/listen-and-tick-answer.type.js +1 -1
  64. package/dist/components/questions/_shared/types/listening-drawline.type.js +1 -1
  65. package/dist/components/questions/_shared/types/look-and-choose-answer.type.js +1 -1
  66. package/dist/components/questions/_shared/types/look-picture-fill-word-hint.type.js +1 -1
  67. package/dist/components/questions/_shared/types/match-by-writing-answer.type.js +1 -1
  68. package/dist/components/questions/_shared/types/multiple-choice.type.js +1 -1
  69. package/dist/components/questions/_shared/types/question-group.type.js +1 -11
  70. package/dist/components/questions/_shared/types/read-and-color-objects.type.js +1 -1
  71. package/dist/components/questions/_shared/types/read-displayed-content.type.js +1 -1
  72. package/dist/components/questions/_shared/types/read-passage-and-answer-questions.type.js +1 -1
  73. package/dist/components/questions/_shared/types/speaking-describe-image.type.js +1 -1
  74. package/dist/components/questions/_shared/types/spontaneous-qa.type.js +1 -1
  75. package/dist/components/questions/_shared/types/word-fill-paragraph-with-options.type.js +1 -1
  76. package/dist/components/questions/_shared/types/word-fill-paragraph.type.js +1 -1
  77. package/dist/components/questions/_shared/types/word-fill-structured-form.type.js +1 -1
  78. package/dist/components/questions/_shared/types/word-ordering.type.js +1 -1
  79. package/dist/components/questions/_shared/types/write-a-short-letter.type.js +1 -1
  80. package/dist/components/questions/_shared/types/write-correct-verb-form.type.js +1 -3
  81. package/dist/components/questions/_shared/types/write-sentences.type.js +1 -1
  82. package/dist/components/questions/_shared/types/write-short-paragraph.type.js +1 -1
  83. package/dist/components/questions/_shared/utils/answer-builder.js +1 -79
  84. package/dist/components/questions/_shared/utils/createColorRegionRegistration.js +1 -39
  85. package/dist/components/questions/_shared/utils/id-generator.js +1 -3
  86. package/dist/components/questions/_shared/utils/question-validation.js +1 -21
  87. package/dist/components/questions/components/ColorNode.js +1 -85
  88. package/dist/components/questions/components/ColorRegionClient.js +1 -545
  89. package/dist/components/questions/components/ColorRegionCreator.js +1 -420
  90. package/dist/components/questions/components/ColorRegionNode.js +1 -59
  91. package/dist/components/questions/components/CreatorGuide.js +1 -103
  92. package/dist/components/questions/components/NameNode.js +1 -26
  93. package/dist/components/questions/components/QuestionBankOption.js +1 -46
  94. package/dist/components/questions/components/QuestionBasicInfoForm.js +1 -9
  95. package/dist/components/questions/components/QuestionCommonFields.js +1 -33
  96. package/dist/components/questions/components/QuestionSearchDropdown.js +1 -258
  97. package/dist/components/questions/components/QuestionTypeSelector.js +1 -32
  98. package/dist/components/questions/components/QuestionTypeSpecificForms.js +1 -6
  99. package/dist/components/questions/components/RegionNode.js +1 -94
  100. package/dist/components/questions/components/index.js +1 -14
  101. package/dist/components/questions/creator/QuestionCreator.js +1 -90
  102. package/dist/components/questions/creator/QuestionGroupCreator.js +1 -119
  103. package/dist/components/questions/creator/dedicated-component-router.js +1 -79
  104. package/dist/components/questions/creator/index.js +1 -3
  105. package/dist/components/questions/creator/question-type-registry.js +1 -80
  106. package/dist/components/questions/groups/ArticlesGroupCard.js +1 -121
  107. package/dist/components/questions/groups/BasicQuestionGroupCard.js +1 -50
  108. package/dist/components/questions/groups/DocumentGroupCard.js +1 -114
  109. package/dist/components/questions/groups/MatchAnswerGroupCard.js +1 -25
  110. package/dist/components/questions/index.js +1 -10
  111. package/dist/components/questions/types/answer-the-question/AnswerTheQuestionClient.js +1 -37
  112. package/dist/components/questions/types/answer-the-question/AnswerTheQuestionCreator.js +1 -351
  113. package/dist/components/questions/types/answer-the-question/register.js +1 -67
  114. package/dist/components/questions/types/answer-the-question/transform.js +1 -36
  115. package/dist/components/questions/types/arrange-letters-into-words/ArrangeLettersIntoWordsClient.js +1 -141
  116. package/dist/components/questions/types/arrange-letters-into-words/ArrangeLettersIntoWordsCreator.js +1 -118
  117. package/dist/components/questions/types/arrange-letters-into-words/index.js +1 -2
  118. package/dist/components/questions/types/arrange-letters-into-words/register.js +1 -4
  119. package/dist/components/questions/types/arrange-letters-into-words/transform.js +1 -24
  120. package/dist/components/questions/types/choose-correct-adjective/ChooseCorrectAdjectiveClient.js +1 -64
  121. package/dist/components/questions/types/choose-correct-adjective/ChooseCorrectAdjectiveCreator.js +1 -169
  122. package/dist/components/questions/types/choose-correct-adjective/index.js +1 -2
  123. package/dist/components/questions/types/choose-correct-adjective/register.js +1 -55
  124. package/dist/components/questions/types/choose-correct-adjective/transform.js +1 -16
  125. package/dist/components/questions/types/choose-the-correct-answer/ChooseTheCorrectAnswerClient.js +1 -131
  126. package/dist/components/questions/types/choose-the-correct-answer/ChooseTheCorrectAnswerCreator.js +1 -581
  127. package/dist/components/questions/types/choose-the-correct-answer/index.js +1 -2
  128. package/dist/components/questions/types/choose-the-correct-answer/register.js +1 -101
  129. package/dist/components/questions/types/choose-the-correct-answer/transform.js +1 -43
  130. package/dist/components/questions/types/fill-in-blank/FillInBlankClient.js +1 -275
  131. package/dist/components/questions/types/fill-in-blank/FillInBlankCreator.js +1 -448
  132. package/dist/components/questions/types/fill-in-blank/index.js +1 -2
  133. package/dist/components/questions/types/fill-in-blank/register.js +1 -138
  134. package/dist/components/questions/types/fill-in-blank/transform.js +1 -59
  135. package/dist/components/questions/types/fill-missing-words-in-grid/FillMissingWordsInGridClient.js +1 -117
  136. package/dist/components/questions/types/fill-missing-words-in-grid/FillMissingWordsInGridCreator.js +1 -671
  137. package/dist/components/questions/types/fill-missing-words-in-grid/index.js +1 -2
  138. package/dist/components/questions/types/fill-missing-words-in-grid/register.js +1 -37
  139. package/dist/components/questions/types/fill-missing-words-in-grid/transform.js +1 -15
  140. package/dist/components/questions/types/gn-speaking-interview/GNSpeakingInterviewCreator.js +1 -262
  141. package/dist/components/questions/types/gn-speaking-interview/register.js +1 -121
  142. package/dist/components/questions/types/gn-speaking-interview/transform.js +1 -48
  143. package/dist/components/questions/types/image-object-matching/ImageObjectMatchingClient.js +1 -16
  144. package/dist/components/questions/types/image-object-matching/ImageObjectMatchingCreator.js +1 -27
  145. package/dist/components/questions/types/image-object-matching/index.js +1 -2
  146. package/dist/components/questions/types/image-object-matching/register.js +1 -3
  147. package/dist/components/questions/types/image-object-matching/transform.js +1 -2
  148. package/dist/components/questions/types/label-the-picture/LabelThePictureClient.js +1 -102
  149. package/dist/components/questions/types/label-the-picture/LabelThePictureCreator.js +1 -344
  150. package/dist/components/questions/types/label-the-picture/index.js +1 -2
  151. package/dist/components/questions/types/label-the-picture/register.js +1 -54
  152. package/dist/components/questions/types/label-the-picture/transform.js +1 -28
  153. package/dist/components/questions/types/listen-and-choose-from-answer-group/ListenAndChooseFromAnswerGroupClient.js +1 -78
  154. package/dist/components/questions/types/listen-and-choose-from-answer-group/ListenAndChooseFromAnswerGroupCreator.js +1 -232
  155. package/dist/components/questions/types/listen-and-choose-from-answer-group/index.js +1 -2
  156. package/dist/components/questions/types/listen-and-choose-from-answer-group/register.js +1 -82
  157. package/dist/components/questions/types/listen-and-choose-from-answer-group/transform.js +1 -27
  158. package/dist/components/questions/types/listen-and-choose-objects-in-scene/ListenAndChooseObjectsInSceneClient.js +1 -70
  159. package/dist/components/questions/types/listen-and-choose-objects-in-scene/ListenAndChooseObjectsInSceneCreator.js +1 -386
  160. package/dist/components/questions/types/listen-and-choose-objects-in-scene/index.js +1 -2
  161. package/dist/components/questions/types/listen-and-choose-objects-in-scene/register.js +1 -100
  162. package/dist/components/questions/types/listen-and-choose-objects-in-scene/transform.js +1 -33
  163. package/dist/components/questions/types/listen-and-drag-objects-into-scene/ListenAndDragObjectsIntoSceneClient.js +1 -106
  164. package/dist/components/questions/types/listen-and-drag-objects-into-scene/ListenAndDragObjectsIntoSceneCreator.js +1 -457
  165. package/dist/components/questions/types/listen-and-drag-objects-into-scene/index.js +1 -2
  166. package/dist/components/questions/types/listen-and-drag-objects-into-scene/register.js +1 -110
  167. package/dist/components/questions/types/listen-and-drag-objects-into-scene/transform.js +1 -35
  168. package/dist/components/questions/types/listen-and-speak-answer/ArrowIndicator.js +1 -8
  169. package/dist/components/questions/types/listen-and-speak-answer/ListenAndSpeakAnswerClient.js +1 -22
  170. package/dist/components/questions/types/listen-and-speak-answer/ListenAndSpeakAnswerCreator.js +1 -291
  171. package/dist/components/questions/types/listen-and-speak-answer/index.js +1 -2
  172. package/dist/components/questions/types/listen-and-speak-answer/register.js +1 -84
  173. package/dist/components/questions/types/listen-and-speak-answer/transform.js +1 -27
  174. package/dist/components/questions/types/listen-and-speak-compare-images/ListenAndSpeakCompareImagesClient.js +1 -32
  175. package/dist/components/questions/types/listen-and-speak-compare-images/ListenAndSpeakCompareImagesCreator.js +1 -295
  176. package/dist/components/questions/types/listen-and-speak-compare-images/register.js +1 -79
  177. package/dist/components/questions/types/listen-and-speak-compare-images/transform.js +1 -27
  178. package/dist/components/questions/types/listen-and-speak-image-group/ListenAndSpeakImageGroupClient.js +1 -34
  179. package/dist/components/questions/types/listen-and-speak-image-group/ListenAndSpeakImageGroupCreator.js +1 -285
  180. package/dist/components/questions/types/listen-and-speak-image-group/register.js +1 -81
  181. package/dist/components/questions/types/listen-and-speak-image-group/transform.js +1 -26
  182. package/dist/components/questions/types/listen-and-speak-info-exchange/ListenAndSpeakInfoExchangeClient.js +1 -38
  183. package/dist/components/questions/types/listen-and-speak-info-exchange/ListenAndSpeakInfoExchangeCreator.js +1 -385
  184. package/dist/components/questions/types/listen-and-speak-info-exchange/register.js +1 -87
  185. package/dist/components/questions/types/listen-and-speak-info-exchange/transform.js +1 -32
  186. package/dist/components/questions/types/listen-and-speak-odd-one-out/ListenAndSpeakOddOneOutClient.js +1 -26
  187. package/dist/components/questions/types/listen-and-speak-odd-one-out/ListenAndSpeakOddOneOutCreator.js +1 -247
  188. package/dist/components/questions/types/listen-and-speak-odd-one-out/register.js +1 -59
  189. package/dist/components/questions/types/listen-and-speak-odd-one-out/transform.js +1 -18
  190. package/dist/components/questions/types/listen-and-speak-question-list/ListenAndSpeakQuestionListClient.js +1 -26
  191. package/dist/components/questions/types/listen-and-speak-question-list/ListenAndSpeakQuestionListCreator.js +1 -256
  192. package/dist/components/questions/types/listen-and-speak-question-list/register.js +1 -81
  193. package/dist/components/questions/types/listen-and-speak-question-list/transform.js +1 -26
  194. package/dist/components/questions/types/listen-and-speak-with-story-images/ListenAndSpeakWithStoryImagesClient.js +1 -26
  195. package/dist/components/questions/types/listen-and-speak-with-story-images/ListenAndSpeakWithStoryImagesCreator.js +1 -230
  196. package/dist/components/questions/types/listen-and-speak-with-story-images/register.js +1 -56
  197. package/dist/components/questions/types/listen-and-speak-with-story-images/transform.js +1 -16
  198. package/dist/components/questions/types/look-picture-choose-correct-answer/LookPictureChooseCorrectAnswerClient.js +1 -72
  199. package/dist/components/questions/types/look-picture-choose-correct-answer/LookPictureChooseCorrectAnswerCreator.js +1 -230
  200. package/dist/components/questions/types/look-picture-choose-correct-answer/index.js +1 -1
  201. package/dist/components/questions/types/look-picture-choose-correct-answer/register.js +1 -66
  202. package/dist/components/questions/types/look-picture-choose-correct-answer/transform.js +1 -42
  203. package/dist/components/questions/types/look-picture-fill-blank-choose-answer/LookPictureFillBlankChooseAnswerClient.js +1 -96
  204. package/dist/components/questions/types/look-picture-fill-blank-choose-answer/LookPictureFillBlankChooseAnswerCreator.js +1 -238
  205. package/dist/components/questions/types/look-picture-fill-blank-choose-answer/index.js +1 -2
  206. package/dist/components/questions/types/look-picture-fill-blank-choose-answer/register.js +1 -76
  207. package/dist/components/questions/types/look-picture-fill-blank-choose-answer/transform.js +1 -19
  208. package/dist/components/questions/types/look-picture-fill-word-hint/LookPictureFillWordHintClient.js +1 -134
  209. package/dist/components/questions/types/look-picture-fill-word-hint/LookPictureFillWordHintCreator.js +1 -617
  210. package/dist/components/questions/types/look-picture-fill-word-hint/index.js +1 -2
  211. package/dist/components/questions/types/look-picture-fill-word-hint/register.js +1 -82
  212. package/dist/components/questions/types/look-picture-fill-word-hint/transform.js +1 -29
  213. package/dist/components/questions/types/match-by-writing-answer/MatchByWritingAnswerClient.js +1 -38
  214. package/dist/components/questions/types/match-by-writing-answer/MatchByWritingAnswerCreator.js +1 -359
  215. package/dist/components/questions/types/match-by-writing-answer/index.js +1 -3
  216. package/dist/components/questions/types/match-by-writing-answer/register.js +1 -58
  217. package/dist/components/questions/types/match-by-writing-answer/transform.js +1 -61
  218. package/dist/components/questions/types/read-and-color-objects/ReadAndColorObjectsClient.js +1 -16
  219. package/dist/components/questions/types/read-and-color-objects/ReadAndColorObjectsCreator.js +1 -23
  220. package/dist/components/questions/types/read-and-color-objects/index.js +1 -2
  221. package/dist/components/questions/types/read-and-color-objects/register.js +1 -3
  222. package/dist/components/questions/types/read-and-color-objects/transform.js +1 -36
  223. package/dist/components/questions/types/read-displayed-content/ReadDisplayedContentCreator.js +1 -125
  224. package/dist/components/questions/types/read-displayed-content/register.js +1 -64
  225. package/dist/components/questions/types/read-displayed-content/transform.js +1 -12
  226. package/dist/components/questions/types/read-passage-and-answer-questions/ReadPassageAndAnswerQuestionsClient.js +1 -64
  227. package/dist/components/questions/types/read-passage-and-answer-questions/ReadPassageAndAnswerQuestionsCreator.js +1 -511
  228. package/dist/components/questions/types/read-passage-and-answer-questions/index.js +1 -2
  229. package/dist/components/questions/types/read-passage-and-answer-questions/register.js +1 -58
  230. package/dist/components/questions/types/read-passage-and-answer-questions/transform.js +1 -28
  231. package/dist/components/questions/types/speaking-conversation/SpeakingConversationCreator.js +1 -373
  232. package/dist/components/questions/types/speaking-conversation/SpeakingConversationPreviewClient.js +1 -41
  233. package/dist/components/questions/types/speaking-conversation/register.js +1 -110
  234. package/dist/components/questions/types/speaking-conversation/transform.js +1 -34
  235. package/dist/components/questions/types/speaking-cue-card/SpeakingCueCardCreator.js +1 -74
  236. package/dist/components/questions/types/speaking-cue-card/register.js +1 -52
  237. package/dist/components/questions/types/speaking-cue-card/transform.js +1 -12
  238. package/dist/components/questions/types/speaking-describe-image/SpeakingDescribeImageClient.js +1 -10
  239. package/dist/components/questions/types/speaking-describe-image/SpeakingDescribeImageCreator.js +1 -161
  240. package/dist/components/questions/types/speaking-describe-image/index.js +1 -2
  241. package/dist/components/questions/types/speaking-describe-image/register.js +1 -69
  242. package/dist/components/questions/types/speaking-describe-image/transform.js +1 -16
  243. package/dist/components/questions/types/spontaneous-qa/SpontaneousQACreator.js +1 -234
  244. package/dist/components/questions/types/spontaneous-qa/register.js +1 -93
  245. package/dist/components/questions/types/spontaneous-qa/transform.js +1 -34
  246. package/dist/components/questions/types/true-false/TrueFalseClient.js +1 -75
  247. package/dist/components/questions/types/true-false/TrueFalseCreator.js +1 -244
  248. package/dist/components/questions/types/true-false/index.js +1 -2
  249. package/dist/components/questions/types/true-false/register.js +1 -77
  250. package/dist/components/questions/types/true-false/transform.js +1 -32
  251. package/dist/components/questions/types/word-fill-paragraph/WordFillParagraphClient.js +1 -233
  252. package/dist/components/questions/types/word-fill-paragraph/WordFillParagraphCreator.js +1 -631
  253. package/dist/components/questions/types/word-fill-paragraph/WordFillParagraphWrapper.js +1 -28
  254. package/dist/components/questions/types/word-fill-paragraph/index.js +1 -2
  255. package/dist/components/questions/types/word-fill-paragraph/register.js +1 -136
  256. package/dist/components/questions/types/word-fill-paragraph/transform.js +1 -56
  257. package/dist/components/questions/types/word-fill-structured-form/WordFillStructuredFormClient.js +1 -138
  258. package/dist/components/questions/types/word-fill-structured-form/WordFillStructuredFormCreator.js +1 -261
  259. package/dist/components/questions/types/word-fill-structured-form/index.js +1 -2
  260. package/dist/components/questions/types/word-fill-structured-form/register.js +1 -67
  261. package/dist/components/questions/types/word-fill-structured-form/transform.js +1 -40
  262. package/dist/components/questions/types/word-ordering/WordOrderingClient.js +1 -84
  263. package/dist/components/questions/types/word-ordering/WordOrderingCreator.js +1 -192
  264. package/dist/components/questions/types/word-ordering/index.js +1 -2
  265. package/dist/components/questions/types/word-ordering/register.js +1 -46
  266. package/dist/components/questions/types/word-ordering/transform.js +1 -24
  267. package/dist/components/questions/types/write-a-short-letter/WriteAShortLetterClient.js +1 -98
  268. package/dist/components/questions/types/write-a-short-letter/WriteAShortLetterCreator.js +1 -320
  269. package/dist/components/questions/types/write-a-short-letter/index.js +1 -2
  270. package/dist/components/questions/types/write-a-short-letter/register.js +1 -68
  271. package/dist/components/questions/types/write-a-short-letter/transform.js +1 -25
  272. package/dist/components/questions/types/write-correct-verb-form/WriteCorrectVerbFormClient.js +1 -61
  273. package/dist/components/questions/types/write-correct-verb-form/WriteCorrectVerbFormCreator.js +1 -196
  274. package/dist/components/questions/types/write-correct-verb-form/index.js +1 -2
  275. package/dist/components/questions/types/write-correct-verb-form/register.js +1 -62
  276. package/dist/components/questions/types/write-correct-verb-form/transform.js +1 -17
  277. package/dist/components/questions/types/write-sentences/WriteSentencesClient.js +1 -22
  278. package/dist/components/questions/types/write-sentences/WriteSentencesCreator.js +1 -174
  279. package/dist/components/questions/types/write-sentences/index.js +1 -2
  280. package/dist/components/questions/types/write-sentences/register.js +1 -58
  281. package/dist/components/questions/types/write-sentences/transform.js +1 -28
  282. package/dist/components/questions/types/write-short-paragraph/WriteShortParagraphClient.js +1 -96
  283. package/dist/components/questions/types/write-short-paragraph/WriteShortParagraphCreator.js +1 -161
  284. package/dist/components/questions/types/write-short-paragraph/index.js +1 -2
  285. package/dist/components/questions/types/write-short-paragraph/register.js +1 -4
  286. package/dist/components/questions/types/write-short-paragraph/transform.js +1 -21
  287. package/dist/components/questions/viewer/QuestionGroupViewer.js +1 -36
  288. package/dist/components/questions/viewer/QuestionViewer.js +1 -446
  289. package/dist/components/questions/viewer/index.js +1 -2
  290. package/dist/components/results/ResultReviewPageContainer.js +1 -98
  291. package/dist/components/results/ReviewQuestionRenderer.js +1 -72
  292. package/dist/components/results/index.js +1 -2
  293. package/dist/components/results/result-review.utils.js +1 -6
  294. package/dist/components/results/review-data.js +1 -150
  295. package/dist/components/results/review-renderer.utils.js +1 -97
  296. package/dist/components/results/review-types.js +1 -1
  297. package/dist/components/themes/cambridge-yle/CambridgeYleAudioPlayer.js +1 -138
  298. package/dist/components/themes/cambridge-yle/CambridgeYleBottomNav.js +1 -12
  299. package/dist/components/themes/cambridge-yle/CambridgeYleExamLayout.js +1 -18
  300. package/dist/components/themes/cambridge-yle/CambridgeYleExampleText.js +1 -11
  301. package/dist/components/themes/cambridge-yle/CambridgeYleHeader.js +1 -11
  302. package/dist/components/themes/cambridge-yle/CambridgeYleInstructionBanner.js +1 -9
  303. package/dist/components/themes/cambridge-yle/CambridgeYleNavButton.js +1 -13
  304. package/dist/components/themes/cambridge-yle/CambridgeYlePartBanner.js +1 -8
  305. package/dist/components/themes/cambridge-yle/CambridgeYleProgressBar.js +1 -6
  306. package/dist/components/themes/cambridge-yle/CambridgeYleQuestionCard.js +1 -5
  307. package/dist/components/themes/cambridge-yle/CambridgeYleQuestionCardFullWidth.js +1 -9
  308. package/dist/components/themes/cambridge-yle/CambridgeYleSidebar.js +1 -41
  309. package/dist/components/themes/cambridge-yle/CambridgeYleTimer.js +1 -25
  310. package/dist/components/themes/cambridge-yle/index.js +1 -13
  311. package/dist/components/themes/english-certification/EcAnswerTheQuestion.js +1 -24
  312. package/dist/components/themes/english-certification/EcMatchByWritingAnswer.js +1 -88
  313. package/dist/components/themes/english-certification/EcWordFillParagraph.js +1 -55
  314. package/dist/components/themes/english-certification/EcWordFillStructuredForm.js +1 -156
  315. package/dist/components/themes/english-certification/EcWritingTask.js +1 -34
  316. package/dist/components/themes/english-certification/EnglishCertificationAudioPlayer.js +1 -114
  317. package/dist/components/themes/english-certification/EnglishCertificationBrand.js +1 -11
  318. package/dist/components/themes/english-certification/EnglishCertificationExamLayout.js +1 -21
  319. package/dist/components/themes/english-certification/EnglishCertificationFlagButton.js +1 -15
  320. package/dist/components/themes/english-certification/EnglishCertificationFooterBar.js +1 -19
  321. package/dist/components/themes/english-certification/EnglishCertificationGroupedQuestion.js +1 -148
  322. package/dist/components/themes/english-certification/EnglishCertificationHeader.js +1 -31
  323. package/dist/components/themes/english-certification/EnglishCertificationNavigationPanel.js +1 -71
  324. package/dist/components/themes/english-certification/EnglishCertificationOptionSelector.js +1 -33
  325. package/dist/components/themes/english-certification/EnglishCertificationPassagePanel.js +1 -16
  326. package/dist/components/themes/english-certification/EnglishCertificationQuestionCard.js +1 -22
  327. package/dist/components/themes/english-certification/EnglishCertificationQuestionItem.js +1 -37
  328. package/dist/components/themes/english-certification/EnglishCertificationQuestionRenderer.js +1 -72
  329. package/dist/components/themes/english-certification/EnglishCertificationReadingSection.js +1 -90
  330. package/dist/components/themes/english-certification/EnglishCertificationSingleQuestion.js +1 -18
  331. package/dist/components/themes/english-certification/EnglishCertificationSingleQuestionList.js +1 -29
  332. package/dist/components/themes/english-certification/english-certification-theme.js +1 -58
  333. package/dist/components/themes/english-certification/grouped-question-utils.js +1 -218
  334. package/dist/components/themes/english-certification/index.js +1 -21
  335. package/dist/components/themes/index.js +1 -6
  336. package/dist/components/themes/summer-sky/SummerSkyAudioPlayer.js +1 -170
  337. package/dist/components/themes/summer-sky/SummerSkyLayout.js +1 -221
  338. package/dist/components/themes/summer-sky/SummerSkySubmitModal.js +1 -18
  339. package/dist/components/themes/summer-sky/SummerSkyWaitingRoom.js +1 -194
  340. package/dist/components/themes/types.js +1 -1
  341. package/dist/components/ui/alert-dialog.js +1 -26
  342. package/dist/components/ui/alert.js +1 -22
  343. package/dist/components/ui/avatar.js +1 -12
  344. package/dist/components/ui/badge.js +1 -38
  345. package/dist/components/ui/button.js +1 -35
  346. package/dist/components/ui/calendar.js +1 -76
  347. package/dist/components/ui/card.js +1 -16
  348. package/dist/components/ui/carousel.js +1 -91
  349. package/dist/components/ui/checkbox.js +1 -9
  350. package/dist/components/ui/collapsible.js +1 -13
  351. package/dist/components/ui/command.js +1 -34
  352. package/dist/components/ui/confirm-dialog.js +1 -49
  353. package/dist/components/ui/dialog.js +1 -23
  354. package/dist/components/ui/drawer.js +1 -35
  355. package/dist/components/ui/dropdown-menu.js +1 -33
  356. package/dist/components/ui/file-upload.js +1 -155
  357. package/dist/components/ui/form.js +1 -62
  358. package/dist/components/ui/hover-card.js +1 -10
  359. package/dist/components/ui/image-preview.js +1 -29
  360. package/dist/components/ui/input.js +1 -8
  361. package/dist/components/ui/label.js +1 -9
  362. package/dist/components/ui/language-switcher.js +1 -15
  363. package/dist/components/ui/multi-select.js +1 -90
  364. package/dist/components/ui/points-input.js +1 -33
  365. package/dist/components/ui/popover.js +1 -26
  366. package/dist/components/ui/progress.js +1 -16
  367. package/dist/components/ui/radio-group.js +1 -12
  368. package/dist/components/ui/scroll-area.js +1 -11
  369. package/dist/components/ui/select.js +1 -38
  370. package/dist/components/ui/separator.js +1 -8
  371. package/dist/components/ui/sheet.js +1 -40
  372. package/dist/components/ui/single-select.js +1 -76
  373. package/dist/components/ui/skeleton.js +1 -6
  374. package/dist/components/ui/switch.js +1 -8
  375. package/dist/components/ui/table.js +1 -20
  376. package/dist/components/ui/tabs.js +1 -17
  377. package/dist/components/ui/textarea.js +1 -8
  378. package/dist/components/ui/tooltip.js +1 -11
  379. package/dist/index.js +1 -19
  380. package/dist/mcp/config.js +1 -32
  381. package/dist/mcp/http-client.js +1 -48
  382. package/dist/mcp/index.js +1 -29
  383. package/dist/mcp/tools/_helpers.js +1 -25
  384. package/dist/mcp/tools/exams.js +1 -439
  385. package/dist/mcp/tools/index.js +1 -6
  386. package/dist/mcp/tools/results.js +1 -19
  387. package/dist/shared/constants/ApiConstant.js +1 -276
  388. package/dist/shared/constants/QueryKeyConstant.js +1 -112
  389. package/dist/shared/constants/exam-level.enum.js +1 -41
  390. package/dist/shared/constants/landings/placement-test.constants.js +1 -431
  391. package/dist/shared/constants/question-skills.js +1 -267
  392. package/dist/shared/constants/routes.js +1 -81
  393. package/dist/shared/index.js +1 -7
  394. package/dist/shared/lib/hooks/index.js +1 -10
  395. package/dist/shared/lib/hooks/useAlertDialog.js +1 -57
  396. package/dist/shared/lib/hooks/useAudioPlayCounter.js +1 -30
  397. package/dist/shared/lib/hooks/useAudioPreview.js +1 -81
  398. package/dist/shared/lib/hooks/useAudioUpload.js +1 -24
  399. package/dist/shared/lib/hooks/useConfirmDialog.js +1 -89
  400. package/dist/shared/lib/hooks/useDebouncedCallback.js +1 -32
  401. package/dist/shared/lib/hooks/useDelayedAutoPlay.js +1 -12
  402. package/dist/shared/lib/hooks/useFileUpload.js +1 -24
  403. package/dist/shared/lib/hooks/useImageUrl.js +1 -5
  404. package/dist/shared/lib/hooks/usePresignedFileUrl.js +1 -10
  405. package/dist/shared/lib/hooks/useReactHookForm.js +1 -31
  406. package/dist/shared/lib/hooks/useToast.js +1 -62
  407. package/dist/shared/lib/i18n/index.js +1 -54
  408. package/dist/shared/lib/i18n/messages/en/admin.js +1 -2104
  409. package/dist/shared/lib/i18n/messages/en/auth.js +1 -86
  410. package/dist/shared/lib/i18n/messages/en/common.js +1 -140
  411. package/dist/shared/lib/i18n/messages/en/file-upload.js +1 -18
  412. package/dist/shared/lib/i18n/messages/en/student.js +1 -133
  413. package/dist/shared/lib/i18n/messages/en/terms.js +1 -37
  414. package/dist/shared/lib/i18n/messages/en.js +1 -15
  415. package/dist/shared/lib/i18n/messages/vi/admin.js +1 -2104
  416. package/dist/shared/lib/i18n/messages/vi/auth.js +1 -86
  417. package/dist/shared/lib/i18n/messages/vi/common.js +1 -140
  418. package/dist/shared/lib/i18n/messages/vi/file-upload.js +1 -18
  419. package/dist/shared/lib/i18n/messages/vi/student.js +1 -133
  420. package/dist/shared/lib/i18n/messages/vi/terms.js +1 -37
  421. package/dist/shared/lib/i18n/messages/vi.js +1 -15
  422. package/dist/shared/lib/i18n/types.js +1 -1
  423. package/dist/shared/lib/stores/examQuestionStore.js +1 -212
  424. package/dist/shared/lib/stores/localeStore.js +1 -10
  425. package/dist/shared/lib/utils/public-page.js +1 -44
  426. package/dist/shared/lib/utils/question-transform-types.js +1 -1
  427. package/dist/shared/lib/utils/question-transform.js +1 -174
  428. package/dist/shared/lib/utils.js +1 -168
  429. package/dist/shared/lib/validation/choose-correct-answer.validation.js +1 -111
  430. package/dist/shared/lib/validation/label-the-picture.validation.js +1 -19
  431. package/dist/shared/lib/validation/listen-and-choose-from-answer-group.validation.js +1 -46
  432. package/dist/shared/lib/validation/listen-and-choose-objects-in-scene.validation.js +1 -21
  433. package/dist/shared/lib/validation/listen-and-drag-objects-into-scene.validation.js +1 -34
  434. package/dist/shared/lib/validation/listen-and-speak-answer.validation.js +1 -40
  435. package/dist/shared/lib/validation/listen-and-speak-compare-images.validation.js +1 -45
  436. package/dist/shared/lib/validation/listen-and-speak-image-group.validation.js +1 -19
  437. package/dist/shared/lib/validation/listen-and-speak-info-exchange.validation.js +1 -39
  438. package/dist/shared/lib/validation/listen-and-speak-odd-one-out.validation.js +1 -32
  439. package/dist/shared/lib/validation/listen-and-speak-question-list.validation.js +1 -19
  440. package/dist/shared/lib/validation/listen-and-speak-with-story-images.validation.js +1 -28
  441. package/dist/shared/lib/validation/look-picture-choose-correct-answer.validation.js +1 -12
  442. package/dist/shared/lib/validation/look-picture-fill-blank-choose-answer.validation.js +1 -47
  443. package/dist/shared/lib/validation/read-and-color-objects.validation.js +1 -29
  444. package/dist/shared/lib/validation/read-displayed-content.validation.js +1 -28
  445. package/dist/shared/lib/validation/speaking-conversation.validation.js +1 -75
  446. package/dist/shared/lib/validation/speaking-describe-image.validation.js +1 -31
  447. package/dist/shared/lib/validation/spontaneous-qa.validation.js +1 -48
  448. package/dist/shared/lib/validation/word-fill-paragraph-default.validation.js +1 -38
  449. package/dist/shared/lib/validation/word-fill-paragraph-with-options.validation.js +1 -39
  450. package/dist/shared/lib/validation/word-fill-paragraph.validation.js +1 -43
  451. package/dist/shared/lib/validation/word-ordering.validation.js +1 -33
  452. package/dist/shared/types/branch.types.js +1 -6
  453. package/dist/shared/types/common.types.js +1 -50
  454. package/dist/shared/types/entities/exam-schedule.types.js +1 -5
  455. package/dist/shared/types/entities/exam.types.js +1 -1
  456. package/dist/shared/types/entities/question.types.js +1 -4
  457. package/dist/shared/types/entities/result.types.js +1 -4
  458. package/dist/shared/types/entities/user.types.js +1 -4
  459. package/dist/shared/types/exam-taking.types.js +1 -2
  460. package/dist/shared/types/history.types.js +1 -34
  461. package/dist/shared/types/index.js +1 -1
  462. package/dist/shared/types/questions/choose-correct-adjective.js +1 -4
  463. package/dist/shared/types/questions/choose-the-correct-answer.js +1 -9
  464. package/dist/shared/types/questions/fill-missing-words-in-grid.js +1 -11
  465. package/dist/shared/types/questions/index.js +1 -40
  466. package/dist/shared/types/questions/listen-and-speak-answer.js +1 -1
  467. package/dist/shared/types/questions/listen-and-speak-compare-images.js +1 -1
  468. package/dist/shared/types/questions/listen-and-speak-image-group.js +1 -1
  469. package/dist/shared/types/questions/listen-and-speak-info-exchange.js +1 -3
  470. package/dist/shared/types/questions/listen-and-speak-odd-one-out.js +1 -3
  471. package/dist/shared/types/questions/listen-and-speak-question-list.js +1 -1
  472. package/dist/shared/types/questions/listen-and-speak-with-story-images.js +1 -3
  473. package/dist/shared/types/questions/look-picture-choose-correct-answer.js +1 -5
  474. package/dist/shared/types/questions/look-picture-fill-blank-choose-answer.js +1 -9
  475. package/dist/shared/types/questions/look-picture-fill-word-hint.js +1 -7
  476. package/dist/shared/types/questions/read-displayed-content.js +1 -1
  477. package/dist/shared/types/questions/speaking-conversation.js +1 -7
  478. package/dist/shared/types/questions/speaking-describe-image.js +1 -1
  479. package/dist/shared/types/questions/spontaneous-qa.js +1 -1
  480. package/dist/shared/types/questions/write-correct-verb-form.js +1 -12
  481. package/dist/shared/types/role.types.js +1 -1
  482. package/dist/shared/types/structure-management.js +1 -28
  483. package/dist/shared/types/student.types.js +1 -54
  484. package/dist/shared/types/teacher-dashboard-rooms.js +1 -2
  485. package/package.json +4 -2
@@ -1,38 +1 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from 'class-variance-authority';
3
- import { cn } from '../../shared/lib/utils';
4
- /**
5
- * Badge Component - Mantis Dashboard Style
6
- * Design: Dark text on light background (same color family)
7
- * Border radius: 4px (rounded, not rounded-full)
8
- * No border by default
9
- */
10
- const badgeVariants = cva('inline-flex items-center rounded px-2 py-0.5 text-xs font-medium transition-colors border-0', {
11
- variants: {
12
- variant: {
13
- // Default - Blue (Ant Design style)
14
- default: 'bg-blue-50 text-blue-700 hover:bg-blue-100',
15
- // Success - Green (Ant Design #52C41A family)
16
- success: 'bg-green-50 text-green-700 hover:bg-green-100',
17
- // Warning - Gold/Orange (Ant Design #FAAD14 family)
18
- warning: 'bg-orange-50 text-orange-700 hover:bg-orange-100',
19
- // Error/Destructive - Red (Ant Design #F5222D family)
20
- destructive: 'bg-red-50 text-red-700 hover:bg-red-100',
21
- // Info - Cyan (Ant Design #13C2C2 family)
22
- info: 'bg-cyan-50 text-cyan-700 hover:bg-cyan-100',
23
- // Secondary - Gray
24
- secondary: 'bg-gray-100 text-gray-600 hover:bg-gray-200',
25
- // Outline - for special cases
26
- outline: 'border border-gray-300 bg-transparent text-gray-700 hover:bg-gray-50',
27
- // Dark - for special emphasis (like Teacher role)
28
- dark: 'bg-gray-800 text-white hover:bg-gray-900',
29
- },
30
- },
31
- defaultVariants: {
32
- variant: 'default',
33
- },
34
- });
35
- function Badge({ className, variant, ...props }) {
36
- return _jsx("div", { className: cn(badgeVariants({ variant }), className), ...props });
37
- }
38
- export { Badge, badgeVariants };
1
+ import{jsx as r}from"react/jsx-runtime";import{cva as e}from"class-variance-authority";import{cn as t}from"../../shared/lib/utils";const a=e("inline-flex items-center rounded px-2 py-0.5 text-xs font-medium transition-colors border-0",{variants:{variant:{default:"bg-blue-50 text-blue-700 hover:bg-blue-100",success:"bg-green-50 text-green-700 hover:bg-green-100",warning:"bg-orange-50 text-orange-700 hover:bg-orange-100",destructive:"bg-red-50 text-red-700 hover:bg-red-100",info:"bg-cyan-50 text-cyan-700 hover:bg-cyan-100",secondary:"bg-gray-100 text-gray-600 hover:bg-gray-200",outline:"border border-gray-300 bg-transparent text-gray-700 hover:bg-gray-50",dark:"bg-gray-800 text-white hover:bg-gray-900"}},defaultVariants:{variant:"default"}});function n({className:e,variant:n,...o}){return r("div",{className:t(a({variant:n}),e),...o})}export{n as Badge,a as badgeVariants};
@@ -1,35 +1 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from "class-variance-authority";
3
- import { Slot } from "radix-ui";
4
- import { cn } from "../../shared/lib/utils";
5
- const buttonVariants = cva("inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/20 focus-visible:ring-offset-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
6
- variants: {
7
- variant: {
8
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
9
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
10
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
11
- secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
- ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
13
- link: "text-primary underline-offset-4 hover:underline",
14
- },
15
- size: {
16
- default: "h-9 px-4 py-2 has-[>svg]:px-3",
17
- xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
18
- sm: "h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",
19
- lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
20
- icon: "size-10",
21
- "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
22
- "icon-sm": "size-8",
23
- "icon-lg": "size-10",
24
- },
25
- },
26
- defaultVariants: {
27
- variant: "default",
28
- size: "default",
29
- },
30
- });
31
- function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
32
- const Comp = asChild ? Slot.Root : "button";
33
- return (_jsx(Comp, { "data-slot": "button", "data-variant": variant, "data-size": size, className: cn(buttonVariants({ variant, size, className })), ...props }));
34
- }
35
- export { Button, buttonVariants };
1
+ import{jsx as e}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import{Slot as i}from"radix-ui";import{cn as t}from"../../shared/lib/utils";const s=r("inline-flex shrink-0 cursor-pointer items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/20 focus-visible:ring-offset-0 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-10","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function a({className:r,variant:a="default",size:n="default",asChild:o=!1,...d}){const c=o?i.Root:"button";return e(c,{"data-slot":"button","data-variant":a,"data-size":n,className:t(s({variant:a,size:n,className:r})),...d})}export{a as Button,s as buttonVariants};
@@ -1,76 +1 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react";
5
- import { DayPicker, getDefaultClassNames, } from "react-day-picker";
6
- import { cn } from "../../shared/lib/utils";
7
- import { Button, buttonVariants } from "../../components/ui/button";
8
- function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, ...props }) {
9
- const defaultClassNames = getDefaultClassNames();
10
- return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
11
- formatMonthDropdown: (date) => date.toLocaleString("default", { month: "short" }),
12
- ...formatters,
13
- }, classNames: {
14
- root: cn("w-fit", defaultClassNames.root),
15
- months: cn("flex gap-4 flex-col md:flex-row relative", defaultClassNames.months),
16
- month: cn("flex flex-col w-full gap-4", defaultClassNames.month),
17
- nav: cn("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between", defaultClassNames.nav),
18
- button_previous: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_previous),
19
- button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) aria-disabled:opacity-50 p-0 select-none", defaultClassNames.button_next),
20
- month_caption: cn("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)", defaultClassNames.month_caption),
21
- dropdowns: cn("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5", defaultClassNames.dropdowns),
22
- dropdown_root: cn("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/20 has-focus:ring-[3px] has-focus:ring-offset-0 rounded-md", defaultClassNames.dropdown_root),
23
- dropdown: cn("absolute bg-popover inset-0 opacity-0", defaultClassNames.dropdown),
24
- caption_label: cn("select-none font-medium", captionLayout === "label"
25
- ? "text-sm"
26
- : "rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5", defaultClassNames.caption_label),
27
- table: "w-full border-collapse",
28
- weekdays: cn("flex", defaultClassNames.weekdays),
29
- weekday: cn("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none", defaultClassNames.weekday),
30
- week: cn("flex w-full mt-2", defaultClassNames.week),
31
- week_number_header: cn("select-none w-(--cell-size)", defaultClassNames.week_number_header),
32
- week_number: cn("text-[0.8rem] select-none text-muted-foreground", defaultClassNames.week_number),
33
- day: cn("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none", props.showWeekNumber
34
- ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
35
- : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),
36
- range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start),
37
- range_middle: cn("rounded-none", defaultClassNames.range_middle),
38
- range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
39
- today: cn("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none", defaultClassNames.today),
40
- outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
41
- disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
42
- hidden: cn("invisible", defaultClassNames.hidden),
43
- ...classNames,
44
- }, components: {
45
- Root: ({ className, rootRef, ...props }) => {
46
- return (_jsx("div", { "data-slot": "calendar", ref: rootRef, className: cn(className), ...props }));
47
- },
48
- Chevron: ({ className, orientation, ...props }) => {
49
- if (orientation === "left") {
50
- return (_jsx(ChevronLeftIcon, { className: cn("size-4", className), ...props }));
51
- }
52
- if (orientation === "right") {
53
- return (_jsx(ChevronRightIcon, { className: cn("size-4", className), ...props }));
54
- }
55
- return (_jsx(ChevronDownIcon, { className: cn("size-4", className), ...props }));
56
- },
57
- DayButton: CalendarDayButton,
58
- WeekNumber: ({ children, ...props }) => {
59
- return (_jsx("td", { ...props, children: _jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children: children }) }));
60
- },
61
- ...components,
62
- }, ...props }));
63
- }
64
- function CalendarDayButton({ className, day, modifiers, ...props }) {
65
- const defaultClassNames = getDefaultClassNames();
66
- const ref = React.useRef(null);
67
- React.useEffect(() => {
68
- if (modifiers.focused)
69
- ref.current?.focus();
70
- }, [modifiers.focused]);
71
- return (_jsx(Button, { ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
72
- !modifiers.range_start &&
73
- !modifiers.range_end &&
74
- !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/20 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-offset-0 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className), ...props }));
75
- }
76
- export { Calendar, CalendarDayButton };
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as t from"react";import{ChevronDownIcon as r,ChevronLeftIcon as a,ChevronRightIcon as n}from"lucide-react";import{DayPicker as d,getDefaultClassNames as o}from"react-day-picker";import{cn as s}from"../../shared/lib/utils";import{Button as l,buttonVariants as u}from"../../components/ui/button";function i({className:t,classNames:l,showOutsideDays:i=!0,captionLayout:m="label",buttonVariant:g="ghost",formatters:f,components:p,...b}){const x=o();return e(d,{showOutsideDays:i,className:s("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,t),captionLayout:m,formatters:{formatMonthDropdown:e=>e.toLocaleString("default",{month:"short"}),...f},classNames:{root:s("w-fit",x.root),months:s("flex gap-4 flex-col md:flex-row relative",x.months),month:s("flex flex-col w-full gap-4",x.month),nav:s("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",x.nav),button_previous:s(u({variant:g}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",x.button_previous),button_next:s(u({variant:g}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",x.button_next),month_caption:s("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",x.month_caption),dropdowns:s("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",x.dropdowns),dropdown_root:s("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/20 has-focus:ring-[3px] has-focus:ring-offset-0 rounded-md",x.dropdown_root),dropdown:s("absolute bg-popover inset-0 opacity-0",x.dropdown),caption_label:s("select-none font-medium","label"===m?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",x.caption_label),table:"w-full border-collapse",weekdays:s("flex",x.weekdays),weekday:s("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",x.weekday),week:s("flex w-full mt-2",x.week),week_number_header:s("select-none w-(--cell-size)",x.week_number_header),week_number:s("text-[0.8rem] select-none text-muted-foreground",x.week_number),day:s("relative w-full h-full p-0 text-center [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",b.showWeekNumber?"[&:nth-child(2)[data-selected=true]_button]:rounded-l-md":"[&:first-child[data-selected=true]_button]:rounded-l-md",x.day),range_start:s("rounded-l-md bg-accent",x.range_start),range_middle:s("rounded-none",x.range_middle),range_end:s("rounded-r-md bg-accent",x.range_end),today:s("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",x.today),outside:s("text-muted-foreground aria-selected:text-muted-foreground",x.outside),disabled:s("text-muted-foreground opacity-50",x.disabled),hidden:s("invisible",x.hidden),...l},components:{Root:({className:t,rootRef:r,...a})=>e("div",{"data-slot":"calendar",ref:r,className:s(t),...a}),Chevron:({className:t,orientation:d,...o})=>e("left"===d?a:"right"===d?n:r,{className:s("size-4",t),...o}),DayButton:c,WeekNumber:({children:t,...r})=>e("td",{...r,children:e("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:t})}),...p},...b})}function c({className:r,day:a,modifiers:n,...d}){const u=o(),i=t.useRef(null);return t.useEffect(()=>{n.focused&&i.current?.focus()},[n.focused]),e(l,{ref:i,variant:"ghost",size:"icon","data-day":a.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:s("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/20 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-offset-0 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",u.day,r),...d})}export{i as Calendar,c as CalendarDayButton};
@@ -1,16 +1 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import * as React from 'react';
3
- import { cn } from '../../shared/lib/utils';
4
- const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('bg-card text-card-foreground rounded-lg border shadow-sm', className), ...props })));
5
- Card.displayName = 'Card';
6
- const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex flex-col space-y-1.5 p-6', className), ...props })));
7
- CardHeader.displayName = 'CardHeader';
8
- const CardTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-xl leading-none font-semibold tracking-tight', className), ...props })));
9
- CardTitle.displayName = 'CardTitle';
10
- const CardDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
11
- CardDescription.displayName = 'CardDescription';
12
- const CardContent = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('p-6 pt-0', className), ...props })));
13
- CardContent.displayName = 'CardContent';
14
- const CardFooter = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('flex items-center p-6 pt-0', className), ...props })));
15
- CardFooter.displayName = 'CardFooter';
16
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
1
+ import{jsx as a}from"react/jsx-runtime";import*as e from"react";import{cn as r}from"../../shared/lib/utils";const s=e.forwardRef(({className:e,...s},d)=>a("div",{ref:d,className:r("bg-card text-card-foreground rounded-lg border shadow-sm",e),...s}));s.displayName="Card";const d=e.forwardRef(({className:e,...s},d)=>a("div",{ref:d,className:r("flex flex-col space-y-1.5 p-6",e),...s}));d.displayName="CardHeader";const t=e.forwardRef(({className:e,...s},d)=>a("div",{ref:d,className:r("text-xl leading-none font-semibold tracking-tight",e),...s}));t.displayName="CardTitle";const o=e.forwardRef(({className:e,...s},d)=>a("div",{ref:d,className:r("text-muted-foreground text-sm",e),...s}));o.displayName="CardDescription";const m=e.forwardRef(({className:e,...s},d)=>a("div",{ref:d,className:r("p-6 pt-0",e),...s}));m.displayName="CardContent";const l=e.forwardRef(({className:e,...s},d)=>a("div",{ref:d,className:r("flex items-center p-6 pt-0",e),...s}));l.displayName="CardFooter";export{s as Card,d as CardHeader,l as CardFooter,t as CardTitle,o as CardDescription,m as CardContent};
@@ -1,91 +1 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from "react";
4
- import useEmblaCarousel from "embla-carousel-react";
5
- import { ArrowLeft, ArrowRight } from "lucide-react";
6
- import { cn } from "../../shared/lib/utils";
7
- import { Button } from "../../components/ui/button";
8
- const CarouselContext = React.createContext(null);
9
- function useCarousel() {
10
- const context = React.useContext(CarouselContext);
11
- if (!context) {
12
- throw new Error("useCarousel must be used within a <Carousel />");
13
- }
14
- return context;
15
- }
16
- function Carousel({ orientation = "horizontal", opts, setApi, plugins, className, children, ...props }) {
17
- const [carouselRef, api] = useEmblaCarousel({
18
- ...opts,
19
- axis: orientation === "horizontal" ? "x" : "y",
20
- }, plugins);
21
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
22
- const [canScrollNext, setCanScrollNext] = React.useState(false);
23
- const onSelect = React.useCallback((api) => {
24
- if (!api)
25
- return;
26
- setCanScrollPrev(api.canScrollPrev());
27
- setCanScrollNext(api.canScrollNext());
28
- }, []);
29
- const scrollPrev = React.useCallback(() => {
30
- api?.scrollPrev();
31
- }, [api]);
32
- const scrollNext = React.useCallback(() => {
33
- api?.scrollNext();
34
- }, [api]);
35
- const handleKeyDown = React.useCallback((event) => {
36
- if (event.key === "ArrowLeft") {
37
- event.preventDefault();
38
- scrollPrev();
39
- }
40
- else if (event.key === "ArrowRight") {
41
- event.preventDefault();
42
- scrollNext();
43
- }
44
- }, [scrollPrev, scrollNext]);
45
- React.useEffect(() => {
46
- if (!api || !setApi)
47
- return;
48
- setApi(api);
49
- }, [api, setApi]);
50
- React.useEffect(() => {
51
- if (!api)
52
- return;
53
- onSelect(api);
54
- api.on("reInit", onSelect);
55
- api.on("select", onSelect);
56
- return () => {
57
- api?.off("select", onSelect);
58
- };
59
- }, [api, onSelect]);
60
- return (_jsx(CarouselContext.Provider, { value: {
61
- carouselRef,
62
- api: api,
63
- opts,
64
- orientation: orientation || (opts?.axis === "y" ? "vertical" : "horizontal"),
65
- scrollPrev,
66
- scrollNext,
67
- canScrollPrev,
68
- canScrollNext,
69
- }, children: _jsx("div", { onKeyDownCapture: handleKeyDown, className: cn("relative", className), role: "region", "aria-roledescription": "carousel", "data-slot": "carousel", ...props, children: children }) }));
70
- }
71
- function CarouselContent({ className, ...props }) {
72
- const { carouselRef, orientation } = useCarousel();
73
- return (_jsx("div", { ref: carouselRef, className: "overflow-hidden", "data-slot": "carousel-content", children: _jsx("div", { className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className), ...props }) }));
74
- }
75
- function CarouselItem({ className, ...props }) {
76
- const { orientation } = useCarousel();
77
- return (_jsx("div", { role: "group", "aria-roledescription": "slide", "data-slot": "carousel-item", className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className), ...props }));
78
- }
79
- function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
80
- const { orientation, scrollPrev, canScrollPrev } = useCarousel();
81
- return (_jsxs(Button, { "data-slot": "carousel-previous", variant: variant, size: size, className: cn("absolute size-8 rounded-full", orientation === "horizontal"
82
- ? "top-1/2 -left-12 -translate-y-1/2"
83
- : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollPrev, onClick: scrollPrev, ...props, children: [_jsx(ArrowLeft, {}), _jsx("span", { className: "sr-only", children: "Previous slide" })] }));
84
- }
85
- function CarouselNext({ className, variant = "outline", size = "icon", ...props }) {
86
- const { orientation, scrollNext, canScrollNext } = useCarousel();
87
- return (_jsxs(Button, { "data-slot": "carousel-next", variant: variant, size: size, className: cn("absolute size-8 rounded-full", orientation === "horizontal"
88
- ? "top-1/2 -right-12 -translate-y-1/2"
89
- : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className), disabled: !canScrollNext, onClick: scrollNext, ...props, children: [_jsx(ArrowRight, {}), _jsx("span", { className: "sr-only", children: "Next slide" })] }));
90
- }
91
- export { Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import*as o from"react";import r from"embla-carousel-react";import{ArrowLeft as l,ArrowRight as a}from"lucide-react";import{cn as s}from"../../shared/lib/utils";import{Button as n}from"../../components/ui/button";const i=o.createContext(null);function c(){const e=o.useContext(i);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function u({orientation:t="horizontal",opts:l,setApi:a,plugins:n,className:c,children:u,...d}){const[f,m]=r({...l,axis:"horizontal"===t?"x":"y"},n),[p,v]=o.useState(!1),[h,x]=o.useState(!1),N=o.useCallback(e=>{e&&(v(e.canScrollPrev()),x(e.canScrollNext()))},[]),b=o.useCallback(()=>{m?.scrollPrev()},[m]),z=o.useCallback(()=>{m?.scrollNext()},[m]),C=o.useCallback(e=>{"ArrowLeft"===e.key?(e.preventDefault(),b()):"ArrowRight"===e.key&&(e.preventDefault(),z())},[b,z]);return o.useEffect(()=>{m&&a&&a(m)},[m,a]),o.useEffect(()=>{if(m)return N(m),m.on("reInit",N),m.on("select",N),()=>{m?.off("select",N)}},[m,N]),e(i.Provider,{value:{carouselRef:f,api:m,opts:l,orientation:t||("y"===l?.axis?"vertical":"horizontal"),scrollPrev:b,scrollNext:z,canScrollPrev:p,canScrollNext:h},children:e("div",{onKeyDownCapture:C,className:s("relative",c),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...d,children:u})})}function d({className:t,...o}){const{carouselRef:r,orientation:l}=c();return e("div",{ref:r,className:"overflow-hidden","data-slot":"carousel-content",children:e("div",{className:s("flex","horizontal"===l?"-ml-4":"-mt-4 flex-col",t),...o})})}function f({className:t,...o}){const{orientation:r}=c();return e("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:s("min-w-0 shrink-0 grow-0 basis-full","horizontal"===r?"pl-4":"pt-4",t),...o})}function m({className:o,variant:r="outline",size:a="icon",...i}){const{orientation:u,scrollPrev:d,canScrollPrev:f}=c();return t(n,{"data-slot":"carousel-previous",variant:r,size:a,className:s("absolute size-8 rounded-full","horizontal"===u?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",o),disabled:!f,onClick:d,...i,children:[e(l,{}),e("span",{className:"sr-only",children:"Previous slide"})]})}function p({className:o,variant:r="outline",size:l="icon",...i}){const{orientation:u,scrollNext:d,canScrollNext:f}=c();return t(n,{"data-slot":"carousel-next",variant:r,size:l,className:s("absolute size-8 rounded-full","horizontal"===u?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",o),disabled:!f,onClick:d,...i,children:[e(a,{}),e("span",{className:"sr-only",children:"Next slide"})]})}export{u as Carousel,d as CarouselContent,f as CarouselItem,m as CarouselPrevious,p as CarouselNext};
@@ -1,9 +1 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
4
- import { CheckIcon } from 'lucide-react';
5
- import { cn } from '../../shared/lib/utils';
6
- function Checkbox({ className, ...props }) {
7
- return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn('peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "flex items-center justify-center text-current transition-none", children: _jsx(CheckIcon, { className: "size-3.5" }) }) }));
8
- }
9
- export { Checkbox };
1
+ "use client";import{jsx as e}from"react/jsx-runtime";import*as r from"@radix-ui/react-checkbox";import{CheckIcon as i}from"lucide-react";import{cn as a}from"../../shared/lib/utils";function t({className:t,...s}){return e(r.Root,{"data-slot":"checkbox",className:a("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e(r.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:e(i,{className:"size-3.5"})})})}export{t as Checkbox};
@@ -1,13 +1 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
4
- function Collapsible({ ...props }) {
5
- return _jsx(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
6
- }
7
- function CollapsibleTrigger({ ...props }) {
8
- return _jsx(CollapsiblePrimitive.CollapsibleTrigger, { "data-slot": "collapsible-trigger", ...props });
9
- }
10
- function CollapsibleContent({ ...props }) {
11
- return _jsx(CollapsiblePrimitive.CollapsibleContent, { "data-slot": "collapsible-content", ...props });
12
- }
13
- export { Collapsible, CollapsibleTrigger, CollapsibleContent };
1
+ "use client";import{jsx as t}from"react/jsx-runtime";import*as l from"@radix-ui/react-collapsible";function o({...o}){return t(l.Root,{"data-slot":"collapsible",...o})}function e({...o}){return t(l.CollapsibleTrigger,{"data-slot":"collapsible-trigger",...o})}function r({...o}){return t(l.CollapsibleContent,{"data-slot":"collapsible-content",...o})}export{o as Collapsible,e as CollapsibleTrigger,r as CollapsibleContent};
@@ -1,34 +1 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Command as CommandPrimitive } from "cmdk";
4
- import { SearchIcon } from "lucide-react";
5
- import { cn } from "../../shared/lib/utils";
6
- import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "../../components/ui/dialog";
7
- function Command({ className, ...props }) {
8
- return (_jsx(CommandPrimitive, { "data-slot": "command", className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className), ...props }));
9
- }
10
- function CommandDialog({ title = "Command Palette", description = "Search for a command to run...", children, className, showCloseButton = true, ...props }) {
11
- return (_jsxs(Dialog, { ...props, children: [_jsxs(DialogHeader, { className: "sr-only", children: [_jsx(DialogTitle, { children: title }), _jsx(DialogDescription, { children: description })] }), _jsx(DialogContent, { className: cn("overflow-hidden p-0", className), children: _jsx(Command, { className: "**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: children }) })] }));
12
- }
13
- function CommandInput({ className, ...props }) {
14
- return (_jsxs("div", { "data-slot": "command-input-wrapper", className: "flex h-9 items-center gap-2 border-b px-3", children: [_jsx(SearchIcon, { className: "size-4 shrink-0 opacity-50" }), _jsx(CommandPrimitive.Input, { "data-slot": "command-input", className: cn("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className), ...props })] }));
15
- }
16
- function CommandList({ className, ...props }) {
17
- return (_jsx(CommandPrimitive.List, { "data-slot": "command-list", className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className), ...props }));
18
- }
19
- function CommandEmpty({ ...props }) {
20
- return (_jsx(CommandPrimitive.Empty, { "data-slot": "command-empty", className: "py-6 text-center text-sm", ...props }));
21
- }
22
- function CommandGroup({ className, ...props }) {
23
- return (_jsx(CommandPrimitive.Group, { "data-slot": "command-group", className: cn("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className), ...props }));
24
- }
25
- function CommandSeparator({ className, ...props }) {
26
- return (_jsx(CommandPrimitive.Separator, { "data-slot": "command-separator", className: cn("-mx-1 h-px bg-border", className), ...props }));
27
- }
28
- function CommandItem({ className, ...props }) {
29
- return (_jsx(CommandPrimitive.Item, { "data-slot": "command-item", className: cn("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", className), ...props }));
30
- }
31
- function CommandShortcut({ className, ...props }) {
32
- return (_jsx("span", { "data-slot": "command-shortcut", className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className), ...props }));
33
- }
34
- export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
1
+ "use client";import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Command as a}from"cmdk";import{SearchIcon as o}from"lucide-react";import{cn as r}from"../../shared/lib/utils";import{Dialog as d,DialogContent as n,DialogDescription as s,DialogHeader as m,DialogTitle as c}from"../../components/ui/dialog";function l({className:t,...o}){return e(a,{"data-slot":"command",className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...o})}function i({title:a="Command Palette",description:o="Search for a command to run...",children:i,className:u,showCloseButton:p=!0,...g}){return t(d,{...g,children:[t(m,{className:"sr-only",children:[e(c,{children:a}),e(s,{children:o})]}),e(n,{className:r("overflow-hidden p-0",u),children:e(l,{className:"**:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:i})})]})}function u({className:d,...n}){return t("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[e(o,{className:"size-4 shrink-0 opacity-50"}),e(a.Input,{"data-slot":"command-input",className:r("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",d),...n})]})}function p({className:t,...o}){return e(a.List,{"data-slot":"command-list",className:r("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...o})}function g({...t}){return e(a.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function f({className:t,...o}){return e(a.Group,{"data-slot":"command-group",className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...o})}function h({className:t,...o}){return e(a.Separator,{"data-slot":"command-separator",className:r("-mx-1 h-px bg-border",t),...o})}function x({className:t,...o}){return e(a.Item,{"data-slot":"command-item",className:r("relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",t),...o})}function _({className:t,...a}){return e("span",{"data-slot":"command-shortcut",className:r("ml-auto text-xs tracking-widest text-muted-foreground",t),...a})}export{l as Command,i as CommandDialog,u as CommandInput,p as CommandList,g as CommandEmpty,f as CommandGroup,x as CommandItem,_ as CommandShortcut,h as CommandSeparator};
@@ -1,49 +1 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState } from 'react';
4
- import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, } from '../../components/ui/alert-dialog';
5
- export function ConfirmDialog({ open, onOpenChange, title, description, confirmText = 'Xác nhận', cancelText = 'Hủy', variant = 'default', onConfirm, onCancel, }) {
6
- return (_jsx(AlertDialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: title }), _jsx(AlertDialogDescription, { children: description })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { onClick: () => {
7
- onCancel?.();
8
- onOpenChange(false);
9
- }, children: cancelText }), _jsx(AlertDialogAction, { onClick: () => {
10
- onConfirm();
11
- onOpenChange(false);
12
- }, className: variant === 'destructive'
13
- ? 'bg-red-600 text-white hover:bg-red-700'
14
- : 'bg-blue-600 text-white hover:bg-blue-700', children: confirmText })] })] }) }));
15
- }
16
- // Hook for easier usage
17
- export function useConfirm() {
18
- const [state, setState] = useState({
19
- open: false,
20
- title: '',
21
- description: '',
22
- onConfirm: () => { },
23
- });
24
- const confirm = ({ title, description, confirmText, cancelText, variant, }) => {
25
- return new Promise((resolve) => {
26
- setState({
27
- open: true,
28
- title,
29
- description,
30
- confirmText,
31
- cancelText,
32
- variant,
33
- onConfirm: () => {
34
- resolve(true);
35
- },
36
- onCancel: () => {
37
- resolve(false);
38
- },
39
- });
40
- });
41
- };
42
- const ConfirmDialogComponent = () => (_jsx(ConfirmDialog, { open: state.open, onOpenChange: (open) => {
43
- if (!open) {
44
- state.onCancel?.();
45
- }
46
- setState((prev) => ({ ...prev, open }));
47
- }, title: state.title, description: state.description, confirmText: state.confirmText, cancelText: state.cancelText, variant: state.variant, onConfirm: state.onConfirm, onCancel: state.onCancel }));
48
- return { confirm, ConfirmDialog: ConfirmDialogComponent };
49
- }
1
+ "use client";import{jsx as n,jsxs as e}from"react/jsx-runtime";import{useState as i}from"react";import{AlertDialog as o,AlertDialogAction as t,AlertDialogCancel as r,AlertDialogContent as c,AlertDialogDescription as l,AlertDialogFooter as a,AlertDialogHeader as m,AlertDialogTitle as p}from"../../components/ui/alert-dialog";export function ConfirmDialog({open:i,onOpenChange:f,title:s,description:d,confirmText:C="Xác nhận",cancelText:x="Hủy",variant:h="default",onConfirm:u,onCancel:g}){return n(o,{open:i,onOpenChange:f,children:e(c,{children:[e(m,{children:[n(p,{children:s}),n(l,{children:d})]}),e(a,{children:[n(r,{onClick:()=>{g?.(),f(!1)},children:x}),n(t,{onClick:()=>{u(),f(!1)},className:"destructive"===h?"bg-red-600 text-white hover:bg-red-700":"bg-blue-600 text-white hover:bg-blue-700",children:C})]})]})})}export function useConfirm(){const[e,o]=i({open:!1,title:"",description:"",onConfirm:()=>{}});return{confirm:({title:n,description:e,confirmText:i,cancelText:t,variant:r})=>new Promise(c=>{o({open:!0,title:n,description:e,confirmText:i,cancelText:t,variant:r,onConfirm:()=>{c(!0)},onCancel:()=>{c(!1)}})}),ConfirmDialog:()=>n(ConfirmDialog,{open:e.open,onOpenChange:n=>{n||e.onCancel?.(),o(e=>({...e,open:n}))},title:e.title,description:e.description,confirmText:e.confirmText,cancelText:e.cancelText,variant:e.variant,onConfirm:e.onConfirm,onCancel:e.onCancel})}}
@@ -1,23 +1 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from 'react';
4
- import * as DialogPrimitive from '@radix-ui/react-dialog';
5
- import { X } from 'lucide-react';
6
- import { cn } from '../../shared/lib/utils';
7
- const Dialog = DialogPrimitive.Root;
8
- const DialogTrigger = DialogPrimitive.Trigger;
9
- const DialogPortal = DialogPrimitive.Portal;
10
- const DialogClose = DialogPrimitive.Close;
11
- const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300', className), ...props })));
12
- DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
13
- const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-300 will-change-[transform,opacity] sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-ring/20 focus:ring-[3px] focus:ring-offset-0 focus:outline-none disabled:pointer-events-none", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
14
- DialogContent.displayName = DialogPrimitive.Content.displayName;
15
- const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
16
- DialogHeader.displayName = 'DialogHeader';
17
- const DialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className), ...props }));
18
- DialogFooter.displayName = 'DialogFooter';
19
- const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn('text-lg leading-none font-semibold tracking-tight', className), ...props })));
20
- DialogTitle.displayName = DialogPrimitive.Title.displayName;
21
- const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn('text-muted-foreground text-sm', className), ...props })));
22
- DialogDescription.displayName = DialogPrimitive.Description.displayName;
23
- export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
1
+ "use client";import{jsx as a,jsxs as e}from"react/jsx-runtime";import*as t from"react";import*as s from"@radix-ui/react-dialog";import{X as o}from"lucide-react";import{cn as l}from"../../shared/lib/utils";const i=s.Root,r=s.Trigger,n=s.Portal,d=s.Close,c=t.forwardRef(({className:e,...t},o)=>a(s.Overlay,{ref:o,className:l("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300",e),...t}));c.displayName=s.Overlay.displayName;const m=t.forwardRef(({className:t,children:i,...r},d)=>e(n,{children:[a(c,{}),e(s.Content,{ref:d,className:l("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-300 will-change-[transform,opacity] sm:rounded-lg",t),...r,children:[i,e(s.Close,{className:"data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-ring/20 focus:ring-[3px] focus:ring-offset-0 focus:outline-none disabled:pointer-events-none",children:[a(o,{className:"h-4 w-4"}),a("span",{className:"sr-only",children:"Close"})]})]})]}));m.displayName=s.Content.displayName;const f=({className:e,...t})=>a("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});f.displayName="DialogHeader";const p=({className:e,...t})=>a("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});p.displayName="DialogFooter";const u=t.forwardRef(({className:e,...t},o)=>a(s.Title,{ref:o,className:l("text-lg leading-none font-semibold tracking-tight",e),...t}));u.displayName=s.Title.displayName;const g=t.forwardRef(({className:e,...t},o)=>a(s.Description,{ref:o,className:l("text-muted-foreground text-sm",e),...t}));g.displayName=s.Description.displayName;export{i as Dialog,n as DialogPortal,c as DialogOverlay,d as DialogClose,r as DialogTrigger,m as DialogContent,f as DialogHeader,p as DialogFooter,u as DialogTitle,g as DialogDescription};
@@ -1,35 +1 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Drawer as DrawerPrimitive } from 'vaul';
4
- import { cn } from '../../shared/lib/utils';
5
- function Drawer({ ...props }) {
6
- return _jsx(DrawerPrimitive.Root, { "data-slot": "drawer", ...props });
7
- }
8
- function DrawerTrigger({ ...props }) {
9
- return _jsx(DrawerPrimitive.Trigger, { "data-slot": "drawer-trigger", ...props });
10
- }
11
- function DrawerPortal({ ...props }) {
12
- return _jsx(DrawerPrimitive.Portal, { "data-slot": "drawer-portal", ...props });
13
- }
14
- function DrawerClose({ ...props }) {
15
- return _jsx(DrawerPrimitive.Close, { "data-slot": "drawer-close", ...props });
16
- }
17
- function DrawerOverlay({ className, ...props }) {
18
- return (_jsx(DrawerPrimitive.Overlay, { "data-slot": "drawer-overlay", className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50', className), ...props }));
19
- }
20
- function DrawerContent({ className, children, ...props }) {
21
- return (_jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [_jsx(DrawerOverlay, {}), _jsxs(DrawerPrimitive.Content, { "data-slot": "drawer-content", className: cn('group/drawer-content bg-background fixed z-50 flex h-auto flex-col', 'data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b', 'data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t', 'data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm', 'data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm', className), ...props, children: [_jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), children] })] }));
22
- }
23
- function DrawerHeader({ className, ...props }) {
24
- return (_jsx("div", { "data-slot": "drawer-header", className: cn('flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left', className), ...props }));
25
- }
26
- function DrawerFooter({ className, ...props }) {
27
- return (_jsx("div", { "data-slot": "drawer-footer", className: cn('mt-auto flex flex-col gap-2 p-4', className), ...props }));
28
- }
29
- function DrawerTitle({ className, ...props }) {
30
- return (_jsx(DrawerPrimitive.Title, { "data-slot": "drawer-title", className: cn('text-foreground font-semibold', className), ...props }));
31
- }
32
- function DrawerDescription({ className, ...props }) {
33
- return (_jsx(DrawerPrimitive.Description, { "data-slot": "drawer-description", className: cn('text-muted-foreground text-sm', className), ...props }));
34
- }
35
- export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
1
+ "use client";import{jsx as t,jsxs as a}from"react/jsx-runtime";import{Drawer as r}from"vaul";import{cn as e}from"../../shared/lib/utils";function d({...a}){return t(r.Root,{"data-slot":"drawer",...a})}function o({...a}){return t(r.Trigger,{"data-slot":"drawer-trigger",...a})}function i({...a}){return t(r.Portal,{"data-slot":"drawer-portal",...a})}function n({...a}){return t(r.Close,{"data-slot":"drawer-close",...a})}function l({className:a,...d}){return t(r.Overlay,{"data-slot":"drawer-overlay",className:e("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...d})}function c({className:d,children:o,...n}){return a(i,{"data-slot":"drawer-portal",children:[t(l,{}),a(r.Content,{"data-slot":"drawer-content",className:e("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",d),...n,children:[t("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),o]})]})}function s({className:a,...r}){return t("div",{"data-slot":"drawer-header",className:e("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left",a),...r})}function u({className:a,...r}){return t("div",{"data-slot":"drawer-footer",className:e("mt-auto flex flex-col gap-2 p-4",a),...r})}function m({className:a,...d}){return t(r.Title,{"data-slot":"drawer-title",className:e("text-foreground font-semibold",a),...d})}function w({className:a,...d}){return t(r.Description,{"data-slot":"drawer-description",className:e("text-muted-foreground text-sm",a),...d})}export{d as Drawer,i as DrawerPortal,l as DrawerOverlay,o as DrawerTrigger,n as DrawerClose,c as DrawerContent,s as DrawerHeader,u as DrawerFooter,m as DrawerTitle,w as DrawerDescription};
@@ -1,33 +1 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from 'react';
4
- import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
- import { Check, ChevronRight, Circle } from 'lucide-react';
6
- import { cn } from '../../shared/lib/utils';
7
- const DropdownMenu = DropdownMenuPrimitive.Root;
8
- const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
9
- const DropdownMenuGroup = DropdownMenuPrimitive.Group;
10
- const DropdownMenuPortal = DropdownMenuPrimitive.Portal;
11
- const DropdownMenuSub = DropdownMenuPrimitive.Sub;
12
- const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
13
- const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.SubTrigger, { ref: ref, className: cn('focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none', inset && 'pl-8', className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto h-4 w-4" })] })));
14
- DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
15
- const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.SubContent, { ref: ref, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg', className), ...props })));
16
- DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
17
- const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Portal, { children: _jsx(DropdownMenuPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md', className), ...props }) })));
18
- DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
19
- const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Item, { ref: ref, className: cn('focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50', inset && 'pl-8', className), ...props })));
20
- DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
21
- const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.CheckboxItem, { ref: ref, className: cn('focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), checked: checked, ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Check, { className: "h-4 w-4" }) }) }), children] })));
22
- DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
23
- const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DropdownMenuPrimitive.RadioItem, { ref: ref, className: cn('focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50', className), ...props, children: [_jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: _jsx(DropdownMenuPrimitive.ItemIndicator, { children: _jsx(Circle, { className: "h-2 w-2 fill-current" }) }) }), children] })));
24
- DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
25
- const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Label, { ref: ref, className: cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className), ...props })));
26
- DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
27
- const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => (_jsx(DropdownMenuPrimitive.Separator, { ref: ref, className: cn('bg-muted -mx-1 my-1 h-px', className), ...props })));
28
- DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
29
- const DropdownMenuShortcut = ({ className, ...props }) => {
30
- return (_jsx("span", { className: cn('ml-auto text-xs tracking-widest opacity-60', className), ...props }));
31
- };
32
- DropdownMenuShortcut.displayName = 'DropdownMenuShortcut';
33
- export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
1
+ "use client";import{jsx as e,jsxs as a}from"react/jsx-runtime";import*as t from"react";import*as s from"@radix-ui/react-dropdown-menu";import{Check as o,ChevronRight as d,Circle as r}from"lucide-react";import{cn as n}from"../../shared/lib/utils";const i=s.Root,l=s.Trigger,c=s.Group,m=s.Portal,f=s.Sub,p=s.RadioGroup,u=t.forwardRef(({className:t,inset:o,children:r,...i},l)=>a(s.SubTrigger,{ref:l,className:n("focus:bg-accent data-[state=open]:bg-accent flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none",o&&"pl-8",t),...i,children:[r,e(d,{className:"ml-auto h-4 w-4"})]}));u.displayName=s.SubTrigger.displayName;const N=t.forwardRef(({className:a,...t},o)=>e(s.SubContent,{ref:o,className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg",a),...t}));N.displayName=s.SubContent.displayName;const b=t.forwardRef(({className:a,sideOffset:t=4,...o},d)=>e(s.Portal,{children:e(s.Content,{ref:d,sideOffset:t,className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md",a),...o})}));b.displayName=s.Content.displayName;const h=t.forwardRef(({className:a,inset:t,...o},d)=>e(s.Item,{ref:d,className:n("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",a),...o}));h.displayName=s.Item.displayName;const x=t.forwardRef(({className:t,children:d,checked:r,...i},l)=>a(s.CheckboxItem,{ref:l,className:n("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:r,...i,children:[e("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e(s.ItemIndicator,{children:e(o,{className:"h-4 w-4"})})}),d]}));x.displayName=s.CheckboxItem.displayName;const y=t.forwardRef(({className:t,children:o,...d},i)=>a(s.RadioItem,{ref:i,className:n("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center rounded-sm py-1.5 pr-2 pl-8 text-sm transition-colors outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...d,children:[e("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e(s.ItemIndicator,{children:e(r,{className:"h-2 w-2 fill-current"})})}),o]}));y.displayName=s.RadioItem.displayName;const g=t.forwardRef(({className:a,inset:t,...o},d)=>e(s.Label,{ref:d,className:n("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",a),...o}));g.displayName=s.Label.displayName;const w=t.forwardRef(({className:a,...t},o)=>e(s.Separator,{ref:o,className:n("bg-muted -mx-1 my-1 h-px",a),...t}));w.displayName=s.Separator.displayName;const v=({className:a,...t})=>e("span",{className:n("ml-auto text-xs tracking-widest opacity-60",a),...t});v.displayName="DropdownMenuShortcut";export{i as DropdownMenu,l as DropdownMenuTrigger,b as DropdownMenuContent,h as DropdownMenuItem,x as DropdownMenuCheckboxItem,y as DropdownMenuRadioItem,g as DropdownMenuLabel,w as DropdownMenuSeparator,v as DropdownMenuShortcut,c as DropdownMenuGroup,m as DropdownMenuPortal,f as DropdownMenuSub,N as DropdownMenuSubContent,u as DropdownMenuSubTrigger,p as DropdownMenuRadioGroup};