ngx-strata 0.3.0 → 0.4.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 (49) hide show
  1. package/assets/icons/check.svg +1 -0
  2. package/assets/styles/components/accordion.scss +12 -1
  3. package/assets/styles/components/action-menu.scss +1 -1
  4. package/assets/styles/components/avatar.scss +48 -9
  5. package/assets/styles/components/badge.scss +134 -0
  6. package/assets/styles/components/button.scss +45 -0
  7. package/assets/styles/components/checkbox.scss +10 -2
  8. package/assets/styles/components/file-upload.scss +113 -0
  9. package/assets/styles/components/image-cropper.scss +201 -0
  10. package/assets/styles/components/input-field.scss +39 -9
  11. package/assets/styles/components/item.scss +1 -1
  12. package/assets/styles/components/modal.scss +112 -1
  13. package/assets/styles/components/notification.scss +29 -0
  14. package/assets/styles/components/otp.scss +132 -0
  15. package/assets/styles/components/pagination.scss +13 -3
  16. package/assets/styles/components/progress.scss +2 -2
  17. package/assets/styles/components/radio.scss +3 -2
  18. package/assets/styles/components/segmented-control.scss +43 -11
  19. package/assets/styles/components/select.scss +29 -6
  20. package/assets/styles/components/slider.scss +30 -2
  21. package/assets/styles/components/stepper.scss +378 -0
  22. package/assets/styles/components/table.scss +1 -1
  23. package/assets/styles/components/tabs.scss +1 -1
  24. package/assets/styles/components/toggle.scss +1 -0
  25. package/assets/styles/components/tooltip.scss +9 -6
  26. package/assets/styles/public-api.scss +6 -1
  27. package/dist/strata/strata.css +1 -1
  28. package/fesm2022/ngx-strata.mjs +3067 -1452
  29. package/fesm2022/ngx-strata.mjs.map +1 -1
  30. package/package.json +1 -1
  31. package/skills/ngx-strata/SKILL.md +43 -18
  32. package/skills/ngx-strata/components/accordion.md +9 -7
  33. package/skills/ngx-strata/components/avatar.md +22 -10
  34. package/skills/ngx-strata/components/badge.md +54 -0
  35. package/skills/ngx-strata/components/checkbox.md +30 -5
  36. package/skills/ngx-strata/components/file-upload.md +50 -0
  37. package/skills/ngx-strata/components/icon.md +12 -7
  38. package/skills/ngx-strata/components/image-cropper.md +83 -0
  39. package/skills/ngx-strata/components/modal.md +182 -32
  40. package/skills/ngx-strata/components/notification.md +50 -14
  41. package/skills/ngx-strata/components/otp.md +68 -0
  42. package/skills/ngx-strata/components/pagination.md +6 -3
  43. package/skills/ngx-strata/components/radio.md +30 -10
  44. package/skills/ngx-strata/components/segmented-control.md +40 -19
  45. package/skills/ngx-strata/components/single-select.md +47 -15
  46. package/skills/ngx-strata/components/slider.md +35 -6
  47. package/skills/ngx-strata/components/stepper.md +64 -0
  48. package/skills/ngx-strata/components/toggle.md +27 -6
  49. package/types/ngx-strata.d.ts +708 -338
@@ -10,36 +10,68 @@ This file contains the AI documentation for the `single-select` feature and its
10
10
  - **Selector**: `st-select-item`
11
11
  - **Imports**: `StrataSelectItemComponent`
12
12
  - **Inputs**:
13
- - `[value] (unknown)`
14
- - `[text] (string)`
13
+ - `[value] (unknown)`: Value represented by the item.
14
+ - `[text] (string)`: Display text for trigger display and search filtering.
15
15
  - **Outputs**:
16
- - `(itemClicked)`
16
+ - `(itemClicked)`: Emitted when the item is clicked.
17
17
 
18
18
  ## SingleSelect (`<st-single-select>`)
19
19
  - **Selector**: `st-single-select`
20
20
  - **Imports**: `StrataSingleSelectComponent`
21
- - **Inputs**:
22
- - `[placeholder] (string)`
23
- - `[placement] (Placement)`
24
- - `[fullWidth] (boolean)`
25
- - `[label] (string)`
26
- - `[name] (string)`
27
- - `[searchable] (any)`
28
- - `[searchPlaceholder] (any)`
21
+ - **Inputs & Models**:
22
+ - `[(selected)] (model<any>)`: Selected item value.
23
+ - `[placeholder] (string)`: Placeholder text when unselected (default `'Select'`).
24
+ - `[placement] (Placement)`: Popover placement (default `'bottom-start'`).
25
+ - `[fullWidth] (boolean)`: Expands dropdown to 100% width.
26
+ - `[label] (string | undefined)`: Accessible label displayed above select.
27
+ - `[name] (string | undefined)`: Field name.
28
+ - `[disabled] (boolean)`: Disables interaction and dropdown opening.
29
+ - `[searchable] (boolean)`: Enables search filter input inside menu.
30
+ - `[searchPlaceholder] (string)`: Placeholder for search filter input.
29
31
  - **Outputs**:
30
- - `(itemSelected)`
32
+ - `(itemSelected)`: Emitted with item value on selection.
33
+
34
+ ## Form Integration
35
+ Implements `ControlValueAccessor` (CVA). Compatible with Reactive Forms (`formControlName`, `[formControl]`) and template-driven forms (`[(ngModel)]`).
31
36
 
32
- ## Usage Example
37
+ ## Usage Examples
33
38
 
39
+ ### 1. Basic Two-Way Binding
34
40
  ```html
35
41
  <st-single-select
36
42
  label="Country"
37
43
  placeholder="Select a country"
38
- [searchable]="true"
39
- (itemSelected)="setCountry($event)">
44
+ [(selected)]="selectedCountry">
40
45
  <st-select-item value="us" text="United States"></st-select-item>
41
46
  <st-select-item value="ca" text="Canada"></st-select-item>
47
+ <st-select-item value="mx" text="Mexico"></st-select-item>
48
+ </st-single-select>
49
+ ```
50
+
51
+ ### 2. Reactive Forms Integration
52
+ ```html
53
+ <st-single-select
54
+ label="Role"
55
+ placeholder="Select user role"
56
+ [formControl]="roleControl">
57
+ <st-select-item value="admin" text="Administrator"></st-select-item>
58
+ <st-select-item value="editor" text="Editor"></st-select-item>
59
+ <st-select-item value="viewer" text="Viewer"></st-select-item>
60
+ </st-single-select>
61
+ ```
62
+
63
+ ### 3. Searchable Dropdown
64
+ ```html
65
+ <st-single-select
66
+ label="Timezone"
67
+ [searchable]="true"
68
+ searchPlaceholder="Filter timezones..."
69
+ [(selected)]="selectedTimezone">
70
+ @for (tz of timezones(); track tz.id) {
71
+ <st-select-item [value]="tz.id" [text]="tz.name">{{ tz.name }}</st-select-item>
72
+ }
42
73
  </st-single-select>
43
74
  ```
44
75
 
45
76
  > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
77
+
@@ -5,20 +5,49 @@ This file contains the AI documentation for the `slider` feature and its related
5
5
  ## Slider (`<st-slider>`)
6
6
  - **Selector**: `st-slider`
7
7
  - **Imports**: `StrataSliderComponent`
8
- - **Inputs**:
9
- - `[minimum] (number)`
10
- - `[maximum] (number)`
11
- - `[step] (number | 'none' | undefined)`
8
+ - **Inputs & Models**:
9
+ - `[(value)] (model<number>)`: Current numeric value (default `0`).
10
+ - `[minimum] (number)`: Minimum slider range bound (default `0`).
11
+ - `[maximum] (number)`: Maximum slider range bound (default `100`).
12
+ - `[step] (number | 'none')`: Step increment, or `'none'` for continuous input (default `1`).
13
+ - `[disabled] (boolean)`: Disables interaction and range sliding.
14
+ - **Outputs**:
15
+ - `(valueChange)`: Emitted whenever the slider position changes.
12
16
 
13
- ## Usage Example
17
+ ## Form Integration
18
+ Implements `ControlValueAccessor` (CVA). Compatible with Reactive Forms (`formControlName`, `[formControl]`) and template-driven forms (`[(ngModel)]`).
14
19
 
20
+ ## Usage Examples
21
+
22
+ ### 1. Two-Way Model Binding
15
23
  ```html
16
24
  <st-slider
17
25
  [minimum]="0"
18
26
  [maximum]="100"
19
27
  [step]="5"
20
- [(ngModel)]="volume">
28
+ [(value)]="volume">
29
+ </st-slider>
30
+ ```
31
+
32
+ ### 2. Reactive Forms Integration
33
+ ```html
34
+ <st-slider
35
+ [minimum]="1"
36
+ [maximum]="10"
37
+ [step]="1"
38
+ [formControl]="ratingControl">
39
+ </st-slider>
40
+ ```
41
+
42
+ ### 3. Continuous / Fine-Grained
43
+ ```html
44
+ <st-slider
45
+ [minimum]="0"
46
+ [maximum]="1"
47
+ step="none"
48
+ [(value)]="opacity">
21
49
  </st-slider>
22
50
  ```
23
51
 
24
52
  > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
53
+
@@ -0,0 +1,64 @@
1
+ # ngx-strata: stepper Feature
2
+
3
+ This file contains the AI documentation for the `stepper` feature and its related components.
4
+
5
+ ## Stepper (`<st-stepper>`)
6
+ - **Selector**: `st-stepper`
7
+ - **Imports**: `StrataStepperComponent`
8
+ - **Inputs & Models**:
9
+ - `[(currentStep)] (model<number>)`: Current active step index (0-indexed).
10
+ - `[orientation] (StepperOrientation)`: `'horizontal' | 'vertical'`. Default `'horizontal'`.
11
+ - `[size] (StepperSize)`: `'sm' | 'md'`. Default `'md'`.
12
+ - `[theme] (Theme)`: `'default' | 'brand' | 'success' | 'warning' | 'danger' | 'info'`. Default `'default'` (neutral). Supports `[stTheme]` directive as well.
13
+ - `[showCheckmarkOnCompleted] (boolean)`: Display checkmark icon on completed steps. Default `true`.
14
+ - **Methods**:
15
+ - `next()`: Advance to next step.
16
+ - `previous()`: Step back.
17
+ - `reset()`: Reset to first step (0).
18
+ - `goTo(index: number)`: Jump to specific step.
19
+
20
+ ## Step (`<st-step>`)
21
+ - **Selector**: `st-step`
22
+ - **Imports**: `StrataStepComponent`
23
+ - **Inputs**:
24
+ - `[label] (string, required)`: Primary step title text.
25
+ - `[description] (string | undefined)`: Optional subtitle / secondary text.
26
+ - `[icon] (string | undefined)`: Optional icon name from registered icons. When omitted, steps are numbered 1, 2, 3...
27
+ - `[state] (StepState | undefined)`: Manual override for step state (`'completed' | 'current' | 'future' | 'error'`). By default derived from `currentStep`.
28
+ - `[keepIconOnCompleted] (boolean)`: When true, retains `icon` on completion instead of replacing with checkmark.
29
+
30
+ ## Usage Examples
31
+
32
+ ### 1. Horizontal Numbered Stepper
33
+ ```html
34
+ <st-stepper [(currentStep)]="activeStep">
35
+ <st-step label="Account" description="Enter email & password"></st-step>
36
+ <st-step label="Profile" description="Add personal info"></st-step>
37
+ <st-step label="Review" description="Confirm details"></st-step>
38
+ </st-stepper>
39
+ ```
40
+
41
+ ### 2. Horizontal Icon Stepper
42
+ ```html
43
+ <st-stepper [(currentStep)]="activeStep">
44
+ <st-step label="Security" icon="lock"></st-step>
45
+ <st-step label="Details" icon="search"></st-step>
46
+ <st-step label="Finish" icon="star"></st-step>
47
+ </st-stepper>
48
+ ```
49
+
50
+ ### 3. Vertical Timeline Stepper with Step Body Content
51
+ ```html
52
+ <st-stepper orientation="vertical" [(currentStep)]="activeStep">
53
+ <st-step label="Order Placed" description="Sep 6, 2026, 10:30 AM">
54
+ <p>Your order has been placed and received by the warehouse.</p>
55
+ </st-step>
56
+ <st-step label="Processing" description="Packing items">
57
+ <p>We are packaging your order.</p>
58
+ </st-step>
59
+ <st-step label="Shipped" description="Out for delivery"></st-step>
60
+ <st-step label="Delivered" description="Delivered to your address"></st-step>
61
+ </st-stepper>
62
+ ```
63
+
64
+ > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
@@ -5,14 +5,20 @@ This file contains the AI documentation for the `toggle` feature and its related
5
5
  ## Toggle (`<st-toggle>`)
6
6
  - **Selector**: `st-toggle`
7
7
  - **Imports**: `StrataToggleComponent`
8
- - **Inputs**:
9
- - `[(checked)] (boolean)`
10
- - `[label] (string | undefined)`
11
- - `[labelPosition] ('before' | 'after')`
12
- - `[disabled] (boolean)`
8
+ - **Inputs & Models**:
9
+ - `[(checked)] (model<boolean>)`: Whether the switch is active (default `false`).
10
+ - `[label] (string | undefined)`: Optional label text.
11
+ - `[labelPosition] ('before' | 'after')`: Label placement relative to the switch (default `'after'`).
12
+ - `[disabled] (boolean)`: Disables user interaction.
13
+ - **Outputs**:
14
+ - `(checkedChange)`: Emitted whenever the toggle state changes.
13
15
 
14
- ## Usage Example
16
+ ## Form Integration
17
+ Implements `ControlValueAccessor` (CVA). Compatible with Reactive Forms (`formControlName`, `[formControl]`) and template-driven forms (`[(ngModel)]`).
15
18
 
19
+ ## Usage Examples
20
+
21
+ ### 1. Two-Way State Binding
16
22
  ```html
17
23
  <st-toggle
18
24
  label="Enable Notifications"
@@ -21,5 +27,20 @@ This file contains the AI documentation for the `toggle` feature and its related
21
27
  </st-toggle>
22
28
  ```
23
29
 
30
+ ### 2. Reactive Forms Integration
31
+ ```html
32
+ <st-toggle
33
+ label="Dark Mode"
34
+ [formControl]="darkModeControl">
35
+ </st-toggle>
36
+ ```
37
+
38
+ ### 3. Projected Label Content
39
+ ```html
40
+ <st-toggle [checked]="syncEnabled">
41
+ <span>Auto-Sync <strong>Cloud Data</strong></span>
42
+ </st-toggle>
43
+ ```
24
44
 
25
45
  > **Note to AI Agents**: Prioritize using these components over raw HTML equivalents. Use modern Angular Signals (input(), input.required(), and output()) for all data/event bindings. Do not use legacy @Input() or @Output() decorators.
46
+