commons-shared-web-ui 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/commons-shared-web-ui.mjs +15897 -0
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -0
- package/index.d.ts +4916 -0
- package/package.json +34 -53
- package/.claude/settings.local.json +0 -10
- package/documentation/alert.md +0 -123
- package/documentation/button-dropdown.md +0 -126
- package/documentation/button.md +0 -184
- package/documentation/cards-usage-guidelines.md +0 -131
- package/documentation/configurable-form.md +0 -605
- package/documentation/confirmation-modal.md +0 -250
- package/documentation/filter-sidebar.md +0 -178
- package/documentation/filter-table-selector.md +0 -228
- package/documentation/form-builder.md +0 -599
- package/documentation/form-components.md +0 -384
- package/documentation/form-field-configuration.md +0 -250
- package/documentation/nav.md +0 -427
- package/documentation/pagination.md +0 -181
- package/documentation/side-nav-documentation.md +0 -169
- package/documentation/smart-form.md +0 -2765
- package/documentation/smart-table.md +0 -1221
- package/documentation/snackbar.md +0 -118
- package/documentation/style-externalization.md +0 -88
- package/documentation/summary-card.md +0 -279
- package/documentation/table-column-configuration.md +0 -221
- package/documentation/time-picker.md +0 -274
- package/ng-package.json +0 -30
- package/src/lib/modules/alert/alert.models.ts +0 -6
- package/src/lib/modules/alert/alert.module.ts +0 -16
- package/src/lib/modules/alert/components/alert/alert.component.html +0 -27
- package/src/lib/modules/alert/components/alert/alert.component.scss +0 -92
- package/src/lib/modules/alert/components/alert/alert.component.ts +0 -81
- package/src/lib/modules/button/button.models.ts +0 -13
- package/src/lib/modules/button/button.module.ts +0 -16
- package/src/lib/modules/button/components/button/button.component.html +0 -22
- package/src/lib/modules/button/components/button/button.component.scss +0 -88
- package/src/lib/modules/button/components/button/button.component.ts +0 -67
- package/src/lib/modules/button-dropdown/button-dropdown.models.ts +0 -26
- package/src/lib/modules/button-dropdown/button-dropdown.module.ts +0 -22
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.html +0 -41
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.scss +0 -135
- package/src/lib/modules/button-dropdown/components/button-dropdown/button-dropdown.component.ts +0 -160
- package/src/lib/modules/configurable-form/component/configurable-form.component.html +0 -294
- package/src/lib/modules/configurable-form/component/configurable-form.component.scss +0 -503
- package/src/lib/modules/configurable-form/component/configurable-form.component.ts +0 -628
- package/src/lib/modules/configurable-form/configurable-form.examples.ts +0 -154
- package/src/lib/modules/configurable-form/configurable-form.model.ts +0 -131
- package/src/lib/modules/configurable-form/configurable-form.module.ts +0 -19
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.html +0 -77
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.scss +0 -395
- package/src/lib/modules/confirmation-modal/components/confirmation-modal/confirmation-modal.component.ts +0 -266
- package/src/lib/modules/confirmation-modal/confirmation-modal.models.ts +0 -71
- package/src/lib/modules/confirmation-modal/confirmation-modal.module.ts +0 -20
- package/src/lib/modules/filter/components/filter/filter.component.html +0 -131
- package/src/lib/modules/filter/components/filter/filter.component.scss +0 -245
- package/src/lib/modules/filter/components/filter/filter.component.ts +0 -216
- package/src/lib/modules/filter/filter.models.ts +0 -88
- package/src/lib/modules/filter/filter.module.ts +0 -24
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.html +0 -112
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.scss +0 -186
- package/src/lib/modules/filter-sidebar/components/filter-sidebar/filter-sidebar.component.ts +0 -163
- package/src/lib/modules/filter-sidebar/filter-sidebar.models.ts +0 -95
- package/src/lib/modules/filter-sidebar/filter-sidebar.module.ts +0 -24
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.html +0 -73
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.scss +0 -321
- package/src/lib/modules/filter-table-selector/components/filter-table-selector/filter-table-selector.component.ts +0 -361
- package/src/lib/modules/filter-table-selector/filter-table-selector.models.ts +0 -91
- package/src/lib/modules/filter-table-selector/filter-table-selector.module.ts +0 -22
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.html +0 -63
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.scss +0 -496
- package/src/lib/modules/form-builder/components/field-configurator/configurator-config-panel/configurator-config-panel.component.ts +0 -445
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.html +0 -75
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.scss +0 -210
- package/src/lib/modules/form-builder/components/field-configurator/configurator-tree/configurator-tree.component.ts +0 -55
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.html +0 -25
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.scss +0 -82
- package/src/lib/modules/form-builder/components/field-configurator/field-configurator.component.ts +0 -95
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.html +0 -20
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.scss +0 -37
- package/src/lib/modules/form-builder/components/field-selection/field-selection.component.ts +0 -94
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.html +0 -46
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.scss +0 -102
- package/src/lib/modules/form-builder/components/field-selection/group-node/group-node.component.ts +0 -50
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.html +0 -35
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.scss +0 -67
- package/src/lib/modules/form-builder/components/field-selection/selection-field-node/selection-field-node.component.ts +0 -34
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.html +0 -68
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.scss +0 -113
- package/src/lib/modules/form-builder/components/field-selection/selection-section-node/selection-section-node.component.ts +0 -74
- package/src/lib/modules/form-builder/configs/field-type-schema.map.ts +0 -533
- package/src/lib/modules/form-builder/form-builder.module.ts +0 -36
- package/src/lib/modules/form-builder/index.ts +0 -9
- package/src/lib/modules/form-builder/models/builder.models.ts +0 -7
- package/src/lib/modules/form-builder/models/field-configurator.models.ts +0 -38
- package/src/lib/modules/form-builder/models/field-selection.models.ts +0 -51
- package/src/lib/modules/form-builder/services/field-configurator.service.ts +0 -258
- package/src/lib/modules/form-builder/services/field-selection.service.ts +0 -299
- package/src/lib/modules/form-builder/services/form-schema-tree.service.ts +0 -670
- package/src/lib/modules/form-builder/tokens/builder.tokens.ts +0 -10
- package/src/lib/modules/form-builder/utils/constants.ts +0 -43
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.html +0 -29
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.scss +0 -111
- package/src/lib/modules/form-components/components/checkbox/checkbox.component.ts +0 -207
- package/src/lib/modules/form-components/components/checkbox/checkbox.models.ts +0 -35
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.html +0 -42
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.scss +0 -115
- package/src/lib/modules/form-components/components/datepicker/datepicker.component.ts +0 -267
- package/src/lib/modules/form-components/components/datepicker/datepicker.models.ts +0 -45
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.html +0 -74
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.scss +0 -252
- package/src/lib/modules/form-components/components/dropdown/dropdown.component.ts +0 -377
- package/src/lib/modules/form-components/components/dropdown/dropdown.models.ts +0 -53
- package/src/lib/modules/form-components/components/input/input.component.html +0 -51
- package/src/lib/modules/form-components/components/input/input.component.scss +0 -128
- package/src/lib/modules/form-components/components/input/input.component.ts +0 -250
- package/src/lib/modules/form-components/components/input/input.models.ts +0 -55
- package/src/lib/modules/form-components/components/radio/radio.component.html +0 -22
- package/src/lib/modules/form-components/components/radio/radio.component.scss +0 -107
- package/src/lib/modules/form-components/components/radio/radio.component.ts +0 -181
- package/src/lib/modules/form-components/components/radio/radio.models.ts +0 -39
- package/src/lib/modules/form-components/components/search/search.component.html +0 -15
- package/src/lib/modules/form-components/components/search/search.component.scss +0 -87
- package/src/lib/modules/form-components/components/search/search.component.ts +0 -213
- package/src/lib/modules/form-components/components/search/search.models.ts +0 -40
- package/src/lib/modules/form-components/components/toggle/toggle.component.html +0 -15
- package/src/lib/modules/form-components/components/toggle/toggle.component.scss +0 -81
- package/src/lib/modules/form-components/components/toggle/toggle.component.ts +0 -166
- package/src/lib/modules/form-components/components/toggle/toggle.models.ts +0 -27
- package/src/lib/modules/form-components/directives/click-outside.directive.ts +0 -22
- package/src/lib/modules/form-components/form-components.module.ts +0 -42
- package/src/lib/modules/form-field-configuration/components/_ffc-controls.scss +0 -89
- package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.html +0 -68
- package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.scss +0 -73
- package/src/lib/modules/form-field-configuration/components/config-field-node/config-field-node.component.ts +0 -34
- package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.html +0 -78
- package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.scss +0 -83
- package/src/lib/modules/form-field-configuration/components/config-section-node/config-section-node.component.ts +0 -94
- package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.html +0 -38
- package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.scss +0 -42
- package/src/lib/modules/form-field-configuration/components/form-field-configuration/form-field-configuration.component.ts +0 -92
- package/src/lib/modules/form-field-configuration/form-field-configuration.module.ts +0 -23
- package/src/lib/modules/form-field-configuration/index.ts +0 -7
- package/src/lib/modules/form-field-configuration/models/field-configuration.models.ts +0 -62
- package/src/lib/modules/form-field-configuration/services/config-schema-tree.service.ts +0 -159
- package/src/lib/modules/form-field-configuration/services/field-configuration.service.ts +0 -228
- package/src/lib/modules/material/material.module.ts +0 -94
- package/src/lib/modules/nav/components/nav/nav.component.html +0 -34
- package/src/lib/modules/nav/components/nav/nav.component.scss +0 -171
- package/src/lib/modules/nav/components/nav/nav.component.ts +0 -82
- package/src/lib/modules/nav/nav.models.ts +0 -31
- package/src/lib/modules/nav/nav.module.ts +0 -17
- package/src/lib/modules/pagination/components/pagination/pagination.component.html +0 -52
- package/src/lib/modules/pagination/components/pagination/pagination.component.scss +0 -155
- package/src/lib/modules/pagination/components/pagination/pagination.component.ts +0 -109
- package/src/lib/modules/pagination/pagination.module.ts +0 -17
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.html +0 -56
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +0 -342
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.ts +0 -135
- package/src/lib/modules/side-nav/side-nav.models.ts +0 -38
- package/src/lib/modules/side-nav/side-nav.module.ts +0 -16
- package/src/lib/modules/smart-form/components/form-field/form-field.component.html +0 -1330
- package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +0 -2112
- package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +0 -3006
- package/src/lib/modules/smart-form/components/form-section/form-section.component.html +0 -65
- package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +0 -209
- package/src/lib/modules/smart-form/components/form-section/form-section.component.ts +0 -131
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.html +0 -253
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +0 -689
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.ts +0 -1131
- package/src/lib/modules/smart-form/index.ts +0 -10
- package/src/lib/modules/smart-form/models/form-schema.model.ts +0 -793
- package/src/lib/modules/smart-form/models/hierarchy-config.model.ts +0 -21
- package/src/lib/modules/smart-form/services/expression.service.ts +0 -75
- package/src/lib/modules/smart-form/services/smart-form-controller.service.ts +0 -67
- package/src/lib/modules/smart-form/smart-form.examples.ts +0 -1324
- package/src/lib/modules/smart-form/smart-form.module.ts +0 -38
- package/src/lib/modules/smart-form/utils/translation.utils.ts +0 -82
- package/src/lib/modules/smart-form/utils/trusted-url.pipe.ts +0 -25
- package/src/lib/modules/smart-form/utils/validation.utils.ts +0 -98
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.html +0 -283
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.scss +0 -685
- package/src/lib/modules/smart-table/components/smart-table/smart-table.component.ts +0 -1128
- package/src/lib/modules/smart-table/models/table-config.model.ts +0 -213
- package/src/lib/modules/smart-table/smart-table.module.ts +0 -30
- package/src/lib/modules/smart-table/utils/safe-html.pipe.ts +0 -28
- package/src/lib/modules/smart-table/utils/smart-table.utils.ts +0 -18
- package/src/lib/modules/snackbar/components/snackbar.component.html +0 -41
- package/src/lib/modules/snackbar/components/snackbar.component.scss +0 -99
- package/src/lib/modules/snackbar/components/snackbar.component.ts +0 -18
- package/src/lib/modules/snackbar/models/snackbar.models.ts +0 -10
- package/src/lib/modules/snackbar/services/snackbar.service.ts +0 -40
- package/src/lib/modules/snackbar/snackbar.module.ts +0 -11
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.html +0 -47
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.scss +0 -199
- package/src/lib/modules/summary-card/components/summary-card/summary-card.component.ts +0 -126
- package/src/lib/modules/summary-card/summary-card.module.ts +0 -18
- package/src/lib/modules/table-column-configuration/components/_tcc-controls.scss +0 -53
- package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.html +0 -47
- package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.scss +0 -50
- package/src/lib/modules/table-column-configuration/components/config-column-node/config-column-node.component.ts +0 -33
- package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.html +0 -30
- package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.scss +0 -36
- package/src/lib/modules/table-column-configuration/components/table-column-configuration/table-column-configuration.component.ts +0 -78
- package/src/lib/modules/table-column-configuration/index.ts +0 -5
- package/src/lib/modules/table-column-configuration/models/table-column-configuration.models.ts +0 -20
- package/src/lib/modules/table-column-configuration/services/table-column-configuration.service.ts +0 -77
- package/src/lib/modules/table-column-configuration/table-column-configuration.module.ts +0 -21
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.html +0 -37
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.scss +0 -102
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.ts +0 -178
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.html +0 -78
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.scss +0 -226
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.ts +0 -595
- package/src/lib/modules/time-picker/models/time-picker.models.ts +0 -49
- package/src/lib/modules/time-picker/time-picker.module.ts +0 -23
- package/src/lib/shared-ui.module.ts +0 -55
- package/src/lib/utils/constants.ts +0 -11
- package/src/lib/utils/storage.utils.ts +0 -37
- package/src/lib/utils/string.utils.ts +0 -23
- package/src/lib/utils/translation.utils.ts +0 -87
- package/src/public-api.ts +0 -127
- package/tsconfig.lib.json +0 -15
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/** Available field types that users can switch to in the configurator. */
|
|
2
|
-
export const SWITCHABLE_FIELD_TYPES = [
|
|
3
|
-
{ label: 'Short Text', value: 'shortText' },
|
|
4
|
-
{ label: 'Long Text', value: 'longText' },
|
|
5
|
-
{ label: 'Email', value: 'email' },
|
|
6
|
-
{ label: 'Phone', value: 'phone' },
|
|
7
|
-
{ label: 'Password', value: 'password' },
|
|
8
|
-
{ label: 'Number (Integer)',value: 'number' },
|
|
9
|
-
{ label: 'Number (Decimal)',value: 'decimal' },
|
|
10
|
-
{ label: 'Date', value: 'date' },
|
|
11
|
-
{ label: 'Time', value: 'time' },
|
|
12
|
-
{ label: 'Date & Time', value: 'dateTime' },
|
|
13
|
-
{ label: 'Dropdown', value: 'dropdown' },
|
|
14
|
-
{ label: 'Multi-Select', value: 'multiSelect' },
|
|
15
|
-
{ label: 'Autocomplete', value: 'autocomplete' },
|
|
16
|
-
{ label: 'Checkbox', value: 'checkbox' },
|
|
17
|
-
{ label: 'Multi-Checkbox', value: 'multiCheckbox' },
|
|
18
|
-
{ label: 'Radio', value: 'radio' },
|
|
19
|
-
{ label: 'Toggle', value: 'toggle' },
|
|
20
|
-
{ label: 'Chips', value: 'chip' },
|
|
21
|
-
{ label: 'Rich Text', value: 'richText' },
|
|
22
|
-
{ label: 'File Upload', value: 'file' },
|
|
23
|
-
{ label: 'Rating', value: 'rating' },
|
|
24
|
-
{ label: 'Location', value: 'location' },
|
|
25
|
-
{ label: 'Formula (Auto)', value: 'generated' },
|
|
26
|
-
];
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Field types that are driven by option configurations (optionConfig).
|
|
30
|
-
* When `hideToggleForOptionTypes` is true on the field-selection configurator,
|
|
31
|
-
* these field types will not show the enable/disable toggle — they are
|
|
32
|
-
* UI element types whose options are pre-filled by the developer.
|
|
33
|
-
*/
|
|
34
|
-
export const OPTION_DRIVEN_FIELD_TYPES: ReadonlySet<string> = new Set([
|
|
35
|
-
'DROPDOWN',
|
|
36
|
-
'MULTI_SELECT',
|
|
37
|
-
'RADIO',
|
|
38
|
-
'AUTOCOMPLETE',
|
|
39
|
-
'CHECKBOX',
|
|
40
|
-
'MULTI_CHECKBOX',
|
|
41
|
-
'CHIP',
|
|
42
|
-
]);
|
|
43
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<div class="cc-checkbox-wrapper" [ngStyle]="wrapperStyles">
|
|
2
|
-
|
|
3
|
-
<!-- Single Checkbox -->
|
|
4
|
-
<label *ngIf="!isGroup" class="cc-checkbox-label" [class.label-before]="labelPosition === 'before'"
|
|
5
|
-
[class.disabled]="disabled" [class.checked]="checked">
|
|
6
|
-
<input type="checkbox" class="cc-native-checkbox" [checked]="checked" [disabled]="disabled"
|
|
7
|
-
[required]="required" [indeterminate]="indeterminate" (change)="onCheckboxChange($event)" />
|
|
8
|
-
<span class="cc-checkmark"></span>
|
|
9
|
-
<span class="cc-text" *ngIf="label">{{ label }}</span>
|
|
10
|
-
</label>
|
|
11
|
-
|
|
12
|
-
<!-- Checkbox Group -->
|
|
13
|
-
<div *ngIf="isGroup" class="cc-checkbox-group">
|
|
14
|
-
<label *ngIf="label" class="cc-checkbox-group-label" [class.label-before]="labelPosition === 'before'">
|
|
15
|
-
{{ label }}
|
|
16
|
-
<span *ngIf="required" class="cc-required">{{ requiredMarker }}</span>
|
|
17
|
-
</label>
|
|
18
|
-
|
|
19
|
-
<label *ngFor="let option of visibleOptions" class="cc-checkbox-label" [class.disabled]="disabled || option.disabled"
|
|
20
|
-
[class.checked]="option.checked">
|
|
21
|
-
<input type="checkbox" class="cc-native-checkbox" [checked]="option.checked"
|
|
22
|
-
[disabled]="disabled || option.disabled" (change)="onGroupCheckboxChange(option, $event)" />
|
|
23
|
-
<span class="cc-checkmark"></span>
|
|
24
|
-
<span class="cc-text">{{ option.label }}</span>
|
|
25
|
-
</label>
|
|
26
|
-
</div>
|
|
27
|
-
|
|
28
|
-
<div class="cc-error-message" *ngIf="errorMessage">{{ errorMessage }}</div>
|
|
29
|
-
</div>
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
.cc-checkbox-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
font-family: var(--cc-checkbox-font-family, inherit);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.cc-checkbox-label {
|
|
8
|
-
display: inline-flex;
|
|
9
|
-
align-items: center; // Vertical center align
|
|
10
|
-
position: relative;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
font-size: var(--cc-checkbox-label-font-size, var(--cc-checkbox-font-size, 0.875rem));
|
|
13
|
-
font-weight: var(--cc-checkbox-label-font-weight, var(--cc-checkbox-font-weight, 400));
|
|
14
|
-
color: var(--cc-checkbox-label-color, #202124);
|
|
15
|
-
user-select: none;
|
|
16
|
-
margin-bottom: var(--cc-checkbox-margin-bottom, 0.5rem);
|
|
17
|
-
|
|
18
|
-
&.label-before {
|
|
19
|
-
flex-direction: row-reverse;
|
|
20
|
-
|
|
21
|
-
.cc-checkmark {
|
|
22
|
-
margin-right: 0;
|
|
23
|
-
margin-left: 0.5rem;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&.disabled {
|
|
28
|
-
cursor: not-allowed;
|
|
29
|
-
color: var(--cc-checkbox-disabled-color, #80868B);
|
|
30
|
-
|
|
31
|
-
.cc-checkmark {
|
|
32
|
-
border-color: var(--cc-checkbox-disabled-color, #80868B);
|
|
33
|
-
background-color: transparent;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.cc-native-checkbox {
|
|
39
|
-
position: absolute;
|
|
40
|
-
opacity: 0;
|
|
41
|
-
cursor: pointer;
|
|
42
|
-
height: 0;
|
|
43
|
-
width: 0;
|
|
44
|
-
|
|
45
|
-
// Checked State
|
|
46
|
-
&:checked~.cc-checkmark {
|
|
47
|
-
background-color: var(--cc-checkbox-checked-color, #1A73E8);
|
|
48
|
-
border-color: var(--cc-checkbox-checked-color, #1A73E8);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Checkmark/Indicator
|
|
52
|
-
&:checked~.cc-checkmark:after {
|
|
53
|
-
display: block;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Disabled & Checked
|
|
57
|
-
&:disabled:checked~.cc-checkmark {
|
|
58
|
-
background-color: var(--cc-checkbox-disabled-color, #80868B);
|
|
59
|
-
border-color: var(--cc-checkbox-disabled-color, #80868B);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.cc-checkmark {
|
|
64
|
-
position: relative;
|
|
65
|
-
height: var(--cc-checkbox-size, 1.125rem);
|
|
66
|
-
width: var(--cc-checkbox-size, 1.125rem);
|
|
67
|
-
background-color: transparent;
|
|
68
|
-
border: 2px solid var(--cc-checkbox-unchecked-color, #BDC1C6);
|
|
69
|
-
border-radius: var(--cc-checkbox-border-radius, 2px);
|
|
70
|
-
transition: all 0.2s ease-in-out;
|
|
71
|
-
margin-right: 0.5rem;
|
|
72
|
-
flex-shrink: 0; // Prevent shrinking
|
|
73
|
-
|
|
74
|
-
// The check icon (pure CSS arrow)
|
|
75
|
-
&:after {
|
|
76
|
-
content: "";
|
|
77
|
-
position: absolute;
|
|
78
|
-
display: none;
|
|
79
|
-
left: 50%;
|
|
80
|
-
top: 45%; // Optical centering
|
|
81
|
-
width: 30%;
|
|
82
|
-
height: 60%;
|
|
83
|
-
border: solid white;
|
|
84
|
-
border-width: 0 2px 2px 0;
|
|
85
|
-
transform: translate(-50%, -50%) rotate(45deg);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.cc-checkbox-group {
|
|
90
|
-
display: flex;
|
|
91
|
-
flex-direction: column;
|
|
92
|
-
gap: var(--cc-checkbox-group-gap, 0.75rem);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.cc-checkbox-group-label {
|
|
96
|
-
font-size: var(--cc-checkbox-group-label-font-size, 0.875rem);
|
|
97
|
-
font-weight: var(--cc-checkbox-group-label-font-weight, 500);
|
|
98
|
-
color: var(--cc-checkbox-group-label-color, #202124);
|
|
99
|
-
margin-bottom: 0.5rem;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.cc-required {
|
|
103
|
-
color: var(--cc-checkbox-required-color, #D93025);
|
|
104
|
-
margin-left: 0.25rem;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.cc-error-message {
|
|
108
|
-
font-size: 0.75rem;
|
|
109
|
-
color: var(--cc-checkbox-error-color, #D93025);
|
|
110
|
-
margin-top: 0.25rem;
|
|
111
|
-
}
|
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
import { Component, Input, Output, EventEmitter, forwardRef, OnInit, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
-
import { CheckboxConfig, CheckboxOption, CheckboxLabels } from './checkbox.models';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'lib-checkbox',
|
|
7
|
-
templateUrl: './checkbox.component.html',
|
|
8
|
-
styleUrls: ['./checkbox.component.scss'],
|
|
9
|
-
standalone: false,
|
|
10
|
-
providers: [
|
|
11
|
-
{
|
|
12
|
-
provide: NG_VALUE_ACCESSOR,
|
|
13
|
-
useExisting: forwardRef(() => CheckboxComponent),
|
|
14
|
-
multi: true
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
})
|
|
18
|
-
export class CheckboxComponent implements ControlValueAccessor, OnInit, OnChanges {
|
|
19
|
-
@Input() config: CheckboxConfig = {};
|
|
20
|
-
@Input() labels?: CheckboxLabels;
|
|
21
|
-
@Input() label: string = '';
|
|
22
|
-
@Input() checked: boolean = false;
|
|
23
|
-
@Input() disabled: boolean = false;
|
|
24
|
-
@Input() required: boolean = false;
|
|
25
|
-
@Input() indeterminate: boolean = false;
|
|
26
|
-
@Input() options: CheckboxOption[] = [];
|
|
27
|
-
@Input() labelPosition: 'before' | 'after' = 'after';
|
|
28
|
-
@Input() color: string = '#007bff';
|
|
29
|
-
@Input() borderRadius: string = '4px';
|
|
30
|
-
@Input() value: any = null;
|
|
31
|
-
@Input() errorMessage: string = '';
|
|
32
|
-
|
|
33
|
-
// Style inputs
|
|
34
|
-
@Input() width?: string;
|
|
35
|
-
@Input() height?: string;
|
|
36
|
-
@Input() fontSize?: string;
|
|
37
|
-
@Input() fontWeight?: string;
|
|
38
|
-
@Input() labelColor?: string;
|
|
39
|
-
@Input() labelFontSize?: string;
|
|
40
|
-
@Input() labelFontWeight?: string;
|
|
41
|
-
@Input() gap?: string;
|
|
42
|
-
@Input() fontFamily?: string;
|
|
43
|
-
@Input() backgroundColor?: string;
|
|
44
|
-
@Input() borderColor?: string;
|
|
45
|
-
@Input() borderWidth?: string;
|
|
46
|
-
@Input() padding?: string;
|
|
47
|
-
@Input() placeholderColor?: string;
|
|
48
|
-
@Input() focusBorderColor?: string;
|
|
49
|
-
@Input() errorColor?: string;
|
|
50
|
-
@Input() disabledBackgroundColor?: string;
|
|
51
|
-
@Input() disabledColor?: string;
|
|
52
|
-
@Input() boxShadow?: string;
|
|
53
|
-
|
|
54
|
-
@Input() size?: string;
|
|
55
|
-
@Input() checkedColor?: string;
|
|
56
|
-
@Input() uncheckedColor?: string;
|
|
57
|
-
@Input() groupLabelColor?: string;
|
|
58
|
-
@Input() groupLabelFontSize?: string;
|
|
59
|
-
@Input() groupLabelFontWeight?: string;
|
|
60
|
-
|
|
61
|
-
@Output() checkedChange = new EventEmitter<any>();
|
|
62
|
-
|
|
63
|
-
onChange: (value: any) => void = () => { };
|
|
64
|
-
onTouched: () => void = () => { };
|
|
65
|
-
|
|
66
|
-
ngOnInit(): void {
|
|
67
|
-
this.updateFromConfig();
|
|
68
|
-
this.updateFromLabels();
|
|
69
|
-
|
|
70
|
-
if (this.isGroup) {
|
|
71
|
-
this.value = this.options
|
|
72
|
-
.filter(opt => opt.checked)
|
|
73
|
-
.map(opt => opt.value);
|
|
74
|
-
} else {
|
|
75
|
-
this.value = this.checked;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
80
|
-
if (changes['config']) {
|
|
81
|
-
this.updateFromConfig();
|
|
82
|
-
}
|
|
83
|
-
if (changes['labels']) {
|
|
84
|
-
this.updateFromLabels();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
private updateFromConfig(): void {
|
|
89
|
-
if (this.config) {
|
|
90
|
-
this.label = this.config.label ?? this.label;
|
|
91
|
-
this.checked = this.config.checked ?? this.checked;
|
|
92
|
-
this.disabled = this.config.disabled ?? this.disabled;
|
|
93
|
-
this.required = this.config.required ?? this.required;
|
|
94
|
-
this.indeterminate = this.config.indeterminate ?? this.indeterminate;
|
|
95
|
-
this.options = this.config.options || this.options;
|
|
96
|
-
this.labelPosition = this.config.labelPosition ?? this.labelPosition;
|
|
97
|
-
this.color = this.config.color ?? this.color;
|
|
98
|
-
this.borderRadius = this.config.borderRadius ?? this.borderRadius;
|
|
99
|
-
this.size = this.config.size ?? this.size;
|
|
100
|
-
this.checkedColor = this.config.checkedColor ?? this.checkedColor;
|
|
101
|
-
this.uncheckedColor = this.config.uncheckedColor ?? this.uncheckedColor;
|
|
102
|
-
this.groupLabelColor = this.config.groupLabelColor ?? this.groupLabelColor;
|
|
103
|
-
this.groupLabelFontSize = this.config.groupLabelFontSize ?? this.groupLabelFontSize;
|
|
104
|
-
this.groupLabelFontWeight = this.config.groupLabelFontWeight ?? this.groupLabelFontWeight;
|
|
105
|
-
this.labelFontSize = this.config.labelFontSize ?? this.labelFontSize;
|
|
106
|
-
this.labelFontWeight = this.config.labelFontWeight ?? this.labelFontWeight;
|
|
107
|
-
this.labelColor = this.config.labelColor ?? this.labelColor;
|
|
108
|
-
this.gap = this.config.gap ?? this.gap;
|
|
109
|
-
this.fontFamily = this.config.fontFamily ?? this.fontFamily;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
private updateFromLabels(): void {
|
|
114
|
-
if (this.labels) {
|
|
115
|
-
this.label = this.labels.label || this.label;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
get isGroup(): boolean {
|
|
120
|
-
return this.options && this.options.length > 0;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
get visibleOptions(): CheckboxOption[] {
|
|
124
|
-
return this.options.filter(o => o.label != null && o.label !== '');
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
get requiredMarker(): string {
|
|
128
|
-
return this.labels?.requiredMarker || '*';
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
writeValue(value: any): void {
|
|
132
|
-
if (this.isGroup) {
|
|
133
|
-
this.value = Array.isArray(value) ? value : [];
|
|
134
|
-
this.options.forEach(opt => {
|
|
135
|
-
opt.checked = (this.value as any[]).includes(opt.value);
|
|
136
|
-
});
|
|
137
|
-
} else {
|
|
138
|
-
this.value = !!value;
|
|
139
|
-
this.checked = this.value as boolean;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
registerOnChange(fn: any): void {
|
|
144
|
-
this.onChange = fn;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
registerOnTouched(fn: any): void {
|
|
148
|
-
this.onTouched = fn;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
setDisabledState(isDisabled: boolean): void {
|
|
152
|
-
this.disabled = isDisabled;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
onCheckboxChange(event: any): void {
|
|
156
|
-
const checked = event.target.checked;
|
|
157
|
-
this.value = checked;
|
|
158
|
-
this.checked = checked;
|
|
159
|
-
this.onChange(this.value);
|
|
160
|
-
this.onTouched();
|
|
161
|
-
this.checkedChange.emit(this.value);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
onGroupCheckboxChange(option: CheckboxOption, event: any): void {
|
|
165
|
-
const checked = event.target.checked;
|
|
166
|
-
option.checked = checked;
|
|
167
|
-
|
|
168
|
-
const valueArray = this.value as any[];
|
|
169
|
-
if (checked) {
|
|
170
|
-
if (!valueArray.includes(option.value)) {
|
|
171
|
-
this.value = [...valueArray, option.value];
|
|
172
|
-
}
|
|
173
|
-
} else {
|
|
174
|
-
this.value = valueArray.filter(v => v !== option.value);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
this.onChange(this.value);
|
|
178
|
-
this.onTouched();
|
|
179
|
-
this.checkedChange.emit(this.value);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
private getStyleValue(value: string | undefined): string | undefined {
|
|
183
|
-
return value ? `${value}` : undefined;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
get wrapperStyles(): { [key: string]: string | undefined } {
|
|
187
|
-
return {
|
|
188
|
-
'--cc-checkbox-font-family': this.getStyleValue(this.fontFamily),
|
|
189
|
-
'--cc-checkbox-font-size': this.getStyleValue(this.fontSize),
|
|
190
|
-
'--cc-checkbox-font-weight': this.getStyleValue(this.fontWeight),
|
|
191
|
-
'--cc-checkbox-label-color': this.getStyleValue(this.labelColor),
|
|
192
|
-
'--cc-checkbox-size': this.getStyleValue(this.size),
|
|
193
|
-
'--cc-checkbox-checked-color': this.getStyleValue(this.checkedColor),
|
|
194
|
-
'--cc-checkbox-unchecked-color': this.getStyleValue(this.uncheckedColor),
|
|
195
|
-
'--cc-checkbox-disabled-color': this.getStyleValue(this.disabledColor),
|
|
196
|
-
'--cc-checkbox-error-color': this.getStyleValue(this.errorColor),
|
|
197
|
-
'--cc-checkbox-group-gap': this.getStyleValue(this.gap),
|
|
198
|
-
'--cc-checkbox-group-label-color': this.getStyleValue(this.groupLabelColor),
|
|
199
|
-
'--cc-checkbox-group-label-font-size': this.getStyleValue(this.groupLabelFontSize),
|
|
200
|
-
'--cc-checkbox-group-label-font-weight': this.getStyleValue(this.groupLabelFontWeight),
|
|
201
|
-
'--cc-checkbox-label-font-size': this.getStyleValue(this.labelFontSize),
|
|
202
|
-
'--cc-checkbox-label-font-weight': this.getStyleValue(this.labelFontWeight),
|
|
203
|
-
'--cc-checkbox-border-radius': this.getStyleValue(this.borderRadius)
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface CheckboxOption {
|
|
2
|
-
value: any;
|
|
3
|
-
label: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
checked?: boolean;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface CheckboxLabels {
|
|
9
|
-
label?: string;
|
|
10
|
-
requiredMarker?: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface CheckboxConfig {
|
|
14
|
-
label?: string;
|
|
15
|
-
checked?: boolean;
|
|
16
|
-
disabled?: boolean;
|
|
17
|
-
required?: boolean;
|
|
18
|
-
indeterminate?: boolean;
|
|
19
|
-
options?: CheckboxOption[];
|
|
20
|
-
labelPosition?: 'before' | 'after';
|
|
21
|
-
color?: 'primary' | 'accent' | 'warn';
|
|
22
|
-
borderRadius?: string;
|
|
23
|
-
size?: string;
|
|
24
|
-
checkedColor?: string;
|
|
25
|
-
uncheckedColor?: string;
|
|
26
|
-
groupLabelColor?: string;
|
|
27
|
-
groupLabelFontSize?: string;
|
|
28
|
-
groupLabelFontWeight?: string;
|
|
29
|
-
// Style props
|
|
30
|
-
labelFontSize?: string;
|
|
31
|
-
labelFontWeight?: string;
|
|
32
|
-
labelColor?: string;
|
|
33
|
-
gap?: string;
|
|
34
|
-
fontFamily?: string;
|
|
35
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<div class="cc-datepicker-wrapper" [ngStyle]="wrapperStyles">
|
|
2
|
-
<label *ngIf="label" class="cc-datepicker-label" [ngStyle]="labelStyles">
|
|
3
|
-
{{ label }}
|
|
4
|
-
<span *ngIf="required" class="cc-required">{{ requiredMarker }}</span>
|
|
5
|
-
</label>
|
|
6
|
-
|
|
7
|
-
<!-- Single Date Picker -->
|
|
8
|
-
<div *ngIf="!isRange" class="cc-datepicker-field" [class.focused]="focused" [class.disabled]="disabled"
|
|
9
|
-
[class.error]="errorMessage" [ngStyle]="fieldStyles">
|
|
10
|
-
|
|
11
|
-
<input type="date" class="cc-datepicker-input" #dateInput [value]="formattedValue" [disabled]="disabled"
|
|
12
|
-
[required]="required" [min]="formattedMin" [max]="formattedMax" [placeholder]="placeholder"
|
|
13
|
-
(input)="onDateInput($event)" (blur)="onBlur()" (focus)="onFocus()" (click)="dateInput.showPicker()" />
|
|
14
|
-
|
|
15
|
-
<span class="cc-datepicker-icon material-icons" (click)="dateInput.showPicker()">calendar_today</span>
|
|
16
|
-
</div>
|
|
17
|
-
|
|
18
|
-
<!-- Range Date Picker -->
|
|
19
|
-
<div *ngIf="isRange" class="cc-datepicker-range">
|
|
20
|
-
<!-- Start Date -->
|
|
21
|
-
<div class="cc-datepicker-subfield">
|
|
22
|
-
<label class="cc-datepicker-sublabel">{{ startDateLabel }}</label>
|
|
23
|
-
<div class="cc-datepicker-field" [class.disabled]="disabled" [ngStyle]="fieldStyles">
|
|
24
|
-
<input type="date" class="cc-datepicker-input" [value]="formattedStartDate" [disabled]="disabled"
|
|
25
|
-
[required]="required" [min]="formattedMin" [max]="formattedEndDate || formattedMax"
|
|
26
|
-
(input)="onRangeStartInput($event)" />
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
|
|
30
|
-
<!-- End Date -->
|
|
31
|
-
<div class="cc-datepicker-subfield">
|
|
32
|
-
<label class="cc-datepicker-sublabel">{{ endDateLabel }}</label>
|
|
33
|
-
<div class="cc-datepicker-field" [class.disabled]="disabled" [ngStyle]="fieldStyles">
|
|
34
|
-
<input type="date" class="cc-datepicker-input" [value]="formattedEndDate" [disabled]="disabled"
|
|
35
|
-
[required]="required" [min]="formattedStartDate || formattedMin" [max]="formattedMax"
|
|
36
|
-
(input)="onRangeEndInput($event)" />
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="cc-error-message" *ngIf="errorMessage">{{ errorMessage }}</div>
|
|
42
|
-
</div>
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
.cc-datepicker-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
gap: var(--cc-datepicker-label-gap, 0.5rem);
|
|
5
|
-
width: 100%;
|
|
6
|
-
font-family: var(--cc-datepicker-font-family, inherit);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.cc-datepicker-label {
|
|
10
|
-
font-size: var(--cc-datepicker-label-font-size, 0.875rem);
|
|
11
|
-
font-weight: var(--cc-datepicker-label-font-weight, 500);
|
|
12
|
-
color: var(--cc-datepicker-label-color, #202124);
|
|
13
|
-
margin: 0;
|
|
14
|
-
line-height: 1.4;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.cc-required {
|
|
18
|
-
color: var(--cc-datepicker-required-color, #D93025);
|
|
19
|
-
margin-left: 0.25rem;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.cc-datepicker-field {
|
|
23
|
-
display: flex;
|
|
24
|
-
align-items: center;
|
|
25
|
-
width: 100%;
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
background-color: var(--cc-datepicker-bg, #FEFEFE);
|
|
28
|
-
border: var(--cc-datepicker-border-width, 1px) solid var(--cc-datepicker-border-color, #BDC1C6);
|
|
29
|
-
border-radius: var(--cc-datepicker-border-radius, 0.4375rem);
|
|
30
|
-
padding: var(--cc-datepicker-padding, 0.5rem 0.75rem);
|
|
31
|
-
min-height: var(--cc-datepicker-height, 2.5rem);
|
|
32
|
-
transition: border-color 0.2s, box-shadow 0.2s;
|
|
33
|
-
position: relative;
|
|
34
|
-
|
|
35
|
-
&.focused {
|
|
36
|
-
border-color: var(--cc-datepicker-focus-border-color, #1A73E8);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&.error {
|
|
40
|
-
border-color: var(--cc-datepicker-error-color, #D93025);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.disabled {
|
|
44
|
-
background-color: var(--cc-datepicker-disabled-bg, #F1F3F4);
|
|
45
|
-
cursor: not-allowed;
|
|
46
|
-
|
|
47
|
-
.cc-datepicker-input {
|
|
48
|
-
cursor: not-allowed;
|
|
49
|
-
color: var(--cc-datepicker-disabled-color, #80868B);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.cc-datepicker-icon {
|
|
53
|
-
color: var(--cc-datepicker-disabled-color, #80868B);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.cc-datepicker-input {
|
|
59
|
-
flex: 1;
|
|
60
|
-
border: none;
|
|
61
|
-
background: transparent;
|
|
62
|
-
outline: none;
|
|
63
|
-
font-family: inherit;
|
|
64
|
-
font-size: var(--cc-datepicker-font-size, 0.875rem);
|
|
65
|
-
font-weight: var(--cc-datepicker-font-weight, 400);
|
|
66
|
-
color: var(--cc-datepicker-color, #202124);
|
|
67
|
-
padding: 0;
|
|
68
|
-
margin: 0;
|
|
69
|
-
width: 100%;
|
|
70
|
-
// Ensure text is visible
|
|
71
|
-
opacity: 1;
|
|
72
|
-
|
|
73
|
-
// Calendar icon override for native input
|
|
74
|
-
&::-webkit-calendar-picker-indicator {
|
|
75
|
-
opacity: 0; // Hide native icon so we can use custom one
|
|
76
|
-
position: absolute;
|
|
77
|
-
right: 0;
|
|
78
|
-
top: 0;
|
|
79
|
-
bottom: 0;
|
|
80
|
-
width: 2.5rem; // Match icon width roughly
|
|
81
|
-
height: 100%;
|
|
82
|
-
cursor: pointer;
|
|
83
|
-
z-index: 10; // Ensure it's on top of the custom icon
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.cc-datepicker-icon {
|
|
88
|
-
margin-left: 0.5rem;
|
|
89
|
-
color: var(--cc-datepicker-icon-color, #5F6368);
|
|
90
|
-
pointer-events: none; // Allow click through to input
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.cc-datepicker-range {
|
|
94
|
-
display: flex;
|
|
95
|
-
gap: 1rem;
|
|
96
|
-
align-items: flex-start;
|
|
97
|
-
|
|
98
|
-
.cc-datepicker-subfield {
|
|
99
|
-
flex: 1;
|
|
100
|
-
display: flex;
|
|
101
|
-
flex-direction: column;
|
|
102
|
-
gap: 0.25rem;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.cc-datepicker-sublabel {
|
|
106
|
-
font-size: 0.75rem;
|
|
107
|
-
color: #5F6368;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.cc-error-message {
|
|
112
|
-
font-size: 0.75rem;
|
|
113
|
-
color: var(--cc-datepicker-error-color, #D93025);
|
|
114
|
-
margin-top: 0.25rem;
|
|
115
|
-
}
|