@unoff/ui 1.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (322) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +880 -0
  3. package/dist/assets/Accordion.css +1 -0
  4. package/dist/assets/ActionsItem.css +1 -0
  5. package/dist/assets/ActionsList.css +1 -0
  6. package/dist/assets/Avatar.css +1 -0
  7. package/dist/assets/Bar.css +1 -0
  8. package/dist/assets/Button.css +1 -0
  9. package/dist/assets/Card.css +1 -0
  10. package/dist/assets/Chip.css +1 -0
  11. package/dist/assets/ColorChip.css +1 -0
  12. package/dist/assets/ColorItem.css +1 -0
  13. package/dist/assets/Consent.css +1 -0
  14. package/dist/assets/Dialog.css +1 -0
  15. package/dist/assets/DraggableItem.css +1 -0
  16. package/dist/assets/DraggableWindow.css +1 -0
  17. package/dist/assets/Drawer.css +1 -0
  18. package/dist/assets/Dropdown.css +1 -0
  19. package/dist/assets/Dropzone.css +1 -0
  20. package/dist/assets/FormItem.css +1 -0
  21. package/dist/assets/Icon.css +1 -0
  22. package/dist/assets/IconChip.css +1 -0
  23. package/dist/assets/Input.css +1 -0
  24. package/dist/assets/InputsBar.css +1 -0
  25. package/dist/assets/KeyboardShortcutItem.css +1 -0
  26. package/dist/assets/Knob.css +1 -0
  27. package/dist/assets/Layout.css +1 -0
  28. package/dist/assets/List.css +1 -0
  29. package/dist/assets/MembersList.css +1 -0
  30. package/dist/assets/Menu.css +1 -0
  31. package/dist/assets/Message.css +1 -0
  32. package/dist/assets/MultipleSlider.css +1 -0
  33. package/dist/assets/Notification.css +1 -0
  34. package/dist/assets/Popin.css +1 -0
  35. package/dist/assets/Section.css +1 -0
  36. package/dist/assets/SectionTitle.css +1 -0
  37. package/dist/assets/Select.css +1 -0
  38. package/dist/assets/SemanticMessage.css +1 -0
  39. package/dist/assets/SimpleItem.css +1 -0
  40. package/dist/assets/SimpleSlider.css +1 -0
  41. package/dist/assets/SortableList.css +1 -0
  42. package/dist/assets/Tabs.css +1 -0
  43. package/dist/assets/Text.css +1 -0
  44. package/dist/assets/Thumbnail.css +1 -0
  45. package/dist/assets/Tooltip.css +1 -0
  46. package/dist/assets/styles/icons/icons.css +1 -0
  47. package/dist/assets/styles/icons/styles/figma.css +1 -0
  48. package/dist/assets/styles/icons/styles/framer.css +1 -0
  49. package/dist/assets/styles/icons/styles/penpot.css +1 -0
  50. package/dist/assets/styles/icons/styles/sketch.css +1 -0
  51. package/dist/assets/styles/layouts.css +1 -0
  52. package/dist/assets/styles/texts/styles/figma.css +1 -0
  53. package/dist/assets/styles/texts/styles/framer.css +1 -0
  54. package/dist/assets/styles/texts/styles/penpot.css +1 -0
  55. package/dist/assets/styles/texts/styles/sketch.css +1 -0
  56. package/dist/assets/styles/texts/texts.css +1 -0
  57. package/dist/assets/styles/tokens/figma-types.css +1 -0
  58. package/dist/assets/styles/tokens/framer-types.css +1 -0
  59. package/dist/assets/styles/tokens/modules/figma-colors.css +1 -0
  60. package/dist/assets/styles/tokens/modules/figma-types.css +1 -0
  61. package/dist/assets/styles/tokens/modules/framer-colors.css +1 -0
  62. package/dist/assets/styles/tokens/modules/framer-types.css +1 -0
  63. package/dist/assets/styles/tokens/modules/globals.css +1 -0
  64. package/dist/assets/styles/tokens/modules/penpot-colors.css +1 -0
  65. package/dist/assets/styles/tokens/modules/penpot-types.css +1 -0
  66. package/dist/assets/styles/tokens/modules/sketch-colors.css +1 -0
  67. package/dist/assets/styles/tokens/modules/sketch-types.css +1 -0
  68. package/dist/assets/styles/tokens/penpot-types.css +1 -0
  69. package/dist/assets/styles/tokens/sketch-types.css +1 -0
  70. package/dist/components/actions/accordion/Accordion.d.ts +59 -0
  71. package/dist/components/actions/accordion/Accordion.d.ts.map +1 -0
  72. package/dist/components/actions/accordion/Accordion.js +104 -0
  73. package/dist/components/actions/accordion/Accordion.js.map +1 -0
  74. package/dist/components/actions/button/Button.d.ts +148 -0
  75. package/dist/components/actions/button/Button.d.ts.map +1 -0
  76. package/dist/components/actions/button/Button.figma.d.ts +2 -0
  77. package/dist/components/actions/button/Button.figma.d.ts.map +1 -0
  78. package/dist/components/actions/button/Button.figma.js +43 -0
  79. package/dist/components/actions/button/Button.figma.js.map +1 -0
  80. package/dist/components/actions/button/Button.js +306 -0
  81. package/dist/components/actions/button/Button.js.map +1 -0
  82. package/dist/components/actions/card/Card.d.ts +39 -0
  83. package/dist/components/actions/card/Card.d.ts.map +1 -0
  84. package/dist/components/actions/card/Card.js +99 -0
  85. package/dist/components/actions/card/Card.js.map +1 -0
  86. package/dist/components/actions/knob/Knob.d.ts +93 -0
  87. package/dist/components/actions/knob/Knob.d.ts.map +1 -0
  88. package/dist/components/actions/knob/Knob.js +179 -0
  89. package/dist/components/actions/knob/Knob.js.map +1 -0
  90. package/dist/components/actions/menu/Menu.d.ts +104 -0
  91. package/dist/components/actions/menu/Menu.d.ts.map +1 -0
  92. package/dist/components/actions/menu/Menu.js +200 -0
  93. package/dist/components/actions/menu/Menu.js.map +1 -0
  94. package/dist/components/assets/avatar/Avatar.d.ts +30 -0
  95. package/dist/components/assets/avatar/Avatar.d.ts.map +1 -0
  96. package/dist/components/assets/avatar/Avatar.js +54 -0
  97. package/dist/components/assets/avatar/Avatar.js.map +1 -0
  98. package/dist/components/assets/icon/Icon.d.ts +28 -0
  99. package/dist/components/assets/icon/Icon.d.ts.map +1 -0
  100. package/dist/components/assets/icon/Icon.figma.d.ts +2 -0
  101. package/dist/components/assets/icon/Icon.figma.d.ts.map +1 -0
  102. package/dist/components/assets/icon/Icon.figma.js +27 -0
  103. package/dist/components/assets/icon/Icon.figma.js.map +1 -0
  104. package/dist/components/assets/icon/Icon.js +35 -0
  105. package/dist/components/assets/icon/Icon.js.map +1 -0
  106. package/dist/components/assets/section-title/SectionTitle.d.ts +22 -0
  107. package/dist/components/assets/section-title/SectionTitle.d.ts.map +1 -0
  108. package/dist/components/assets/section-title/SectionTitle.js +42 -0
  109. package/dist/components/assets/section-title/SectionTitle.js.map +1 -0
  110. package/dist/components/assets/text/Text.d.ts +34 -0
  111. package/dist/components/assets/text/Text.d.ts.map +1 -0
  112. package/dist/components/assets/text/Text.js +35 -0
  113. package/dist/components/assets/text/Text.js.map +1 -0
  114. package/dist/components/assets/thumbnail/Thumbnail.d.ts +25 -0
  115. package/dist/components/assets/thumbnail/Thumbnail.d.ts.map +1 -0
  116. package/dist/components/assets/thumbnail/Thumbnail.js +67 -0
  117. package/dist/components/assets/thumbnail/Thumbnail.js.map +1 -0
  118. package/dist/components/dialogs/consent/Consent.d.ts +85 -0
  119. package/dist/components/dialogs/consent/Consent.d.ts.map +1 -0
  120. package/dist/components/dialogs/consent/Consent.js +402 -0
  121. package/dist/components/dialogs/consent/Consent.js.map +1 -0
  122. package/dist/components/dialogs/dialog/Dialog.d.ts +81 -0
  123. package/dist/components/dialogs/dialog/Dialog.d.ts.map +1 -0
  124. package/dist/components/dialogs/dialog/Dialog.js +58 -0
  125. package/dist/components/dialogs/dialog/Dialog.js.map +1 -0
  126. package/dist/components/dialogs/message/Message.d.ts +25 -0
  127. package/dist/components/dialogs/message/Message.d.ts.map +1 -0
  128. package/dist/components/dialogs/message/Message.js +141 -0
  129. package/dist/components/dialogs/message/Message.js.map +1 -0
  130. package/dist/components/dialogs/notification/Notification.d.ts +22 -0
  131. package/dist/components/dialogs/notification/Notification.d.ts.map +1 -0
  132. package/dist/components/dialogs/notification/Notification.js +38 -0
  133. package/dist/components/dialogs/notification/Notification.js.map +1 -0
  134. package/dist/components/dialogs/semantic-message/SemanticMessage.d.ts +40 -0
  135. package/dist/components/dialogs/semantic-message/SemanticMessage.d.ts.map +1 -0
  136. package/dist/components/dialogs/semantic-message/SemanticMessage.js +71 -0
  137. package/dist/components/dialogs/semantic-message/SemanticMessage.js.map +1 -0
  138. package/dist/components/inputs/dropdown/Dropdown.d.ts +123 -0
  139. package/dist/components/inputs/dropdown/Dropdown.d.ts.map +1 -0
  140. package/dist/components/inputs/dropdown/Dropdown.figma.d.ts +2 -0
  141. package/dist/components/inputs/dropdown/Dropdown.figma.d.ts.map +1 -0
  142. package/dist/components/inputs/dropdown/Dropdown.figma.js +28 -0
  143. package/dist/components/inputs/dropdown/Dropdown.figma.js.map +1 -0
  144. package/dist/components/inputs/dropdown/Dropdown.js +307 -0
  145. package/dist/components/inputs/dropdown/Dropdown.js.map +1 -0
  146. package/dist/components/inputs/dropzone/Dropzone.d.ts +78 -0
  147. package/dist/components/inputs/dropzone/Dropzone.d.ts.map +1 -0
  148. package/dist/components/inputs/dropzone/Dropzone.js +222 -0
  149. package/dist/components/inputs/dropzone/Dropzone.js.map +1 -0
  150. package/dist/components/inputs/input/Input.d.ts +203 -0
  151. package/dist/components/inputs/input/Input.d.ts.map +1 -0
  152. package/dist/components/inputs/input/Input.figma.d.ts +2 -0
  153. package/dist/components/inputs/input/Input.figma.d.ts.map +1 -0
  154. package/dist/components/inputs/input/Input.figma.js +35 -0
  155. package/dist/components/inputs/input/Input.figma.js.map +1 -0
  156. package/dist/components/inputs/input/Input.js +713 -0
  157. package/dist/components/inputs/input/Input.js.map +1 -0
  158. package/dist/components/inputs/inputs-bar/InputsBar.d.ts +18 -0
  159. package/dist/components/inputs/inputs-bar/InputsBar.d.ts.map +1 -0
  160. package/dist/components/inputs/inputs-bar/InputsBar.js +15 -0
  161. package/dist/components/inputs/inputs-bar/InputsBar.js.map +1 -0
  162. package/dist/components/inputs/multiple-slider/MultipleSlider.d.ts +125 -0
  163. package/dist/components/inputs/multiple-slider/MultipleSlider.d.ts.map +1 -0
  164. package/dist/components/inputs/multiple-slider/MultipleSlider.js +417 -0
  165. package/dist/components/inputs/multiple-slider/MultipleSlider.js.map +1 -0
  166. package/dist/components/inputs/multiple-slider/actions/addStop.d.ts +8 -0
  167. package/dist/components/inputs/multiple-slider/actions/addStop.d.ts.map +1 -0
  168. package/dist/components/inputs/multiple-slider/actions/deleteStop.d.ts +8 -0
  169. package/dist/components/inputs/multiple-slider/actions/deleteStop.d.ts.map +1 -0
  170. package/dist/components/inputs/multiple-slider/actions/shiftLeftStop.d.ts +5 -0
  171. package/dist/components/inputs/multiple-slider/actions/shiftLeftStop.d.ts.map +1 -0
  172. package/dist/components/inputs/multiple-slider/actions/shiftRightStop.d.ts +5 -0
  173. package/dist/components/inputs/multiple-slider/actions/shiftRightStop.d.ts.map +1 -0
  174. package/dist/components/inputs/select/Select.d.ts +112 -0
  175. package/dist/components/inputs/select/Select.d.ts.map +1 -0
  176. package/dist/components/inputs/select/Select.js +313 -0
  177. package/dist/components/inputs/select/Select.js.map +1 -0
  178. package/dist/components/inputs/simple-slider/SimpleSlider.d.ts +93 -0
  179. package/dist/components/inputs/simple-slider/SimpleSlider.d.ts.map +1 -0
  180. package/dist/components/inputs/simple-slider/SimpleSlider.js +166 -0
  181. package/dist/components/inputs/simple-slider/SimpleSlider.js.map +1 -0
  182. package/dist/components/lists/actions-item/ActionsItem.d.ts +64 -0
  183. package/dist/components/lists/actions-item/ActionsItem.d.ts.map +1 -0
  184. package/dist/components/lists/actions-item/ActionsItem.js +115 -0
  185. package/dist/components/lists/actions-item/ActionsItem.js.map +1 -0
  186. package/dist/components/lists/actions-list/ActionsList.d.ts +79 -0
  187. package/dist/components/lists/actions-list/ActionsList.d.ts.map +1 -0
  188. package/dist/components/lists/actions-list/ActionsList.js +384 -0
  189. package/dist/components/lists/actions-list/ActionsList.js.map +1 -0
  190. package/dist/components/lists/color-item/ColorItem.d.ts +27 -0
  191. package/dist/components/lists/color-item/ColorItem.d.ts.map +1 -0
  192. package/dist/components/lists/color-item/ColorItem.js +70 -0
  193. package/dist/components/lists/color-item/ColorItem.js.map +1 -0
  194. package/dist/components/lists/draggable-item/DraggableItem.d.ts +110 -0
  195. package/dist/components/lists/draggable-item/DraggableItem.d.ts.map +1 -0
  196. package/dist/components/lists/draggable-item/DraggableItem.js +176 -0
  197. package/dist/components/lists/draggable-item/DraggableItem.js.map +1 -0
  198. package/dist/components/lists/keyboard-shortcut-item/KeyboardShortcutItem.d.ts +19 -0
  199. package/dist/components/lists/keyboard-shortcut-item/KeyboardShortcutItem.d.ts.map +1 -0
  200. package/dist/components/lists/keyboard-shortcut-item/KeyboardShortcutItem.js +75 -0
  201. package/dist/components/lists/keyboard-shortcut-item/KeyboardShortcutItem.js.map +1 -0
  202. package/dist/components/lists/members-list/MembersList.d.ts +32 -0
  203. package/dist/components/lists/members-list/MembersList.d.ts.map +1 -0
  204. package/dist/components/lists/members-list/MembersList.js +117 -0
  205. package/dist/components/lists/members-list/MembersList.js.map +1 -0
  206. package/dist/components/lists/sortable-list/SortableList.d.ts +103 -0
  207. package/dist/components/lists/sortable-list/SortableList.d.ts.map +1 -0
  208. package/dist/components/lists/sortable-list/SortableList.js +148 -0
  209. package/dist/components/lists/sortable-list/SortableList.js.map +1 -0
  210. package/dist/components/lists/tabs/Tabs.d.ts +48 -0
  211. package/dist/components/lists/tabs/Tabs.d.ts.map +1 -0
  212. package/dist/components/lists/tabs/Tabs.figma.d.ts +2 -0
  213. package/dist/components/lists/tabs/Tabs.figma.d.ts.map +1 -0
  214. package/dist/components/lists/tabs/Tabs.figma.js +31 -0
  215. package/dist/components/lists/tabs/Tabs.figma.js.map +1 -0
  216. package/dist/components/lists/tabs/Tabs.js +165 -0
  217. package/dist/components/lists/tabs/Tabs.js.map +1 -0
  218. package/dist/components/slots/bar/Bar.d.ts +65 -0
  219. package/dist/components/slots/bar/Bar.d.ts.map +1 -0
  220. package/dist/components/slots/bar/Bar.js +100 -0
  221. package/dist/components/slots/bar/Bar.js.map +1 -0
  222. package/dist/components/slots/draggable-window/DraggableWindow.d.ts +25 -0
  223. package/dist/components/slots/draggable-window/DraggableWindow.d.ts.map +1 -0
  224. package/dist/components/slots/draggable-window/DraggableWindow.js +100 -0
  225. package/dist/components/slots/draggable-window/DraggableWindow.js.map +1 -0
  226. package/dist/components/slots/drawer/Drawer.d.ts +78 -0
  227. package/dist/components/slots/drawer/Drawer.d.ts.map +1 -0
  228. package/dist/components/slots/drawer/Drawer.js +148 -0
  229. package/dist/components/slots/drawer/Drawer.js.map +1 -0
  230. package/dist/components/slots/form-item/FormItem.d.ts +52 -0
  231. package/dist/components/slots/form-item/FormItem.d.ts.map +1 -0
  232. package/dist/components/slots/form-item/FormItem.js +89 -0
  233. package/dist/components/slots/form-item/FormItem.js.map +1 -0
  234. package/dist/components/slots/layout/Layout.d.ts +34 -0
  235. package/dist/components/slots/layout/Layout.d.ts.map +1 -0
  236. package/dist/components/slots/layout/Layout.js +45 -0
  237. package/dist/components/slots/layout/Layout.js.map +1 -0
  238. package/dist/components/slots/list/List.d.ts +49 -0
  239. package/dist/components/slots/list/List.d.ts.map +1 -0
  240. package/dist/components/slots/list/List.js +55 -0
  241. package/dist/components/slots/list/List.js.map +1 -0
  242. package/dist/components/slots/popin/Popin.d.ts +85 -0
  243. package/dist/components/slots/popin/Popin.d.ts.map +1 -0
  244. package/dist/components/slots/popin/Popin.js +182 -0
  245. package/dist/components/slots/popin/Popin.js.map +1 -0
  246. package/dist/components/slots/section/Section.d.ts +32 -0
  247. package/dist/components/slots/section/Section.d.ts.map +1 -0
  248. package/dist/components/slots/section/Section.js +49 -0
  249. package/dist/components/slots/section/Section.js.map +1 -0
  250. package/dist/components/slots/simple-item/SimpleItem.d.ts +45 -0
  251. package/dist/components/slots/simple-item/SimpleItem.d.ts.map +1 -0
  252. package/dist/components/slots/simple-item/SimpleItem.js +100 -0
  253. package/dist/components/slots/simple-item/SimpleItem.js.map +1 -0
  254. package/dist/components/tags/chip/Chip.d.ts +43 -0
  255. package/dist/components/tags/chip/Chip.d.ts.map +1 -0
  256. package/dist/components/tags/chip/Chip.figma.d.ts +2 -0
  257. package/dist/components/tags/chip/Chip.figma.d.ts.map +1 -0
  258. package/dist/components/tags/chip/Chip.figma.js +18 -0
  259. package/dist/components/tags/chip/Chip.figma.js.map +1 -0
  260. package/dist/components/tags/chip/Chip.js +88 -0
  261. package/dist/components/tags/chip/Chip.js.map +1 -0
  262. package/dist/components/tags/color-chip/ColorChip.d.ts +36 -0
  263. package/dist/components/tags/color-chip/ColorChip.d.ts.map +1 -0
  264. package/dist/components/tags/color-chip/ColorChip.js +39 -0
  265. package/dist/components/tags/color-chip/ColorChip.js.map +1 -0
  266. package/dist/components/tags/icon-chip/IconChip.d.ts +42 -0
  267. package/dist/components/tags/icon-chip/IconChip.d.ts.map +1 -0
  268. package/dist/components/tags/icon-chip/IconChip.js +54 -0
  269. package/dist/components/tags/icon-chip/IconChip.js.map +1 -0
  270. package/dist/components/tags/tooltip/Tooltip.d.ts +25 -0
  271. package/dist/components/tags/tooltip/Tooltip.d.ts.map +1 -0
  272. package/dist/components/tags/tooltip/Tooltip.js +72 -0
  273. package/dist/components/tags/tooltip/Tooltip.js.map +1 -0
  274. package/dist/do-classnames-DSDFCvzy.js +5 -0
  275. package/dist/do-classnames-DSDFCvzy.js.map +1 -0
  276. package/dist/do-map-2nhWP1KI.js +8 -0
  277. package/dist/do-map-2nhWP1KI.js.map +1 -0
  278. package/dist/index.d.ts +61 -0
  279. package/dist/index.d.ts.map +1 -0
  280. package/dist/index.js +113 -0
  281. package/dist/index.js.map +1 -0
  282. package/dist/index_react-CmuCVQet.js +13799 -0
  283. package/dist/index_react-CmuCVQet.js.map +1 -0
  284. package/dist/styles/icons/icons.module.js +115 -0
  285. package/dist/styles/icons/icons.module.js.map +1 -0
  286. package/dist/styles/layouts.module.js +37 -0
  287. package/dist/styles/layouts.module.js.map +1 -0
  288. package/dist/styles/texts/texts.module.js +23 -0
  289. package/dist/styles/texts/texts.module.js.map +1 -0
  290. package/dist/styles/tokens/modules/figma-colors.module.js +9 -0
  291. package/dist/styles/tokens/modules/figma-colors.module.js.map +1 -0
  292. package/dist/styles/tokens/modules/figma-types.module.js +9 -0
  293. package/dist/styles/tokens/modules/figma-types.module.js.map +1 -0
  294. package/dist/styles/tokens/modules/framer-colors.module.js +9 -0
  295. package/dist/styles/tokens/modules/framer-colors.module.js.map +1 -0
  296. package/dist/styles/tokens/modules/framer-types.module.js +9 -0
  297. package/dist/styles/tokens/modules/framer-types.module.js.map +1 -0
  298. package/dist/styles/tokens/modules/globals.module.js +9 -0
  299. package/dist/styles/tokens/modules/globals.module.js.map +1 -0
  300. package/dist/styles/tokens/modules/penpot-colors.module.js +9 -0
  301. package/dist/styles/tokens/modules/penpot-colors.module.js.map +1 -0
  302. package/dist/styles/tokens/modules/penpot-types.module.js +9 -0
  303. package/dist/styles/tokens/modules/penpot-types.module.js.map +1 -0
  304. package/dist/styles/tokens/modules/sketch-colors.module.js +9 -0
  305. package/dist/styles/tokens/modules/sketch-colors.module.js.map +1 -0
  306. package/dist/styles/tokens/modules/sketch-types.module.js +9 -0
  307. package/dist/styles/tokens/modules/sketch-types.module.js.map +1 -0
  308. package/dist/tests/setup.d.ts +2 -0
  309. package/dist/tests/setup.d.ts.map +1 -0
  310. package/dist/types/consent.types.d.ts +10 -0
  311. package/dist/types/consent.types.d.ts.map +1 -0
  312. package/dist/types/consent.types.js +2 -0
  313. package/dist/types/consent.types.js.map +1 -0
  314. package/dist/types/icon.types.d.ts +2 -0
  315. package/dist/types/icon.types.d.ts.map +1 -0
  316. package/dist/types/icon.types.js +2 -0
  317. package/dist/types/icon.types.js.map +1 -0
  318. package/dist/types/list.types.d.ts +14 -0
  319. package/dist/types/list.types.d.ts.map +1 -0
  320. package/dist/types/list.types.js +2 -0
  321. package/dist/types/list.types.js.map +1 -0
  322. package/package.json +108 -0
package/README.md ADDED
@@ -0,0 +1,880 @@
1
+ ![GitHub package.json version](https://img.shields.io/github/package-json/v/a-ng-d/unoff-ui?color=informational) ![GitHub last commit](https://img.shields.io/github/last-commit/a-ng-d/unoff-ui?color=informational) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/a-ng-d/unoff-ui/npm.yml?label=npm) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/a-ng-d/unoff-ui/chromatic.yml?label=Chromatic) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/a-ng-d/unoff-ui/deploy.yml?label=Deployment)
2
+ ![GitHub](https://img.shields.io/github/license/a-ng-d/unoff-ui?color=informational)
3
+
4
+ # Unoff UI
5
+
6
+ Unoff UI is a comprehensive library of UI components designed specifically for building Figma, Penpot, and Sketch plugins. It leverages modern tools and frameworks to ensure a seamless development experience.
7
+
8
+ ## Features
9
+
10
+ - **Built with React**: A popular JavaScript library for building user interfaces
11
+ - **Bundled with Vite**: Fast and optimized build tool for modern web projects
12
+ - **Tested with Vitest**: Ensures reliability and robustness of components with interaction tests
13
+ - **Exposed with Storybook**: Interactive UI component explorer for easy development and testing
14
+ - **Design tokens with Terrazzo**: Theme management using design tokens for consistent styling across platforms. [View Terrazzo Guide](./docs/terrazzo-guide.md)
15
+ - **Theme Generator**: Create custom themes easily with the [Theme Generator](./docs/theme-generator.md) tool based on Figma theme structure
16
+ - **SCSS Builder**: Generate theme-specific SCSS files from tokens using the build-scss script, with support for building components across all themes
17
+ - **Interaction Testing**: Automated interaction tests for all components using Storybook play functions.
18
+
19
+ ## Installation
20
+
21
+ To install Unoff UI, use npm or yarn:
22
+
23
+ ```bash
24
+ npm install @unoff/ui
25
+ # or
26
+ yarn add @unoff/ui
27
+ ```
28
+
29
+ ## Testing
30
+
31
+ Unoff UI comes with comprehensive interaction tests for all components:
32
+
33
+ ```bash
34
+ # Run only Storybook interaction tests
35
+ npm run test:storybook
36
+ ```
37
+
38
+ Tests can also be run directly in Storybook UI:
39
+
40
+ 1. Start Storybook: `npm run storybook`
41
+ 2. Open the Tests panel in the sidebar
42
+ 3. Click "Run all" to execute all interaction tests
43
+
44
+ ## Theme Development Tools
45
+
46
+ Unoff UI provides powerful tools for creating and managing custom themes:
47
+
48
+ ### Theme Generator
49
+
50
+ Create new themes based on existing design systems (Sketch, Figma UI, etc.) with a single command:
51
+
52
+ ```bash
53
+ npm run create:theme
54
+ ```
55
+
56
+ The Theme Generator automates the creation of all necessary files and configurations:
57
+
58
+ - Tokens JSON files
59
+ - Terrazzo configuration
60
+ - Storybook integration
61
+ - SCSS imports
62
+
63
+ [Learn more about the Theme Generator](./docs/theme-generator.md)
64
+
65
+ ### SCSS Builder
66
+
67
+ Generate theme-specific SCSS files from design tokens with these commands:
68
+
69
+ ```bash
70
+ # List available themes and components
71
+ npm run scss:list
72
+
73
+ # Build all SCSS files
74
+ npm run scss:build
75
+
76
+ # Build SCSS for a specific theme
77
+ npm run scss:build theme=themeName
78
+
79
+ # Build SCSS for a specific component across all themes
80
+ npm run scss:build component=componentName
81
+
82
+ # Build SCSS for a specific component within a specific theme
83
+ npm run scss:build theme=themeName component=componentName
84
+
85
+ # Build specific token types across all themes
86
+ npm run scss:build text
87
+ npm run scss:build color
88
+ npm run scss:build icon
89
+ npm run scss:build type
90
+
91
+ # Build specific token types for a specific theme
92
+ npm run scss:build theme=themeName text
93
+ npm run scss:build theme=themeName color
94
+ ```
95
+
96
+ ## Usage
97
+
98
+ ### Slots
99
+
100
+ #### Bar
101
+
102
+ ```tsx
103
+ import { Bar } from '@unoff/ui'
104
+
105
+ function App() {
106
+ return (
107
+ <Bar
108
+ leftPartSlot={<div>Left very long text that may be truncated</div>}
109
+ rightPartSlot={<div>Right very long text that may be truncated</div>}
110
+ truncate={['LEFT', 'RIGHT']}
111
+ padding="12px"
112
+ />
113
+ )
114
+ }
115
+ ```
116
+
117
+ #### Form Item
118
+
119
+ ```tsx
120
+ import { FormItem } from '@unoff/ui'
121
+ import { Input } from '@unoff/ui'
122
+
123
+ function App() {
124
+ return (
125
+ <FormItem
126
+ id="text-input-item"
127
+ label="Type your name"
128
+ helper={{
129
+ type: 'INFO',
130
+ message: 'First name followed by your last name',
131
+ }}
132
+ shouldFill={false}
133
+ isBlocked={false}
134
+ isNew={false}
135
+ >
136
+ <Input
137
+ id="text-input-item"
138
+ type="TEXT"
139
+ value="Jean-Michel Avous"
140
+ />
141
+ </FormItem>
142
+ )
143
+ }
144
+ ```
145
+
146
+ #### Section
147
+
148
+ ```tsx
149
+ import { Section } from '@unoff/ui'
150
+
151
+ function App() {
152
+ return (
153
+ <Section
154
+ title="Section Title"
155
+ description="Section description goes here"
156
+ isNew={false}
157
+ >
158
+ <div>Section content goes here</div>
159
+ </Section>
160
+ )
161
+ }
162
+ ```
163
+
164
+ #### Drawer
165
+
166
+ ```tsx
167
+ import { Drawer } from '@unoff/ui'
168
+
169
+ function App() {
170
+ return (
171
+ <Drawer
172
+ title="Drawer Title"
173
+ isOpen={true}
174
+ onClose={() => console.log('Drawer closed')}
175
+ >
176
+ <div>Drawer content goes here</div>
177
+ </Drawer>
178
+ )
179
+ }
180
+ ```
181
+
182
+ ### Actions
183
+
184
+ #### Primary Button
185
+
186
+ ```tsx
187
+ import { Button } from '@unoff/ui'
188
+
189
+ function App() {
190
+ return (
191
+ <Button
192
+ type="primary"
193
+ size="default"
194
+ label="Primary action button"
195
+ preview={{
196
+ image: 'https://placehold.co/96x96',
197
+ text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
198
+ }}
199
+ feature="PRIMARY_ACTION"
200
+ action={() => console.log('Primary button clicked')}
201
+ />
202
+ )
203
+ }
204
+ ```
205
+
206
+ #### Secondary Button
207
+
208
+ ```tsx
209
+ import { Button } from '@unoff/ui'
210
+
211
+ function App() {
212
+ return (
213
+ <Button
214
+ type="secondary"
215
+ size="default"
216
+ label="Secondary action button"
217
+ feature="SECONDARY_ACTION"
218
+ action={() => console.log('Secondary button clicked')}
219
+ />
220
+ )
221
+ }
222
+ ```
223
+
224
+ #### Tertiary Button
225
+
226
+ ```tsx
227
+ import { Button } from '@unoff/ui'
228
+
229
+ function App() {
230
+ return (
231
+ <Button
232
+ type="tertiary"
233
+ label="Tertiary action button"
234
+ feature="TERTIARY_ACTION"
235
+ isLink={true}
236
+ url="https://example.com"
237
+ action={() => console.log('Tertiary button clicked')}
238
+ />
239
+ )
240
+ }
241
+ ```
242
+
243
+ #### Destructive Button
244
+
245
+ ```tsx
246
+ import { Button } from '@unoff/ui'
247
+
248
+ function App() {
249
+ return (
250
+ <Button
251
+ type="destructive"
252
+ size="default"
253
+ label="Destructive action button"
254
+ feature="DESTRUCTIVE_ACTION"
255
+ action={() => console.log('Destructive button clicked')}
256
+ />
257
+ )
258
+ }
259
+ ```
260
+
261
+ #### Icon Button
262
+
263
+ ```tsx
264
+ import { Button } from '@unoff/ui'
265
+
266
+ function App() {
267
+ return (
268
+ <Button
269
+ type="icon"
270
+ size="default"
271
+ state="default"
272
+ icon="adjust"
273
+ helper={{
274
+ label: 'Adjust',
275
+ type: 'SINGLE_LINE',
276
+ }}
277
+ action={() => console.log('Icon button clicked')}
278
+ />
279
+ )
280
+ }
281
+ ```
282
+
283
+ ### Inputs
284
+
285
+ #### Short Text Input
286
+
287
+ ```tsx
288
+ import { Input } from '@unoff/ui'
289
+
290
+ function App() {
291
+ return (
292
+ <Input
293
+ id="short-text-typing"
294
+ type="TEXT"
295
+ placeholder="Type something (64 characters max.)…"
296
+ value=""
297
+ charactersLimit={64}
298
+ feature="TYPE_SHORT_TEXT"
299
+ state="DEFAULT"
300
+ isAutoFocus={false}
301
+ isClearable={false}
302
+ isFramed={true}
303
+ onChange={(e) => console.log(e.target.value)}
304
+ />
305
+ )
306
+ }
307
+ ```
308
+
309
+ #### Long Text Input
310
+
311
+ ```tsx
312
+ import { Input } from '@unoff/ui'
313
+
314
+ function App() {
315
+ return (
316
+ <Input
317
+ id="long-text-typing"
318
+ type="LONG_TEXT"
319
+ placeholder="Type something"
320
+ value=""
321
+ feature="TYPE_LONG_TEXT"
322
+ state="DEFAULT"
323
+ isGrowing={false}
324
+ onChange={(e) => console.log(e.target.value)}
325
+ />
326
+ )
327
+ }
328
+ ```
329
+
330
+ #### Color Picker
331
+
332
+ ```tsx
333
+ import { Input } from '@unoff/ui'
334
+
335
+ function App() {
336
+ return (
337
+ <Input
338
+ id="color-picker"
339
+ type="COLOR"
340
+ value="#87ebe7"
341
+ feature="PICK_COLOR"
342
+ onChange={(e) => console.log(e.target.value)}
343
+ />
344
+ )
345
+ }
346
+ ```
347
+
348
+ #### Numeric Stepper
349
+
350
+ ```tsx
351
+ import { Input } from '@unoff/ui'
352
+
353
+ function App() {
354
+ return (
355
+ <Input
356
+ id="numeric-stepper"
357
+ type="NUMBER"
358
+ icon={{
359
+ type: 'LETTER',
360
+ value: 'H',
361
+ }}
362
+ value="20"
363
+ min="0"
364
+ max="100"
365
+ step="1"
366
+ feature="ADJUST_NUMBER"
367
+ onChange={(e) => console.log(e.target.value)}
368
+ />
369
+ )
370
+ }
371
+ ```
372
+
373
+ ### Dropdown
374
+
375
+ #### Single Selection
376
+
377
+ ```tsx
378
+ import { Dropdown } from '@unoff/ui'
379
+
380
+ function App() {
381
+ return (
382
+ <Dropdown
383
+ id="dropdown-button"
384
+ options={[
385
+ {
386
+ label: 'Option 1',
387
+ value: 'OPTION_1',
388
+ type: 'OPTION',
389
+ },
390
+ {
391
+ label: 'Option 2',
392
+ value: 'OPTION_2',
393
+ type: 'OPTION',
394
+ children: [
395
+ {
396
+ label: 'Option 2.1',
397
+ value: 'OPTION_2.1',
398
+ type: 'OPTION',
399
+ },
400
+ {
401
+ label: 'Option 2.2',
402
+ value: 'OPTION_2.2',
403
+ type: 'OPTION',
404
+ },
405
+ ],
406
+ },
407
+ {
408
+ type: 'SEPARATOR',
409
+ },
410
+ {
411
+ label: 'Title',
412
+ type: 'TITLE',
413
+ },
414
+ {
415
+ label: 'Option 3',
416
+ value: 'OPTION_3',
417
+ type: 'OPTION',
418
+ },
419
+ ]}
420
+ selected="OPTION_1"
421
+ alignment="LEFT"
422
+ onChange={(value) => console.log(value)}
423
+ />
424
+ )
425
+ }
426
+ ```
427
+
428
+ #### Multiple Selection
429
+
430
+ ```tsx
431
+ import { Dropdown } from '@unoff/ui'
432
+
433
+ function App() {
434
+ return (
435
+ <Dropdown
436
+ id="dropdown-button"
437
+ options={[
438
+ {
439
+ label: 'All',
440
+ value: 'ANY',
441
+ type: 'OPTION',
442
+ },
443
+ {
444
+ label: 'Option 1',
445
+ value: 'OPTION_1',
446
+ type: 'OPTION',
447
+ },
448
+ {
449
+ label: 'Option 2',
450
+ value: 'OPTION_2',
451
+ type: 'OPTION',
452
+ },
453
+ ]}
454
+ selected={['ANY']}
455
+ alignment="LEFT"
456
+ onChange={(values) => console.log(values)}
457
+ />
458
+ )
459
+ }
460
+ ```
461
+
462
+ ### Sliders
463
+
464
+ #### Simple Slider
465
+
466
+ ```tsx
467
+ import { SimpleSlider } from '@unoff/ui'
468
+
469
+ function App() {
470
+ return (
471
+ <SimpleSlider
472
+ id="simple-slider"
473
+ label="Simple Slider"
474
+ value={50}
475
+ min={0}
476
+ max={100}
477
+ colors={{
478
+ min: 'white',
479
+ max: 'black',
480
+ }}
481
+ feature="ADJUST_VALUE"
482
+ onChange={(feature, type, value) => console.log(value)}
483
+ />
484
+ )
485
+ }
486
+ ```
487
+
488
+ #### Multiple Slider
489
+
490
+ ```tsx
491
+ import { MultipleSlider } from '@unoff/ui'
492
+
493
+ function App() {
494
+ return (
495
+ <MultipleSlider
496
+ id="multiple-slider"
497
+ label="Multiple Slider"
498
+ stops={[
499
+ { id: 'stop-1', value: 20 },
500
+ { id: 'stop-2', value: 50 },
501
+ { id: 'stop-3', value: 80 },
502
+ ]}
503
+ min={0}
504
+ max={100}
505
+ colors={{
506
+ min: 'white',
507
+ max: 'black',
508
+ }}
509
+ feature="ADJUST_VALUES"
510
+ onChange={(feature, type, value) => console.log(value)}
511
+ />
512
+ )
513
+ }
514
+ ```
515
+
516
+ ### Dialogs
517
+
518
+ #### Simple Dialog
519
+
520
+ ```tsx
521
+ import { Dialog } from '@unoff/ui'
522
+
523
+ function App() {
524
+ return (
525
+ <Dialog
526
+ title="Are you sure to delete?"
527
+ actions={{
528
+ destructive: {
529
+ label: 'Delete',
530
+ action: () => console.log('Delete action'),
531
+ },
532
+ secondary: {
533
+ label: 'Cancel',
534
+ action: () => console.log('Cancel action'),
535
+ },
536
+ }}
537
+ pin="CENTER"
538
+ onClose={() => console.log('Dialog closed')}
539
+ >
540
+ <div className="dialog__text">
541
+ <p>Deleting this item will remove it permanently.</p>
542
+ </div>
543
+ </Dialog>
544
+ )
545
+ }
546
+ ```
547
+
548
+ #### Form Dialog
549
+
550
+ ```tsx
551
+ import { Dialog } from '@unoff/ui'
552
+ import { Input } from '@unoff/ui'
553
+ import { FormItem } from '@unoff/ui'
554
+
555
+ function App() {
556
+ return (
557
+ <Dialog
558
+ title="What do you want to say?"
559
+ actions={{
560
+ primary: {
561
+ label: 'Submit',
562
+ action: () => console.log('Submit action'),
563
+ },
564
+ }}
565
+ pin="CENTER"
566
+ onClose={() => console.log('Dialog closed')}
567
+ >
568
+ <div className="dialog__form">
569
+ <div className="dialog__form__item">
570
+ <FormItem
571
+ label="Full Name"
572
+ id="type-fullname"
573
+ shouldFill
574
+ >
575
+ <Input type="TEXT" />
576
+ </FormItem>
577
+ </div>
578
+ <div className="dialog__form__item">
579
+ <FormItem
580
+ label="Email"
581
+ id="type-email"
582
+ shouldFill
583
+ >
584
+ <Input type="TEXT" />
585
+ </FormItem>
586
+ </div>
587
+ <div className="dialog__form__item">
588
+ <FormItem
589
+ label="Message"
590
+ id="type-message"
591
+ shouldFill
592
+ >
593
+ <Input
594
+ type="LONG_TEXT"
595
+ placeholder="Type your message here"
596
+ />
597
+ </FormItem>
598
+ </div>
599
+ </div>
600
+ </Dialog>
601
+ )
602
+ }
603
+ ```
604
+
605
+ #### Loading Dialog
606
+
607
+ ```tsx
608
+ import { Dialog } from '@unoff/ui'
609
+
610
+ function App() {
611
+ return (
612
+ <Dialog
613
+ title="Loading…"
614
+ pin="CENTER"
615
+ isLoading={true}
616
+ onClose={() => console.log('Dialog closed')}
617
+ />
618
+ )
619
+ }
620
+ ```
621
+
622
+ ### Lists
623
+
624
+ #### Simple List
625
+
626
+ ```tsx
627
+ import { ActionsList } from '@unoff/ui'
628
+
629
+ function App() {
630
+ return (
631
+ <ActionsList
632
+ options={[
633
+ {
634
+ label: 'Option 1',
635
+ value: 'OPTION_1',
636
+ type: 'OPTION',
637
+ action: () => console.log('Option 1 clicked'),
638
+ },
639
+ {
640
+ label: 'Option 2',
641
+ value: 'OPTION_2',
642
+ type: 'OPTION',
643
+ action: () => console.log('Option 2 clicked'),
644
+ },
645
+ {
646
+ label: 'Option 3',
647
+ value: 'OPTION_3',
648
+ type: 'OPTION',
649
+ action: () => console.log('Option 3 clicked'),
650
+ },
651
+ {
652
+ label: 'Option 4',
653
+ value: 'OPTION_4',
654
+ type: 'OPTION',
655
+ action: () => console.log('Option 4 clicked'),
656
+ },
657
+ ]}
658
+ selected="OPTION_1"
659
+ />
660
+ )
661
+ }
662
+ ```
663
+
664
+ #### Grouped List
665
+
666
+ ```tsx
667
+ import { ActionsList } from '@unoff/ui'
668
+
669
+ function App() {
670
+ return (
671
+ <ActionsList
672
+ options={[
673
+ {
674
+ label: 'Group 1',
675
+ type: 'TITLE',
676
+ },
677
+ {
678
+ label: 'Option 1',
679
+ value: 'OPTION_1',
680
+ type: 'OPTION',
681
+ action: () => console.log('Option 1 clicked'),
682
+ },
683
+ {
684
+ label: 'Option 2',
685
+ value: 'OPTION_2',
686
+ type: 'OPTION',
687
+ action: () => console.log('Option 2 clicked'),
688
+ },
689
+ {
690
+ type: 'SEPARATOR',
691
+ },
692
+ {
693
+ label: 'Group 2',
694
+ type: 'TITLE',
695
+ },
696
+ {
697
+ label: 'Option 3',
698
+ value: 'OPTION_3',
699
+ type: 'OPTION',
700
+ action: () => console.log('Option 3 clicked'),
701
+ },
702
+ {
703
+ label: 'Option 4',
704
+ value: 'OPTION_4',
705
+ type: 'OPTION',
706
+ action: () => console.log('Option 4 clicked'),
707
+ },
708
+ ]}
709
+ />
710
+ )
711
+ }
712
+ ```
713
+
714
+ #### Nested List
715
+
716
+ ```tsx
717
+ import { ActionsList } from '@unoff/ui'
718
+
719
+ function App() {
720
+ return (
721
+ <ActionsList
722
+ options={[
723
+ {
724
+ label: 'Group 1',
725
+ value: 'GROUP_1',
726
+ type: 'OPTION',
727
+ children: [
728
+ {
729
+ label: 'Option 1',
730
+ value: 'OPTION_A_1',
731
+ type: 'OPTION',
732
+ action: () => console.log('Option A.1 clicked'),
733
+ },
734
+ {
735
+ label: 'Option 2',
736
+ value: 'OPTION_A_2',
737
+ type: 'OPTION',
738
+ action: () => console.log('Option A.2 clicked'),
739
+ },
740
+ ],
741
+ },
742
+ {
743
+ label: 'Group 2',
744
+ value: 'GROUP_2',
745
+ type: 'OPTION',
746
+ children: [
747
+ {
748
+ label: 'Option 1',
749
+ value: 'OPTION_B_1',
750
+ type: 'OPTION',
751
+ action: () => console.log('Option B.1 clicked'),
752
+ },
753
+ {
754
+ label: 'Option 2',
755
+ value: 'OPTION_B_2',
756
+ type: 'OPTION',
757
+ action: () => console.log('Option B.2 clicked'),
758
+ },
759
+ ],
760
+ },
761
+ ]}
762
+ />
763
+ )
764
+ }
765
+ ```
766
+
767
+ ### Tags
768
+
769
+ #### Basic Chip
770
+
771
+ ```tsx
772
+ import { Chip } from '@unoff/ui'
773
+
774
+ function App() {
775
+ return <Chip state="ACTIVE">New</Chip>
776
+ }
777
+ ```
778
+
779
+ #### Chip with Color Indicator
780
+
781
+ ```tsx
782
+ import { Chip, ColorChip } from '@unoff/ui'
783
+
784
+ function App() {
785
+ return (
786
+ <Chip
787
+ state="ON_BACKGROUND"
788
+ leftSlot={
789
+ <ColorChip
790
+ color="blue"
791
+ width="8px"
792
+ height="8px"
793
+ isRounded={true}
794
+ />
795
+ }
796
+ rightSlot={<div style={{ fontSize: '11px' }}>✔︎</div>}
797
+ >
798
+ AA
799
+ </Chip>
800
+ )
801
+ }
802
+ ```
803
+
804
+ ### Assets
805
+
806
+ #### Icon
807
+
808
+ ```tsx
809
+ import { Icon } from '@unoff/ui'
810
+
811
+ function App() {
812
+ return (
813
+ <>
814
+ {/* Pictogram Icon */}
815
+ <Icon
816
+ type="PICTO"
817
+ iconName="adjust"
818
+ />
819
+
820
+ {/* Letter Icon */}
821
+ <Icon
822
+ type="LETTER"
823
+ iconLetter="L"
824
+ />
825
+ </>
826
+ )
827
+ }
828
+ ```
829
+
830
+ #### Avatar
831
+
832
+ ```tsx
833
+ import { Avatar } from '@unoff/ui'
834
+
835
+ function App() {
836
+ return (
837
+ <>
838
+ {/* Avatar with Image */}
839
+ <Avatar
840
+ avatar="https://example.com/avatar.jpg"
841
+ fullName="John Doe"
842
+ isInverted={false}
843
+ />
844
+
845
+ {/* Default Avatar */}
846
+ <Avatar isInverted={false} />
847
+ </>
848
+ )
849
+ }
850
+ ```
851
+
852
+ #### Thumbnail
853
+
854
+ ```tsx
855
+ import { Thumbnail } from '@unoff/ui'
856
+
857
+ function App() {
858
+ return (
859
+ <Thumbnail
860
+ src="https://example.com/image.jpg"
861
+ width="300px"
862
+ height="200px"
863
+ />
864
+ )
865
+ }
866
+ ```
867
+
868
+ ## Testing
869
+
870
+ To run tests:
871
+
872
+ ```bash
873
+ npm test
874
+ # or
875
+ yarn test
876
+ ```
877
+
878
+ ## License
879
+
880
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.