@ostack.tech/ui 1.3.0 → 1.3.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.
- package/dist/chunks/{en-Czf-_HZt.js → en-MXAz48KY.js} +2 -1
- package/dist/chunks/{en-Czf-_HZt.js.map → en-MXAz48KY.js.map} +1 -1
- package/dist/locales/en-GB.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/fr-FR.js +1 -0
- package/dist/locales/fr-FR.js.map +1 -1
- package/dist/locales/pt-PT.js +1 -0
- package/dist/locales/pt-PT.js.map +1 -1
- package/dist/ostack-ui.css +88 -83
- package/dist/ostack-ui.js +1120 -1022
- package/dist/ostack-ui.js.map +1 -1
- package/package.json +1 -1
- package/scss/components/Calendar/_Calendar-variables.scss +1 -1
- package/scss/components/Calendar/_Calendar.scss +15 -16
- package/scss/components/ControlAddon/_ControlAddon.scss +3 -5
- package/scss/components/DataTable/_DataTable.scss +7 -2
- package/scss/components/DropdownMenu/_DropdownMenu.scss +1 -1
- package/scss/components/Feedback/_Feedback.scss +2 -0
- package/scss/components/Field/_Field.scss +0 -1
- package/scss/components/HelperText/_HelperText.scss +2 -1
- package/scss/components/Input/_Input.scss +1 -1
- package/scss/components/Label/_Label.scss +1 -0
- package/scss/components/Link/_Link.scss +1 -1
- package/scss/components/Root/_Root.scss +1 -1
- package/scss/components/Stack/_Stack.scss +1 -1
- package/scss/components/Table/_Table.scss +23 -9
- package/scss/components/Tabs/_Tabs.scss +2 -2
- package/scss/scss/helpers/_margin-utils.scss +13 -11
- package/scss/scss/helpers/_padding-utils.scss +13 -11
- package/scss/scss/helpers/_sizing-utils.scss +19 -17
- package/scss/scss/helpers/_text-utils.scss +19 -17
- package/scss/scss/helpers/_visually-hidden.scss +1 -1
- package/scss/scss/utils/_button-reset.scss +1 -1
- package/types/components/Form/FormError.d.ts +1 -1
- package/types/components/Keybinds/KeyPress.d.ts +3 -3
- package/types/components/Keybinds/Keybind.d.ts +2 -2
- package/types/components/Keybinds/Keybinds.d.ts +1 -1
- package/types/components/Printer/Printer.d.ts +1 -1
- package/types/components/Printer/PrinterContentContext.d.ts +4 -16
- package/types/components/Printer/PrinterContext.d.ts +1 -2
- package/types/components/Printer/index.d.ts +1 -1
- package/types/components/Printer/usePrintClassNames.d.ts +6 -2
- package/types/components/Table/TableContext.d.ts +2 -0
- package/types/components/Table/columnUtils.d.ts +4 -0
- package/types/index.d.ts +1 -0
- package/types/utils/useIntersectionObserver.d.ts +6 -2
- package/types/utils/useResizeObserver.d.ts +6 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./Printer.tsx";
|
|
2
2
|
export * from "./PrinterContent.tsx";
|
|
3
|
-
export { usePrinting,
|
|
3
|
+
export { usePrinting, usePrintingTask } from "./PrinterContentContext.tsx";
|
|
4
4
|
export { usePrint, usePrinterDocumentTitle, usePrintInProgress } from "./PrinterContext.ts";
|
|
5
5
|
export * from "./PrinterTrigger.tsx";
|
|
6
6
|
export * from "./usePrintClassNames.ts";
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/** Print-related class names. */
|
|
2
|
+
export interface PrintClassNames {
|
|
3
|
+
/** Class name used for content that should only be visible while printing. */
|
|
2
4
|
printOnly: string;
|
|
5
|
+
/** Class name used for content that should be hidden while printing. */
|
|
3
6
|
printHidden: string;
|
|
4
7
|
}
|
|
5
|
-
|
|
8
|
+
/** Hook which exposes print-related class names. */
|
|
9
|
+
export declare function usePrintClassNames(): PrintClassNames;
|
|
@@ -2,6 +2,7 @@ import type { ScrollPosition } from "../../utils/useScrollPosition.ts";
|
|
|
2
2
|
import type { ControlStatus } from "../Control";
|
|
3
3
|
import type { TableLayout } from "./Table.tsx";
|
|
4
4
|
import type { TableColumnObject } from "./TableColumn.tsx";
|
|
5
|
+
import type { TableColumnGroupObject } from "./TableColumnGroup.tsx";
|
|
5
6
|
/** Value of the table context. */
|
|
6
7
|
export interface TableContextValue {
|
|
7
8
|
editable: boolean;
|
|
@@ -13,6 +14,7 @@ export interface TableContextValue {
|
|
|
13
14
|
export interface TableState {
|
|
14
15
|
scrollPosition?: ScrollPosition;
|
|
15
16
|
leafColumns?: TableColumnObject[];
|
|
17
|
+
columnKeys?: Map<TableColumnObject | TableColumnGroupObject, string>;
|
|
16
18
|
defaultColumnWidth: number;
|
|
17
19
|
numberOfColumns: () => number | undefined;
|
|
18
20
|
stickyColumnOffsets: () => (number | undefined)[] | undefined;
|
|
@@ -27,3 +27,7 @@ export declare function leftMostLeafColumn(column: TableColumnGroupObject | Tabl
|
|
|
27
27
|
export declare function rightMostLeafColumn(column: TableColumnGroupObject | TableColumnObject): TableColumnObject;
|
|
28
28
|
/** Offsets (`left`/`right` CSS properties) to provide to sticky columns. */
|
|
29
29
|
export declare function stickyColumnOffsets(leaves: TableColumnObject[], defaultColumnWidth: number): (number | undefined)[];
|
|
30
|
+
/** Keys of all columns (leaves and groups), based on their location in the column tree. */
|
|
31
|
+
export declare function columnKeys(columns: TableColumnObjects): Map<TableColumnObject | TableColumnGroupObject, string>;
|
|
32
|
+
/** Keys of the `<col>` elements, aligned with the result of `columnWidths`. */
|
|
33
|
+
export declare function colKeys(leaves: TableColumnObject[], keys: Map<TableColumnObject | TableColumnGroupObject, string>): string[];
|
package/types/index.d.ts
CHANGED
|
@@ -102,6 +102,7 @@ export * from "./utils/useMediaQuery.ts";
|
|
|
102
102
|
export * from "./utils/useNumericTransformer.tsx";
|
|
103
103
|
export * from "./utils/usePaddingProps.ts";
|
|
104
104
|
export * from "./utils/usePrevious.ts";
|
|
105
|
+
export * from "./utils/useResizeObserver.ts";
|
|
105
106
|
export * from "./utils/useSafeLayoutEffect.ts";
|
|
106
107
|
export * from "./utils/useScrollPosition.ts";
|
|
107
108
|
export * from "./utils/useScrollbarSize.ts";
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Hook wrapping an `IntersectionObserver` which observes one or more elements. `onIntersect` is
|
|
3
|
+
* called with the observer's entries whenever the intersection of any observed element changes,
|
|
4
|
+
* including once right after the elements start being observed.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useIntersectionObserver(elements: Element | null | readonly (Element | null)[], onIntersect: (entries: IntersectionObserverEntry[]) => void, options?: IntersectionObserverInit): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook wrapping a `ResizeObserver` which observes one or more elements. `onResize` is called with
|
|
3
|
+
* the observer's entries whenever any observed element is resized, including once right after the
|
|
4
|
+
* elements start being observed.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useResizeObserver(elements: Element | null | readonly (Element | null)[], onResize: (entries: ResizeObserverEntry[]) => void, options?: ResizeObserverOptions): void;
|