@nanahoshi/mona-ui 0.26.1 → 0.26.3
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/docs/auto-complete.md +1 -1
- package/docs/combo-box.md +1 -1
- package/docs/dropdown-list.md +1 -1
- package/docs/grid-columns.md +296 -0
- package/docs/grid-editing.md +575 -0
- package/docs/grid-grouping.md +238 -0
- package/docs/grid-rows.md +297 -0
- package/docs/grid-selection.md +196 -0
- package/docs/grid-server.md +569 -0
- package/docs/grid-sorting-filtering.md +544 -0
- package/docs/grid-state-export.md +422 -0
- package/docs/grid.md +170 -1717
- package/docs/multi-select.md +1 -1
- package/docs/tree-view.md +1 -1
- package/fesm2022/nanahoshi-mona-ui-button.mjs +2 -0
- package/fesm2022/nanahoshi-mona-ui-chip.mjs +5 -8
- package/fesm2022/nanahoshi-mona-ui-internal.mjs +7 -2
- package/llms.txt +12 -1
- package/package.json +1 -1
- package/types/nanahoshi-mona-ui-internal.d.ts +6 -2
package/docs/multi-select.md
CHANGED
|
@@ -762,4 +762,4 @@ From `@nanahoshi/mona-ui/common`.
|
|
|
762
762
|
| `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
|
|
763
763
|
| `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
|
|
764
764
|
|
|
765
|
-
**Documented elsewhere:** [`FilterableOptions`](grid.md), [`GroupableOptions`](
|
|
765
|
+
**Documented elsewhere:** [`FilterableOptions`](grid-sorting-filtering.md), [`GroupableOptions`](list-view.md), [`PopupCloseEvent`](popup.md), [`VirtualScrollOptions`](list-view.md)
|
package/docs/tree-view.md
CHANGED
|
@@ -1015,4 +1015,4 @@ From `@nanahoshi/mona-ui/common`.
|
|
|
1015
1015
|
| `isDefaultPrevented(): boolean` | Whether `preventDefault()` was called. |
|
|
1016
1016
|
| `preventDefault(): void` | Cancels what the event announces, such as opening or closing a popup, or closing a dialog. |
|
|
1017
1017
|
|
|
1018
|
-
**Documented elsewhere:** [`FilterableOptions`](grid.md)
|
|
1018
|
+
**Documented elsewhere:** [`FilterableOptions`](grid-sorting-filtering.md)
|
|
@@ -169,6 +169,7 @@ const buttonThemeVariants = cva(`
|
|
|
169
169
|
look: "default",
|
|
170
170
|
selected: true,
|
|
171
171
|
class: `
|
|
172
|
+
after:-inset-px
|
|
172
173
|
bg-(--color-selected) text-(--color-selected-foreground)
|
|
173
174
|
hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
|
|
174
175
|
active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
|
|
@@ -232,6 +233,7 @@ const buttonThemeVariants = cva(`
|
|
|
232
233
|
look: "outline",
|
|
233
234
|
selected: true,
|
|
234
235
|
class: `
|
|
236
|
+
after:-inset-px
|
|
235
237
|
bg-(--color-selected) text-(--color-selected-foreground)
|
|
236
238
|
hover:bg-(--color-selected-hover) hover:text-(--color-selected-hover-foreground)
|
|
237
239
|
active:bg-(--color-selected-active) active:text-(--color-selected-active-foreground)
|
|
@@ -9,7 +9,7 @@ import { MonaI18nService } from '@nanahoshi/mona-ui/i18n';
|
|
|
9
9
|
import { fromEvent } from 'rxjs';
|
|
10
10
|
import { twMerge } from 'tailwind-merge';
|
|
11
11
|
import { cva } from 'class-variance-authority';
|
|
12
|
-
import { themeRaisedSurfaceClasses } from '@nanahoshi/mona-ui/internal';
|
|
12
|
+
import { themeSelectionBorderClasses, themeRaisedSurfaceClasses } from '@nanahoshi/mona-ui/internal';
|
|
13
13
|
|
|
14
14
|
// Generated from i18n/catalogs/en-US.messages.json by scripts/generate-locale-catalogs.ts. Do not edit.
|
|
15
15
|
// Edit the JSON file and run `npm run generate:locale-catalogs`.
|
|
@@ -101,11 +101,8 @@ const chipThemeVariants = cva(`
|
|
|
101
101
|
`
|
|
102
102
|
},
|
|
103
103
|
selected: {
|
|
104
|
-
// A border in the text's color
|
|
105
|
-
true:
|
|
106
|
-
after:pointer-events-none after:absolute after:inset-0
|
|
107
|
-
after:rounded-[inherit] after:border-2 after:border-current
|
|
108
|
-
`,
|
|
104
|
+
// A border in the text's color under prefers-contrast: more and forced colors, where the fill alone isn't enough.
|
|
105
|
+
true: themeSelectionBorderClasses,
|
|
109
106
|
false: ""
|
|
110
107
|
}
|
|
111
108
|
},
|
|
@@ -113,7 +110,7 @@ const chipThemeVariants = cva(`
|
|
|
113
110
|
{
|
|
114
111
|
look: "default",
|
|
115
112
|
selected: true,
|
|
116
|
-
class: "bg-(--color-selected) text-(--color-selected-foreground)"
|
|
113
|
+
class: "after:-inset-px bg-(--color-selected) text-(--color-selected-foreground)"
|
|
117
114
|
},
|
|
118
115
|
{
|
|
119
116
|
look: "primary",
|
|
@@ -148,7 +145,7 @@ const chipThemeVariants = cva(`
|
|
|
148
145
|
{
|
|
149
146
|
look: "outline",
|
|
150
147
|
selected: true,
|
|
151
|
-
class: "bg-(--color-selected) text-(--color-selected-foreground)"
|
|
148
|
+
class: "after:-inset-px bg-(--color-selected) text-(--color-selected-foreground)"
|
|
152
149
|
},
|
|
153
150
|
{
|
|
154
151
|
look: "ghost",
|
|
@@ -687,11 +687,16 @@ const themeSelectionBarClasses = `
|
|
|
687
687
|
before:absolute before:inset-y-0 before:start-0 before:w-0.5 before:bg-(--color-selected-border)
|
|
688
688
|
before:forced-color-adjust-none forced-colors:before:bg-[Highlight]
|
|
689
689
|
`;
|
|
690
|
-
/**
|
|
690
|
+
/**
|
|
691
|
+
* A border in the text's color for a selected control, drawn only when the user asks for more contrast or forced colors
|
|
692
|
+
* are on. Elsewhere the fill says it alone. A control with a border of its own adds `after:-inset-px`, so this one
|
|
693
|
+
* replaces it.
|
|
694
|
+
*/
|
|
691
695
|
const themeSelectionBorderClasses = `
|
|
692
696
|
relative
|
|
693
697
|
after:pointer-events-none after:absolute after:inset-0
|
|
694
|
-
after:rounded-[inherit] after:border-
|
|
698
|
+
after:rounded-[inherit] after:border-current
|
|
699
|
+
contrast-more:after:border-2 forced-colors:after:border-2
|
|
695
700
|
`;
|
|
696
701
|
const themeControlBackdropClasses = `
|
|
697
702
|
[background-image:var(--mona-effect-control-background-image,none)]
|
package/llms.txt
CHANGED
|
@@ -74,12 +74,23 @@ Mona UI is an Angular component library styled with Tailwind CSS 4. Its componen
|
|
|
74
74
|
|
|
75
75
|
- [Avatar](docs/avatar.md): Shows a person or entity as an image, text label or projected content.
|
|
76
76
|
- [Chip](docs/chip.md): A compact label that can be selected, removed or given a prefix.
|
|
77
|
-
- [Grid](docs/grid.md): Tabular data with paging, sorting, filtering, grouping, selection and editing.
|
|
78
77
|
- [List Box](docs/list-box.md): A selectable list with a toolbar for moving items and transferring them between lists.
|
|
79
78
|
- [List View](docs/list-view.md): Renders a collection as a list, with optional selection, grouping and paging.
|
|
80
79
|
- [Pager](docs/pager.md): Pagination controls with page buttons, a page-size selector and a page-jump input.
|
|
81
80
|
- [Tree View](docs/tree-view.md): Hierarchical data as an expandable, keyboard-navigable tree.
|
|
82
81
|
|
|
82
|
+
## Grid
|
|
83
|
+
|
|
84
|
+
- [Grid Overview](docs/grid.md): Tabular data in typed columns with paging, templates and a toolbar, extended by feature directives.
|
|
85
|
+
- [Sorting & Filtering](docs/grid-sorting-filtering.md): Sort rows by column headers and filter them from a header menu or a filter row.
|
|
86
|
+
- [Grouping & Aggregates](docs/grid-grouping.md): Group rows by column values and show sums, averages and other aggregates in footers.
|
|
87
|
+
- [Selection](docs/grid-selection.md): Select single or multiple rows by key, with checkboxes, row clicks and the keyboard.
|
|
88
|
+
- [Editing](docs/grid-editing.md): Edit cells or rows inline with Signal Forms, and add, save, cancel and remove rows.
|
|
89
|
+
- [Columns](docs/grid-columns.md): Resize, reorder, lock and hide columns, by pointer, keyboard or the column chooser.
|
|
90
|
+
- [Rows](docs/grid-rows.md): Expandable detail rows, row reordering by drag or keyboard, row classes and row sizing.
|
|
91
|
+
- [Server Binding & Virtualization](docs/grid-server.md): Load pages from a server, or render only the visible rows of a large data set.
|
|
92
|
+
- [State & Export](docs/grid-state-export.md): Save and restore the grid's columns, sort, filter, groups and page size, and export rows as CSV.
|
|
93
|
+
|
|
83
94
|
## Charts
|
|
84
95
|
|
|
85
96
|
- [Chart Overview](docs/chart.md): High-performance Canvas charts composed from series, axes and interaction parts.
|
package/package.json
CHANGED
|
@@ -237,8 +237,12 @@ type VariantInputs<T> = {
|
|
|
237
237
|
* has to be positioned.
|
|
238
238
|
*/
|
|
239
239
|
declare const themeSelectionBarClasses = "\n before:absolute before:inset-y-0 before:start-0 before:w-0.5 before:bg-(--color-selected-border)\n before:forced-color-adjust-none forced-colors:before:bg-[Highlight]\n";
|
|
240
|
-
/**
|
|
241
|
-
|
|
240
|
+
/**
|
|
241
|
+
* A border in the text's color for a selected control, drawn only when the user asks for more contrast or forced colors
|
|
242
|
+
* are on. Elsewhere the fill says it alone. A control with a border of its own adds `after:-inset-px`, so this one
|
|
243
|
+
* replaces it.
|
|
244
|
+
*/
|
|
245
|
+
declare const themeSelectionBorderClasses = "\n relative\n after:pointer-events-none after:absolute after:inset-0\n after:rounded-[inherit] after:border-current\n contrast-more:after:border-2 forced-colors:after:border-2\n";
|
|
242
246
|
declare const themeControlBackdropClasses = "\n [background-image:var(--mona-effect-control-background-image,none)]\n [backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n";
|
|
243
247
|
declare const themeControlSurfaceClasses = "\n [background-color:var(--mona-effect-control-background-color,var(--color-input-background))]\n \n [background-image:var(--mona-effect-control-background-image,none)]\n [backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-control-backdrop-filter,none)]\n\n";
|
|
244
248
|
declare const themeRaisedBackdropClasses = "\n [background-image:var(--mona-effect-raised-background-image,none)]\n [backdrop-filter:var(--mona-effect-raised-backdrop-filter,none)]\n [-webkit-backdrop-filter:var(--mona-effect-raised-backdrop-filter,none)]\n";
|