@dialpad/dialtone 7.11.2 → 7.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +8 -2
  2. package/lib/build/less/components/badge.less +6 -5
  3. package/lib/build/less/components/banner.less +32 -26
  4. package/lib/build/less/components/breadcrumbs.less +48 -42
  5. package/lib/build/less/components/button.less +81 -72
  6. package/lib/build/less/components/card.less +1 -1
  7. package/lib/build/less/components/chip.less +2 -2
  8. package/lib/build/less/components/forms.less +2 -1
  9. package/lib/build/less/components/input.less +12 -36
  10. package/lib/build/less/components/link.less +79 -118
  11. package/lib/build/less/components/modal.less +7 -26
  12. package/lib/build/less/components/notice.less +47 -26
  13. package/lib/build/less/components/radio-checkbox.less +37 -58
  14. package/lib/build/less/components/selects.less +7 -26
  15. package/lib/build/less/components/skeleton.less +15 -12
  16. package/lib/build/less/components/table.less +19 -15
  17. package/lib/build/less/components/tabs.less +90 -36
  18. package/lib/build/less/components/toast.less +41 -43
  19. package/lib/build/less/components/toggle.less +5 -2
  20. package/lib/build/less/components/tooltip.less +2 -2
  21. package/lib/build/less/dialtone-globals.less +2 -2
  22. package/lib/build/less/dialtone-reset.less +9 -0
  23. package/lib/build/less/themes/default.less +10 -10
  24. package/lib/build/less/utilities/colors.less +34 -8
  25. package/lib/build/less/utilities/interactivity.less +3 -3
  26. package/lib/build/less/variables/colors.less +70 -39
  27. package/lib/build/less/variables/visual-styles.less +2 -15
  28. package/lib/dist/css/dialtone.css +2084 -9171
  29. package/lib/dist/css/dialtone.min.css +1 -1
  30. package/package.json +2 -2
@@ -29,23 +29,17 @@
29
29
  .d-input__wrapper {
30
30
  // Component CSS Vars
31
31
  // ------------------------------------------------------------------------
32
- --input-color-border-focus: var(--purple-400);
33
- --input-color-border: hsla(var(--black-900-hsl) ~' / ' 9%);
34
- --input-color-background: hsla(var(--black-900-hsl) ~' / ' 3%);
35
- --input-color-background-disabled: hsla(var(--black-900-hsl) ~' / ' 12%);
32
+ --input-color-border: hsla(var(--black-900-hsl) / 0.09);
33
+ --input-color-background: hsla(var(--black-900-hsl) / 0.03);
34
+ --input-color-background-disabled: hsla(var(--black-900-hsl) / 0.12);
35
+ --input-color-text: var(--fc-secondary);
36
36
  --input-border-width: calc(var(--size-100) + calc(var(--size-100) / 2)); // 1.5
37
37
  --input-border-radius: var(--size-400);
38
38
  --input-padding-y: calc(var(--space-400) - var(--input-border-width));
39
39
  --input-padding-x: calc((var(--space-500) - var(--space-300)) - var(--input-border-width));
40
- --input-color-text: var(--fc-secondary);
41
40
  --input-font-size: var(--fs-200);
42
41
  --input-line-height: var(--lh-200);
43
42
 
44
- .bg-test & {
45
- --input-color-border: var(--black-300);
46
- --input-color-background: var(--black-100);
47
- }
48
-
49
43
  position: relative;
50
44
  display: inline-flex;
51
45
  flex: 1 0%;
@@ -64,8 +58,8 @@
64
58
  outline: none;
65
59
  box-shadow: none;
66
60
  transition-timing-function: var(--ttf-in-out);
67
- transition-duration: 100ms;
68
- transition-property: border, box-shadow, background-color;
61
+ transition-duration: var(--td100);
62
+ transition-property: box-shadow, background-color;
69
63
  appearance: none;
70
64
 
71
65
  // -- Placeholder copy
@@ -76,13 +70,13 @@
76
70
  &::-ms-clear {
77
71
  display: none;
78
72
  }
79
- // -- FOCUS
73
+ // -- FOCUS STATE
80
74
  &:focus,
81
75
  &:focus-within {
82
- --input-color-border: var(--input-color-border-focus);
76
+ --input-color-background: hsla(var(--black-900-hsl) / 0.01);
77
+ --input-color-border: var(--color-focus-ring) !important;
83
78
 
84
- outline: 0;
85
- box-shadow: var(--bs-focus-ring) !important;
79
+ box-shadow: 0 0 0 var(--size-100) var(--color-focus-ring) inset;
86
80
  }
87
81
  // -- DISABLED / READ-ONLY
88
82
  &[disabled],
@@ -217,34 +211,16 @@
217
211
  .d-input--warning,
218
212
  .d-textarea--warning {
219
213
  --input-color-border: var(--gold-400) !important;
220
- --input-color-border-focus: var(--warning-color);
221
-
222
- &:focus,
223
- &:focus-within {
224
- box-shadow: var(--bs-focus-ring-warning) !important;
225
- }
226
214
  }
227
215
 
228
216
  .d-input--error,
229
217
  .d-textarea--error {
230
- --input-color-border: var(--error-color) !important;
231
- --input-color-border-focus: var(--error-color);
232
-
233
- &:focus,
234
- &:focus-within {
235
- box-shadow: var(--bs-focus-ring-error) !important;
236
- }
218
+ --input-color-border: var(--red-300) !important;
237
219
  }
238
220
 
239
221
  .d-input--success,
240
222
  .d-textarea--success {
241
- --input-color-border: var(--success-color) !important;
242
- --input-color-border-focus: var(--success-color);
243
-
244
- &:focus,
245
- &:focus-within {
246
- box-shadow: var(--bs-focus-ring-success) !important;
247
- }
223
+ --input-color-border: var(--green-400) !important;
248
224
  }
249
225
 
250
226
  // ============================================================================
@@ -14,19 +14,25 @@
14
14
  // $ BASE STYLE
15
15
  // ----------------------------------------------------------------------------
16
16
  .d-link {
17
+ --link-color-default: var(--purple-400);
18
+ --link-color-default-hover: hsl(var(--purple-400-h) var(--purple-400-s) calc(var(--purple-400-l) - 10%));
19
+
17
20
  position: relative;
18
21
  display: inline-flex;
22
+ gap: var(--space-300);
19
23
  align-items: center;
20
24
  justify-content: center;
21
25
  box-sizing: border-box;
22
26
  margin: 0;
23
27
  padding: 0;
24
- color: var(--purple-400);
28
+ color: var(--link-color-default);
25
29
  font: inherit;
26
- text-decoration: underline;
30
+ text-decoration: none;
27
31
  background-color: transparent;
28
32
  border: 0;
29
- transition: all var(--td25) var(--ttf-in-out);
33
+ transition-timing-function: var(--ttf-out-quint);
34
+ transition-duration: var(--td200);
35
+ transition-property: background-color, border, box-shadow;
30
36
 
31
37
  // Reset button appearance
32
38
  -webkit-appearance: none;
@@ -35,125 +41,80 @@
35
41
  fill: currentColor;
36
42
 
37
43
  &:hover {
38
- color: hsl(var(--purple-400-h) var(--purple-400-s) calc(var(--purple-400-l) - 10%));
39
- text-decoration: none;
44
+ color: var(--link-color-default-hover);
45
+ text-decoration: underline;
40
46
  cursor: pointer;
41
47
  }
42
48
 
43
49
  &:focus-visible {
44
- border-radius: var(--br4);
45
50
  outline: none;
46
- box-shadow: 0 0 0 var(--size-200) var(--focus-ring);
47
- }
48
- }
49
-
50
-
51
- // ============================================================================
52
- // $ ALTERNATE STYLES
53
- // ============================================================================
54
- // $$ WARNING
55
- // ----------------------------------------------------------------------------
56
- .d-link--warning {
57
- color: var(--fc-warning);
58
-
59
- &:hover {
60
- color: var(--fc-warning-hover);
61
- }
62
-
63
- &:focus-visible {
64
- box-shadow: 0 0 0 var(--size-200) var(--focus-ring-warning);
65
- }
66
- }
67
-
68
- // $$ DANGER
69
- // ----------------------------------------------------------------------------
70
- .d-link--danger {
71
- color: var(--fc-error);
72
-
73
- &:hover {
74
- color: var(--error-color-hover);
75
- }
76
-
77
- &:focus-visible {
78
- box-shadow: 0 0 0 var(--size-200) var(--focus-ring-error);
79
- }
80
- }
81
-
82
- // $$ SUCCESS
83
- // ----------------------------------------------------------------------------
84
- .d-link--success {
85
- color: var(--fc-success);
86
-
87
- &:hover {
88
- color: var(--success-color-hover);
89
- }
90
-
91
- &:focus-visible {
92
- box-shadow: 0 0 0 var(--size-200) var(--focus-ring-success);
93
- }
94
- }
95
-
96
- // $$ MUTED
97
- // ----------------------------------------------------------------------------
98
- .d-link--muted {
99
- color: var(--muted-color);
100
-
101
- &:hover {
102
- color: var(--muted-color-hover);
103
- }
104
-
105
- &:focus-visible {
106
- box-shadow: 0 0 0 var(--size-200) var(--focus-ring-muted);
107
- }
108
- }
109
-
110
- // $$ DISABLED
111
- // ----------------------------------------------------------------------------
112
- // We don't expose these in the documentation because they're meant to be consumed
113
- // by buttons using .d-link. Links with a disabled attribute are not valid mark-up.
114
- .d-link[disabled],
115
- .d-link--disabled {
116
- color: var(--fc-disabled);
117
-
118
- &:hover {
119
- color: var(--fc-disabled);
120
- text-decoration: underline;
121
- cursor: not-allowed;
122
- }
123
-
124
- &:focus {
125
- box-shadow: none;
126
- }
127
- }
128
-
129
- // $$ INVERTED
130
- // ----------------------------------------------------------------------------
131
- .d-link--inverted {
132
- color: var(--inverted-color);
133
-
134
- &:hover {
135
- color: var(--inverted-color-hover);
136
- }
137
-
138
- &:focus-visible {
139
- box-shadow: 0 0 0 var(--size-200) var(--focus-ring-inverted);
140
- }
141
- }
142
-
143
- // $$ INVERTED DISABLED
144
- // ----------------------------------------------------------------------------
145
- // We don't expose these in the documentation because they're meant to be consumed
146
- // by buttons using .d-link. Links with a disabled attribute are not valid mark-up.
147
- .d-link--inverted-disabled {
148
- color: var(--black-500);
149
-
150
- &:hover {
151
- color: var(--black-500);
152
- text-decoration: underline;
153
- cursor: not-allowed;
154
- }
155
-
156
- &:focus {
157
- box-shadow: none;
51
+ box-shadow: var(--bs-focus-ring);
52
+ }
53
+
54
+ // ============================================================================
55
+ // $ ALTERNATE STYLES
56
+ // ============================================================================
57
+ // $$ WARNING
58
+ // ----------------------------------------------------------------------------
59
+ &--warning {
60
+ --link-color-default: var(--fc-warning);
61
+ --link-color-default-hover: var(--fc-warning-hover);
62
+ }
63
+
64
+ // $$ DANGER
65
+ // ----------------------------------------------------------------------------
66
+ &--danger {
67
+ --link-color-default: var(--fc-critical);
68
+ --link-color-default-hover: hsl(var(--red-300-h), var(--red-300-s), calc(var(--red-300-l) - 8%));
69
+ }
70
+
71
+ // $$ SUCCESS
72
+ // ----------------------------------------------------------------------------
73
+ &--success {
74
+ --link-color-default: var(--fc-success);
75
+ --link-color-default-hover: var(--green-500);
76
+ }
77
+
78
+ // $$ MUTED
79
+ // ----------------------------------------------------------------------------
80
+ &--muted {
81
+ --link-color-default: var(--fc-secondary);
82
+ --link-color-default-hover: var(--fc-primary);
83
+ }
84
+
85
+ // $$ DISABLED
86
+ // ----------------------------------------------------------------------------
87
+ // We don't expose these in the documentation because they're meant to be consumed
88
+ // by buttons using .d-link. Links with a disabled attribute are not valid mark-up.
89
+ &[disabled],
90
+ &--disabled {
91
+ --link-color-default: var(--fc-disabled);
92
+ --link-color-default-hover: var(--link-color-default);
93
+
94
+ &:hover {
95
+ text-decoration: none;
96
+ cursor: not-allowed;
97
+ }
98
+ }
99
+
100
+ // $$ INVERTED
101
+ // ----------------------------------------------------------------------------
102
+ &--inverted {
103
+ --link-color-default: var(--fc-secondary-inverted);
104
+ --link-color-default-hover: var(--fc-primary-inverted);
105
+ }
106
+
107
+ // $$ INVERTED DISABLED
108
+ // ----------------------------------------------------------------------------
109
+ // We don't expose these in the documentation because they're meant to be consumed
110
+ // by buttons using .d-link. Links with a disabled attribute are not valid mark-up.
111
+ &--inverted-disabled {
112
+ --link-color-default: var(--black-400);
113
+ --link-color-default-hover: var(--link-color-default);
114
+
115
+ &:hover {
116
+ text-decoration: none;
117
+ cursor: not-allowed;
118
+ }
158
119
  }
159
120
  }
@@ -27,13 +27,13 @@
27
27
  .d-modal {
28
28
  // Component CSS Vars
29
29
  // ------------------------------------------------------------------------
30
- --modal-color-background: hsla(var(--black-900-hsl) ~' / ' 60%);
30
+ --modal-backdrop-color-background: hsla(var(--bgc-contrast-hsl) / 0.7);
31
31
  --modal-dialog-padding: var(--space-600);
32
- --modal-dialog-color-background: var(--white);
32
+ --modal-dialog-color-background: var(--bgc-primary);
33
33
  --modal-dialog-color-text: var(--fc-tertiary);
34
34
  --modal-header-color-text: var(--fc-secondary);
35
- --modal-dialog-color-shadow: hsla(var(--black-900-hsl) ~' / ' 10%);
36
- --modal-dialog-shadow: 0 0 0 1px var(--modal-dialog-color-shadow), var(--bs-card);
35
+ --modal-dialog-color-shadow: hsla(var(--black-900-hsl) / 0.1);
36
+ --modal-dialog-shadow: 0 0 0 var(--size-100) var(--modal-dialog-color-shadow), var(--bs-card);
37
37
 
38
38
  position: fixed;
39
39
  top: 0;
@@ -46,7 +46,7 @@
46
46
  align-items: center;
47
47
  justify-content: center;
48
48
  padding: var(--space-600); // 32
49
- background-color: var(--modal-color-background);
49
+ background-color: var(--modal-backdrop-color-background);
50
50
  backface-visibility: hidden;
51
51
  visibility: hidden;
52
52
  opacity: 0;
@@ -54,26 +54,7 @@
54
54
  }
55
55
 
56
56
  .d-modal--transparent {
57
- // Component CSS Vars
58
- // ------------------------------------------------------------------------
59
- --modal-color-background: hsla(var(--black-900-hsl) ~' / ' 85%);
60
-
61
- position: fixed;
62
- top: 0;
63
- right: 0;
64
- bottom: 0;
65
- left: 0;
66
- z-index: var(--zi-hide);
67
- display: flex;
68
- flex-direction: column;
69
- align-items: center;
70
- justify-content: center;
71
- padding: var(--space-600); // 32
72
- background-color: var(--d-bgc-transparent);
73
- backface-visibility: hidden;
74
- visibility: hidden;
75
- opacity: 0;
76
- will-change: visibility, z-index, opacity;
57
+ --modal-backdrop-color-background: var(--d-bgc-transparent);
77
58
  }
78
59
 
79
60
  // $$ MODAL DIALOG
@@ -167,7 +148,7 @@
167
148
  .d-modal__banner {
168
149
  --modal-banner-padding-y: var(--space-500);
169
150
  --modal-banner-padding-x: var(--space-600);
170
- --modal-banner-color-background: var(--gold-100);
151
+ --modal-banner-color-background: var(--bgc-warning);
171
152
 
172
153
  position: relative;
173
154
  box-sizing: border-box;
@@ -15,23 +15,30 @@
15
15
  .d-notice {
16
16
  // Component CSS Vars
17
17
  // ------------------------------------------------------------------------
18
- --notice-color-background: var(--black-100);
18
+ --notice-color-background: var(--bgc-secondary);
19
19
  --notice-color-text: var(--fc-primary);
20
-
21
- display: flex;
22
- align-items: center;
20
+ --notice-color-icon: var(--notice-color-text);
21
+ --notice-color-shadow: hsla(var(--black-900-hsl) / 0.06);
22
+ --notice-padding: var(--space-500);
23
+ --notice-font-size: var(--fs-200);
24
+ --notice-line-height: var(--lh-300);
25
+ --notice-border-radius: var(--size-400);
26
+ --notice-box-shadow: 0 0 0 var(--size-100) var(--notice-color-shadow) inset;
23
27
 
24
28
  // Base Styles
25
29
  // ------------------------------------------------------------------------
30
+ display: flex;
31
+ align-items: center;
26
32
  box-sizing: border-box;
27
33
  width: 100%;
28
34
  max-width: calc(var(--size-300) * 157); // 628
29
- padding: calc(var(--space-300) * 3); // 12
35
+ padding: var(--notice-padding);
30
36
  color: var(--notice-color-text);
31
- font-size: var(--fs-200);
32
- line-height: var(--lh6);
37
+ font-size: var(--notice-font-size);
38
+ line-height: var(--notice-line-height);
33
39
  background-color: var(--notice-color-background);
34
- border-radius: var(--br4);
40
+ border-radius: var(--notice-border-radius);
41
+ box-shadow: var(--notice-box-shadow);
35
42
 
36
43
  .d-toast & {
37
44
  max-width: calc(var(--size-300) * 116); // 464
@@ -49,7 +56,7 @@
49
56
  display: flex;
50
57
  flex: 1 auto;
51
58
  flex-direction: column;
52
- margin-right: var(--space-500); // 16
59
+ margin-right: var(--space-500);
53
60
  }
54
61
 
55
62
  // $$ ACTIONS
@@ -57,9 +64,8 @@
57
64
  .d-notice__actions {
58
65
  display: flex;
59
66
  flex: 0 auto;
67
+ gap: var(--space-400);
60
68
  align-items: center;
61
-
62
- .d-flow8();
63
69
  }
64
70
 
65
71
  // $$ ICON
@@ -67,8 +73,12 @@
67
73
  .d-notice__icon {
68
74
  display: flex;
69
75
  flex: 0 auto;
70
- margin-right: var(--space-400); // 8
71
- color: inherit;
76
+ margin-right: calc(var(--space-300) * 3);
77
+ color: var(--notice-color-icon);
78
+
79
+ .d-banner & {
80
+ margin-right: var(--space-400);
81
+ }
72
82
  }
73
83
 
74
84
  // ============================================================================
@@ -79,14 +89,22 @@
79
89
  font-size: inherit;
80
90
  }
81
91
 
92
+ .d-notice__message {
93
+ .d-notice__title:not([hidden]) + & {
94
+ font-size: var(--fs-100);
95
+ }
96
+ }
97
+
82
98
  // ============================================================================
83
99
  // $ STYLES
84
100
  // ============================================================================
85
101
  // $$ DEFAULT IMPORTANT
86
102
  // ----------------------------------------------------------------------------
87
103
  .d-notice.d-notice--important {
88
- --notice-color-background: var(--black-800);
104
+ --notice-color-background: var(--bgc-contrast);
89
105
  --notice-color-text: var(--black-100);
106
+ --notice-color-shadow: transparent;
107
+ --notice-color-icon: var(--fc-primary-inverted);
90
108
  }
91
109
 
92
110
  // $$ ERROR
@@ -94,14 +112,14 @@
94
112
  .d-notice--error,
95
113
  .d-banner--error,
96
114
  .d-toast--error {
97
- --notice-color-background: var(--red-100);
98
- --notice-color-text: var(--red-500);
115
+ --notice-color-background: var(--bgc-critical);
116
+ --notice-color-icon: var(--red-400);
99
117
 
100
118
  &.d-notice--important,
101
119
  &.d-banner--important,
102
120
  &.d-toast--important {
103
- --notice-color-background: var(--red-300);
104
- --notice-color-text: var(--white);
121
+ --notice-color-background: var(--red-400);
122
+ --notice-color-text: var(--fc-primary-inverted);
105
123
  }
106
124
  }
107
125
 
@@ -110,13 +128,14 @@
110
128
  .d-notice--info,
111
129
  .d-banner--info,
112
130
  .d-toast--info {
113
- --notice-color-background: var(--purple-100);
131
+ --notice-color-background: var(--bgc-info);
132
+ --notice-color-icon: var(--blue-500);
114
133
 
115
134
  &.d-notice--important,
116
135
  &.d-banner--important,
117
136
  &.d-toast--important {
118
- --notice-color-background: var(--purple-400);
119
- --notice-color-text: var(--white);
137
+ --notice-color-background: var(--blue-400);
138
+ --notice-color-text: var(--fc-primary-inverted);
120
139
  }
121
140
  }
122
141
 
@@ -125,14 +144,14 @@
125
144
  .d-notice--success,
126
145
  .d-banner--success,
127
146
  .d-toast--success {
128
- --notice-color-background: var(--green-100);
129
- --notice-color-text: var(--green-500);
147
+ --notice-color-background: var(--bgc-success);
148
+ --notice-color-icon: var(--green-400);
130
149
 
131
150
  &.d-notice--important,
132
151
  &.d-banner--important,
133
152
  &.d-toast--important {
134
- --notice-color-background: var(--green-200);
135
- --notice-color-text: var(--green-500);
153
+ --notice-color-background: var(--green-400);
154
+ --notice-color-text: var(--fc-primary-inverted);
136
155
  }
137
156
  }
138
157
 
@@ -141,12 +160,14 @@
141
160
  .d-notice--warning,
142
161
  .d-banner--warning,
143
162
  .d-toast--warning {
144
- --notice-color-background: var(--gold-100);
163
+ --notice-color-background: var(--bgc-warning);
164
+ --notice-color-icon: var(--gold-400);
145
165
 
146
166
  &.d-notice--important,
147
167
  &.d-banner--important,
148
168
  &.d-toast--important {
149
169
  --notice-color-background: var(--gold-200);
150
170
  --notice-color-text: var(--fc-primary);
171
+ --notice-color-icon: var(--notice-color-text);
151
172
  }
152
173
  }