@mk-kit/ui 0.44.0 → 0.46.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/README.md +19 -7
- package/fesm2022/mk-kit-ui-core.mjs +25 -13
- package/fesm2022/mk-kit-ui-core.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-forms.mjs +21 -75
- package/fesm2022/mk-kit-ui-forms.mjs.map +1 -1
- package/fesm2022/mk-kit-ui-locales-pl.mjs +503 -0
- package/fesm2022/mk-kit-ui-locales-pl.mjs.map +1 -0
- package/package.json +6 -1
- package/types/mk-kit-ui-core.d.ts +26 -10
- package/types/mk-kit-ui-forms.d.ts +13 -10
- package/types/mk-kit-ui-locales-pl.d.ts +42 -0
package/README.md
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
**Themable, accessible Angular component library for admin dashboards, back-offices and internal tools.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
185+ components (225+ selectors with directives and pipes) and 16 services — data tables, charts,
|
|
6
6
|
date & time pickers, editors, kanban, overlays, an app shell — written for
|
|
7
7
|
Angular 22 with signals and `OnPush` from day one. Every visual value is a
|
|
8
8
|
`--mk-*` CSS custom property; light and dark ship out of the box; WCAG 2.1 AA
|
|
9
|
-
is the target, not the marketing. MIT licensed.
|
|
10
|
-
|
|
9
|
+
is the target, not the marketing. MIT licensed. No third-party runtime
|
|
10
|
+
dependencies — only Angular and the sibling `@mk-kit/validators` (the
|
|
11
|
+
identifier checks, 14 kB, tree-shakeable).
|
|
11
12
|
|
|
12
13
|
- **Docs & live demos:** <https://mk-kit.dev>
|
|
13
14
|
- **API reference:** <https://mk-kit.dev/api> — also as [api.json](https://mk-kit.dev/api.json), [llms.txt](https://mk-kit.dev/llms.txt) and [llms-full.txt](https://mk-kit.dev/llms-full.txt) for tools and AI assistants
|
|
@@ -103,10 +104,12 @@ import { MkDatePicker } from '@mk-kit/ui/datetime';
|
|
|
103
104
|
```
|
|
104
105
|
|
|
105
106
|
Available: `core`, `forms`, `datetime`, `table`, `data`, `navigation`,
|
|
106
|
-
`feedback`, `directives`, `dnd`, `media`, `icon`, `
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
`feedback`, `directives`, `dnd`, `media`, `icon`, `icon/extended` (the opt-in
|
|
108
|
+
305-icon set), `button`, `checkbox`, `chip`, `context-menu`, `layout`, `chat`,
|
|
109
|
+
`query-builder`, `dynamic-form`, `rich-text`, `block-editor`, plus `testing`
|
|
110
|
+
(component harnesses for specs) and `locales/pl` (the Polish string pack) —
|
|
111
|
+
the last two are never re-exported from the umbrella. `sideEffects: false`
|
|
112
|
+
throughout.
|
|
110
113
|
|
|
111
114
|
## Theming
|
|
112
115
|
|
|
@@ -165,6 +168,15 @@ bootstrapApplication(AppRoot, {
|
|
|
165
168
|
});
|
|
166
169
|
```
|
|
167
170
|
|
|
171
|
+
Complete translations are their own entry points, so an app carries only the
|
|
172
|
+
locales it provides — today Polish:
|
|
173
|
+
|
|
174
|
+
```ts
|
|
175
|
+
import { provideMkI18nPl } from '@mk-kit/ui/locales/pl';
|
|
176
|
+
|
|
177
|
+
providers: [provideMkI18nPl({ noData: 'Nic tu nie ma' })]; // overrides merge over the pack
|
|
178
|
+
```
|
|
179
|
+
|
|
168
180
|
Overrides can be scoped to a component subtree for mixed-locale screens.
|
|
169
181
|
Layout and arrow keys flip under `dir="rtl"`.
|
|
170
182
|
|
|
@@ -1724,25 +1724,37 @@ const MK_I18N = new InjectionToken('MK_I18N', {
|
|
|
1724
1724
|
factory: () => MK_DEFAULT_I18N,
|
|
1725
1725
|
});
|
|
1726
1726
|
/**
|
|
1727
|
-
*
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1727
|
+
* Merges `overrides` over a complete string map — shallow for the top level,
|
|
1728
|
+
* deep for the `dateNames`, `blockEditor` and `validation` groups. Exported
|
|
1729
|
+
* so locale packs and tests can build a map without providing it.
|
|
1730
|
+
*/
|
|
1731
|
+
function mkMergeI18n(base, overrides) {
|
|
1732
|
+
return {
|
|
1733
|
+
...base,
|
|
1734
|
+
...overrides,
|
|
1735
|
+
dateNames: { ...base.dateNames, ...overrides.dateNames },
|
|
1736
|
+
blockEditor: { ...base.blockEditor, ...overrides.blockEditor },
|
|
1737
|
+
validation: { ...base.validation, ...overrides.validation },
|
|
1738
|
+
};
|
|
1739
|
+
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Provide localised strings — pass any subset, merged over `base` (the
|
|
1742
|
+
* English defaults unless given). The nested `dateNames`, `blockEditor` and
|
|
1743
|
+
* `validation` groups are merged deeply, so partial overrides of those work
|
|
1744
|
+
* too.
|
|
1730
1745
|
*
|
|
1731
1746
|
* ```ts
|
|
1732
1747
|
* bootstrapApplication(App, {
|
|
1733
1748
|
* providers: [provideMkI18n({ noResults: 'Brak wyników', close: 'Zamknij' })],
|
|
1734
1749
|
* });
|
|
1735
1750
|
* ```
|
|
1751
|
+
*
|
|
1752
|
+
* A locale pack is a complete map that serves as the base — either through
|
|
1753
|
+
* its own helper (`provideMkI18nPl(overrides)` from `@mk-kit/ui/locales/pl`)
|
|
1754
|
+
* or explicitly: `provideMkI18n(overrides, MK_PL_I18N)`.
|
|
1736
1755
|
*/
|
|
1737
|
-
function provideMkI18n(overrides) {
|
|
1738
|
-
|
|
1739
|
-
...MK_DEFAULT_I18N,
|
|
1740
|
-
...overrides,
|
|
1741
|
-
dateNames: { ...MK_DEFAULT_DATE_NAMES, ...overrides.dateNames },
|
|
1742
|
-
blockEditor: { ...MK_DEFAULT_I18N.blockEditor, ...overrides.blockEditor },
|
|
1743
|
-
validation: { ...MK_DEFAULT_VALIDATION, ...overrides.validation },
|
|
1744
|
-
};
|
|
1745
|
-
return { provide: MK_I18N, useValue: value };
|
|
1756
|
+
function provideMkI18n(overrides, base = MK_DEFAULT_I18N) {
|
|
1757
|
+
return { provide: MK_I18N, useValue: mkMergeI18n(base, overrides) };
|
|
1746
1758
|
}
|
|
1747
1759
|
|
|
1748
1760
|
/**
|
|
@@ -2261,5 +2273,5 @@ function mkQueryToText(group, fields = [], i18n = MK_DEFAULT_I18N) {
|
|
|
2261
2273
|
* Generated bundle index. Do not edit.
|
|
2262
2274
|
*/
|
|
2263
2275
|
|
|
2264
|
-
export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_QUERY_OPERATORS, MK_QUERY_UNARY, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkComputeAnchoredPosition, mkCreateQueryGroup, mkCreateQueryRule, mkFirstErrorMessage, mkGetFocusable, mkHighlight, mkHighlightJson, mkInjectFieldTouched, mkIsQueryGroup, mkIsResponsive, mkQueryCompact, mkQueryIsEmpty, mkQueryOperatorLabel, mkQueryOperatorsFor, mkQueryRuleCount, mkQueryRuleIsComplete, mkQueryRuleMatches, mkQueryToPredicate, mkQueryToText, mkSignalErrorMessage, mkSignalErrorsToValidationErrors, mkUniqueId, mkValidatorChange, provideMkI18n };
|
|
2276
|
+
export { MK_BREAKPOINTS, MK_DEFAULT_BREAKPOINTS, MK_DEFAULT_DATE_NAMES, MK_DEFAULT_I18N, MK_DEFAULT_VALIDATION, MK_I18N, MK_OVERLAY_DATA, MK_QUERY_OPERATORS, MK_QUERY_UNARY, MkAnchoredPanel, MkBreakpointService, MkFieldContext, MkFocusTrap, MkLiveAnnouncer, MkOverlayRef, MkOverlayService, MkThemeService, mkComputeAnchoredPosition, mkCreateQueryGroup, mkCreateQueryRule, mkFirstErrorMessage, mkGetFocusable, mkHighlight, mkHighlightJson, mkInjectFieldTouched, mkIsQueryGroup, mkIsResponsive, mkMergeI18n, mkQueryCompact, mkQueryIsEmpty, mkQueryOperatorLabel, mkQueryOperatorsFor, mkQueryRuleCount, mkQueryRuleIsComplete, mkQueryRuleMatches, mkQueryToPredicate, mkQueryToText, mkSignalErrorMessage, mkSignalErrorsToValidationErrors, mkUniqueId, mkValidatorChange, provideMkI18n };
|
|
2265
2277
|
//# sourceMappingURL=mk-kit-ui-core.mjs.map
|