@workday/canvas-kit-react 11.0.0-alpha.629-next.0 → 11.0.0-alpha.633-next.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/badge/lib/CountBadge.tsx +71 -46
- package/common/lib/CanvasProvider.tsx +56 -14
- package/dist/commonjs/badge/lib/CountBadge.d.ts +22 -3
- package/dist/commonjs/badge/lib/CountBadge.d.ts.map +1 -1
- package/dist/commonjs/badge/lib/CountBadge.js +48 -42
- package/dist/commonjs/button/lib/BaseButton.js +17 -17
- package/dist/commonjs/button/lib/DeleteButton.js +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
- package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
- package/dist/commonjs/button/lib/TertiaryButton.js +15 -15
- package/dist/commonjs/common/lib/CanvasProvider.d.ts +258 -0
- package/dist/commonjs/common/lib/CanvasProvider.d.ts.map +1 -1
- package/dist/commonjs/common/lib/CanvasProvider.js +17 -8
- package/dist/commonjs/popup/lib/hooks/usePopupStack.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/hooks/usePopupStack.js +30 -0
- package/dist/commonjs/select/lib/Select.js +1 -1
- package/dist/es6/badge/lib/CountBadge.d.ts +22 -3
- package/dist/es6/badge/lib/CountBadge.d.ts.map +1 -1
- package/dist/es6/badge/lib/CountBadge.js +47 -37
- package/dist/es6/button/lib/BaseButton.js +17 -17
- package/dist/es6/button/lib/DeleteButton.js +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +2 -2
- package/dist/es6/button/lib/SecondaryButton.js +2 -2
- package/dist/es6/button/lib/TertiaryButton.js +15 -15
- package/dist/es6/common/lib/CanvasProvider.d.ts +258 -0
- package/dist/es6/common/lib/CanvasProvider.d.ts.map +1 -1
- package/dist/es6/common/lib/CanvasProvider.js +15 -7
- package/dist/es6/popup/lib/hooks/usePopupStack.d.ts.map +1 -1
- package/dist/es6/popup/lib/hooks/usePopupStack.js +31 -1
- package/dist/es6/select/lib/Select.js +1 -1
- package/package.json +4 -4
- package/popup/lib/hooks/usePopupStack.ts +33 -1
|
@@ -3,5 +3,263 @@ import { PartialEmotionCanvasTheme } from './theming';
|
|
|
3
3
|
export interface CanvasProviderProps {
|
|
4
4
|
theme?: PartialEmotionCanvasTheme;
|
|
5
5
|
}
|
|
6
|
+
export declare const useCanvasThemeToCssVars: (theme: PartialEmotionCanvasTheme | undefined, elemProps: React.HTMLAttributes<HTMLElement>) => {
|
|
7
|
+
className: string;
|
|
8
|
+
style: React.CSSProperties;
|
|
9
|
+
defaultChecked?: boolean | undefined;
|
|
10
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
11
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
12
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
13
|
+
accessKey?: string | undefined;
|
|
14
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
|
|
15
|
+
contextMenu?: string | undefined;
|
|
16
|
+
dir?: string | undefined;
|
|
17
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
18
|
+
hidden?: boolean | undefined;
|
|
19
|
+
id?: string | undefined;
|
|
20
|
+
lang?: string | undefined;
|
|
21
|
+
placeholder?: string | undefined;
|
|
22
|
+
slot?: string | undefined;
|
|
23
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
24
|
+
tabIndex?: number | undefined;
|
|
25
|
+
title?: string | undefined;
|
|
26
|
+
translate?: "no" | "yes" | undefined;
|
|
27
|
+
radioGroup?: string | undefined;
|
|
28
|
+
role?: React.AriaRole | undefined;
|
|
29
|
+
about?: string | undefined;
|
|
30
|
+
datatype?: string | undefined;
|
|
31
|
+
inlist?: any;
|
|
32
|
+
prefix?: string | undefined;
|
|
33
|
+
property?: string | undefined;
|
|
34
|
+
resource?: string | undefined;
|
|
35
|
+
typeof?: string | undefined;
|
|
36
|
+
vocab?: string | undefined;
|
|
37
|
+
autoCapitalize?: string | undefined;
|
|
38
|
+
autoCorrect?: string | undefined;
|
|
39
|
+
autoSave?: string | undefined;
|
|
40
|
+
color?: string | undefined;
|
|
41
|
+
itemProp?: string | undefined;
|
|
42
|
+
itemScope?: boolean | undefined;
|
|
43
|
+
itemType?: string | undefined;
|
|
44
|
+
itemID?: string | undefined;
|
|
45
|
+
itemRef?: string | undefined;
|
|
46
|
+
results?: number | undefined;
|
|
47
|
+
security?: string | undefined;
|
|
48
|
+
unselectable?: "on" | "off" | undefined;
|
|
49
|
+
inputMode?: "search" | "none" | "text" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
|
|
50
|
+
is?: string | undefined;
|
|
51
|
+
'aria-activedescendant'?: string | undefined;
|
|
52
|
+
'aria-atomic'?: (boolean | "true" | "false") | undefined;
|
|
53
|
+
'aria-autocomplete'?: "none" | "list" | "both" | "inline" | undefined;
|
|
54
|
+
'aria-busy'?: (boolean | "true" | "false") | undefined;
|
|
55
|
+
'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
56
|
+
'aria-colcount'?: number | undefined;
|
|
57
|
+
'aria-colindex'?: number | undefined;
|
|
58
|
+
'aria-colspan'?: number | undefined;
|
|
59
|
+
'aria-controls'?: string | undefined;
|
|
60
|
+
'aria-current'?: boolean | "time" | "date" | "true" | "false" | "page" | "step" | "location" | undefined;
|
|
61
|
+
'aria-describedby'?: string | undefined;
|
|
62
|
+
'aria-details'?: string | undefined;
|
|
63
|
+
'aria-disabled'?: (boolean | "true" | "false") | undefined;
|
|
64
|
+
'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
65
|
+
'aria-errormessage'?: string | undefined;
|
|
66
|
+
'aria-expanded'?: (boolean | "true" | "false") | undefined;
|
|
67
|
+
'aria-flowto'?: string | undefined;
|
|
68
|
+
'aria-grabbed'?: (boolean | "true" | "false") | undefined;
|
|
69
|
+
'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined;
|
|
70
|
+
'aria-hidden'?: (boolean | "true" | "false") | undefined;
|
|
71
|
+
'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
72
|
+
'aria-keyshortcuts'?: string | undefined;
|
|
73
|
+
'aria-label'?: string | undefined;
|
|
74
|
+
'aria-labelledby'?: string | undefined;
|
|
75
|
+
'aria-level'?: number | undefined;
|
|
76
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
77
|
+
'aria-modal'?: (boolean | "true" | "false") | undefined;
|
|
78
|
+
'aria-multiline'?: (boolean | "true" | "false") | undefined;
|
|
79
|
+
'aria-multiselectable'?: (boolean | "true" | "false") | undefined;
|
|
80
|
+
'aria-orientation'?: "horizontal" | "vertical" | undefined;
|
|
81
|
+
'aria-owns'?: string | undefined;
|
|
82
|
+
'aria-placeholder'?: string | undefined;
|
|
83
|
+
'aria-posinset'?: number | undefined;
|
|
84
|
+
'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
|
|
85
|
+
'aria-readonly'?: (boolean | "true" | "false") | undefined;
|
|
86
|
+
'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
87
|
+
'aria-required'?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
'aria-roledescription'?: string | undefined;
|
|
89
|
+
'aria-rowcount'?: number | undefined;
|
|
90
|
+
'aria-rowindex'?: number | undefined;
|
|
91
|
+
'aria-rowspan'?: number | undefined;
|
|
92
|
+
'aria-selected'?: (boolean | "true" | "false") | undefined;
|
|
93
|
+
'aria-setsize'?: number | undefined;
|
|
94
|
+
'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
95
|
+
'aria-valuemax'?: number | undefined;
|
|
96
|
+
'aria-valuemin'?: number | undefined;
|
|
97
|
+
'aria-valuenow'?: number | undefined;
|
|
98
|
+
'aria-valuetext'?: string | undefined;
|
|
99
|
+
children?: React.ReactNode;
|
|
100
|
+
dangerouslySetInnerHTML?: {
|
|
101
|
+
__html: string;
|
|
102
|
+
} | undefined;
|
|
103
|
+
onCopy?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
104
|
+
onCopyCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
105
|
+
onCut?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
106
|
+
onCutCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
107
|
+
onPaste?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
108
|
+
onPasteCapture?: React.ClipboardEventHandler<HTMLElement> | undefined;
|
|
109
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
110
|
+
onCompositionEndCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
111
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
112
|
+
onCompositionStartCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
113
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
114
|
+
onCompositionUpdateCapture?: React.CompositionEventHandler<HTMLElement> | undefined;
|
|
115
|
+
onFocus?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
116
|
+
onFocusCapture?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
117
|
+
onBlur?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
118
|
+
onBlurCapture?: React.FocusEventHandler<HTMLElement> | undefined;
|
|
119
|
+
onChange?: React.FormEventHandler<HTMLElement> | undefined;
|
|
120
|
+
onChangeCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
121
|
+
onBeforeInput?: React.FormEventHandler<HTMLElement> | undefined;
|
|
122
|
+
onBeforeInputCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
123
|
+
onInput?: React.FormEventHandler<HTMLElement> | undefined;
|
|
124
|
+
onInputCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
125
|
+
onReset?: React.FormEventHandler<HTMLElement> | undefined;
|
|
126
|
+
onResetCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
127
|
+
onSubmit?: React.FormEventHandler<HTMLElement> | undefined;
|
|
128
|
+
onSubmitCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
129
|
+
onInvalid?: React.FormEventHandler<HTMLElement> | undefined;
|
|
130
|
+
onInvalidCapture?: React.FormEventHandler<HTMLElement> | undefined;
|
|
131
|
+
onLoad?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
132
|
+
onLoadCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
133
|
+
onError?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
134
|
+
onErrorCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
135
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
136
|
+
onKeyDownCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
137
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
138
|
+
onKeyPressCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
139
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
140
|
+
onKeyUpCapture?: React.KeyboardEventHandler<HTMLElement> | undefined;
|
|
141
|
+
onAbort?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
142
|
+
onAbortCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
143
|
+
onCanPlay?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
144
|
+
onCanPlayCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
145
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
146
|
+
onCanPlayThroughCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
147
|
+
onDurationChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
148
|
+
onDurationChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
149
|
+
onEmptied?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
150
|
+
onEmptiedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
151
|
+
onEncrypted?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
152
|
+
onEncryptedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
153
|
+
onEnded?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
154
|
+
onEndedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
155
|
+
onLoadedData?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
156
|
+
onLoadedDataCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
157
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
158
|
+
onLoadedMetadataCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
159
|
+
onLoadStart?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
160
|
+
onLoadStartCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
161
|
+
onPause?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
162
|
+
onPauseCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
163
|
+
onPlay?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
164
|
+
onPlayCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
165
|
+
onPlaying?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
166
|
+
onPlayingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
167
|
+
onProgress?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
168
|
+
onProgressCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
169
|
+
onRateChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
170
|
+
onRateChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
171
|
+
onSeeked?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
172
|
+
onSeekedCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
173
|
+
onSeeking?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
174
|
+
onSeekingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
175
|
+
onStalled?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
176
|
+
onStalledCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
177
|
+
onSuspend?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
178
|
+
onSuspendCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
179
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
180
|
+
onTimeUpdateCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
181
|
+
onVolumeChange?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
182
|
+
onVolumeChangeCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
183
|
+
onWaiting?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
184
|
+
onWaitingCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
185
|
+
onAuxClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
186
|
+
onAuxClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
187
|
+
onClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
188
|
+
onClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
189
|
+
onContextMenu?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
190
|
+
onContextMenuCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
191
|
+
onDoubleClick?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
192
|
+
onDoubleClickCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
193
|
+
onDrag?: React.DragEventHandler<HTMLElement> | undefined;
|
|
194
|
+
onDragCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
195
|
+
onDragEnd?: React.DragEventHandler<HTMLElement> | undefined;
|
|
196
|
+
onDragEndCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
197
|
+
onDragEnter?: React.DragEventHandler<HTMLElement> | undefined;
|
|
198
|
+
onDragEnterCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
199
|
+
onDragExit?: React.DragEventHandler<HTMLElement> | undefined;
|
|
200
|
+
onDragExitCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
201
|
+
onDragLeave?: React.DragEventHandler<HTMLElement> | undefined;
|
|
202
|
+
onDragLeaveCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
203
|
+
onDragOver?: React.DragEventHandler<HTMLElement> | undefined;
|
|
204
|
+
onDragOverCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
205
|
+
onDragStart?: React.DragEventHandler<HTMLElement> | undefined;
|
|
206
|
+
onDragStartCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
207
|
+
onDrop?: React.DragEventHandler<HTMLElement> | undefined;
|
|
208
|
+
onDropCapture?: React.DragEventHandler<HTMLElement> | undefined;
|
|
209
|
+
onMouseDown?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
210
|
+
onMouseDownCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
211
|
+
onMouseEnter?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
212
|
+
onMouseLeave?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
213
|
+
onMouseMove?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
214
|
+
onMouseMoveCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
215
|
+
onMouseOut?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
216
|
+
onMouseOutCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
217
|
+
onMouseOver?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
218
|
+
onMouseOverCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
219
|
+
onMouseUp?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
220
|
+
onMouseUpCapture?: React.MouseEventHandler<HTMLElement> | undefined;
|
|
221
|
+
onSelect?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
222
|
+
onSelectCapture?: React.ReactEventHandler<HTMLElement> | undefined;
|
|
223
|
+
onTouchCancel?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
224
|
+
onTouchCancelCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
225
|
+
onTouchEnd?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
226
|
+
onTouchEndCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
227
|
+
onTouchMove?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
228
|
+
onTouchMoveCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
229
|
+
onTouchStart?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
230
|
+
onTouchStartCapture?: React.TouchEventHandler<HTMLElement> | undefined;
|
|
231
|
+
onPointerDown?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
232
|
+
onPointerDownCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
233
|
+
onPointerMove?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
234
|
+
onPointerMoveCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
235
|
+
onPointerUp?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
236
|
+
onPointerUpCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
237
|
+
onPointerCancel?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
238
|
+
onPointerCancelCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
239
|
+
onPointerEnter?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
240
|
+
onPointerEnterCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
241
|
+
onPointerLeave?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
242
|
+
onPointerLeaveCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
243
|
+
onPointerOver?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
244
|
+
onPointerOverCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
245
|
+
onPointerOut?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
246
|
+
onPointerOutCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
247
|
+
onGotPointerCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
248
|
+
onGotPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
249
|
+
onLostPointerCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
250
|
+
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLElement> | undefined;
|
|
251
|
+
onScroll?: React.UIEventHandler<HTMLElement> | undefined;
|
|
252
|
+
onScrollCapture?: React.UIEventHandler<HTMLElement> | undefined;
|
|
253
|
+
onWheel?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
254
|
+
onWheelCapture?: React.WheelEventHandler<HTMLElement> | undefined;
|
|
255
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
256
|
+
onAnimationStartCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
257
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
258
|
+
onAnimationEndCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
259
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
260
|
+
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
|
|
261
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
262
|
+
onTransitionEndCapture?: React.TransitionEventHandler<HTMLElement> | undefined;
|
|
263
|
+
};
|
|
6
264
|
export declare const CanvasProvider: ({ children, theme, ...props }: CanvasProviderProps & React.HTMLAttributes<HTMLElement>) => JSX.Element;
|
|
7
265
|
//# sourceMappingURL=CanvasProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CanvasProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/CanvasProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAqB,yBAAyB,EAAW,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"CanvasProvider.d.ts","sourceRoot":"","sources":["../../../../common/lib/CanvasProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAqB,yBAAyB,EAAW,MAAM,WAAW,CAAC;AAMlF,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACnC;AAkDD,eAAO,MAAM,uBAAuB,UAC3B,yBAAyB,GAAG,SAAS,aACjC,MAAM,cAAc,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqB7C,CAAC;AAEF,eAAO,MAAM,cAAc,kCAIxB,mBAAmB,GAAG,MAAM,cAAc,CAAC,WAAW,CAAC,gBAezD,CAAC"}
|
|
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.CanvasProvider = void 0;
|
|
22
|
+
exports.CanvasProvider = exports.useCanvasThemeToCssVars = void 0;
|
|
23
23
|
const React = __importStar(require("react"));
|
|
24
24
|
const react_1 = require("@emotion/react");
|
|
25
25
|
const InputProvider_1 = require("./InputProvider");
|
|
@@ -27,6 +27,9 @@ const theming_1 = require("./theming");
|
|
|
27
27
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
28
28
|
// eslint-disable-next-line @emotion/no-vanilla
|
|
29
29
|
const css_1 = require("@emotion/css");
|
|
30
|
+
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
31
|
+
// copied from brand/_variables.css
|
|
32
|
+
const defaultBranding = canvas_kit_styling_1.createStyles({ name: "b5n40", styles: "--cnvs-brand-error-darkest{}--cnvs-brand-common-alert-inner{}--cnvs-brand-common-error-inner{}--cnvs-brand-common-focus-outline{}--cnvs-brand-neutral-accent{}--cnvs-brand-neutral-darkest{}--cnvs-brand-neutral-dark{}--cnvs-brand-neutral-base{}--cnvs-brand-neutral-light{}--cnvs-brand-neutral-lightest{}--cnvs-brand-success-accent{}--cnvs-brand-success-darkest{}--cnvs-brand-success-dark{}--cnvs-brand-success-base{}--cnvs-brand-success-light{}--cnvs-brand-success-lightest{}--cnvs-brand-error-accent{}--cnvs-brand-error-dark{}--cnvs-brand-error-base{}--cnvs-brand-error-light{}--cnvs-brand-error-lightest{}--cnvs-brand-alert-accent{}--cnvs-brand-alert-darkest{}--cnvs-brand-alert-dark{}--cnvs-brand-alert-base{}--cnvs-brand-alert-light{}--cnvs-brand-alert-lightest{}--cnvs-brand-primary-accent{}--cnvs-brand-primary-darkest{}--cnvs-brand-primary-dark{}--cnvs-brand-primary-base{}--cnvs-brand-primary-light{}--cnvs-brand-primary-lightest{}--cnvs-brand-gradient-primary{}" });
|
|
30
33
|
const mappedKeys = {
|
|
31
34
|
lightest: 'lightest',
|
|
32
35
|
light: 'light',
|
|
@@ -37,23 +40,29 @@ const mappedKeys = {
|
|
|
37
40
|
};
|
|
38
41
|
const useCanvasThemeToCssVars = (theme, elemProps) => {
|
|
39
42
|
const filledTheme = theming_1.useTheme(theme);
|
|
43
|
+
const className = (elemProps.className || '').split(' ').concat(defaultBranding).join(' ');
|
|
44
|
+
const style = elemProps.style || {};
|
|
40
45
|
const { palette } = filledTheme.canvas;
|
|
41
|
-
|
|
46
|
+
['common', 'primary', 'error', 'alert', 'success', 'neutral'].forEach(color => {
|
|
42
47
|
if (color === 'common') {
|
|
43
48
|
// @ts-ignore
|
|
44
|
-
|
|
49
|
+
style[canvas_tokens_web_1.brand.common.focusOutline] = palette.common.focusOutline;
|
|
45
50
|
}
|
|
46
51
|
['lightest', 'light', 'main', 'dark', 'darkest', 'contrast'].forEach(key => {
|
|
52
|
+
// We only want to set custom colors if they do not match the default. The `defaultBranding` class will take care of the rest.
|
|
47
53
|
// @ts-ignore
|
|
48
|
-
|
|
54
|
+
if (palette[color][key] !== theming_1.defaultCanvasTheme.palette[color][key]) {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
style[canvas_tokens_web_1.brand[color][mappedKeys[key]]] = palette[color][key];
|
|
57
|
+
}
|
|
49
58
|
});
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
return { ...elemProps, style };
|
|
59
|
+
});
|
|
60
|
+
return { ...elemProps, className, style };
|
|
53
61
|
};
|
|
62
|
+
exports.useCanvasThemeToCssVars = useCanvasThemeToCssVars;
|
|
54
63
|
const CanvasProvider = ({ children, theme = { canvas: theming_1.defaultCanvasTheme }, ...props }) => {
|
|
55
64
|
var _a;
|
|
56
|
-
const elemProps = useCanvasThemeToCssVars(theme, props);
|
|
65
|
+
const elemProps = exports.useCanvasThemeToCssVars(theme, props);
|
|
57
66
|
return (React.createElement(react_1.CacheProvider, { value: css_1.cache },
|
|
58
67
|
React.createElement(react_1.ThemeProvider, { theme: theme },
|
|
59
68
|
React.createElement(InputProvider_1.InputProvider, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePopupStack.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/usePopupStack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"usePopupStack.d.ts","sourceRoot":"","sources":["../../../../../popup/lib/hooks/usePopupStack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,eAAO,MAAM,aAAa,8HAGvB,MAAM,SAAS,CAAC,WAAW,CA0E7B,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.usePopupStack = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const canvas_kit_popup_stack_1 = require("@workday/canvas-kit-popup-stack");
|
|
9
9
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
|
+
const react_2 = require("@emotion/react");
|
|
10
11
|
/**
|
|
11
12
|
* **Note:** If you're using {@link Popper}, you do not need to use this hook directly.
|
|
12
13
|
*
|
|
@@ -52,6 +53,8 @@ const common_1 = require("@workday/canvas-kit-react/common");
|
|
|
52
53
|
const usePopupStack = (ref, target) => {
|
|
53
54
|
const { elementRef, localRef } = common_1.useLocalRef(ref);
|
|
54
55
|
const isRTL = common_1.useIsRTL();
|
|
56
|
+
const theme = react_1.default.useContext(react_2.ThemeContext);
|
|
57
|
+
const { className, style } = common_1.useCanvasThemeToCssVars(theme, {});
|
|
55
58
|
// useState function input ensures we only create a container once.
|
|
56
59
|
const [popupRef] = react_1.default.useState(() => {
|
|
57
60
|
const container = canvas_kit_popup_stack_1.PopupStack.createContainer();
|
|
@@ -87,6 +90,33 @@ const usePopupStack = (ref, target) => {
|
|
|
87
90
|
(_b = localRef.current) === null || _b === void 0 ? void 0 : _b.removeAttribute('dir');
|
|
88
91
|
}
|
|
89
92
|
}, [localRef, isRTL]);
|
|
93
|
+
// theming className
|
|
94
|
+
react_1.default.useLayoutEffect(() => {
|
|
95
|
+
const element = localRef.current;
|
|
96
|
+
element === null || element === void 0 ? void 0 : element.classList.add(className.trim());
|
|
97
|
+
return () => {
|
|
98
|
+
element === null || element === void 0 ? void 0 : element.classList.remove(className.trim());
|
|
99
|
+
};
|
|
100
|
+
}, [localRef, className]);
|
|
101
|
+
react_1.default.useLayoutEffect(() => {
|
|
102
|
+
const element = localRef.current;
|
|
103
|
+
if (element) {
|
|
104
|
+
// eslint-disable-next-line guard-for-in
|
|
105
|
+
for (const key in style) {
|
|
106
|
+
// @ts-ignore
|
|
107
|
+
element.style.setProperty(key, style[key]);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return () => {
|
|
111
|
+
if (element) {
|
|
112
|
+
// eslint-disable-next-line guard-for-in
|
|
113
|
+
for (const key in style) {
|
|
114
|
+
// @ts-ignore
|
|
115
|
+
element.style.removeProperty(key, style[key]);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}, [localRef, style]);
|
|
90
120
|
return localRef;
|
|
91
121
|
};
|
|
92
122
|
exports.usePopupStack = usePopupStack;
|
|
@@ -15,7 +15,7 @@ const useSelectModel_1 = require("./hooks/useSelectModel");
|
|
|
15
15
|
const useSelectCard_1 = require("./hooks/useSelectCard");
|
|
16
16
|
const useSelectInput_1 = require("./hooks/useSelectInput");
|
|
17
17
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
18
|
-
const selectInputStyles = canvas_kit_styling_1.createStyles({ name: "
|
|
18
|
+
const selectInputStyles = canvas_kit_styling_1.createStyles({ name: "b5n412", styles: "caret-color:transparent;cursor:default;&::selection{background-color:transparent;}" });
|
|
19
19
|
exports.SelectInput = common_1.createSubcomponent(text_input_1.TextInput)({
|
|
20
20
|
modelHook: useSelectModel_1.useSelectModel,
|
|
21
21
|
elemPropsHook: useSelectInput_1.useSelectInput,
|
|
@@ -1,8 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
export interface CountBadgeProps extends
|
|
1
|
+
import { CSProps } from '@workday/canvas-kit-styling';
|
|
2
|
+
export interface CountBadgeProps extends CSProps {
|
|
3
|
+
/**
|
|
4
|
+
* Sets the count displayed in the badge
|
|
5
|
+
*
|
|
6
|
+
* @default 0
|
|
7
|
+
*/
|
|
3
8
|
count?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Sets the maximum count to display before formatting the number.
|
|
11
|
+
* E.g. Given a count of `100` and a limit of `100`, the badge would display `99+`.
|
|
12
|
+
*
|
|
13
|
+
* @default 1000
|
|
14
|
+
*/
|
|
4
15
|
limit?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Sets the variant of the Count Badge
|
|
18
|
+
*
|
|
19
|
+
* @default 'default'
|
|
20
|
+
*/
|
|
5
21
|
variant?: 'default' | 'inverse';
|
|
6
22
|
}
|
|
7
|
-
|
|
23
|
+
/**
|
|
24
|
+
* `CountBadge` provides a quantity-based summary with dynamic values.
|
|
25
|
+
*/
|
|
26
|
+
export declare const CountBadge: import("@workday/canvas-kit-react/common").ElementComponent<"span", CountBadgeProps>;
|
|
8
27
|
//# sourceMappingURL=CountBadge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CountBadge.d.ts","sourceRoot":"","sources":["../../../../badge/lib/CountBadge.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CountBadge.d.ts","sourceRoot":"","sources":["../../../../badge/lib/CountBadge.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAe,OAAO,EAAwB,MAAM,6BAA6B,CAAC;AAazF,MAAM,WAAW,eAAgB,SAAQ,OAAO;IAC9C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAmCD;;GAEG;AACH,eAAO,MAAM,UAAU,sFAerB,CAAC"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
background: colors.cinnamon500,
|
|
8
|
-
color: colors.frenchVanilla100,
|
|
9
|
-
textShadow: '0 0 1px rgba(0,0,0, 0.35)',
|
|
10
|
-
},
|
|
11
|
-
inverse: {
|
|
12
|
-
background: colors.frenchVanilla100,
|
|
13
|
-
boxShadow: '0 1px 2px rgba(0,0,0, 0.25)',
|
|
14
|
-
color: colors.blueberry400,
|
|
15
|
-
},
|
|
16
|
-
};
|
|
2
|
+
// eslint-disable-next-line @emotion/no-vanilla
|
|
3
|
+
import { keyframes } from '@emotion/css';
|
|
4
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
5
|
+
import { handleCsProp, createStencil, px2rem } from '@workday/canvas-kit-styling';
|
|
6
|
+
import { base, system } from '@workday/canvas-tokens-web';
|
|
17
7
|
const grow = keyframes `
|
|
18
8
|
from {
|
|
19
9
|
transform: scale(0.85);
|
|
@@ -23,25 +13,45 @@ const grow = keyframes `
|
|
|
23
13
|
transform: scale(1.0);
|
|
24
14
|
}
|
|
25
15
|
`;
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
16
|
+
const countBadgeStencil = createStencil({
|
|
17
|
+
base: {
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
animation: `${grow} 0.2s ease`,
|
|
20
|
+
borderRadius: system.shape.round,
|
|
21
|
+
boxSizing: 'border-box',
|
|
22
|
+
display: 'inline-flex',
|
|
23
|
+
fontFamily: system.fontFamily.default,
|
|
24
|
+
fontSize: system.fontSize.subtext.medium,
|
|
25
|
+
//@ts-ignore
|
|
26
|
+
fontWeight: system.fontWeight.bold,
|
|
27
|
+
height: px2rem(20),
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
lineHeight: px2rem(20),
|
|
30
|
+
minWidth: px2rem(20),
|
|
31
|
+
padding: `0 ${px2rem(6.5)}`,
|
|
32
|
+
},
|
|
33
|
+
modifiers: {
|
|
34
|
+
variant: {
|
|
35
|
+
default: {
|
|
36
|
+
background: base.cinnamon500,
|
|
37
|
+
color: base.frenchVanilla100,
|
|
38
|
+
textShadow: `0 0 ${px2rem(1)} rgba(0,0,0, 0.35)`,
|
|
39
|
+
},
|
|
40
|
+
inverse: {
|
|
41
|
+
background: base.frenchVanilla100,
|
|
42
|
+
boxShadow: `0 ${px2rem(1)} ${px2rem(2)} rgba(0,0,0, 0.25)`,
|
|
43
|
+
color: base.blueberry400,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* `CountBadge` provides a quantity-based summary with dynamic values.
|
|
50
|
+
*/
|
|
51
|
+
export const CountBadge = createComponent('span')({
|
|
52
|
+
displayName: 'NewCountBadge',
|
|
53
|
+
Component: ({ count = 0, limit = 1000, variant = 'default', ...elemProps }, ref, Element) => {
|
|
54
|
+
const formattedCount = count < limit ? `${count}` : `${limit - 1}+`;
|
|
55
|
+
return (React.createElement(Element, Object.assign({ ref: ref }, handleCsProp(elemProps, [countBadgeStencil({ variant })])), formattedCount));
|
|
56
|
+
},
|
|
57
|
+
});
|
|
@@ -18,7 +18,7 @@ export const buttonVars = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Base styles for Buttons.
|
|
20
20
|
*/
|
|
21
|
-
const baseButtonStyles = createStyles({ name: "
|
|
21
|
+
const baseButtonStyles = createStyles({ name: "y1191", styles: "font-family:\"Roboto\", \"Helvetica Neue\", \"Helvetica\", Arial, sans-serif;font-size:0.875rem;line-height:normal;letter-spacing:0.015rem;font-weight:bold;background-color:var(--css-button-vars-default-background, transparent);color:var(--css-button-vars-default-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, #333333));border-width:1px;border-style:solid;gap:var(--cnvs-sys-space-x2, 0.5rem);border-color:var(--css-button-vars-default-border, transparent);cursor:pointer;display:inline-flex;box-shadow:none;align-items:center;justify-content:center;box-sizing:border-box;outline:2px transparent;white-space:nowrap;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;border-radius:var(--css-button-vars-default-borderRadius, var(--cnvs-sys-shape-round, 62.5rem));position:relative;vertical-align:middle;overflow:hidden;transition:box-shadow 120ms linear, border 120ms linear, background-color 120ms linear, color 120ms linear;&:disabled, &:disabled:active, &.disabled{cursor:default;box-shadow:none;opacity:var(--css-button-vars-disabled-opacity, 1);}& span .wd-icon-fill{transition-duration:40ms;fill:var(--css-button-vars-default-icon, var(--cnvs-base-palette-black-pepper-400, #333333));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-vars-default-icon, var(--cnvs-base-palette-black-pepper-400, #333333));}&:focus-visible, &.focus{background-color:var(--css-button-vars-focus-background, transparent);border-color:var(--css-button-vars-focus-border, transparent);color:var(--css-button-vars-focus-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, #333333));& span .wd-icon-fill{fill:var(--css-button-vars-focus-icon, var(--cnvs-base-palette-black-pepper-400, #333333));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-vars-focus-icon, var(--cnvs-base-palette-black-pepper-400, #333333));}box-shadow:0 0 0 2px var(--css-button-vars-focus-boxShadowInner, var(--cnvs-base-palette-french-vanilla-100, #fff)), 0 0 0 calc(2px + 2px) var(--css-button-vars-focus-boxShadowOuter, var(--cnvs-brand-primary-base, rgba(0,92,184,1)));}&:hover, &.hover{background-color:var(--css-button-vars-hover-background, var(--cnvs-base-palette-black-pepper-500, #1e1e1e));border-color:var(--css-button-vars-hover-border, transparent);color:var(--css-button-vars-hover-label-emotion-safe, var(--cnvs-base-palette-black-pepper-500, #1e1e1e));& span .wd-icon-fill{fill:var(--css-button-vars-hover-icon, var(--cnvs-base-palette-black-pepper-500, #1e1e1e));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-vars-hover-icon, var(--cnvs-base-palette-black-pepper-500, #1e1e1e));}}&:hover:active{transition-duration:40ms;}&:active, &.active{background-color:var(--css-button-vars-active-background, transparent);border-color:var(--css-button-vars-active-border, transparent);color:var(--css-button-vars-active-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, #333333));& span .wd-icon-fill{fill:var(--css-button-vars-active-icon, var(--cnvs-base-palette-black-pepper-400, #333333));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-vars-active-icon);}}&:disabled, &.disabled{background-color:var(--css-button-vars-disabled-background, transparent);border-color:var(--css-button-vars-disabled-border, transparent);color:var(--css-button-vars-disabled-label-emotion-safe, var(--cnvs-base-palette-black-pepper-400, #333333));& span .wd-icon-fill{fill:var(--css-button-vars-disabled-icon, var(--cnvs-base-palette-black-pepper-400, #333333));}.wd-icon-background ~ .wd-icon-accent, .wd-icon-background ~ .wd-icon-accent2{fill:var(--css-button-vars-disabled-icon, var(--cnvs-base-palette-black-pepper-400, #333333));}}" });
|
|
22
22
|
/**
|
|
23
23
|
* Button modifiers that will overwrite the base styles of Buttons.
|
|
24
24
|
* - `Size`: These modifiers will dictate a size of a Button and has a set of styles to associated with it.
|
|
@@ -27,24 +27,24 @@ const baseButtonStyles = createStyles({ name: "hmvv0", styles: "font-family:\"Ro
|
|
|
27
27
|
*/
|
|
28
28
|
export const buttonModifiers = createModifiers({
|
|
29
29
|
size: {
|
|
30
|
-
large: createStyles({ name: "
|
|
31
|
-
medium: createStyles({ name: "
|
|
32
|
-
small: createStyles({ name: "
|
|
33
|
-
extraSmall: createStyles({ name: "
|
|
30
|
+
large: createStyles({ name: "y1192", styles: "font-size:var(--cnvs-sys-space-x4, 1rem);line-height:var(--cnvs-sys-space-x6, 1.5rem);letter-spacing:0.01rem;height:48px;padding-inline:var(--cnvs-sys-space-x8, 2rem);min-width:112px;" }),
|
|
31
|
+
medium: createStyles({ name: "y1193", styles: "font-size:0.875rem;letter-spacing:0.015rem;min-width:96px;padding-inline:var(--cnvs-sys-space-x6, 1.5rem);height:var(--cnvs-sys-space-x10, 2.5rem);" }),
|
|
32
|
+
small: createStyles({ name: "y1194", styles: "font-size:0.875rem;letter-spacing:0.015rem;height:var(--cnvs-sys-space-x8, 2rem);min-width:var(--cnvs-sys-space-x20, 5rem);padding-inline:var(--cnvs-sys-space-x4, 1rem);gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
|
|
33
|
+
extraSmall: createStyles({ name: "y1195", styles: "font-size:0.75rem;line-height:var(--cnvs-sys-space-x4, 1rem);letter-spacing:0.02rem;height:var(--cnvs-sys-space-x6, 1.5rem);min-width:auto;padding-inline:var(--cnvs-sys-space-x3, 0.75rem);gap:var(--cnvs-sys-space-x1, 0.25rem);" }),
|
|
34
34
|
},
|
|
35
35
|
iconPosition: {
|
|
36
|
-
largeOnly: createStyles({ name: "
|
|
37
|
-
largeStart: createStyles({ name: "
|
|
38
|
-
largeEnd: createStyles({ name: "
|
|
39
|
-
mediumOnly: createStyles({ name: "
|
|
40
|
-
mediumStart: createStyles({ name: "
|
|
41
|
-
mediumEnd: createStyles({ name: "
|
|
42
|
-
smallOnly: createStyles({ name: "
|
|
43
|
-
smallStart: createStyles({ name: "
|
|
44
|
-
smallEnd: createStyles({ name: "
|
|
45
|
-
extraSmallOnly: createStyles({ name: "
|
|
46
|
-
extraSmallStart: createStyles({ name: "
|
|
47
|
-
extraSmallEnd: createStyles({ name: "
|
|
36
|
+
largeOnly: createStyles({ name: "y1196", styles: "padding:0;min-width:calc(var(--cnvs-sys-space-x4, 1rem) * 3);" }),
|
|
37
|
+
largeStart: createStyles({ name: "y1197", styles: "padding-inline-start:var(--cnvs-sys-space-x6, 1.5rem);padding-inline-end:var(--cnvs-sys-space-x8, 2rem);" }),
|
|
38
|
+
largeEnd: createStyles({ name: "y1198", styles: "padding-inline-start:var(--cnvs-sys-space-x8, 2rem);padding-inline-end:var(--cnvs-sys-space-x6, 1.5rem);" }),
|
|
39
|
+
mediumOnly: createStyles({ name: "y1199", styles: "padding:0;min-width:var(--cnvs-sys-space-x10, 2.5rem);" }),
|
|
40
|
+
mediumStart: createStyles({ name: "y119a", styles: "padding-inline-start:calc(var(--cnvs-sys-space-x1, 0.25rem) * 5);padding-inline-end:var(--cnvs-sys-space-x6, 1.5rem);" }),
|
|
41
|
+
mediumEnd: createStyles({ name: "y119b", styles: "padding-inline-start:var(--cnvs-sys-space-x6, 1.5rem);padding-inline-end:calc(var(--cnvs-sys-space-x1, 0.25rem) * 5);" }),
|
|
42
|
+
smallOnly: createStyles({ name: "y119c", styles: "padding:0;min-width:var(--cnvs-sys-space-x8, 2rem);" }),
|
|
43
|
+
smallStart: createStyles({ name: "y119d", styles: "padding-inline-start:var(--cnvs-sys-space-x3, 0.75rem);padding-inline-end:var(--cnvs-sys-space-x4, 1rem);" }),
|
|
44
|
+
smallEnd: createStyles({ name: "y119e", styles: "padding-inline-start:var(--cnvs-sys-space-x4, 1rem);padding-inline-end:var(--cnvs-sys-space-x3, 0.75rem);" }),
|
|
45
|
+
extraSmallOnly: createStyles({ name: "y119f", styles: "padding:0;min-width:var(--cnvs-sys-space-x6, 1.5rem);" }),
|
|
46
|
+
extraSmallStart: createStyles({ name: "y119g", styles: "padding-inline-start:var(--cnvs-sys-space-x2, 0.5rem);padding-inline-end:var(--cnvs-sys-space-x3, 0.75rem);" }),
|
|
47
|
+
extraSmallEnd: createStyles({ name: "y119h", styles: "padding-inline-start:var(--cnvs-sys-space-x3, 0.75rem);padding-inline-end:var(--cnvs-sys-space-x2, 0.5rem);" }),
|
|
48
48
|
},
|
|
49
49
|
});
|
|
50
50
|
export function capitalize(string = '') {
|
|
@@ -5,7 +5,7 @@ import { createStyles, cssVar } from '@workday/canvas-kit-styling';
|
|
|
5
5
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
6
6
|
import { base, brand, system } from '@workday/canvas-tokens-web';
|
|
7
7
|
import { Button } from './Button';
|
|
8
|
-
const deleteStyles = createStyles({ name: "
|
|
8
|
+
const deleteStyles = createStyles({ name: "y11911", styles: "--css-button-vars-default-background:var(--cnvs-brand-error-base, #de2e21);--css-button-vars-default-border:transparent;--css-button-vars-default-borderRadius:var(--cnvs-sys-shape-round, 62.5rem);--css-button-vars-default-label-emotion-safe:var(--cnvs-brand-error-accent, #ffffff);--css-button-vars-default-icon:var(--cnvs-brand-error-accent, #ffffff);&:hover, &.hover{--css-button-vars-hover-background:var(--cnvs-brand-error-dark, #a31b12);--css-button-vars-hover-border:transparent;--css-button-vars-hover-label-emotion-safe:var(--cnvs-brand-error-accent, #ffffff);--css-button-vars-hover-icon:var(--cnvs-brand-error-accent, #ffffff);}&:focus-visible, &.focus{--css-button-vars-focus-background:var(--cnvs-brand-error-base, #de2e21);--css-button-vars-focus-border:transparent;--css-button-vars-focus-label-emotion-safe:var(--cnvs-brand-error-accent, #ffffff);--css-button-vars-focus-icon:var(--cnvs-brand-error-accent, #ffffff);--css-button-vars-focus-boxShadowInner:var(--cnvs-base-palette-french-vanilla-100, #ffffff);--css-button-vars-focus-boxShadowOuter:var(--cnvs-brand-common-focus-outline, #0875e1);}&:active, &.active{--css-button-vars-active-background:var(--cnvs-brand-error-darkest, rgba(128,22,14,1));--css-button-vars-active-border:transparent;--css-button-vars-active-label-emotion-safe:var(--cnvs-brand-error-accent, #ffffff);--css-button-vars-active-icon:var(--cnvs-brand-error-accent, #ffffff);}&:disabled, &:active:disabled, &:focus:disabled, &:hover:disabled{--css-button-vars-disabled-background:var(--cnvs-brand-error-light, #fcc9c5);--css-button-vars-disabled-label-emotion-safe:var(--cnvs-brand-error-accent, #ffffff);--css-button-vars-disabled-icon:var(--cnvs-brand-error-accent, #ffffff);opacity:1px;}" });
|
|
9
9
|
/**
|
|
10
10
|
* Use sparingly for destructive actions that will result in data loss, can’t be undone, or will
|
|
11
11
|
* have significant consequences. They commonly appear in confirmation dialogs as the final
|