@keenmate/web-grid 1.0.0 → 1.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.
- package/README.md +12 -3
- package/dist/modules/toolbar/index.d.ts +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/web-grid.js +1759 -1741
- package/dist/web-grid.umd.js +77 -77
- package/package.json +1 -1
- package/src/css/_dark-mode.css +44 -7
- package/src/css/_dialogs.css +1 -1
- package/src/css/_variables.css +1 -0
package/README.md
CHANGED
|
@@ -779,9 +779,18 @@ The manifest follows the [component-variables schema](https://raw.githubusercont
|
|
|
779
779
|
|
|
780
780
|
Dark mode is triggered automatically by:
|
|
781
781
|
- OS preference: `@media (prefers-color-scheme: dark)`
|
|
782
|
-
- Attribute: `data-theme="dark"` on ancestor
|
|
783
|
-
- Bootstrap: `data-bs-theme="dark"` on ancestor
|
|
784
|
-
- Class: `.dark` on ancestor (Tailwind CSS)
|
|
782
|
+
- Attribute: `data-theme="dark"` on any ancestor or host element
|
|
783
|
+
- Bootstrap: `data-bs-theme="dark"` on any ancestor or host element
|
|
784
|
+
- Class: `.dark` on any ancestor (Tailwind CSS)
|
|
785
|
+
|
|
786
|
+
To **force light mode** when the OS is in dark mode, set one of:
|
|
787
|
+
- Attribute: `data-theme="light"` on any ancestor or host element
|
|
788
|
+
- Bootstrap: `data-bs-theme="light"` on any ancestor or host element
|
|
789
|
+
- Class: `.light` on any ancestor (Tailwind CSS)
|
|
790
|
+
|
|
791
|
+
This is useful when your app manages its own theme (e.g. via a toggle) and needs to override the OS preference. The light mode selectors restore the `--base-*` fallback chain so theme-designer values are respected.
|
|
792
|
+
|
|
793
|
+
Ancestor detection uses `:host-context()` to cross shadow DOM boundaries (Chrome 88+, Firefox 128+, Safari 15.4+).
|
|
785
794
|
|
|
786
795
|
### Dynamic Cell & Row Styling
|
|
787
796
|
|
|
@@ -33,7 +33,7 @@ export declare function renderToolbarHTML<T>(items: NormalizedToolbarItem<T>[],
|
|
|
33
33
|
/**
|
|
34
34
|
* Open toolbar for a specific row
|
|
35
35
|
*/
|
|
36
|
-
export declare function openToolbar<T>(ctx: GridContext<T>, rowElement: HTMLElement, rowIndex: number, items: NormalizedToolbarItem<T>[], row: T, onItemClick: (item: NormalizedToolbarItem<T
|
|
36
|
+
export declare function openToolbar<T>(ctx: GridContext<T>, rowElement: HTMLElement, rowIndex: number, items: NormalizedToolbarItem<T>[], row: T, onItemClick: (item: NormalizedToolbarItem<T>, event: MouseEvent, triggerElement: HTMLElement) => void, cursorX?: number): void;
|
|
37
37
|
/**
|
|
38
38
|
* Close the active toolbar
|
|
39
39
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ export type Column<T> = {
|
|
|
125
125
|
isEditButtonVisible?: boolean;
|
|
126
126
|
tooltipMember?: string;
|
|
127
127
|
tooltipCallback?: (value: unknown, row: T) => string | null;
|
|
128
|
+
isTooltipHtml?: boolean;
|
|
128
129
|
beforeCopyCallback?: (value: unknown, row: T) => string;
|
|
129
130
|
beforePasteCallback?: (value: string, row: T) => unknown;
|
|
130
131
|
validationTooltipCallback?: (context: ValidationTooltipContext<T>) => string | null;
|
|
@@ -196,6 +197,8 @@ export type ToolbarClickDetail<T> = {
|
|
|
196
197
|
item: NormalizedToolbarItem<T>;
|
|
197
198
|
rowIndex: number;
|
|
198
199
|
row: T;
|
|
200
|
+
event: MouseEvent;
|
|
201
|
+
triggerElement: HTMLElement;
|
|
199
202
|
};
|
|
200
203
|
export type RowActionType = PredefinedToolbarItemType;
|
|
201
204
|
export type RowActionClickDetail<T> = {
|