@olenbetong/appframe-ds 0.4.1 → 0.6.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 (128) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +4 -4
  3. package/scripts/copyAssets.mjs +12 -0
  4. package/src/AfLookup/Lookup.tsx +3 -4
  5. package/src/AfLookup/LookupEdit.tsx +3 -4
  6. package/src/binding/CancelButton.tsx +4 -1
  7. package/src/binding/CancelIconButton.tsx +2 -2
  8. package/src/binding/DataEditToolbar.tsx +1 -2
  9. package/src/binding/DeleteButton.tsx +6 -2
  10. package/src/binding/DeleteIconButton.tsx +5 -4
  11. package/src/binding/RefreshButton.tsx +7 -3
  12. package/src/binding/RefreshIconButton.tsx +6 -5
  13. package/src/binding/RefreshRowIconButton.tsx +6 -5
  14. package/src/binding/SaveButton.tsx +14 -4
  15. package/src/binding/SaveIconButton.tsx +13 -6
  16. package/src/index.ts +5 -0
  17. package/src/input/InputAdornments.css +75 -0
  18. package/src/input/InputAdornments.tsx +97 -0
  19. package/src/input/index.ts +1 -0
  20. package/src/layout/AppLayoutDesktop.tsx +3 -0
  21. package/src/layout/AppLayoutMobile.tsx +3 -0
  22. package/src/layout/AppMenu.css +1 -0
  23. package/src/layout/PageContainer.tsx +6 -0
  24. package/src/layout/index.tsx +5 -0
  25. package/src/list/ItemList.css +30 -0
  26. package/src/list/ItemList.tsx +52 -0
  27. package/src/list/ItemListItem.tsx +41 -0
  28. package/src/list/ItemListItemText.tsx +23 -0
  29. package/src/list/index.ts +3 -0
  30. package/src/page/Page.css +45 -0
  31. package/src/page/Page.tsx +70 -0
  32. package/src/page/PageBlock.css +59 -0
  33. package/src/page/PageBlock.tsx +78 -0
  34. package/src/page/PageHeader.css +148 -0
  35. package/src/page/PageHeader.tsx +184 -0
  36. package/src/page/index.ts +3 -0
  37. package/src/paper/Paper.css +35 -0
  38. package/src/paper/Paper.tsx +50 -0
  39. package/src/paper/index.ts +1 -0
  40. package/src/progress/LinearProgress.css +93 -0
  41. package/src/progress/LinearProgress.tsx +104 -0
  42. package/src/progress/index.ts +1 -0
  43. package/es/AfLookup/BoundLookup.d.ts +0 -10
  44. package/es/AfLookup/BoundLookup.js +0 -16
  45. package/es/AfLookup/Combobox.css +0 -78
  46. package/es/AfLookup/Combobox.d.ts +0 -32
  47. package/es/AfLookup/Combobox.js +0 -76
  48. package/es/AfLookup/Lookup.css +0 -125
  49. package/es/AfLookup/Lookup.d.ts +0 -35
  50. package/es/AfLookup/Lookup.js +0 -59
  51. package/es/AfLookup/LookupEdit.d.ts +0 -21
  52. package/es/AfLookup/LookupEdit.js +0 -49
  53. package/es/AfLookup/LookupGrid.css +0 -57
  54. package/es/AfLookup/LookupGrid.d.ts +0 -13
  55. package/es/AfLookup/LookupGrid.js +0 -27
  56. package/es/AfLookup/index.d.ts +0 -5
  57. package/es/AfLookup/index.js +0 -5
  58. package/es/binding/BoundCheckbox.d.ts +0 -9
  59. package/es/binding/BoundCheckbox.js +0 -13
  60. package/es/binding/BoundDatePicker.d.ts +0 -7
  61. package/es/binding/BoundDatePicker.js +0 -12
  62. package/es/binding/BoundDateTimePicker.d.ts +0 -7
  63. package/es/binding/BoundDateTimePicker.js +0 -14
  64. package/es/binding/BoundInput.d.ts +0 -6
  65. package/es/binding/BoundInput.js +0 -12
  66. package/es/binding/BoundNumericTextField.d.ts +0 -20
  67. package/es/binding/BoundNumericTextField.js +0 -58
  68. package/es/binding/BoundSelect.d.ts +0 -9
  69. package/es/binding/BoundSelect.js +0 -13
  70. package/es/binding/BoundSwitch.d.ts +0 -9
  71. package/es/binding/BoundSwitch.js +0 -13
  72. package/es/binding/BoundTextField.d.ts +0 -7
  73. package/es/binding/BoundTextField.js +0 -22
  74. package/es/binding/CancelButton.d.ts +0 -3
  75. package/es/binding/CancelButton.js +0 -14
  76. package/es/binding/CancelIconButton.d.ts +0 -2
  77. package/es/binding/CancelIconButton.js +0 -15
  78. package/es/binding/DataEditToolbar.d.ts +0 -13
  79. package/es/binding/DataEditToolbar.js +0 -28
  80. package/es/binding/DataObjectSelect.d.ts +0 -50
  81. package/es/binding/DataObjectSelect.js +0 -26
  82. package/es/binding/DeleteButton.d.ts +0 -8
  83. package/es/binding/DeleteButton.js +0 -14
  84. package/es/binding/DeleteIconButton.d.ts +0 -10
  85. package/es/binding/DeleteIconButton.js +0 -15
  86. package/es/binding/RefreshButton.d.ts +0 -3
  87. package/es/binding/RefreshButton.js +0 -14
  88. package/es/binding/RefreshIconButton.d.ts +0 -2
  89. package/es/binding/RefreshIconButton.js +0 -16
  90. package/es/binding/RefreshRowIconButton.d.ts +0 -7
  91. package/es/binding/RefreshRowIconButton.js +0 -15
  92. package/es/binding/SaveButton.d.ts +0 -3
  93. package/es/binding/SaveButton.js +0 -14
  94. package/es/binding/SaveIconButton.d.ts +0 -2
  95. package/es/binding/SaveIconButton.js +0 -15
  96. package/es/binding/index.d.ts +0 -19
  97. package/es/binding/index.js +0 -19
  98. package/es/index.d.ts +0 -3
  99. package/es/index.js +0 -3
  100. package/es/layout/AppLayoutDesktop.css +0 -65
  101. package/es/layout/AppLayoutDesktop.d.ts +0 -3
  102. package/es/layout/AppLayoutDesktop.js +0 -19
  103. package/es/layout/AppLayoutMobile.css +0 -75
  104. package/es/layout/AppLayoutMobile.d.ts +0 -3
  105. package/es/layout/AppLayoutMobile.js +0 -18
  106. package/es/layout/AppMenu.css +0 -67
  107. package/es/layout/AppMenu.d.ts +0 -8
  108. package/es/layout/AppMenu.js +0 -36
  109. package/es/layout/AppMenuItem.css +0 -97
  110. package/es/layout/AppMenuItem.d.ts +0 -50
  111. package/es/layout/AppMenuItem.js +0 -14
  112. package/es/layout/AppMenuSubheader.css +0 -18
  113. package/es/layout/AppMenuSubheader.d.ts +0 -4
  114. package/es/layout/AppMenuSubheader.js +0 -6
  115. package/es/layout/ErrorBoundary.css +0 -101
  116. package/es/layout/ErrorBoundary.d.ts +0 -30
  117. package/es/layout/ErrorBoundary.js +0 -81
  118. package/es/layout/PageContainer.css +0 -29
  119. package/es/layout/PageContainer.d.ts +0 -7
  120. package/es/layout/PageContainer.js +0 -6
  121. package/es/layout/PartnerToggle.d.ts +0 -5
  122. package/es/layout/PartnerToggle.js +0 -9
  123. package/es/layout/constants.d.ts +0 -2
  124. package/es/layout/constants.js +0 -2
  125. package/es/layout/index.css +0 -65
  126. package/es/layout/index.d.ts +0 -33
  127. package/es/layout/index.js +0 -31
  128. package/tsconfig.build.tsbuildinfo +0 -1
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createPortal } from "react-dom";
3
- let toggleRoot = document.createElement("div");
4
- let brand = document.querySelector(".partner-nav__brand");
5
- toggleRoot.id = "toggle-root";
6
- document.querySelector(".partner-nav")?.insertBefore(toggleRoot, brand);
7
- export function PartnerToggle({ onClick, open, }) {
8
- return createPortal(_jsx("button", { type: "button", className: "LayoutSmall-toggle", onClick: onClick, children: open ? "◀" : "☰" }), toggleRoot);
9
- }
@@ -1,2 +0,0 @@
1
- export declare const AF_MUI_PAGE_TITLE_ID = "PageTitleSmallLayout";
2
- export declare const AF_MUI_APPBAR_TOOLS_ID = "AppBarTools";
@@ -1,2 +0,0 @@
1
- export const AF_MUI_PAGE_TITLE_ID = "PageTitleSmallLayout";
2
- export const AF_MUI_APPBAR_TOOLS_ID = "AppBarTools";
@@ -1,65 +0,0 @@
1
- .app-view {
2
- height: 100%;
3
- overflow-y: hidden;
4
- }
5
-
6
- .scroll-view {
7
- height: 100%;
8
- max-height: 100%;
9
- overflow-y: auto;
10
- }
11
-
12
- .flow > * + * {
13
- margin-top: var(--flow-spacing, 1rem) !important;
14
- }
15
-
16
- .flow-xs > * {
17
- --flow-spacing: 0.25rem;
18
- }
19
-
20
- .flow-sm > * {
21
- --flow-spacing: 0.5rem;
22
- }
23
-
24
- .flow-lg > * {
25
- --flow-spacing: 1.5rem;
26
- }
27
-
28
- .flow-xl > * {
29
- --flow-spacing: 2rem;
30
- }
31
-
32
- .flow-xxl > * {
33
- --flow-spacing: 3rem;
34
- }
35
-
36
- .app-grid {
37
- height: 100%;
38
- overflow-y: hidden;
39
- display: grid;
40
- gap: 1rem;
41
- }
42
-
43
- .rows-af {
44
- grid-template-rows: auto 1fr;
45
- }
46
-
47
- .rows-aaf {
48
- grid-template-rows: auto auto 1fr;
49
- }
50
-
51
- .rows-afaf {
52
- grid-template-rows: auto 1fr auto 1fr;
53
- }
54
-
55
- .rows-aff {
56
- grid-template-rows: auto 1fr 1fr;
57
- }
58
-
59
- .rows-f {
60
- grid-template-rows: 1fr;
61
- }
62
-
63
- .rows-ff {
64
- grid-template-rows: 1fr 1fr;
65
- }
@@ -1,33 +0,0 @@
1
- import "./index.css";
2
- import type React from "react";
3
- import type { AppMenuProps } from "./AppMenu.js";
4
- export type AppLayoutProps = {
5
- AppMenuProps?: AppMenuProps;
6
- children: React.ReactNode | React.ReactNode[];
7
- menu?: React.ReactNode | React.ReactNode[];
8
- /**
9
- * @deprecated The toolbar is now server-rendered. This prop has no effect.
10
- */
11
- toolbar?: React.ReactNode | React.ReactNode[];
12
- /**
13
- * @deprecated The title is now rendered in the server-rendered toolbar. This prop has no effect.
14
- */
15
- title?: React.ReactNode;
16
- /**
17
- * @deprecated The toolbar is now server-rendered. This prop has no effect.
18
- */
19
- enableMenuToggle?: boolean;
20
- /**
21
- * Enable partner mode (for partner.olenbetong.no applications).
22
- * Adds a toggle button to the existing partner header instead of the app bar.
23
- */
24
- partner?: boolean;
25
- };
26
- export * from "./AppMenu.js";
27
- export * from "./AppMenuItem.js";
28
- export * from "./AppMenuSubheader.js";
29
- export * from "./constants.js";
30
- export * from "./ErrorBoundary.js";
31
- export * from "./PageContainer.js";
32
- export * from "./PartnerToggle.js";
33
- export declare function AppLayout(props: AppLayoutProps): React.JSX.Element;
@@ -1,31 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import "./index.css";
3
- import { useEffect, useState } from "react";
4
- import { AppLayoutDesktop } from "./AppLayoutDesktop.js";
5
- import { AppLayoutMobile } from "./AppLayoutMobile.js";
6
- function useIsMobile() {
7
- let [isMobile, setIsMobile] = useState(() => {
8
- if (typeof window === "undefined")
9
- return false;
10
- return window.matchMedia("(max-width: 1199px)").matches;
11
- });
12
- useEffect(() => {
13
- let mq = window.matchMedia("(max-width: 1199px)");
14
- let handler = (e) => setIsMobile(e.matches);
15
- mq.addEventListener("change", handler);
16
- return () => mq.removeEventListener("change", handler);
17
- }, []);
18
- return isMobile;
19
- }
20
- export * from "./AppMenu.js";
21
- export * from "./AppMenuItem.js";
22
- export * from "./AppMenuSubheader.js";
23
- export * from "./constants.js";
24
- export * from "./ErrorBoundary.js";
25
- export * from "./PageContainer.js";
26
- export * from "./PartnerToggle.js";
27
- export function AppLayout(props) {
28
- let isSmall = useIsMobile();
29
- let Component = isSmall ? AppLayoutMobile : AppLayoutDesktop;
30
- return _jsx(Component, { ...props });
31
- }