@pushwoosh/dumb-components 1.1.42 → 1.1.44

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 (34) hide show
  1. package/{ai-documentation.mdx → ai-documentation.md} +21 -21
  2. package/index.d.ts +1 -1
  3. package/index.js +1 -1
  4. package/native/NativeTimeInput.d.ts +3 -0
  5. package/native/NativeTimeInput.js +8 -0
  6. package/native/{ai-documentation.mdx → ai-documentation.md} +70 -18
  7. package/native/index.d.ts +1 -0
  8. package/native/index.js +2 -1
  9. package/package.json +5 -5
  10. /package/Alert/{ai-documentation.mdx → ai-documentation.md} +0 -0
  11. /package/Badge/{ai-documentation.mdx → ai-documentation.md} +0 -0
  12. /package/Banner/{ai-documentation.mdx → ai-documentation.md} +0 -0
  13. /package/Button/{ai-documentation.mdx → ai-documentation.md} +0 -0
  14. /package/CardMetric/{ai-documentation.mdx → ai-documentation.md} +0 -0
  15. /package/Checkbox/{ai-documentation.mdx → ai-documentation.md} +0 -0
  16. /package/Chip/{ai-documentation.mdx → ai-documentation.md} +0 -0
  17. /package/CodeEditor/{ai-documentation.mdx → ai-documentation.md} +0 -0
  18. /package/DateTimePicker/{ai-documentation.mdx → ai-documentation.md} +0 -0
  19. /package/Drawer/{ai-documentation.mdx → ai-documentation.md} +0 -0
  20. /package/EnhancedInput/{ai-documentation.mdx → ai-documentation.md} +0 -0
  21. /package/InputFile/{ai-documentation.mdx → ai-documentation.md} +0 -0
  22. /package/Modal/{ai-documentation.mdx → ai-documentation.md} +0 -0
  23. /package/PageHeader/{ai-documentation.mdx → ai-documentation.md} +0 -0
  24. /package/Pagination/{ai-documentation.mdx → ai-documentation.md} +0 -0
  25. /package/Popover/{ai-documentation.mdx → ai-documentation.md} +0 -0
  26. /package/ProgressBar/{ai-documentation.mdx → ai-documentation.md} +0 -0
  27. /package/Radio/{ai-documentation.mdx → ai-documentation.md} +0 -0
  28. /package/Select/{ai-documentation.mdx → ai-documentation.md} +0 -0
  29. /package/Skeleton/{ai-documentation.mdx → ai-documentation.md} +0 -0
  30. /package/Spinner/{ai-documentation.mdx → ai-documentation.md} +0 -0
  31. /package/Switch/{ai-documentation.mdx → ai-documentation.md} +0 -0
  32. /package/Tabs/{ai-documentation.mdx → ai-documentation.md} +0 -0
  33. /package/Toast/{ai-documentation.mdx → ai-documentation.md} +0 -0
  34. /package/Tooltip/{ai-documentation.mdx → ai-documentation.md} +0 -0
@@ -23,39 +23,39 @@ import { useElementWidth, useOnClickOutside } from '@pushwoosh/dumb-components/h
23
23
  ### Form Components
24
24
  | Component | Description | Documentation |
25
25
  |-----------|-------------|---------------|
26
- | [Button](./Button/ai-documentation.mdx) | Interactive buttons with loading states and variants | 📖 |
27
- | [Checkbox](./Checkbox/ai-documentation.mdx) | Checkbox input with label and tooltip support | 📖 |
28
- | [EnhancedInput](./EnhancedInput/ai-documentation.mdx) | Enhanced text input with icons and clear functionality | 📖 |
29
- | [InputFile](./InputFile/ai-documentation.mdx) | File upload component with validation and drag-drop | 📖 |
30
- | [Radio](./Radio/ai-documentation.mdx) | Radio button component for single choice selection | 📖 |
31
- | [Select](./Select/ai-documentation.mdx) | Advanced select with async and creatable variants | 📖 |
32
- | [Switch](./Switch/ai-documentation.mdx) | Toggle switch for boolean state changes | 📖 |
26
+ | [Button](./Button/ai-documentation.md) | Interactive buttons with loading states and variants | 📖 |
27
+ | [Checkbox](./Checkbox/ai-documentation.md) | Checkbox input with label and tooltip support | 📖 |
28
+ | [EnhancedInput](./EnhancedInput/ai-documentation.md) | Enhanced text input with icons and clear functionality | 📖 |
29
+ | [InputFile](./InputFile/ai-documentation.md) | File upload component with validation and drag-drop | 📖 |
30
+ | [Radio](./Radio/ai-documentation.md) | Radio button component for single choice selection | 📖 |
31
+ | [Select](./Select/ai-documentation.md) | Advanced select with async and creatable variants | 📖 |
32
+ | [Switch](./Switch/ai-documentation.md) | Toggle switch for boolean state changes | 📖 |
33
33
 
34
34
  ### UI Components
35
35
  | Component | Description | Documentation |
36
36
  |-----------|-------------|---------------|
37
- | [Alert](./Alert/ai-documentation.mdx) | Alert messages with optional collapsible content | 📖 |
38
- | [Badge](./Badge/ai-documentation.mdx) | Status badges and indicators with color variants | 📖 |
39
- | [Chip](./Chip/ai-documentation.mdx) | Interactive tags and filters with remove functionality | 📖 |
40
- | [Popover](./Popover/ai-documentation.mdx) | Floating overlay component with positioning | 📖 |
41
- | [ProgressBar](./ProgressBar/ai-documentation.mdx) | Progress indicator with customizable styling | 📖 |
42
- | [Skeleton](./Skeleton/ai-documentation.mdx) | Loading placeholder components | 📖 |
43
- | [Spinner](./Spinner/ai-documentation.mdx) | Loading indicator in multiple sizes | 📖 |
44
- | [Toast](./Toast/ai-documentation.mdx) | Notification system with provider pattern | 📖 |
45
- | [Tooltip](./Tooltip/ai-documentation.mdx) | Contextual tooltips with multiple positions | 📖 |
37
+ | [Alert](./Alert/ai-documentation.md) | Alert messages with optional collapsible content | 📖 |
38
+ | [Badge](./Badge/ai-documentation.md) | Status badges and indicators with color variants | 📖 |
39
+ | [Chip](./Chip/ai-documentation.md) | Interactive tags and filters with remove functionality | 📖 |
40
+ | [Popover](./Popover/ai-documentation.md) | Floating overlay component with positioning | 📖 |
41
+ | [ProgressBar](./ProgressBar/ai-documentation.md) | Progress indicator with customizable styling | 📖 |
42
+ | [Skeleton](./Skeleton/ai-documentation.md) | Loading placeholder components | 📖 |
43
+ | [Spinner](./Spinner/ai-documentation.md) | Loading indicator in multiple sizes | 📖 |
44
+ | [Toast](./Toast/ai-documentation.md) | Notification system with provider pattern | 📖 |
45
+ | [Tooltip](./Tooltip/ai-documentation.md) | Contextual tooltips with multiple positions | 📖 |
46
46
 
47
47
  ### Layout Components
48
48
  | Component | Description | Documentation |
49
49
  |-----------|-------------|---------------|
50
- | [Modal](./Modal/ai-documentation.mdx) | Modal dialogs with size variants and confirmations | 📖 |
51
- | [PageHeader](./PageHeader/ai-documentation.mdx) | Page-level header with navigation and actions | 📖 |
52
- | [Pagination](./Pagination/ai-documentation.mdx) | Navigation component for multi-page content | 📖 |
53
- | [Tabs](./Tabs/ai-documentation.mdx) | Tabbed interface with multiple tab variants | 📖 |
50
+ | [Modal](./Modal/ai-documentation.md) | Modal dialogs with size variants and confirmations | 📖 |
51
+ | [PageHeader](./PageHeader/ai-documentation.md) | Page-level header with navigation and actions | 📖 |
52
+ | [Pagination](./Pagination/ai-documentation.md) | Navigation component for multi-page content | 📖 |
53
+ | [Tabs](./Tabs/ai-documentation.md) | Tabbed interface with multiple tab variants | 📖 |
54
54
 
55
55
  ### Base Components
56
56
  | Component | Description | Documentation |
57
57
  |-----------|-------------|---------------|
58
- | [Native](./native/ai-documentation.mdx) | Styled native HTML elements (Input, Select, Textarea) | 📖 |
58
+ | [Native](./native/ai-documentation.md) | Styled native HTML elements (Input, Select, Textarea, NativeTimeInput) | 📖 |
59
59
 
60
60
  ## 🤖 AI Agent Quick Reference
61
61
 
package/index.d.ts CHANGED
@@ -30,7 +30,7 @@ export { PushPreview } from './PushPreview';
30
30
  export { Toast, ToastProvider, useToast } from './Toast';
31
31
  export { AutosizeInput, PageHeader, PageHeaderEditable } from './PageHeader';
32
32
  export { ExportResult } from './ExportResult';
33
- export { NativeInput, NativeTextarea, NativeSelect } from './native';
33
+ export { NativeInput, NativeTextarea, NativeSelect, NativeTimeInput, } from './native';
34
34
  export { FieldBox } from './FieldBox';
35
35
  export { NumberPicker } from './NumberPicker';
36
36
  export { CodeEditor } from './CodeEditor';
package/index.js CHANGED
@@ -30,7 +30,7 @@ export { PushPreview } from './PushPreview';
30
30
  export { Toast, ToastProvider, useToast } from './Toast';
31
31
  export { AutosizeInput, PageHeader, PageHeaderEditable } from './PageHeader';
32
32
  export { ExportResult } from './ExportResult';
33
- export { NativeInput, NativeTextarea, NativeSelect } from './native';
33
+ export { NativeInput, NativeTextarea, NativeSelect, NativeTimeInput } from './native';
34
34
  export { FieldBox } from './FieldBox';
35
35
  export { NumberPicker } from './NumberPicker';
36
36
  export { CodeEditor } from './CodeEditor';
@@ -0,0 +1,3 @@
1
+ export declare const NativeTimeInput: import("styled-components").StyledComponent<"input", any, {
2
+ type: "time";
3
+ }, "type">;
@@ -0,0 +1,8 @@
1
+ import styled from 'styled-components';
2
+ import { Color } from '@pushwoosh/kit-constants';
3
+ export const NativeTimeInput = styled.input.attrs({
4
+ type: 'time'
5
+ }).withConfig({
6
+ displayName: "NativeTimeInput",
7
+ componentId: "sc-r1vjhd-0"
8
+ })(["border:1px solid ", ";border-radius:4px;color:", ";font-size:14px;line-height:1.4;padding:8px 12px;height:36px;box-sizing:border-box;appearance:none;&:focus{border-color:", ";outline:none;}&::-webkit-calendar-picker-indicator{display:none;-webkit-appearance:none;}"], Color.FORM, Color.MAIN, Color.BRIGHT);
@@ -4,12 +4,13 @@
4
4
  > Part of @pushwoosh/dumb-components library
5
5
 
6
6
  ## Overview
7
- **Components:** NativeInput, NativeSelect, NativeTextarea
8
- **Import Path:** `import { NativeInput, NativeSelect, NativeTextarea } from '@pushwoosh/dumb-components'`
9
- **Files:**
7
+ **Components:** NativeInput, NativeSelect, NativeTextarea, NativeTimeInput
8
+ **Import Path:** `import { NativeInput, NativeSelect, NativeTextarea, NativeTimeInput } from '@pushwoosh/dumb-components'`
9
+ **Files:**
10
10
  - `native/Input.tsx` - Styled native input component
11
- - `native/Select.tsx` - Styled native select component
11
+ - `native/Select.tsx` - Styled native select component
12
12
  - `native/Textarea.tsx` - Styled native textarea component
13
+ - `native/TimeInput.tsx` - Styled native time input component
13
14
  - `native/index.ts` - Main exports
14
15
  **Type:** Base Form Components / Styled HTML Elements
15
16
  **Description:** Styled-components wrappers around native HTML form elements. These provide consistent Pushwoosh Design System styling while maintaining native HTML behavior. Used internally by enhanced components like EnhancedInput.
@@ -47,6 +48,13 @@ interface NativeTextareaProps {
47
48
  // value, onChange, placeholder, rows, cols, disabled, etc.
48
49
  ```
49
50
 
51
+ ### NativeTimeInputProps
52
+ ```typescript
53
+ // NativeTimeInput is a styled input[type="time"] element
54
+ // Extends all standard HTMLInputElement attributes:
55
+ // value, onChange, disabled, readOnly, min, max, step, etc.
56
+ ```
57
+
50
58
  ## Import & Usage
51
59
 
52
60
  ### NativeInput
@@ -94,7 +102,7 @@ import { NativeTextarea } from '@pushwoosh/dumb-components';
94
102
 
95
103
  function BasicTextarea() {
96
104
  const [value, setValue] = useState('');
97
-
105
+
98
106
  return (
99
107
  <NativeTextarea
100
108
  value={value}
@@ -106,6 +114,22 @@ function BasicTextarea() {
106
114
  }
107
115
  ```
108
116
 
117
+ ### NativeTimeInput
118
+ ```tsx
119
+ import { NativeTimeInput } from '@pushwoosh/dumb-components';
120
+
121
+ function BasicTimeInput() {
122
+ const [time, setTime] = useState('09:00');
123
+
124
+ return (
125
+ <NativeTimeInput
126
+ value={time}
127
+ onChange={(e) => setTime(e.target.value)}
128
+ />
129
+ );
130
+ }
131
+ ```
132
+
109
133
  ## Advanced Examples
110
134
 
111
135
  ### Form with Validation
@@ -186,7 +210,7 @@ function ValidationForm() {
186
210
 
187
211
  ### Different Input Types
188
212
  ```tsx
189
- import { NativeInput } from '@pushwoosh/dumb-components';
213
+ import { NativeInput, NativeTimeInput } from '@pushwoosh/dumb-components';
190
214
 
191
215
  function InputTypes() {
192
216
  const [formData, setFormData] = useState({
@@ -194,9 +218,10 @@ function InputTypes() {
194
218
  password: '',
195
219
  number: '',
196
220
  date: '',
221
+ time: '09:00',
197
222
  url: ''
198
223
  });
199
-
224
+
200
225
  return (
201
226
  <div>
202
227
  <NativeInput
@@ -205,14 +230,14 @@ function InputTypes() {
205
230
  onChange={(e) => setFormData({ ...formData, email: e.target.value })}
206
231
  placeholder="email@example.com"
207
232
  />
208
-
233
+
209
234
  <NativeInput
210
235
  type="password"
211
236
  value={formData.password}
212
237
  onChange={(e) => setFormData({ ...formData, password: e.target.value })}
213
238
  placeholder="Password"
214
239
  />
215
-
240
+
216
241
  <NativeInput
217
242
  type="number"
218
243
  value={formData.number}
@@ -221,13 +246,18 @@ function InputTypes() {
221
246
  min="0"
222
247
  max="100"
223
248
  />
224
-
249
+
225
250
  <NativeInput
226
251
  type="date"
227
252
  value={formData.date}
228
253
  onChange={(e) => setFormData({ ...formData, date: e.target.value })}
229
254
  />
230
-
255
+
256
+ <NativeTimeInput
257
+ value={formData.time}
258
+ onChange={(e) => setFormData({ ...formData, time: e.target.value })}
259
+ />
260
+
231
261
  <NativeInput
232
262
  type="url"
233
263
  value={formData.url}
@@ -308,7 +338,7 @@ function GroupedSelect() {
308
338
 
309
339
  ### Disabled and ReadOnly States
310
340
  ```tsx
311
- import { NativeInput, NativeSelect, NativeTextarea } from '@pushwoosh/dumb-components';
341
+ import { NativeInput, NativeSelect, NativeTextarea, NativeTimeInput } from '@pushwoosh/dumb-components';
312
342
 
313
343
  function DisabledStates() {
314
344
  return (
@@ -319,23 +349,33 @@ function DisabledStates() {
319
349
  disabled
320
350
  placeholder="This is disabled"
321
351
  />
322
-
352
+
323
353
  <NativeSelect disabled>
324
354
  <option>Disabled select</option>
325
355
  </NativeSelect>
326
-
356
+
327
357
  <NativeTextarea
328
358
  value="Disabled textarea"
329
359
  disabled
330
360
  rows={3}
331
361
  />
332
-
362
+
363
+ <NativeTimeInput
364
+ value="09:00"
365
+ disabled
366
+ />
367
+
333
368
  {/* Read-only inputs */}
334
369
  <NativeInput
335
370
  value="Read-only input"
336
371
  readOnly
337
372
  />
338
-
373
+
374
+ <NativeTimeInput
375
+ value="09:00"
376
+ readOnly
377
+ />
378
+
339
379
  <NativeTextarea
340
380
  value="Read-only textarea content"
341
381
  readOnly
@@ -385,6 +425,17 @@ function DisabledStates() {
385
425
  | `wrap` | `'soft' \| 'hard'` | - | `'soft'` | Text wrapping behavior |
386
426
  | `resize` | `string` | - | - | CSS resize property |
387
427
 
428
+ ### NativeTimeInput Specific Props
429
+ | Prop | Type | Required | Default | Description |
430
+ |------|------|----------|---------|-------------|
431
+ | `value` | `string` | - | - | Time value in HH:MM format |
432
+ | `onChange` | `(e: ChangeEvent) => void` | - | - | Change handler |
433
+ | `min` | `string` | - | - | Minimum time value |
434
+ | `max` | `string` | - | - | Maximum time value |
435
+ | `step` | `number` | - | - | Step value in seconds |
436
+ | `disabled` | `boolean` | - | `false` | Disable the input |
437
+ | `readOnly` | `boolean` | - | `false` | Make input read-only |
438
+
388
439
  ## AI Agent Guidelines
389
440
 
390
441
  ### ✅ Recommended Patterns
@@ -417,11 +468,12 @@ function DisabledStates() {
417
468
 
418
469
  ### Styling Notes
419
470
  - Components use `styled-components` with design system constants
420
- - Border radius uses `ShapeRadius.CONTROL`
471
+ - Border radius uses `ShapeRadius.CONTROL` (4px for TimeInput)
421
472
  - Colors are from Pushwoosh color palette
422
473
  - Font sizes and line heights are from typography scale
423
- - Input height is standardized using `UnitSize.FIELD_HEIGHT`
474
+ - Input height is standardized using `UnitSize.FIELD_HEIGHT` (36px for NativeTimeInput)
424
475
  - Focus outline is removed in favor of border styling
476
+ - NativeTimeInput hides the native calendar picker indicator for consistent styling
425
477
 
426
478
  ## Related Components
427
479
  - **EnhancedInput** - Uses NativeInput internally with icons and clear functionality
package/native/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { NativeInput } from './Input';
2
2
  export { NativeTextarea } from './Textarea';
3
3
  export { NativeSelect } from './Select';
4
+ export { NativeTimeInput } from './NativeTimeInput';
package/native/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { NativeInput } from './Input';
2
2
  export { NativeTextarea } from './Textarea';
3
- export { NativeSelect } from './Select';
3
+ export { NativeSelect } from './Select';
4
+ export { NativeTimeInput } from './NativeTimeInput';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/dumb-components",
3
- "version": "1.1.42",
3
+ "version": "1.1.44",
4
4
  "description": "React components to build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -39,10 +39,10 @@
39
39
  "@codemirror/lang-liquid": "^6.2.2",
40
40
  "@floating-ui/react-dom": "^2.1.2",
41
41
  "@lezer/highlight": "^1.2.1",
42
- "@pushwoosh/kit-constants": "^1.6.12",
43
- "@pushwoosh/kit-helpers": "^4.8.5",
44
- "@pushwoosh/kit-icons": "^2.1.8",
45
- "@pushwoosh/kit-typography": "^1.7.4",
42
+ "@pushwoosh/kit-constants": "^1.6.14",
43
+ "@pushwoosh/kit-helpers": "^4.8.6",
44
+ "@pushwoosh/kit-icons": "^2.1.9",
45
+ "@pushwoosh/kit-typography": "^1.7.5",
46
46
  "@tippyjs/react": "^4.2.6",
47
47
  "@uiw/codemirror-themes": "^4.23.8",
48
48
  "@uiw/react-codemirror": "^4.23.8",