@elcrm/components 0.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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +352 -0
  3. package/dist/Avatar-DHNPaIjZ.js +64 -0
  4. package/dist/Avatar.css +1 -0
  5. package/dist/Avatar.d.ts +2 -0
  6. package/dist/Avatar.js +5 -0
  7. package/dist/Badge-l6nUkl-H.js +22 -0
  8. package/dist/Badge.css +1 -0
  9. package/dist/Badge.d.ts +2 -0
  10. package/dist/Badge.js +4 -0
  11. package/dist/Block-CVKukh1e.js +28 -0
  12. package/dist/Block.css +1 -0
  13. package/dist/Block.d.ts +2 -0
  14. package/dist/Block.js +4 -0
  15. package/dist/Brand-Zq-Idks4.js +34 -0
  16. package/dist/Brand.css +1 -0
  17. package/dist/Brand.d.ts +2 -0
  18. package/dist/Brand.js +4 -0
  19. package/dist/Card-hn37Opo3.js +12 -0
  20. package/dist/Card.css +1 -0
  21. package/dist/Card.d.ts +2 -0
  22. package/dist/Card.js +4 -0
  23. package/dist/Column-DlNrvFq1.js +26 -0
  24. package/dist/Column.css +1 -0
  25. package/dist/Column.d.ts +2 -0
  26. package/dist/Column.js +4 -0
  27. package/dist/EmptyState-mBiWtMIM.js +23 -0
  28. package/dist/EmptyState.css +1 -0
  29. package/dist/EmptyState.d.ts +2 -0
  30. package/dist/EmptyState.js +4 -0
  31. package/dist/Footer-qxUlnPR9.js +11 -0
  32. package/dist/Footer.css +1 -0
  33. package/dist/Footer.d.ts +2 -0
  34. package/dist/Footer.js +4 -0
  35. package/dist/Header-Cf28eyjW.js +23 -0
  36. package/dist/Header.css +1 -0
  37. package/dist/Header.d.ts +2 -0
  38. package/dist/Header.js +4 -0
  39. package/dist/Item-CaU4RW2G.js +38 -0
  40. package/dist/Item.css +1 -0
  41. package/dist/Item.d.ts +2 -0
  42. package/dist/Item.js +4 -0
  43. package/dist/Layout-Xb3-xsmA.js +18 -0
  44. package/dist/Layout.css +1 -0
  45. package/dist/Layout.d.ts +2 -0
  46. package/dist/Layout.js +4 -0
  47. package/dist/List-BgKkYaGO.js +12 -0
  48. package/dist/List.css +1 -0
  49. package/dist/List.d.ts +2 -0
  50. package/dist/List.js +4 -0
  51. package/dist/Loading-ChGq9peU.js +15 -0
  52. package/dist/Loading.css +1 -0
  53. package/dist/Loading.d.ts +2 -0
  54. package/dist/Loading.js +4 -0
  55. package/dist/Menu-DS7zKQbY.js +40 -0
  56. package/dist/Menu.css +1 -0
  57. package/dist/Menu.d.ts +2 -0
  58. package/dist/Menu.js +4 -0
  59. package/dist/NavSections-CM-VPai2.js +59 -0
  60. package/dist/NavSections.css +1 -0
  61. package/dist/NavSections.d.ts +2 -0
  62. package/dist/NavSections.js +4 -0
  63. package/dist/Row-CnD7Q7pD.js +20 -0
  64. package/dist/Row.css +1 -0
  65. package/dist/Row.d.ts +2 -0
  66. package/dist/Row.js +4 -0
  67. package/dist/Section-Crxk2J-E.js +34 -0
  68. package/dist/Section.css +1 -0
  69. package/dist/Section.d.ts +2 -0
  70. package/dist/Section.js +4 -0
  71. package/dist/TabSections-oeEBx0nM.js +50 -0
  72. package/dist/TabSections.css +1 -0
  73. package/dist/TabSections.d.ts +2 -0
  74. package/dist/TabSections.js +4 -0
  75. package/dist/cx-CcykAxZN.js +6 -0
  76. package/dist/cx.d.ts +2 -0
  77. package/dist/index.css +35 -0
  78. package/dist/index.d.ts +39 -0
  79. package/dist/index.es.js +47 -0
  80. package/dist/lazyRoute.d.ts +10 -0
  81. package/dist/stackGap-CDsjER0g.js +7 -0
  82. package/dist/stackGap.d.ts +3 -0
  83. package/package.json +95 -0
@@ -0,0 +1,47 @@
1
+ import { L as p } from "./Layout-Xb3-xsmA.js";
2
+ import { H as i } from "./Header-Cf28eyjW.js";
3
+ import { F as n } from "./Footer-qxUlnPR9.js";
4
+ import { L as u } from "./List-BgKkYaGO.js";
5
+ import { I as d } from "./Item-CaU4RW2G.js";
6
+ import { C as S } from "./Card-hn37Opo3.js";
7
+ import { B as C } from "./Block-CVKukh1e.js";
8
+ import { R as F } from "./Row-CnD7Q7pD.js";
9
+ import { C as R } from "./Column-DlNrvFq1.js";
10
+ import { M as A } from "./Menu-DS7zKQbY.js";
11
+ import { L as H } from "./Loading-ChGq9peU.js";
12
+ import { S as M } from "./Section-Crxk2J-E.js";
13
+ import { N as b } from "./NavSections-CM-VPai2.js";
14
+ import { T as k } from "./TabSections-oeEBx0nM.js";
15
+ import { A as j, i as q } from "./Avatar-DHNPaIjZ.js";
16
+ import { B as G } from "./Badge-l6nUkl-H.js";
17
+ import { B as K } from "./Brand-Zq-Idks4.js";
18
+ import { E as P } from "./EmptyState-mBiWtMIM.js";
19
+ import { lazy as t } from "react";
20
+ import { c as U } from "./cx-CcykAxZN.js";
21
+ function m(a) {
22
+ const r = {};
23
+ return (o) => (r[o] || (r[o] = t(() => a(o))), r[o]);
24
+ }
25
+ export {
26
+ j as Avatar,
27
+ G as Badge,
28
+ C as Block,
29
+ K as Brand,
30
+ S as Card,
31
+ R as Column,
32
+ P as EmptyState,
33
+ n as Footer,
34
+ i as Header,
35
+ d as Item,
36
+ p as Layout,
37
+ u as List,
38
+ H as Loading,
39
+ A as Menu,
40
+ b as NavSections,
41
+ F as Row,
42
+ M as Section,
43
+ k as TabSections,
44
+ m as createLazyResolver,
45
+ U as cx,
46
+ q as initialsFromName
47
+ };
@@ -0,0 +1,10 @@
1
+ import { ComponentType, LazyExoticComponent } from 'react';
2
+ export type LazyRouteChunk = LazyExoticComponent<ComponentType<Record<string, unknown>>>;
3
+ /**
4
+ * Кэш lazy-чанков: один lazy на сегмент (иначе remount при каждом рендере).
5
+ * Шаблон import() должен быть статичным для Vite:
6
+ * `createLazyResolver((k) => import(\`./sections/${k}.tsx\`))`
7
+ */
8
+ export declare function createLazyResolver(load: (segment: string) => Promise<{
9
+ default: ComponentType<Record<string, unknown>>;
10
+ }>): (segment: string) => LazyRouteChunk;
@@ -0,0 +1,7 @@
1
+ function e(t) {
2
+ if (t != null)
3
+ return { gap: typeof t == "number" ? `${t}px` : t };
4
+ }
5
+ export {
6
+ e as s
7
+ };
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'react';
2
+ /** Число → px, строка как есть (например `0.75rem`) */
3
+ export declare function stackGapStyle(gap?: number | string): CSSProperties | undefined;
package/package.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "name": "@elcrm/components",
3
+ "version": "0.0.1",
4
+ "description": "Shell UI elCRM: Layout, Header, Section, NavSections, Avatar и др. — стили через CSS-токены.",
5
+ "type": "module",
6
+ "author": "MaSkal <dev@elcrm.online>",
7
+ "license": "MIT",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://elgit.ru/lib/elCRM.components.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://elgit.ru/lib/elCRM.components/issues"
14
+ },
15
+ "homepage": "https://www.npmjs.com/package/@elcrm/components",
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
22
+ "sideEffects": [
23
+ "**/*.css",
24
+ "**/*.module.css"
25
+ ],
26
+ "files": [
27
+ "dist",
28
+ "LICENSE",
29
+ "README.md"
30
+ ],
31
+ "keywords": [
32
+ "elcrm",
33
+ "components",
34
+ "layout",
35
+ "header",
36
+ "shell",
37
+ "design-tokens",
38
+ "react"
39
+ ],
40
+ "main": "./dist/index.es.js",
41
+ "module": "./dist/index.es.js",
42
+ "types": "./dist/index.d.ts",
43
+ "exports": {
44
+ ".": {
45
+ "types": "./dist/index.d.ts",
46
+ "import": "./dist/index.es.js",
47
+ "default": "./dist/index.es.js"
48
+ },
49
+ "./style.css": {
50
+ "import": "./dist/index.css",
51
+ "require": "./dist/index.css",
52
+ "default": "./dist/index.css"
53
+ },
54
+ "./*": {
55
+ "types": "./dist/*.d.ts",
56
+ "import": "./dist/*.js",
57
+ "default": "./dist/*.js"
58
+ },
59
+ "./package.json": "./package.json"
60
+ },
61
+ "scripts": {
62
+ "build": "vite build && node scripts/postbuild.mjs",
63
+ "check:css": "node scripts/check-css-scoped.mjs",
64
+ "check:tokens": "node scripts/check-tokens.mjs",
65
+ "test": "vitest run",
66
+ "prepublishOnly": "npm run check:css && npm run check:tokens && npm run test && npm run build",
67
+ "pack:check": "npm pack --dry-run"
68
+ },
69
+ "peerDependencies": {
70
+ "@types/react": ">=18.0.0",
71
+ "react": ">=18.0.0",
72
+ "react-dom": ">=18.0.0"
73
+ },
74
+ "peerDependenciesMeta": {
75
+ "@types/react": {
76
+ "optional": true
77
+ }
78
+ },
79
+ "devDependencies": {
80
+ "@testing-library/react": "^16.2.0",
81
+ "@types/node": "^22.13.10",
82
+ "@types/react": "^18.2.66",
83
+ "@types/react-dom": "^18.2.22",
84
+ "@vitejs/plugin-react": "^4.3.1",
85
+ "elcrm": "^1.0.0",
86
+ "jsdom": "^26.0.0",
87
+ "react": "^18.2.0",
88
+ "react-dom": "^18.2.0",
89
+ "typescript": "^5.8.2",
90
+ "vite": "^5.4.2",
91
+ "vite-plugin-dts": "^4.0.3",
92
+ "vite-plugin-lib-inject-css": "^2.1.1",
93
+ "vitest": "^3.0.8"
94
+ }
95
+ }