@commercelayer/app-elements 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/LICENSE +21 -0
  2. package/dist/@types/Elements.d.ts +1 -0
  3. package/dist/Async-ba6be658.js +80 -0
  4. package/dist/InputDateComponent-89d2ab03.js +8923 -0
  5. package/dist/Select-72746d2c.js +34 -0
  6. package/dist/helpers/date.d.ts +8 -0
  7. package/dist/helpers/downloadJsonAsFile.d.ts +9 -0
  8. package/dist/hooks/useClickAway.d.ts +2 -0
  9. package/dist/main-dc0e3952.js +5009 -0
  10. package/dist/main.d.ts +55 -0
  11. package/dist/main.js +67 -0
  12. package/dist/overrides-52d8822b.js +4253 -0
  13. package/dist/providers/CoreSdkProvider/index.d.ts +20 -0
  14. package/dist/providers/CoreSdkProvider/makeSdkClient.d.ts +7 -0
  15. package/dist/providers/ErrorBoundary.d.ts +19 -0
  16. package/dist/providers/TokenProvider/getAccessTokenFromUrl.d.ts +1 -0
  17. package/dist/providers/TokenProvider/getInfoFromJwt.d.ts +7 -0
  18. package/dist/providers/TokenProvider/index.d.ts +62 -0
  19. package/dist/providers/TokenProvider/reducer.d.ts +21 -0
  20. package/dist/providers/TokenProvider/storage.d.ts +14 -0
  21. package/dist/providers/TokenProvider/types.d.ts +44 -0
  22. package/dist/providers/TokenProvider/url.d.ts +7 -0
  23. package/dist/providers/TokenProvider/validateToken.d.ts +24 -0
  24. package/dist/style.css +1 -0
  25. package/dist/ui/atoms/A.d.ts +8 -0
  26. package/dist/ui/atoms/Badge.d.ts +11 -0
  27. package/dist/ui/atoms/BlockCode.d.ts +11 -0
  28. package/dist/ui/atoms/Button.d.ts +23 -0
  29. package/dist/ui/atoms/Card.d.ts +8 -0
  30. package/dist/ui/atoms/Container.d.ts +20 -0
  31. package/dist/ui/atoms/CopyToClipboard.d.ts +19 -0
  32. package/dist/ui/atoms/DelayShow.d.ts +10 -0
  33. package/dist/ui/atoms/EmptyState.d.ts +13 -0
  34. package/dist/ui/atoms/FormFooter.d.ts +10 -0
  35. package/dist/ui/atoms/Hint.d.ts +11 -0
  36. package/dist/ui/atoms/Icon.d.ts +37 -0
  37. package/dist/ui/atoms/Legend.d.ts +20 -0
  38. package/dist/ui/atoms/PageHeading.d.ts +39 -0
  39. package/dist/ui/atoms/Pagination.d.ts +27 -0
  40. package/dist/ui/atoms/Skeleton.d.ts +41 -0
  41. package/dist/ui/atoms/Spacer.d.ts +28 -0
  42. package/dist/ui/atoms/StatusDot.d.ts +9 -0
  43. package/dist/ui/atoms/StatusIcon.d.ts +16 -0
  44. package/dist/ui/atoms/Tabs.d.ts +46 -0
  45. package/dist/ui/atoms/Text.d.ts +21 -0
  46. package/dist/ui/atoms/dropdown/DropdownMenu.d.ts +10 -0
  47. package/dist/ui/atoms/dropdown/DropdownMenuDivider.d.ts +9 -0
  48. package/dist/ui/atoms/dropdown/DropdownMenuItem.d.ts +10 -0
  49. package/dist/ui/atoms/dropdown/index.d.ts +3 -0
  50. package/dist/ui/atoms/tables/Td.d.ts +9 -0
  51. package/dist/ui/atoms/tables/Th.d.ts +9 -0
  52. package/dist/ui/atoms/tables/Tr.d.ts +9 -0
  53. package/dist/ui/atoms/tables/index.d.ts +3 -0
  54. package/dist/ui/composite/ContextMenu.d.ts +10 -0
  55. package/dist/ui/composite/PageError.d.ts +30 -0
  56. package/dist/ui/composite/PageLayout.d.ts +17 -0
  57. package/dist/ui/composite/PageSkeleton.d.ts +10 -0
  58. package/dist/ui/composite/Report.d.ts +19 -0
  59. package/dist/ui/forms/Input.d.ts +14 -0
  60. package/dist/ui/forms/InputDate/InputDateComponent.d.ts +45 -0
  61. package/dist/ui/forms/InputDate/index.d.ts +5 -0
  62. package/dist/ui/forms/InputDateRange.d.ts +23 -0
  63. package/dist/ui/forms/InputFeedback.d.ts +11 -0
  64. package/dist/ui/forms/InputFile.d.ts +10 -0
  65. package/dist/ui/forms/InputJson.d.ts +14 -0
  66. package/dist/ui/forms/InputReadonly.d.ts +24 -0
  67. package/dist/ui/forms/InputSelect/Async.d.ts +11 -0
  68. package/dist/ui/forms/InputSelect/Select.d.ts +10 -0
  69. package/dist/ui/forms/InputSelect/index.d.ts +59 -0
  70. package/dist/ui/forms/InputSelect/overrides.d.ts +10 -0
  71. package/dist/ui/forms/InputSelect/styles.d.ts +4 -0
  72. package/dist/ui/forms/InputTextArea.d.ts +6 -0
  73. package/dist/ui/forms/InputToggleBox.d.ts +9 -0
  74. package/dist/ui/forms/InputToggleListBox.d.ts +15 -0
  75. package/dist/ui/forms/InputWrapper.d.ts +34 -0
  76. package/dist/ui/forms/Label.d.ts +9 -0
  77. package/dist/ui/forms/RadioButtons.d.ts +18 -0
  78. package/dist/ui/lists/List.d.ts +37 -0
  79. package/dist/ui/lists/ListDetails.d.ts +32 -0
  80. package/dist/ui/lists/ListDetailsItem.d.ts +22 -0
  81. package/dist/ui/lists/ListItem.d.ts +12 -0
  82. package/dist/ui/lists/ListItemTask.d.ts +33 -0
  83. package/dist/ui/tables/Table.d.ts +10 -0
  84. package/dist/ui/tables/TableData.d.ts +13 -0
  85. package/dist/utils/children.d.ts +15 -0
  86. package/dist/utils/extractHeaders.d.ts +6 -0
  87. package/dist/utils/pagination.d.ts +43 -0
  88. package/package.json +70 -0
@@ -0,0 +1,34 @@
1
+ import * as r from "react";
2
+ import a, { forwardRef as s } from "react";
3
+ import { u as m, S as c, d as p, s as i } from "./overrides-52d8822b.js";
4
+ import "react-dom";
5
+ import "./main-dc0e3952.js";
6
+ import "@commercelayer/sdk";
7
+ var l = /* @__PURE__ */ s(function(e, t) {
8
+ var o = m(e);
9
+ return /* @__PURE__ */ r.createElement(c, p({
10
+ ref: t
11
+ }, o));
12
+ });
13
+ const f = l;
14
+ function S({
15
+ onSelect: e,
16
+ noOptionsMessage: t,
17
+ initialValues: o,
18
+ ...n
19
+ }) {
20
+ return /* @__PURE__ */ a.createElement(
21
+ f,
22
+ {
23
+ ...n,
24
+ options: o,
25
+ onChange: e,
26
+ noOptionsMessage: () => t,
27
+ components: i
28
+ }
29
+ );
30
+ }
31
+ S.displayName = "SelectComponent";
32
+ export {
33
+ S as SelectComponent
34
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Format the date as nice string
3
+ * @param dateIsoString - to match iso string `created_at` or `updated_at` from the import object (or <any>_at). Example '2022-10-06T11:59:30.371Z'
4
+ * @param includeTime - optional flag to also include time
5
+ * @param timeZone - optional string to cast a specific timezone and override user's browser default (Eg: UTC)
6
+ * @returns a nice string representation. Example: 'Jul 21, 2022' or 'Jul 21, 2022 · 1:16 PM' if includeTime
7
+ */
8
+ export declare function formatDate(dateIsoString?: string, includeTime?: boolean, timeZone?: string): string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Trigger the download of requested JSON object as user defined file
3
+ * @param json - optional JSON object that will be the content of downloaded file
4
+ * @param filename - string to define the downloaded file name
5
+ */
6
+ export declare function downloadJsonAsFile({ json, filename }: {
7
+ json?: object;
8
+ filename: string;
9
+ }): void;
@@ -0,0 +1,2 @@
1
+ import { RefObject } from 'react';
2
+ export declare const useClickAway: (onClickAway?: () => void) => RefObject<HTMLDivElement> | undefined;