@imperosoft/cris-webui-components 0.1.0-beta.2 → 0.1.0-beta.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/README.md CHANGED
@@ -96,6 +96,162 @@ The component automatically adds these classes based on state:
96
96
  - `pressed` - When locally pressed
97
97
  - `disabled` - When disabled
98
98
 
99
+ ---
100
+
101
+ ### CrisText
102
+
103
+ A text display component with CIP pattern decoding.
104
+
105
+ ```tsx
106
+ import { CrisText } from '@imperosoft/cris-webui-components';
107
+
108
+ // Static text
109
+ <CrisText text="Hello World" />
110
+
111
+ // Text from serial join
112
+ <CrisText joinIndirectText={10} />
113
+
114
+ // Text with CIP patterns (decoded automatically)
115
+ <CrisText text="Volume: <A$5?%65535.0p>%" />
116
+
117
+ // With visibility/enable joins
118
+ <CrisText
119
+ joinIndirectText={10}
120
+ joinVisible={100}
121
+ joinEnable={101}
122
+ />
123
+ ```
124
+
125
+ #### CrisText Props
126
+
127
+ | Prop | Type | Default | Description |
128
+ |------|------|---------|-------------|
129
+ | `joinIndirectText` | `number` | - | Serial join for indirect text |
130
+ | `joinEnable` | `number` | - | Digital join to enable/disable |
131
+ | `joinVisible` | `number` | - | Digital join to show/hide |
132
+ | `text` | `string` | - | Static text (with CIP patterns) |
133
+ | `className` | `string` | - | Container CSS class |
134
+ | `textClassName` | `string` | - | Text element CSS class |
135
+ | `classDisabled` | `string` | - | CSS class when disabled |
136
+
137
+ ---
138
+
139
+ ### CrisSlider
140
+
141
+ An analog slider/fader component.
142
+
143
+ ```tsx
144
+ import { CrisSlider } from '@imperosoft/cris-webui-components';
145
+
146
+ // Vertical slider
147
+ <CrisSlider
148
+ join={10}
149
+ className="w-16 h-64"
150
+ barClassName="bg-gray-700 rounded"
151
+ fillClassName="bg-blue-500 rounded"
152
+ thumbClassName="bg-white rounded"
153
+ />
154
+
155
+ // Horizontal slider
156
+ <CrisSlider
157
+ join={10}
158
+ horizontal
159
+ className="w-64 h-16"
160
+ barClassName="bg-gray-700 rounded"
161
+ fillClassName="bg-green-500 rounded"
162
+ thumbClassName="bg-white rounded"
163
+ />
164
+
165
+ // With custom range
166
+ <CrisSlider
167
+ join={10}
168
+ minValue={0}
169
+ maxValue={100}
170
+ />
171
+
172
+ // Separate digital/analog joins
173
+ <CrisSlider
174
+ joinDigital={10}
175
+ joinAnalog={11}
176
+ />
177
+ ```
178
+
179
+ #### CrisSlider Props
180
+
181
+ | Prop | Type | Default | Description |
182
+ |------|------|---------|-------------|
183
+ | `join` | `number` | - | Shared analog/digital join |
184
+ | `joinDigital` | `number` | - | Digital join for press/release |
185
+ | `joinAnalog` | `number` | - | Analog join for value |
186
+ | `joinEnable` | `number` | - | Digital join to enable/disable |
187
+ | `joinVisible` | `number` | - | Digital join to show/hide |
188
+ | `minValue` | `number` | `0` | Minimum analog value |
189
+ | `maxValue` | `number` | `65535` | Maximum analog value |
190
+ | `horizontal` | `boolean` | `false` | Horizontal orientation |
191
+ | `fillHidden` | `boolean` | `false` | Hide fill bar |
192
+ | `trackSizePercent` | `number` | `20` | Track size as % of container |
193
+ | `thumbSizePercent` | `number` | `4` | Thumb size as % of container |
194
+ | `delayMsAfterDragUpdateFeedback` | `number` | `1000` | Delay before feedback updates |
195
+ | `className` | `string` | - | Container CSS class |
196
+ | `barClassName` | `string` | - | Track/bar CSS class |
197
+ | `fillClassName` | `string` | - | Fill CSS class |
198
+ | `thumbClassName` | `string` | - | Thumb CSS class |
199
+ | `classDisabled` | `string` | - | CSS class when disabled |
200
+
201
+ ---
202
+
203
+ ### CrisGauge
204
+
205
+ An analog gauge/level meter component.
206
+
207
+ ```tsx
208
+ import { CrisGauge } from '@imperosoft/cris-webui-components';
209
+
210
+ // Vertical gauge
211
+ <CrisGauge
212
+ join={10}
213
+ segments={20}
214
+ className="h-48"
215
+ inactiveSegmentClassName="bg-gray-700"
216
+ lowSegmentClassName="bg-green-500"
217
+ mediumSegmentClassName="bg-yellow-500"
218
+ highSegmentClassName="bg-red-500"
219
+ />
220
+
221
+ // Horizontal gauge
222
+ <CrisGauge
223
+ join={10}
224
+ orientation="horizontal"
225
+ segments={10}
226
+ />
227
+
228
+ // Static value (no join)
229
+ <CrisGauge value={32768} />
230
+ ```
231
+
232
+ #### CrisGauge Props
233
+
234
+ | Prop | Type | Default | Description |
235
+ |------|------|---------|-------------|
236
+ | `value` | `number` | - | Static value (if no join) |
237
+ | `join` | `number` | - | Analog join for value |
238
+ | `joinEnable` | `number` | - | Digital join to enable/disable |
239
+ | `joinVisible` | `number` | - | Digital join to show/hide |
240
+ | `minValue` | `number` | `0` | Minimum value |
241
+ | `maxValue` | `number` | `65535` | Maximum value |
242
+ | `segments` | `number` | `20` | Number of segments |
243
+ | `inverted` | `boolean` | `false` | Invert direction |
244
+ | `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Orientation |
245
+ | `className` | `string` | - | Container CSS class |
246
+ | `inactiveSegmentClassName` | `string` | - | Inactive segment class |
247
+ | `segmentClassName` | `string` | - | Active segment class (all) |
248
+ | `lowSegmentClassName` | `string` | - | Low level segment class (0-60%) |
249
+ | `mediumSegmentClassName` | `string` | - | Medium level segment class (60-80%) |
250
+ | `highSegmentClassName` | `string` | - | High level segment class (80-100%) |
251
+ | `classDisabled` | `string` | - | CSS class when disabled |
252
+
253
+ ---
254
+
99
255
  ## Peer Dependencies
100
256
 
101
257
  - `react` >= 18.0.0
package/dist/index.d.mts CHANGED
@@ -45,4 +45,122 @@ interface CrisButtonProps {
45
45
  }
46
46
  declare function CrisButton({ join, joinFeedback, joinEnable, joinVisible, text, textPressed, textSelected, icon, iconPosition, showControlFeedback, showLocalFeedback, suppressKeyClicks, smartId, className, classActive, classPressed, classDisabled, children, onPress, onRelease, }: CrisButtonProps): react_jsx_runtime.JSX.Element | null;
47
47
 
48
- export { CrisButton, type CrisButtonProps };
48
+ interface CrisTextProps {
49
+ /** Serial join for indirect text */
50
+ joinIndirectText?: number;
51
+ /** Digital join for enable state */
52
+ joinEnable?: number;
53
+ /** Digital join for visibility */
54
+ joinVisible?: number;
55
+ /** Static text (used if no joinIndirectText) */
56
+ text?: string;
57
+ /** Container CSS class */
58
+ className?: string;
59
+ /** Container inline style */
60
+ style?: React.CSSProperties;
61
+ /** Text element CSS class */
62
+ textClassName?: string;
63
+ /** Text element inline style */
64
+ textStyle?: React.CSSProperties;
65
+ /** Class when disabled */
66
+ classDisabled?: string;
67
+ /** Children content */
68
+ children?: ReactNode;
69
+ }
70
+ declare function CrisText({ joinIndirectText, joinEnable, joinVisible, text, className, style, textClassName, textStyle, classDisabled, children, }: CrisTextProps): react_jsx_runtime.JSX.Element | null;
71
+
72
+ interface CrisSliderProps {
73
+ /** Analog join for value (shared with digital if joinDigital not set) */
74
+ join?: number;
75
+ /** Digital join for press/release feedback */
76
+ joinDigital?: number;
77
+ /** Analog join for value (overrides join) */
78
+ joinAnalog?: number;
79
+ /** Digital join for enable state */
80
+ joinEnable?: number;
81
+ /** Digital join for visibility */
82
+ joinVisible?: number;
83
+ /** Minimum value (default 0) */
84
+ minValue?: number;
85
+ /** Maximum value (default 65535) */
86
+ maxValue?: number;
87
+ /** Horizontal orientation (default false = vertical) */
88
+ horizontal?: boolean;
89
+ /** Hide fill bar */
90
+ fillHidden?: boolean;
91
+ /** Track size as percentage of container (default 20) */
92
+ trackSizePercent?: number;
93
+ /** Thumb size as percentage of container (default 4) */
94
+ thumbSizePercent?: number;
95
+ /** Delay in ms after drag before updating from feedback (default 1000) */
96
+ delayMsAfterDragUpdateFeedback?: number;
97
+ /** Container CSS class */
98
+ className?: string;
99
+ /** Container inline style */
100
+ style?: React.CSSProperties;
101
+ /** Bar/track CSS class */
102
+ barClassName?: string;
103
+ /** Bar/track inline style */
104
+ barStyle?: React.CSSProperties;
105
+ /** Fill CSS class */
106
+ fillClassName?: string;
107
+ /** Fill inline style */
108
+ fillStyle?: React.CSSProperties;
109
+ /** Thumb CSS class */
110
+ thumbClassName?: string;
111
+ /** Thumb inline style */
112
+ thumbStyle?: React.CSSProperties;
113
+ /** Class when disabled */
114
+ classDisabled?: string;
115
+ }
116
+ declare function CrisSlider({ join, joinDigital, joinAnalog, joinEnable, joinVisible, minValue, maxValue, horizontal, fillHidden, trackSizePercent, thumbSizePercent, delayMsAfterDragUpdateFeedback, className, style, barClassName, barStyle, fillClassName, fillStyle, thumbClassName, thumbStyle, classDisabled, }: CrisSliderProps): react_jsx_runtime.JSX.Element | null;
117
+
118
+ interface CrisGaugeProps {
119
+ /** Static value (used if no join) */
120
+ value?: number;
121
+ /** Analog join for value */
122
+ join?: number;
123
+ /** Digital join for enable state */
124
+ joinEnable?: number;
125
+ /** Digital join for visibility */
126
+ joinVisible?: number;
127
+ /** Minimum value (default 0) */
128
+ minValue?: number;
129
+ /** Maximum value (default 65535) */
130
+ maxValue?: number;
131
+ /** Number of segments (default 20) */
132
+ segments?: number;
133
+ /** Invert direction (default false) */
134
+ inverted?: boolean;
135
+ /** Orientation (default vertical) */
136
+ orientation?: 'vertical' | 'horizontal';
137
+ /** Container CSS class */
138
+ className?: string;
139
+ /** Container inline style */
140
+ style?: React.CSSProperties;
141
+ /** Inactive segment CSS class */
142
+ inactiveSegmentClassName?: string;
143
+ /** Inactive segment inline style */
144
+ inactiveSegmentStyle?: React.CSSProperties;
145
+ /** Active segment CSS class (all levels) */
146
+ segmentClassName?: string;
147
+ /** Active segment inline style (all levels) */
148
+ segmentStyle?: React.CSSProperties;
149
+ /** Low level segment CSS class (0-60%) */
150
+ lowSegmentClassName?: string;
151
+ /** Low level segment inline style */
152
+ lowSegmentStyle?: React.CSSProperties;
153
+ /** Medium level segment CSS class (60-80%) */
154
+ mediumSegmentClassName?: string;
155
+ /** Medium level segment inline style */
156
+ mediumSegmentStyle?: React.CSSProperties;
157
+ /** High level segment CSS class (80-100%) */
158
+ highSegmentClassName?: string;
159
+ /** High level segment inline style */
160
+ highSegmentStyle?: React.CSSProperties;
161
+ /** Class when disabled */
162
+ classDisabled?: string;
163
+ }
164
+ declare function CrisGauge({ value, join, joinEnable, joinVisible, minValue, maxValue, segments, inverted, orientation, className, style, inactiveSegmentClassName, inactiveSegmentStyle, segmentClassName, segmentStyle, lowSegmentClassName, lowSegmentStyle, mediumSegmentClassName, mediumSegmentStyle, highSegmentClassName, highSegmentStyle, classDisabled, }: CrisGaugeProps): react_jsx_runtime.JSX.Element | null;
165
+
166
+ export { CrisButton, type CrisButtonProps, CrisGauge, type CrisGaugeProps, CrisSlider, type CrisSliderProps, CrisText, type CrisTextProps };
package/dist/index.d.ts CHANGED
@@ -45,4 +45,122 @@ interface CrisButtonProps {
45
45
  }
46
46
  declare function CrisButton({ join, joinFeedback, joinEnable, joinVisible, text, textPressed, textSelected, icon, iconPosition, showControlFeedback, showLocalFeedback, suppressKeyClicks, smartId, className, classActive, classPressed, classDisabled, children, onPress, onRelease, }: CrisButtonProps): react_jsx_runtime.JSX.Element | null;
47
47
 
48
- export { CrisButton, type CrisButtonProps };
48
+ interface CrisTextProps {
49
+ /** Serial join for indirect text */
50
+ joinIndirectText?: number;
51
+ /** Digital join for enable state */
52
+ joinEnable?: number;
53
+ /** Digital join for visibility */
54
+ joinVisible?: number;
55
+ /** Static text (used if no joinIndirectText) */
56
+ text?: string;
57
+ /** Container CSS class */
58
+ className?: string;
59
+ /** Container inline style */
60
+ style?: React.CSSProperties;
61
+ /** Text element CSS class */
62
+ textClassName?: string;
63
+ /** Text element inline style */
64
+ textStyle?: React.CSSProperties;
65
+ /** Class when disabled */
66
+ classDisabled?: string;
67
+ /** Children content */
68
+ children?: ReactNode;
69
+ }
70
+ declare function CrisText({ joinIndirectText, joinEnable, joinVisible, text, className, style, textClassName, textStyle, classDisabled, children, }: CrisTextProps): react_jsx_runtime.JSX.Element | null;
71
+
72
+ interface CrisSliderProps {
73
+ /** Analog join for value (shared with digital if joinDigital not set) */
74
+ join?: number;
75
+ /** Digital join for press/release feedback */
76
+ joinDigital?: number;
77
+ /** Analog join for value (overrides join) */
78
+ joinAnalog?: number;
79
+ /** Digital join for enable state */
80
+ joinEnable?: number;
81
+ /** Digital join for visibility */
82
+ joinVisible?: number;
83
+ /** Minimum value (default 0) */
84
+ minValue?: number;
85
+ /** Maximum value (default 65535) */
86
+ maxValue?: number;
87
+ /** Horizontal orientation (default false = vertical) */
88
+ horizontal?: boolean;
89
+ /** Hide fill bar */
90
+ fillHidden?: boolean;
91
+ /** Track size as percentage of container (default 20) */
92
+ trackSizePercent?: number;
93
+ /** Thumb size as percentage of container (default 4) */
94
+ thumbSizePercent?: number;
95
+ /** Delay in ms after drag before updating from feedback (default 1000) */
96
+ delayMsAfterDragUpdateFeedback?: number;
97
+ /** Container CSS class */
98
+ className?: string;
99
+ /** Container inline style */
100
+ style?: React.CSSProperties;
101
+ /** Bar/track CSS class */
102
+ barClassName?: string;
103
+ /** Bar/track inline style */
104
+ barStyle?: React.CSSProperties;
105
+ /** Fill CSS class */
106
+ fillClassName?: string;
107
+ /** Fill inline style */
108
+ fillStyle?: React.CSSProperties;
109
+ /** Thumb CSS class */
110
+ thumbClassName?: string;
111
+ /** Thumb inline style */
112
+ thumbStyle?: React.CSSProperties;
113
+ /** Class when disabled */
114
+ classDisabled?: string;
115
+ }
116
+ declare function CrisSlider({ join, joinDigital, joinAnalog, joinEnable, joinVisible, minValue, maxValue, horizontal, fillHidden, trackSizePercent, thumbSizePercent, delayMsAfterDragUpdateFeedback, className, style, barClassName, barStyle, fillClassName, fillStyle, thumbClassName, thumbStyle, classDisabled, }: CrisSliderProps): react_jsx_runtime.JSX.Element | null;
117
+
118
+ interface CrisGaugeProps {
119
+ /** Static value (used if no join) */
120
+ value?: number;
121
+ /** Analog join for value */
122
+ join?: number;
123
+ /** Digital join for enable state */
124
+ joinEnable?: number;
125
+ /** Digital join for visibility */
126
+ joinVisible?: number;
127
+ /** Minimum value (default 0) */
128
+ minValue?: number;
129
+ /** Maximum value (default 65535) */
130
+ maxValue?: number;
131
+ /** Number of segments (default 20) */
132
+ segments?: number;
133
+ /** Invert direction (default false) */
134
+ inverted?: boolean;
135
+ /** Orientation (default vertical) */
136
+ orientation?: 'vertical' | 'horizontal';
137
+ /** Container CSS class */
138
+ className?: string;
139
+ /** Container inline style */
140
+ style?: React.CSSProperties;
141
+ /** Inactive segment CSS class */
142
+ inactiveSegmentClassName?: string;
143
+ /** Inactive segment inline style */
144
+ inactiveSegmentStyle?: React.CSSProperties;
145
+ /** Active segment CSS class (all levels) */
146
+ segmentClassName?: string;
147
+ /** Active segment inline style (all levels) */
148
+ segmentStyle?: React.CSSProperties;
149
+ /** Low level segment CSS class (0-60%) */
150
+ lowSegmentClassName?: string;
151
+ /** Low level segment inline style */
152
+ lowSegmentStyle?: React.CSSProperties;
153
+ /** Medium level segment CSS class (60-80%) */
154
+ mediumSegmentClassName?: string;
155
+ /** Medium level segment inline style */
156
+ mediumSegmentStyle?: React.CSSProperties;
157
+ /** High level segment CSS class (80-100%) */
158
+ highSegmentClassName?: string;
159
+ /** High level segment inline style */
160
+ highSegmentStyle?: React.CSSProperties;
161
+ /** Class when disabled */
162
+ classDisabled?: string;
163
+ }
164
+ declare function CrisGauge({ value, join, joinEnable, joinVisible, minValue, maxValue, segments, inverted, orientation, className, style, inactiveSegmentClassName, inactiveSegmentStyle, segmentClassName, segmentStyle, lowSegmentClassName, lowSegmentStyle, mediumSegmentClassName, mediumSegmentStyle, highSegmentClassName, highSegmentStyle, classDisabled, }: CrisGaugeProps): react_jsx_runtime.JSX.Element | null;
165
+
166
+ export { CrisButton, type CrisButtonProps, CrisGauge, type CrisGaugeProps, CrisSlider, type CrisSliderProps, CrisText, type CrisTextProps };