@dialpad/dialtone-css 1.0.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 (134) hide show
  1. package/CHANGELOG.json +1 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +64 -0
  4. package/lib/build/favicons/dialpad/favicon-beta-notification__512.png +0 -0
  5. package/lib/build/favicons/dialpad/favicon-beta__512.png +0 -0
  6. package/lib/build/favicons/dialpad/favicon-csr__512.png +0 -0
  7. package/lib/build/favicons/dialpad/favicon-notification__512.png +0 -0
  8. package/lib/build/favicons/dialpad/favicon-staging-notification__512.png +0 -0
  9. package/lib/build/favicons/dialpad/favicon-staging__512.png +0 -0
  10. package/lib/build/favicons/dialpad/favicon__512.png +0 -0
  11. package/lib/build/favicons/favicon-dialtone__512.png +0 -0
  12. package/lib/build/favicons/uberconference/favicon-uberconference__512.png +0 -0
  13. package/lib/build/fonts/Archivo-Bold.woff2 +0 -0
  14. package/lib/build/fonts/Archivo-Regular.woff2 +0 -0
  15. package/lib/build/fonts/Archivo-SemiBold.woff2 +0 -0
  16. package/lib/build/fonts/ArchivoExpanded-SemiBold.woff2 +0 -0
  17. package/lib/build/fonts/ArchivoSemiExpanded-Medium.woff2 +0 -0
  18. package/lib/build/fonts/ArchivoSemiExpanded-SemiBold.woff2 +0 -0
  19. package/lib/build/js/dialtone_health_check/deprecated_icons.cjs +105 -0
  20. package/lib/build/js/dialtone_health_check/index.cjs +82 -0
  21. package/lib/build/js/dialtone_health_check/non_dialtone_properties.cjs +44 -0
  22. package/lib/build/js/dialtone_migration_helper/configs/box-shadows.mjs +19 -0
  23. package/lib/build/js/dialtone_migration_helper/configs/colors.mjs +69 -0
  24. package/lib/build/js/dialtone_migration_helper/configs/fonts.mjs +49 -0
  25. package/lib/build/js/dialtone_migration_helper/configs/size-and-space.mjs +124 -0
  26. package/lib/build/js/dialtone_migration_helper/helpers.mjs +212 -0
  27. package/lib/build/js/dialtone_migration_helper/index.mjs +135 -0
  28. package/lib/build/less/components/avatar.less +169 -0
  29. package/lib/build/less/components/badge.less +139 -0
  30. package/lib/build/less/components/banner.less +77 -0
  31. package/lib/build/less/components/breadcrumbs.less +88 -0
  32. package/lib/build/less/components/button.less +554 -0
  33. package/lib/build/less/components/card.less +56 -0
  34. package/lib/build/less/components/chip.less +192 -0
  35. package/lib/build/less/components/codeblock.less +26 -0
  36. package/lib/build/less/components/collapsible.less +33 -0
  37. package/lib/build/less/components/combobox.less +28 -0
  38. package/lib/build/less/components/datepicker.less +146 -0
  39. package/lib/build/less/components/emoji-picker.less +223 -0
  40. package/lib/build/less/components/forms.less +153 -0
  41. package/lib/build/less/components/icon.less +63 -0
  42. package/lib/build/less/components/image-viewer.less +35 -0
  43. package/lib/build/less/components/input.less +321 -0
  44. package/lib/build/less/components/item-layout.less +53 -0
  45. package/lib/build/less/components/keyboard-shortcut.less +39 -0
  46. package/lib/build/less/components/link.less +130 -0
  47. package/lib/build/less/components/list-group.less +48 -0
  48. package/lib/build/less/components/list-item-group.less +17 -0
  49. package/lib/build/less/components/modal.less +340 -0
  50. package/lib/build/less/components/notice.less +171 -0
  51. package/lib/build/less/components/pagination.less +41 -0
  52. package/lib/build/less/components/popover.less +99 -0
  53. package/lib/build/less/components/presence.less +60 -0
  54. package/lib/build/less/components/radio-checkbox.less +278 -0
  55. package/lib/build/less/components/root-layout.less +125 -0
  56. package/lib/build/less/components/selects.less +152 -0
  57. package/lib/build/less/components/skeleton.less +101 -0
  58. package/lib/build/less/components/stack.less +129 -0
  59. package/lib/build/less/components/tab-panel.less +15 -0
  60. package/lib/build/less/components/table.less +118 -0
  61. package/lib/build/less/components/tabs.less +219 -0
  62. package/lib/build/less/components/toast.less +120 -0
  63. package/lib/build/less/components/toggle.less +173 -0
  64. package/lib/build/less/components/tooltip.less +267 -0
  65. package/lib/build/less/dialtone-globals.less +45 -0
  66. package/lib/build/less/dialtone-reset.less +362 -0
  67. package/lib/build/less/dialtone-variables.less +16 -0
  68. package/lib/build/less/dialtone.less +71 -0
  69. package/lib/build/less/themes/default.less +83 -0
  70. package/lib/build/less/themes/example.less +89 -0
  71. package/lib/build/less/utilities/backgrounds.less +139 -0
  72. package/lib/build/less/utilities/borders.less +196 -0
  73. package/lib/build/less/utilities/colors.less +122 -0
  74. package/lib/build/less/utilities/effects.less +210 -0
  75. package/lib/build/less/utilities/flex.less +227 -0
  76. package/lib/build/less/utilities/grid.less +244 -0
  77. package/lib/build/less/utilities/interactivity.less +69 -0
  78. package/lib/build/less/utilities/layout.less +146 -0
  79. package/lib/build/less/utilities/lint-staged.config.cjs +5 -0
  80. package/lib/build/less/utilities/sizing.less +152 -0
  81. package/lib/build/less/utilities/spacing.less +107 -0
  82. package/lib/build/less/utilities/typography.less +300 -0
  83. package/lib/build/less/variables/layout.less +19 -0
  84. package/lib/build/less/variables/sizes.less +64 -0
  85. package/lib/build/less/variables/typography.less +46 -0
  86. package/lib/build/less/variables/visual-styles.less +77 -0
  87. package/lib/build/svg/spot/blank-space.svg +35 -0
  88. package/lib/build/svg/spot/browser-list-callout.svg +27 -0
  89. package/lib/build/svg/spot/browser-table-graph.svg +37 -0
  90. package/lib/build/svg/spot/female-laptop-typing.svg +21 -0
  91. package/lib/build/svg/spot/file-upload.svg +50 -0
  92. package/lib/build/svg/spot/male-laptop-typing.svg +24 -0
  93. package/lib/build/svg/spot/mind.svg +58 -0
  94. package/lib/build/svg/spot/publish.svg +54 -0
  95. package/lib/build/svg/spot/vector-vortex.svg +53 -0
  96. package/lib/build/svg/spot/wireless-screenshare.svg +30 -0
  97. package/lib/dist/css/dialtone.css +18711 -0
  98. package/lib/dist/css/dialtone.min.css +1 -0
  99. package/lib/dist/fonts/Archivo-Bold.woff2 +0 -0
  100. package/lib/dist/fonts/Archivo-Regular.woff2 +0 -0
  101. package/lib/dist/fonts/Archivo-SemiBold.woff2 +0 -0
  102. package/lib/dist/fonts/ArchivoExpanded-SemiBold.woff2 +0 -0
  103. package/lib/dist/fonts/ArchivoSemiExpanded-Medium.woff2 +0 -0
  104. package/lib/dist/fonts/ArchivoSemiExpanded-SemiBold.woff2 +0 -0
  105. package/lib/dist/js/dialtone_health_check/deprecated_icons.cjs +105 -0
  106. package/lib/dist/js/dialtone_health_check/index.cjs +82 -0
  107. package/lib/dist/js/dialtone_health_check/non_dialtone_properties.cjs +44 -0
  108. package/lib/dist/js/dialtone_migration_helper/configs/box-shadows.mjs +19 -0
  109. package/lib/dist/js/dialtone_migration_helper/configs/colors.mjs +69 -0
  110. package/lib/dist/js/dialtone_migration_helper/configs/fonts.mjs +49 -0
  111. package/lib/dist/js/dialtone_migration_helper/configs/size-and-space.mjs +124 -0
  112. package/lib/dist/js/dialtone_migration_helper/helpers.mjs +212 -0
  113. package/lib/dist/js/dialtone_migration_helper/index.mjs +135 -0
  114. package/lib/dist/svg/spot/blank-space.svg +1 -0
  115. package/lib/dist/svg/spot/browser-list-callout.svg +1 -0
  116. package/lib/dist/svg/spot/browser-table-graph.svg +1 -0
  117. package/lib/dist/svg/spot/female-laptop-typing.svg +1 -0
  118. package/lib/dist/svg/spot/file-upload.svg +1 -0
  119. package/lib/dist/svg/spot/male-laptop-typing.svg +1 -0
  120. package/lib/dist/svg/spot/mind.svg +1 -0
  121. package/lib/dist/svg/spot/publish.svg +1 -0
  122. package/lib/dist/svg/spot/vector-vortex.svg +1 -0
  123. package/lib/dist/svg/spot/wireless-screenshare.svg +1 -0
  124. package/lib/dist/vue/spot/SpotBlankSpace.vue +3 -0
  125. package/lib/dist/vue/spot/SpotBrowserListCallout.vue +3 -0
  126. package/lib/dist/vue/spot/SpotBrowserTableGraph.vue +3 -0
  127. package/lib/dist/vue/spot/SpotFemaleLaptopTyping.vue +3 -0
  128. package/lib/dist/vue/spot/SpotFileUpload.vue +3 -0
  129. package/lib/dist/vue/spot/SpotMaleLaptopTyping.vue +3 -0
  130. package/lib/dist/vue/spot/SpotMind.vue +3 -0
  131. package/lib/dist/vue/spot/SpotPublish.vue +3 -0
  132. package/lib/dist/vue/spot/SpotVectorVortex.vue +3 -0
  133. package/lib/dist/vue/spot/SpotWirelessScreenshare.vue +3 -0
  134. package/package.json +115 -0
@@ -0,0 +1,554 @@
1
+ //
2
+ // DIALTONE
3
+ // COMPONENTS: BUTTONS
4
+ //
5
+ // These are button classes for Dialpad's design system Dialtone.
6
+ // For further documentation of these and other classes,
7
+ // visit https://dialpad.design/components/buttons
8
+ //
9
+ // TABLE OF CONTENTS
10
+ // • BASE STYLE
11
+ // • VISUAL STYLES
12
+ // • ALTERNATE STYLES
13
+ // • SIZES
14
+ //
15
+ // ============================================================================
16
+ // $ BASE STYLE
17
+ // ----------------------------------------------------------------------------
18
+
19
+ .d-btn,
20
+ .d-btn--md {
21
+ // Component specific CSS Vars
22
+ // ------------------------------------------------------------------------
23
+ --button-color-text: var(--dt-action-color-foreground-base-default);
24
+ --button-color-background: var(--dt-action-color-background-base-default);
25
+ --button-color-border: transparent;
26
+ --button-gap: calc(var(--button-padding-x) / 2);
27
+ --button-border-radius: var(--dt-size-400);
28
+ --button-border-width: var(--dt-size-100);
29
+ --button-font-size: var(--dt-font-size-200);
30
+ --button-font-weight: var(--dt-font-weight-medium);
31
+ --button-line-height-xs: var(--dt-font-line-height-200); // TODO: these used to vary, remove if all wind up all the same
32
+ --button-line-height-sm: var(--dt-font-line-height-200); // TODO: these used to vary, remove if all wind up all the same
33
+ --button-line-height-md: var(--dt-font-line-height-200); // TODO: these used to vary, remove if all wind up all the same
34
+ --button-line-height-lg: var(--dt-font-line-height-200); // TODO: these used to vary, remove if all wind up all the same
35
+ --button-line-height-xl: var(--dt-font-line-height-200); // TODO: these used to vary, remove if all wind up all the same
36
+ --button-line-height: var(--button-line-height-md);
37
+ --button-padding-y-xs: calc(calc(var(--dt-space-400) - var(--dt-space-100)) - var(--button-border-width)); // ((8 - 1) - border-width)
38
+ --button-padding-x-xs: calc(var(--dt-space-400) - var(--button-border-width)); // 8 minus border-width
39
+ --button-padding-y-sm: calc(var(--dt-space-400) - var(--button-border-width)); // 8 minus border-width
40
+ --button-padding-x-sm: calc(var(--dt-space-450) - var(--button-border-width)); // 12 minus border-width
41
+ --button-padding-y-md: calc(var(--dt-space-400) - var(--button-border-width)); // 8 minus border-width
42
+ --button-padding-x-md: calc(var(--dt-space-450) - var(--button-border-width)); // 12 minus border-width
43
+ --button-padding-y-lg: calc((var(--dt-space-400) + var(--dt-space-200)) - var(--button-border-width)); // 10 minus border-width
44
+ --button-padding-x-lg: calc(var(--dt-space-500) - var(--button-border-width)); // 16 minus border-width
45
+ --button-padding-y-xl: calc(var(--dt-space-450) - var(--button-border-width)); // 12 minus border-width
46
+ --button-padding-x-xl: calc(var(--dt-space-500) - var(--button-border-width)); // 16 minus border-width
47
+ --button-padding-y: var(--button-padding-y-md);
48
+ --button-padding-x: var(--button-padding-x-md);
49
+
50
+ position: relative;
51
+ display: inline-flex;
52
+ gap: var(--button-gap);
53
+ align-items: center;
54
+ justify-content: center;
55
+ box-sizing: border-box;
56
+ padding: var(--button-padding-y) var(--button-padding-x);
57
+ color: var(--button-color-text);
58
+ font-weight: var(--button-font-weight);
59
+ font-size: var(--button-font-size);
60
+ font-family: inherit;
61
+ line-height: var(--button-line-height);
62
+ text-transform: inherit;
63
+ text-decoration: none;
64
+ vertical-align: middle;
65
+ background-color: var(--button-color-background);
66
+ border-color: var(--button-color-border);
67
+ border-style: solid;
68
+ border-width: var(--button-border-width);
69
+ border-radius: var(--button-border-radius);
70
+ box-shadow: var(--button--bs);
71
+ cursor: pointer;
72
+ transition-timing-function: var(--ttf-out-quint);
73
+ transition-duration: var(--td200);
74
+ transition-property: background-color, border, box-shadow;
75
+ user-select: none;
76
+ fill: currentColor;
77
+
78
+ // -- STATES
79
+ // ------------------------------------------------------------------------
80
+ &:hover:not([disabled]) {
81
+ --button-color-text: var(--dt-action-color-foreground-base-hover);
82
+ --button-color-background: var(--dt-action-color-background-base-hover);
83
+ }
84
+
85
+ &:active:not([disabled]),
86
+ &.d-btn--active:not([disabled]),
87
+ &.d-btn--active:active:not([disabled]) {
88
+ --button-color-text: var(--dt-action-color-foreground-base-active);
89
+ --button-color-background: var(--dt-action-color-background-base-active);
90
+ }
91
+
92
+ &:focus-visible {
93
+ outline: none;
94
+ box-shadow: var(--dt-shadow-focus);
95
+ }
96
+
97
+ &[disabled] {
98
+ --button-color-border: transparent !important;
99
+ --button-color-text: var(--dt-action-color-foreground-disabled-default) !important;
100
+ --button-color-background: var(--dt-action-color-background-disabled-default) !important;
101
+
102
+ cursor: not-allowed;
103
+ transition: none;
104
+ }
105
+ }
106
+
107
+ // ============================================================================
108
+ // $ SIZES
109
+ // ----------------------------------------------------------------------------
110
+ // $$ EXTRA SMALL
111
+ // ----------------------------------------------------------------------------
112
+ .d-btn--xs {
113
+ --button-padding-y: var(--button-padding-y-xs);
114
+ --button-padding-x: var(--button-padding-x-xs);
115
+ --button-font-size: var(--dt-font-size-100);
116
+ --button-line-height: var(--button-line-height-xs);
117
+ --button-border-radius: var(--dt-size-300);
118
+ }
119
+
120
+ // $$ SMALL
121
+ // ----------------------------------------------------------------------------
122
+ .d-btn--sm {
123
+ --button-padding-y: var(--button-padding-y-sm);
124
+ --button-padding-x: var(--button-padding-x-sm);
125
+ --button-font-size: var(--dt-font-size-100);
126
+ --button-line-height: var(--button-line-height-sm);
127
+ }
128
+
129
+ // $$ MEDIUM
130
+ // ----------------
131
+ .d-btn--md {
132
+ //
133
+ }
134
+
135
+ // $$ LARGE
136
+ // ----------------------------------------------------------------------------
137
+ .d-btn--lg {
138
+ --button-padding-y: var(--button-padding-y-lg);
139
+ --button-padding-x: var(--button-padding-x-lg);
140
+ --button-font-size: var(--dt-font-size-300);
141
+ --button-line-height: var(--button-line-height-lg);
142
+ --button-border-radius: var(--dt-size-450);
143
+ }
144
+
145
+ // $$ EXTRA LARGE
146
+ // ----------------------------------------------------------------------------
147
+ .d-btn--xl {
148
+ --button-padding-y: var(--button-padding-y-xl);
149
+ --button-padding-x: var(--button-padding-x-xl);
150
+ --button-font-size: var(--dt-font-size-400);
151
+ --button-font-weight: var(--dt-font-weight-normal);
152
+ --button-line-height: var(--button-line-height-xl);
153
+ --button-border-radius: var(--dt-size-500);
154
+ }
155
+
156
+ // ============================================================================
157
+ // $ BUTTON LABEL
158
+ // ----------------------------------------------------------------------------
159
+ .d-btn__label {
160
+ display: inline-flex;
161
+ flex: 1 auto;
162
+ align-items: center;
163
+ justify-content: center;
164
+ // background-color: rgba(0,0,0,.5);
165
+ }
166
+
167
+ // ============================================================================
168
+ // $ BUTTON WITH ICON
169
+ // ----------------------------------------------------------------------------
170
+ .d-btn--vertical {
171
+ flex-direction: column;
172
+ }
173
+
174
+ .d-btn__icon {
175
+ display: flex;
176
+ // background-color: rgba(0,0,0,.5);
177
+
178
+ .d-icon {
179
+ // outline: 1px solid red;
180
+ // opacity: 0;
181
+ }
182
+ }
183
+
184
+
185
+ .d-btn__icon--left,
186
+ .d-btn__icon--top {
187
+ order: -1;
188
+ }
189
+
190
+ .d-btn__icon--right,
191
+ .d-btn__icon--bottom {
192
+ order: 1;
193
+ }
194
+
195
+ .d-btn__icon--left:not(:only-child) {
196
+ margin-left: var(--dt-space-200-negative);
197
+ }
198
+
199
+ .d-btn__icon--right:not(:only-child) {
200
+ margin-right: var(--dt-space-200-negative);
201
+ }
202
+
203
+ // ============================================================================
204
+ // $ VISUAL STYLES
205
+ // ----------------------------------------------------------------------------
206
+ // $$ CIRCLE BUTTONS
207
+ // ----------------------------------------------------------------------------
208
+ .d-btn--circle {
209
+ --button-padding-x: var(--button-padding-y-md);
210
+ --button-padding-y: var(--button-padding-y-md);
211
+ --button-color-text: var(--dt-action-color-foreground-muted-default);
212
+ --button-border-radius: var(--dt-size-radius-circle);
213
+
214
+ &:hover:not([disabled]) {
215
+ --button-color-text: var(--dt-action-color-foreground-muted-hover);
216
+ --button-color-background: var(--dt-action-color-background-muted-hover);
217
+ }
218
+
219
+ &:active:not([disabled]),
220
+ &.d-btn--active:not([disabled]),
221
+ &.d-btn--active:active:not([disabled]) {
222
+ --button-color-text: var(--dt-action-color-foreground-muted-active);
223
+ --button-color-background: var(--dt-action-color-background-muted-active);
224
+ }
225
+
226
+ .d-btn__icon {
227
+ margin: unset;
228
+ }
229
+
230
+ &.d-btn__label {
231
+ display: none;
232
+ }
233
+
234
+ &.d-btn--outlined {
235
+ --button-color-border: var(--dt-action-color-border-muted-outlined-default);
236
+ }
237
+
238
+ // Adjust padding based on sizes
239
+ &.d-btn--xs {
240
+ --button-padding-y: var(--button-padding-y-xs);
241
+ --button-padding-x: var(--button-padding-y-xs);
242
+ }
243
+
244
+ &.d-btn--sm {
245
+ --button-padding-y: var(--button-padding-y-sm);
246
+ --button-padding-x: var(--button-padding-y-sm);
247
+ }
248
+
249
+ &.d-btn--md {
250
+ --button-padding-x: var(--button-padding-y-md);
251
+ --button-padding-y: var(--button-padding-y-md);
252
+ }
253
+
254
+ &.d-btn--lg {
255
+ --button-padding-x: calc(var(--button-padding-y-lg) + var(--dt-space-100));
256
+ --button-padding-y: calc(var(--button-padding-y-lg) + var(--dt-space-100));
257
+ }
258
+
259
+ &.d-btn--xl {
260
+ --button-padding-x: calc(var(--button-padding-y-xl) + var(--dt-space-300));
261
+ --button-padding-y: calc(var(--button-padding-y-xl) + var(--dt-space-300));
262
+ }
263
+ }
264
+
265
+ // $$ OUTLINED BUTTON
266
+ // ----------------------------------------------------------------------------
267
+ .d-btn--outlined {
268
+ --button-color-border: var(--dt-action-color-border-base-outlined-default);
269
+ }
270
+
271
+ // $$ PRIMARY BUTTON
272
+ // ----------------------------------------------------------------------------
273
+ .d-btn--primary {
274
+ --button-color-text: var(--dt-action-color-foreground-base-primary-default);
275
+ --button-color-background: var(--dt-action-color-background-base-primary-default);
276
+
277
+ &:hover:not([disabled]) {
278
+ --button-color-text: var(--dt-action-color-foreground-base-primary-default);
279
+ --button-color-background: var(--dt-action-color-background-base-primary-hover);
280
+ }
281
+
282
+ &:active:not([disabled]),
283
+ &.d-btn--active:not([disabled]),
284
+ &.d-btn--active:active:not([disabled]) {
285
+ --button-color-text: var(--dt-action-color-foreground-base-primary-default);
286
+ --button-color-background: var(--dt-action-color-background-base-primary-active);
287
+ }
288
+ }
289
+
290
+ // $$ MUTED BUTTON
291
+ // ----------------------------------------------------------------------------
292
+ .d-btn--muted {
293
+ --button-color-text: var(--dt-action-color-foreground-muted-default);
294
+
295
+ &:hover:not([disabled]) {
296
+ --button-color-text: var(--dt-action-color-foreground-muted-hover);
297
+ --button-color-background: var(--dt-action-color-background-muted-hover);
298
+ }
299
+
300
+ &:active:not([disabled]),
301
+ &.d-btn--active:not([disabled]),
302
+ &.d-btn--active:active:not([disabled]) {
303
+ --button-color-text: var(--dt-action-color-foreground-muted-active);
304
+ --button-color-background: var(--dt-action-color-background-muted-active);
305
+ }
306
+
307
+ &.d-btn--outlined {
308
+ --button-color-border: var(--dt-action-color-border-muted-outlined-default);
309
+ }
310
+ }
311
+
312
+ // $$ DANGER BUTTON
313
+ // ----------------------------------------------------------------------------
314
+ .d-btn--danger {
315
+ --button-color-text: var(--dt-action-color-foreground-critical-default);
316
+ --button-color-background: var(--dt-action-color-background-critical-default);
317
+
318
+ &:hover:not([disabled]) {
319
+ --button-color-text: var(--dt-action-color-foreground-critical-hover);
320
+ --button-color-background: var(--dt-action-color-background-critical-hover);
321
+ }
322
+
323
+ &:active:not([disabled]),
324
+ &.d-btn--active:not([disabled]),
325
+ &.d-btn--active:active:not([disabled]) {
326
+ --button-color-text: var(--dt-action-color-foreground-critical-active);
327
+ --button-color-background: var(--dt-action-color-background-critical-active);
328
+ }
329
+
330
+ &.d-btn--outlined {
331
+ --button-color-border: var(--dt-action-color-border-critical-outlined-default);
332
+ }
333
+
334
+ &.d-btn--primary {
335
+ --button-color-text: var(--dt-action-color-foreground-critical-primary-default);
336
+ --button-color-background: var(--dt-action-color-background-critical-primary-default);
337
+
338
+ &:hover:not([disabled]) {
339
+ --button-color-text: var(--dt-action-color-foreground-critical-primary-default);
340
+ --button-color-background: var(--dt-action-color-background-critical-primary-hover);
341
+ }
342
+
343
+ &:active:not([disabled]),
344
+ &.d-btn--active:not([disabled]),
345
+ &.d-btn--active:active:not([disabled]) {
346
+ --button-color-text: var(--dt-action-color-foreground-critical-primary-default);
347
+ --button-color-background: var(--dt-action-color-background-critical-primary-active);
348
+ }
349
+ }
350
+ }
351
+
352
+ // $$ INVERTED BUTTON
353
+ // ----------------------------------------------------------------------------
354
+ // -- Base, clear inverted button
355
+ .d-btn--inverted {
356
+ --button-color-text: var(--dt-action-color-foreground-inverted-default);
357
+ --button-color-background: var(--dt-action-color-background-inverted-default);
358
+
359
+ &:hover:not([disabled]) {
360
+ --button-color-text: var(--dt-action-color-foreground-inverted-hover);
361
+ --button-color-background: var(--dt-action-color-background-inverted-hover);
362
+ }
363
+
364
+ &:active:not([disabled]),
365
+ &.d-btn--active:not([disabled]),
366
+ &.d-btn--active:active:not([disabled]) {
367
+ --button-color-text: var(--dt-action-color-foreground-inverted-active);
368
+ --button-color-background: var(--dt-action-color-background-inverted-active);
369
+ }
370
+
371
+ // -- OUTLINED
372
+ &.d-btn--outlined {
373
+ --button-color-border: var(--dt-action-color-border-inverted-outlined-default);
374
+ }
375
+
376
+ // -- PRIMARY
377
+ &.d-btn--primary {
378
+ --button-color-text: var(--dt-action-color-foreground-inverted-primary-default);
379
+ --button-color-background: var(--dt-action-color-background-inverted-primary-default);
380
+
381
+ &:hover:not([disabled]) {
382
+ --button-color-text: var(--dt-action-color-foreground-inverted-primary-hover);
383
+ --button-color-background: var(--dt-action-color-background-inverted-primary-hover);
384
+ }
385
+
386
+ &:active:not([disabled]),
387
+ &.d-btn--active:not([disabled]),
388
+ &.d-btn--active:active:not([disabled]) {
389
+ --button-color-text: var(--dt-action-color-foreground-inverted-primary-active);
390
+ --button-color-background: var(--dt-action-color-background-inverted-primary-active);
391
+ }
392
+ }
393
+ }
394
+
395
+ // $$ ICON ONLY
396
+ // ----------------------------------------------------------------------------
397
+ .d-btn--icon-only {
398
+ --button-padding-x: var(--button-padding-y-md);
399
+ --button-padding-y: var(--button-padding-y-md);
400
+
401
+ .d-btn__icon {
402
+ margin: unset;
403
+ }
404
+
405
+ // Adjust padding based on sizes
406
+ &.d-btn--xs {
407
+ --button-padding-y: var(--button-padding-y-xs);
408
+ --button-padding-x: var(--button-padding-y-xs);
409
+ }
410
+
411
+ &.d-btn--sm {
412
+ --button-padding-y: var(--button-padding-y-sm);
413
+ --button-padding-x: var(--button-padding-y-sm);
414
+ }
415
+
416
+ &.d-btn--md {
417
+ --button-padding-x: var(--button-padding-y-md);
418
+ --button-padding-y: var(--button-padding-y-md);
419
+ }
420
+
421
+ &.d-btn--lg {
422
+ --button-padding-x: calc(var(--button-padding-y-lg) + var(--dt-space-100));
423
+ --button-padding-y: calc(var(--button-padding-y-lg) + var(--dt-space-100));
424
+ }
425
+
426
+ &.d-btn--xl {
427
+ --button-padding-x: calc(var(--button-padding-y-xl) + var(--dt-space-300));
428
+ --button-padding-y: calc(var(--button-padding-y-xl) + var(--dt-space-300));
429
+ }
430
+ }
431
+
432
+ // $$ LOADING STATE
433
+ // ----------------------------------------------------------------------------
434
+ .d-btn--loading {
435
+ .d-btn-loading();
436
+ }
437
+
438
+ // $$ DISABLED STATE
439
+ // ----------------------------------------------------------------------------
440
+ .d-btn--disabled {
441
+ --button-color-text: var(--dt-action-color-foreground-disabled-default) !important;
442
+ --button-color-background: var(--dt-action-color-background-disabled-default) !important;
443
+ --button-color-border: transparent !important;
444
+
445
+ cursor: not-allowed;
446
+ transition: none;
447
+ pointer-events: none;
448
+ }
449
+
450
+ // $$ BRAND BUTTONS
451
+ // ----------------------------------------------------------------------------
452
+ .d-btn--brand {
453
+ --button-color-text: var(--dt-color-neutral-white);
454
+ --button-color-background: hsl(var(--brand-color-h) var(--brand-color-s) var(--brand-color-l));
455
+
456
+ display: flex;
457
+
458
+ &:hover:not([disabled]),
459
+ &:active:not([disabled]) {
460
+ --button-color-text: hsla(var(--dt-color-neutral-white-hsl) ~' / ' 90%);
461
+ --button-color-background: hsl(var(--brand-color-h) calc(var(--brand-color-s) + 2.5%) calc(var(--brand-color-l) - 5%));
462
+ }
463
+
464
+ &:focus-visible {
465
+ box-shadow: 0 0 0 var(--dt-space-100) var(--dt-color-neutral-white), 0 0 0 0.25em hsla(var(--brand-color-h) var(--brand-color-s) var(--brand-color-l) ~' / ' 90%);
466
+ }
467
+
468
+ &:active:not([disabled]) {
469
+ --button-color-background: hsl(var(--brand-color-h) calc(var(--brand-color-s) + 5%) calc(var(--brand-color-l) - 10%));
470
+ }
471
+
472
+ .d-btn__icon {
473
+ align-items: center;
474
+ justify-content: center;
475
+ width: 2em;
476
+ height: 2em;
477
+ margin-right: var(--dt-space-400);
478
+ margin-left: var(--dt-space-300-negative);
479
+ background-color: var(--dt-color-neutral-white);
480
+ border-radius: var(--dt-size-radius-200);
481
+ }
482
+
483
+ .d-btn__label {
484
+ flex: 1 auto;
485
+ }
486
+ }
487
+
488
+ // -- GOOGLE
489
+ .d-btn--google {
490
+ --brand-color-h: 217;
491
+ --brand-color-s: 89%;
492
+ --brand-color-l: 61%;
493
+ }
494
+ // -- OFFICE 365
495
+ .d-btn--o365 {
496
+ --brand-color-h: 15;
497
+ --brand-color-s: 99%;
498
+ --brand-color-l: 46%;
499
+ }
500
+ // -- LINKEDIN
501
+ .d-btn--linkedin {
502
+ --brand-color-h: 197;
503
+ --brand-color-s: 100%;
504
+ --brand-color-l: 26%;
505
+ }
506
+
507
+ // ============================================================================
508
+ // @ BUTTON LOADER
509
+ // Changes the button
510
+ // ----------------------------------------------------------------------------
511
+ // @@ BASE STYLE
512
+ // ----------------------------------------------------------------------------
513
+ .d-btn-loading() {
514
+ // Disable clicking while the loader is in place
515
+ pointer-events: none;
516
+
517
+ // Hide anything that was there before
518
+ .d-btn__icon,
519
+ .d-btn__label {
520
+ opacity: 0;
521
+ transition: opacity 50ms var(--ttf-in-out);
522
+ }
523
+
524
+ // Show the loading animation
525
+ &::before {
526
+ position: absolute;
527
+ width: var(--dt-size-500);
528
+ height: var(--dt-size-500);
529
+ border: var(--dt-size-200) solid currentColor;
530
+ border-left-color: transparent !important;
531
+ border-radius: var(--dt-size-radius-circle);
532
+ animation: d-loading-circle 900ms infinite linear;
533
+ content: '';
534
+ }
535
+ }
536
+
537
+ // ============================================================================
538
+ // $ BUTTON GROUP
539
+ // ----------------------------------------------------------------------------
540
+ .d-btn-group {
541
+ display: flex;
542
+
543
+ &--start {
544
+ justify-content: flex-start;
545
+ }
546
+
547
+ &--end {
548
+ justify-content: flex-end;
549
+ }
550
+
551
+ &--space-between {
552
+ justify-content: space-between;
553
+ }
554
+ }
@@ -0,0 +1,56 @@
1
+ //
2
+ // DIALTONE
3
+ // COMPONENTS: CARD
4
+ //
5
+ // These are card classes for Dialpad's design system Dialtone.
6
+ // For further documentation of these and other classes,
7
+ // visit https://dialpad.design/components/card
8
+ //
9
+ // TABLE OF CONTENTS
10
+ // • BASE STYLE
11
+ // • HEADER
12
+ // • CONTENT
13
+ // • FOOTER
14
+ //
15
+ // ============================================================================
16
+ // $ BASE STYLE
17
+ // ============================================================================
18
+ // $$ WRAPPER
19
+ // ----------------------------------------------------------------------------
20
+ .d-card {
21
+ display: flex;
22
+ flex-direction: column;
23
+ justify-content: center;
24
+ background: var(--dt-color-surface-primary);
25
+ border-radius: var(--dt-size-300);
26
+ box-shadow: var(--dt-shadow-card);
27
+ }
28
+
29
+
30
+ // ============================================================================
31
+ // $ CARD AREAS
32
+ // ----------------------------------------------------------------------------
33
+ // $$ HEADER
34
+ // ----------------------------------------------------------------------------
35
+ .d-card__header {
36
+ display: flex;
37
+ flex-direction: row;
38
+ align-items: center;
39
+ justify-content: space-between;
40
+ padding: var(--dt-size-500) var(--dt-size-500) 0;
41
+ }
42
+
43
+ // $$ CONTENT
44
+ // ----------------------------------------------------------------------------
45
+ .d-card__content {
46
+ padding: var(--dt-space-500);
47
+ overflow-y: auto;
48
+ }
49
+
50
+ // $$ FOOTER
51
+ // ----------------------------------------------------------------------------
52
+ .d-card__footer {
53
+ display: flex;
54
+ align-items: center;
55
+ padding: 0 var(--dt-space-500) var(--dt-space-500);
56
+ }