platform-core-ng 21.1.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.
- package/README.md +73 -0
- package/fesm2022/platform-core-ng.mjs +7139 -0
- package/fesm2022/platform-core-ng.mjs.map +1 -0
- package/package.json +20 -0
- package/styles/base/_breakpoints.scss +1 -0
- package/styles/base/_interaction-mixins.scss +37 -0
- package/styles/base/_tokens.scss +255 -0
- package/styles/base/reset.scss +66 -0
- package/styles/base/scrollbar.scss +22 -0
- package/styles/base/theme.scss +424 -0
- package/styles/base/typography.scss +50 -0
- package/styles/components/index.scss +7 -0
- package/styles/components/mail-client.scss +2165 -0
- package/styles/components/master-detail.scss +137 -0
- package/styles/components/mobile-list-directives.scss +355 -0
- package/styles/control/button.scss +565 -0
- package/styles/control/switch.scss +85 -0
- package/styles/data/table/base.scss +31 -0
- package/styles/data/table/pattern-admin.scss +136 -0
- package/styles/data/table/pattern-screen.scss +36 -0
- package/styles/data/table.scss +3 -0
- package/styles/form/checkbox.scss +97 -0
- package/styles/form/input.scss +201 -0
- package/styles/form/number.scss +17 -0
- package/styles/form/radio.scss +84 -0
- package/styles/form/range.scss +118 -0
- package/styles/form/select.scss +50 -0
- package/styles/form/textarea.scss +65 -0
- package/styles/foundation.scss +16 -0
- package/styles/index.scss +1 -0
- package/styles/profiles/b/index.scss +4 -0
- package/styles/profiles/b/layout.scss +88 -0
- package/styles/profiles/b/theme.scss +44 -0
- package/styles/profiles/screen/index.scss +3 -0
- package/styles/profiles/screen/layout.scss +125 -0
- package/styles/profiles/screen/theme.scss +131 -0
- package/types/platform-core-ng.d.ts +3217 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@use '../../base/tokens' as tk;
|
|
2
|
+
|
|
3
|
+
$admin-selectors: "table:not(.table-pattern-screen):not([data-table-pattern='screen']), .table-pattern-admin, [data-table-pattern='admin']";
|
|
4
|
+
$admin-action-selectors: "table:not(.table-pattern-screen):not([data-table-pattern='screen']):not([SListPageTable]), .table-pattern-admin:not([SListPageTable]), [data-table-pattern='admin']:not([SListPageTable])";
|
|
5
|
+
$table-row-hover-bg: color-mix(in srgb, #{tk.$color-primary-subtle} 44%, #{tk.$color-surface});
|
|
6
|
+
$table-row-selected-bg: color-mix(in srgb, #{tk.$color-primary-subtle} 72%, #{tk.$color-surface});
|
|
7
|
+
$table-checkbox-col-selected-bg: color-mix(in srgb, #{tk.$color-primary-subtle} 88%, #{tk.$color-surface});
|
|
8
|
+
$table-selected-outline: color-mix(in srgb, #{tk.$color-primary} 20%, transparent);
|
|
9
|
+
$table-checkbox-col-width: 3.5rem;
|
|
10
|
+
|
|
11
|
+
#{ $admin-selectors } {
|
|
12
|
+
border-radius: tk.$radius-common-m;
|
|
13
|
+
border-collapse: separate;
|
|
14
|
+
border-spacing: 0;
|
|
15
|
+
|
|
16
|
+
thead {
|
|
17
|
+
background-color: tk.$color-surface-soft;
|
|
18
|
+
|
|
19
|
+
tr th {
|
|
20
|
+
position: sticky;
|
|
21
|
+
top: var(--admin-table-head-sticky-top, 0);
|
|
22
|
+
z-index: 1;
|
|
23
|
+
padding: tk.$space-2 tk.$space-3;
|
|
24
|
+
border-right: 1px solid tk.$color-border;
|
|
25
|
+
border-bottom: 1px solid tk.$color-divider;
|
|
26
|
+
background: tk.$color-surface-soft;
|
|
27
|
+
font-size: tk.$font-size-xs;
|
|
28
|
+
font-weight: tk.$font-weight-semibold;
|
|
29
|
+
text-align: left;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
word-break: keep-all;
|
|
32
|
+
color: tk.$color-text-primary;
|
|
33
|
+
|
|
34
|
+
&:first-child:has(input[type='checkbox']) {
|
|
35
|
+
width: $table-checkbox-col-width;
|
|
36
|
+
min-width: $table-checkbox-col-width;
|
|
37
|
+
height: 1rem;
|
|
38
|
+
padding: tk.$space-2-5 tk.$space-2;
|
|
39
|
+
text-align: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:last-child {
|
|
43
|
+
border-right-width: 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
tbody tr {
|
|
49
|
+
transition: background-color 160ms ease, box-shadow 160ms ease;
|
|
50
|
+
|
|
51
|
+
td {
|
|
52
|
+
padding: tk.$space-2 tk.$space-3;
|
|
53
|
+
border-right: 1px solid tk.$color-border;
|
|
54
|
+
border-bottom: 1px solid tk.$color-divider;
|
|
55
|
+
text-align: left;
|
|
56
|
+
font-size: tk.$font-size-xs;
|
|
57
|
+
white-space: normal;
|
|
58
|
+
overflow-wrap: break-word;
|
|
59
|
+
transition:
|
|
60
|
+
background-color 160ms ease,
|
|
61
|
+
border-color 160ms ease,
|
|
62
|
+
color 160ms ease;
|
|
63
|
+
|
|
64
|
+
&:last-child {
|
|
65
|
+
border-right-width: 0;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
td[class*='checkbox-col'],
|
|
70
|
+
td:first-child:has(input[type='checkbox']) {
|
|
71
|
+
width: $table-checkbox-col-width;
|
|
72
|
+
min-width: $table-checkbox-col-width;
|
|
73
|
+
padding-left: tk.$space-2;
|
|
74
|
+
padding-right: tk.$space-2;
|
|
75
|
+
text-align: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:hover td {
|
|
79
|
+
background: $table-row-hover-bg;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:last-child td {
|
|
83
|
+
border-bottom-width: 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
tbody tr.is-selected,
|
|
88
|
+
tbody tr.selected,
|
|
89
|
+
tbody tr[aria-selected='true'],
|
|
90
|
+
tbody tr[data-selected='true'],
|
|
91
|
+
tbody tr:has(> td[class*='checkbox-col'] input[type='checkbox']:checked),
|
|
92
|
+
tbody tr:has(> td:first-child input[type='checkbox']:checked) {
|
|
93
|
+
td {
|
|
94
|
+
background: $table-row-selected-bg;
|
|
95
|
+
border-bottom-color: $table-selected-outline;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
td[class*='checkbox-col'],
|
|
99
|
+
td:first-child:has(input[type='checkbox']:checked) {
|
|
100
|
+
background: $table-checkbox-col-selected-bg;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
thead th[class*='checkbox-col'],
|
|
105
|
+
tbody td[class*='checkbox-col'],
|
|
106
|
+
thead th:first-child:has(input[type='checkbox']),
|
|
107
|
+
tbody td:first-child:has(input[type='checkbox']) {
|
|
108
|
+
text-align: center;
|
|
109
|
+
|
|
110
|
+
input[type='checkbox'] {
|
|
111
|
+
display: inline-grid;
|
|
112
|
+
margin-inline: auto;
|
|
113
|
+
vertical-align: middle;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
tfoot tr td {
|
|
118
|
+
padding-top: tk.$space-1;
|
|
119
|
+
padding-bottom: tk.$space-1;
|
|
120
|
+
border-top: 1px solid tk.$color-border;
|
|
121
|
+
cursor: pointer;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
thead th:last-child,
|
|
125
|
+
tbody td:last-child {
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
#{ $admin-action-selectors }:has(tbody td:last-child[data-label='操作']) {
|
|
131
|
+
thead th:last-child,
|
|
132
|
+
tbody td:last-child {
|
|
133
|
+
width: var(--admin-table-action-col-width, 5rem);
|
|
134
|
+
min-width: var(--admin-table-action-col-width, 5rem);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
@use '../../base/tokens' as tk;
|
|
2
|
+
|
|
3
|
+
.table-pattern-screen,
|
|
4
|
+
[data-table-pattern='screen'] {
|
|
5
|
+
border-collapse: separate;
|
|
6
|
+
border-spacing: 0;
|
|
7
|
+
border: 1px solid rgba(255, 255, 255, 0.16);
|
|
8
|
+
border-radius: 0.5rem;
|
|
9
|
+
background: rgba(7, 16, 29, 0.72);
|
|
10
|
+
backdrop-filter: blur(12px);
|
|
11
|
+
|
|
12
|
+
thead {
|
|
13
|
+
background: rgba(59, 115, 255, 0.12);
|
|
14
|
+
|
|
15
|
+
tr th {
|
|
16
|
+
padding: tk.$space-3 tk.$space-4;
|
|
17
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.14);
|
|
18
|
+
color: rgba(255, 255, 255, 0.88);
|
|
19
|
+
font-size: tk.$font-size-md;
|
|
20
|
+
font-weight: tk.$font-weight-semibold;
|
|
21
|
+
text-align: left;
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
tbody tr td {
|
|
27
|
+
padding: tk.$space-3 tk.$space-4;
|
|
28
|
+
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
|
|
29
|
+
color: rgba(255, 255, 255, 0.84);
|
|
30
|
+
font-size: tk.$font-size-md;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
tbody tr:last-child td {
|
|
34
|
+
border-bottom-width: 0;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
@use '../base/tokens' as tk;
|
|
2
|
+
@use '../base/interaction-mixins' as mx;
|
|
3
|
+
|
|
4
|
+
$checkbox-size: 1rem;
|
|
5
|
+
$checkbox-radius: calc(#{tk.$radius-common-s} * 0.9);
|
|
6
|
+
$checkbox-border: tk.$color-border-strong;
|
|
7
|
+
$checkbox-border-hover: tk.$color-primary-hover;
|
|
8
|
+
$checkbox-bg: tk.$color-surface;
|
|
9
|
+
$checkbox-bg-hover: tk.$color-primary-subtle;
|
|
10
|
+
$checkbox-bg-checked: tk.$color-primary;
|
|
11
|
+
$checkbox-icon: tk.$color-fg-z1;
|
|
12
|
+
$checkbox-label: tk.$color-text-primary;
|
|
13
|
+
$checkbox-help: tk.$color-text-secondary;
|
|
14
|
+
$checkbox-error: tk.$color-error;
|
|
15
|
+
$checkbox-disabled-border: tk.$color-border;
|
|
16
|
+
$checkbox-disabled-bg: tk.$color-surface-soft;
|
|
17
|
+
$checkbox-disabled-label: tk.$color-text-disabled;
|
|
18
|
+
$space-1: tk.$space-1;
|
|
19
|
+
$space-2: tk.$space-2;
|
|
20
|
+
$space-3: tk.$space-3;
|
|
21
|
+
$space-4: tk.$space-4;
|
|
22
|
+
|
|
23
|
+
input[type='checkbox']:not([role='switch']) {
|
|
24
|
+
appearance: none;
|
|
25
|
+
position: relative;
|
|
26
|
+
flex: 0 0 auto;
|
|
27
|
+
width: $checkbox-size;
|
|
28
|
+
height: $checkbox-size;
|
|
29
|
+
margin: 0;
|
|
30
|
+
border: 1px solid $checkbox-border;
|
|
31
|
+
border-radius: $checkbox-radius;
|
|
32
|
+
background: $checkbox-bg;
|
|
33
|
+
display: inline-grid;
|
|
34
|
+
place-content: center;
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition:
|
|
37
|
+
border-color 160ms ease,
|
|
38
|
+
background-color 160ms ease,
|
|
39
|
+
box-shadow 160ms ease,
|
|
40
|
+
transform 160ms ease;
|
|
41
|
+
|
|
42
|
+
&::after {
|
|
43
|
+
content: '';
|
|
44
|
+
width: 0.3rem;
|
|
45
|
+
height: 0.55rem;
|
|
46
|
+
border-right: 2px solid $checkbox-icon;
|
|
47
|
+
border-bottom: 2px solid $checkbox-icon;
|
|
48
|
+
transform: translateY(-0.04rem) rotate(45deg) scale(0);
|
|
49
|
+
transform-origin: center;
|
|
50
|
+
transition: transform 140ms ease;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:hover {
|
|
54
|
+
border-color: $checkbox-border-hover;
|
|
55
|
+
background: $checkbox-bg-hover;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:checked,
|
|
59
|
+
&:indeterminate {
|
|
60
|
+
border-color: $checkbox-bg-checked;
|
|
61
|
+
background: $checkbox-bg-checked;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:checked::after {
|
|
65
|
+
transform: translateY(-0.04rem) rotate(45deg) scale(1);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:indeterminate::after {
|
|
69
|
+
width: 0.5rem;
|
|
70
|
+
height: 0;
|
|
71
|
+
border-right: 0;
|
|
72
|
+
border-bottom: 2px solid $checkbox-icon;
|
|
73
|
+
transform: scale(1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:focus-visible {
|
|
77
|
+
@include mx.focus-ring(2px, tk.$color-focus-ring, tk.$color-primary);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@include mx.disabled-state {
|
|
81
|
+
border-color: $checkbox-disabled-border;
|
|
82
|
+
background: $checkbox-disabled-bg;
|
|
83
|
+
cursor: not-allowed;
|
|
84
|
+
box-shadow: none;
|
|
85
|
+
|
|
86
|
+
&::after {
|
|
87
|
+
border-color: $checkbox-disabled-label;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
& + .checkbox__content,
|
|
91
|
+
& + .form-checkbox__content,
|
|
92
|
+
& + .checkbox__label,
|
|
93
|
+
& + .form-checkbox__label {
|
|
94
|
+
color: $checkbox-disabled-label;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
@use '../base/tokens' as tk;
|
|
2
|
+
|
|
3
|
+
@mixin platform-text-input {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
height: var(--platform-input-height, var(--input-height, 32px));
|
|
6
|
+
padding: 0 var(--platform-input-padding-x, var(--input-padding-x, 12px));
|
|
7
|
+
border: 1px solid var(--platform-control-border, var(--input-border, tk.$input-border));
|
|
8
|
+
border-radius: var(--platform-input-radius, var(--input-radius, tk.$input-radius));
|
|
9
|
+
background: var(--platform-control-bg, var(--input-bg, tk.$input-bg));
|
|
10
|
+
color: var(--platform-control-color, var(--input-text, tk.$input-text));
|
|
11
|
+
font: inherit;
|
|
12
|
+
font-size: var(--platform-input-font-size, var(--input-font-size, tk.$input-font-size));
|
|
13
|
+
font-weight: var(--input-font-weight, tk.$input-font-weight);
|
|
14
|
+
line-height: var(--platform-input-line-height, var(--platform-control-line-height, tk.$platform-control-line-height));
|
|
15
|
+
outline: none;
|
|
16
|
+
box-shadow: none;
|
|
17
|
+
transition:
|
|
18
|
+
border-color 160ms ease,
|
|
19
|
+
box-shadow 160ms ease,
|
|
20
|
+
background-color 160ms ease,
|
|
21
|
+
color 160ms ease;
|
|
22
|
+
|
|
23
|
+
&::placeholder {
|
|
24
|
+
color: var(--platform-control-placeholder, var(--input-placeholder, tk.$input-placeholder));
|
|
25
|
+
opacity: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:hover:not(:disabled):not([readonly]) {
|
|
29
|
+
border-color: var(--platform-control-border-hover, var(--input-hover-border, tk.$input-hover-border));
|
|
30
|
+
background: var(--platform-control-bg-hover, var(--input-bg, tk.$input-bg));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:focus,
|
|
34
|
+
&:focus-visible {
|
|
35
|
+
border-color: var(--platform-control-focus, var(--input-focus-border, tk.$input-focus-border));
|
|
36
|
+
box-shadow: 0 0 0 2px var(--platform-control-focus-ring, var(--input-focus-ring, tk.$input-focus-ring));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:disabled {
|
|
40
|
+
border-color: var(--platform-control-border, var(--input-border, tk.$input-border));
|
|
41
|
+
background: var(--platform-control-disabled-bg, var(--input-disabled-bg, tk.$input-disabled-bg));
|
|
42
|
+
color: var(--platform-control-disabled-color, var(--input-disabled-text, tk.$input-disabled-text));
|
|
43
|
+
cursor: not-allowed;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[readonly] {
|
|
47
|
+
background: var(--platform-control-readonly-bg, var(--input-disabled-bg, tk.$input-disabled-bg));
|
|
48
|
+
cursor: default;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[aria-invalid='true'],
|
|
52
|
+
&.is-error,
|
|
53
|
+
.is-error & {
|
|
54
|
+
border-color: var(--platform-control-error, var(--input-error, tk.$input-error));
|
|
55
|
+
|
|
56
|
+
&:focus,
|
|
57
|
+
&:focus-visible {
|
|
58
|
+
border-color: var(--platform-control-error, var(--input-error, tk.$input-error));
|
|
59
|
+
box-shadow: 0 0 0 2px var(--platform-control-error-ring, var(--input-error-ring, tk.$input-error-ring));
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
input:not([type]):not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
65
|
+
input[type='text']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
66
|
+
input[type='search']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
67
|
+
input[type='number']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
68
|
+
input[type='password']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
69
|
+
input[type='email']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
70
|
+
input[type='tel']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
71
|
+
input[type='url']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
72
|
+
input[type='date']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
73
|
+
input[type='datetime-local']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
74
|
+
input[type='month']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
75
|
+
input[type='time']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']),
|
|
76
|
+
input[type='week']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']) {
|
|
77
|
+
@include platform-text-input;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
input[type='search']::-webkit-search-cancel-button,
|
|
81
|
+
input[type='search']::-webkit-search-decoration {
|
|
82
|
+
appearance: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
input[type='search']:not([ngComboboxInput]):not([variant='bare']):not([data-platform-input='bare']):not([variant='soft']):not([data-platform-input='soft']):not([data-platform-search='soft']):not(.input-search--soft) {
|
|
86
|
+
--platform-input-height: var(--input-search-height, var(--input-height, 32px));
|
|
87
|
+
--platform-control-bg: var(--input-search-bg, tk.$input-search-bg);
|
|
88
|
+
--platform-control-bg-hover: var(--input-search-bg, tk.$input-search-bg);
|
|
89
|
+
--platform-control-border: var(--input-search-border, transparent);
|
|
90
|
+
|
|
91
|
+
&:focus,
|
|
92
|
+
&:focus-visible {
|
|
93
|
+
--platform-control-bg: var(--input-search-focus-bg, tk.$input-search-focus-bg);
|
|
94
|
+
--platform-control-border: var(--input-search-focus-border, var(--input-focus-border, tk.$input-focus-border));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
input[type='search'][variant='soft'],
|
|
99
|
+
input[type='search'][data-platform-input='soft'],
|
|
100
|
+
input[type='search'][data-platform-search='soft'],
|
|
101
|
+
input[type='search'].input-search--soft {
|
|
102
|
+
--platform-input-height: var(--input-soft-search-height, 36px);
|
|
103
|
+
--platform-input-radius: var(--input-soft-search-radius, tk.$input-soft-search-radius);
|
|
104
|
+
--platform-control-bg: var(--input-soft-search-bg, tk.$input-soft-search-bg);
|
|
105
|
+
--platform-control-bg-hover: var(--input-soft-search-bg, tk.$input-soft-search-bg);
|
|
106
|
+
--platform-control-border: transparent;
|
|
107
|
+
|
|
108
|
+
border: 0;
|
|
109
|
+
|
|
110
|
+
&:focus,
|
|
111
|
+
&:focus-visible {
|
|
112
|
+
--platform-control-bg: var(--input-search-focus-bg, tk.$input-search-focus-bg);
|
|
113
|
+
|
|
114
|
+
border: 0;
|
|
115
|
+
box-shadow: var(--input-soft-search-focus-shadow, tk.$input-soft-search-focus-shadow);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
input[pInput][size='sm'],
|
|
120
|
+
input[pInput][data-platform-input-size='sm'] {
|
|
121
|
+
--platform-input-height: var(--input-height-sm);
|
|
122
|
+
--platform-input-padding-x: var(--input-padding-x-sm);
|
|
123
|
+
--platform-input-radius: var(--input-radius-sm);
|
|
124
|
+
--platform-input-font-size: var(--input-font-size-sm);
|
|
125
|
+
--platform-input-line-height: var(--platform-control-line-height-sm);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
input[pInput][size='md'],
|
|
129
|
+
input[pInput][data-platform-input-size='md'] {
|
|
130
|
+
--platform-input-height: var(--input-height);
|
|
131
|
+
--platform-input-padding-x: var(--input-padding-x);
|
|
132
|
+
--platform-input-radius: var(--input-radius);
|
|
133
|
+
--platform-input-font-size: var(--input-font-size);
|
|
134
|
+
--platform-input-line-height: var(--platform-control-line-height-sm);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
input[pInput][size='lg'],
|
|
138
|
+
input[pInput][data-platform-input-size='lg'] {
|
|
139
|
+
--platform-input-height: var(--input-height-lg);
|
|
140
|
+
--platform-input-padding-x: var(--input-padding-x-lg);
|
|
141
|
+
--platform-input-radius: var(--input-radius-lg);
|
|
142
|
+
--platform-input-font-size: var(--input-font-size-lg);
|
|
143
|
+
--platform-input-line-height: var(--platform-control-line-height-md);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
input[pInput][variant='bare'],
|
|
147
|
+
input[pInput][data-platform-input='bare'] {
|
|
148
|
+
flex: 1 1 auto;
|
|
149
|
+
width: 100%;
|
|
150
|
+
min-width: 0;
|
|
151
|
+
height: auto;
|
|
152
|
+
padding: 0;
|
|
153
|
+
border: 0;
|
|
154
|
+
border-radius: 0;
|
|
155
|
+
outline: 0;
|
|
156
|
+
background: transparent;
|
|
157
|
+
box-shadow: none;
|
|
158
|
+
color: inherit;
|
|
159
|
+
font: inherit;
|
|
160
|
+
line-height: inherit;
|
|
161
|
+
appearance: none;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
input[pInput][variant='bare']::placeholder,
|
|
165
|
+
input[pInput][data-platform-input='bare']::placeholder {
|
|
166
|
+
color: var(--platform-control-placeholder, var(--input-placeholder, #9ca3af));
|
|
167
|
+
opacity: 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
input[pInput][variant='bare']:focus,
|
|
171
|
+
input[pInput][data-platform-input='bare']:focus {
|
|
172
|
+
border: 0;
|
|
173
|
+
background: transparent;
|
|
174
|
+
box-shadow: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.form-error,
|
|
178
|
+
.input-error,
|
|
179
|
+
.form-input__error,
|
|
180
|
+
.form-field__error {
|
|
181
|
+
margin-top: var(--input-error-margin-top, tk.$input-error-margin-top);
|
|
182
|
+
color: var(--input-error, tk.$input-error);
|
|
183
|
+
font-size: var(--input-error-font-size, tk.$input-error-font-size);
|
|
184
|
+
line-height: var(--line-height-xs, tk.$line-height-xs);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.input-icon,
|
|
188
|
+
.form-input__icon,
|
|
189
|
+
.form-field__icon {
|
|
190
|
+
width: var(--input-icon-size, tk.$input-icon-size);
|
|
191
|
+
height: var(--input-icon-size, tk.$input-icon-size);
|
|
192
|
+
opacity: var(--input-icon-opacity, tk.$input-icon-opacity);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
button.input-icon,
|
|
196
|
+
button.form-input__icon,
|
|
197
|
+
button.form-field__icon {
|
|
198
|
+
&:hover {
|
|
199
|
+
opacity: var(--input-icon-opacity-hover, tk.$input-icon-opacity-hover);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
input[type='number'] {
|
|
2
|
+
width: 100%;
|
|
3
|
+
min-width: 0;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
input[type='number'].number-input__control,
|
|
7
|
+
input[type='number'].form-number__control {
|
|
8
|
+
height: var(--platform-input-height, var(--input-height, 32px));
|
|
9
|
+
border: 0;
|
|
10
|
+
background: transparent;
|
|
11
|
+
box-shadow: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
input[type='number']::-webkit-outer-spin-button,
|
|
15
|
+
input[type='number']::-webkit-inner-spin-button {
|
|
16
|
+
margin: 0;
|
|
17
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@use '../base/tokens' as tk;
|
|
2
|
+
@use '../base/interaction-mixins' as mx;
|
|
3
|
+
|
|
4
|
+
$radio-size: 1rem;
|
|
5
|
+
$radio-dot-size: 0.5rem;
|
|
6
|
+
$radio-border: tk.$color-border-strong;
|
|
7
|
+
$radio-border-hover: tk.$color-primary-hover;
|
|
8
|
+
$radio-bg: tk.$color-surface;
|
|
9
|
+
$radio-bg-hover: tk.$color-primary-subtle;
|
|
10
|
+
$radio-bg-checked: tk.$color-primary;
|
|
11
|
+
$radio-dot: tk.$color-fg-z1;
|
|
12
|
+
$radio-label: tk.$color-text-primary;
|
|
13
|
+
$radio-help: tk.$color-text-secondary;
|
|
14
|
+
$radio-error: tk.$color-error;
|
|
15
|
+
$radio-disabled-border: tk.$color-border;
|
|
16
|
+
$radio-disabled-bg: tk.$color-surface-soft;
|
|
17
|
+
$radio-disabled-label: tk.$color-text-disabled;
|
|
18
|
+
|
|
19
|
+
input[type='radio'] {
|
|
20
|
+
appearance: none;
|
|
21
|
+
position: relative;
|
|
22
|
+
flex: 0 0 auto;
|
|
23
|
+
display: inline-grid;
|
|
24
|
+
place-content: center;
|
|
25
|
+
width: $radio-size;
|
|
26
|
+
height: $radio-size;
|
|
27
|
+
margin: 0;
|
|
28
|
+
border: 1px solid $radio-border;
|
|
29
|
+
border-radius: 999px;
|
|
30
|
+
background: $radio-bg;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
transition:
|
|
33
|
+
background-color 160ms ease,
|
|
34
|
+
border-color 160ms ease,
|
|
35
|
+
box-shadow 160ms ease;
|
|
36
|
+
|
|
37
|
+
&::after {
|
|
38
|
+
content: '';
|
|
39
|
+
width: $radio-dot-size;
|
|
40
|
+
height: $radio-dot-size;
|
|
41
|
+
border-radius: 999px;
|
|
42
|
+
background: $radio-dot;
|
|
43
|
+
transform: scale(0);
|
|
44
|
+
transition: transform 140ms ease;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
border-color: $radio-border-hover;
|
|
49
|
+
background: $radio-bg-hover;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:checked {
|
|
53
|
+
border-color: $radio-bg-checked;
|
|
54
|
+
background: $radio-bg-checked;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:checked::after {
|
|
58
|
+
transform: scale(1);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:focus-visible {
|
|
62
|
+
@include mx.focus-ring(2px, tk.$color-focus-ring, tk.$color-primary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@include mx.disabled-state {
|
|
66
|
+
border-color: $radio-disabled-border;
|
|
67
|
+
background: $radio-disabled-bg;
|
|
68
|
+
cursor: not-allowed;
|
|
69
|
+
box-shadow: none;
|
|
70
|
+
|
|
71
|
+
&::after {
|
|
72
|
+
background: $radio-disabled-label;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
& + .radio__content,
|
|
76
|
+
& + .form-radio__content,
|
|
77
|
+
& + .radio__label,
|
|
78
|
+
& + .form-radio__label {
|
|
79
|
+
color: $radio-disabled-label;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
@use '../base/tokens' as tk;
|
|
2
|
+
@use '../base/interaction-mixins' as mx;
|
|
3
|
+
|
|
4
|
+
$range-track-height: 0.25rem;
|
|
5
|
+
$range-thumb-size: 1rem;
|
|
6
|
+
$range-track-bg: tk.$color-surface-soft;
|
|
7
|
+
$range-fill-bg: tk.$color-primary;
|
|
8
|
+
$range-thumb-bg: tk.$color-surface;
|
|
9
|
+
$range-thumb-border: tk.$color-primary;
|
|
10
|
+
$range-label: tk.$color-text-primary;
|
|
11
|
+
$range-help: tk.$color-text-secondary;
|
|
12
|
+
$range-disabled: tk.$color-text-disabled;
|
|
13
|
+
|
|
14
|
+
input[type='range'] {
|
|
15
|
+
appearance: none;
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
height: $range-thumb-size;
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
background: transparent;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
|
|
24
|
+
&::-webkit-slider-runnable-track {
|
|
25
|
+
height: $range-track-height;
|
|
26
|
+
border-radius: 999px;
|
|
27
|
+
background: linear-gradient(90deg, $range-fill-bg var(--range-progress, 0%), $range-track-bg var(--range-progress, 0%));
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::-webkit-slider-thumb {
|
|
31
|
+
appearance: none;
|
|
32
|
+
width: $range-thumb-size;
|
|
33
|
+
height: $range-thumb-size;
|
|
34
|
+
margin-top: calc((#{$range-track-height} - #{$range-thumb-size}) / 2);
|
|
35
|
+
border: 2px solid $range-thumb-border;
|
|
36
|
+
border-radius: 999px;
|
|
37
|
+
background: $range-thumb-bg;
|
|
38
|
+
box-shadow: tk.$shadow-common-s;
|
|
39
|
+
transition:
|
|
40
|
+
border-color 160ms ease,
|
|
41
|
+
box-shadow 160ms ease,
|
|
42
|
+
transform 160ms ease;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&::-moz-range-track {
|
|
46
|
+
height: $range-track-height;
|
|
47
|
+
border-radius: 999px;
|
|
48
|
+
background: $range-track-bg;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&::-moz-range-progress {
|
|
52
|
+
height: $range-track-height;
|
|
53
|
+
border-radius: 999px;
|
|
54
|
+
background: $range-fill-bg;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&::-moz-range-thumb {
|
|
58
|
+
width: $range-thumb-size;
|
|
59
|
+
height: $range-thumb-size;
|
|
60
|
+
border: 2px solid $range-thumb-border;
|
|
61
|
+
border-radius: 999px;
|
|
62
|
+
background: $range-thumb-bg;
|
|
63
|
+
box-shadow: tk.$shadow-common-s;
|
|
64
|
+
transition:
|
|
65
|
+
border-color 160ms ease,
|
|
66
|
+
box-shadow 160ms ease,
|
|
67
|
+
transform 160ms ease;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&:hover::-webkit-slider-thumb {
|
|
71
|
+
border-color: tk.$color-primary-hover;
|
|
72
|
+
transform: scale(1.05);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:hover::-moz-range-thumb {
|
|
76
|
+
border-color: tk.$color-primary-hover;
|
|
77
|
+
transform: scale(1.05);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:focus-visible {
|
|
81
|
+
outline: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:focus-visible::-webkit-slider-thumb {
|
|
85
|
+
@include mx.focus-ring(2px, tk.$color-focus-ring, tk.$color-primary, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:focus-visible::-moz-range-thumb {
|
|
89
|
+
@include mx.focus-ring(2px, tk.$color-focus-ring, tk.$color-primary, false);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@include mx.disabled-state {
|
|
93
|
+
cursor: not-allowed;
|
|
94
|
+
|
|
95
|
+
&::-webkit-slider-runnable-track {
|
|
96
|
+
background: tk.$color-divider;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&::-webkit-slider-thumb {
|
|
100
|
+
border-color: $range-disabled;
|
|
101
|
+
background: tk.$color-surface-soft;
|
|
102
|
+
box-shadow: none;
|
|
103
|
+
transform: none;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&::-moz-range-track,
|
|
107
|
+
&::-moz-range-progress {
|
|
108
|
+
background: tk.$color-divider;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&::-moz-range-thumb {
|
|
112
|
+
border-color: $range-disabled;
|
|
113
|
+
background: tk.$color-surface-soft;
|
|
114
|
+
box-shadow: none;
|
|
115
|
+
transform: none;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|