@deix/rossini-core 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/lib/package.json +2 -1
  2. package/lib/src/components/buttons/Avatar/Avatar.d.ts +7 -2
  3. package/lib/src/components/buttons/Avatar/Avatar.d.ts.map +1 -1
  4. package/lib/src/components/buttons/Avatar/Avatar.js +2 -2
  5. package/lib/src/components/buttons/LanguageSelect/LanguageSelect.d.ts +0 -1
  6. package/lib/src/components/buttons/LanguageSelect/LanguageSelect.d.ts.map +1 -1
  7. package/lib/src/components/buttons/LanguageSelect/LanguageSelect.js +1 -1
  8. package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts +4 -5
  9. package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.d.ts.map +1 -1
  10. package/lib/src/components/buttons/ToggleButtonGroup/ToggleButtonGroup.js +2 -2
  11. package/lib/src/components/buttons/index.d.ts +3 -3
  12. package/lib/src/components/buttons/index.d.ts.map +1 -1
  13. package/lib/src/components/buttons/index.js +3 -3
  14. package/lib/src/components/display/Accordion/Accordion.d.ts +22 -1
  15. package/lib/src/components/display/Accordion/Accordion.d.ts.map +1 -1
  16. package/lib/src/components/layout/MinimalLayout/MinimalLayout.d.ts +17 -2
  17. package/lib/src/components/layout/MinimalLayout/MinimalLayout.d.ts.map +1 -1
  18. package/lib/src/components/layout/MinimalLayout/MinimalLayout.js +13 -2
  19. package/lib/src/components/layout/StandardLayout/StandardLayout.d.ts +24 -0
  20. package/lib/src/components/layout/StandardLayout/StandardLayout.d.ts.map +1 -1
  21. package/lib/src/components/layout/components/Sidebar/Sidebar.d.ts +41 -1
  22. package/lib/src/components/layout/components/Sidebar/Sidebar.d.ts.map +1 -1
  23. package/lib/src/components/layout/components/Sidebar/Sidebar.js +16 -6
  24. package/lib/src/components/layout/components/Topbar/Topbar.d.ts +15 -0
  25. package/lib/src/components/layout/components/Topbar/Topbar.d.ts.map +1 -1
  26. package/lib/src/components/layout/components/Topbar/Topbar.js +1 -1
  27. package/lib/src/index.d.ts +1 -1
  28. package/lib/src/index.d.ts.map +1 -1
  29. package/lib/src/index.js +1 -1
  30. package/lib/src/types/languages.d.ts +17 -0
  31. package/lib/src/types/languages.d.ts.map +1 -1
  32. package/lib/src/types/languages.js +5 -0
  33. package/lib/src/utils/helpers/dateHelpers.d.ts +1 -0
  34. package/lib/src/utils/helpers/dateHelpers.d.ts.map +1 -1
  35. package/lib/src/utils/helpers/dateHelpers.js +14 -0
  36. package/lib/src/utils/helpers/index.d.ts +1 -1
  37. package/lib/src/utils/helpers/index.d.ts.map +1 -1
  38. package/lib/src/utils/helpers/index.js +1 -1
  39. package/lib/src/utils/hooks/useAPI.d.ts +6 -0
  40. package/lib/src/utils/hooks/useAPI.d.ts.map +1 -1
  41. package/lib/src/utils/hooks/useAPI.js +6 -0
  42. package/lib/src/utils/hooks/useKeycloak.d.ts +9 -0
  43. package/lib/src/utils/hooks/useKeycloak.d.ts.map +1 -1
  44. package/lib/src/utils/hooks/useLocale.d.ts +3 -0
  45. package/lib/src/utils/hooks/useLocale.d.ts.map +1 -1
  46. package/lib/src/utils/hooks/useLocale.js +3 -0
  47. package/lib/src/utils/hooks/usePersistedState.d.ts +6 -0
  48. package/lib/src/utils/hooks/usePersistedState.d.ts.map +1 -1
  49. package/lib/src/utils/hooks/usePersistedState.js +6 -0
  50. package/lib/src/utils/index.d.ts +1 -1
  51. package/lib/src/utils/index.d.ts.map +1 -1
  52. package/lib/src/utils/index.js +1 -1
  53. package/lib/src/utils/theme/typography.d.ts +2 -2
  54. package/lib/src/utils/theme/typography.d.ts.map +1 -1
  55. package/lib/src/utils/theme/typography.js +2 -1
  56. package/lib/tsconfig-lib.tsbuildinfo +1 -1
  57. package/package.json +2 -1
@@ -1,4 +1,10 @@
1
1
  import { AxiosInstance } from 'axios';
2
+ /**
3
+ * Create an Axios instance.
4
+ *
5
+ * @param {string} baseURL the API address.
6
+ * @returns
7
+ */
2
8
  declare const useAPI: (baseURL?: string) => AxiosInstance;
3
9
  export default useAPI;
4
10
  //# sourceMappingURL=useAPI.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAPI.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useAPI.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C,QAAA,MAAM,MAAM,aAAc,MAAM,KAAG,aAM/B,CAAC;AAEL,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"useAPI.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useAPI.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE7C;;;;;GAKG;AACH,QAAA,MAAM,MAAM,aAAc,MAAM,KAAG,aAM/B,CAAC;AAEL,eAAe,MAAM,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import axios from 'axios';
2
+ /**
3
+ * Create an Axios instance.
4
+ *
5
+ * @param {string} baseURL the API address.
6
+ * @returns
7
+ */
2
8
  var useAPI = function (baseURL) {
3
9
  return axios.create({
4
10
  baseURL: baseURL,
@@ -1,7 +1,16 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  export interface UserInfo {
3
+ /**
4
+ * The email address of the user.
5
+ */
3
6
  email: string;
7
+ /**
8
+ * The user id.
9
+ */
4
10
  user: string;
11
+ /**
12
+ * The user name.
13
+ */
5
14
  preferredUserName: string;
6
15
  }
7
16
  export declare const useUserInfo: (apiClient: AxiosInstance) => import("react-query").UseQueryResult<UserInfo, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"useKeycloak.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useKeycloak.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAqBD,eAAO,MAAM,WAAW,cAAe,aAAa,4DAKhD,CAAC"}
1
+ {"version":3,"file":"useKeycloak.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useKeycloak.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAqBD,eAAO,MAAM,WAAW,cAAe,aAAa,4DAKhD,CAAC"}
@@ -1,3 +1,6 @@
1
1
  import { Locale } from '../../types/languages';
2
+ /**
3
+ * Gets the internationalization locale
4
+ */
2
5
  export declare const useLocale: () => Locale;
3
6
  //# sourceMappingURL=useLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useLocale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,eAAO,MAAM,SAAS,QAAO,MAK5B,CAAC"}
1
+ {"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useLocale.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,SAAS,QAAO,MAK5B,CAAC"}
@@ -1,4 +1,7 @@
1
1
  import { useRouter } from 'next/router';
2
+ /**
3
+ * Gets the internationalization locale
4
+ */
2
5
  export var useLocale = function () {
3
6
  var router = useRouter();
4
7
  var locale = router.locale || 'en';
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Use a variable stored persistently on local storage.
3
+ *
4
+ * @param {string} name the name of the variable in local storage.
5
+ * @param {T} defaultValue the default value. The first time the hook is called the variable is created with this value.
6
+ */
1
7
  declare function usePersistedState<T>(name: string, defaultValue: T): [T, (value: T) => void];
2
8
  export default usePersistedState;
3
9
  //# sourceMappingURL=usePersistedState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePersistedState.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/usePersistedState.ts"],"names":[],"mappings":"AAEA,iBAAS,iBAAiB,CAAC,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,GACd,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAyBzB;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"usePersistedState.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/usePersistedState.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,iBAAS,iBAAiB,CAAC,CAAC,EAC1B,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,CAAC,GACd,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,CAyBzB;AAED,eAAe,iBAAiB,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import { useEffect, useState } from 'react';
2
+ /**
3
+ * Use a variable stored persistently on local storage.
4
+ *
5
+ * @param {string} name the name of the variable in local storage.
6
+ * @param {T} defaultValue the default value. The first time the hook is called the variable is created with this value.
7
+ */
2
8
  function usePersistedState(name, defaultValue) {
3
9
  var _a = useState(function () {
4
10
  try {
@@ -1,4 +1,4 @@
1
- export { camelToSnake, colorToRgb, commonStart, dateDiff, getTextColor, getTimeStr, hexToRgb, isValidDate, stringToColor, toTitleCase, } from './helpers';
1
+ export { camelToSnake, colorToRgb, commonStart, dateDiff, getTextColor, getTimeStr, hexToRgb, isValidDate, stringToColor, toLocalStandardDateString, toTitleCase, } from './helpers';
2
2
  export { useAPI, useLocale, usePersistedState, useUserInfo } from './hooks';
3
3
  export type { UserInfo } from './hooks';
4
4
  export { default as PageProvider } from './provider/PageProvider';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,EAAE,aAAa,EAAE,WAAW,GACxC,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC5E,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,WAAW,EACX,aAAa,EACb,yBAAyB,EACzB,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC5E,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1,3 +1,3 @@
1
- export { camelToSnake, colorToRgb, commonStart, dateDiff, getTextColor, getTimeStr, hexToRgb, isValidDate, stringToColor, toTitleCase, } from './helpers';
1
+ export { camelToSnake, colorToRgb, commonStart, dateDiff, getTextColor, getTimeStr, hexToRgb, isValidDate, stringToColor, toLocalStandardDateString, toTitleCase, } from './helpers';
2
2
  export { useAPI, useLocale, usePersistedState, useUserInfo } from './hooks';
3
3
  export { default as PageProvider } from './provider/PageProvider';
@@ -1,4 +1,4 @@
1
- declare const _default: {
1
+ declare const fonts: {
2
2
  fontFamily: string;
3
3
  body1: {
4
4
  fontSize: string;
@@ -63,5 +63,5 @@ declare const _default: {
63
63
  lineHeight: number;
64
64
  };
65
65
  };
66
- export default _default;
66
+ export default fonts;
67
67
  //# sourceMappingURL=typography.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../src/utils/theme/typography.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wBAgEE"}
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../../src/utils/theme/typography.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgEV,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,4 +1,4 @@
1
- export default {
1
+ var fonts = {
2
2
  fontFamily: 'Raleway, Arial',
3
3
  body1: {
4
4
  fontSize: '1rem',
@@ -63,3 +63,4 @@ export default {
63
63
  lineHeight: 1.375,
64
64
  },
65
65
  };
66
+ export default fonts;