@sk-web-gui/react 1.2.15 → 1.2.17

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 (272) hide show
  1. package/dist/cjs/index.js.map +1 -1
  2. package/dist/esm/index.js.map +1 -1
  3. package/dist/types/accordion/index.d.ts +1 -0
  4. package/dist/types/accordion/src/accordion/accordion-item.d.ts +1 -1
  5. package/dist/types/accordion/src/index.d.ts +2 -0
  6. package/dist/types/accordion/stories/accordion.stories.d.ts +8 -0
  7. package/dist/types/accordion/stories/disclosure.stories.d.ts +9 -0
  8. package/dist/types/avatar/index.d.ts +2 -0
  9. package/dist/types/avatar/src/avatar.d.ts +17 -0
  10. package/dist/types/avatar/src/index.d.ts +8 -0
  11. package/dist/types/avatar/stories/avatar.stories.d.ts +8 -0
  12. package/dist/types/badge/index.d.ts +2 -0
  13. package/dist/types/badge/src/badge.d.ts +12 -0
  14. package/dist/types/badge/src/index.d.ts +8 -0
  15. package/dist/types/badge/stories/badge.stories.d.ts +8 -0
  16. package/dist/types/breadcrumb/index.d.ts +1 -0
  17. package/dist/types/breadcrumb/stories/breadcrumb.stories.d.ts +7 -0
  18. package/dist/types/button/index.d.ts +1 -0
  19. package/dist/types/button/stories/announcement.d.ts +5 -0
  20. package/dist/types/button/stories/button-group.stories.d.ts +8 -0
  21. package/dist/types/button/stories/button.stories.d.ts +7 -0
  22. package/dist/types/card/index.d.ts +1 -0
  23. package/dist/types/card/stories/card.stories.d.ts +4 -0
  24. package/dist/types/card/stories/meta-card.stories.d.ts +4 -0
  25. package/dist/types/chip/index.d.ts +2 -0
  26. package/dist/types/chip/src/chip.d.ts +7 -0
  27. package/dist/types/chip/src/index.d.ts +4 -0
  28. package/dist/types/chip/stories/chip.stories.d.ts +12 -0
  29. package/dist/types/cookie-consent/index.d.ts +1 -0
  30. package/dist/types/cookie-consent/stories/cookie-consent.stories.d.ts +7 -0
  31. package/dist/types/core/src/aria-plugin.d.ts +4 -0
  32. package/dist/types/core/src/base.d.ts +53 -0
  33. package/dist/types/core/src/colors.d.ts +643 -0
  34. package/dist/types/core/src/components/accordion.d.ts +164 -0
  35. package/dist/types/core/src/components/alert.d.ts +21 -0
  36. package/dist/types/core/src/components/avatar.d.ts +26 -0
  37. package/dist/types/core/src/components/badge.d.ts +21 -0
  38. package/dist/types/core/src/components/breadcrumb.d.ts +28 -0
  39. package/dist/types/core/src/components/button-group.d.ts +25 -0
  40. package/dist/types/core/src/components/button.d.ts +201 -0
  41. package/dist/types/core/src/components/card.d.ts +135 -0
  42. package/dist/types/core/src/components/checkbox.d.ts +108 -0
  43. package/dist/types/core/src/components/chip.d.ts +34 -0
  44. package/dist/types/core/src/components/code.d.ts +8 -0
  45. package/dist/types/core/src/components/combobox.d.ts +72 -0
  46. package/dist/types/core/src/components/cookie-consent.d.ts +35 -0
  47. package/dist/types/core/src/components/dialog.d.ts +5 -0
  48. package/dist/types/core/src/components/divider.d.ts +50 -0
  49. package/dist/types/core/src/components/dot.d.ts +43 -0
  50. package/dist/types/core/src/components/filter.d.ts +14 -0
  51. package/dist/types/core/src/components/footer.d.ts +27 -0
  52. package/dist/types/core/src/components/forms.d.ts +24 -0
  53. package/dist/types/core/src/components/header.d.ts +28 -0
  54. package/dist/types/core/src/components/icon.d.ts +38 -0
  55. package/dist/types/core/src/components/input.d.ts +214 -0
  56. package/dist/types/core/src/components/kbd.d.ts +7 -0
  57. package/dist/types/core/src/components/label.d.ts +27 -0
  58. package/dist/types/core/src/components/link.d.ts +43 -0
  59. package/dist/types/core/src/components/list.d.ts +52 -0
  60. package/dist/types/core/src/components/logo.d.ts +48 -0
  61. package/dist/types/core/src/components/menu-vertical.d.ts +215 -0
  62. package/dist/types/core/src/components/menubar.d.ts +35 -0
  63. package/dist/types/core/src/components/modal.d.ts +45 -0
  64. package/dist/types/core/src/components/pagination.d.ts +101 -0
  65. package/dist/types/core/src/components/popup-menu.d.ts +138 -0
  66. package/dist/types/core/src/components/progress-bar.d.ts +13 -0
  67. package/dist/types/core/src/components/progress-stepper.d.ts +60 -0
  68. package/dist/types/core/src/components/radio.d.ts +125 -0
  69. package/dist/types/core/src/components/search-field.d.ts +34 -0
  70. package/dist/types/core/src/components/select.d.ts +141 -0
  71. package/dist/types/core/src/components/snackbar.d.ts +30 -0
  72. package/dist/types/core/src/components/spinner.d.ts +10 -0
  73. package/dist/types/core/src/components/switch.d.ts +64 -0
  74. package/dist/types/core/src/components/table-autotable.d.ts +221 -0
  75. package/dist/types/core/src/components/table.d.ts +11 -0
  76. package/dist/types/core/src/components/tabs.d.ts +14 -0
  77. package/dist/types/core/src/components/tooltip.d.ts +53 -0
  78. package/dist/types/core/src/components/user-menu.d.ts +14 -0
  79. package/dist/types/core/src/data-plugin.d.ts +4 -0
  80. package/dist/types/core/src/index.d.ts +6 -0
  81. package/dist/types/core/src/plugin.d.ts +12 -0
  82. package/dist/types/core/src/preset.d.ts +18 -0
  83. package/dist/types/core/src/theme.d.ts +4 -0
  84. package/dist/types/core/src/units.d.ts +251 -0
  85. package/dist/types/core/src/with-opacity.d.ts +4 -0
  86. package/dist/types/divider/index.d.ts +2 -0
  87. package/dist/types/divider/src/divider-section.d.ts +12 -0
  88. package/dist/types/divider/src/divider.d.ts +8 -0
  89. package/dist/types/divider/src/index.d.ts +10 -0
  90. package/dist/types/divider/src/styles.d.ts +1 -0
  91. package/dist/types/divider/stories/divider-section.stories.d.ts +8 -0
  92. package/dist/types/divider/stories/divider.stories.d.ts +8 -0
  93. package/dist/types/filter/index.d.ts +2 -0
  94. package/dist/types/filter/src/filter-item.d.ts +7 -0
  95. package/dist/types/filter/src/filter-label.d.ts +7 -0
  96. package/dist/types/filter/src/filter.d.ts +6 -0
  97. package/dist/types/filter/src/index.d.ts +12 -0
  98. package/dist/types/filter/stories/filter.stories.d.ts +7 -0
  99. package/dist/types/forms/index.d.ts +2 -0
  100. package/dist/types/forms/src/checkbox/checkbox-group.d.ts +46 -0
  101. package/dist/types/forms/src/checkbox/checkbox.d.ts +39 -0
  102. package/dist/types/forms/src/checkbox/index.d.ts +10 -0
  103. package/dist/types/forms/src/checkbox/styles.d.ts +2 -0
  104. package/dist/types/forms/src/combobox/combobox-context.d.ts +42 -0
  105. package/dist/types/forms/src/combobox/combobox-input.d.ts +44 -0
  106. package/dist/types/forms/src/combobox/combobox-list.d.ts +8 -0
  107. package/dist/types/forms/src/combobox/combobox-option.d.ts +11 -0
  108. package/dist/types/forms/src/combobox/combobox.d.ts +6 -0
  109. package/dist/types/forms/src/combobox/index.d.ts +15 -0
  110. package/dist/types/forms/src/combobox/styles.d.ts +1 -0
  111. package/dist/types/forms/src/date-picker/date-picker.d.ts +7 -0
  112. package/dist/types/forms/src/date-picker/index.d.ts +8 -0
  113. package/dist/types/forms/src/form-control/index.d.ts +40 -0
  114. package/dist/types/forms/src/form-error-message/index.d.ts +8 -0
  115. package/dist/types/forms/src/form-helper-text/index.d.ts +8 -0
  116. package/dist/types/forms/src/form-label/index.d.ts +20 -0
  117. package/dist/types/forms/src/index.d.ts +26 -0
  118. package/dist/types/forms/src/input/index.d.ts +13 -0
  119. package/dist/types/forms/src/input/input.d.ts +26 -0
  120. package/dist/types/forms/src/input/styles.d.ts +1 -0
  121. package/dist/types/forms/src/input-addin/index.d.ts +12 -0
  122. package/dist/types/forms/src/input-group/index.d.ts +11 -0
  123. package/dist/types/forms/src/input-group/styles.d.ts +1 -0
  124. package/dist/types/forms/src/radio/index.d.ts +10 -0
  125. package/dist/types/forms/src/radio/radio-group.d.ts +48 -0
  126. package/dist/types/forms/src/radio/radio.d.ts +32 -0
  127. package/dist/types/forms/src/radio/styles.d.ts +3 -0
  128. package/dist/types/forms/src/select/index.d.ts +18 -0
  129. package/dist/types/forms/src/select/styles.d.ts +1 -0
  130. package/dist/types/forms/src/switch/index.d.ts +8 -0
  131. package/dist/types/forms/src/switch/switchcomponent.d.ts +9 -0
  132. package/dist/types/forms/src/text-field/index.d.ts +8 -0
  133. package/dist/types/forms/src/text-field/text-field.d.ts +6 -0
  134. package/dist/types/forms/src/textarea/index.d.ts +12 -0
  135. package/dist/types/forms/stories/check.d.ts +5 -0
  136. package/dist/types/forms/stories/checkbox-group.stories.d.ts +11 -0
  137. package/dist/types/forms/stories/checkbox.stories.d.ts +8 -0
  138. package/dist/types/forms/stories/combobox.stories.d.ts +19 -0
  139. package/dist/types/forms/stories/date-picker.stories.d.ts +21 -0
  140. package/dist/types/forms/stories/form-control.stories.d.ts +10 -0
  141. package/dist/types/forms/stories/input.stories.d.ts +21 -0
  142. package/dist/types/forms/stories/radio-group.stories.d.ts +11 -0
  143. package/dist/types/forms/stories/radio.stories.d.ts +14 -0
  144. package/dist/types/forms/stories/select.stories.d.ts +10 -0
  145. package/dist/types/forms/stories/switch.stories.d.ts +8 -0
  146. package/dist/types/forms/stories/text-field.stories.d.ts +18 -0
  147. package/dist/types/forms/stories/textarea.stories.d.ts +42 -0
  148. package/dist/types/icon/index.d.ts +2 -0
  149. package/dist/types/icon/src/icon-padded.d.ts +4 -0
  150. package/dist/types/icon/src/icon.d.ts +20 -0
  151. package/dist/types/icon/src/index.d.ts +10 -0
  152. package/dist/types/icon/stories/icon-padded.stories.d.ts +8 -0
  153. package/dist/types/icon/stories/icon.stories.d.ts +8 -0
  154. package/dist/types/image/index.d.ts +2 -0
  155. package/dist/types/image/src/image.d.ts +28 -0
  156. package/dist/types/image/src/index.d.ts +4 -0
  157. package/dist/types/image/src/use-image.d.ts +52 -0
  158. package/dist/types/image/stories/image.stories.d.ts +8 -0
  159. package/dist/types/label/index.d.ts +2 -0
  160. package/dist/types/label/src/index.d.ts +8 -0
  161. package/dist/types/label/src/label.d.ts +8 -0
  162. package/dist/types/label/stories/label.stories.d.ts +8 -0
  163. package/dist/types/layout/index.d.ts +1 -0
  164. package/dist/types/layout/src/index.d.ts +2 -0
  165. package/dist/types/layout/stories/footer.stories.d.ts +7 -0
  166. package/dist/types/layout/stories/header.stories.d.ts +5 -0
  167. package/dist/types/link/index.d.ts +1 -0
  168. package/dist/types/link/stories/link.stories.d.ts +12 -0
  169. package/dist/types/list/index.d.ts +1 -0
  170. package/dist/types/list/stories/list.stories.d.ts +7 -0
  171. package/dist/types/logo/index.d.ts +2 -0
  172. package/dist/types/logo/src/assets/index.d.ts +2 -0
  173. package/dist/types/logo/src/assets/logo-svg.d.ts +2 -0
  174. package/dist/types/logo/src/assets/symbol-svg.d.ts +2 -0
  175. package/dist/types/logo/src/index.d.ts +4 -0
  176. package/dist/types/logo/src/logo.d.ts +38 -0
  177. package/dist/types/logo/stories/logo.stories.d.ts +8 -0
  178. package/dist/types/menu-vertical/index.d.ts +1 -0
  179. package/dist/types/menu-vertical/stories/menu-vertical-sidebar.stories.d.ts +8 -0
  180. package/dist/types/menu-vertical/stories/menu-vertical.stories.d.ts +8 -0
  181. package/dist/types/menubar/index.d.ts +1 -0
  182. package/dist/types/menubar/stories/menubar.stories.d.ts +7 -0
  183. package/dist/types/modal/index.d.ts +1 -0
  184. package/dist/types/modal/src/dialog/dialog.d.ts +1 -1
  185. package/dist/types/modal/src/index.d.ts +3 -0
  186. package/dist/types/modal/stories/confirm.stories.d.ts +10 -0
  187. package/dist/types/modal/stories/dialog.stories.d.ts +6 -0
  188. package/dist/types/modal/stories/modal.stories.d.ts +7 -0
  189. package/dist/types/pagination/index.d.ts +1 -0
  190. package/dist/types/pagination/stories/pagination.stories.d.ts +8 -0
  191. package/dist/types/popup-menu/index.d.ts +1 -0
  192. package/dist/types/popup-menu/src/popup-menu-button.d.ts +1 -1
  193. package/dist/types/popup-menu/src/styles.d.ts +1 -0
  194. package/dist/types/popup-menu/stories/popup-menu.stories.d.ts +9 -0
  195. package/dist/types/progress-bar/index.d.ts +2 -0
  196. package/dist/types/progress-bar/src/index.d.ts +8 -0
  197. package/dist/types/progress-bar/src/progress-bar.d.ts +18 -0
  198. package/dist/types/progress-bar/src/styles.d.ts +0 -0
  199. package/dist/types/progress-bar/stories/progress-bar.stories.d.ts +8 -0
  200. package/dist/types/progress-stepper/index.d.ts +2 -0
  201. package/dist/types/progress-stepper/src/index.d.ts +8 -0
  202. package/dist/types/progress-stepper/src/progress-step.d.ts +13 -0
  203. package/dist/types/progress-stepper/src/progress-stepper.d.ts +12 -0
  204. package/dist/types/progress-stepper/stories/progress-stepper.stories.d.ts +8 -0
  205. package/dist/types/react/index.d.ts +2 -0
  206. package/dist/types/react/src/index.d.ts +35 -0
  207. package/dist/types/searchfield/index.d.ts +1 -0
  208. package/dist/types/searchfield/src/searchfield-suggestions-list.d.ts +3 -1
  209. package/dist/types/searchfield/src/searchfield-suggestions-option.d.ts +3 -1
  210. package/dist/types/searchfield/src/searchfield-suggestions.d.ts +3 -1
  211. package/dist/types/searchfield/src/searchfield.d.ts +2 -2
  212. package/dist/types/searchfield/stories/searchfield-suggestions.stories.d.ts +8 -0
  213. package/dist/types/searchfield/stories/searchfield.stories.d.ts +6 -0
  214. package/dist/types/snackbar/index.d.ts +1 -0
  215. package/dist/types/snackbar/stories/snackbar.stories.d.ts +8 -0
  216. package/dist/types/spinner/index.d.ts +2 -0
  217. package/dist/types/spinner/src/assets/spinner-square.d.ts +265 -0
  218. package/dist/types/spinner/src/index.d.ts +4 -0
  219. package/dist/types/spinner/src/spinner.d.ts +14 -0
  220. package/dist/types/spinner/stories/spinner.stories.d.ts +8 -0
  221. package/dist/types/table/index.d.ts +1 -0
  222. package/dist/types/table/stories/autotable.stories.d.ts +10 -0
  223. package/dist/types/table/stories/table.stories.d.ts +11 -0
  224. package/dist/types/tabs/index.d.ts +1 -0
  225. package/dist/types/tabs/stories/tabs.stories.d.ts +12 -0
  226. package/dist/types/text/index.d.ts +1 -0
  227. package/dist/types/text/stories/text.stories.d.ts +7 -0
  228. package/dist/types/theme/index.d.ts +2 -0
  229. package/dist/types/theme/src/colors.d.ts +1410 -0
  230. package/dist/types/theme/src/create-memo-class.d.ts +1 -0
  231. package/dist/types/theme/src/create-theme-vars/calc.d.ts +19 -0
  232. package/dist/types/theme/src/create-theme-vars/create-theme-vars.d.ts +9 -0
  233. package/dist/types/theme/src/create-theme-vars/css-var.d.ts +7 -0
  234. package/dist/types/theme/src/create-theme-vars/index.d.ts +4 -0
  235. package/dist/types/theme/src/create-theme-vars/theme-tokens.d.ts +8 -0
  236. package/dist/types/theme/src/create-theme-vars/to-css-var.d.ts +2 -0
  237. package/dist/types/theme/src/default-theme.d.ts +4 -0
  238. package/dist/types/theme/src/gui-provider.d.ts +34 -0
  239. package/dist/types/theme/src/index.d.ts +14 -0
  240. package/dist/types/theme/src/types.d.ts +54 -0
  241. package/dist/types/theme/src/units.d.ts +226 -0
  242. package/dist/types/theme/src/use-safe-effect.d.ts +2 -0
  243. package/dist/types/theme/src/utils.d.ts +1 -0
  244. package/dist/types/toast/index.d.ts +2 -0
  245. package/dist/types/toast/src/index.d.ts +7 -0
  246. package/dist/types/toast/src/toast.d.ts +62 -0
  247. package/dist/types/toasted-notes/index.d.ts +2 -0
  248. package/dist/types/toasted-notes/src/Alert.d.ts +8 -0
  249. package/dist/types/toasted-notes/src/Message.d.ts +26 -0
  250. package/dist/types/toasted-notes/src/Positions.d.ts +9 -0
  251. package/dist/types/toasted-notes/src/Toast.d.ts +13 -0
  252. package/dist/types/toasted-notes/src/ToastManager.d.ts +45 -0
  253. package/dist/types/toasted-notes/src/index.d.ts +4 -0
  254. package/dist/types/toasted-notes/src/useTimeout.d.ts +3 -0
  255. package/dist/types/tooltip/index.d.ts +2 -0
  256. package/dist/types/tooltip/src/index.d.ts +8 -0
  257. package/dist/types/tooltip/src/tooltip.d.ts +14 -0
  258. package/dist/types/tooltip/stories/tooltip.stories.d.ts +9 -0
  259. package/dist/types/user-menu/index.d.ts +1 -0
  260. package/dist/types/user-menu/stories/user-menu.stories.d.ts +8 -0
  261. package/dist/types/utils/index.d.ts +2 -0
  262. package/dist/types/utils/src/assertion.d.ts +6 -0
  263. package/dist/types/utils/src/children.d.ts +8 -0
  264. package/dist/types/utils/src/color.d.ts +10 -0
  265. package/dist/types/utils/src/index.d.ts +20 -0
  266. package/dist/types/utils/src/object.d.ts +6 -0
  267. package/dist/types/utils/src/refs.d.ts +5 -0
  268. package/dist/types/utils/src/slug.d.ts +1 -0
  269. package/dist/types/utils/src/types.d.ts +56 -0
  270. package/dist/types/utils/src/use-on-element-outside.d.ts +39 -0
  271. package/dist/types/utils/src/walk-object.d.ts +5 -0
  272. package/package.json +37 -37
@@ -0,0 +1 @@
1
+ export declare function createMemoClass(func: (props: any) => string): (args?: any) => string;
@@ -0,0 +1,19 @@
1
+ export type Operand = string | number | {
2
+ reference: string;
3
+ };
4
+ interface CalcChain {
5
+ add: (...operands: Array<Operand>) => CalcChain;
6
+ subtract: (...operands: Array<Operand>) => CalcChain;
7
+ multiply: (...operands: Array<Operand>) => CalcChain;
8
+ divide: (...operands: Array<Operand>) => CalcChain;
9
+ negate: () => CalcChain;
10
+ toString: () => string;
11
+ }
12
+ export declare const calc: ((x: Operand) => CalcChain) & {
13
+ add: (...operands: Array<Operand>) => string;
14
+ subtract: (...operands: Array<Operand>) => string;
15
+ multiply: (...operands: Array<Operand>) => string;
16
+ divide: (...operands: Array<Operand>) => string;
17
+ negate: (x: Operand) => string;
18
+ };
19
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Dict } from '@sk-web-gui/utils';
2
+ export interface CreateThemeVarsOptions {
3
+ cssVarPrefix?: string;
4
+ }
5
+ export interface ThemeVars {
6
+ cssVars: Dict;
7
+ cssMap: Dict;
8
+ }
9
+ export declare function createThemeVars(target: Dict, options: CreateThemeVarsOptions): ThemeVars;
@@ -0,0 +1,7 @@
1
+ export declare function addPrefix(value: string, prefix?: string): string;
2
+ export declare function toVarReference(name: string, fallback?: string): string;
3
+ export declare function toVarDefinition(value: string, prefix?: string): string;
4
+ export declare function cssVar(name: string, fallback?: string, cssVarPrefix?: string): {
5
+ variable: string;
6
+ reference: string;
7
+ };
@@ -0,0 +1,4 @@
1
+ export * from './calc';
2
+ export * from './css-var';
3
+ export * from './to-css-var';
4
+ export type { ThemeScale } from './theme-tokens';
@@ -0,0 +1,8 @@
1
+ import { Dict } from '@sk-web-gui/utils';
2
+ declare const tokens: readonly ["colors", "cursor", "rounded", "fontSize", "lineHeight", "spacing", "screens", "radius"];
3
+ export type ThemeScale = (typeof tokens)[number] | 'transition.duration' | 'transition.property' | 'transition.easing';
4
+ export declare function extractTokens(theme: Dict): {
5
+ [x: string]: any;
6
+ };
7
+ export declare function omitVars(rawTheme: Dict): Omit<Dict, "__cssMap" | "__cssVars" | "__breakpoints">;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { WithCSSVar, Dict } from '@sk-web-gui/utils';
2
+ export declare function toCSSVar<T extends Dict>(rawTheme: T): WithCSSVar<T>;
@@ -0,0 +1,4 @@
1
+ import { GuiTheme, ColorScheme } from './types';
2
+ export declare const lightScheme: ColorScheme;
3
+ export declare const darkScheme: ColorScheme;
4
+ export declare const defaultTheme: GuiTheme;
@@ -0,0 +1,34 @@
1
+ import { Dict, WithCSSVar } from '@sk-web-gui/utils';
2
+ import React from 'react';
3
+ import { GuiTheme, GuiThemeOverride } from './types';
4
+ export declare enum ColorSchemeMode {
5
+ Dark = "dark",
6
+ Light = "light",
7
+ System = "system"
8
+ }
9
+ export declare const GuiContext: React.Context<{
10
+ theme: WithCSSVar<Dict>;
11
+ /**
12
+ * The chosen colorScheme
13
+ */
14
+ colorScheme: ColorSchemeMode;
15
+ /**
16
+ * Set the colorScheme
17
+ */
18
+ setColorScheme: (scheme: ColorSchemeMode) => void;
19
+ /**
20
+ * Scheme that is used when set to "system"
21
+ */
22
+ preferredColorScheme: Exclude<ColorSchemeMode, ColorSchemeMode.System>;
23
+ } | undefined>;
24
+ export interface GuiProviderProps {
25
+ children: React.ReactNode;
26
+ theme?: GuiTheme;
27
+ /**
28
+ * @default system
29
+ */
30
+ colorScheme?: ColorSchemeMode;
31
+ }
32
+ export declare function GuiProvider({ theme, colorScheme: _colorScheme, children }: GuiProviderProps): import("react/jsx-runtime").JSX.Element;
33
+ export declare function useGui<T extends object = Dict>(): WithCSSVar<T>;
34
+ export declare function extendTheme(themeOverride: GuiThemeOverride): GuiTheme;
@@ -0,0 +1,14 @@
1
+ export * from './gui-provider';
2
+ export type * from './gui-provider';
3
+ export * from './create-memo-class';
4
+ export type * from './create-memo-class';
5
+ export * from './create-theme-vars';
6
+ export type * from './create-theme-vars';
7
+ export * from './default-theme';
8
+ export type * from './default-theme';
9
+ export * from './colors';
10
+ export type * from './colors';
11
+ export * from './types';
12
+ export type * from './types';
13
+ export * from './units';
14
+ export type * from './units';
@@ -0,0 +1,54 @@
1
+ import { DeepPartial } from '@sk-web-gui/utils';
2
+ export type RecursiveProperty<Nested = string | number> = RecursiveObject<Nested> | Nested;
3
+ export interface RecursiveObject<Nested = string | number> {
4
+ [property: string]: RecursiveProperty<Nested>;
5
+ }
6
+ export interface ColorHues {
7
+ 50: string;
8
+ 100: string;
9
+ 200: string;
10
+ 300: string;
11
+ 400: string;
12
+ 500: string;
13
+ 600: string;
14
+ 700: string;
15
+ 800: string;
16
+ 900: string;
17
+ lightest?: string;
18
+ darkest?: string;
19
+ }
20
+ export interface ThemeOption {
21
+ [key: string | number]: string | ThemeOption;
22
+ }
23
+ export type Colors = RecursiveObject<Record<string, Partial<ColorHues>> | string>;
24
+ export interface ColorScheme {
25
+ id: string;
26
+ type: 'light' | 'dark';
27
+ colors: {
28
+ bg: {
29
+ base: string;
30
+ fill: string;
31
+ };
32
+ text: {
33
+ foreground: string;
34
+ muted: string;
35
+ };
36
+ severity?: {
37
+ error: ThemeOption;
38
+ warning: ThemeOption;
39
+ info: ThemeOption;
40
+ };
41
+ } & Colors;
42
+ }
43
+ export interface GuiTheme {
44
+ readonly cursor: 'default' | 'pointer';
45
+ readonly rounded: string;
46
+ readonly colorSchemes: Record<string, ColorScheme>;
47
+ readonly fontSize: ThemeOption;
48
+ readonly lineHeight: ThemeOption;
49
+ readonly spacing: ThemeOption;
50
+ readonly screens: ThemeOption;
51
+ readonly radius: ThemeOption;
52
+ readonly config: Record<string, unknown>;
53
+ }
54
+ export type GuiThemeOverride = DeepPartial<GuiTheme>;
@@ -0,0 +1,226 @@
1
+ export declare const spacing: {
2
+ 0: string;
3
+ 2: string;
4
+ 4: string;
5
+ 6: string;
6
+ 8: string;
7
+ 10: string;
8
+ 12: string;
9
+ 14: string;
10
+ 16: string;
11
+ 18: string;
12
+ 20: string;
13
+ 24: string;
14
+ 32: string;
15
+ 40: string;
16
+ 48: string;
17
+ 56: string;
18
+ 64: string;
19
+ 72: string;
20
+ 80: string;
21
+ };
22
+ export declare const breakpoints: {
23
+ phone: {
24
+ DEFAULT: string;
25
+ min: string;
26
+ max: string;
27
+ };
28
+ 'small-device': {
29
+ DEFAULT: string;
30
+ min: string;
31
+ max: string;
32
+ };
33
+ 'medium-device': {
34
+ DEFAULT: string;
35
+ min: string;
36
+ max: string;
37
+ };
38
+ 'large-device': {
39
+ DEFAULT: string;
40
+ min: string;
41
+ max: string;
42
+ };
43
+ desktop: {
44
+ DEFAULT: string;
45
+ min: string;
46
+ max: string;
47
+ };
48
+ };
49
+ export declare const screens: {
50
+ xs: string;
51
+ sm: string;
52
+ md: string;
53
+ lg: string;
54
+ xl: string;
55
+ phone: string;
56
+ 'phone-min': string;
57
+ 'phone-max': string;
58
+ 'small-device': string;
59
+ 'small-device-min': string;
60
+ 'small-device-max': string;
61
+ 'medium-device': string;
62
+ 'medium-device-min': string;
63
+ 'medium-device-max': string;
64
+ 'large-device': string;
65
+ 'large-device-min': string;
66
+ 'large-device-max': string;
67
+ desktop: string;
68
+ 'desktop-min': string;
69
+ 'desktop-max': string;
70
+ };
71
+ export declare const fontSizes: {
72
+ display: {
73
+ 1: {
74
+ DEFAULT: string;
75
+ lg: string;
76
+ md: string;
77
+ sm: string;
78
+ };
79
+ 2: {
80
+ DEFAULT: string;
81
+ lg: string;
82
+ md: string;
83
+ sm: string;
84
+ };
85
+ 3: {
86
+ DEFAULT: string;
87
+ lg: string;
88
+ md: string;
89
+ sm: string;
90
+ };
91
+ };
92
+ h: {
93
+ 1: {
94
+ DEFAULT: string;
95
+ lg: string;
96
+ md: string;
97
+ sm: string;
98
+ };
99
+ 2: {
100
+ DEFAULT: string;
101
+ lg: string;
102
+ md: string;
103
+ sm: string;
104
+ };
105
+ 3: {
106
+ DEFAULT: string;
107
+ lg: string;
108
+ md: string;
109
+ sm: string;
110
+ };
111
+ 4: {
112
+ DEFAULT: string;
113
+ lg: string;
114
+ md: string;
115
+ sm: string;
116
+ };
117
+ };
118
+ label: {
119
+ large: string;
120
+ medium: string;
121
+ small: string;
122
+ };
123
+ input: {
124
+ large: string;
125
+ medium: string;
126
+ small: string;
127
+ };
128
+ lead: string;
129
+ base: string;
130
+ large: string;
131
+ small: string;
132
+ };
133
+ export declare const lineHeights: {
134
+ display: {
135
+ 1: {
136
+ DEFAULT: string;
137
+ lg: string;
138
+ md: string;
139
+ sm: string;
140
+ };
141
+ 2: {
142
+ DEFAULT: string;
143
+ lg: string;
144
+ md: string;
145
+ sm: string;
146
+ };
147
+ 3: {
148
+ DEFAULT: string;
149
+ lg: string;
150
+ md: string;
151
+ sm: string;
152
+ };
153
+ };
154
+ h: {
155
+ 1: {
156
+ DEFAULT: string;
157
+ lg: string;
158
+ md: string;
159
+ sm: string;
160
+ };
161
+ 2: {
162
+ DEFAULT: string;
163
+ lg: string;
164
+ md: string;
165
+ sm: string;
166
+ };
167
+ 3: {
168
+ DEFAULT: string;
169
+ lg: string;
170
+ md: string;
171
+ sm: string;
172
+ };
173
+ 4: {
174
+ DEFAULT: string;
175
+ lg: string;
176
+ md: string;
177
+ sm: string;
178
+ };
179
+ };
180
+ label: {
181
+ large: string;
182
+ medium: string;
183
+ small: string;
184
+ };
185
+ input: {
186
+ large: string;
187
+ medium: string;
188
+ small: string;
189
+ };
190
+ lead: string;
191
+ base: string;
192
+ large: string;
193
+ small: string;
194
+ };
195
+ export declare const radius: {
196
+ circular: {
197
+ DEFAULT: string;
198
+ lg: string;
199
+ md: string;
200
+ sm: string;
201
+ };
202
+ button: {
203
+ DEFAULT: string;
204
+ lg: string;
205
+ md: string;
206
+ sm: string;
207
+ };
208
+ cards: {
209
+ DEFAULT: string;
210
+ lg: string;
211
+ md: string;
212
+ sm: string;
213
+ };
214
+ utility: {
215
+ DEFAULT: string;
216
+ lg: string;
217
+ md: string;
218
+ sm: string;
219
+ };
220
+ groups: {
221
+ DEFAULT: string;
222
+ lg: string;
223
+ md: string;
224
+ sm: string;
225
+ };
226
+ };
@@ -0,0 +1,2 @@
1
+ import { useEffect } from 'react';
2
+ export declare const useSafeEffect: typeof useEffect;
@@ -0,0 +1 @@
1
+ export declare const isBrowser: boolean;
@@ -0,0 +1,2 @@
1
+ export * from './src';
2
+ export type * from './src';
@@ -0,0 +1,7 @@
1
+ import { createToast, useToastOptions } from './toast';
2
+ export { createToast };
3
+ export type { useToastOptions };
4
+ declare const _default: {
5
+ createToast: typeof createToast;
6
+ };
7
+ export default _default;
@@ -0,0 +1,62 @@
1
+ import { Position } from '@sk-web-gui/toasted-notes';
2
+ import { DefaultProps } from '@sk-web-gui/utils';
3
+ import React from 'react';
4
+ interface IToast extends DefaultProps {
5
+ /**
6
+ * The title of the toast.
7
+ */
8
+ title?: string;
9
+ /**
10
+ * If `true` adds a close button to the toast.
11
+ */
12
+ closeable?: boolean;
13
+ /**
14
+ * Callback function to close the toast.
15
+ */
16
+ onClose?: () => void;
17
+ /**
18
+ * Callback function to undo the toast.
19
+ */
20
+ onUndo?: () => void;
21
+ /**
22
+ * The description of the toast
23
+ */
24
+ description?: string;
25
+ /**
26
+ * The undo text of the toast
27
+ */
28
+ undoText?: string;
29
+ /**
30
+ * Duration before dismiss in milliseconds, or `null` to never dismiss.
31
+ */
32
+ duration?: number | null;
33
+ /**
34
+ * One of toasted-notes positions.
35
+ */
36
+ position?: keyof typeof Position;
37
+ /**
38
+ * The message of the toast
39
+ */
40
+ message?: string;
41
+ /**
42
+ * The status of the toast
43
+ */
44
+ status?: 'info' | 'success' | 'error' | 'warning';
45
+ /**
46
+ * Custom icon
47
+ */
48
+ icon?: React.ElementType;
49
+ /**
50
+ * Custom close icon
51
+ */
52
+ closeIcon?: React.ElementType;
53
+ }
54
+ interface RenderOption {
55
+ render?: (props: {
56
+ onClose: (id: string) => void;
57
+ id: string;
58
+ }) => React.ReactNode;
59
+ }
60
+ export type useToastOptions = IToast & RenderOption;
61
+ export declare function createToast(Comp: React.ElementType): () => ({ position, duration, render, ...rest }: useToastOptions) => any;
62
+ export default createToast;
@@ -0,0 +1,2 @@
1
+ export * from './src';
2
+ export type * from './src';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ id: string;
4
+ title: React.ReactNode | string;
5
+ onClose: () => void;
6
+ }
7
+ declare const Alert: ({ id, title, onClose }: Props) => import("react/jsx-runtime").JSX.Element;
8
+ export default Alert;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import POSITIONS from './Positions';
3
+ interface MessageCallback {
4
+ id: string;
5
+ onClose: () => void;
6
+ }
7
+ export type MessageType = 'default' | 'success' | 'error';
8
+ export type PositionsType = keyof typeof POSITIONS;
9
+ export type MessageProp = React.ReactNode | ((callback: MessageCallback) => React.ReactNode) | string;
10
+ export interface MessageOptions {
11
+ id: string;
12
+ duration: number | null;
13
+ type: MessageType;
14
+ onRequestRemove: () => void;
15
+ onRequestClose: () => void;
16
+ showing: boolean;
17
+ position: PositionsType;
18
+ }
19
+ interface Props extends MessageOptions {
20
+ message: MessageProp;
21
+ zIndex?: number;
22
+ requestClose?: boolean;
23
+ position: PositionsType;
24
+ }
25
+ export declare const Message: ({ id, message, position, onRequestRemove, requestClose, duration }: Props) => import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -0,0 +1,9 @@
1
+ declare const POSITIONS: {
2
+ top: string;
3
+ 'top-left': string;
4
+ 'top-right': string;
5
+ bottom: string;
6
+ 'bottom-left': string;
7
+ 'bottom-right': string;
8
+ };
9
+ export default POSITIONS;
@@ -0,0 +1,13 @@
1
+ import { MessageOptionalOptions } from './ToastManager';
2
+ import { MessageProp, PositionsType } from './Message';
3
+ export declare class Toaster {
4
+ createNotification?: Function;
5
+ removeAll?: Function;
6
+ closeToast?: Function;
7
+ constructor();
8
+ closeAll: () => void;
9
+ bindNotify: (fn: Function, removeAll: Function, closeToast: Function) => void;
10
+ notify: (message: MessageProp, options?: MessageOptionalOptions) => any;
11
+ close: (id: number, position: PositionsType) => void;
12
+ }
13
+ export default Toaster;
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { PositionsType, MessageType, MessageOptions, MessageProp } from './Message';
3
+ interface Props {
4
+ notify: (fn: Function, closeAll: Function, close: Function) => void;
5
+ }
6
+ export interface MessageOptionalOptions {
7
+ type?: MessageType;
8
+ duration?: number | null;
9
+ position?: PositionsType;
10
+ }
11
+ interface ToastArgs extends MessageOptions {
12
+ message: MessageProp;
13
+ }
14
+ type State = {
15
+ top: Array<ToastArgs>;
16
+ 'top-left': Array<ToastArgs>;
17
+ 'top-right': Array<ToastArgs>;
18
+ 'bottom-left': Array<ToastArgs>;
19
+ bottom: Array<ToastArgs>;
20
+ 'bottom-right': Array<ToastArgs>;
21
+ };
22
+ export declare class ToastManager extends React.Component<Props, State> {
23
+ static idCounter: number;
24
+ state: State;
25
+ constructor(props: Props);
26
+ notify: (message: MessageProp, options: MessageOptionalOptions) => {
27
+ id: number;
28
+ position: "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
29
+ };
30
+ closeAll: () => void;
31
+ createToastState: (message: MessageProp, options: MessageOptionalOptions) => {
32
+ id: number;
33
+ message: MessageProp;
34
+ position: "bottom" | "top" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
35
+ showing: boolean;
36
+ duration: number | null;
37
+ onRequestRemove: () => void;
38
+ type: MessageType | undefined;
39
+ };
40
+ closeToast: (id: string, position: PositionsType) => void;
41
+ removeToast: (id: string, position: PositionsType) => void;
42
+ getStyle: (position: PositionsType) => React.CSSProperties;
43
+ render(): import("react/jsx-runtime").JSX.Element[];
44
+ }
45
+ export default ToastManager;
@@ -0,0 +1,4 @@
1
+ import { Toaster } from './Toast';
2
+ declare const toaster: Toaster;
3
+ export { default as Position } from './Positions';
4
+ export { toaster };
@@ -0,0 +1,3 @@
1
+ type Callback = () => void;
2
+ export declare function useTimeout(callback: Callback, delay: number | null): void;
3
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './src';
2
+ export type * from './src';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Tooltip, TooltipProps } from './tooltip';
3
+ export { Tooltip };
4
+ export type { TooltipProps };
5
+ declare const _default: {
6
+ Tooltip: import("react").ForwardRefExoticComponent<TooltipProps & import("react").RefAttributes<HTMLSpanElement>>;
7
+ };
8
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import { DefaultProps } from '@sk-web-gui/utils';
2
+ import React from 'react';
3
+ interface ITooltipProps extends DefaultProps {
4
+ /** Select the position of the tooltip
5
+ * @default below
6
+ */
7
+ position?: 'above' | 'below' | 'right' | 'left';
8
+ /** React Node */
9
+ children?: React.ReactNode;
10
+ }
11
+ export interface TooltipProps extends React.HTMLAttributes<HTMLSpanElement>, ITooltipProps {
12
+ }
13
+ export declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLSpanElement>>;
14
+ export default Tooltip;
@@ -0,0 +1,9 @@
1
+ import { TooltipProps } from '../src';
2
+ import React from 'react';
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, TooltipProps & React.RefAttributes<HTMLSpanElement>>;
4
+ export default _default;
5
+ export declare const Template: {
6
+ (args: TooltipProps): import("react/jsx-runtime").JSX.Element;
7
+ storyName: string;
8
+ };
9
+ export declare const Example: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +1,2 @@
1
1
  export * from './src';
2
+ export type * from './src';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { UserMenuProps } from '@sk-web-gui/react';
3
+ declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react").ReactRenderer, Omit<UserMenuProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export default _default;
5
+ export declare const Template: {
6
+ (args: UserMenuProps): import("react/jsx-runtime").JSX.Element;
7
+ storyName: string;
8
+ };
@@ -0,0 +1,2 @@
1
+ export * from './src';
2
+ export type * from './src';
@@ -0,0 +1,6 @@
1
+ import { Dict } from './types';
2
+ export declare function isArray<T>(value: any): value is Array<T>;
3
+ export declare function isObject(value: any): value is Dict;
4
+ export declare const __DEV__: boolean;
5
+ /** @deprecated This should not be used, as it's not reliable */
6
+ export declare const __REACT_NAME__: 'displayName' | 'name';