commons-shared-web-ui 0.0.53 → 0.0.55
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/documentation/smart-form.md +236 -3
- package/documentation/time-picker.md +274 -0
- package/ng-package.json +3 -1
- package/package.json +1 -1
- package/src/lib/modules/form-components/form-components.module.ts +2 -1
- package/src/lib/modules/form-field-configuration/services/config-schema-tree.service.ts +13 -2
- package/src/lib/modules/side-nav/components/side-nav/side-nav.component.scss +1 -1
- package/src/lib/modules/smart-form/components/form-field/form-field.component.html +145 -11
- package/src/lib/modules/smart-form/components/form-field/form-field.component.scss +98 -0
- package/src/lib/modules/smart-form/components/form-field/form-field.component.ts +225 -1
- package/src/lib/modules/smart-form/components/form-section/form-section.component.scss +2 -2
- package/src/lib/modules/smart-form/components/smart-form/smart-form.component.scss +2 -2
- package/src/lib/modules/smart-form/models/form-schema.model.ts +44 -0
- package/src/lib/modules/smart-form/smart-form.module.ts +3 -1
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.html +37 -0
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.scss +102 -0
- package/src/lib/modules/time-picker/components/time-picker/time-picker.component.ts +178 -0
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.html +78 -0
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.scss +226 -0
- package/src/lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component.ts +595 -0
- package/src/lib/modules/time-picker/models/time-picker.models.ts +49 -0
- package/src/lib/modules/time-picker/time-picker.module.ts +23 -0
- package/src/lib/modules/time-picker/time-picker.theme.scss +87 -0
- package/src/lib/shared-ui.module.ts +5 -0
- package/src/lib/styles/global.scss +10 -0
- package/src/public-api.ts +6 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$default-timepicker-config: (
|
|
4
|
+
// Trigger field (mirrors datepicker defaults)
|
|
5
|
+
height: 2.5rem,
|
|
6
|
+
padding: 0.375rem 1rem,
|
|
7
|
+
label-gap: 0.5rem,
|
|
8
|
+
border-radius: 0.4375rem,
|
|
9
|
+
border-color: #BDC1C6,
|
|
10
|
+
border-width: 1px,
|
|
11
|
+
bg: #FEFEFE,
|
|
12
|
+
color: #202124,
|
|
13
|
+
placeholder-color: #80868B,
|
|
14
|
+
font-size: 0.875rem,
|
|
15
|
+
font-weight: 400,
|
|
16
|
+
font-family: inherit,
|
|
17
|
+
label-font-size: 0.875rem,
|
|
18
|
+
label-font-weight: 500,
|
|
19
|
+
label-color: #202124,
|
|
20
|
+
focus-border-color: #1A73E8,
|
|
21
|
+
error-color: #D93025,
|
|
22
|
+
disabled-bg: #F1F3F4,
|
|
23
|
+
disabled-color: #80868B,
|
|
24
|
+
required-color: #D93025,
|
|
25
|
+
icon-color: #5F6368,
|
|
26
|
+
|
|
27
|
+
// Wheel panel (popup) — greyscale/black is the default theme.
|
|
28
|
+
// Opt into a blue accent by passing these overrides to time-picker-theme():
|
|
29
|
+
// accent: #4D89EB, accent-light: rgba(77,137,235,0.08),
|
|
30
|
+
// accent-border: rgba(77,137,235,0.15), btn-confirm-bg: #4D89EB,
|
|
31
|
+
// btn-confirm-hover: #3b74d1
|
|
32
|
+
accent: #111827,
|
|
33
|
+
accent-light: rgba(0, 0, 0, 0.05),
|
|
34
|
+
accent-border: rgba(0, 0, 0, 0.08),
|
|
35
|
+
item-height: 36px,
|
|
36
|
+
item-font-size: 1rem,
|
|
37
|
+
text-muted: #9CA3AF,
|
|
38
|
+
text-primary: #111827,
|
|
39
|
+
wheels-border: transparent,
|
|
40
|
+
btn-confirm-bg: #111827,
|
|
41
|
+
btn-confirm-hover: #000000,
|
|
42
|
+
btn-cancel-bg: #F3F4F6,
|
|
43
|
+
btn-cancel-hover: #E5E7EB,
|
|
44
|
+
btn-cancel-border: #F3F4F6,
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
@mixin time-picker-theme($user-config: ()) {
|
|
48
|
+
$config: map.merge($default-timepicker-config, $user-config);
|
|
49
|
+
|
|
50
|
+
// Trigger field tokens
|
|
51
|
+
--cc-timepicker-height: #{map.get($config, height)};
|
|
52
|
+
--cc-timepicker-padding: #{map.get($config, padding)};
|
|
53
|
+
--cc-timepicker-label-gap: #{map.get($config, label-gap)};
|
|
54
|
+
--cc-timepicker-border-radius: #{map.get($config, border-radius)};
|
|
55
|
+
--cc-timepicker-border-color: #{map.get($config, border-color)};
|
|
56
|
+
--cc-timepicker-border-width: #{map.get($config, border-width)};
|
|
57
|
+
--cc-timepicker-bg: #{map.get($config, bg)};
|
|
58
|
+
--cc-timepicker-color: #{map.get($config, color)};
|
|
59
|
+
--cc-timepicker-placeholder-color: #{map.get($config, placeholder-color)};
|
|
60
|
+
--cc-timepicker-font-size: #{map.get($config, font-size)};
|
|
61
|
+
--cc-timepicker-font-weight: #{map.get($config, font-weight)};
|
|
62
|
+
--cc-timepicker-font-family: #{map.get($config, font-family)};
|
|
63
|
+
--cc-timepicker-label-font-size: #{map.get($config, label-font-size)};
|
|
64
|
+
--cc-timepicker-label-font-weight: #{map.get($config, label-font-weight)};
|
|
65
|
+
--cc-timepicker-label-color: #{map.get($config, label-color)};
|
|
66
|
+
--cc-timepicker-focus-border-color: #{map.get($config, focus-border-color)};
|
|
67
|
+
--cc-timepicker-error-color: #{map.get($config, error-color)};
|
|
68
|
+
--cc-timepicker-disabled-bg: #{map.get($config, disabled-bg)};
|
|
69
|
+
--cc-timepicker-disabled-color: #{map.get($config, disabled-color)};
|
|
70
|
+
--cc-timepicker-required-color: #{map.get($config, required-color)};
|
|
71
|
+
--cc-timepicker-icon-color: #{map.get($config, icon-color)};
|
|
72
|
+
|
|
73
|
+
// Wheel panel tokens
|
|
74
|
+
--cc-timepicker-accent: #{map.get($config, accent)};
|
|
75
|
+
--cc-timepicker-accent-light: #{map.get($config, accent-light)};
|
|
76
|
+
--cc-timepicker-accent-border: #{map.get($config, accent-border)};
|
|
77
|
+
--cc-timepicker-item-height: #{map.get($config, item-height)};
|
|
78
|
+
--cc-timepicker-item-font-size: #{map.get($config, item-font-size)};
|
|
79
|
+
--cc-timepicker-text-muted: #{map.get($config, text-muted)};
|
|
80
|
+
--cc-timepicker-text-primary: #{map.get($config, text-primary)};
|
|
81
|
+
--cc-timepicker-wheels-border: #{map.get($config, wheels-border)};
|
|
82
|
+
--cc-timepicker-btn-confirm-bg: #{map.get($config, btn-confirm-bg)};
|
|
83
|
+
--cc-timepicker-btn-confirm-hover: #{map.get($config, btn-confirm-hover)};
|
|
84
|
+
--cc-timepicker-btn-cancel-bg: #{map.get($config, btn-cancel-bg)};
|
|
85
|
+
--cc-timepicker-btn-cancel-hover: #{map.get($config, btn-cancel-hover)};
|
|
86
|
+
--cc-timepicker-btn-cancel-border: #{map.get($config, btn-cancel-border)};
|
|
87
|
+
}
|
|
@@ -16,6 +16,7 @@ import { FormBuilderModule } from './modules/form-builder/form-builder.module';
|
|
|
16
16
|
import { FormFieldConfigurationModule } from './modules/form-field-configuration/form-field-configuration.module';
|
|
17
17
|
import { TableColumnConfigurationModule } from './modules/table-column-configuration/table-column-configuration.module';
|
|
18
18
|
import { FilterTableSelectorModule } from './modules/filter-table-selector/filter-table-selector.module';
|
|
19
|
+
import { TimePickerModule } from './modules/time-picker/time-picker.module';
|
|
19
20
|
|
|
20
21
|
@NgModule({
|
|
21
22
|
declarations: [],
|
|
@@ -29,6 +30,8 @@ import { FilterTableSelectorModule } from './modules/filter-table-selector/filte
|
|
|
29
30
|
SmartFormModule,
|
|
30
31
|
SideNavModule,
|
|
31
32
|
FormBuilderModule,
|
|
33
|
+
FilterTableSelectorModule,
|
|
34
|
+
TimePickerModule,
|
|
32
35
|
FormFieldConfigurationModule,
|
|
33
36
|
TableColumnConfigurationModule,
|
|
34
37
|
FilterTableSelectorModule
|
|
@@ -42,6 +45,8 @@ import { FilterTableSelectorModule } from './modules/filter-table-selector/filte
|
|
|
42
45
|
SmartFormModule,
|
|
43
46
|
SideNavModule,
|
|
44
47
|
FormBuilderModule,
|
|
48
|
+
FilterTableSelectorModule,
|
|
49
|
+
TimePickerModule,
|
|
45
50
|
FormFieldConfigurationModule,
|
|
46
51
|
TableColumnConfigurationModule,
|
|
47
52
|
FilterTableSelectorModule
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
@use '../modules/side-nav/side-nav.theme' as sideNav;
|
|
2
2
|
@use '../modules/form-builder/form-builder.theme' as fb;
|
|
3
3
|
@use '../modules/filter-table-selector/filter-table-selector.theme' as fts;
|
|
4
|
+
@use '../modules/time-picker/time-picker.theme' as tp;
|
|
4
5
|
@import 'quill/dist/quill.snow.css';
|
|
5
6
|
@import './utilities.scss';
|
|
6
7
|
|
|
7
8
|
:root {
|
|
8
9
|
@include sideNav.side-nav-theme();
|
|
9
10
|
@include fb.form-builder-theme();
|
|
11
|
+
@include tp.time-picker-theme();
|
|
10
12
|
--cc-card-bg: #ffffff;
|
|
11
13
|
--cc-card-border-color: #e0e0e0;
|
|
12
14
|
--cc-card-border-radius: 8px;
|
|
@@ -85,6 +87,14 @@
|
|
|
85
87
|
--ms-btn-add-color: #3b82f6;
|
|
86
88
|
--ms-btn-add-hover: #2563eb;
|
|
87
89
|
|
|
90
|
+
/* Link List */
|
|
91
|
+
--cc-sf-link-item-bg: #ffffff;
|
|
92
|
+
--cc-sf-link-item-border: #e8eaed;
|
|
93
|
+
--cc-sf-link-item-text: #111827;
|
|
94
|
+
--cc-sf-link-delete-color: #ef4444;
|
|
95
|
+
--cc-sf-link-edit-color: #4b5563;
|
|
96
|
+
--cc-sf-link-save-color: #16a34a;
|
|
97
|
+
|
|
88
98
|
@include sideNav.side-nav-theme();
|
|
89
99
|
}
|
|
90
100
|
|
package/src/public-api.ts
CHANGED
|
@@ -63,6 +63,7 @@ export * from './lib/modules/filter/filter.module';
|
|
|
63
63
|
export * from './lib/modules/filter/filter.models';
|
|
64
64
|
export * from './lib/modules/filter/components/filter/filter.component';
|
|
65
65
|
export * from './lib/modules/form-components/form-components.module';
|
|
66
|
+
export * from './lib/modules/form-components/directives/click-outside.directive';
|
|
66
67
|
export * from './lib/modules/form-components/components/input/input.component';
|
|
67
68
|
export * from './lib/modules/form-components/components/input/input.models';
|
|
68
69
|
export * from './lib/modules/form-components/components/dropdown/dropdown.component';
|
|
@@ -77,6 +78,11 @@ export * from './lib/modules/form-components/components/datepicker/datepicker.co
|
|
|
77
78
|
export * from './lib/modules/form-components/components/datepicker/datepicker.models';
|
|
78
79
|
export * from './lib/modules/form-components/components/search/search.component';
|
|
79
80
|
export * from './lib/modules/form-components/components/search/search.models';
|
|
81
|
+
|
|
82
|
+
export * from './lib/modules/time-picker/time-picker.module';
|
|
83
|
+
export * from './lib/modules/time-picker/components/time-picker/time-picker.component';
|
|
84
|
+
export * from './lib/modules/time-picker/components/time-wheel-panel/time-wheel-panel.component';
|
|
85
|
+
export * from './lib/modules/time-picker/models/time-picker.models';
|
|
80
86
|
export * from './lib/modules/smart-table/smart-table.module';
|
|
81
87
|
export * from './lib/modules/smart-table/components/smart-table/smart-table.component';
|
|
82
88
|
export * from './lib/modules/smart-table/models/table-config.model';
|