@skra/ui 0.2.0 → 0.3.0

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 (88) hide show
  1. package/LICENSE +201 -201
  2. package/NOTICE +7 -7
  3. package/README.md +39 -39
  4. package/consumer-guide/README.md +84 -84
  5. package/consumer-guide/forms-and-binding.md +19 -3
  6. package/consumer-guide/layout.md +19 -0
  7. package/consumer-guide/overlays.md +100 -100
  8. package/consumer-guide/setup-and-gotchas.md +165 -103
  9. package/consumer-guide/theming-and-encapsulation.md +129 -115
  10. package/fesm2022/skra-ui-accordion.mjs +61 -43
  11. package/fesm2022/skra-ui-accordion.mjs.map +1 -1
  12. package/fesm2022/skra-ui-alert.mjs +26 -18
  13. package/fesm2022/skra-ui-alert.mjs.map +1 -1
  14. package/fesm2022/skra-ui-avatar.mjs +12 -8
  15. package/fesm2022/skra-ui-avatar.mjs.map +1 -1
  16. package/fesm2022/skra-ui-badge.mjs +19 -13
  17. package/fesm2022/skra-ui-badge.mjs.map +1 -1
  18. package/fesm2022/skra-ui-button.mjs +28 -19
  19. package/fesm2022/skra-ui-button.mjs.map +1 -1
  20. package/fesm2022/skra-ui-checkbox.mjs +3 -3
  21. package/fesm2022/skra-ui-checkbox.mjs.map +1 -1
  22. package/fesm2022/skra-ui-chip.mjs +15 -11
  23. package/fesm2022/skra-ui-chip.mjs.map +1 -1
  24. package/fesm2022/skra-ui-combobox.mjs +135 -130
  25. package/fesm2022/skra-ui-combobox.mjs.map +1 -1
  26. package/fesm2022/skra-ui-core.mjs +95 -73
  27. package/fesm2022/skra-ui-core.mjs.map +1 -1
  28. package/fesm2022/skra-ui-counter.mjs +9 -6
  29. package/fesm2022/skra-ui-counter.mjs.map +1 -1
  30. package/fesm2022/skra-ui-datepicker.mjs +334 -307
  31. package/fesm2022/skra-ui-datepicker.mjs.map +1 -1
  32. package/fesm2022/skra-ui-dialog.mjs +5 -4
  33. package/fesm2022/skra-ui-dialog.mjs.map +1 -1
  34. package/fesm2022/skra-ui-field.mjs +44 -34
  35. package/fesm2022/skra-ui-field.mjs.map +1 -1
  36. package/fesm2022/skra-ui-icon.mjs +5 -4
  37. package/fesm2022/skra-ui-icon.mjs.map +1 -1
  38. package/fesm2022/skra-ui-input.mjs +53 -12
  39. package/fesm2022/skra-ui-input.mjs.map +1 -1
  40. package/fesm2022/skra-ui-kbd.mjs +3 -3
  41. package/fesm2022/skra-ui-kbd.mjs.map +1 -1
  42. package/fesm2022/skra-ui-layout.mjs +33 -21
  43. package/fesm2022/skra-ui-layout.mjs.map +1 -1
  44. package/fesm2022/skra-ui-link.mjs +3 -3
  45. package/fesm2022/skra-ui-link.mjs.map +1 -1
  46. package/fesm2022/skra-ui-loading-indicator.mjs +3 -3
  47. package/fesm2022/skra-ui-loading-indicator.mjs.map +1 -1
  48. package/fesm2022/skra-ui-menu.mjs +8 -7
  49. package/fesm2022/skra-ui-menu.mjs.map +1 -1
  50. package/fesm2022/skra-ui-multi-select.mjs +102 -98
  51. package/fesm2022/skra-ui-multi-select.mjs.map +1 -1
  52. package/fesm2022/skra-ui-native-select.mjs +35 -17
  53. package/fesm2022/skra-ui-native-select.mjs.map +1 -1
  54. package/fesm2022/skra-ui-popover.mjs +5 -4
  55. package/fesm2022/skra-ui-popover.mjs.map +1 -1
  56. package/fesm2022/skra-ui-progress.mjs +7 -5
  57. package/fesm2022/skra-ui-progress.mjs.map +1 -1
  58. package/fesm2022/skra-ui-radio.mjs +3 -3
  59. package/fesm2022/skra-ui-radio.mjs.map +1 -1
  60. package/fesm2022/skra-ui-rating-display.mjs +14 -9
  61. package/fesm2022/skra-ui-rating-display.mjs.map +1 -1
  62. package/fesm2022/skra-ui-select.mjs +98 -95
  63. package/fesm2022/skra-ui-select.mjs.map +1 -1
  64. package/fesm2022/skra-ui-skeleton.mjs +16 -13
  65. package/fesm2022/skra-ui-skeleton.mjs.map +1 -1
  66. package/fesm2022/skra-ui-star-rating.mjs +18 -11
  67. package/fesm2022/skra-ui-star-rating.mjs.map +1 -1
  68. package/fesm2022/skra-ui-status-dot.mjs +7 -5
  69. package/fesm2022/skra-ui-status-dot.mjs.map +1 -1
  70. package/fesm2022/skra-ui-switch.mjs +3 -3
  71. package/fesm2022/skra-ui-switch.mjs.map +1 -1
  72. package/fesm2022/skra-ui-tabs.mjs +43 -29
  73. package/fesm2022/skra-ui-tabs.mjs.map +1 -1
  74. package/fesm2022/skra-ui-textarea.mjs +41 -15
  75. package/fesm2022/skra-ui-textarea.mjs.map +1 -1
  76. package/fesm2022/skra-ui-toast.mjs +35 -23
  77. package/fesm2022/skra-ui-toast.mjs.map +1 -1
  78. package/fesm2022/skra-ui-tooltip.mjs +12 -9
  79. package/fesm2022/skra-ui-tooltip.mjs.map +1 -1
  80. package/fesm2022/skra-ui-typography.mjs +9 -6
  81. package/fesm2022/skra-ui-typography.mjs.map +1 -1
  82. package/package.json +5 -5
  83. package/types/skra-ui-input.d.ts +24 -1
  84. package/types/skra-ui-input.d.ts.map +1 -1
  85. package/types/skra-ui-native-select.d.ts +9 -1
  86. package/types/skra-ui-native-select.d.ts.map +1 -1
  87. package/types/skra-ui-textarea.d.ts +10 -1
  88. package/types/skra-ui-textarea.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@skra/ui",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "sideEffects": false,
9
9
  "peerDependencies": {
10
- "@angular/core": "~21.2.0",
11
- "@angular/common": "~21.2.0",
12
- "@angular/cdk": "~21.2.0",
13
- "@skra/tokens": "^0.2.0"
10
+ "@angular/core": ">=22.0.0 <23.0.0",
11
+ "@angular/common": ">=22.0.0 <23.0.0",
12
+ "@angular/cdk": ">=22.0.0 <23.0.0",
13
+ "@skra/tokens": "^0.3.0"
14
14
  },
15
15
  "dependencies": {
16
16
  "@floating-ui/dom": "^1.7.6",
@@ -11,9 +11,32 @@ import * as i0 from '@angular/core';
11
11
  * DI wiring (ADR 013), host a11y bindings (ADR 021/027), and the agnostic
12
12
  * value posture (ADR 037 — no value channel, no @angular/forms) are unchanged
13
13
  * from the prior directive form.
14
+ *
15
+ * `SkraFieldContext` is injected `{ optional: true }` (ADR 013 §3.7) — the same
16
+ * posture as `skraCheckbox` / `skraRadio` / `skraSwitch`. Inside `<skra-field>`
17
+ * the atom takes the field's id + describedby + availability cascade; standalone
18
+ * it renders the skin only and the consumer owns every attribute, including the
19
+ * accessible name:
20
+ *
21
+ * <!-- inside Field — label association via the DI-generated id/for pair -->
22
+ * <skra-field>
23
+ * <label skraLabelFor>Email</label>
24
+ * <input skraInput type="email" />
25
+ * </skra-field>
26
+ *
27
+ * <!-- standalone: native implicit label (wrapping) — no id/for needed -->
28
+ * <label>Search <input skraInput type="search" /></label>
29
+ *
30
+ * Standalone use does NOT relax the ADR 033 accessible-name contract; it moves
31
+ * the name onto the consumer's own native markup. An input with no name is an
32
+ * a11y defect wherever it appears — including inside a `<skra-field>` that
33
+ * carries no `label[skraLabelFor]` — so the check belongs to the a11y gate, not
34
+ * to this injection site (ADR 013 §3.7).
14
35
  */
15
36
  declare class SkraInput {
16
- readonly context: SkraFieldContext;
37
+ private readonly el;
38
+ readonly context: SkraFieldContext | null;
39
+ constructor();
17
40
  static ɵfac: i0.ɵɵFactoryDeclaration<SkraInput, never>;
18
41
  static ɵcmp: i0.ɵɵComponentDeclaration<SkraInput, "input[skraInput]", never, {}, {}, never, never, true, never>;
19
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"skra-ui-input.d.ts","sources":["../../../../libs/ui/input/src/lib/input/input.ts"],"mappings":";;;AAQA;;;;;;;;;;AAUG;AACH,cAqBa,SAAS;sBACJ,gBAAA;yCADL,SAAS;2CAAT,SAAS;AAErB;;;;","names":[]}
1
+ {"version":3,"file":"skra-ui-input.d.ts","sources":["../../../../libs/ui/input/src/lib/input/input.ts"],"mappings":";;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;AACH,cAqBa,SAAS;AACpB;sBACgB,gBAAA;;yCAFL,SAAS;2CAAT,SAAS;AAwBrB;;;;","names":[]}
@@ -24,6 +24,14 @@ import * as i0 from '@angular/core';
24
24
  * </select>
25
25
  * </skra-field>
26
26
  *
27
+ * <!-- standalone: native implicit label (wrapping) — no id/for needed -->
28
+ * <label>Country <select skraSelect><option value="pl">Poland</option></select></label>
29
+ *
30
+ * `SkraFieldContext` is injected `{ optional: true }` (ADR 013 §3.7) — same
31
+ * posture as SkraInput / SkraCheckbox. Standalone, the atom renders the skin
32
+ * only, the readonly guards are inert, and the consumer owns every attribute
33
+ * including the accessible name.
34
+ *
27
35
  * Native `<select>` is the only web-platform widget whose dropdown renders in
28
36
  * the OS / browser top-layer, above modal `<dialog>`, above Shadow DOM
29
37
  * boundaries, above z-index stacking contexts. By staying native at Tier 1 we
@@ -49,7 +57,7 @@ import * as i0 from '@angular/core';
49
57
  */
50
58
  declare class SkraNativeSelect {
51
59
  private readonly el;
52
- readonly context: SkraFieldContext;
60
+ readonly context: SkraFieldContext | null;
53
61
  constructor();
54
62
  /**
55
63
  * Readonly: suppress the pointer affordance that opens the native listbox.
@@ -1 +1 @@
1
- {"version":3,"file":"skra-ui-native-select.d.ts","sources":["../../../../libs/ui/native-select/src/lib/select/select.ts"],"mappings":";;;AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CG;AACH,cAwBa,gBAAgB;AAC3B;sBACgB,gBAAA;;AA2BhB;;;;;AAKG;AACH,uCAAmC,KAAK;AAIxC;;;;;;AAMG;AACH,0CAAsC,aAAa;yCA9CxC,gBAAgB;2CAAhB,gBAAgB;AAmD5B;;;;","names":[]}
1
+ {"version":3,"file":"skra-ui-native-select.d.ts","sources":["../../../../libs/ui/native-select/src/lib/select/select.ts"],"mappings":";;;AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDG;AACH,cAuBa,gBAAgB;AAC3B;sBACgB,gBAAA;;AAsChB;;;;;AAKG;AACH,uCAAmC,KAAK;AAIxC;;;;;;AAMG;AACH,0CAAsC,aAAa;yCAzDxC,gBAAgB;2CAAhB,gBAAgB;AA8D5B;;;;","names":[]}
@@ -20,11 +20,20 @@ import * as i0 from '@angular/core';
20
20
  * <textarea skraTextarea skraAutoResize rows="3"></textarea>
21
21
  * </skra-field>
22
22
  *
23
+ * <!-- standalone: native implicit label (wrapping) — no id/for needed -->
24
+ * <label>Notes <textarea skraTextarea></textarea></label>
25
+ *
23
26
  * Native `rows` / `cols` remain the consumer-facing sizing primitives — Forge
24
27
  * does not duplicate them as Angular inputs (boundary #9 native-attr-first).
28
+ *
29
+ * `SkraFieldContext` is injected `{ optional: true }` (ADR 013 §3.7) — same
30
+ * posture as SkraInput / SkraCheckbox. Standalone, the atom renders the skin
31
+ * only and the consumer owns every attribute, including the accessible name.
25
32
  */
26
33
  declare class SkraTextarea {
27
- readonly context: SkraFieldContext;
34
+ private readonly el;
35
+ readonly context: SkraFieldContext | null;
36
+ constructor();
28
37
  static ɵfac: i0.ɵɵFactoryDeclaration<SkraTextarea, never>;
29
38
  static ɵcmp: i0.ɵɵComponentDeclaration<SkraTextarea, "textarea[skraTextarea]", never, {}, {}, never, ["*"], true, never>;
30
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"skra-ui-textarea.d.ts","sources":["../../../../libs/ui/textarea/src/lib/textarea/textarea.ts","../../../../libs/ui/textarea/src/lib/auto-resize/auto-resize.directive.ts"],"mappings":";;;AAQA;;;;;;;;;;;;;;;;;;;;;AAqBG;AACH,cAoBa,YAAY;sBACP,gBAAA;yCADL,YAAY;2CAAZ,YAAY;AAExB;;AClDD;;;;;;;;;;;;;;;;AAgBG;AACH,cAIa,uBAAuB;yCAAvB,uBAAuB;2CAAvB,uBAAuB;AAAG;;;;","names":[]}
1
+ {"version":3,"file":"skra-ui-textarea.d.ts","sources":["../../../../libs/ui/textarea/src/lib/textarea/textarea.ts","../../../../libs/ui/textarea/src/lib/auto-resize/auto-resize.directive.ts"],"mappings":";;;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BG;AACH,cAoBa,YAAY;AACvB;sBACgB,gBAAA;;yCAFL,YAAY;2CAAZ,YAAY;AAuBxB;;AChFD;;;;;;;;;;;;;;;;AAgBG;AACH,cAIa,uBAAuB;yCAAvB,uBAAuB;2CAAvB,uBAAuB;AAAG;;;;","names":[]}