@clickhouse/click-ui 0.0.2 → 0.0.4

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 (237) hide show
  1. package/dist/click-ui.es.js +15975 -0
  2. package/dist/click-ui.umd.js +442 -0
  3. package/package.json +13 -4
  4. package/.eslintrc.cjs +0 -33
  5. package/.github/workflows/deployment.yml +0 -34
  6. package/.prettierrc +0 -14
  7. package/.storybook/main.ts +0 -19
  8. package/.storybook/manager.ts +0 -11
  9. package/.storybook/preview-head.html +0 -2
  10. package/.storybook/preview.tsx +0 -76
  11. package/.storybook/theme.ts +0 -16
  12. package/build-tokens.js +0 -131
  13. package/index.html +0 -17
  14. package/jest.config.ts +0 -11
  15. package/src/App.css +0 -1
  16. package/src/App.module.css +0 -235
  17. package/src/App.tsx +0 -217
  18. package/src/assets/RightArrow/RightArrow.tsx +0 -17
  19. package/src/assets/S3Logo/S3Logo.tsx +0 -31
  20. package/src/assets/react.svg +0 -1
  21. package/src/components/Accordion/Accordion.stories.tsx +0 -28
  22. package/src/components/Accordion/Accordion.test.tsx +0 -46
  23. package/src/components/Accordion/Accordion.tsx +0 -119
  24. package/src/components/Alert/Alert.stories.tsx +0 -14
  25. package/src/components/Alert/Alert.test.tsx +0 -27
  26. package/src/components/Alert/Alert.tsx +0 -130
  27. package/src/components/Avatar/Avatar.stories.tsx +0 -13
  28. package/src/components/Avatar/Avatar.tsx +0 -64
  29. package/src/components/Badge/Badge.stories.ts +0 -30
  30. package/src/components/Badge/Badge.test.tsx +0 -16
  31. package/src/components/Badge/Badge.tsx +0 -78
  32. package/src/components/BigStat/BigStat.stories.ts +0 -20
  33. package/src/components/BigStat/BigStat.tsx +0 -49
  34. package/src/components/Button/Button.stories.ts +0 -26
  35. package/src/components/Button/Button.test.tsx +0 -32
  36. package/src/components/Button/Button.tsx +0 -115
  37. package/src/components/ButtonGroup/ButtonGroup.stories.ts +0 -14
  38. package/src/components/ButtonGroup/ButtonGroup.tsx +0 -78
  39. package/src/components/Card/Card.stories.ts +0 -19
  40. package/src/components/Card/Card.tsx +0 -107
  41. package/src/components/Checkbox/Checkbox.stories.tsx +0 -35
  42. package/src/components/Checkbox/Checkbox.test.tsx +0 -41
  43. package/src/components/Checkbox/Checkbox.tsx +0 -89
  44. package/src/components/ContextMenu/ContextMenu.stories.tsx +0 -73
  45. package/src/components/ContextMenu/ContextMenu.test.tsx +0 -152
  46. package/src/components/ContextMenu/ContextMenu.tsx +0 -155
  47. package/src/components/Dropdown/Dropdown.stories.tsx +0 -64
  48. package/src/components/Dropdown/Dropdown.test.tsx +0 -141
  49. package/src/components/Dropdown/Dropdown.tsx +0 -149
  50. package/src/components/FormField/Label.stories.tsx +0 -39
  51. package/src/components/FormField/Label.tsx +0 -47
  52. package/src/components/FormField/Select.stories.tsx +0 -48
  53. package/src/components/FormField/Select.test.tsx +0 -216
  54. package/src/components/FormField/Select.tsx +0 -574
  55. package/src/components/FormField/SelectContext.tsx +0 -101
  56. package/src/components/FormField/commonElement.tsx +0 -42
  57. package/src/components/GenericMenu.tsx +0 -114
  58. package/src/components/HoverCard/HoverCard.stories.tsx +0 -64
  59. package/src/components/HoverCard/HoverCard.test.tsx +0 -85
  60. package/src/components/HoverCard/HoverCard.tsx +0 -65
  61. package/src/components/Icon/Icon.stories.ts +0 -15
  62. package/src/components/Icon/Icon.tsx +0 -238
  63. package/src/components/Icon/types.ts +0 -95
  64. package/src/components/IconButton/IconButton.stories.ts +0 -34
  65. package/src/components/IconButton/IconButton.test.tsx +0 -32
  66. package/src/components/IconButton/IconButton.tsx +0 -83
  67. package/src/components/Panel/Panel.stories.tsx +0 -25
  68. package/src/components/Panel/Panel.tsx +0 -33
  69. package/src/components/Popover/Popover.stories.tsx +0 -67
  70. package/src/components/Popover/Popover.test.tsx +0 -46
  71. package/src/components/Popover/Popover.tsx +0 -115
  72. package/src/components/RadioGroup/RadioGroup.stories.tsx +0 -43
  73. package/src/components/RadioGroup/RadioGroup.test.tsx +0 -59
  74. package/src/components/RadioGroup/RadioGroup.tsx +0 -149
  75. package/src/components/Separator/Separator.stories.tsx +0 -24
  76. package/src/components/Separator/Separator.tsx +0 -29
  77. package/src/components/SidebarNavigationItem/SidebarNavigationItem.stories.tsx +0 -28
  78. package/src/components/SidebarNavigationItem/SidebarNavigationItem.tsx +0 -112
  79. package/src/components/Spacer/Spacer.stories.tsx +0 -20
  80. package/src/components/Spacer/Spacer.tsx +0 -15
  81. package/src/components/Switch/Switch.stories.ts +0 -14
  82. package/src/components/Switch/Switch.tsx +0 -107
  83. package/src/components/Table/Table.stories.tsx +0 -29
  84. package/src/components/Table/Table.tsx +0 -109
  85. package/src/components/Tabs/Tabs.stories.tsx +0 -36
  86. package/src/components/Tabs/Tabs.test.tsx +0 -86
  87. package/src/components/Tabs/Tabs.tsx +0 -82
  88. package/src/components/Tooltip/Tooltip.stories.tsx +0 -68
  89. package/src/components/Tooltip/Tooltip.test.tsx +0 -44
  90. package/src/components/Tooltip/Tooltip.tsx +0 -67
  91. package/src/components/Typography/Text/Text.stories.tsx +0 -22
  92. package/src/components/Typography/Text/Text.test.tsx +0 -16
  93. package/src/components/Typography/Text/Text.tsx +0 -30
  94. package/src/components/Typography/Title/Title.stories.tsx +0 -31
  95. package/src/components/Typography/Title/Title.test.tsx +0 -16
  96. package/src/components/Typography/Title/Title.tsx +0 -36
  97. package/src/components/icons/Activity.tsx +0 -30
  98. package/src/components/icons/ArrowDown.tsx +0 -22
  99. package/src/components/icons/ArrowRight.tsx +0 -22
  100. package/src/components/icons/ArrowTriangle.tsx +0 -36
  101. package/src/components/icons/ArrowUp.tsx +0 -22
  102. package/src/components/icons/Backups.tsx +0 -29
  103. package/src/components/icons/Blog.tsx +0 -38
  104. package/src/components/icons/Book.tsx +0 -30
  105. package/src/components/icons/Brackets.tsx +0 -22
  106. package/src/components/icons/Briefcase.tsx +0 -30
  107. package/src/components/icons/Building.tsx +0 -30
  108. package/src/components/icons/BurgerMenu.tsx +0 -22
  109. package/src/components/icons/Cards.tsx +0 -30
  110. package/src/components/icons/CellTower.tsx +0 -21
  111. package/src/components/icons/ChatIcon.tsx +0 -22
  112. package/src/components/icons/CheckIcon.tsx +0 -21
  113. package/src/components/icons/CheckInCircle.tsx +0 -39
  114. package/src/components/icons/ChevronDown.tsx +0 -20
  115. package/src/components/icons/ChevronLeft.tsx +0 -22
  116. package/src/components/icons/ChevronRight.tsx +0 -20
  117. package/src/components/icons/ChevronUp.tsx +0 -22
  118. package/src/components/icons/Clock.tsx +0 -37
  119. package/src/components/icons/Cloud.tsx +0 -23
  120. package/src/components/icons/Code.tsx +0 -22
  121. package/src/components/icons/CodeInSquare.tsx +0 -30
  122. package/src/components/icons/Connect.tsx +0 -22
  123. package/src/components/icons/ConnectAlt.tsx +0 -30
  124. package/src/components/icons/Console.tsx +0 -30
  125. package/src/components/icons/Copy.tsx +0 -33
  126. package/src/components/icons/CrossIcon.tsx +0 -29
  127. package/src/components/icons/Data.tsx +0 -36
  128. package/src/components/icons/DatabaseIcon.tsx +0 -31
  129. package/src/components/icons/Disk.tsx +0 -30
  130. package/src/components/icons/Display.tsx +0 -30
  131. package/src/components/icons/Document.tsx +0 -30
  132. package/src/components/icons/DotsHorizontal.tsx +0 -36
  133. package/src/components/icons/DotsVertical.tsx +0 -33
  134. package/src/components/icons/Email.tsx +0 -33
  135. package/src/components/icons/Empty.tsx +0 -14
  136. package/src/components/icons/FilterIcon.tsx +0 -37
  137. package/src/components/icons/Fire.tsx +0 -23
  138. package/src/components/icons/Flags/EuropeanUnion.tsx +0 -174
  139. package/src/components/icons/Flags/Germany.tsx +0 -25
  140. package/src/components/icons/Flags/India.tsx +0 -48
  141. package/src/components/icons/Flags/Ireland.tsx +0 -32
  142. package/src/components/icons/Flags/Netherlands.tsx +0 -29
  143. package/src/components/icons/Flags/Singapore.tsx +0 -43
  144. package/src/components/icons/Flags/UnitedKingdom.tsx +0 -32
  145. package/src/components/icons/Flags/UnitedStates.tsx +0 -26
  146. package/src/components/icons/Flags/index.tsx +0 -46
  147. package/src/components/icons/Folder.tsx +0 -20
  148. package/src/components/icons/Gift.tsx +0 -21
  149. package/src/components/icons/HistoryIcon.tsx +0 -28
  150. package/src/components/icons/Home.tsx +0 -29
  151. package/src/components/icons/Http.tsx +0 -22
  152. package/src/components/icons/Icons.mdx +0 -39
  153. package/src/components/icons/InfoInCircleIcon.tsx +0 -37
  154. package/src/components/icons/InformationIcon.tsx +0 -34
  155. package/src/components/icons/InsertRowIcon.tsx +0 -34
  156. package/src/components/icons/Integrations.tsx +0 -29
  157. package/src/components/icons/LightBulb.tsx +0 -40
  158. package/src/components/icons/Lightening.tsx +0 -30
  159. package/src/components/icons/Loading.tsx +0 -57
  160. package/src/components/icons/Metrics.tsx +0 -38
  161. package/src/components/icons/MetricsAlt.tsx +0 -30
  162. package/src/components/icons/Payment.tsx +0 -23
  163. package/src/components/icons/Payments/Amex.tsx +0 -44
  164. package/src/components/icons/Payments/MasterCard.tsx +0 -48
  165. package/src/components/icons/Payments/Paypal.tsx +0 -41
  166. package/src/components/icons/Payments/Visa.tsx +0 -36
  167. package/src/components/icons/Payments/index.tsx +0 -30
  168. package/src/components/icons/Pencil.tsx +0 -30
  169. package/src/components/icons/PieChart.tsx +0 -30
  170. package/src/components/icons/Play.tsx +0 -30
  171. package/src/components/icons/Plus.tsx +0 -22
  172. package/src/components/icons/Popout.tsx +0 -22
  173. package/src/components/icons/PopoverArrow.tsx +0 -22
  174. package/src/components/icons/Question.tsx +0 -30
  175. package/src/components/icons/Refresh.tsx +0 -29
  176. package/src/components/icons/Search.tsx +0 -22
  177. package/src/components/icons/Secure.tsx +0 -30
  178. package/src/components/icons/Services.tsx +0 -23
  179. package/src/components/icons/Settings.tsx +0 -22
  180. package/src/components/icons/Share.tsx +0 -29
  181. package/src/components/icons/SlideIn.tsx +0 -28
  182. package/src/components/icons/SlideOut.tsx +0 -28
  183. package/src/components/icons/SortAltIcon.tsx +0 -22
  184. package/src/components/icons/SortIcon.tsx +0 -24
  185. package/src/components/icons/Sparkle.tsx +0 -23
  186. package/src/components/icons/Speaker.tsx +0 -30
  187. package/src/components/icons/Speed.tsx +0 -29
  188. package/src/components/icons/Star.tsx +0 -23
  189. package/src/components/icons/Support.tsx +0 -37
  190. package/src/components/icons/Table.tsx +0 -30
  191. package/src/components/icons/Taxi.tsx +0 -120
  192. package/src/components/icons/Trash.tsx +0 -22
  193. package/src/components/icons/Upload.tsx +0 -29
  194. package/src/components/icons/Url.tsx +0 -22
  195. package/src/components/icons/UserIcon.tsx +0 -17
  196. package/src/components/icons/UsersIcon.tsx +0 -43
  197. package/src/components/icons/WarningIcon.tsx +0 -30
  198. package/src/components/index.ts +0 -35
  199. package/src/components/types.ts +0 -1
  200. package/src/index.css +0 -9
  201. package/src/index.ts +0 -2
  202. package/src/main.tsx +0 -11
  203. package/src/stories/assets/code-brackets.svg +0 -1
  204. package/src/stories/assets/colors.svg +0 -1
  205. package/src/stories/assets/comments.svg +0 -1
  206. package/src/stories/assets/direction.svg +0 -1
  207. package/src/stories/assets/flow.svg +0 -1
  208. package/src/stories/assets/plugin.svg +0 -1
  209. package/src/stories/assets/repo.svg +0 -1
  210. package/src/stories/assets/stackalt.svg +0 -1
  211. package/src/styles/Home.module.css +0 -235
  212. package/src/styles/globals.css +0 -111
  213. package/src/styles/types.ts +0 -2089
  214. package/src/styles/variables.classic.css +0 -16
  215. package/src/styles/variables.classic.json +0 -202
  216. package/src/styles/variables.css +0 -763
  217. package/src/styles/variables.dark.css +0 -135
  218. package/src/styles/variables.dark.json +0 -894
  219. package/src/styles/variables.json +0 -2087
  220. package/src/styles/variables.light.css +0 -203
  221. package/src/styles/variables.light.json +0 -949
  222. package/src/theme/index.ts +0 -22
  223. package/src/theme/theme.tsx +0 -28
  224. package/src/vite-env.d.ts +0 -1
  225. package/tokens/themes/$metadata.json +0 -9
  226. package/tokens/themes/$themes.json +0 -3657
  227. package/tokens/themes/classic.json +0 -550
  228. package/tokens/themes/component.json +0 -2252
  229. package/tokens/themes/dark.json +0 -2563
  230. package/tokens/themes/light.json +0 -2645
  231. package/tokens/themes/primitives.json +0 -947
  232. package/tsconfig.json +0 -27
  233. package/tsconfig.node.json +0 -10
  234. package/vite.config.ts +0 -40
  235. /package/{public → dist}/favicon.ico +0 -0
  236. /package/{public → dist}/logo.svg +0 -0
  237. /package/{public → dist}/vite.svg +0 -0
package/src/App.tsx DELETED
@@ -1,217 +0,0 @@
1
- import { useState } from "react";
2
-
3
- import "@/styles/globals.css";
4
- import "./styles/variables.css";
5
- import "./styles/variables.dark.css";
6
-
7
- import styles from "./App.module.css";
8
- import { ThemeName, ThemeProvider } from "./theme";
9
- import {
10
- Accordion,
11
- Alert,
12
- Avatar,
13
- Badge,
14
- Button,
15
- ButtonGroup,
16
- Card,
17
- Checkbox,
18
- DangerAlert,
19
- Icon,
20
- IconButton,
21
- InfoAlert,
22
- SidebarNavigationItem,
23
- Spacer,
24
- SuccessAlert,
25
- Switch,
26
- Tabs,
27
- WarningAlert,
28
- } from "@/components";
29
-
30
- const App = () => {
31
- const [currentTheme, setCurrentTheme] = useState<ThemeName>("dark");
32
- const [selectedButton, setSelectedButton] = useState(0);
33
- const [checked, setChecked] = useState(false);
34
- const [disabled] = useState(false);
35
-
36
- return (
37
- <ThemeProvider theme={currentTheme}>
38
- <div className={styles.flexWrap}>
39
- <IconButton
40
- icon="user"
41
- size="small"
42
- onClick={() => console.log("click")}
43
- />
44
- <IconButton
45
- icon="user"
46
- size="small"
47
- onClick={() => console.log("click")}
48
- />
49
- <IconButton
50
- icon="user"
51
- size="small"
52
- disabled
53
- onClick={() => console.log("click")}
54
- />
55
- </div>
56
- <div className={styles.flexWrap}>
57
- <IconButton
58
- icon="user"
59
- onClick={() => console.log("click")}
60
- />
61
- <IconButton
62
- icon="user"
63
- onClick={() => console.log("click")}
64
- />
65
- <IconButton
66
- disabled
67
- icon="user"
68
- onClick={() => console.log("click")}
69
- />
70
- </div>
71
- <div className={styles.flexWrap}>
72
- <IconButton
73
- type="primary"
74
- icon="user"
75
- onClick={() => console.log("click")}
76
- />
77
- <IconButton
78
- type="primary"
79
- icon="user"
80
- onClick={() => console.log("click")}
81
- />
82
- <IconButton
83
- type="primary"
84
- disabled
85
- icon="user"
86
- onClick={() => console.log("click")}
87
- />
88
- </div>
89
- <div className={styles.flexWrap}>
90
- <Badge text={"default"}></Badge>
91
- <Badge
92
- text={"success"}
93
- state={"success"}
94
- ></Badge>
95
- <Badge
96
- text={"neutral"}
97
- state={"neutral"}
98
- ></Badge>
99
- <Badge
100
- text={"danger"}
101
- state={"danger"}
102
- ></Badge>
103
- <Badge
104
- text={"disabled"}
105
- state={"disabled"}
106
- ></Badge>
107
- </div>
108
- <Card
109
- title="Card title"
110
- description="This is a card description"
111
- badgeText="experiment"
112
- infoText="Read More"
113
- infoUrl="#"
114
- />
115
-
116
- <ButtonGroup
117
- labels={["Left center", "Center", "Center", "Center", "Right end"]}
118
- activeIndex={selectedButton}
119
- onClick={(index: number) => setSelectedButton(index)}
120
- />
121
- <Switch
122
- checked={checked}
123
- disabled={disabled}
124
- onCheckedChange={setChecked}
125
- />
126
- <div style={{ color: "white" }}>disabled: {`${disabled}`}</div>
127
- <button
128
- onClick={() => {
129
- document.body.style.backgroundColor = "black";
130
- setCurrentTheme("dark");
131
- }}
132
- >
133
- Dark
134
- </button>
135
- <button
136
- onClick={() => {
137
- document.body.style.backgroundColor = "white";
138
- setCurrentTheme("light");
139
- }}
140
- >
141
- Light
142
- </button>
143
- <button
144
- onClick={() => {
145
- document.body.style.backgroundColor = "white";
146
- setCurrentTheme("classic");
147
- }}
148
- >
149
- Classic
150
- </button>
151
-
152
- <Button
153
- type="primary"
154
- onClick={() => alert("you clicked on the primary button")}
155
- >
156
- Primary
157
- </Button>
158
- <Button
159
- type="secondary"
160
- onClick={() => alert("you clicked on the secondary button")}
161
- >
162
- Secondary
163
- </Button>
164
- <Icon name="users" />
165
- <Accordion title="Accordion">I'm some content </Accordion>
166
- <SidebarNavigationItem icon="user">
167
- <a href="/color"> link to color</a>
168
- </SidebarNavigationItem>
169
- <SidebarNavigationItem
170
- icon="user"
171
- collapsible
172
- label="collapsible item"
173
- >
174
- <a href="/color"> link to color</a>
175
- </SidebarNavigationItem>
176
- <Checkbox label="accept terms and conditions of this page" />
177
- <Tabs
178
- defaultValue="tab1"
179
- onValueChange={e => console.log(e)}
180
- >
181
- <Tabs.TriggersList>
182
- <Tabs.Trigger value="tab1">tab1 </Tabs.Trigger>
183
- <Tabs.Trigger value="tab2">tab2 </Tabs.Trigger>
184
- <Tabs.Trigger value="tab3">tab3 </Tabs.Trigger>
185
- </Tabs.TriggersList>
186
- <Tabs.Content value="tab1">Tab 1 content</Tabs.Content>
187
- <Tabs.Content value="tab2">Tab 2 content</Tabs.Content>
188
- <Tabs.Content value="tab3">Tab 3 content</Tabs.Content>
189
- </Tabs>
190
- <Alert
191
- text="An example of alert"
192
- title="Title"
193
- />
194
- <DangerAlert
195
- text="An example of alert"
196
- title="Title"
197
- />
198
- <WarningAlert
199
- text="An example of alert"
200
- title="Title"
201
- />
202
-
203
- <Spacer />
204
- <InfoAlert
205
- text="An example of alert"
206
- title="Title"
207
- />
208
- <SuccessAlert
209
- text="An example of alert"
210
- title="Title"
211
- />
212
- <Avatar text="CH" />
213
- </ThemeProvider>
214
- );
215
- };
216
-
217
- export default App;
@@ -1,17 +0,0 @@
1
- export const RightArrow = () => (
2
- <svg
3
- width="20"
4
- height="20"
5
- viewBox="0 0 20 20"
6
- fill="none"
7
- xmlns="http://www.w3.org/2000/svg"
8
- >
9
- <path
10
- d="M8.33334 13.3333L11.6667 10L8.33334 6.66667"
11
- stroke="#161517"
12
- strokeWidth="1.5"
13
- strokeLinecap="round"
14
- strokeLinejoin="round"
15
- />
16
- </svg>
17
- );