commons-shared-web-ui 0.0.44 → 0.0.46
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 +1482 -1338
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +48 -0
- package/package.json +1 -1
- package/src/lib/modules/alert/alert.theme.scss +84 -84
- package/src/lib/modules/button/button.theme.scss +120 -120
- package/src/lib/modules/configurable-form/configurable-form.theme.scss +77 -77
- package/src/lib/modules/confirmation-modal/confirmation-modal.theme.scss +86 -86
- package/src/lib/modules/filter/filter.theme.scss +91 -91
- package/src/lib/modules/filter-sidebar/filter-sidebar.theme.scss +37 -37
- package/src/lib/modules/filter-table-selector/filter-table-selector.theme.scss +36 -36
- package/src/lib/modules/form-builder/form-builder.theme.scss +212 -212
- package/src/lib/modules/form-components/components/checkbox/_theme.scss +62 -62
- package/src/lib/modules/form-components/components/datepicker/_theme.scss +81 -81
- package/src/lib/modules/form-components/components/dropdown/_theme.scss +90 -90
- package/src/lib/modules/form-components/components/input/_theme.scss +76 -76
- package/src/lib/modules/form-components/components/radio/_theme.scss +60 -60
- package/src/lib/modules/form-components/components/search/_theme.scss +72 -72
- package/src/lib/modules/form-components/components/toggle/_theme.scss +44 -44
- package/src/lib/modules/form-components/form-components.theme.scss +24 -24
- package/src/lib/modules/nav/nav.theme.scss +86 -86
- package/src/lib/modules/pagination/pagination.theme.scss +66 -66
- package/src/lib/modules/side-nav/side-nav.theme.scss +111 -111
- package/src/lib/modules/smart-form/smart-form.theme.scss +889 -889
- package/src/lib/modules/smart-table/smart-table.theme.scss +335 -335
- package/src/lib/modules/snackbar/snackbar.theme.scss +93 -93
- package/src/lib/modules/summary-card/summary-card.theme.scss +175 -175
- package/src/lib/styles/global.scss +151 -151
- package/src/lib/styles/utilities.scss +250 -250
package/index.d.ts
CHANGED
|
@@ -360,6 +360,22 @@ interface TimeConfig {
|
|
|
360
360
|
*/
|
|
361
361
|
minTimeField?: string;
|
|
362
362
|
}
|
|
363
|
+
/**
|
|
364
|
+
* Configuration for enabling search functionality inside DROPDOWN fields.
|
|
365
|
+
* Supports both client-side (local) and server-side (remote GET) filtering.
|
|
366
|
+
*/
|
|
367
|
+
interface DropdownSearchConfig {
|
|
368
|
+
/** Whether to display a search input inside the dropdown panel. */
|
|
369
|
+
enabled: boolean;
|
|
370
|
+
/** Filtering mode. 'local' filters client-side (default). 'server' queries the API on typing via GET. */
|
|
371
|
+
mode?: 'local' | 'server';
|
|
372
|
+
/** Query parameter key for the search term sent to the API (default: 'search'). Only used in 'server' mode. */
|
|
373
|
+
searchKey?: string;
|
|
374
|
+
/** Minimum characters required before triggering a server-side search (default: 3). Only used in 'server' mode. */
|
|
375
|
+
minSearchLength?: number;
|
|
376
|
+
/** Debounce delay in milliseconds before firing search (default: 300). */
|
|
377
|
+
debounceTime?: number;
|
|
378
|
+
}
|
|
363
379
|
interface OptionConfig$1 {
|
|
364
380
|
optionClass?: string;
|
|
365
381
|
optionUrl?: string;
|
|
@@ -375,6 +391,10 @@ interface OptionConfig$1 {
|
|
|
375
391
|
sortDirection?: 'ASC' | 'DESC';
|
|
376
392
|
layout?: 'row' | 'column';
|
|
377
393
|
optionList?: OptionItem[];
|
|
394
|
+
/** Configuration for enabling search functionality inside the dropdown panel. */
|
|
395
|
+
searchConfig?: DropdownSearchConfig;
|
|
396
|
+
/** When true, renders a 'Select All' checkbox at the top of a MULTIPLE select dropdown. */
|
|
397
|
+
showSelectAll?: boolean;
|
|
378
398
|
}
|
|
379
399
|
interface AutocompleteDisplayField {
|
|
380
400
|
/** Dot-notation path to the value in the API response item (e.g. 'login', 'contact.phone'). */
|
|
@@ -1494,6 +1514,10 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1494
1514
|
/** Effective maximum time for the time input (explicit maxTime only). */
|
|
1495
1515
|
get effectiveMaxTime(): string | null;
|
|
1496
1516
|
isMultiDropdownOpen: boolean;
|
|
1517
|
+
isSingleDropdownOpen: boolean;
|
|
1518
|
+
searchText: string;
|
|
1519
|
+
filteredOptionList: any[];
|
|
1520
|
+
dropdownSearch$: Subject<string>;
|
|
1497
1521
|
isDragOver: boolean;
|
|
1498
1522
|
fileUploadError: string;
|
|
1499
1523
|
multiSaveError: string;
|
|
@@ -1585,6 +1609,16 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1585
1609
|
get expandLessLabel(): string;
|
|
1586
1610
|
/** Getter for expand more icon name */
|
|
1587
1611
|
get expandMoreLabel(): string;
|
|
1612
|
+
/** Getter for dropdown search placeholder label */
|
|
1613
|
+
get searchPlaceholderLabel(): string;
|
|
1614
|
+
/** Getter for Select All label */
|
|
1615
|
+
get selectAllLabel(): string;
|
|
1616
|
+
/** Getter for No matching options label */
|
|
1617
|
+
get noMatchingOptionsLabel(): string;
|
|
1618
|
+
/** Returns the label of the currently selected option for single-select custom dropdowns */
|
|
1619
|
+
get singleSelectedLabel(): string;
|
|
1620
|
+
/** Whether the dropdown search feature is enabled for this field */
|
|
1621
|
+
get isSearchableDropdown(): boolean;
|
|
1588
1622
|
private initGroupField;
|
|
1589
1623
|
/**
|
|
1590
1624
|
* Sets up cross-field validation based on the `onValidate` formula.
|
|
@@ -1660,9 +1694,23 @@ declare class FormFieldComponent implements OnInit, OnDestroy {
|
|
|
1660
1694
|
get showCharCount(): boolean;
|
|
1661
1695
|
get remainingCharacters(): number | null;
|
|
1662
1696
|
toggleMultiDropdown(event: MouseEvent): void;
|
|
1697
|
+
toggleSingleDropdown(event: MouseEvent): void;
|
|
1698
|
+
selectSingleOption(option: any): void;
|
|
1663
1699
|
onDocumentClick(): void;
|
|
1664
1700
|
onEscapeKey(): void;
|
|
1665
1701
|
get multiSelectedCount(): number;
|
|
1702
|
+
/** Initialise the RxJS search stream for dropdown filtering. */
|
|
1703
|
+
private initDropdownSearch;
|
|
1704
|
+
/** Execute client-side or server-side dropdown search. */
|
|
1705
|
+
private executeDropdownSearch;
|
|
1706
|
+
/** Resets the dropdown search text and filtered list. */
|
|
1707
|
+
resetDropdownSearch(): void;
|
|
1708
|
+
/** Returns true if every option in the current filtered list is selected. */
|
|
1709
|
+
isAllSelected(): boolean;
|
|
1710
|
+
/** Returns true if some (but not all) filtered options are selected — for indeterminate state. */
|
|
1711
|
+
isSomeSelected(): boolean;
|
|
1712
|
+
/** Toggles selection of all filtered options. */
|
|
1713
|
+
toggleSelectAll(checked: boolean): void;
|
|
1666
1714
|
get isTextField(): boolean;
|
|
1667
1715
|
get isNumberField(): boolean;
|
|
1668
1716
|
get isDateField(): boolean;
|
package/package.json
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
$default-alert-config: (
|
|
4
|
-
font-family: ('Roboto', sans-serif),
|
|
5
|
-
|
|
6
|
-
// Structure (Default values in rem, assuming 16px root)
|
|
7
|
-
padding: 1rem 2rem,
|
|
8
|
-
// 16px 32px
|
|
9
|
-
radius: 0.75rem,
|
|
10
|
-
// 12px
|
|
11
|
-
gap: 1rem,
|
|
12
|
-
// 16px
|
|
13
|
-
|
|
14
|
-
// Icon
|
|
15
|
-
icon-size: 1.25rem,
|
|
16
|
-
// 20px
|
|
17
|
-
icon-margin-top: 0.125rem,
|
|
18
|
-
// 2px
|
|
19
|
-
|
|
20
|
-
// Text
|
|
21
|
-
title-size: 1rem,
|
|
22
|
-
// 16px
|
|
23
|
-
title-line-height: 1.5rem,
|
|
24
|
-
// 24px
|
|
25
|
-
message-size: 0.875rem,
|
|
26
|
-
// 14px
|
|
27
|
-
|
|
28
|
-
// Info
|
|
29
|
-
info-bg: #F1F3F4,
|
|
30
|
-
info-color: #3C4043,
|
|
31
|
-
|
|
32
|
-
// Warning
|
|
33
|
-
warning-bg: #F9C80E1F,
|
|
34
|
-
warning-color: #3C4043,
|
|
35
|
-
// Default text color for warning usually dark
|
|
36
|
-
warning-title-color: #3C4043,
|
|
37
|
-
// Making title dark for better contrast with light yellow bg
|
|
38
|
-
warning-shadow: none,
|
|
39
|
-
// Removing shadow as per clean flat design, or keeping if specified. User said "warning-shadow" variant exists.
|
|
40
|
-
|
|
41
|
-
// Success
|
|
42
|
-
success-bg: #E6F4EA,
|
|
43
|
-
// Light green similar to Info/Error pattern
|
|
44
|
-
success-color: #16A34A,
|
|
45
|
-
|
|
46
|
-
// Error
|
|
47
|
-
error-bg: #FCE8E6,
|
|
48
|
-
// Light red
|
|
49
|
-
error-color: #D93025
|
|
50
|
-
);
|
|
51
|
-
|
|
52
|
-
@mixin alert-theme($user-config: ()) {
|
|
53
|
-
$config: map.merge($default-alert-config, $user-config);
|
|
54
|
-
|
|
55
|
-
--cc-alert-font-family: #{map.get($config, font-family)};
|
|
56
|
-
|
|
57
|
-
// Structure
|
|
58
|
-
--cc-alert-padding: #{map.get($config, padding)};
|
|
59
|
-
--cc-alert-radius: #{map.get($config, radius)};
|
|
60
|
-
--cc-alert-gap: #{map.get($config, gap)};
|
|
61
|
-
|
|
62
|
-
// Icon
|
|
63
|
-
--cc-alert-icon-size: #{map.get($config, icon-size)};
|
|
64
|
-
--cc-alert-icon-margin-top: #{map.get($config, icon-margin-top)};
|
|
65
|
-
|
|
66
|
-
// Text
|
|
67
|
-
--cc-alert-title-size: #{map.get($config, title-size)};
|
|
68
|
-
--cc-alert-title-line-height: #{map.get($config, title-line-height)};
|
|
69
|
-
--cc-alert-message-size: #{map.get($config, message-size)};
|
|
70
|
-
|
|
71
|
-
// Colors
|
|
72
|
-
--cc-alert-info-bg: #{map.get($config, info-bg)};
|
|
73
|
-
--cc-alert-info-color: #{map.get($config, info-color)};
|
|
74
|
-
|
|
75
|
-
--cc-alert-warning-bg: #{map.get($config, warning-bg)};
|
|
76
|
-
--cc-alert-warning-color: #{map.get($config, warning-color)};
|
|
77
|
-
--cc-alert-warning-title-color: #{map.get($config, warning-title-color)};
|
|
78
|
-
--cc-alert-warning-shadow: #{map.get($config, warning-shadow)};
|
|
79
|
-
--cc-alert-success-bg: #{map.get($config, success-bg)};
|
|
80
|
-
--cc-alert-success-color: #{map.get($config, success-color)};
|
|
81
|
-
|
|
82
|
-
--cc-alert-error-bg: #{map.get($config, error-bg)};
|
|
83
|
-
--cc-alert-error-color: #{map.get($config, error-color)};
|
|
84
|
-
--cc-alert-warning-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.25); // 0px 4px 4px
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
$default-alert-config: (
|
|
4
|
+
font-family: ('Roboto', sans-serif),
|
|
5
|
+
|
|
6
|
+
// Structure (Default values in rem, assuming 16px root)
|
|
7
|
+
padding: 1rem 2rem,
|
|
8
|
+
// 16px 32px
|
|
9
|
+
radius: 0.75rem,
|
|
10
|
+
// 12px
|
|
11
|
+
gap: 1rem,
|
|
12
|
+
// 16px
|
|
13
|
+
|
|
14
|
+
// Icon
|
|
15
|
+
icon-size: 1.25rem,
|
|
16
|
+
// 20px
|
|
17
|
+
icon-margin-top: 0.125rem,
|
|
18
|
+
// 2px
|
|
19
|
+
|
|
20
|
+
// Text
|
|
21
|
+
title-size: 1rem,
|
|
22
|
+
// 16px
|
|
23
|
+
title-line-height: 1.5rem,
|
|
24
|
+
// 24px
|
|
25
|
+
message-size: 0.875rem,
|
|
26
|
+
// 14px
|
|
27
|
+
|
|
28
|
+
// Info
|
|
29
|
+
info-bg: #F1F3F4,
|
|
30
|
+
info-color: #3C4043,
|
|
31
|
+
|
|
32
|
+
// Warning
|
|
33
|
+
warning-bg: #F9C80E1F,
|
|
34
|
+
warning-color: #3C4043,
|
|
35
|
+
// Default text color for warning usually dark
|
|
36
|
+
warning-title-color: #3C4043,
|
|
37
|
+
// Making title dark for better contrast with light yellow bg
|
|
38
|
+
warning-shadow: none,
|
|
39
|
+
// Removing shadow as per clean flat design, or keeping if specified. User said "warning-shadow" variant exists.
|
|
40
|
+
|
|
41
|
+
// Success
|
|
42
|
+
success-bg: #E6F4EA,
|
|
43
|
+
// Light green similar to Info/Error pattern
|
|
44
|
+
success-color: #16A34A,
|
|
45
|
+
|
|
46
|
+
// Error
|
|
47
|
+
error-bg: #FCE8E6,
|
|
48
|
+
// Light red
|
|
49
|
+
error-color: #D93025
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
@mixin alert-theme($user-config: ()) {
|
|
53
|
+
$config: map.merge($default-alert-config, $user-config);
|
|
54
|
+
|
|
55
|
+
--cc-alert-font-family: #{map.get($config, font-family)};
|
|
56
|
+
|
|
57
|
+
// Structure
|
|
58
|
+
--cc-alert-padding: #{map.get($config, padding)};
|
|
59
|
+
--cc-alert-radius: #{map.get($config, radius)};
|
|
60
|
+
--cc-alert-gap: #{map.get($config, gap)};
|
|
61
|
+
|
|
62
|
+
// Icon
|
|
63
|
+
--cc-alert-icon-size: #{map.get($config, icon-size)};
|
|
64
|
+
--cc-alert-icon-margin-top: #{map.get($config, icon-margin-top)};
|
|
65
|
+
|
|
66
|
+
// Text
|
|
67
|
+
--cc-alert-title-size: #{map.get($config, title-size)};
|
|
68
|
+
--cc-alert-title-line-height: #{map.get($config, title-line-height)};
|
|
69
|
+
--cc-alert-message-size: #{map.get($config, message-size)};
|
|
70
|
+
|
|
71
|
+
// Colors
|
|
72
|
+
--cc-alert-info-bg: #{map.get($config, info-bg)};
|
|
73
|
+
--cc-alert-info-color: #{map.get($config, info-color)};
|
|
74
|
+
|
|
75
|
+
--cc-alert-warning-bg: #{map.get($config, warning-bg)};
|
|
76
|
+
--cc-alert-warning-color: #{map.get($config, warning-color)};
|
|
77
|
+
--cc-alert-warning-title-color: #{map.get($config, warning-title-color)};
|
|
78
|
+
--cc-alert-warning-shadow: #{map.get($config, warning-shadow)};
|
|
79
|
+
--cc-alert-success-bg: #{map.get($config, success-bg)};
|
|
80
|
+
--cc-alert-success-color: #{map.get($config, success-color)};
|
|
81
|
+
|
|
82
|
+
--cc-alert-error-bg: #{map.get($config, error-bg)};
|
|
83
|
+
--cc-alert-error-color: #{map.get($config, error-color)};
|
|
84
|
+
--cc-alert-warning-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.25); // 0px 4px 4px
|
|
85
85
|
}
|
|
@@ -1,121 +1,121 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
// Default Button Configuration
|
|
4
|
-
$default-button-config: (
|
|
5
|
-
// Common
|
|
6
|
-
font-family: ('Roboto', sans-serif),
|
|
7
|
-
font-weight: 500,
|
|
8
|
-
font-size: 1rem,
|
|
9
|
-
// 16px
|
|
10
|
-
padding: 0.5rem 1rem,
|
|
11
|
-
// 8px 16px
|
|
12
|
-
|
|
13
|
-
// Primary (Dark)
|
|
14
|
-
primary-bg: #262125,
|
|
15
|
-
primary-color: #FFFFFF,
|
|
16
|
-
primary-radius: 0.5rem,
|
|
17
|
-
// 8px
|
|
18
|
-
primary-border: none,
|
|
19
|
-
|
|
20
|
-
// Warning (Yellow)
|
|
21
|
-
warning-bg: #F9C80E,
|
|
22
|
-
warning-color: #000000,
|
|
23
|
-
warning-radius: 0.25rem,
|
|
24
|
-
// 4px
|
|
25
|
-
warning-border: none,
|
|
26
|
-
|
|
27
|
-
// Outline (Grey Outline)
|
|
28
|
-
outline-bg: transparent,
|
|
29
|
-
outline-color: #000000,
|
|
30
|
-
outline-radius: 0.25rem,
|
|
31
|
-
// 4px
|
|
32
|
-
outline-border: 0.0625rem solid #BDC1C6,
|
|
33
|
-
// 1px solid
|
|
34
|
-
|
|
35
|
-
// Secondary (Light Grey)
|
|
36
|
-
secondary-bg: #E8EAED,
|
|
37
|
-
secondary-color: #000000,
|
|
38
|
-
secondary-radius: 0.25rem,
|
|
39
|
-
// 4px
|
|
40
|
-
secondary-border: none,
|
|
41
|
-
|
|
42
|
-
// Success (Green)
|
|
43
|
-
success-bg: #16A34A,
|
|
44
|
-
success-color: #FFFFFF,
|
|
45
|
-
success-radius: 0.5rem,
|
|
46
|
-
// 8px
|
|
47
|
-
success-border: none,
|
|
48
|
-
|
|
49
|
-
// Danger (Red)
|
|
50
|
-
danger-bg: #E63E30,
|
|
51
|
-
danger-color: #FFFFFF,
|
|
52
|
-
danger-radius: 0.25rem,
|
|
53
|
-
// 4px
|
|
54
|
-
danger-border: none,
|
|
55
|
-
|
|
56
|
-
// Danger Outline (Red Outline)
|
|
57
|
-
danger-outline-bg: transparent,
|
|
58
|
-
danger-outline-color: #E63E30,
|
|
59
|
-
danger-outline-radius: 0.5rem,
|
|
60
|
-
// 8px
|
|
61
|
-
danger-outline-border: 0.0625rem solid #E63E30,
|
|
62
|
-
// 1px solid
|
|
63
|
-
|
|
64
|
-
// Disabled State
|
|
65
|
-
disabled-opacity: 0.6,
|
|
66
|
-
disabled-cursor: not-allowed
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
@mixin button-theme($user-config: ()) {
|
|
70
|
-
$config: map.merge($default-button-config, $user-config);
|
|
71
|
-
|
|
72
|
-
// Common
|
|
73
|
-
--cc-btn-font-family: #{map.get($config, font-family)};
|
|
74
|
-
--cc-btn-font-weight: #{map.get($config, font-weight)};
|
|
75
|
-
--cc-btn-font-size: #{map.get($config, font-size)};
|
|
76
|
-
--cc-btn-padding: #{map.get($config, padding)};
|
|
77
|
-
--cc-btn-disabled-opacity: #{map.get($config, disabled-opacity)};
|
|
78
|
-
--cc-btn-disabled-cursor: #{map.get($config, disabled-cursor)};
|
|
79
|
-
|
|
80
|
-
// Primary
|
|
81
|
-
--cc-btn-primary-bg: #{map.get($config, primary-bg)};
|
|
82
|
-
--cc-btn-primary-color: #{map.get($config, primary-color)};
|
|
83
|
-
--cc-btn-primary-radius: #{map.get($config, primary-radius)};
|
|
84
|
-
--cc-btn-primary-border: #{map.get($config, primary-border)};
|
|
85
|
-
|
|
86
|
-
// Warning
|
|
87
|
-
--cc-btn-warning-bg: #{map.get($config, warning-bg)};
|
|
88
|
-
--cc-btn-warning-color: #{map.get($config, warning-color)};
|
|
89
|
-
--cc-btn-warning-radius: #{map.get($config, warning-radius)};
|
|
90
|
-
--cc-btn-warning-border: #{map.get($config, warning-border)};
|
|
91
|
-
|
|
92
|
-
// Outline
|
|
93
|
-
--cc-btn-outline-bg: #{map.get($config, outline-bg)};
|
|
94
|
-
--cc-btn-outline-color: #{map.get($config, outline-color)};
|
|
95
|
-
--cc-btn-outline-radius: #{map.get($config, outline-radius)};
|
|
96
|
-
--cc-btn-outline-border: #{map.get($config, outline-border)};
|
|
97
|
-
|
|
98
|
-
// Secondary
|
|
99
|
-
--cc-btn-secondary-bg: #{map.get($config, secondary-bg)};
|
|
100
|
-
--cc-btn-secondary-color: #{map.get($config, secondary-color)};
|
|
101
|
-
--cc-btn-secondary-radius: #{map.get($config, secondary-radius)};
|
|
102
|
-
--cc-btn-secondary-border: #{map.get($config, secondary-border)};
|
|
103
|
-
|
|
104
|
-
// Success
|
|
105
|
-
--cc-btn-success-bg: #{map.get($config, success-bg)};
|
|
106
|
-
--cc-btn-success-color: #{map.get($config, success-color)};
|
|
107
|
-
--cc-btn-success-radius: #{map.get($config, success-radius)};
|
|
108
|
-
--cc-btn-success-border: #{map.get($config, success-border)};
|
|
109
|
-
|
|
110
|
-
// Danger
|
|
111
|
-
--cc-btn-danger-bg: #{map.get($config, danger-bg)};
|
|
112
|
-
--cc-btn-danger-color: #{map.get($config, danger-color)};
|
|
113
|
-
--cc-btn-danger-radius: #{map.get($config, danger-radius)};
|
|
114
|
-
--cc-btn-danger-border: #{map.get($config, danger-border)};
|
|
115
|
-
|
|
116
|
-
// Danger Outline
|
|
117
|
-
--cc-btn-danger-outline-bg: #{map.get($config, danger-outline-bg)};
|
|
118
|
-
--cc-btn-danger-outline-color: #{map.get($config, danger-outline-color)};
|
|
119
|
-
--cc-btn-danger-outline-radius: #{map.get($config, danger-outline-radius)};
|
|
120
|
-
--cc-btn-danger-outline-border: #{map.get($config, danger-outline-border)};
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
// Default Button Configuration
|
|
4
|
+
$default-button-config: (
|
|
5
|
+
// Common
|
|
6
|
+
font-family: ('Roboto', sans-serif),
|
|
7
|
+
font-weight: 500,
|
|
8
|
+
font-size: 1rem,
|
|
9
|
+
// 16px
|
|
10
|
+
padding: 0.5rem 1rem,
|
|
11
|
+
// 8px 16px
|
|
12
|
+
|
|
13
|
+
// Primary (Dark)
|
|
14
|
+
primary-bg: #262125,
|
|
15
|
+
primary-color: #FFFFFF,
|
|
16
|
+
primary-radius: 0.5rem,
|
|
17
|
+
// 8px
|
|
18
|
+
primary-border: none,
|
|
19
|
+
|
|
20
|
+
// Warning (Yellow)
|
|
21
|
+
warning-bg: #F9C80E,
|
|
22
|
+
warning-color: #000000,
|
|
23
|
+
warning-radius: 0.25rem,
|
|
24
|
+
// 4px
|
|
25
|
+
warning-border: none,
|
|
26
|
+
|
|
27
|
+
// Outline (Grey Outline)
|
|
28
|
+
outline-bg: transparent,
|
|
29
|
+
outline-color: #000000,
|
|
30
|
+
outline-radius: 0.25rem,
|
|
31
|
+
// 4px
|
|
32
|
+
outline-border: 0.0625rem solid #BDC1C6,
|
|
33
|
+
// 1px solid
|
|
34
|
+
|
|
35
|
+
// Secondary (Light Grey)
|
|
36
|
+
secondary-bg: #E8EAED,
|
|
37
|
+
secondary-color: #000000,
|
|
38
|
+
secondary-radius: 0.25rem,
|
|
39
|
+
// 4px
|
|
40
|
+
secondary-border: none,
|
|
41
|
+
|
|
42
|
+
// Success (Green)
|
|
43
|
+
success-bg: #16A34A,
|
|
44
|
+
success-color: #FFFFFF,
|
|
45
|
+
success-radius: 0.5rem,
|
|
46
|
+
// 8px
|
|
47
|
+
success-border: none,
|
|
48
|
+
|
|
49
|
+
// Danger (Red)
|
|
50
|
+
danger-bg: #E63E30,
|
|
51
|
+
danger-color: #FFFFFF,
|
|
52
|
+
danger-radius: 0.25rem,
|
|
53
|
+
// 4px
|
|
54
|
+
danger-border: none,
|
|
55
|
+
|
|
56
|
+
// Danger Outline (Red Outline)
|
|
57
|
+
danger-outline-bg: transparent,
|
|
58
|
+
danger-outline-color: #E63E30,
|
|
59
|
+
danger-outline-radius: 0.5rem,
|
|
60
|
+
// 8px
|
|
61
|
+
danger-outline-border: 0.0625rem solid #E63E30,
|
|
62
|
+
// 1px solid
|
|
63
|
+
|
|
64
|
+
// Disabled State
|
|
65
|
+
disabled-opacity: 0.6,
|
|
66
|
+
disabled-cursor: not-allowed
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
@mixin button-theme($user-config: ()) {
|
|
70
|
+
$config: map.merge($default-button-config, $user-config);
|
|
71
|
+
|
|
72
|
+
// Common
|
|
73
|
+
--cc-btn-font-family: #{map.get($config, font-family)};
|
|
74
|
+
--cc-btn-font-weight: #{map.get($config, font-weight)};
|
|
75
|
+
--cc-btn-font-size: #{map.get($config, font-size)};
|
|
76
|
+
--cc-btn-padding: #{map.get($config, padding)};
|
|
77
|
+
--cc-btn-disabled-opacity: #{map.get($config, disabled-opacity)};
|
|
78
|
+
--cc-btn-disabled-cursor: #{map.get($config, disabled-cursor)};
|
|
79
|
+
|
|
80
|
+
// Primary
|
|
81
|
+
--cc-btn-primary-bg: #{map.get($config, primary-bg)};
|
|
82
|
+
--cc-btn-primary-color: #{map.get($config, primary-color)};
|
|
83
|
+
--cc-btn-primary-radius: #{map.get($config, primary-radius)};
|
|
84
|
+
--cc-btn-primary-border: #{map.get($config, primary-border)};
|
|
85
|
+
|
|
86
|
+
// Warning
|
|
87
|
+
--cc-btn-warning-bg: #{map.get($config, warning-bg)};
|
|
88
|
+
--cc-btn-warning-color: #{map.get($config, warning-color)};
|
|
89
|
+
--cc-btn-warning-radius: #{map.get($config, warning-radius)};
|
|
90
|
+
--cc-btn-warning-border: #{map.get($config, warning-border)};
|
|
91
|
+
|
|
92
|
+
// Outline
|
|
93
|
+
--cc-btn-outline-bg: #{map.get($config, outline-bg)};
|
|
94
|
+
--cc-btn-outline-color: #{map.get($config, outline-color)};
|
|
95
|
+
--cc-btn-outline-radius: #{map.get($config, outline-radius)};
|
|
96
|
+
--cc-btn-outline-border: #{map.get($config, outline-border)};
|
|
97
|
+
|
|
98
|
+
// Secondary
|
|
99
|
+
--cc-btn-secondary-bg: #{map.get($config, secondary-bg)};
|
|
100
|
+
--cc-btn-secondary-color: #{map.get($config, secondary-color)};
|
|
101
|
+
--cc-btn-secondary-radius: #{map.get($config, secondary-radius)};
|
|
102
|
+
--cc-btn-secondary-border: #{map.get($config, secondary-border)};
|
|
103
|
+
|
|
104
|
+
// Success
|
|
105
|
+
--cc-btn-success-bg: #{map.get($config, success-bg)};
|
|
106
|
+
--cc-btn-success-color: #{map.get($config, success-color)};
|
|
107
|
+
--cc-btn-success-radius: #{map.get($config, success-radius)};
|
|
108
|
+
--cc-btn-success-border: #{map.get($config, success-border)};
|
|
109
|
+
|
|
110
|
+
// Danger
|
|
111
|
+
--cc-btn-danger-bg: #{map.get($config, danger-bg)};
|
|
112
|
+
--cc-btn-danger-color: #{map.get($config, danger-color)};
|
|
113
|
+
--cc-btn-danger-radius: #{map.get($config, danger-radius)};
|
|
114
|
+
--cc-btn-danger-border: #{map.get($config, danger-border)};
|
|
115
|
+
|
|
116
|
+
// Danger Outline
|
|
117
|
+
--cc-btn-danger-outline-bg: #{map.get($config, danger-outline-bg)};
|
|
118
|
+
--cc-btn-danger-outline-color: #{map.get($config, danger-outline-color)};
|
|
119
|
+
--cc-btn-danger-outline-radius: #{map.get($config, danger-outline-radius)};
|
|
120
|
+
--cc-btn-danger-outline-border: #{map.get($config, danger-outline-border)};
|
|
121
121
|
}
|
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
|
|
3
|
-
// Default configuration for the configurable form theme
|
|
4
|
-
$default-configurable-form-config: (
|
|
5
|
-
// Colors
|
|
6
|
-
primary-color: #3B82F6,
|
|
7
|
-
surface-background: #ffffff,
|
|
8
|
-
border-color: #D1D5DB,
|
|
9
|
-
text-primary: #111827,
|
|
10
|
-
text-secondary: #6B7280,
|
|
11
|
-
error-color: #DC2626,
|
|
12
|
-
disabled-background: #F3F4F6,
|
|
13
|
-
hover-background: #F9FAFB,
|
|
14
|
-
|
|
15
|
-
// Inputs specific
|
|
16
|
-
input-border-color: #D1D5DB,
|
|
17
|
-
input-focus-border-color: #3B82F6,
|
|
18
|
-
input-hover-border-color: #9CA3AF,
|
|
19
|
-
input-bg: #ffffff,
|
|
20
|
-
|
|
21
|
-
// Dimensions
|
|
22
|
-
section-radius: 12px,
|
|
23
|
-
section-padding: 2rem,
|
|
24
|
-
section-spacing: 1.5rem,
|
|
25
|
-
input-radius: 8px,
|
|
26
|
-
input-padding-y: 0.625rem,
|
|
27
|
-
input-padding-x: 0.875rem,
|
|
28
|
-
|
|
29
|
-
// Typography
|
|
30
|
-
font-family: (-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif),
|
|
31
|
-
section-title-size: 1.25rem,
|
|
32
|
-
section-title-weight: 600,
|
|
33
|
-
label-size: 0.875rem,
|
|
34
|
-
label-weight: 600,
|
|
35
|
-
input-font-size: 0.875rem,
|
|
36
|
-
hint-size: 0.75rem,
|
|
37
|
-
|
|
38
|
-
// Shadows
|
|
39
|
-
section-shadow: (0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)),
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
// Mixin to generate CSS variables for the configurable form component
|
|
43
|
-
@mixin configurable-form-theme($user-config: ()) {
|
|
44
|
-
// Merge user config with defaults
|
|
45
|
-
$config: map.merge($default-configurable-form-config, $user-config);
|
|
46
|
-
|
|
47
|
-
// Generate CSS Variables
|
|
48
|
-
--cf-primary-color: #{map.get($config, primary-color)};
|
|
49
|
-
--cf-surface-background: #{map.get($config, surface-background)};
|
|
50
|
-
--cf-border-color: #{map.get($config, border-color)};
|
|
51
|
-
--cf-text-primary: #{map.get($config, text-primary)};
|
|
52
|
-
--cf-text-secondary: #{map.get($config, text-secondary)};
|
|
53
|
-
--cf-error-color: #{map.get($config, error-color)};
|
|
54
|
-
--cf-disabled-background: #{map.get($config, disabled-background)};
|
|
55
|
-
--cf-hover-background: #{map.get($config, hover-background)};
|
|
56
|
-
|
|
57
|
-
--cf-input-border-color: #{map.get($config, input-border-color)};
|
|
58
|
-
--cf-input-focus-border-color: #{map.get($config, input-focus-border-color)};
|
|
59
|
-
--cf-input-hover-border-color: #{map.get($config, input-hover-border-color)};
|
|
60
|
-
--cf-input-bg: #{map.get($config, input-bg)};
|
|
61
|
-
|
|
62
|
-
--cf-section-radius: #{map.get($config, section-radius)};
|
|
63
|
-
--cf-section-padding: #{map.get($config, section-padding)};
|
|
64
|
-
--cf-section-spacing: #{map.get($config, section-spacing)};
|
|
65
|
-
--cf-input-radius: #{map.get($config, input-radius)};
|
|
66
|
-
--cf-input-padding-y: #{map.get($config, input-padding-y)};
|
|
67
|
-
--cf-input-padding-x: #{map.get($config, input-padding-x)};
|
|
68
|
-
|
|
69
|
-
--cf-font-family: #{map.get($config, font-family)};
|
|
70
|
-
--cf-section-title-size: #{map.get($config, section-title-size)};
|
|
71
|
-
--cf-section-title-weight: #{map.get($config, section-title-weight)};
|
|
72
|
-
--cf-label-size: #{map.get($config, label-size)};
|
|
73
|
-
--cf-label-weight: #{map.get($config, label-weight)};
|
|
74
|
-
--cf-input-font-size: #{map.get($config, input-font-size)};
|
|
75
|
-
--cf-hint-size: #{map.get($config, hint-size)};
|
|
76
|
-
|
|
77
|
-
--cf-section-shadow: #{map.get($config, section-shadow)};
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
// Default configuration for the configurable form theme
|
|
4
|
+
$default-configurable-form-config: (
|
|
5
|
+
// Colors
|
|
6
|
+
primary-color: #3B82F6,
|
|
7
|
+
surface-background: #ffffff,
|
|
8
|
+
border-color: #D1D5DB,
|
|
9
|
+
text-primary: #111827,
|
|
10
|
+
text-secondary: #6B7280,
|
|
11
|
+
error-color: #DC2626,
|
|
12
|
+
disabled-background: #F3F4F6,
|
|
13
|
+
hover-background: #F9FAFB,
|
|
14
|
+
|
|
15
|
+
// Inputs specific
|
|
16
|
+
input-border-color: #D1D5DB,
|
|
17
|
+
input-focus-border-color: #3B82F6,
|
|
18
|
+
input-hover-border-color: #9CA3AF,
|
|
19
|
+
input-bg: #ffffff,
|
|
20
|
+
|
|
21
|
+
// Dimensions
|
|
22
|
+
section-radius: 12px,
|
|
23
|
+
section-padding: 2rem,
|
|
24
|
+
section-spacing: 1.5rem,
|
|
25
|
+
input-radius: 8px,
|
|
26
|
+
input-padding-y: 0.625rem,
|
|
27
|
+
input-padding-x: 0.875rem,
|
|
28
|
+
|
|
29
|
+
// Typography
|
|
30
|
+
font-family: (-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif),
|
|
31
|
+
section-title-size: 1.25rem,
|
|
32
|
+
section-title-weight: 600,
|
|
33
|
+
label-size: 0.875rem,
|
|
34
|
+
label-weight: 600,
|
|
35
|
+
input-font-size: 0.875rem,
|
|
36
|
+
hint-size: 0.75rem,
|
|
37
|
+
|
|
38
|
+
// Shadows
|
|
39
|
+
section-shadow: (0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
// Mixin to generate CSS variables for the configurable form component
|
|
43
|
+
@mixin configurable-form-theme($user-config: ()) {
|
|
44
|
+
// Merge user config with defaults
|
|
45
|
+
$config: map.merge($default-configurable-form-config, $user-config);
|
|
46
|
+
|
|
47
|
+
// Generate CSS Variables
|
|
48
|
+
--cf-primary-color: #{map.get($config, primary-color)};
|
|
49
|
+
--cf-surface-background: #{map.get($config, surface-background)};
|
|
50
|
+
--cf-border-color: #{map.get($config, border-color)};
|
|
51
|
+
--cf-text-primary: #{map.get($config, text-primary)};
|
|
52
|
+
--cf-text-secondary: #{map.get($config, text-secondary)};
|
|
53
|
+
--cf-error-color: #{map.get($config, error-color)};
|
|
54
|
+
--cf-disabled-background: #{map.get($config, disabled-background)};
|
|
55
|
+
--cf-hover-background: #{map.get($config, hover-background)};
|
|
56
|
+
|
|
57
|
+
--cf-input-border-color: #{map.get($config, input-border-color)};
|
|
58
|
+
--cf-input-focus-border-color: #{map.get($config, input-focus-border-color)};
|
|
59
|
+
--cf-input-hover-border-color: #{map.get($config, input-hover-border-color)};
|
|
60
|
+
--cf-input-bg: #{map.get($config, input-bg)};
|
|
61
|
+
|
|
62
|
+
--cf-section-radius: #{map.get($config, section-radius)};
|
|
63
|
+
--cf-section-padding: #{map.get($config, section-padding)};
|
|
64
|
+
--cf-section-spacing: #{map.get($config, section-spacing)};
|
|
65
|
+
--cf-input-radius: #{map.get($config, input-radius)};
|
|
66
|
+
--cf-input-padding-y: #{map.get($config, input-padding-y)};
|
|
67
|
+
--cf-input-padding-x: #{map.get($config, input-padding-x)};
|
|
68
|
+
|
|
69
|
+
--cf-font-family: #{map.get($config, font-family)};
|
|
70
|
+
--cf-section-title-size: #{map.get($config, section-title-size)};
|
|
71
|
+
--cf-section-title-weight: #{map.get($config, section-title-weight)};
|
|
72
|
+
--cf-label-size: #{map.get($config, label-size)};
|
|
73
|
+
--cf-label-weight: #{map.get($config, label-weight)};
|
|
74
|
+
--cf-input-font-size: #{map.get($config, input-font-size)};
|
|
75
|
+
--cf-hint-size: #{map.get($config, hint-size)};
|
|
76
|
+
|
|
77
|
+
--cf-section-shadow: #{map.get($config, section-shadow)};
|
|
78
78
|
}
|