@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.
- package/CHANGELOG.md +22 -0
- package/package.json +4 -4
- package/scripts/copyAssets.mjs +12 -0
- package/src/AfLookup/Lookup.tsx +3 -4
- package/src/AfLookup/LookupEdit.tsx +3 -4
- package/src/binding/CancelButton.tsx +4 -1
- package/src/binding/CancelIconButton.tsx +2 -2
- package/src/binding/DataEditToolbar.tsx +1 -2
- package/src/binding/DeleteButton.tsx +6 -2
- package/src/binding/DeleteIconButton.tsx +5 -4
- package/src/binding/RefreshButton.tsx +7 -3
- package/src/binding/RefreshIconButton.tsx +6 -5
- package/src/binding/RefreshRowIconButton.tsx +6 -5
- package/src/binding/SaveButton.tsx +14 -4
- package/src/binding/SaveIconButton.tsx +13 -6
- package/src/index.ts +5 -0
- package/src/input/InputAdornments.css +75 -0
- package/src/input/InputAdornments.tsx +97 -0
- package/src/input/index.ts +1 -0
- package/src/layout/AppLayoutDesktop.tsx +3 -0
- package/src/layout/AppLayoutMobile.tsx +3 -0
- package/src/layout/AppMenu.css +1 -0
- package/src/layout/PageContainer.tsx +6 -0
- package/src/layout/index.tsx +5 -0
- package/src/list/ItemList.css +30 -0
- package/src/list/ItemList.tsx +52 -0
- package/src/list/ItemListItem.tsx +41 -0
- package/src/list/ItemListItemText.tsx +23 -0
- package/src/list/index.ts +3 -0
- package/src/page/Page.css +45 -0
- package/src/page/Page.tsx +70 -0
- package/src/page/PageBlock.css +59 -0
- package/src/page/PageBlock.tsx +78 -0
- package/src/page/PageHeader.css +148 -0
- package/src/page/PageHeader.tsx +184 -0
- package/src/page/index.ts +3 -0
- package/src/paper/Paper.css +35 -0
- package/src/paper/Paper.tsx +50 -0
- package/src/paper/index.ts +1 -0
- package/src/progress/LinearProgress.css +93 -0
- package/src/progress/LinearProgress.tsx +104 -0
- package/src/progress/index.ts +1 -0
- package/es/AfLookup/BoundLookup.d.ts +0 -10
- package/es/AfLookup/BoundLookup.js +0 -16
- package/es/AfLookup/Combobox.css +0 -78
- package/es/AfLookup/Combobox.d.ts +0 -32
- package/es/AfLookup/Combobox.js +0 -76
- package/es/AfLookup/Lookup.css +0 -125
- package/es/AfLookup/Lookup.d.ts +0 -35
- package/es/AfLookup/Lookup.js +0 -59
- package/es/AfLookup/LookupEdit.d.ts +0 -21
- package/es/AfLookup/LookupEdit.js +0 -49
- package/es/AfLookup/LookupGrid.css +0 -57
- package/es/AfLookup/LookupGrid.d.ts +0 -13
- package/es/AfLookup/LookupGrid.js +0 -27
- package/es/AfLookup/index.d.ts +0 -5
- package/es/AfLookup/index.js +0 -5
- package/es/binding/BoundCheckbox.d.ts +0 -9
- package/es/binding/BoundCheckbox.js +0 -13
- package/es/binding/BoundDatePicker.d.ts +0 -7
- package/es/binding/BoundDatePicker.js +0 -12
- package/es/binding/BoundDateTimePicker.d.ts +0 -7
- package/es/binding/BoundDateTimePicker.js +0 -14
- package/es/binding/BoundInput.d.ts +0 -6
- package/es/binding/BoundInput.js +0 -12
- package/es/binding/BoundNumericTextField.d.ts +0 -20
- package/es/binding/BoundNumericTextField.js +0 -58
- package/es/binding/BoundSelect.d.ts +0 -9
- package/es/binding/BoundSelect.js +0 -13
- package/es/binding/BoundSwitch.d.ts +0 -9
- package/es/binding/BoundSwitch.js +0 -13
- package/es/binding/BoundTextField.d.ts +0 -7
- package/es/binding/BoundTextField.js +0 -22
- package/es/binding/CancelButton.d.ts +0 -3
- package/es/binding/CancelButton.js +0 -14
- package/es/binding/CancelIconButton.d.ts +0 -2
- package/es/binding/CancelIconButton.js +0 -15
- package/es/binding/DataEditToolbar.d.ts +0 -13
- package/es/binding/DataEditToolbar.js +0 -28
- package/es/binding/DataObjectSelect.d.ts +0 -50
- package/es/binding/DataObjectSelect.js +0 -26
- package/es/binding/DeleteButton.d.ts +0 -8
- package/es/binding/DeleteButton.js +0 -14
- package/es/binding/DeleteIconButton.d.ts +0 -10
- package/es/binding/DeleteIconButton.js +0 -15
- package/es/binding/RefreshButton.d.ts +0 -3
- package/es/binding/RefreshButton.js +0 -14
- package/es/binding/RefreshIconButton.d.ts +0 -2
- package/es/binding/RefreshIconButton.js +0 -16
- package/es/binding/RefreshRowIconButton.d.ts +0 -7
- package/es/binding/RefreshRowIconButton.js +0 -15
- package/es/binding/SaveButton.d.ts +0 -3
- package/es/binding/SaveButton.js +0 -14
- package/es/binding/SaveIconButton.d.ts +0 -2
- package/es/binding/SaveIconButton.js +0 -15
- package/es/binding/index.d.ts +0 -19
- package/es/binding/index.js +0 -19
- package/es/index.d.ts +0 -3
- package/es/index.js +0 -3
- package/es/layout/AppLayoutDesktop.css +0 -65
- package/es/layout/AppLayoutDesktop.d.ts +0 -3
- package/es/layout/AppLayoutDesktop.js +0 -19
- package/es/layout/AppLayoutMobile.css +0 -75
- package/es/layout/AppLayoutMobile.d.ts +0 -3
- package/es/layout/AppLayoutMobile.js +0 -18
- package/es/layout/AppMenu.css +0 -67
- package/es/layout/AppMenu.d.ts +0 -8
- package/es/layout/AppMenu.js +0 -36
- package/es/layout/AppMenuItem.css +0 -97
- package/es/layout/AppMenuItem.d.ts +0 -50
- package/es/layout/AppMenuItem.js +0 -14
- package/es/layout/AppMenuSubheader.css +0 -18
- package/es/layout/AppMenuSubheader.d.ts +0 -4
- package/es/layout/AppMenuSubheader.js +0 -6
- package/es/layout/ErrorBoundary.css +0 -101
- package/es/layout/ErrorBoundary.d.ts +0 -30
- package/es/layout/ErrorBoundary.js +0 -81
- package/es/layout/PageContainer.css +0 -29
- package/es/layout/PageContainer.d.ts +0 -7
- package/es/layout/PageContainer.js +0 -6
- package/es/layout/PartnerToggle.d.ts +0 -5
- package/es/layout/PartnerToggle.js +0 -9
- package/es/layout/constants.d.ts +0 -2
- package/es/layout/constants.js +0 -2
- package/es/layout/index.css +0 -65
- package/es/layout/index.d.ts +0 -33
- package/es/layout/index.js +0 -31
- 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
|
-
}
|
package/es/layout/constants.d.ts
DELETED
package/es/layout/constants.js
DELETED
package/es/layout/index.css
DELETED
|
@@ -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
|
-
}
|
package/es/layout/index.d.ts
DELETED
|
@@ -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;
|
package/es/layout/index.js
DELETED
|
@@ -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
|
-
}
|