@nice2dev/ui 1.3.18 → 1.4.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/README.md +27 -0
  3. package/dist/{NiceDataGrid-CFibAGHt.cjs → NiceDataGrid-BT6iCUgP.cjs} +1 -1
  4. package/dist/{NiceForm-ChRj4r3f.cjs → NiceForm-Bysp66Ef.cjs} +1 -1
  5. package/dist/{NiceMention-DNx3d9L7.cjs → NiceMention-sc8W-DwH.cjs} +1 -1
  6. package/dist/NiceModuleLifecyclePanel-DBQPCa_V.cjs +1 -0
  7. package/dist/{NiceSavedQueryPanel-BuRAgrBk.cjs → NiceSavedQueryPanel-BbznsXFd.cjs} +1 -1
  8. package/dist/{NiceScheduler-DAoo1eyo.cjs → NiceScheduler-3Ez0zSQJ.cjs} +1 -1
  9. package/dist/{core-lazy-DohJQ33c.cjs → core-lazy-CL4ZIxF-.cjs} +1 -1
  10. package/dist/data.cjs +1 -1
  11. package/dist/editors/pickers/pickerCommons.mjs +284 -87
  12. package/dist/editors/pickers/themePickerHelpers.mjs +10 -8
  13. package/dist/editors.cjs +1 -1
  14. package/dist/index.cjs +166 -166
  15. package/dist/index.d.ts +142 -10
  16. package/dist/index.mjs +1517 -1488
  17. package/dist/navigation/sidebarColors.mjs +61 -50
  18. package/dist/navigation.cjs +1 -1
  19. package/dist/navigation.d.ts +7 -0
  20. package/dist/pickerCommons-CwcCc8Qi.cjs +1 -0
  21. package/dist/planning/NiceResourceAllocation.mjs +31 -31
  22. package/dist/style.css +4 -4
  23. package/dist/tools/NiceThemeDesigner.mjs +781 -708
  24. package/dist/tools/NiceThemePreview.mjs +344 -282
  25. package/dist/tools/themeCatalog.mjs +28 -44
  26. package/dist/tools/themeCatalogArchive.mjs +38 -0
  27. package/dist/tools/themeDesigner/ThemeSetEditors.mjs +400 -0
  28. package/dist/tools/themeDesigner/ThemeValueField.mjs +146 -0
  29. package/dist/tools/themeDesigner/themeDesignerPaths.mjs +105 -0
  30. package/package.json +4 -4
  31. package/dist/NiceModuleLifecyclePanel-D8Q081R6.cjs +0 -1
  32. package/dist/pickerCommons-BWglYl6J.cjs +0 -1
@@ -0,0 +1,105 @@
1
+ function b(e, t, o) {
2
+ const a = t.split("."), y = (l, n) => {
3
+ const s = a[n], h = /^\d+$/.test(s) ? Number(s) : null, r = l && typeof l == "object" ? Array.isArray(l) ? [...l] : { ...l } : h !== null ? [] : {}, u = h ?? s, c = r[u];
4
+ return n === a.length - 1 ? o === void 0 ? Array.isArray(r) && h !== null ? r[h] = void 0 : delete r[s] : r[u] = o : r[u] = y(c, n + 1), r;
5
+ };
6
+ return y(e, 0);
7
+ }
8
+ const i = [
9
+ {
10
+ group: "Colors",
11
+ key: "theme.colors",
12
+ fields: [
13
+ { path: "colors.primary", key: "theme.primary", label: "Primary" },
14
+ { path: "colors.primaryHover", key: "theme.primaryHover", label: "Primary Hover" },
15
+ { path: "colors.accent", key: "theme.accent", label: "Accent" },
16
+ { path: "colors.success", key: "theme.success", label: "Success" },
17
+ { path: "colors.warning", key: "theme.warning", label: "Warning" },
18
+ { path: "colors.error", key: "theme.error", label: "Error" },
19
+ { path: "colors.info", key: "theme.info", label: "Info" },
20
+ { path: "colors.link", key: "theme.link", label: "Link" },
21
+ { path: "colors.focus", key: "theme.focus", label: "Focus Ring" }
22
+ ]
23
+ },
24
+ {
25
+ group: "Backgrounds",
26
+ key: "theme.backgrounds",
27
+ fields: [
28
+ { path: "backgrounds.primary", key: "theme.bgPrimary", label: "Primary Background" },
29
+ { path: "backgrounds.secondary", key: "theme.bgSecondary", label: "Secondary Background" },
30
+ { path: "backgrounds.tertiary", key: "theme.bgTertiary", label: "Tertiary Background" },
31
+ { path: "backgrounds.elevated", key: "theme.bgElevated", label: "Elevated Surface" }
32
+ ]
33
+ },
34
+ {
35
+ group: "Text",
36
+ key: "theme.text",
37
+ fields: [
38
+ { path: "text.primary", key: "theme.textPrimary", label: "Primary Text" },
39
+ { path: "text.secondary", key: "theme.textSecondary", label: "Secondary Text" },
40
+ { path: "text.muted", key: "theme.textMuted", label: "Muted Text" },
41
+ { path: "text.onPrimary", key: "theme.textOnPrimary", label: "Text on Primary" }
42
+ ]
43
+ },
44
+ {
45
+ group: "Layout",
46
+ key: "theme.layoutSection",
47
+ fields: [
48
+ { path: "layout.body.background", key: "theme.layoutBody", label: "Body", surface: !0 },
49
+ { path: "layout.body.text", key: "theme.layoutBodyText", label: "Body text" },
50
+ { path: "layout.panel.background", key: "theme.layoutPanel", label: "Panel", surface: !0 },
51
+ { path: "layout.panel.text", key: "theme.layoutPanelText", label: "Panel text" },
52
+ {
53
+ path: "layout.topNav.background",
54
+ key: "theme.layoutTopNav",
55
+ label: "Top bar",
56
+ surface: !0
57
+ },
58
+ { path: "layout.topNav.text", key: "theme.layoutTopNavText", label: "Top bar text" },
59
+ {
60
+ path: "layout.sideNav.background",
61
+ key: "theme.layoutSideNav",
62
+ label: "Sidebar",
63
+ surface: !0
64
+ },
65
+ { path: "layout.sideNav.text", key: "theme.layoutSideNavText", label: "Sidebar text" },
66
+ {
67
+ path: "layout.sideNav.headers.base",
68
+ key: "theme.layoutHeaders",
69
+ label: "Sidebar header levels"
70
+ },
71
+ {
72
+ path: "layout.sideNav.items.background",
73
+ key: "theme.layoutItems",
74
+ label: "Sidebar items (leaves)"
75
+ },
76
+ {
77
+ path: "layout.sideNav.highlight.base",
78
+ key: "theme.layoutHighlight",
79
+ label: "Active item and its branch"
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ group: "Borders",
85
+ key: "theme.borders",
86
+ fields: [{ path: "borders.color", key: "theme.borderColor", label: "Border Color" }]
87
+ }
88
+ ];
89
+ function d(e, t) {
90
+ for (const o of i) {
91
+ const a = o.fields.find((y) => y.path === e);
92
+ if (a)
93
+ return t ? t(a.key, a.label) : a.label;
94
+ }
95
+ return e;
96
+ }
97
+ function m(e, t) {
98
+ return t ? t(e.key, e.group) : e.group;
99
+ }
100
+ export {
101
+ i as THEME_LINKABLE_FIELDS,
102
+ b as setThemePath,
103
+ d as themeFieldLabel,
104
+ m as themeGroupLabel
105
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice2dev/ui",
3
- "version": "1.3.18",
3
+ "version": "1.4.0",
4
4
  "description": "Nice2Dev UI — Universal, themeable, i18n-ready React component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -97,12 +97,12 @@
97
97
  "react-dom": ">=17.0.0"
98
98
  },
99
99
  "dependencies": {
100
- "@nice2dev/i18n": "^1.3.18",
101
- "@nice2dev/ui-core": "^1.3.18",
100
+ "@nice2dev/i18n": "^1.4.0",
101
+ "@nice2dev/ui-core": "^1.4.0",
102
102
  "country-flag-icons": "^1.6.20"
103
103
  },
104
104
  "devDependencies": {
105
- "@nice2dev/testing": "^1.3.18",
105
+ "@nice2dev/testing": "^1.4.0",
106
106
  "@playwright/test": "^1.62.1",
107
107
  "@testing-library/dom": "^10.4.1",
108
108
  "@testing-library/jest-dom": "^7.0.1",