@minutemailer/kit 0.2.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/components/ui/alert.d.ts +9 -0
  2. package/components/ui/alert.js +24 -0
  3. package/components/ui/avatar.d.ts +6 -0
  4. package/components/ui/avatar.js +13 -0
  5. package/components/ui/button.d.ts +10 -0
  6. package/components/ui/button.js +31 -0
  7. package/components/ui/checkbox.d.ts +4 -0
  8. package/components/ui/checkbox.js +9 -0
  9. package/components/ui/dropdown-menu.d.ts +25 -0
  10. package/components/ui/dropdown-menu.js +50 -0
  11. package/components/ui/input.d.ts +3 -0
  12. package/components/ui/input.js +6 -0
  13. package/components/ui/label.d.ts +4 -0
  14. package/components/ui/label.js +8 -0
  15. package/components/ui/separator.d.ts +4 -0
  16. package/components/ui/separator.js +7 -0
  17. package/components/ui/sheet.d.ts +13 -0
  18. package/components/ui/sheet.js +40 -0
  19. package/components/ui/sidebar.d.ts +69 -0
  20. package/components/ui/sidebar.js +222 -0
  21. package/components/ui/skeleton.d.ts +2 -0
  22. package/components/ui/skeleton.js +6 -0
  23. package/components/ui/sonner.d.ts +3 -0
  24. package/components/ui/sonner.js +12 -0
  25. package/components/ui/tooltip.d.ts +7 -0
  26. package/components/ui/tooltip.js +16 -0
  27. package/hooks/use-mobile.d.ts +1 -0
  28. package/hooks/use-mobile.js +15 -0
  29. package/icons/Alert.d.ts +1 -1
  30. package/icons/AlertFilled.d.ts +1 -1
  31. package/icons/Arrow.d.ts +1 -1
  32. package/icons/ArrowDown.d.ts +1 -1
  33. package/icons/Attachment.d.ts +1 -1
  34. package/icons/Automate.d.ts +1 -1
  35. package/icons/Bold.d.ts +1 -1
  36. package/icons/BorderBottom.d.ts +1 -1
  37. package/icons/BorderLeft.d.ts +1 -1
  38. package/icons/BorderRight.d.ts +1 -1
  39. package/icons/BorderTop.d.ts +1 -1
  40. package/icons/BottomAlign.d.ts +1 -1
  41. package/icons/BottomLeftCorner.d.ts +1 -1
  42. package/icons/BottomRightCorner.d.ts +1 -1
  43. package/icons/Button.d.ts +1 -1
  44. package/icons/Calendar.d.ts +1 -1
  45. package/icons/Center.d.ts +1 -1
  46. package/icons/Check.d.ts +1 -1
  47. package/icons/CheckFilled.d.ts +1 -1
  48. package/icons/Checkmark.d.ts +1 -1
  49. package/icons/Chevron.d.ts +1 -1
  50. package/icons/ChevronDown.d.ts +1 -1
  51. package/icons/ChevronLeft.d.ts +1 -1
  52. package/icons/ChevronUp.d.ts +1 -1
  53. package/icons/Close.d.ts +1 -1
  54. package/icons/CloseBold.d.ts +1 -1
  55. package/icons/CloseCircle.d.ts +1 -1
  56. package/icons/Column1.d.ts +1 -1
  57. package/icons/Column12.d.ts +1 -1
  58. package/icons/Column13.d.ts +1 -1
  59. package/icons/Column2.d.ts +1 -1
  60. package/icons/Column21.d.ts +1 -1
  61. package/icons/Column3.d.ts +1 -1
  62. package/icons/Column31.d.ts +1 -1
  63. package/icons/Column4.d.ts +1 -1
  64. package/icons/Contacts.d.ts +1 -1
  65. package/icons/Crop.d.ts +1 -1
  66. package/icons/Divider.d.ts +1 -1
  67. package/icons/Download.d.ts +1 -1
  68. package/icons/Duplicate.d.ts +1 -1
  69. package/icons/Email.d.ts +1 -1
  70. package/icons/Feedback.d.ts +1 -1
  71. package/icons/File.d.ts +1 -1
  72. package/icons/Filter.d.ts +1 -1
  73. package/icons/Flip.d.ts +1 -1
  74. package/icons/Flop.d.ts +1 -1
  75. package/icons/Form.d.ts +1 -1
  76. package/icons/Gift.d.ts +1 -1
  77. package/icons/HeartRound.d.ts +1 -1
  78. package/icons/Home.d.ts +1 -1
  79. package/icons/HorisontalCenter.d.ts +1 -1
  80. package/icons/Image.d.ts +1 -1
  81. package/icons/Images.d.ts +1 -1
  82. package/icons/Info.d.ts +1 -1
  83. package/icons/Integrations.d.ts +1 -1
  84. package/icons/Italics.d.ts +1 -1
  85. package/icons/Justified.d.ts +1 -1
  86. package/icons/Left.d.ts +1 -1
  87. package/icons/LeftAlign.d.ts +1 -1
  88. package/icons/LetterSpacing.d.ts +1 -1
  89. package/icons/LineHeight.d.ts +1 -1
  90. package/icons/LineThickness.d.ts +1 -1
  91. package/icons/Link.d.ts +1 -1
  92. package/icons/List.d.ts +1 -1
  93. package/icons/ListMenu.d.ts +1 -1
  94. package/icons/ListNumbered.d.ts +1 -1
  95. package/icons/Location.d.ts +1 -1
  96. package/icons/LockChain.d.ts +1 -1
  97. package/icons/Locked.d.ts +1 -1
  98. package/icons/Logo.d.ts +1 -1
  99. package/icons/Logout.d.ts +1 -1
  100. package/icons/Lowercase.d.ts +1 -1
  101. package/icons/Magic.d.ts +1 -1
  102. package/icons/MarginBottom.d.ts +1 -1
  103. package/icons/MarginLeft.d.ts +1 -1
  104. package/icons/MarginRight.d.ts +1 -1
  105. package/icons/MarginTop.d.ts +1 -1
  106. package/icons/Menu.d.ts +1 -1
  107. package/icons/Minus.d.ts +1 -1
  108. package/icons/MinusBold.d.ts +1 -1
  109. package/icons/More.d.ts +1 -1
  110. package/icons/Move.d.ts +1 -1
  111. package/icons/MoveDirections.d.ts +1 -1
  112. package/icons/MoveVertical.d.ts +1 -1
  113. package/icons/Openclose.d.ts +1 -1
  114. package/icons/Pen.d.ts +1 -1
  115. package/icons/Phone.d.ts +1 -1
  116. package/icons/Plane.d.ts +1 -1
  117. package/icons/PlaneOutline.d.ts +1 -1
  118. package/icons/Plus.d.ts +1 -1
  119. package/icons/PlusBold.d.ts +1 -1
  120. package/icons/PlusCircle.d.ts +1 -1
  121. package/icons/Result.d.ts +1 -1
  122. package/icons/Right.d.ts +1 -1
  123. package/icons/RightAlign.d.ts +1 -1
  124. package/icons/Rotate.d.ts +1 -1
  125. package/icons/Search.d.ts +1 -1
  126. package/icons/Settings.d.ts +1 -1
  127. package/icons/Sms.d.ts +1 -1
  128. package/icons/Spacing.d.ts +1 -1
  129. package/icons/Spinner.d.ts +1 -1
  130. package/icons/StarFilled.d.ts +1 -1
  131. package/icons/StarOutline.d.ts +1 -1
  132. package/icons/Stars.d.ts +1 -1
  133. package/icons/Stats.d.ts +1 -1
  134. package/icons/Stop.d.ts +1 -1
  135. package/icons/Strikethrough.d.ts +1 -1
  136. package/icons/Support.d.ts +1 -1
  137. package/icons/Tags.d.ts +1 -1
  138. package/icons/Team.d.ts +1 -1
  139. package/icons/Text.d.ts +1 -1
  140. package/icons/Thumbsdown.d.ts +1 -1
  141. package/icons/Thumbsup.d.ts +1 -1
  142. package/icons/TopAlign.d.ts +1 -1
  143. package/icons/TopLeftCorner.d.ts +1 -1
  144. package/icons/TopRightCorner.d.ts +1 -1
  145. package/icons/Trash.d.ts +1 -1
  146. package/icons/Underscore.d.ts +1 -1
  147. package/icons/Unlink.d.ts +1 -1
  148. package/icons/UnlockChain.d.ts +1 -1
  149. package/icons/Unlocked.d.ts +1 -1
  150. package/icons/Upload.d.ts +1 -1
  151. package/icons/Uppercase.d.ts +1 -1
  152. package/icons/VerticalCenter.d.ts +1 -1
  153. package/icons/Video.d.ts +1 -1
  154. package/icons/Warning.d.ts +1 -1
  155. package/icons/Website.d.ts +1 -1
  156. package/icons/Width.d.ts +1 -1
  157. package/icons/Write.d.ts +1 -1
  158. package/icons/index.d.ts +129 -129
  159. package/icons/index.js.map +1 -1
  160. package/package.json +68 -43
  161. package/state/index.js +3 -1
  162. package/state/index.js.map +2 -2
  163. package/state/index.test.js +15 -7
  164. package/store/index.js.map +1 -1
  165. package/store/useSelector.d.ts +1 -1
  166. package/store/useSelector.js +1 -1
  167. package/stories/Alert.stories.d.ts +12 -0
  168. package/stories/Alert.stories.js +29 -0
  169. package/stories/Button.stories.d.ts +17 -0
  170. package/stories/Button.stories.js +61 -0
  171. package/stories/Checkbox.stories.d.ts +14 -0
  172. package/stories/Checkbox.stories.js +37 -0
  173. package/stories/Input.stories.d.ts +14 -0
  174. package/stories/Input.stories.js +31 -0
  175. package/stories/Label.stories.d.ts +9 -0
  176. package/stories/Label.stories.js +12 -0
  177. package/stories/Separator.stories.d.ts +10 -0
  178. package/stories/Separator.stories.js +13 -0
  179. package/stories/Sidebar.stories.d.ts +9 -0
  180. package/stories/Sidebar.stories.js +53 -0
  181. package/stories/Skeleton.stories.d.ts +9 -0
  182. package/stories/Skeleton.stories.js +10 -0
  183. package/stories/Sonner.stories.d.ts +11 -0
  184. package/stories/Sonner.stories.js +22 -0
  185. package/stories/Todo.js +11 -7
  186. package/stories/Tooltip.stories.d.ts +9 -0
  187. package/stories/Tooltip.stories.js +11 -0
  188. package/stories/TrafficLights.js +5 -5
  189. package/utils/utils.d.ts +2 -0
  190. package/utils/utils.js +5 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/icons/index.ts"],
4
- "sourcesContent": ["export { default as Alert } from \"./Alert\";\nexport { default as AlertFilled } from \"./AlertFilled\";\nexport { default as Arrow } from \"./Arrow\";\nexport { default as ArrowDown } from \"./ArrowDown\";\nexport { default as Attachment } from \"./Attachment\";\nexport { default as Automate } from \"./Automate\";\nexport { default as Bold } from \"./Bold\";\nexport { default as BorderBottom } from \"./BorderBottom\";\nexport { default as BorderLeft } from \"./BorderLeft\";\nexport { default as BorderRight } from \"./BorderRight\";\nexport { default as BorderTop } from \"./BorderTop\";\nexport { default as BottomAlign } from \"./BottomAlign\";\nexport { default as BottomLeftCorner } from \"./BottomLeftCorner\";\nexport { default as BottomRightCorner } from \"./BottomRightCorner\";\nexport { default as Button } from \"./Button\";\nexport { default as Calendar } from \"./Calendar\";\nexport { default as Center } from \"./Center\";\nexport { default as Check } from \"./Check\";\nexport { default as CheckFilled } from \"./CheckFilled\";\nexport { default as Checkmark } from \"./Checkmark\";\nexport { default as Chevron } from \"./Chevron\";\nexport { default as ChevronDown } from \"./ChevronDown\";\nexport { default as ChevronLeft } from \"./ChevronLeft\";\nexport { default as ChevronUp } from \"./ChevronUp\";\nexport { default as Close } from \"./Close\";\nexport { default as CloseBold } from \"./CloseBold\";\nexport { default as CloseCircle } from \"./CloseCircle\";\nexport { default as Column1 } from \"./Column1\";\nexport { default as Column12 } from \"./Column12\";\nexport { default as Column13 } from \"./Column13\";\nexport { default as Column2 } from \"./Column2\";\nexport { default as Column21 } from \"./Column21\";\nexport { default as Column3 } from \"./Column3\";\nexport { default as Column31 } from \"./Column31\";\nexport { default as Column4 } from \"./Column4\";\nexport { default as Contacts } from \"./Contacts\";\nexport { default as Crop } from \"./Crop\";\nexport { default as Divider } from \"./Divider\";\nexport { default as Download } from \"./Download\";\nexport { default as Duplicate } from \"./Duplicate\";\nexport { default as Email } from \"./Email\";\nexport { default as Feedback } from \"./Feedback\";\nexport { default as File } from \"./File\";\nexport { default as Filter } from \"./Filter\";\nexport { default as Flip } from \"./Flip\";\nexport { default as Flop } from \"./Flop\";\nexport { default as Form } from \"./Form\";\nexport { default as Gift } from \"./Gift\";\nexport { default as HeartRound } from \"./HeartRound\";\nexport { default as Home } from \"./Home\";\nexport { default as HorisontalCenter } from \"./HorisontalCenter\";\nexport { default as Image } from \"./Image\";\nexport { default as Images } from \"./Images\";\nexport { default as Info } from \"./Info\";\nexport { default as Integrations } from \"./Integrations\";\nexport { default as Italics } from \"./Italics\";\nexport { default as Justified } from \"./Justified\";\nexport { default as LeftAlign } from \"./LeftAlign\";\nexport { default as Left } from \"./Left\";\nexport { default as LetterSpacing } from \"./LetterSpacing\";\nexport { default as LineHeight } from \"./LineHeight\";\nexport { default as LineThickness } from \"./LineThickness\";\nexport { default as Link } from \"./Link\";\nexport { default as List } from \"./List\";\nexport { default as ListMenu } from \"./ListMenu\";\nexport { default as ListNumbered } from \"./ListNumbered\";\nexport { default as Location } from \"./Location\";\nexport { default as LockChain } from \"./LockChain\";\nexport { default as Locked } from \"./Locked\";\nexport { default as Logo } from \"./Logo\";\nexport { default as Logout } from \"./Logout\";\nexport { default as Lowercase } from \"./Lowercase\";\nexport { default as Magic } from \"./Magic\";\nexport { default as MarginBottom } from \"./MarginBottom\";\nexport { default as MarginLeft } from \"./MarginLeft\";\nexport { default as MarginRight } from \"./MarginRight\";\nexport { default as MarginTop } from \"./MarginTop\";\nexport { default as Menu } from \"./Menu\";\nexport { default as Minus } from \"./Minus\";\nexport { default as MinusBold } from \"./MinusBold\";\nexport { default as More } from \"./More\";\nexport { default as Move } from \"./Move\";\nexport { default as MoveDirections } from \"./MoveDirections\";\nexport { default as MoveVertical } from \"./MoveVertical\";\nexport { default as Openclose } from \"./Openclose\";\nexport { default as Pen } from \"./Pen\";\nexport { default as Phone } from \"./Phone\";\nexport { default as Plane } from \"./Plane\";\nexport { default as PlaneOutline } from \"./PlaneOutline\";\nexport { default as Plus } from \"./Plus\";\nexport { default as PlusBold } from \"./PlusBold\";\nexport { default as PlusCircle } from \"./PlusCircle\";\nexport { default as Result } from \"./Result\";\nexport { default as RightAlign } from \"./RightAlign\";\nexport { default as Right } from \"./Right\";\nexport { default as Rotate } from \"./Rotate\";\nexport { default as Search } from \"./Search\";\nexport { default as Settings } from \"./Settings\";\nexport { default as Sms } from \"./Sms\";\nexport { default as Spacing } from \"./Spacing\";\nexport { default as Spinner } from \"./Spinner\";\nexport { default as StarFilled } from \"./StarFilled\";\nexport { default as StarOutline } from \"./StarOutline\";\nexport { default as Stars } from \"./Stars\";\nexport { default as Stats } from \"./Stats\";\nexport { default as Stop } from \"./Stop\";\nexport { default as Strikethrough } from \"./Strikethrough\";\nexport { default as Support } from \"./Support\";\nexport { default as Tags } from \"./Tags\";\nexport { default as Team } from \"./Team\";\nexport { default as Text } from \"./Text\";\nexport { default as Thumbsdown } from \"./Thumbsdown\";\nexport { default as Thumbsup } from \"./Thumbsup\";\nexport { default as TopAlign } from \"./TopAlign\";\nexport { default as TopLeftCorner } from \"./TopLeftCorner\";\nexport { default as TopRightCorner } from \"./TopRightCorner\";\nexport { default as Trash } from \"./Trash\";\nexport { default as Underscore } from \"./Underscore\";\nexport { default as Unlink } from \"./Unlink\";\nexport { default as UnlockChain } from \"./UnlockChain\";\nexport { default as Unlocked } from \"./Unlocked\";\nexport { default as Upload } from \"./Upload\";\nexport { default as Uppercase } from \"./Uppercase\";\nexport { default as VerticalCenter } from \"./VerticalCenter\";\nexport { default as Video } from \"./Video\";\nexport { default as Warning } from \"./Warning\";\nexport { default as Website } from \"./Website\";\nexport { default as Width } from \"./Width\";\nexport { default as Write } from \"./Write\";\n"],
4
+ "sourcesContent": ["export { default as Alert } from './Alert';\nexport { default as AlertFilled } from './AlertFilled';\nexport { default as Arrow } from './Arrow';\nexport { default as ArrowDown } from './ArrowDown';\nexport { default as Attachment } from './Attachment';\nexport { default as Automate } from './Automate';\nexport { default as Bold } from './Bold';\nexport { default as BorderBottom } from './BorderBottom';\nexport { default as BorderLeft } from './BorderLeft';\nexport { default as BorderRight } from './BorderRight';\nexport { default as BorderTop } from './BorderTop';\nexport { default as BottomAlign } from './BottomAlign';\nexport { default as BottomLeftCorner } from './BottomLeftCorner';\nexport { default as BottomRightCorner } from './BottomRightCorner';\nexport { default as Button } from './Button';\nexport { default as Calendar } from './Calendar';\nexport { default as Center } from './Center';\nexport { default as Check } from './Check';\nexport { default as CheckFilled } from './CheckFilled';\nexport { default as Checkmark } from './Checkmark';\nexport { default as Chevron } from './Chevron';\nexport { default as ChevronDown } from './ChevronDown';\nexport { default as ChevronLeft } from './ChevronLeft';\nexport { default as ChevronUp } from './ChevronUp';\nexport { default as Close } from './Close';\nexport { default as CloseBold } from './CloseBold';\nexport { default as CloseCircle } from './CloseCircle';\nexport { default as Column1 } from './Column1';\nexport { default as Column12 } from './Column12';\nexport { default as Column13 } from './Column13';\nexport { default as Column2 } from './Column2';\nexport { default as Column21 } from './Column21';\nexport { default as Column3 } from './Column3';\nexport { default as Column31 } from './Column31';\nexport { default as Column4 } from './Column4';\nexport { default as Contacts } from './Contacts';\nexport { default as Crop } from './Crop';\nexport { default as Divider } from './Divider';\nexport { default as Download } from './Download';\nexport { default as Duplicate } from './Duplicate';\nexport { default as Email } from './Email';\nexport { default as Feedback } from './Feedback';\nexport { default as File } from './File';\nexport { default as Filter } from './Filter';\nexport { default as Flip } from './Flip';\nexport { default as Flop } from './Flop';\nexport { default as Form } from './Form';\nexport { default as Gift } from './Gift';\nexport { default as HeartRound } from './HeartRound';\nexport { default as Home } from './Home';\nexport { default as HorisontalCenter } from './HorisontalCenter';\nexport { default as Image } from './Image';\nexport { default as Images } from './Images';\nexport { default as Info } from './Info';\nexport { default as Integrations } from './Integrations';\nexport { default as Italics } from './Italics';\nexport { default as Justified } from './Justified';\nexport { default as LeftAlign } from './LeftAlign';\nexport { default as Left } from './Left';\nexport { default as LetterSpacing } from './LetterSpacing';\nexport { default as LineHeight } from './LineHeight';\nexport { default as LineThickness } from './LineThickness';\nexport { default as Link } from './Link';\nexport { default as List } from './List';\nexport { default as ListMenu } from './ListMenu';\nexport { default as ListNumbered } from './ListNumbered';\nexport { default as Location } from './Location';\nexport { default as LockChain } from './LockChain';\nexport { default as Locked } from './Locked';\nexport { default as Logo } from './Logo';\nexport { default as Logout } from './Logout';\nexport { default as Lowercase } from './Lowercase';\nexport { default as Magic } from './Magic';\nexport { default as MarginBottom } from './MarginBottom';\nexport { default as MarginLeft } from './MarginLeft';\nexport { default as MarginRight } from './MarginRight';\nexport { default as MarginTop } from './MarginTop';\nexport { default as Menu } from './Menu';\nexport { default as Minus } from './Minus';\nexport { default as MinusBold } from './MinusBold';\nexport { default as More } from './More';\nexport { default as Move } from './Move';\nexport { default as MoveDirections } from './MoveDirections';\nexport { default as MoveVertical } from './MoveVertical';\nexport { default as Openclose } from './Openclose';\nexport { default as Pen } from './Pen';\nexport { default as Phone } from './Phone';\nexport { default as Plane } from './Plane';\nexport { default as PlaneOutline } from './PlaneOutline';\nexport { default as Plus } from './Plus';\nexport { default as PlusBold } from './PlusBold';\nexport { default as PlusCircle } from './PlusCircle';\nexport { default as Result } from './Result';\nexport { default as RightAlign } from './RightAlign';\nexport { default as Right } from './Right';\nexport { default as Rotate } from './Rotate';\nexport { default as Search } from './Search';\nexport { default as Settings } from './Settings';\nexport { default as Sms } from './Sms';\nexport { default as Spacing } from './Spacing';\nexport { default as Spinner } from './Spinner';\nexport { default as StarFilled } from './StarFilled';\nexport { default as StarOutline } from './StarOutline';\nexport { default as Stars } from './Stars';\nexport { default as Stats } from './Stats';\nexport { default as Stop } from './Stop';\nexport { default as Strikethrough } from './Strikethrough';\nexport { default as Support } from './Support';\nexport { default as Tags } from './Tags';\nexport { default as Team } from './Team';\nexport { default as Text } from './Text';\nexport { default as Thumbsdown } from './Thumbsdown';\nexport { default as Thumbsup } from './Thumbsup';\nexport { default as TopAlign } from './TopAlign';\nexport { default as TopLeftCorner } from './TopLeftCorner';\nexport { default as TopRightCorner } from './TopRightCorner';\nexport { default as Trash } from './Trash';\nexport { default as Underscore } from './Underscore';\nexport { default as Unlink } from './Unlink';\nexport { default as UnlockChain } from './UnlockChain';\nexport { default as Unlocked } from './Unlocked';\nexport { default as Upload } from './Upload';\nexport { default as Uppercase } from './Uppercase';\nexport { default as VerticalCenter } from './VerticalCenter';\nexport { default as Video } from './Video';\nexport { default as Warning } from './Warning';\nexport { default as Website } from './Website';\nexport { default as Width } from './Width';\nexport { default as Write } from './Write';\n"],
5
5
  "mappings": "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",
6
6
  "names": ["default"]
7
7
  }
package/package.json CHANGED
@@ -1,45 +1,70 @@
1
1
  {
2
- "name": "@minutemailer/kit",
3
- "version": "0.2.0",
4
- "description": "Minutemailer UI Kit",
5
- "license": "MIT",
6
- "author": "Minutemailer",
7
- "type": "module",
8
- "exports": {
9
- "./utils": "./utils/index.js",
10
- "./icons": "./icons/index.js",
11
- "./store": "./store/index.js",
12
- "./state": "./state/index.js"
13
- },
14
- "sideEffects": false,
15
- "scripts": {
16
- "test": "vitest run",
17
- "coverage": "vitest --run --coverage",
18
- "start": "storybook dev -p 6006",
19
- "build": "npm run icons:build && tsc && node esbuild.config.js",
20
- "build-storybook": "storybook build",
21
- "icons:build": "npx @svgr/cli --icon --typescript --replace-attr-values \"#3D3D3D=currentColor\" --out-dir src/icons resources/icons",
22
- "tokens:generate": "node bin/generate-tokens.cjs",
23
- "prepub": "rm -r dist && npm run build && cp package.json dist",
24
- "pub": "npm run prepub && cd dist && npm publish --access public",
25
- "docs": "npx typedoc src/utils --out docs --plugin typedoc-material-theme --themeColor '#00b869'"
26
- },
27
- "peerDependencies": {
28
- "react": "^19.0.0 || ^18.0.0",
29
- "react-dom": "^19.0.0 || ^18.0.0"
30
- },
31
- "devDependencies": {
32
- "@storybook/react-vite": "^9.1.4",
33
- "@svgr/cli": "^8.1.0",
34
- "@vitest/coverage-v8": "^3.2.4",
35
- "esbuild": "^0.25.9",
36
- "react": "^19.1.1",
37
- "react-dom": "^19.1.1",
38
- "sass": "^1.92.0",
39
- "storybook": "^9.1.4",
40
- "typedoc": "^0.28.12",
41
- "typedoc-material-theme": "^1.4.0",
42
- "vitest": "^3.2.4",
43
- "@storybook/addon-docs": "^9.1.4"
44
- }
2
+ "name": "@minutemailer/kit",
3
+ "version": "1.0.1",
4
+ "description": "Minutemailer UI Kit",
5
+ "license": "MIT",
6
+ "author": "Minutemailer",
7
+ "type": "module",
8
+ "exports": {
9
+ "./utils": "./utils/index.js",
10
+ "./icons": "./icons/index.js",
11
+ "./store": "./store/index.js",
12
+ "./state": "./state/index.js",
13
+ "./components/*": "./components/*",
14
+ "./styles.css": "./styles.css"
15
+ },
16
+ "sideEffects": false,
17
+ "scripts": {
18
+ "test": "vitest run",
19
+ "coverage": "vitest --run --coverage",
20
+ "start": "storybook dev -p 6006",
21
+ "build": "npm run icons:build && tsc && node esbuild.config.js",
22
+ "build-storybook": "storybook build",
23
+ "icons:build": "npx @svgr/cli --icon --typescript --replace-attr-values \"#3D3D3D=currentColor\" --out-dir src/icons resources/icons",
24
+ "prepub": "rm -r dist && npm run build && cp package.json dist",
25
+ "pub": "npm run prepub && cd dist && npm publish --access public",
26
+ "docs": "npx typedoc src/utils --out docs --plugin typedoc-material-theme --themeColor '#00b869'"
27
+ },
28
+ "peerDependencies": {
29
+ "react": "^19.0.0 || ^18.0.0",
30
+ "react-dom": "^19.0.0 || ^18.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "@storybook/addon-docs": "^9.1.4",
34
+ "@storybook/react-vite": "^9.1.4",
35
+ "@svgr/cli": "^8.1.0",
36
+ "@types/react": "^19.1.12",
37
+ "@types/react-dom": "^19.1.9",
38
+ "@vitest/coverage-v8": "^3.2.4",
39
+ "esbuild": "^0.25.9",
40
+ "prettier": "3.6.2",
41
+ "react": "^19.1.1",
42
+ "react-dom": "^19.1.1",
43
+ "sass": "^1.92.0",
44
+ "shadcn": "^3.2.1",
45
+ "storybook": "^9.1.4",
46
+ "typedoc": "^0.28.12",
47
+ "typedoc-material-theme": "^1.4.0",
48
+ "vite": "^7.1.4",
49
+ "vitest": "^3.2.4"
50
+ },
51
+ "dependencies": {
52
+ "@radix-ui/react-avatar": "^1.1.10",
53
+ "@radix-ui/react-checkbox": "^1.3.3",
54
+ "@radix-ui/react-dialog": "^1.1.15",
55
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
56
+ "@radix-ui/react-label": "^2.1.7",
57
+ "@radix-ui/react-separator": "^1.1.7",
58
+ "@radix-ui/react-slot": "^1.2.3",
59
+ "@radix-ui/react-tooltip": "^1.2.8",
60
+ "@tailwindcss/vite": "^4.1.13",
61
+ "class-variance-authority": "^0.7.1",
62
+ "clsx": "^2.1.1",
63
+ "lucide-react": "^0.542.0",
64
+ "next-themes": "^0.4.6",
65
+ "sonner": "^2.0.7",
66
+ "tailwind-merge": "^3.3.1",
67
+ "tailwindcss": "^4.1.13",
68
+ "tw-animate-css": "^1.3.8"
69
+ }
45
70
  }
package/state/index.js CHANGED
@@ -48,7 +48,9 @@ function createMachine(transitions, actions, initialContext, initialState = "IDL
48
48
  () => selector(context)
49
49
  );
50
50
  useEffect(() => {
51
- return this.subscribe(() => setCurrentContext(selector(context)));
51
+ return this.subscribe(
52
+ () => setCurrentContext(selector(context))
53
+ );
52
54
  }, []);
53
55
  return currentContext;
54
56
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/state/index.ts"],
4
- "sourcesContent": ["import { useEffect, useState } from 'react';\n\ninterface StateMachine<TContext> {\n subscribe: (listener: StateChange<TContext>) => () => void;\n destroy: () => void;\n action: (action: string, input?: any) => void;\n can: (action: string) => boolean;\n useCurrentState: () => string;\n useCurrentContext: <TSelected = any>(selector: (context: TContext) => TSelected) => TSelected;\n getContext: () => TContext;\n}\n\ninterface Transitions {\n [state: string]: {\n on: {\n [action: string]: string;\n };\n };\n}\n\ninterface Actions {\n [action: string]: (context: any, input?: any) => any;\n}\n\ntype StateChange<TContext> = (state: string, previousState: string, context: TContext) => void;\n\nexport function createMachine<TContext = any>(\n transitions: Transitions,\n actions: Actions,\n initialContext: TContext,\n initialState = 'IDLE',\n): StateMachine<TContext> {\n const listeners = new Set<StateChange<TContext>>();\n let state = initialState;\n let context = initialContext;\n\n return {\n subscribe(listener: StateChange<TContext>): (() => void) {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n\n destroy(): void {\n listeners.clear();\n state = initialState;\n context = initialContext;\n },\n\n action(action: string, input?: any): void {\n const transition = transitions[state];\n const nextState = transition.on[action];\n\n if (!nextState) {\n console.warn('Invalid transition', state, action);\n return;\n }\n\n console.log(\n `Machine transition: ${state} -> ${nextState} (${action}, ${input})`,\n );\n\n const previousState = state;\n\n if (actions[action]) {\n context = actions[action].call(this, context, input) || context;\n }\n\n state = nextState;\n listeners.forEach((listener) =>\n listener(state, previousState, context),\n );\n },\n\n can(action: string): boolean {\n const transition = transitions[state];\n return !!transition.on[action];\n },\n\n useCurrentState(): string {\n const [currentState, setCurrentState] = useState<string>(state);\n\n useEffect(() => {\n return this.subscribe(() => setCurrentState(state));\n }, []);\n\n return currentState;\n },\n\n useCurrentContext<TSelected = any>(selector: (context: TContext) => TSelected): TSelected {\n const [currentContext, setCurrentContext] = useState<TSelected>(() =>\n selector(context),\n );\n\n useEffect(() => {\n return this.subscribe(() => setCurrentContext(selector(context)));\n }, []);\n\n return currentContext;\n },\n\n getContext(): TContext {\n return context;\n },\n };\n}"],
5
- "mappings": "AAAA,SAAS,WAAW,gBAAgB;AA0B7B,SAAS,cACZ,aACA,SACA,gBACA,eAAe,QACO;AACtB,QAAM,YAAY,oBAAI,IAA2B;AACjD,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,SAAO;AAAA,IACH,UAAU,UAA+C;AACrD,gBAAU,IAAI,QAAQ;AACtB,aAAO,MAAM,UAAU,OAAO,QAAQ;AAAA,IAC1C;AAAA,IAEA,UAAgB;AACZ,gBAAU,MAAM;AAChB,cAAQ;AACR,gBAAU;AAAA,IACd;AAAA,IAEA,OAAO,QAAgB,OAAmB;AACtC,YAAM,aAAa,YAAY,KAAK;AACpC,YAAM,YAAY,WAAW,GAAG,MAAM;AAEtC,UAAI,CAAC,WAAW;AACZ,gBAAQ,KAAK,sBAAsB,OAAO,MAAM;AAChD;AAAA,MACJ;AAEA,cAAQ;AAAA,QACJ,uBAAuB,KAAK,OAAO,SAAS,KAAK,MAAM,KAAK,KAAK;AAAA,MACrE;AAEA,YAAM,gBAAgB;AAEtB,UAAI,QAAQ,MAAM,GAAG;AACjB,kBAAU,QAAQ,MAAM,EAAE,KAAK,MAAM,SAAS,KAAK,KAAK;AAAA,MAC5D;AAEA,cAAQ;AACR,gBAAU;AAAA,QAAQ,CAAC,aACf,SAAS,OAAO,eAAe,OAAO;AAAA,MAC1C;AAAA,IACJ;AAAA,IAEA,IAAI,QAAyB;AACzB,YAAM,aAAa,YAAY,KAAK;AACpC,aAAO,CAAC,CAAC,WAAW,GAAG,MAAM;AAAA,IACjC;AAAA,IAEA,kBAA0B;AACtB,YAAM,CAAC,cAAc,eAAe,IAAI,SAAiB,KAAK;AAE9D,gBAAU,MAAM;AACZ,eAAO,KAAK,UAAU,MAAM,gBAAgB,KAAK,CAAC;AAAA,MACtD,GAAG,CAAC,CAAC;AAEL,aAAO;AAAA,IACX;AAAA,IAEA,kBAAmC,UAAuD;AACtF,YAAM,CAAC,gBAAgB,iBAAiB,IAAI;AAAA,QAAoB,MAC5D,SAAS,OAAO;AAAA,MACpB;AAEA,gBAAU,MAAM;AACZ,eAAO,KAAK,UAAU,MAAM,kBAAkB,SAAS,OAAO,CAAC,CAAC;AAAA,MACpE,GAAG,CAAC,CAAC;AAEL,aAAO;AAAA,IACX;AAAA,IAEA,aAAuB;AACnB,aAAO;AAAA,IACX;AAAA,EACJ;AACJ;",
4
+ "sourcesContent": ["import { useEffect, useState } from 'react';\n\ninterface StateMachine<TContext> {\n subscribe: (listener: StateChange<TContext>) => () => void;\n destroy: () => void;\n action: (action: string, input?: any) => void;\n can: (action: string) => boolean;\n useCurrentState: () => string;\n useCurrentContext: <TSelected = any>(\n selector: (context: TContext) => TSelected,\n ) => TSelected;\n getContext: () => TContext;\n}\n\ninterface Transitions {\n [state: string]: {\n on: {\n [action: string]: string;\n };\n };\n}\n\ninterface Actions {\n [action: string]: (context: any, input?: any) => any;\n}\n\ntype StateChange<TContext> = (\n state: string,\n previousState: string,\n context: TContext,\n) => void;\n\nexport function createMachine<TContext = any>(\n transitions: Transitions,\n actions: Actions,\n initialContext: TContext,\n initialState = 'IDLE',\n): StateMachine<TContext> {\n const listeners = new Set<StateChange<TContext>>();\n let state = initialState;\n let context = initialContext;\n\n return {\n subscribe(listener: StateChange<TContext>): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n },\n\n destroy(): void {\n listeners.clear();\n state = initialState;\n context = initialContext;\n },\n\n action(action: string, input?: any): void {\n const transition = transitions[state];\n const nextState = transition.on[action];\n\n if (!nextState) {\n console.warn('Invalid transition', state, action);\n return;\n }\n\n console.log(\n `Machine transition: ${state} -> ${nextState} (${action}, ${input})`,\n );\n\n const previousState = state;\n\n if (actions[action]) {\n context = actions[action].call(this, context, input) || context;\n }\n\n state = nextState;\n listeners.forEach((listener) =>\n listener(state, previousState, context),\n );\n },\n\n can(action: string): boolean {\n const transition = transitions[state];\n return !!transition.on[action];\n },\n\n useCurrentState(): string {\n const [currentState, setCurrentState] = useState<string>(state);\n\n useEffect(() => {\n return this.subscribe(() => setCurrentState(state));\n }, []);\n\n return currentState;\n },\n\n useCurrentContext<TSelected = any>(\n selector: (context: TContext) => TSelected,\n ): TSelected {\n const [currentContext, setCurrentContext] = useState<TSelected>(\n () => selector(context),\n );\n\n useEffect(() => {\n return this.subscribe(() =>\n setCurrentContext(selector(context)),\n );\n }, []);\n\n return currentContext;\n },\n\n getContext(): TContext {\n return context;\n },\n };\n}\n"],
5
+ "mappings": "AAAA,SAAS,WAAW,gBAAgB;AAgC7B,SAAS,cACZ,aACA,SACA,gBACA,eAAe,QACO;AACtB,QAAM,YAAY,oBAAI,IAA2B;AACjD,MAAI,QAAQ;AACZ,MAAI,UAAU;AAEd,SAAO;AAAA,IACH,UAAU,UAA6C;AACnD,gBAAU,IAAI,QAAQ;AACtB,aAAO,MAAM,UAAU,OAAO,QAAQ;AAAA,IAC1C;AAAA,IAEA,UAAgB;AACZ,gBAAU,MAAM;AAChB,cAAQ;AACR,gBAAU;AAAA,IACd;AAAA,IAEA,OAAO,QAAgB,OAAmB;AACtC,YAAM,aAAa,YAAY,KAAK;AACpC,YAAM,YAAY,WAAW,GAAG,MAAM;AAEtC,UAAI,CAAC,WAAW;AACZ,gBAAQ,KAAK,sBAAsB,OAAO,MAAM;AAChD;AAAA,MACJ;AAEA,cAAQ;AAAA,QACJ,uBAAuB,KAAK,OAAO,SAAS,KAAK,MAAM,KAAK,KAAK;AAAA,MACrE;AAEA,YAAM,gBAAgB;AAEtB,UAAI,QAAQ,MAAM,GAAG;AACjB,kBAAU,QAAQ,MAAM,EAAE,KAAK,MAAM,SAAS,KAAK,KAAK;AAAA,MAC5D;AAEA,cAAQ;AACR,gBAAU;AAAA,QAAQ,CAAC,aACf,SAAS,OAAO,eAAe,OAAO;AAAA,MAC1C;AAAA,IACJ;AAAA,IAEA,IAAI,QAAyB;AACzB,YAAM,aAAa,YAAY,KAAK;AACpC,aAAO,CAAC,CAAC,WAAW,GAAG,MAAM;AAAA,IACjC;AAAA,IAEA,kBAA0B;AACtB,YAAM,CAAC,cAAc,eAAe,IAAI,SAAiB,KAAK;AAE9D,gBAAU,MAAM;AACZ,eAAO,KAAK,UAAU,MAAM,gBAAgB,KAAK,CAAC;AAAA,MACtD,GAAG,CAAC,CAAC;AAEL,aAAO;AAAA,IACX;AAAA,IAEA,kBACI,UACS;AACT,YAAM,CAAC,gBAAgB,iBAAiB,IAAI;AAAA,QACxC,MAAM,SAAS,OAAO;AAAA,MAC1B;AAEA,gBAAU,MAAM;AACZ,eAAO,KAAK;AAAA,UAAU,MAClB,kBAAkB,SAAS,OAAO,CAAC;AAAA,QACvC;AAAA,MACJ,GAAG,CAAC,CAAC;AAEL,aAAO;AAAA,IACX;AAAA,IAEA,aAAuB;AACnB,aAAO;AAAA,IACX;AAAA,EACJ;AACJ;",
6
6
  "names": []
7
7
  }
@@ -10,7 +10,9 @@ describe('State Machine', () => {
10
10
  STATE3: { on: { NEXT: 'STATE1', RESET: 'STATE1' } },
11
11
  };
12
12
  const actions = {
13
- NEXT: (context) => ({ count: context.count + 1 }),
13
+ NEXT: (context) => ({
14
+ count: context.count + 1,
15
+ }),
14
16
  RESET: () => ({ count: 0 }),
15
17
  };
16
18
  let machine;
@@ -49,7 +51,9 @@ describe('State Machine', () => {
49
51
  expect(machine.can('RESET')).toBe(true);
50
52
  });
51
53
  it('should warn when invalid transition is attempted', () => {
52
- const consoleSpy = vi.spyOn(console, 'warn').mockImplementation(() => { });
54
+ const consoleSpy = vi
55
+ .spyOn(console, 'warn')
56
+ .mockImplementation(() => { });
53
57
  machine.action('INVALID_ACTION');
54
58
  expect(consoleSpy).toHaveBeenCalledWith('Invalid transition', 'STATE1', 'INVALID_ACTION');
55
59
  consoleSpy.mockRestore();
@@ -72,7 +76,9 @@ describe('State Machine', () => {
72
76
  unsubscribe();
73
77
  });
74
78
  it('should log transitions to console', () => {
75
- const consoleSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
79
+ const consoleSpy = vi
80
+ .spyOn(console, 'log')
81
+ .mockImplementation(() => { });
76
82
  machine.action('NEXT', 'test-input');
77
83
  expect(consoleSpy).toHaveBeenCalledWith('Machine transition: STATE1 -> STATE2 (NEXT, test-input)');
78
84
  consoleSpy.mockRestore();
@@ -81,7 +87,9 @@ describe('State Machine', () => {
81
87
  const mockListener = vi.fn();
82
88
  const unsubscribe = machine['subscribe'](mockListener);
83
89
  machine.action('NEXT');
84
- expect(mockListener).toHaveBeenCalledWith('STATE2', 'STATE1', { count: 1 });
90
+ expect(mockListener).toHaveBeenCalledWith('STATE2', 'STATE1', {
91
+ count: 1,
92
+ });
85
93
  // Test unsubscribe
86
94
  unsubscribe();
87
95
  machine.action('NEXT');
@@ -92,8 +100,8 @@ describe('State Machine', () => {
92
100
  const complexMachine = createMachine({ STATE1: { on: { UPDATE: 'STATE1' } } }, {
93
101
  UPDATE: (ctx) => ({
94
102
  ...ctx,
95
- user: { ...ctx.user, age: ctx.user.age + 1 }
96
- })
103
+ user: { ...ctx.user, age: ctx.user.age + 1 },
104
+ }),
97
105
  }, { user: { name: 'Test', age: 30 }, settings: { theme: 'dark' } }, 'STATE1');
98
106
  let name = '';
99
107
  let age = 0;
@@ -106,7 +114,7 @@ describe('State Machine', () => {
106
114
  // Initial values from initialization
107
115
  expect(complexMachine.getContext()).toEqual({
108
116
  user: { name: 'Test', age: 30 },
109
- settings: { theme: 'dark' }
117
+ settings: { theme: 'dark' },
110
118
  });
111
119
  complexMachine.action('UPDATE');
112
120
  // Only age should change
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/store/index.ts"],
4
- "sourcesContent": ["// Reexport all from the store modules\nexport * from './store';\nexport { useSelector } from './useSelector';"],
4
+ "sourcesContent": ["// Reexport all from the store modules\nexport * from './store';\nexport { useSelector } from './useSelector';\n"],
5
5
  "mappings": "AACA,cAAc;AACd,SAAS,mBAAmB;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- import type { Store } from "@/store";
1
+ import type { Store } from '@/store';
2
2
  export declare function useSelector<T, S>(store: Store<T>, selector: (state: T) => S): S;
@@ -1,4 +1,4 @@
1
- import { useEffect, useState } from "react";
1
+ import { useEffect, useState } from 'react';
2
2
  export function useSelector(store, selector) {
3
3
  const [selectedState, setSelectedState] = useState(() => store.select(selector));
4
4
  useEffect(() => {
@@ -0,0 +1,12 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { Alert } from '@/components/ui/alert';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Alert;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
10
+ export declare const Destructive: Story;
11
+ export declare const WithoutIcon: Story;
12
+ export declare const WithoutTitle: Story;
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert';
3
+ import { AlertTriangle, Info, Trash } from 'lucide-react';
4
+ const meta = {
5
+ title: 'WIP/Alert',
6
+ component: Alert,
7
+ };
8
+ export default meta;
9
+ export const Default = {
10
+ args: {
11
+ children: (_jsxs(_Fragment, { children: [_jsx(Info, {}), _jsx(AlertTitle, { children: "Heads up!" }), _jsx(AlertDescription, { children: "This is a default alert \u2014 check it out!" })] })),
12
+ },
13
+ };
14
+ export const Destructive = {
15
+ args: {
16
+ variant: 'destructive',
17
+ children: (_jsxs(_Fragment, { children: [_jsx(AlertTriangle, {}), _jsx(AlertTitle, { children: "Something went wrong" }), _jsx(AlertDescription, { children: "Your action could not be completed. Please try again." })] })),
18
+ },
19
+ };
20
+ export const WithoutIcon = {
21
+ args: {
22
+ children: (_jsxs(_Fragment, { children: [_jsx(AlertTitle, { children: "Notice" }), _jsx(AlertDescription, { children: "This alert renders without an icon and still aligns nicely." })] })),
23
+ },
24
+ };
25
+ export const WithoutTitle = {
26
+ args: {
27
+ children: (_jsxs(_Fragment, { children: [_jsx(Trash, {}), _jsx(AlertTitle, { children: "This Alert has a title and an icon. No description." })] })),
28
+ },
29
+ };
@@ -0,0 +1,17 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { Button } from '@/components/ui/button';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Button;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Primary: Story;
10
+ export declare const Secondary: Story;
11
+ export declare const Destructive: Story;
12
+ export declare const Outline: Story;
13
+ export declare const Ghost: Story;
14
+ export declare const Link: Story;
15
+ export declare const Small: Story;
16
+ export declare const Large: Story;
17
+ export declare const Icon: Story;
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button } from '@/components/ui/button';
3
+ import { Plus } from 'lucide-react';
4
+ const meta = {
5
+ title: 'UI/Button',
6
+ component: Button,
7
+ };
8
+ export default meta;
9
+ export const Primary = {
10
+ args: {
11
+ children: 'Button',
12
+ },
13
+ };
14
+ export const Secondary = {
15
+ args: {
16
+ variant: 'secondary',
17
+ children: 'Button',
18
+ },
19
+ };
20
+ export const Destructive = {
21
+ args: {
22
+ variant: 'destructive',
23
+ children: 'Button',
24
+ },
25
+ };
26
+ export const Outline = {
27
+ args: {
28
+ variant: 'outline',
29
+ children: 'Button',
30
+ },
31
+ };
32
+ export const Ghost = {
33
+ args: {
34
+ variant: 'ghost',
35
+ children: 'Button',
36
+ },
37
+ };
38
+ export const Link = {
39
+ args: {
40
+ variant: 'link',
41
+ children: 'Button',
42
+ },
43
+ };
44
+ export const Small = {
45
+ args: {
46
+ size: 'sm',
47
+ children: 'Button',
48
+ },
49
+ };
50
+ export const Large = {
51
+ args: {
52
+ size: 'lg',
53
+ children: 'Button',
54
+ },
55
+ };
56
+ export const Icon = {
57
+ args: {
58
+ size: 'icon',
59
+ children: _jsx(Plus, {}),
60
+ },
61
+ };
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { Checkbox } from '@/components/ui/checkbox';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Checkbox;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
10
+ export declare const Checked: Story;
11
+ export declare const Disabled: Story;
12
+ export declare const DisabledChecked: Story;
13
+ export declare const WithLabel: Story;
14
+ export declare const Controlled: Story;
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from 'react';
3
+ import { Checkbox } from '@/components/ui/checkbox';
4
+ import { Label } from '@/components/ui/label';
5
+ const meta = {
6
+ title: 'WIP/Checkbox',
7
+ component: Checkbox,
8
+ };
9
+ export default meta;
10
+ export const Default = {
11
+ args: {},
12
+ };
13
+ export const Checked = {
14
+ args: {
15
+ defaultChecked: true,
16
+ },
17
+ };
18
+ export const Disabled = {
19
+ args: {
20
+ disabled: true,
21
+ },
22
+ };
23
+ export const DisabledChecked = {
24
+ args: {
25
+ disabled: true,
26
+ defaultChecked: true,
27
+ },
28
+ };
29
+ export const WithLabel = {
30
+ render: (args) => (_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Checkbox, { ...args, id: "terms" }), _jsx(Label, { htmlFor: "terms", children: "Accept terms and conditions" })] })),
31
+ };
32
+ export const Controlled = {
33
+ render: (args) => {
34
+ const [checked, setChecked] = React.useState(false);
35
+ return (_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Checkbox, { ...args, checked: checked, onCheckedChange: (v) => setChecked(Boolean(v)), "aria-label": checked ? 'Checked' : 'Unchecked', id: "controlled" }), _jsx(Label, { htmlFor: "controlled", children: checked ? 'Checked' : 'Unchecked' })] }));
36
+ },
37
+ };
@@ -0,0 +1,14 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { Input } from '@/components/ui/input';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Input;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
10
+ export declare const Disabled: Story;
11
+ export declare const File: Story;
12
+ export declare const WithPlaceholder: Story;
13
+ export declare const WithLabel: Story;
14
+ export declare const WithButton: Story;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Label } from '@/components/ui/label';
3
+ import { Input } from '@/components/ui/input';
4
+ import { Button } from '@/components/ui/button';
5
+ const meta = {
6
+ title: 'WIP/Input',
7
+ component: Input,
8
+ };
9
+ export default meta;
10
+ export const Default = {
11
+ args: {},
12
+ };
13
+ export const Disabled = {
14
+ args: {
15
+ disabled: true,
16
+ },
17
+ };
18
+ export const File = {
19
+ render: (args) => (_jsxs("div", { className: "grid w-full max-w-sm items-center gap-3", children: [_jsx(Label, { htmlFor: "picture", children: "Picture" }), _jsx(Input, { ...args, type: "file", id: "picture" })] })),
20
+ };
21
+ export const WithPlaceholder = {
22
+ args: {
23
+ placeholder: 'Type something...',
24
+ },
25
+ };
26
+ export const WithLabel = {
27
+ render: (args) => (_jsxs("div", { className: "grid w-full max-w-sm items-center gap-3", children: [_jsx(Label, { htmlFor: "email", children: "Email" }), _jsx(Input, { ...args, id: "email" })] })),
28
+ };
29
+ export const WithButton = {
30
+ render: (args) => (_jsxs("div", { className: "flex w-full max-w-sm items-center gap-2", children: [_jsx(Input, { type: "email", placeholder: "Email" }), _jsx(Button, { type: "button", variant: "outline", children: "Subscribe" })] })),
31
+ };
@@ -0,0 +1,9 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { Label } from '@/components/ui/label';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Label;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
@@ -0,0 +1,12 @@
1
+ import { Label } from '@/components/ui/label';
2
+ const meta = {
3
+ title: 'WIP/Label',
4
+ component: Label,
5
+ };
6
+ export default meta;
7
+ export const Default = {
8
+ args: {
9
+ children: 'Label',
10
+ htmlFor: undefined,
11
+ },
12
+ };
@@ -0,0 +1,10 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { Separator } from '@/components/ui/separator';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Separator;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;
10
+ export declare const Vertical: Story;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Separator } from '@/components/ui/separator';
3
+ const meta = {
4
+ title: 'WIP/Separator',
5
+ component: Separator,
6
+ };
7
+ export default meta;
8
+ export const Default = {
9
+ args: {},
10
+ };
11
+ export const Vertical = {
12
+ render: (args) => (_jsx("div", { className: "h-10", children: _jsx(Separator, { orientation: "vertical", ...args }) })),
13
+ };
@@ -0,0 +1,9 @@
1
+ import type { StoryObj } from '@storybook/react-vite';
2
+ import { Sidebar } from '@/components/ui/sidebar';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Sidebar;
6
+ };
7
+ export default meta;
8
+ type Story = StoryObj<typeof meta>;
9
+ export declare const Default: Story;