@dialpad/dialtone 7.10.4 → 7.11.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.
@@ -24,96 +24,41 @@
24
24
  // Component CSS Vars
25
25
  // --------------------------------------------------------------------------
26
26
  --select-color-border: var(--black-500);
27
- --select-color-background: var(--white);
28
- --select-color-text: var(--black-800);
27
+ --select-notch-position-right: calc(var(--size-300) * 2);
29
28
 
30
29
  position: relative;
31
- display: inline-flex; // important to the children alignment
32
- box-sizing: border-box;
33
- width: 100%; // important to fill the available space
34
- width: -webkit-fill-available; // important to fill the available space
35
- font-weight: inherit;
36
- font-size: var(--fs-200);
37
- font-family: inherit;
38
- line-height: var(--lh-200);
30
+ width: stretch;
39
31
 
40
32
  // -- Arrows
41
- &::before,
42
33
  &::after {
34
+ --select-arrow-size: calc(var(--size-300) * 3.5);
35
+
43
36
  position: absolute;
44
- right: 0.75em;
37
+ top: 50%;
38
+ right: var(--select-notch-position-right);
45
39
  z-index: var(--zi-selected);
46
- border-color: var(--black-900) transparent;
47
- border-style: solid;
48
- border-width: 0.25em;
40
+ width: var(--select-arrow-size);
41
+ height: var(--select-arrow-size);
42
+ background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgdmlld0JveD0iMCAwIDEyIDEyIj4KICA8cGF0aCBmaWxsPSIjNTU1IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zLjE0NiA3LjE0NmEuNS41IDAgMCAxIC43MDggMEw2IDkuMjkzbDIuMTQ2LTIuMTQ3YS41LjUgMCAxIDEgLjcwOC43MDhsLTIuNSAyLjVhLjUuNSAwIDAgMS0uNzA4IDBsLTIuNS0yLjVhLjUuNSAwIDAgMSAwLS43MDhabTIuNS01LjVhLjUuNSAwIDAgMSAuNzA4IDBsMi41IDIuNWEuNS41IDAgMSAxLS43MDguNzA4TDYgMi43MDcgMy44NTQgNC44NTRhLjUuNSAwIDEgMS0uNzA4LS43MDhsMi41LTIuNVoiIGNsaXAtcnVsZT0iZXZlbm9kZCIvPgo8L3N2Zz4K');
43
+ background-repeat: no-repeat;
44
+ background-size: 100%;
45
+ transform: translateY(-50%);
49
46
  content: '';
50
47
  pointer-events: none;
51
48
  }
52
-
53
- &::before {
54
- top: calc(~'50% - 0.25em');
55
- border-top-width: 0;
56
- }
57
-
58
- &::after {
59
- top: calc(~'50% + 0.125em');
60
- border-bottom-width: 0;
61
- }
62
- }
63
-
64
- // $$ SIZES
65
- // ----------------------------------------------------------------------------
66
- .d-select--xs {
67
- font-size: var(--fs-200);
68
-
69
- .d-select__input {
70
- .input-button-xs();
71
- }
72
- }
73
-
74
- .d-select--sm {
75
- font-size: var(--fs-200);
76
-
77
- .d-select__input {
78
- .input-button-sm();
79
- }
80
- }
81
-
82
- .d-select--lg {
83
- font-size: var(--fs-300);
84
-
85
- .d-select__input {
86
- .input-button-lg();
87
- }
88
- }
89
-
90
- .d-select--xl {
91
- font-size: var(--fs-300);
92
-
93
- .d-select__input {
94
- .input-button-xl();
95
- }
96
49
  }
97
50
 
98
51
  // $ SELECT MENU INPUT
99
52
  // ----------------------------------------------------------------------------
100
53
  .d-select__input {
101
- --select-input-padding: calc(var(--space-400) - var(--space-100)) 2em calc(var(--space-400) - var(--space-100)) var(--space-400);// 7px 2em 7px 8px
102
-
103
- height: 100%; // Fill the height of its parent
104
- padding: var(--select-input-padding) !important;
105
- color: var(--select-color-text);
106
- background-color: var(--select-color-background);
107
- border-color: var(--select-color-border);
108
- // [1] Reset the appearance
109
- -webkit-appearance: none;
110
- -moz-appearance: none;
111
- appearance: none;
112
-
113
- // [2] Update the styles
54
+ --select-color-border: var(--input-color-border);
55
+ --select-notch-padding-right: calc(var(--space-300) * 6);
56
+
57
+ // Use shared style properties of d-input (<input>, <textarea>)
114
58
  .d-input();
115
59
 
116
- --select-color-border: var(--black-600);
60
+ // Adjust space on right beneath arrows
61
+ padding-right: var(--select-notch-padding-right);
117
62
 
118
63
  &:focus {
119
64
  --select-color-border: var(--purple-400);
@@ -121,10 +66,13 @@
121
66
  box-shadow: var(--bs-focus-ring);
122
67
  }
123
68
 
124
- &:disabled {
69
+ &[disabled],
70
+ &[read-only] {
125
71
  color: var(--fc-disabled);
126
- background: var(--black-300);
127
- border: 1px solid var(--black-400);
72
+ background: var(--input-color-background-disabled);
73
+ border-color: transparent;
74
+ border-style: solid;
75
+ border-width: var(--input-border-width);
128
76
  }
129
77
 
130
78
  &::-moz-focus-inner {
@@ -141,33 +89,73 @@
141
89
  }
142
90
  }
143
91
 
92
+ // $$ SIZES
93
+ // ----------------------------------------------------------------------------
94
+ .d-select--xs {
95
+ .d-select__input {
96
+ #d-internal__input-and-select-xs();
97
+ }
98
+ }
99
+
100
+ .d-select--sm {
101
+ .d-select__input {
102
+ #d-internal__input-and-select-sm();
103
+ }
104
+ }
105
+
106
+ .d-select--lg {
107
+ .d-select__input {
108
+ #d-internal__input-and-select-lg();
109
+
110
+ --select-notch-padding-right: calc(var(--space-300) * 9);
111
+ }
112
+
113
+ &::after {
114
+ --select-arrow-size: calc(var(--size-300) * 4.5);
115
+ --select-notch-position-right: calc(var(--size-300) * 3);
116
+ }
117
+ }
118
+
119
+ .d-select--xl {
120
+ .d-select__input {
121
+ #d-internal__input-and-select-xl();
122
+
123
+ --select-notch-padding-right: calc(var(--space-300) * 9);
124
+ }
125
+
126
+ &::after {
127
+ --select-arrow-size: calc(var(--size-300) * 4.5);
128
+ --select-notch-position-right: calc(var(--size-300) * 3);
129
+ }
130
+ }
131
+
144
132
  // $$ VALIDATION STATES
145
133
  // ------------------------------------------------------------------------
146
134
  .d-select__input--success {
147
- --select-color-border: var(--success-color);
135
+ --input-color-border: var(--success-color);
148
136
 
149
137
  &:focus {
150
- --select-color-border: var(--success-color);
138
+ --input-color-border: var(--success-color);
151
139
 
152
140
  box-shadow: var(--bs-focus-ring-success) !important;
153
141
  }
154
142
  }
155
143
 
156
144
  .d-select__input--error {
157
- --select-color-border: var(--error-color);
145
+ --input-color-border: var(--error-color);
158
146
 
159
147
  &:focus {
160
- --select-color-border: var(--error-color);
148
+ --input-color-border: var(--error-color);
161
149
 
162
150
  box-shadow: var(--bs-focus-ring-error) !important;
163
151
  }
164
152
  }
165
153
 
166
154
  .d-select__input--warning {
167
- --select-color-border: var(--warning-color);
155
+ --input-color-border: var(--gold-400);
168
156
 
169
157
  &:focus {
170
- --select-color-border: var(--warning-color);
158
+ --input-color-border: var(--warning-color);
171
159
 
172
160
  box-shadow: var(--bs-focus-ring-warning) !important;
173
161
  }
@@ -176,6 +164,6 @@
176
164
  .d-select--disabled {
177
165
  &::before,
178
166
  &::after {
179
- border-color: var(--black-500) transparent;
167
+ opacity: 0.33;
180
168
  }
181
169
  }
@@ -39,16 +39,23 @@
39
39
  // -----------------------
40
40
  --tooltip-color-background: var(--black-800);
41
41
  --tooltip-color-text: var(--white);
42
+ --tooltip-font-weight: var(--fw-medium);
43
+ --tooltip-line-height: var(--lh-300);
44
+ --tooltip-padding-y: var(--space-400);
45
+ --tooltip-padding-x: calc(var(--space-300) * 3);
46
+ --tooltip-border-radius: var(--size-300);
42
47
 
43
48
  z-index: var(--zi-tooltip);
44
49
  max-width: calc(var(--size-300) * 54); // 216
45
- padding: var(--space-400); // 8
50
+ padding: var(--tooltip-padding-y) var(--tooltip-padding-x); // 8 12
46
51
  color: var(--tooltip-color-text);
52
+ font-weight: var(--tooltip-font-weight);
47
53
  font-size: var(--fs-100);
48
- line-height: var(--lh-300);
54
+ line-height: var(--tooltip-line-height);
55
+ letter-spacing: calc(var(--size-100) * 0.25);
49
56
  text-align: center;
50
57
  background-color: var(--tooltip-color-background);
51
- border-radius: var(--size-300); // 4
58
+ border-radius: var(--tooltip-border-radius); // 4
52
59
 
53
60
  &::after {
54
61
  position: absolute;
@@ -349,5 +349,5 @@ template {
349
349
  */
350
350
 
351
351
  [hidden] {
352
- display: none;
352
+ display: none !important;
353
353
  }
@@ -277,9 +277,6 @@ body {
277
277
  each(@focus-rings, {
278
278
  --@{key}: @value;
279
279
  });
280
- each(@input-button-vars, {
281
- --@{key}: @value;
282
- });
283
280
 
284
281
  // $$ THEME VARS
285
282
  // These should always come last
@@ -63,7 +63,7 @@
63
63
  .d-fc-warning { color: var(--fc-warning); }
64
64
  #d-internals #generate-hover-focus(d-fc-warning, {.d-fc-warning();});
65
65
 
66
- .d-fc-error { &:extend(.d-fc-red-400); }
66
+ .d-fc-error { &:extend(.d-fc-red-300); }
67
67
  #d-internals #generate-hover-focus(d-fc-error, {.d-fc-error();});
68
68
 
69
69
  .d-fc-current { color: currentColor !important; }
@@ -195,10 +195,12 @@
195
195
  .d-td100 { transition-duration: var(--td100) !important; }
196
196
  .d-td150 { transition-duration: var(--td150) !important; }
197
197
  .d-td200 { transition-duration: var(--td200) !important; }
198
+ .d-td300 { transition-duration: var(--td300) !important; }
198
199
 
199
200
  // -- TRANSITION TIMING
200
201
  .d-ttf-in-out { transition-timing-function: var(--ttf-in-out) !important; }
201
202
  .d-ttf-out { transition-timing-function: var(--ttf-out) !important; }
203
+ .ttf-out-quint { transition-timing-function: var(--ttf-out-quint) !important; }
202
204
 
203
205
  // -- TRANSITION PROPERTY
204
206
  .d-tp-all { transition-property: all !important; }
@@ -214,3 +216,4 @@
214
216
  .d-t-delay100 { transition-delay: var(--td100) !important; }
215
217
  .d-t-delay150 { transition-delay: var(--td150) !important; }
216
218
  .d-t-delay200 { transition-delay: var(--td200) !important; }
219
+ .d-t-delay300 { transition-delay: var(--td300) !important; }
@@ -58,9 +58,9 @@
58
58
 
59
59
  @red-100: #FFE5E6;
60
60
  @red-200: #FF8585;
61
- @red-300: #FF2E2E;
62
- @red-400: #A41111;
63
- @red-500: #540000;
61
+ @red-300: #EC0E0E;
62
+ @red-400: #B70B0B;
63
+ @red-500: #5B0505;
64
64
 
65
65
  @blue-100: #EAF2FA;
66
66
  @blue-200: #99C8FF;
@@ -79,21 +79,21 @@
79
79
  // Used for inputs, notices, and button statuses
80
80
  // ----------------------------------------------------------------------------
81
81
  @color-states: {
82
- error-color: var(--red-400);
83
- error-color-hsl: var(--red-400-hsl);
84
- error-color-hover: var(--red-500);
82
+ error-color: var(--red-300);
83
+ error-color-hsl: var(--red-300-hsl);
84
+ error-color-hover: hsl(var(--red-300-h), var(--red-300-s), calc(var(--red-300-l) - 8%));
85
85
 
86
86
  warning-color: var(--fc-warning);
87
- warning-color-hsl: var(--yellow-500-hsl);
87
+ warning-color-hsl: var(--gold-500-hsl);
88
88
  warning-color-hover: var(--fc-warning-hover);
89
89
 
90
90
  success-color: var(--fc-success);
91
91
  success-color-hsl: var(--green-500-hsl);
92
92
  success-color-hover: var(--green-500);
93
93
 
94
- muted-color: var(--black-800);
95
- muted-color-hsl: var(--black-800-hsl);
96
- muted-color-hover: var(--black-800);
94
+ muted-color: var(--black-700);
95
+ muted-color-hsl: var(--black-700-hsl);
96
+ muted-color-hover: var(--black-700);
97
97
 
98
98
  inverted-color: var(--fc-primary-inverted);
99
99
  inverted-color-hsl: var(--black-100-hsl);
@@ -127,9 +127,9 @@
127
127
  fc-muted: hsla(var(--black-800-h) var(--black-800-s) var(--black-800-l) ~' / ' var(--alpha, 50%));
128
128
  fc-placeholder: var(--black-500);
129
129
  fc-disabled: var(--black-500);
130
- fc-error: var(--red-400);
130
+ fc-error: var(--red-300);
131
131
  fc-success: #00671d;
132
- fc-warning: #683e00;
132
+ fc-warning: var(--gold-500);
133
133
  fc-warning-hover: var(--black-900);
134
134
 
135
135
  // -- BASE TEMPLATE
@@ -4,28 +4,16 @@
4
4
  //
5
5
  // These are shared sizes for buttons, inputs, select menus (native),
6
6
  // and textareas.
7
- //
8
- // ============================================================================
9
- // $ CSS VARS
10
- // ============================================================================
11
- // I don't think these are used anymore. Confirm and remove.
12
- @input-button-vars: {
13
- input-button__padding: calc(var(--space-400) - var(--space-100)) var(--space-400);
14
- input-button__text-size: var(--fs-200);
15
- input-button__line-height: var(--lh4);
16
- input-button__icon-size: @icon-size18;
17
- }
18
-
19
7
  // ============================================================================
20
8
  // $ SHARED INPUT & BUTTON SIZES
21
9
  // ============================================================================
22
10
  // $$ EXTRA SMALL
23
- // Target height: 24px
24
11
  // ----------------------------------------------------------------------------
25
- .input-button-xs() {
26
- padding-top: var(--space-100 / 2); // .5rem
27
- padding-bottom: calc(var(--space-400) + var(--space-100)); // 5px
28
- font-size: var(--fs-100);
12
+ #d-internal__input-and-select-xs() {
13
+ --input-padding-y: calc(calc(var(--space-400) - var(--space-100)) - var(--input-border-width));
14
+ --input-padding-x: calc(var(--space-400) - var(--input-border-width));
15
+ --input-font-size: var(--fs-100);
16
+ --input-border-radius: var(--size-300);
29
17
 
30
18
  .d-btn__icon {
31
19
  width: @icon-size14;
@@ -34,14 +22,11 @@
34
22
  }
35
23
 
36
24
  // $$ SMALL
37
- // Target height: 32px
38
25
  // ----------------------------------------------------------------------------
39
- .input-button-sm() {
40
- --padding-y: calc(var(--space-300) + var(--space-200)); // 6
41
-
42
- padding-top: var(--padding-y);
43
- padding-bottom: var(--padding-y);
44
- font-size: var(--fs-200);
26
+ #d-internal__input-and-select-sm() {
27
+ --input-padding-y: calc(var(--space-400) - var(--input-border-width));
28
+ --input-padding-x: calc((var(--space-500) - var(--space-300)) - var(--input-border-width));
29
+ --input-font-size: var(--fs-100);
45
30
 
46
31
  .d-btn__icon {
47
32
  width: @icon-size16;
@@ -50,14 +35,12 @@
50
35
  }
51
36
 
52
37
  // $$ LARGE
53
- // Target height: 48px
54
38
  // ----------------------------------------------------------------------------
55
- .input-button-lg() {
56
- --padding-y: calc(calc(var(--space-300) + var(--space-200)) + calc(var(--space-300) + var(--space-200))); // 11 yes this is awkward
57
-
58
- padding-top: var(--padding-y);
59
- padding-bottom: var(--padding-y);
60
- font-size: var(--fs-300);
39
+ #d-internal__input-and-select-lg() {
40
+ --input-padding-y: calc((var(--space-400) + var(--space-200)) - var(--input-border-width));
41
+ --input-padding-x: calc(var(--space-500) - var(--input-border-width));
42
+ --input-font-size: var(--fs-300);
43
+ --input-border-radius: calc(var(--size-300) * 3);
61
44
 
62
45
  .d-btn__icon {
63
46
  width: @icon-size20;
@@ -66,14 +49,12 @@
66
49
  }
67
50
 
68
51
  // $$ EXTRA LARGE
69
- // Target height: 56px
70
52
  // ----------------------------------------------------------------------------
71
- .input-button-xl() {
72
- --padding-y: calc(calc(var(--space-400) + var(--space-300)) + var(--space-100)); // 13
73
-
74
- padding-top: var(--padding-y);
75
- padding-bottom: var(--padding-y);
76
- font-size: var(--fs-300);
53
+ #d-internal__input-and-select-xl() {
54
+ --input-padding-y: calc((var(--space-500) - var(--space-300)) - var(--input-border-width));
55
+ --input-padding-x: calc(var(--space-500) - var(--input-border-width));
56
+ --input-font-size: var(--fs-400);
57
+ --input-border-radius: var(--size-500);
77
58
 
78
59
  .d-btn__icon {
79
60
  width: @icon-size24;
@@ -81,6 +62,8 @@
81
62
  }
82
63
  }
83
64
 
65
+ #d-internals #spacing-classes(0.8rem, 'size');
66
+
84
67
  #d-internals #spacing-classes(0.8rem, 'size');
85
68
  #d-internals #spacing-classes(1.6rem, 'size', '-16');
86
69
  #d-internals #spacing-classes(3.2rem, 'size', '-32');
@@ -52,11 +52,13 @@
52
52
  @transition: {
53
53
  ttf-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
54
54
  ttf-out: cubic-bezier(0.23, 1, 0.32, 1);
55
+ ttf-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
55
56
  td0: 0s;
56
57
  td50: 50ms;
57
58
  td100: 100ms;
58
59
  td150: 150ms;
59
60
  td200: 200ms;
61
+ td300: 300ms;
60
62
  }
61
63
 
62
64