@chayns-components/navigation 5.0.33 → 5.0.34

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 (2) hide show
  1. package/AI_USAGE.md +141 -0
  2. package/package.json +5 -4
package/AI_USAGE.md ADDED
@@ -0,0 +1,141 @@
1
+ # @chayns-components/navigation
2
+
3
+ React component package providing `DynamicToolbar` for chayns applications.
4
+
5
+ Documented components: `DynamicToolbar`.
6
+
7
+ ## Import
8
+
9
+ ```ts
10
+ import { DynamicToolbar } from '@chayns-components/navigation';
11
+ ```
12
+
13
+ ## Typical Usage
14
+
15
+ ```tsx
16
+ <DynamicToolbar
17
+ activeItemId={'chat'}
18
+ items={[
19
+ { id: 'sidekick', icons: ['ts-sidekick'], label: 'Sidekick', hasRightSeparator: true },
20
+ { id: 'chat', icons: ['ts-chat'], label: 'Chat' },
21
+ { id: 'witness', icons: ['fa fa-microphone'], label: 'Gespräche', badgeCount: 7 },
22
+ { id: 'frontline', icons: ['fa fa-user-question'], label: 'Anfragen' },
23
+ { id: 'notifications', icons: ['fa fa-bell'], label: 'Benachrichtigungen', badgeCount: 28 },
24
+ { id: 'tasks', icons: ['fa fa-check-circle'], label: 'Aufgaben' },
25
+ { id: 'settings', icons: ['fa fa-cog'], label: 'Einstellungen' },
26
+ ]}
27
+ layout={DynamicToolbarLayout.Floating}
28
+ onItemSelect={action('onItemSelect')}
29
+ />
30
+ ```
31
+
32
+ ## DynamicToolbar
33
+
34
+ Die DynamicToolbar blendet Aktionen je nach Breite automatisch aus, gruppiert sie im Overflow-Menü und lässt sich zwischen Floating- und Area-Layout umschalten.
35
+
36
+ ### Import
37
+
38
+ ```ts
39
+ import { DynamicToolbar } from '@chayns-components/navigation';
40
+ ```
41
+
42
+ ### Examples
43
+
44
+ #### Floating Basic Layout
45
+
46
+ ```tsx
47
+ <DynamicToolbar
48
+ activeItemId={'chat'}
49
+ items={[
50
+ { id: 'sidekick', icons: ['ts-sidekick'], label: 'Sidekick', hasRightSeparator: true },
51
+ { id: 'chat', icons: ['ts-chat'], label: 'Chat' },
52
+ { id: 'witness', icons: ['fa fa-microphone'], label: 'Gespräche', badgeCount: 7 },
53
+ { id: 'frontline', icons: ['fa fa-user-question'], label: 'Anfragen' },
54
+ { id: 'notifications', icons: ['fa fa-bell'], label: 'Benachrichtigungen', badgeCount: 28 },
55
+ { id: 'tasks', icons: ['fa fa-check-circle'], label: 'Aufgaben' },
56
+ { id: 'settings', icons: ['fa fa-cog'], label: 'Einstellungen' },
57
+ ]}
58
+ layout={DynamicToolbarLayout.Floating}
59
+ onItemSelect={action('onItemSelect')}
60
+ />
61
+ ```
62
+
63
+ #### Floating Scanner Layout
64
+
65
+ ```tsx
66
+ <DynamicToolbar
67
+ activeItemId={'chat'}
68
+ items={[
69
+ { id: 'chayns', icons: ['ts-chayns'], label: 'chayns' },
70
+ { id: 'chat', icons: ['ts-chat'], label: 'Chat', badgeCount: 19 },
71
+ { id: 'sidekick', icons: ['ts-sidekick-chat'], label: 'Sidekick' },
72
+ { id: 'cards', icons: ['fa fa-rectangle-history'], label: 'Cards' },
73
+ { id: 'id', icons: ['ts-fingerprint'], label: 'ID' },
74
+ { id: 'money', icons: ['fa fa-euro-sign'], label: 'Geld', badgeCount: 5 },
75
+ { id: 'space', icons: ['ts-space'], label: 'Space', isDisabled: true },
76
+ { id: 'pages', icons: ['fa fa-list'], label: 'Pages' },
77
+ { id: 'settings', icons: ['fa fa-cog'], label: 'Einstellungen' },
78
+ { id: 'map', icons: ['fa fa-circle-location-arrow'], label: 'Map' },
79
+ ]}
80
+ layout={DynamicToolbarLayout.Floating}
81
+ onItemSelect={action('onItemSelect')}
82
+ />
83
+ ```
84
+
85
+ #### Flush Basic Layout
86
+
87
+ ```tsx
88
+ <DynamicToolbar
89
+ activeItemId={'chat'}
90
+ items={[
91
+ { id: 'sidekick', icons: ['ts-sidekick'], label: 'Sidekick', hasRightSeparator: true },
92
+ { id: 'chat', icons: ['ts-chat'], label: 'Chat' },
93
+ { id: 'witness', icons: ['fa fa-microphone'], label: 'Gespräche', badgeCount: 7 },
94
+ { id: 'frontline', icons: ['fa fa-user-question'], label: 'Anfragen' },
95
+ { id: 'notifications', icons: ['fa fa-bell'], label: 'Benachrichtigungen', badgeCount: 28 },
96
+ { id: 'tasks', icons: ['fa fa-check-circle'], label: 'Aufgaben' },
97
+ { id: 'settings', icons: ['fa fa-cog'], label: 'Einstellungen' },
98
+ ]}
99
+ layout={DynamicToolbarLayout.Area}
100
+ onItemSelect={action('onItemSelect')}
101
+ />
102
+ ```
103
+
104
+ #### Flush Scanner Layout
105
+
106
+ ```tsx
107
+ <DynamicToolbar
108
+ activeItemId={'chat'}
109
+ items={[
110
+ { id: 'chayns', icons: ['ts-chayns'], label: 'chayns' },
111
+ { id: 'chat', icons: ['ts-chat'], label: 'Chat', badgeCount: 19 },
112
+ { id: 'sidekick', icons: ['ts-sidekick-chat'], label: 'Sidekick' },
113
+ { id: 'cards', icons: ['fa fa-rectangle-history'], label: 'Cards' },
114
+ { id: 'id', icons: ['ts-fingerprint'], label: 'ID' },
115
+ { id: 'money', icons: ['fa fa-euro-sign'], label: 'Geld', badgeCount: 5 },
116
+ { id: 'space', icons: ['ts-space'], label: 'Space', isDisabled: true },
117
+ { id: 'pages', icons: ['fa fa-list'], label: 'Pages' },
118
+ { id: 'settings', icons: ['fa fa-cog'], label: 'Einstellungen' },
119
+ { id: 'map', icons: ['fa fa-circle-location-arrow'], label: 'Map' },
120
+ ]}
121
+ layout={DynamicToolbarLayout.Area}
122
+ onItemSelect={action('onItemSelect')}
123
+ />
124
+ ```
125
+
126
+ ### Props
127
+
128
+ No prop documentation available.
129
+
130
+ ### Types
131
+
132
+ No additional exported types documented.
133
+
134
+ ### Usage Notes
135
+
136
+ - Import `DynamicToolbar` directly from `@chayns-components/navigation` instead of internal source paths.
137
+ - Start with one of the documented Storybook examples and adapt the props incrementally for your use case.
138
+
139
+ ### Anti Patterns
140
+
141
+ - Avoid imports from internal paths such as `@chayns-components/navigation/src/...`; always use the public package export.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chayns-components/navigation",
3
- "version": "5.0.33",
3
+ "version": "5.0.34",
4
4
  "description": "A set of beautiful React components for developing your own applications with chayns.",
5
5
  "sideEffects": false,
6
6
  "browserslist": [
@@ -33,7 +33,8 @@
33
33
  "test": "__tests__"
34
34
  },
35
35
  "files": [
36
- "lib"
36
+ "lib",
37
+ "AI_USAGE.md"
37
38
  ],
38
39
  "repository": {
39
40
  "type": "git",
@@ -69,7 +70,7 @@
69
70
  "typescript": "^5.9.3"
70
71
  },
71
72
  "dependencies": {
72
- "@chayns-components/core": "^5.0.33"
73
+ "@chayns-components/core": "^5.0.34"
73
74
  },
74
75
  "peerDependencies": {
75
76
  "chayns-api": ">=2.2.0",
@@ -81,5 +82,5 @@
81
82
  "publishConfig": {
82
83
  "access": "public"
83
84
  },
84
- "gitHead": "5e41d9af042b3c272c8c08b67a9c9bf4911902f6"
85
+ "gitHead": "7c7c2d7dacbc7c8031f3bcef885e4f63b8f49b1a"
85
86
  }