@egose/shadcn-theme-ng-tw 0.1.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 (165) hide show
  1. package/README.md +2 -2
  2. package/accordion/README.md +405 -2
  3. package/alert/README.md +372 -2
  4. package/alert/fesm2022/alert.mjs +1 -1
  5. package/alert-dialog/README.md +471 -5
  6. package/aspect-ratio/README.md +272 -5
  7. package/autocomplete/README.md +502 -2
  8. package/autocomplete/fesm2022/autocomplete.mjs +1 -1
  9. package/avatar/README.md +357 -5
  10. package/badge/README.md +318 -2
  11. package/basic-alert/README.md +353 -2
  12. package/breadcrumb/README.md +406 -5
  13. package/button/README.md +482 -2
  14. package/button/fesm2022/button.mjs +85 -107
  15. package/button/types/button.d.ts +5 -8
  16. package/button-group/README.md +318 -5
  17. package/button-group/fesm2022/button-group.mjs +1 -1
  18. package/calendar/README.md +357 -2
  19. package/card/README.md +331 -5
  20. package/carousel/README.md +333 -5
  21. package/carousel/fesm2022/carousel.mjs +4 -1
  22. package/checkbox/README.md +320 -2
  23. package/checkbox/fesm2022/checkbox.mjs +6 -7
  24. package/checkbox/types/checkbox.d.ts +1 -1
  25. package/collapsible/README.md +332 -5
  26. package/combobox/README.md +507 -5
  27. package/combobox/fesm2022/combobox.mjs +5 -2
  28. package/command/README.md +435 -5
  29. package/confirmation-dialog/README.md +301 -2
  30. package/context-menu/README.md +366 -5
  31. package/date-picker/README.md +469 -2
  32. package/date-picker/fesm2022/date-picker.mjs +150 -32
  33. package/date-picker/types/date-picker.d.ts +102 -9
  34. package/dialog/README.md +448 -2
  35. package/drawer/README.md +395 -5
  36. package/dropdown-menu/README.md +417 -5
  37. package/empty/README.md +329 -5
  38. package/field/README.md +385 -5
  39. package/form-autocomplete/README.md +177 -0
  40. package/form-autocomplete/fesm2022/form-autocomplete.mjs +211 -0
  41. package/form-autocomplete/package.json +24 -0
  42. package/form-autocomplete/types/form-autocomplete.d.ts +61 -0
  43. package/form-checkbox/README.md +322 -2
  44. package/form-checkbox/fesm2022/form-checkbox.mjs +22 -9
  45. package/form-checkbox/types/form-checkbox.d.ts +23 -4
  46. package/form-combobox/README.md +202 -0
  47. package/form-combobox/fesm2022/form-combobox.mjs +273 -0
  48. package/form-combobox/package.json +24 -0
  49. package/form-combobox/types/form-combobox.d.ts +73 -0
  50. package/form-date-picker/README.md +348 -2
  51. package/form-date-picker/fesm2022/form-date-picker.mjs +60 -16
  52. package/form-date-picker/types/form-date-picker.d.ts +17 -1
  53. package/form-date-picker-multi/README.md +191 -0
  54. package/form-date-picker-multi/fesm2022/form-date-picker-multi.mjs +239 -0
  55. package/form-date-picker-multi/package.json +24 -0
  56. package/form-date-picker-multi/types/form-date-picker-multi.d.ts +58 -0
  57. package/form-date-range-picker/README.md +253 -0
  58. package/form-date-range-picker/fesm2022/form-date-range-picker.mjs +236 -0
  59. package/form-date-range-picker/package.json +24 -0
  60. package/form-date-range-picker/types/form-date-range-picker.d.ts +55 -0
  61. package/form-field/README.md +356 -2
  62. package/form-field-simple/README.md +340 -2
  63. package/form-input-otp/README.md +194 -0
  64. package/form-input-otp/fesm2022/form-input-otp.mjs +194 -0
  65. package/form-input-otp/package.json +24 -0
  66. package/form-input-otp/types/form-input-otp.d.ts +58 -0
  67. package/form-month-year-picker/README.md +188 -0
  68. package/form-month-year-picker/fesm2022/form-month-year-picker.mjs +229 -0
  69. package/form-month-year-picker/package.json +24 -0
  70. package/form-month-year-picker/types/form-month-year-picker.d.ts +53 -0
  71. package/form-native-select/README.md +205 -0
  72. package/form-native-select/fesm2022/form-native-select.mjs +187 -0
  73. package/form-native-select/package.json +24 -0
  74. package/form-native-select/types/form-native-select.d.ts +57 -0
  75. package/form-phone-input/README.md +188 -0
  76. package/form-phone-input/fesm2022/form-phone-input.mjs +203 -0
  77. package/form-phone-input/package.json +24 -0
  78. package/form-phone-input/types/form-phone-input.d.ts +58 -0
  79. package/form-radio-group/README.md +198 -0
  80. package/form-radio-group/fesm2022/form-radio-group.mjs +211 -0
  81. package/form-radio-group/package.json +24 -0
  82. package/form-radio-group/types/form-radio-group.d.ts +63 -0
  83. package/form-searchable-multiselect/README.md +371 -2
  84. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +19 -10
  85. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +18 -1
  86. package/form-select/README.md +360 -2
  87. package/form-select/fesm2022/form-select.mjs +24 -15
  88. package/form-select/types/form-select.d.ts +18 -1
  89. package/form-slider/README.md +182 -0
  90. package/form-slider/fesm2022/form-slider.mjs +186 -0
  91. package/form-slider/package.json +24 -0
  92. package/form-slider/types/form-slider.d.ts +60 -0
  93. package/form-switch/README.md +173 -0
  94. package/form-switch/fesm2022/form-switch.mjs +178 -0
  95. package/form-switch/package.json +24 -0
  96. package/form-switch/types/form-switch.d.ts +50 -0
  97. package/form-text-input/README.md +381 -2
  98. package/form-text-input/fesm2022/form-text-input.mjs +19 -10
  99. package/form-text-input/types/form-text-input.d.ts +18 -1
  100. package/form-textarea/README.md +357 -2
  101. package/form-textarea/fesm2022/form-textarea.mjs +19 -10
  102. package/form-textarea/types/form-textarea.d.ts +18 -1
  103. package/form-toggle/README.md +186 -0
  104. package/form-toggle/fesm2022/form-toggle.mjs +241 -0
  105. package/form-toggle/package.json +24 -0
  106. package/form-toggle/types/form-toggle.d.ts +82 -0
  107. package/form-toggle-group/README.md +176 -0
  108. package/form-toggle-group/fesm2022/form-toggle-group.mjs +216 -0
  109. package/form-toggle-group/package.json +24 -0
  110. package/form-toggle-group/types/form-toggle-group.d.ts +65 -0
  111. package/hover-card/README.md +256 -5
  112. package/icon/README.md +239 -2
  113. package/input/README.md +269 -2
  114. package/input-group/README.md +335 -5
  115. package/input-group/fesm2022/input-group.mjs +23 -13
  116. package/input-group/types/input-group.d.ts +4 -1
  117. package/input-otp/README.md +375 -5
  118. package/item/README.md +385 -5
  119. package/item/fesm2022/item.mjs +3 -3
  120. package/kbd/README.md +291 -5
  121. package/label/README.md +272 -2
  122. package/layout-simple/README.md +193 -2
  123. package/layout-simple/fesm2022/layout-simple.mjs +877 -409
  124. package/layout-simple/types/layout-simple.d.ts +174 -137
  125. package/menu/README.md +417 -2
  126. package/menubar/README.md +343 -5
  127. package/native-select/README.md +323 -5
  128. package/native-select/fesm2022/native-select.mjs +18 -6
  129. package/native-select/types/native-select.d.ts +7 -2
  130. package/navigation-menu/README.md +369 -5
  131. package/package.json +57 -1
  132. package/pagination/README.md +388 -5
  133. package/phone-input/README.md +114 -0
  134. package/phone-input/fesm2022/phone-input.mjs +191 -0
  135. package/phone-input/package.json +24 -0
  136. package/phone-input/types/phone-input.d.ts +67 -0
  137. package/popover/README.md +331 -2
  138. package/progress/README.md +311 -5
  139. package/radio-group/README.md +364 -2
  140. package/radio-group/fesm2022/radio-group.mjs +5 -1
  141. package/resizable/README.md +269 -5
  142. package/scroll-area/README.md +233 -5
  143. package/searchable-multiselect/README.md +323 -2
  144. package/select/README.md +437 -2
  145. package/separator/README.md +222 -2
  146. package/sheet/README.md +311 -2
  147. package/sheet/fesm2022/sheet.mjs +1 -1
  148. package/sidebar/README.md +457 -5
  149. package/skeleton/README.md +217 -5
  150. package/slider/README.md +273 -5
  151. package/slider/fesm2022/slider.mjs +17 -13
  152. package/sonner/README.md +346 -2
  153. package/spinner/README.md +284 -2
  154. package/switch/README.md +310 -2
  155. package/switch/fesm2022/switch.mjs +7 -5
  156. package/switch/types/switch.d.ts +2 -1
  157. package/table/README.md +423 -5
  158. package/tabs/README.md +411 -2
  159. package/tabs/fesm2022/tabs.mjs +12 -2
  160. package/textarea/README.md +282 -5
  161. package/toggle/README.md +270 -5
  162. package/toggle-group/README.md +340 -5
  163. package/tooltip/README.md +269 -2
  164. package/typography/README.md +271 -5
  165. package/utils/README.md +303 -2
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "form-combobox",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^20.3.0 || ^22.0.0",
6
+ "@angular/core": "^20.3.0 || ^22.0.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/form-combobox.mjs",
13
+ "typings": "types/form-combobox.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/form-combobox.d.ts",
20
+ "default": "./fesm2022/form-combobox.mjs"
21
+ }
22
+ },
23
+ "type": "module"
24
+ }
@@ -0,0 +1,73 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ValueProvider } from '@angular/core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ declare class EgFormCombobox {
6
+ private readonly formGroupDirective;
7
+ private readonly generatedId;
8
+ private readonly _config;
9
+ private readonly _picker;
10
+ private readonly _single;
11
+ label: _angular_core.InputSignal<string | undefined>;
12
+ controlId: _angular_core.InputSignal<string | undefined>;
13
+ controlName: _angular_core.InputSignal<string>;
14
+ error: _angular_core.InputSignal<string | undefined>;
15
+ hint: _angular_core.InputSignal<string | undefined>;
16
+ id: _angular_core.InputSignal<string | undefined>;
17
+ placeholder: _angular_core.InputSignal<string>;
18
+ emptyText: _angular_core.InputSignal<string>;
19
+ disabled: _angular_core.InputSignal<boolean>;
20
+ required: _angular_core.InputSignal<boolean>;
21
+ /**
22
+ * Selection mode. `multiple` renders chips + checkbox-style multi-select
23
+ * (`string[]` model); `single` renders a trigger button + dropdown
24
+ * (`string | null` model). Defaults to `multiple` (original behavior).
25
+ */
26
+ mode: _angular_core.InputSignal<"single" | "multiple">;
27
+ options: _angular_core.InputSignal<string[]>;
28
+ readonly effectiveId: _angular_core.Signal<string>;
29
+ readonly errorId: _angular_core.Signal<string>;
30
+ readonly hintId: _angular_core.Signal<string>;
31
+ /** Selected values read reactively from the brain model so chips track selection. */
32
+ readonly selectedValues: _angular_core.Signal<string[]>;
33
+ /** Single-mode display value read reactively from the brain model. */
34
+ readonly singleDisplay: _angular_core.Signal<string | null>;
35
+ /**
36
+ * Combined lock for the brain `linkedSignal`-based disabled state: the raw
37
+ * input write always carries the resolved value, so a same-pass
38
+ * wrapper-toggle + `control.disable()` cannot clobber CVA state.
39
+ */
40
+ effectiveDisabled(): boolean;
41
+ userClass: _angular_core.InputSignal<ClassValue>;
42
+ labelClass: _angular_core.InputSignal<string>;
43
+ controlClass: _angular_core.InputSignal<string>;
44
+ chipsClass: _angular_core.InputSignal<string>;
45
+ errorClass: _angular_core.InputSignal<string>;
46
+ hintClass: _angular_core.InputSignal<string>;
47
+ $userClass: _angular_core.Signal<string>;
48
+ $labelClass: _angular_core.Signal<string>;
49
+ $controlClass: _angular_core.Signal<string>;
50
+ $chipsClass: _angular_core.Signal<string>;
51
+ $errorClass: _angular_core.Signal<string>;
52
+ $hintClass: _angular_core.Signal<string>;
53
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormCombobox, never>;
54
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormCombobox, "eg-form-combobox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlId": { "alias": "controlId"; "required": false; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "controlClass": { "alias": "controlClass"; "required": false; "isSignal": true; }; "chipsClass": { "alias": "chipsClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
55
+ }
56
+
57
+ interface EgFormComboboxConfig {
58
+ /**
59
+ * Global class defaults for `eg-form-combobox` styling slots.
60
+ * Each is merged under the matching per-instance `*Class` input
61
+ * (library base < global config < per-instance).
62
+ */
63
+ labelClass?: string;
64
+ controlClass?: string;
65
+ chipsClass?: string;
66
+ errorClass?: string;
67
+ hintClass?: string;
68
+ }
69
+ declare function provideEgFormComboboxConfig(config: Partial<EgFormComboboxConfig>): ValueProvider;
70
+ declare function injectEgFormComboboxConfig(): EgFormComboboxConfig;
71
+
72
+ export { EgFormCombobox, injectEgFormComboboxConfig, provideEgFormComboboxConfig };
73
+ export type { EgFormComboboxConfig };
@@ -1,3 +1,349 @@
1
- # Form Date Picker Subpath
1
+ # Form Date Picker (`@egose/shadcn-theme-ng/form-date-picker`)
2
2
 
3
- This project ships only as `@egose/shadcn-theme-ng/form-date-picker` or `@egose/shadcn-theme-ng-tw/form-date-picker`. See the [package README](../../README.md) for installation, compatibility, Tailwind variant, test, and release guidance. Do not publish this project directory independently.
3
+ A ready-made reactive-form date field: label + `hlm-date-picker` + validation error/hint display in one tag. Equivalent to shadcn/ui `Form` + date-picker composition.
4
+
5
+ The Angular implementation is a standalone wrapper (not a brain primitive): it renders
6
+ `HlmFormField` / `HlmError` / `HlmHint` from `@egose/shadcn-theme-ng/form-field`, `HlmLabel`, and
7
+ `HlmDatePicker` + `HlmDatePickerInput` from `@egose/shadcn-theme-ng/date-picker`. The inner
8
+ `hlm-date-picker` is bound with `[formControlName]="controlName()"`, so the parent `FormGroup`
9
+ owns the `Date | null` value. It must live inside a `FormGroupDirective` (`[formGroup]` parent);
10
+ ids come from `HlmFormIdGenerator` unless overridden.
11
+
12
+ > **Ships as:** `@egose/shadcn-theme-ng/form-date-picker` and `@egose/shadcn-theme-ng-tw/form-date-picker`
13
+ > (the `tw:`-prefixed Tailwind variant). Both expose the identical TypeScript surface; only the
14
+ > emitted Tailwind class strings differ. See the [package README](../../README.md) for install
15
+ > steps, peer dependencies, and Tailwind setup. Do not publish this project directory independently.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ # Plain Tailwind (no prefix)
21
+ npm install @egose/shadcn-theme-ng
22
+
23
+ # tw:-prefixed Tailwind variant
24
+ npm install @egose/shadcn-theme-ng-tw
25
+ ```
26
+
27
+ Peer dependencies (Angular, `@spartan-ng/brain`, `@ng-icons/*`, `rxjs`, …) are documented in the
28
+ [package README](../../README.md#peer-dependencies). This subpath additionally relies at runtime on
29
+ `@egose/shadcn-theme-ng/date-picker`, `@egose/shadcn-theme-ng/form-field`, and
30
+ `@egose/shadcn-theme-ng/label`.
31
+
32
+ ## Imports
33
+
34
+ Exported from the subpath root (`projects/form-date-picker/src/public-api.ts`). Note: this subpath
35
+ exports a single standalone component — there is no `*Imports` array or `*Module`:
36
+
37
+ ```ts
38
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
39
+ // tw variant: replace with '@egose/shadcn-theme-ng-tw/form-date-picker'
40
+ ```
41
+
42
+ Standalone usage:
43
+
44
+ ```ts
45
+ import { Component } from '@angular/core';
46
+ import { ReactiveFormsModule } from '@angular/forms';
47
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
48
+
49
+ @Component({
50
+ selector: 'app-demo',
51
+ standalone: true,
52
+ imports: [ReactiveFormsModule, EgFormDatePicker],
53
+ template: `...`,
54
+ })
55
+ export class DemoComponent {}
56
+ ```
57
+
58
+ NgModule-based consumer: add `EgFormDatePicker` (and `ReactiveFormsModule`) to the module's
59
+ `imports` — it is a standalone component, not a module.
60
+
61
+ `ControlValueAccessor` behavior: `eg-form-date-picker` itself is not a `ControlValueAccessor`; the
62
+ inner `hlm-date-picker` is (bound via `formControlName`), so `formControlName`/`formGroup` handling,
63
+ `Validators`, `disabled` state from the control, and `dateChange` values (`Date | null`) all flow
64
+ through the parent form.
65
+
66
+ ## Anatomy / Structure
67
+
68
+ ```html
69
+ <form [formGroup]="form">
70
+ <eg-form-date-picker
71
+ controlName="birthday"
72
+ label="Date of birth"
73
+ placeholder="Pick a date"
74
+ [required]="true"
75
+ hint="We use this to verify your age."
76
+ error="Birth date is required."
77
+ />
78
+ </form>
79
+ ```
80
+
81
+ Selector (from source): `eg-form-date-picker` (standalone component, host `tw:w-full`).
82
+
83
+ ## API reference
84
+
85
+ ### `EgFormDatePicker` — `eg-form-date-picker`
86
+
87
+ | Input | Type | Default | Description |
88
+ | ------------------- | --------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------- |
89
+ | `controlName` | `string` | `''` | `formControlName` key inside the parent `FormGroup`. **Required.** |
90
+ | `label` | `string \| undefined` | — | Label text (hidden when omitted). |
91
+ | `error` | `string \| undefined` | — | Error text shown when invalid. |
92
+ | `hint` | `string \| undefined` | — | Hint text shown otherwise. |
93
+ | `controlId` | `string \| undefined` | — | Explicit id (first priority for `effectiveId`). |
94
+ | `id` | `string \| undefined` | — | Fallback id (second priority). |
95
+ | `name` | `string \| undefined` | — | Native `name` forwarded to the inner input (`controlName` wins when set, like `eg-form-text-input`). |
96
+ | `placeholder` | `string` | `'Pick a date'` | Input placeholder. |
97
+ | `readonly` | `boolean` | `false` | Native `readonly` forwarded to the inner input (locks typed text; use `disabled` to lock the calendar too). |
98
+ | `disabled` | `boolean` | `false` | Locks interaction via picker `wrapperDisabled` (form control stays enabled). |
99
+ | `required` | `boolean` | `false` | Shows a red `*` next to the label. |
100
+ | `min` | `Date \| string \| null` | `null` | Minimum date forwarded to `hlm-date-picker`. |
101
+ | `max` | `Date \| string \| null` | `null` | Maximum date forwarded to `hlm-date-picker`. |
102
+ | `autoCloseOnSelect` | `boolean` | config default | Forwarded to `hlm-date-picker` (falls back to `provideHlmDatePickerConfig`, default `false`). |
103
+ | `captionLayout` | union | `'label'` | Forwarded to `hlm-date-picker` (`'dropdown' \| 'label' \| 'dropdown-months' \| 'dropdown-years'`). |
104
+ | `formatDate` | `(date: Date) => string` | config default | Display format, forwarded to `hlm-date-picker` (falls back to `provideHlmDatePickerConfig`). |
105
+ | `transformDate` | `(date: Date) => Date` | config default | Model transform, forwarded to `hlm-date-picker` (falls back to `provideHlmDatePickerConfig`). |
106
+ | `parseDate` | `(value: string) => Date \| null` | config default | Input parsing, forwarded to `hlm-date-picker-input` (falls back to `provideHlmDatePickerConfig`). |
107
+ | `formatInputDate` | `(date: Date) => string` | config default | Edit format while focused, forwarded to `hlm-date-picker-input` (falls back to `provideHlmDatePickerConfig`). |
108
+ | `class` | `ClassValue` | `''` | Extra host classes (base `tw:w-full`). |
109
+ | `labelClass` | `string` | `''` | Extra label classes (base `tw:mb-1`). |
110
+ | `pickerClass` | `string` | `''` | Extra picker-container classes (base `tw:mb-1`). |
111
+ | `inputClass` | `string` | `''` | Extra inner-input classes (e.g. `tw:text-lg` for text size). |
112
+ | `errorClass` | `string` | `''` | Extra error classes (base `tw:mt-0`). |
113
+ | `hintClass` | `string` | `''` | Extra hint classes (base `tw:mt-0`). |
114
+
115
+ | Member | Description |
116
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
117
+ | `effectiveId` | `controlId() \|\| id() \|\| generated` — wired to input `inputId` and label `for`. |
118
+ | `errorId` / `hintId` | `effectiveId + '-error' / '-hint'`. |
119
+ | `describedBy()` | `errorId` when `error()` is set and control is invalid + dirty/touched, else `hintId` when `hint()` is set, else `null` — wired to input `ariaDescribedby`. |
120
+
121
+ Requires a `[formGroup]` ancestor (injects `FormGroupDirective`, provides `ControlContainer → FormGroupDirective`).
122
+
123
+ ## Examples
124
+
125
+ ### 1. Basic required date field
126
+
127
+ ```ts
128
+ import { Component, inject } from '@angular/core';
129
+ import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
130
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
131
+
132
+ @Component({
133
+ selector: 'app-birthday',
134
+ standalone: true,
135
+ imports: [ReactiveFormsModule, EgFormDatePicker],
136
+ template: `
137
+ <form [formGroup]="form" (ngSubmit)="submit()">
138
+ <eg-form-date-picker
139
+ controlName="birthday"
140
+ label="Date of birth"
141
+ [required]="true"
142
+ error="Birth date is required."
143
+ />
144
+ <button type="submit" [disabled]="form.invalid">Continue</button>
145
+ </form>
146
+ `,
147
+ })
148
+ export class BirthdayComponent {
149
+ private readonly fb = inject(FormBuilder);
150
+ readonly form = this.fb.group({ birthday: [null as Date | null, Validators.required] });
151
+ submit() {
152
+ console.log(this.form.value.birthday);
153
+ }
154
+ }
155
+ ```
156
+
157
+ ### 2. Hint + min/max bounds
158
+
159
+ ```ts
160
+ import { Component, inject } from '@angular/core';
161
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
162
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
163
+
164
+ @Component({
165
+ selector: 'app-bounds',
166
+ standalone: true,
167
+ imports: [ReactiveFormsModule, EgFormDatePicker],
168
+ template: `
169
+ <form [formGroup]="form">
170
+ <eg-form-date-picker
171
+ controlName="departure"
172
+ label="Departure"
173
+ placeholder="Select departure"
174
+ [min]="today"
175
+ [max]="nextYear"
176
+ hint="Bookings open up to one year ahead."
177
+ error="Pick a valid departure date."
178
+ />
179
+ </form>
180
+ `,
181
+ })
182
+ export class BoundsComponent {
183
+ private readonly fb = inject(FormBuilder);
184
+ readonly form = this.fb.group({ departure: [null as Date | null] });
185
+ readonly today = new Date();
186
+ readonly nextYear = new Date(new Date().getFullYear() + 1, 11, 31);
187
+ }
188
+ ```
189
+
190
+ ### 3. Booking range (two fields, cross-validation)
191
+
192
+ ```ts
193
+ import { Component, inject } from '@angular/core';
194
+ import { FormBuilder, ReactiveFormsModule, Validators, AbstractControl } from '@angular/forms';
195
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
196
+
197
+ @Component({
198
+ selector: 'app-booking',
199
+ standalone: true,
200
+ imports: [ReactiveFormsModule, EgFormDatePicker],
201
+ template: `
202
+ <form [formGroup]="form" class="tw:grid tw:gap-4">
203
+ <eg-form-date-picker controlName="checkIn" label="Check-in" [required]="true" error="Check-in is required." />
204
+ <eg-form-date-picker
205
+ controlName="checkOut"
206
+ label="Check-out"
207
+ [required]="true"
208
+ [min]="form.value.checkIn"
209
+ error="Check-out must be after check-in."
210
+ />
211
+ </form>
212
+ `,
213
+ })
214
+ export class BookingComponent {
215
+ private readonly fb = inject(FormBuilder);
216
+ readonly form = this.fb.group(
217
+ { checkIn: [null as Date | null, Validators.required], checkOut: [null as Date | null, Validators.required] },
218
+ {
219
+ validators: (g: AbstractControl) =>
220
+ (g.get('checkOut')?.value ?? 0) >= (g.get('checkIn')?.value ?? 0) ? null : { order: true },
221
+ },
222
+ );
223
+ }
224
+ ```
225
+
226
+ ### 4. Disabled / read-only preview
227
+
228
+ ```ts
229
+ import { Component, inject } from '@angular/core';
230
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
231
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
232
+
233
+ @Component({
234
+ selector: 'app-locked-date',
235
+ standalone: true,
236
+ imports: [ReactiveFormsModule, EgFormDatePicker],
237
+ template: `
238
+ <form [formGroup]="form">
239
+ <eg-form-date-picker
240
+ controlName="founded"
241
+ label="Founded"
242
+ [disabled]="true"
243
+ hint="Managed by workspace admins."
244
+ />
245
+ </form>
246
+ `,
247
+ })
248
+ export class LockedDateComponent {
249
+ private readonly fb = inject(FormBuilder);
250
+ readonly form = this.fb.group({ founded: [new Date(2020, 0, 15)] });
251
+ }
252
+ ```
253
+
254
+ ### 5. Submit-gated validation + value preview
255
+
256
+ ```ts
257
+ import { Component, inject } from '@angular/core';
258
+ import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
259
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
260
+
261
+ @Component({
262
+ selector: 'app-submit-date',
263
+ standalone: true,
264
+ imports: [ReactiveFormsModule, EgFormDatePicker],
265
+ template: `
266
+ <form [formGroup]="form" (ngSubmit)="submit()">
267
+ <eg-form-date-picker controlName="start" label="Start date" [required]="true" error="Start date is required." />
268
+ <button type="submit">Save</button>
269
+ </form>
270
+ <p class="tw:text-sm">ISO: {{ form.value.start?.toISOString() ?? '—' }}</p>
271
+ `,
272
+ })
273
+ export class SubmitDateComponent {
274
+ private readonly fb = inject(FormBuilder);
275
+ readonly form = this.fb.group({ start: [null as Date | null, Validators.required] });
276
+ submit() {
277
+ this.form.markAllAsTouched();
278
+ if (this.form.valid) console.log('saving', this.form.value.start);
279
+ }
280
+ }
281
+ ```
282
+
283
+ ### 6. Custom label/picker styling
284
+
285
+ ```ts
286
+ import { Component, inject } from '@angular/core';
287
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
288
+ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
289
+
290
+ @Component({
291
+ selector: 'app-styled-date',
292
+ standalone: true,
293
+ imports: [ReactiveFormsModule, EgFormDatePicker],
294
+ template: `
295
+ <form [formGroup]="form">
296
+ <eg-form-date-picker
297
+ controlName="event"
298
+ controlId="event-date"
299
+ label="Event date"
300
+ labelClass="tw:font-semibold"
301
+ pickerClass="tw:max-w-xs"
302
+ inputClass="tw:text-lg"
303
+ hint="Doors open one hour earlier."
304
+ />
305
+ </form>
306
+ `,
307
+ })
308
+ export class StyledDateComponent {
309
+ private readonly fb = inject(FormBuilder);
310
+ readonly form = this.fb.group({ event: [null as Date | null] });
311
+ }
312
+ ```
313
+
314
+ ## Accessibility notes
315
+
316
+ - Label `for` ↔ input `inputId` wiring is automatic via `effectiveId`; the input also receives `ariaLabel` (the label text) and `ariaDescribedby` (error/hint id) — always pass a `label`.
317
+ - Closing the picker popover marks the control touched, so errors appear after interaction even without typing.
318
+ - The required `*` is visual; pair with `Validators.required` so assistive tech and validation agree.
319
+ - Arrow-down opens the calendar from the input; the calendar/popup primitives handle focus trap, escape, and outside-click dismissal.
320
+
321
+ ## Theming / CSS variables
322
+
323
+ No component-specific CSS variables. Style per-instance via `class` / `labelClass` / `pickerClass` / `inputClass` / `errorClass` / `hintClass` (precedence: library base < global config < per-instance).
324
+
325
+ Global defaults (styling analogue of `formatDate`) via the picker config:
326
+
327
+ ```ts
328
+ import { provideHlmDatePickerConfig } from '@egose/shadcn-theme-ng/date-picker';
329
+
330
+ await bootstrapApplication(App, {
331
+ providers: [
332
+ provideHlmDatePickerConfig({
333
+ inputClass: 'tw:text-sm', // every date input; per-instance inputClass still wins on conflict
334
+ labelClass: 'tw:font-medium',
335
+ }),
336
+ ],
337
+ });
338
+ ```
339
+
340
+ The same `labelClass` / `pickerClass` / `inputClass` / `errorClass` / `hintClass` keys exist on
341
+ `HlmDateRangePickerConfig`, `HlmDatePickerMultiConfig`, and `HlmMonthYearPickerConfig` for future
342
+ wrappers. The host keeps `tw:w-full`; constrain width with `class` (e.g. `tw:max-w-xs`) or a wrapping container.
343
+
344
+ ## Related subpaths
345
+
346
+ - `@egose/shadcn-theme-ng/date-picker` — raw `hlm-date-picker` + input/trigger/config tokens for custom layouts.
347
+ - `@egose/shadcn-theme-ng/form-field` — `hlm-form-field` / `hlm-error` / `hlm-hint` used internally.
348
+ - `@egose/shadcn-theme-ng/calendar` — calendars rendered inside the picker popover.
349
+ - `@egose/shadcn-theme-ng/form-field-simple` — alternative minimal wrapper when you compose pickers by hand.
@@ -4,12 +4,13 @@ import * as i1 from '@angular/forms';
4
4
  import { FormGroupDirective, ReactiveFormsModule, ControlContainer } from '@angular/forms';
5
5
  import { HlmFormIdGenerator, HlmFormField, HlmError, HlmHint } from '@egose/shadcn-theme-ng-tw/form-field';
6
6
  import { HlmLabel } from '@egose/shadcn-theme-ng-tw/label';
7
- import { HlmDatePicker, HlmDatePickerInput } from '@egose/shadcn-theme-ng-tw/date-picker';
7
+ import { injectHlmDatePickerConfig, HlmDatePicker, HlmDatePickerInput } from '@egose/shadcn-theme-ng-tw/date-picker';
8
8
  import { hlm } from '@egose/shadcn-theme-ng-tw/utils';
9
9
 
10
10
  class EgFormDatePicker {
11
11
  formGroupDirective = inject(FormGroupDirective);
12
12
  generatedId = inject(HlmFormIdGenerator).generate('eg-form-date-picker');
13
+ _config = injectHlmDatePickerConfig();
13
14
  // Inputs
14
15
  label = input(undefined, /* @ts-ignore */
15
16
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -38,14 +39,35 @@ class EgFormDatePicker {
38
39
  ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
39
40
  max = input(null, /* @ts-ignore */
40
41
  ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
41
- autoCloseOnSelect = input(true, /* @ts-ignore */
42
+ // Picker behavior (defaults fall back to the injected HlmDatePickerConfig,
43
+ // so global `provideHlmDatePickerConfig` values keep working unless overridden)
44
+ autoCloseOnSelect = input(this._config.autoCloseOnSelect, /* @ts-ignore */
42
45
  ...(ngDevMode ? [{ debugName: "autoCloseOnSelect" }] : /* istanbul ignore next */ []));
46
+ captionLayout = input('label', /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "captionLayout" }] : /* istanbul ignore next */ []));
48
+ formatDate = input(this._config.formatDate, /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "formatDate" }] : /* istanbul ignore next */ []));
50
+ transformDate = input(this._config.transformDate, /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "transformDate" }] : /* istanbul ignore next */ []));
52
+ parseDate = input(this._config.parseDate, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "parseDate" }] : /* istanbul ignore next */ []));
54
+ formatInputDate = input(this._config.formatInputDate, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "formatInputDate" }] : /* istanbul ignore next */ []));
43
56
  effectiveId = computed(() => this.controlId() || this.id() || this.generatedId, /* @ts-ignore */
44
57
  ...(ngDevMode ? [{ debugName: "effectiveId" }] : /* istanbul ignore next */ []));
45
58
  errorId = computed(() => `${this.effectiveId()}-error`, /* @ts-ignore */
46
59
  ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
47
60
  hintId = computed(() => `${this.effectiveId()}-hint`, /* @ts-ignore */
48
61
  ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
62
+ /**
63
+ * Bounds projected onto the picker's `Date` model. The cast keeps the
64
+ * template's generic inference on `Date` while passing runtime values
65
+ * (including `string` bounds, as before) through untouched.
66
+ */
67
+ $min = computed(() => this.min(), /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "$min" }] : /* istanbul ignore next */ []));
69
+ $max = computed(() => this.max(), /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "$max" }] : /* istanbul ignore next */ []));
49
71
  describedBy() {
50
72
  const control = this.formGroupDirective.form.get(this.controlName());
51
73
  return this.error() && control?.invalid && (control.dirty || control.touched)
@@ -60,23 +82,27 @@ class EgFormDatePicker {
60
82
  ...(ngDevMode ? [{ debugName: "labelClass" }] : /* istanbul ignore next */ []));
61
83
  pickerClass = input('', /* @ts-ignore */
62
84
  ...(ngDevMode ? [{ debugName: "pickerClass" }] : /* istanbul ignore next */ []));
85
+ inputClass = input('', /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
63
87
  errorClass = input('', /* @ts-ignore */
64
88
  ...(ngDevMode ? [{ debugName: "errorClass" }] : /* istanbul ignore next */ []));
65
89
  hintClass = input('', /* @ts-ignore */
66
90
  ...(ngDevMode ? [{ debugName: "hintClass" }] : /* istanbul ignore next */ []));
67
- // Computed classes
68
- $userClass = computed(() => hlm('tw:flex tw:flex-col', this.userClass()), /* @ts-ignore */
91
+ // Computed classes (library base < global config < per-instance)
92
+ $userClass = computed(() => hlm('tw:w-full', this.userClass()), /* @ts-ignore */
69
93
  ...(ngDevMode ? [{ debugName: "$userClass" }] : /* istanbul ignore next */ []));
70
- $labelClass = computed(() => hlm('tw:mb-1', this.labelClass()), /* @ts-ignore */
94
+ $labelClass = computed(() => hlm('tw:mb-1', this._config.labelClass, this.labelClass()), /* @ts-ignore */
71
95
  ...(ngDevMode ? [{ debugName: "$labelClass" }] : /* istanbul ignore next */ []));
72
- $pickerClass = computed(() => hlm('tw:mb-1', this.pickerClass()), /* @ts-ignore */
96
+ $pickerClass = computed(() => hlm('tw:mb-1', this._config.pickerClass, this.pickerClass()), /* @ts-ignore */
73
97
  ...(ngDevMode ? [{ debugName: "$pickerClass" }] : /* istanbul ignore next */ []));
74
- $errorClass = computed(() => hlm('tw:mt-0', this.errorClass()), /* @ts-ignore */
98
+ $inputClass = computed(() => hlm(this._config.inputClass, this.inputClass()), /* @ts-ignore */
99
+ ...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
100
+ $errorClass = computed(() => hlm('tw:mt-0', this._config.errorClass, this.errorClass()), /* @ts-ignore */
75
101
  ...(ngDevMode ? [{ debugName: "$errorClass" }] : /* istanbul ignore next */ []));
76
- $hintClass = computed(() => hlm('tw:mt-0', this.hintClass()), /* @ts-ignore */
102
+ $hintClass = computed(() => hlm('tw:mt-0', this._config.hintClass, this.hintClass()), /* @ts-ignore */
77
103
  ...(ngDevMode ? [{ debugName: "$hintClass" }] : /* istanbul ignore next */ []));
78
104
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
79
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormDatePicker, isStandalone: true, selector: "eg-form-date-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, controlId: { classPropertyName: "controlId", publicName: "controlId", isSignal: true, isRequired: false, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, labelClass: { classPropertyName: "labelClass", publicName: "labelClass", isSignal: true, isRequired: false, transformFunction: null }, pickerClass: { classPropertyName: "pickerClass", publicName: "pickerClass", isSignal: true, isRequired: false, transformFunction: null }, errorClass: { classPropertyName: "errorClass", publicName: "errorClass", isSignal: true, isRequired: false, transformFunction: null }, hintClass: { classPropertyName: "hintClass", publicName: "hintClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tw:w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
105
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormDatePicker, isStandalone: true, selector: "eg-form-date-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, controlId: { classPropertyName: "controlId", publicName: "controlId", isSignal: true, isRequired: false, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", isSignal: true, isRequired: false, transformFunction: null }, captionLayout: { classPropertyName: "captionLayout", publicName: "captionLayout", isSignal: true, isRequired: false, transformFunction: null }, formatDate: { classPropertyName: "formatDate", publicName: "formatDate", isSignal: true, isRequired: false, transformFunction: null }, transformDate: { classPropertyName: "transformDate", publicName: "transformDate", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDate: { classPropertyName: "formatInputDate", publicName: "formatInputDate", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, labelClass: { classPropertyName: "labelClass", publicName: "labelClass", isSignal: true, isRequired: false, transformFunction: null }, pickerClass: { classPropertyName: "pickerClass", publicName: "pickerClass", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, errorClass: { classPropertyName: "errorClass", publicName: "errorClass", isSignal: true, isRequired: false, transformFunction: null }, hintClass: { classPropertyName: "hintClass", publicName: "hintClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "$userClass()" } }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
80
106
  @let lbl = label();
81
107
  @let cnm = controlName();
82
108
  @let err = error();
@@ -94,17 +120,26 @@ class EgFormDatePicker {
94
120
  }
95
121
 
96
122
  <hlm-date-picker
97
- [min]="min()"
98
- [max]="max()"
123
+ [min]="$min()"
124
+ [max]="$max()"
99
125
  [wrapperDisabled]="disabled()"
126
+ [autoCloseOnSelect]="autoCloseOnSelect()"
127
+ [captionLayout]="captionLayout()"
128
+ [formatDate]="formatDate()"
129
+ [transformDate]="transformDate()"
100
130
  [formControlName]="cnm"
101
131
  [class]="$pickerClass()"
102
132
  >
103
133
  <hlm-date-picker-input
104
134
  [inputId]="effectiveId()"
135
+ [name]="cnm || name()"
136
+ [readonly]="readonly()"
105
137
  [ariaLabel]="lbl"
106
138
  [ariaDescribedby]="describedBy()"
107
139
  [placeholder]="placeholder()"
140
+ [parseDate]="parseDate()"
141
+ [formatInputDate]="formatInputDate()"
142
+ [inputClass]="$inputClass()"
108
143
  />
109
144
  </hlm-date-picker>
110
145
 
@@ -120,7 +155,7 @@ class EgFormDatePicker {
120
155
  </hlm-hint>
121
156
  }
122
157
  </hlm-form-field>
123
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: HlmFormField, selector: "hlm-form-field", inputs: ["class"] }, { kind: "directive", type: HlmError, selector: "hlm-error", inputs: ["class"] }, { kind: "directive", type: HlmHint, selector: "hlm-hint", inputs: ["class"] }, { kind: "directive", type: HlmLabel, selector: "[hlmLabel]", inputs: ["class"] }, { kind: "component", type: HlmDatePicker, selector: "hlm-date-picker", inputs: ["captionLayout", "min", "max", "disabled", "wrapperDisabled", "date", "defaultFocusedDate", "autoCloseOnSelect", "formatDate", "transformDate"], outputs: ["dateChange"] }, { kind: "component", type: HlmDatePickerInput, selector: "hlm-date-picker-input", inputs: ["ariaLabel", "ariaDescribedby", "parseDate", "formatInputDate"] }] });
158
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: HlmFormField, selector: "hlm-form-field", inputs: ["class"] }, { kind: "directive", type: HlmError, selector: "hlm-error", inputs: ["class"] }, { kind: "directive", type: HlmHint, selector: "hlm-hint", inputs: ["class"] }, { kind: "directive", type: HlmLabel, selector: "[hlmLabel]", inputs: ["class"] }, { kind: "component", type: HlmDatePicker, selector: "hlm-date-picker", inputs: ["captionLayout", "min", "max", "disabled", "wrapperDisabled", "date", "defaultFocusedDate", "autoCloseOnSelect", "formatDate", "transformDate"], outputs: ["dateChange"] }, { kind: "component", type: HlmDatePickerInput, selector: "hlm-date-picker-input", inputs: ["ariaLabel", "ariaDescribedby", "name", "readonly", "class", "inputClass", "parseDate", "formatInputDate"] }] });
124
159
  }
125
160
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormDatePicker, decorators: [{
126
161
  type: Component,
@@ -128,7 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
128
163
  selector: 'eg-form-date-picker',
129
164
  standalone: true,
130
165
  host: {
131
- class: 'tw:w-full',
166
+ '[class]': '$userClass()',
132
167
  },
133
168
  imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmDatePicker, HlmDatePickerInput],
134
169
  providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
@@ -150,17 +185,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
150
185
  }
151
186
 
152
187
  <hlm-date-picker
153
- [min]="min()"
154
- [max]="max()"
188
+ [min]="$min()"
189
+ [max]="$max()"
155
190
  [wrapperDisabled]="disabled()"
191
+ [autoCloseOnSelect]="autoCloseOnSelect()"
192
+ [captionLayout]="captionLayout()"
193
+ [formatDate]="formatDate()"
194
+ [transformDate]="transformDate()"
156
195
  [formControlName]="cnm"
157
196
  [class]="$pickerClass()"
158
197
  >
159
198
  <hlm-date-picker-input
160
199
  [inputId]="effectiveId()"
200
+ [name]="cnm || name()"
201
+ [readonly]="readonly()"
161
202
  [ariaLabel]="lbl"
162
203
  [ariaDescribedby]="describedBy()"
163
204
  [placeholder]="placeholder()"
205
+ [parseDate]="parseDate()"
206
+ [formatInputDate]="formatInputDate()"
207
+ [inputClass]="$inputClass()"
164
208
  />
165
209
  </hlm-date-picker>
166
210
 
@@ -178,7 +222,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
178
222
  </hlm-form-field>
179
223
  `,
180
224
  }]
181
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: false }] }], controlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlName", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], autoCloseOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoCloseOnSelect", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], pickerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "pickerClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
225
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: false }] }], controlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlName", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], autoCloseOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoCloseOnSelect", required: false }] }], captionLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "captionLayout", required: false }] }], formatDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatDate", required: false }] }], transformDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformDate", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDate", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], pickerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "pickerClass", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
182
226
 
183
227
  /*
184
228
  * Public API Surface of form-date-picker