@workday/canvas-kit-react 16.0.0-alpha.0464-next.0 → 16.0.0-alpha.0465-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/combobox/lib/ComboboxCard.tsx +2 -11
- package/dialog/lib/Dialog.tsx +6 -0
- package/dist/commonjs/combobox/lib/ComboboxCard.d.ts +0 -1
- package/dist/commonjs/combobox/lib/ComboboxCard.d.ts.map +1 -1
- package/dist/commonjs/combobox/lib/ComboboxCard.js +2 -6
- package/dist/commonjs/dialog/lib/Dialog.d.ts +23 -0
- package/dist/commonjs/dialog/lib/Dialog.d.ts.map +1 -1
- package/dist/commonjs/dialog/lib/Dialog.js +6 -0
- package/dist/commonjs/modal/lib/Modal.d.ts +23 -0
- package/dist/commonjs/modal/lib/Modal.d.ts.map +1 -1
- package/dist/commonjs/modal/lib/Modal.js +6 -0
- package/dist/commonjs/popup/lib/Popup.d.ts +23 -0
- package/dist/commonjs/popup/lib/Popup.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/Popup.js +7 -0
- package/dist/commonjs/popup/lib/PopupButtonGroup.d.ts +53 -0
- package/dist/commonjs/popup/lib/PopupButtonGroup.d.ts.map +1 -0
- package/dist/commonjs/popup/lib/PopupButtonGroup.js +27 -0
- package/dist/commonjs/popup/lib/PopupCard.d.ts.map +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +1 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.d.ts.map +1 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +3 -2
- package/dist/es6/combobox/lib/ComboboxCard.d.ts +0 -1
- package/dist/es6/combobox/lib/ComboboxCard.d.ts.map +1 -1
- package/dist/es6/combobox/lib/ComboboxCard.js +2 -6
- package/dist/es6/dialog/lib/Dialog.d.ts +23 -0
- package/dist/es6/dialog/lib/Dialog.d.ts.map +1 -1
- package/dist/es6/dialog/lib/Dialog.js +6 -0
- package/dist/es6/modal/lib/Modal.d.ts +23 -0
- package/dist/es6/modal/lib/Modal.d.ts.map +1 -1
- package/dist/es6/modal/lib/Modal.js +6 -0
- package/dist/es6/popup/lib/Popup.d.ts +23 -0
- package/dist/es6/popup/lib/Popup.d.ts.map +1 -1
- package/dist/es6/popup/lib/Popup.js +7 -0
- package/dist/es6/popup/lib/PopupButtonGroup.d.ts +53 -0
- package/dist/es6/popup/lib/PopupButtonGroup.d.ts.map +1 -0
- package/dist/es6/popup/lib/PopupButtonGroup.js +24 -0
- package/dist/es6/popup/lib/PopupCard.d.ts.map +1 -1
- package/dist/es6/popup/lib/PopupCard.js +1 -1
- package/dist/es6/toast/lib/ToastCloseIcon.d.ts.map +1 -1
- package/dist/es6/toast/lib/ToastCloseIcon.js +4 -3
- package/modal/lib/Modal.tsx +6 -0
- package/package.json +4 -4
- package/popup/lib/Popup.tsx +7 -0
- package/popup/lib/PopupButtonGroup.tsx +60 -0
- package/popup/lib/PopupCard.tsx +1 -0
- package/toast/lib/ToastCloseIcon.tsx +4 -3
|
@@ -4,8 +4,7 @@ import {
|
|
|
4
4
|
createSubcomponent,
|
|
5
5
|
} from '@workday/canvas-kit-react/common';
|
|
6
6
|
import {Menu} from '@workday/canvas-kit-react/menu';
|
|
7
|
-
import {
|
|
8
|
-
import {system} from '@workday/canvas-tokens-web';
|
|
7
|
+
import {handleCsProp} from '@workday/canvas-kit-styling';
|
|
9
8
|
|
|
10
9
|
import {useComboboxModel} from './hooks/useComboboxModel';
|
|
11
10
|
|
|
@@ -21,20 +20,12 @@ export const useComboboxCard = createElemPropsHook(useComboboxModel)(model => {
|
|
|
21
20
|
} as const;
|
|
22
21
|
});
|
|
23
22
|
|
|
24
|
-
export const comboboxCardStencil = createStencil({
|
|
25
|
-
base: {
|
|
26
|
-
'& :where([data-part="list-box-container"])': {
|
|
27
|
-
borderRadius: system.legacy.shape.xxl,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
});
|
|
31
|
-
|
|
32
23
|
export const ComboboxCard = createSubcomponent('div')({
|
|
33
24
|
modelHook: useComboboxModel,
|
|
34
25
|
elemPropsHook: useComboboxCard,
|
|
35
26
|
})<ComboboxCardProps>(({children, ...elemProps}, Element) => {
|
|
36
27
|
return (
|
|
37
|
-
<Menu.Card as={Element} {...handleCsProp(elemProps
|
|
28
|
+
<Menu.Card as={Element} {...handleCsProp(elemProps)}>
|
|
38
29
|
{children}
|
|
39
30
|
</Menu.Card>
|
|
40
31
|
);
|
package/dialog/lib/Dialog.tsx
CHANGED
|
@@ -91,6 +91,12 @@ export const Dialog = createContainer()({
|
|
|
91
91
|
* {@link usePopupCloseButton}.
|
|
92
92
|
*/
|
|
93
93
|
CloseButton: Popup.CloseButton,
|
|
94
|
+
/**
|
|
95
|
+
* A `Dialog.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
96
|
+
* group buttons within a dialog and can place buttons at the start, center, or end of the
|
|
97
|
+
* container.
|
|
98
|
+
*/
|
|
99
|
+
ButtonGroup: Popup.ButtonGroup,
|
|
94
100
|
},
|
|
95
101
|
})(({children}: DialogProps) => {
|
|
96
102
|
return <>{children}</>;
|
|
@@ -209,7 +209,6 @@ export declare const useComboboxCard: import("@workday/canvas-kit-react/common")
|
|
|
209
209
|
}, {
|
|
210
210
|
readonly minWidth: number;
|
|
211
211
|
}>;
|
|
212
|
-
export declare const comboboxCardStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {}, never>, {}, {}, never, never>;
|
|
213
212
|
export declare const ComboboxCard: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ComboboxCardProps, {
|
|
214
213
|
state: {
|
|
215
214
|
stackRef: import("react").RefObject<HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxCard.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxCard.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AAKpD,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;CAAG;AAE5E;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI1B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASvB,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ComboboxCard = exports.
|
|
3
|
+
exports.ComboboxCard = exports.useComboboxCard = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
6
6
|
const menu_1 = require("@workday/canvas-kit-react/menu");
|
|
7
7
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
8
|
-
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
9
8
|
const useComboboxModel_1 = require("./hooks/useComboboxModel");
|
|
10
9
|
/**
|
|
11
10
|
* This hook sets the `minWidth` style attribute to match the width of the
|
|
@@ -16,12 +15,9 @@ exports.useComboboxCard = (0, common_1.createElemPropsHook)(useComboboxModel_1.u
|
|
|
16
15
|
minWidth: model.state.width,
|
|
17
16
|
};
|
|
18
17
|
});
|
|
19
|
-
exports.comboboxCardStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
20
|
-
base: { name: "3gllpz", styles: "box-sizing:border-box;& :where([data-part=\"list-box-container\"]){border-radius:var(--cnvs-sys-shape-xxl, var(--cnvs-sys-shape-x6, 1.5rem));}" }
|
|
21
|
-
}, "combobox-card-97127b");
|
|
22
18
|
exports.ComboboxCard = (0, common_1.createSubcomponent)('div')({
|
|
23
19
|
modelHook: useComboboxModel_1.useComboboxModel,
|
|
24
20
|
elemPropsHook: exports.useComboboxCard,
|
|
25
21
|
})(({ children, ...elemProps }, Element) => {
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(menu_1.Menu.Card, { as: Element, ...(0, canvas_kit_styling_1.handleCsProp)(elemProps
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(menu_1.Menu.Card, { as: Element, ...(0, canvas_kit_styling_1.handleCsProp)(elemProps), children: children }));
|
|
27
23
|
});
|
|
@@ -313,5 +313,28 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
313
313
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
314
314
|
};
|
|
315
315
|
}>;
|
|
316
|
+
/**
|
|
317
|
+
* A `Dialog.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
318
|
+
* group buttons within a dialog and can place buttons at the start, center, or end of the
|
|
319
|
+
* container.
|
|
320
|
+
*/
|
|
321
|
+
ButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../../popup/lib/PopupButtonGroup").PopupButtonGroupProps, {
|
|
322
|
+
state: {
|
|
323
|
+
stackRef: React.RefObject<HTMLDivElement>;
|
|
324
|
+
targetRef: React.RefObject<HTMLButtonElement>;
|
|
325
|
+
initialFocusRef: React.RefObject<any> | undefined;
|
|
326
|
+
returnFocusRef: React.RefObject<any> | undefined;
|
|
327
|
+
placement: import("@popperjs/core").Placement;
|
|
328
|
+
id: string;
|
|
329
|
+
visibility: "hidden" | "visible";
|
|
330
|
+
};
|
|
331
|
+
events: {
|
|
332
|
+
updatePlacement(data: {
|
|
333
|
+
placement: import("@popperjs/core").Placement;
|
|
334
|
+
}): void;
|
|
335
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
336
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
337
|
+
};
|
|
338
|
+
}>;
|
|
316
339
|
};
|
|
317
340
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../dialog/lib/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIf;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;OAKG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../dialog/lib/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIf;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -83,6 +83,12 @@ exports.Dialog = (0, common_1.createContainer)()({
|
|
|
83
83
|
* {@link usePopupCloseButton}.
|
|
84
84
|
*/
|
|
85
85
|
CloseButton: popup_1.Popup.CloseButton,
|
|
86
|
+
/**
|
|
87
|
+
* A `Dialog.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
88
|
+
* group buttons within a dialog and can place buttons at the start, center, or end of the
|
|
89
|
+
* container.
|
|
90
|
+
*/
|
|
91
|
+
ButtonGroup: popup_1.Popup.ButtonGroup,
|
|
86
92
|
},
|
|
87
93
|
})(({ children }) => {
|
|
88
94
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
@@ -330,5 +330,28 @@ export declare const Modal: import("@workday/canvas-kit-react/common").Component
|
|
|
330
330
|
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
331
331
|
};
|
|
332
332
|
}>;
|
|
333
|
+
/**
|
|
334
|
+
* A `Modal.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
335
|
+
* group buttons within a modal and can place buttons at the start, center, or end of the
|
|
336
|
+
* container.
|
|
337
|
+
*/
|
|
338
|
+
ButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../../popup/lib/PopupButtonGroup").PopupButtonGroupProps, {
|
|
339
|
+
state: {
|
|
340
|
+
stackRef: import("react").RefObject<HTMLDivElement>;
|
|
341
|
+
targetRef: import("react").RefObject<HTMLButtonElement>;
|
|
342
|
+
initialFocusRef: import("react").RefObject<any> | undefined;
|
|
343
|
+
returnFocusRef: import("react").RefObject<any> | undefined;
|
|
344
|
+
placement: import("@popperjs/core").Placement;
|
|
345
|
+
id: string;
|
|
346
|
+
visibility: "hidden" | "visible";
|
|
347
|
+
};
|
|
348
|
+
events: {
|
|
349
|
+
updatePlacement(data: {
|
|
350
|
+
placement: import("@popperjs/core").Placement;
|
|
351
|
+
}): void;
|
|
352
|
+
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
353
|
+
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
354
|
+
};
|
|
355
|
+
}>;
|
|
333
356
|
};
|
|
334
357
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../modal/lib/Modal.tsx"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAId;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;OAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../modal/lib/Modal.tsx"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAId;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;OAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -93,6 +93,12 @@ exports.Modal = (0, common_1.createContainer)()({
|
|
|
93
93
|
* full body overflow is desired.
|
|
94
94
|
*/
|
|
95
95
|
OverflowOverlay: ModalOverflowOverlay_1.ModalOverflowOverlay,
|
|
96
|
+
/**
|
|
97
|
+
* A `Modal.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
98
|
+
* group buttons within a modal and can place buttons at the start, center, or end of the
|
|
99
|
+
* container.
|
|
100
|
+
*/
|
|
101
|
+
ButtonGroup: popup_1.Popup.ButtonGroup,
|
|
96
102
|
},
|
|
97
103
|
})(elemProps => {
|
|
98
104
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: elemProps.children });
|
|
@@ -296,5 +296,28 @@ export declare const Popup: import("@workday/canvas-kit-react/common").Component
|
|
|
296
296
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
297
297
|
};
|
|
298
298
|
}>;
|
|
299
|
+
/**
|
|
300
|
+
* A `Popup.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
301
|
+
* visually group buttons within a popup and can place buttons at the start, center, or end of the
|
|
302
|
+
* container.
|
|
303
|
+
*/
|
|
304
|
+
ButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./PopupButtonGroup").PopupButtonGroupProps, {
|
|
305
|
+
state: {
|
|
306
|
+
stackRef: React.RefObject<HTMLDivElement>;
|
|
307
|
+
targetRef: React.RefObject<HTMLButtonElement>;
|
|
308
|
+
initialFocusRef: React.RefObject<any> | undefined;
|
|
309
|
+
returnFocusRef: React.RefObject<any> | undefined;
|
|
310
|
+
placement: import("@popperjs/core").Placement;
|
|
311
|
+
id: string;
|
|
312
|
+
visibility: "hidden" | "visible";
|
|
313
|
+
};
|
|
314
|
+
events: {
|
|
315
|
+
updatePlacement(data: {
|
|
316
|
+
placement: import("@popperjs/core").Placement;
|
|
317
|
+
}): void;
|
|
318
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
319
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
320
|
+
};
|
|
321
|
+
}>;
|
|
299
322
|
};
|
|
300
323
|
//# sourceMappingURL=Popup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../popup/lib/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../popup/lib/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAId;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;OASG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.Popup = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
6
6
|
const PopupBody_1 = require("./PopupBody");
|
|
7
|
+
const PopupButtonGroup_1 = require("./PopupButtonGroup");
|
|
7
8
|
const PopupCard_1 = require("./PopupCard");
|
|
8
9
|
const PopupCloseButton_1 = require("./PopupCloseButton");
|
|
9
10
|
const PopupCloseIcon_1 = require("./PopupCloseIcon");
|
|
@@ -104,6 +105,12 @@ exports.Popup = (0, common_1.createContainer)()({
|
|
|
104
105
|
* {@link usePopupCloseButton}.
|
|
105
106
|
*/
|
|
106
107
|
CloseButton: PopupCloseButton_1.PopupCloseButton,
|
|
108
|
+
/**
|
|
109
|
+
* A `Popup.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
110
|
+
* visually group buttons within a popup and can place buttons at the start, center, or end of the
|
|
111
|
+
* container.
|
|
112
|
+
*/
|
|
113
|
+
ButtonGroup: PopupButtonGroup_1.PopupButtonGroup,
|
|
107
114
|
},
|
|
108
115
|
})(({ children }) => {
|
|
109
116
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { CSProps } from '@workday/canvas-kit-styling';
|
|
4
|
+
export interface PopupButtonGroupProps extends GrowthBehavior, CSProps {
|
|
5
|
+
/**
|
|
6
|
+
* The contents of the PopupButtonGroup. Can be `Button` children or any valid elements.
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The position of elements within the PopupButtonGroup. Can be `start`, `center`, or `end`.
|
|
11
|
+
* @default 'end'
|
|
12
|
+
*/
|
|
13
|
+
position?: 'start' | 'center' | 'end';
|
|
14
|
+
}
|
|
15
|
+
export declare const popupButtonGroupStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
16
|
+
position: {
|
|
17
|
+
start: {
|
|
18
|
+
justifyContent: string;
|
|
19
|
+
};
|
|
20
|
+
center: {
|
|
21
|
+
justifyContent: string;
|
|
22
|
+
};
|
|
23
|
+
end: {
|
|
24
|
+
justifyContent: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
grow: {
|
|
28
|
+
true: {
|
|
29
|
+
'& button': {
|
|
30
|
+
width: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}, {}, {}, never, never>;
|
|
35
|
+
export declare const PopupButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", PopupButtonGroupProps, {
|
|
36
|
+
state: {
|
|
37
|
+
stackRef: React.RefObject<HTMLDivElement>;
|
|
38
|
+
targetRef: React.RefObject<HTMLButtonElement>;
|
|
39
|
+
initialFocusRef: React.RefObject<any> | undefined;
|
|
40
|
+
returnFocusRef: React.RefObject<any> | undefined;
|
|
41
|
+
placement: import("@popperjs/core").Placement;
|
|
42
|
+
id: string;
|
|
43
|
+
visibility: "hidden" | "visible";
|
|
44
|
+
};
|
|
45
|
+
events: {
|
|
46
|
+
updatePlacement(data: {
|
|
47
|
+
placement: import("@popperjs/core").Placement;
|
|
48
|
+
}): void;
|
|
49
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
50
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
//# sourceMappingURL=PopupButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupButtonGroup.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,cAAc,EAAqB,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,OAAO,EAA8B,MAAM,6BAA6B,CAAC;AAKjF,MAAM,WAAW,qBAAsB,SAAQ,cAAc,EAAE,OAAO;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACvC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;wBA4BlC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;EAS3B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PopupButtonGroup = exports.popupButtonGroupStencil = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
6
|
+
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
7
|
+
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
8
|
+
const hooks_1 = require("./hooks");
|
|
9
|
+
exports.popupButtonGroupStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
10
|
+
base: { name: "u628z", styles: "box-sizing:border-box;display:flex;gap:var(--cnvs-sys-gap-sm, var(--cnvs-sys-space-x2, 0.5rem));@media screen and (max-width: 768px){flex-direction:column;}" },
|
|
11
|
+
modifiers: {
|
|
12
|
+
position: {
|
|
13
|
+
start: { name: "461870", styles: "justify-content:flex-start;" },
|
|
14
|
+
center: { name: "3xs59f", styles: "justify-content:center;" },
|
|
15
|
+
end: { name: "r67bx", styles: "justify-content:flex-end;" }
|
|
16
|
+
},
|
|
17
|
+
grow: {
|
|
18
|
+
true: { name: "1p9ysq", styles: "& button{width:100%;}" }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}, "popup-button-group-1d7c77");
|
|
22
|
+
exports.PopupButtonGroup = (0, common_1.createSubcomponent)('div')({
|
|
23
|
+
displayName: 'Popup.ButtonGroup',
|
|
24
|
+
modelHook: hooks_1.usePopupModel,
|
|
25
|
+
})(({ children, position = 'end', grow, ...elemProps }, Element) => {
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)(Element, { ...(0, canvas_kit_styling_1.handleCsProp)(elemProps, (0, exports.popupButtonGroupStencil)({ position, grow })), children: children }));
|
|
27
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupCard.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AACpD,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAc,MAAM,kCAAkC,CAAC;AAc7E,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAChF,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA6DD,eAAO,MAAM,gBAAgB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PopupCard.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AACpD,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAc,MAAM,kCAAkC,CAAC;AAc7E,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAChF,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA6DD,eAAO,MAAM,gBAAgB;;;;;;;;gBAkC3B,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EA2BpB,CAAC"}
|
|
@@ -84,7 +84,7 @@ exports.popupCardStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
84
84
|
transformOriginHorizontal: '',
|
|
85
85
|
transformOriginVertical: '',
|
|
86
86
|
},
|
|
87
|
-
base: { name: "
|
|
87
|
+
base: { name: "1t20fc", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);font-size:var(--cnvs-sys-font-size-subtext-lg, var(--cnvs-sys-font-size-subtext-large, 0.875rem));line-height:var(--cnvs-sys-line-height-subtext-lg, var(--cnvs-sys-line-height-subtext-large, 1.25rem));color:var(--cnvs-sys-color-fg-default);position:relative;max-width:calc(100vw - var(--cnvs-sys-size-sm, var(--cnvs-sys-space-x8, 2rem)));gap:var(--cnvs-sys-gap-lg, var(--cnvs-sys-space-x6, 1.5rem));box-shadow:var(--cnvs-sys-depth-3);min-height:0;padding:var(--cnvs-sys-padding-xl, var(--cnvs-sys-space-x6, 1.5rem));border-radius:var(--cnvs-sys-shape-xxxl, 2rem);max-height:var(--maxHeight-popup-card-b9f0ce);overflow-y:auto;animation-name:animation-29kkhp;animation-duration:150ms;animation-timing-function:ease-out;transform-origin:var(--transformOriginVertical-popup-card-b9f0ce) var(--transformOriginHorizontal-popup-card-b9f0ce);.wd-no-animation &{animation:none;}@media screen and (max-width: 768px){transform-origin:bottom center;padding:var(--cnvs-sys-padding-lg, var(--cnvs-sys-space-x5, 1.25rem));}" }
|
|
88
88
|
}, "popup-card-b9f0ce");
|
|
89
89
|
exports.PopupCard = (0, common_1.createSubcomponent)('div')({
|
|
90
90
|
displayName: 'Popup.Card',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastCloseIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ToastCloseIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAItD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;CAAG;AAE3F,eAAO,MAAM,qBAAqB,iJAMhC,CAAC;AAEH,eAAO,MAAM,cAAc,4FAYzB,CAAC"}
|
|
@@ -6,9 +6,10 @@ const common_1 = require("@workday/canvas-kit-react/common");
|
|
|
6
6
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
7
7
|
const popup_1 = require("@workday/canvas-kit-react/popup");
|
|
8
8
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
9
|
+
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
9
10
|
exports.toastCloseIconStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
10
|
-
base: { name: "
|
|
11
|
-
}, "toast-close-icon-
|
|
11
|
+
base: { name: "2ifk0o", styles: "box-sizing:border-box;position:absolute;inset-block-start:var(--cnvs-base-size-50, 0.25rem);inset-inline-end:var(--cnvs-base-size-50, 0.25rem);" }
|
|
12
|
+
}, "toast-close-icon-05fbc5");
|
|
12
13
|
exports.ToastCloseIcon = (0, common_1.createComponent)('button')({
|
|
13
14
|
displayName: 'Toast.CloseIcon',
|
|
14
15
|
Component: (elemProps, ref, Element) => {
|
|
@@ -209,7 +209,6 @@ export declare const useComboboxCard: import("@workday/canvas-kit-react/common")
|
|
|
209
209
|
}, {
|
|
210
210
|
readonly minWidth: number;
|
|
211
211
|
}>;
|
|
212
|
-
export declare const comboboxCardStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{}, {}, never>, {}, {}, never, never>;
|
|
213
212
|
export declare const ComboboxCard: import("@workday/canvas-kit-react/common").ElementComponentM<"div", ComboboxCardProps, {
|
|
214
213
|
state: {
|
|
215
214
|
stackRef: import("react").RefObject<HTMLDivElement>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxCard.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboboxCard.d.ts","sourceRoot":"","sources":["../../../../combobox/lib/ComboboxCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AAKpD,MAAM,WAAW,iBAAkB,SAAQ,YAAY,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC;CAAG;AAE5E;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAI1B,CAAC;AAEH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASvB,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createElemPropsHook, createSubcomponent, } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { Menu } from '@workday/canvas-kit-react/menu';
|
|
4
|
-
import {
|
|
5
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
4
|
+
import { handleCsProp } from '@workday/canvas-kit-styling';
|
|
6
5
|
import { useComboboxModel } from './hooks/useComboboxModel';
|
|
7
6
|
/**
|
|
8
7
|
* This hook sets the `minWidth` style attribute to match the width of the
|
|
@@ -13,12 +12,9 @@ export const useComboboxCard = createElemPropsHook(useComboboxModel)(model => {
|
|
|
13
12
|
minWidth: model.state.width,
|
|
14
13
|
};
|
|
15
14
|
});
|
|
16
|
-
export const comboboxCardStencil = createStencil({
|
|
17
|
-
base: { name: "3gllpz", styles: "box-sizing:border-box;& :where([data-part=\"list-box-container\"]){border-radius:var(--cnvs-sys-shape-xxl, var(--cnvs-sys-shape-x6, 1.5rem));}" }
|
|
18
|
-
}, "combobox-card-97127b");
|
|
19
15
|
export const ComboboxCard = createSubcomponent('div')({
|
|
20
16
|
modelHook: useComboboxModel,
|
|
21
17
|
elemPropsHook: useComboboxCard,
|
|
22
18
|
})(({ children, ...elemProps }, Element) => {
|
|
23
|
-
return (_jsx(Menu.Card, { as: Element, ...handleCsProp(elemProps
|
|
19
|
+
return (_jsx(Menu.Card, { as: Element, ...handleCsProp(elemProps), children: children }));
|
|
24
20
|
});
|
|
@@ -313,5 +313,28 @@ export declare const Dialog: import("@workday/canvas-kit-react/common").Componen
|
|
|
313
313
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
314
314
|
};
|
|
315
315
|
}>;
|
|
316
|
+
/**
|
|
317
|
+
* A `Dialog.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
318
|
+
* group buttons within a dialog and can place buttons at the start, center, or end of the
|
|
319
|
+
* container.
|
|
320
|
+
*/
|
|
321
|
+
ButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../../popup/lib/PopupButtonGroup").PopupButtonGroupProps, {
|
|
322
|
+
state: {
|
|
323
|
+
stackRef: React.RefObject<HTMLDivElement>;
|
|
324
|
+
targetRef: React.RefObject<HTMLButtonElement>;
|
|
325
|
+
initialFocusRef: React.RefObject<any> | undefined;
|
|
326
|
+
returnFocusRef: React.RefObject<any> | undefined;
|
|
327
|
+
placement: import("@popperjs/core").Placement;
|
|
328
|
+
id: string;
|
|
329
|
+
visibility: "hidden" | "visible";
|
|
330
|
+
};
|
|
331
|
+
events: {
|
|
332
|
+
updatePlacement(data: {
|
|
333
|
+
placement: import("@popperjs/core").Placement;
|
|
334
|
+
}): void;
|
|
335
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
336
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
337
|
+
};
|
|
338
|
+
}>;
|
|
316
339
|
};
|
|
317
340
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../dialog/lib/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIf;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;OAKG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../dialog/lib/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIf;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -80,6 +80,12 @@ export const Dialog = createContainer()({
|
|
|
80
80
|
* {@link usePopupCloseButton}.
|
|
81
81
|
*/
|
|
82
82
|
CloseButton: Popup.CloseButton,
|
|
83
|
+
/**
|
|
84
|
+
* A `Dialog.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
85
|
+
* group buttons within a dialog and can place buttons at the start, center, or end of the
|
|
86
|
+
* container.
|
|
87
|
+
*/
|
|
88
|
+
ButtonGroup: Popup.ButtonGroup,
|
|
83
89
|
},
|
|
84
90
|
})(({ children }) => {
|
|
85
91
|
return _jsx(_Fragment, { children: children });
|
|
@@ -330,5 +330,28 @@ export declare const Modal: import("@workday/canvas-kit-react/common").Component
|
|
|
330
330
|
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
331
331
|
};
|
|
332
332
|
}>;
|
|
333
|
+
/**
|
|
334
|
+
* A `Modal.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
335
|
+
* group buttons within a modal and can place buttons at the start, center, or end of the
|
|
336
|
+
* container.
|
|
337
|
+
*/
|
|
338
|
+
ButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("../../popup/lib/PopupButtonGroup").PopupButtonGroupProps, {
|
|
339
|
+
state: {
|
|
340
|
+
stackRef: import("react").RefObject<HTMLDivElement>;
|
|
341
|
+
targetRef: import("react").RefObject<HTMLButtonElement>;
|
|
342
|
+
initialFocusRef: import("react").RefObject<any> | undefined;
|
|
343
|
+
returnFocusRef: import("react").RefObject<any> | undefined;
|
|
344
|
+
placement: import("@popperjs/core").Placement;
|
|
345
|
+
id: string;
|
|
346
|
+
visibility: "hidden" | "visible";
|
|
347
|
+
};
|
|
348
|
+
events: {
|
|
349
|
+
updatePlacement(data: {
|
|
350
|
+
placement: import("@popperjs/core").Placement;
|
|
351
|
+
}): void;
|
|
352
|
+
show(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
353
|
+
hide(event?: Event | import("react").SyntheticEvent<Element, Event> | undefined): void;
|
|
354
|
+
};
|
|
355
|
+
}>;
|
|
333
356
|
};
|
|
334
357
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../modal/lib/Modal.tsx"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAId;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;OAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../modal/lib/Modal.tsx"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAId;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;OAUG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;;;;OAYG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGH;;;;;;;;OAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -90,6 +90,12 @@ export const Modal = createContainer()({
|
|
|
90
90
|
* full body overflow is desired.
|
|
91
91
|
*/
|
|
92
92
|
OverflowOverlay: ModalOverflowOverlay,
|
|
93
|
+
/**
|
|
94
|
+
* A `Modal.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
95
|
+
* group buttons within a modal and can place buttons at the start, center, or end of the
|
|
96
|
+
* container.
|
|
97
|
+
*/
|
|
98
|
+
ButtonGroup: Popup.ButtonGroup,
|
|
93
99
|
},
|
|
94
100
|
})(elemProps => {
|
|
95
101
|
return _jsx(_Fragment, { children: elemProps.children });
|
|
@@ -296,5 +296,28 @@ export declare const Popup: import("@workday/canvas-kit-react/common").Component
|
|
|
296
296
|
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
297
297
|
};
|
|
298
298
|
}>;
|
|
299
|
+
/**
|
|
300
|
+
* A `Popup.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
301
|
+
* visually group buttons within a popup and can place buttons at the start, center, or end of the
|
|
302
|
+
* container.
|
|
303
|
+
*/
|
|
304
|
+
ButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("./PopupButtonGroup").PopupButtonGroupProps, {
|
|
305
|
+
state: {
|
|
306
|
+
stackRef: React.RefObject<HTMLDivElement>;
|
|
307
|
+
targetRef: React.RefObject<HTMLButtonElement>;
|
|
308
|
+
initialFocusRef: React.RefObject<any> | undefined;
|
|
309
|
+
returnFocusRef: React.RefObject<any> | undefined;
|
|
310
|
+
placement: import("@popperjs/core").Placement;
|
|
311
|
+
id: string;
|
|
312
|
+
visibility: "hidden" | "visible";
|
|
313
|
+
};
|
|
314
|
+
events: {
|
|
315
|
+
updatePlacement(data: {
|
|
316
|
+
placement: import("@popperjs/core").Placement;
|
|
317
|
+
}): void;
|
|
318
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
319
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
320
|
+
};
|
|
321
|
+
}>;
|
|
299
322
|
};
|
|
300
323
|
//# sourceMappingURL=Popup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../popup/lib/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../../popup/lib/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAId;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;;;OASG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;;OAMG;;;;;;;;;;;;;;;;;;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;IAEH;;;;;OAKG;;;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createContainer } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { PopupBody } from './PopupBody';
|
|
4
|
+
import { PopupButtonGroup } from './PopupButtonGroup';
|
|
4
5
|
import { PopupCard } from './PopupCard';
|
|
5
6
|
import { PopupCloseButton } from './PopupCloseButton';
|
|
6
7
|
import { PopupCloseIcon } from './PopupCloseIcon';
|
|
@@ -101,6 +102,12 @@ export const Popup = createContainer()({
|
|
|
101
102
|
* {@link usePopupCloseButton}.
|
|
102
103
|
*/
|
|
103
104
|
CloseButton: PopupCloseButton,
|
|
105
|
+
/**
|
|
106
|
+
* A `Popup.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
107
|
+
* visually group buttons within a popup and can place buttons at the start, center, or end of the
|
|
108
|
+
* container.
|
|
109
|
+
*/
|
|
110
|
+
ButtonGroup: PopupButtonGroup,
|
|
104
111
|
},
|
|
105
112
|
})(({ children }) => {
|
|
106
113
|
return _jsx(_Fragment, { children: children });
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { CSProps } from '@workday/canvas-kit-styling';
|
|
4
|
+
export interface PopupButtonGroupProps extends GrowthBehavior, CSProps {
|
|
5
|
+
/**
|
|
6
|
+
* The contents of the PopupButtonGroup. Can be `Button` children or any valid elements.
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* The position of elements within the PopupButtonGroup. Can be `start`, `center`, or `end`.
|
|
11
|
+
* @default 'end'
|
|
12
|
+
*/
|
|
13
|
+
position?: 'start' | 'center' | 'end';
|
|
14
|
+
}
|
|
15
|
+
export declare const popupButtonGroupStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
16
|
+
position: {
|
|
17
|
+
start: {
|
|
18
|
+
justifyContent: string;
|
|
19
|
+
};
|
|
20
|
+
center: {
|
|
21
|
+
justifyContent: string;
|
|
22
|
+
};
|
|
23
|
+
end: {
|
|
24
|
+
justifyContent: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
grow: {
|
|
28
|
+
true: {
|
|
29
|
+
'& button': {
|
|
30
|
+
width: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}, {}, {}, never, never>;
|
|
35
|
+
export declare const PopupButtonGroup: import("@workday/canvas-kit-react/common").ElementComponentM<"div", PopupButtonGroupProps, {
|
|
36
|
+
state: {
|
|
37
|
+
stackRef: React.RefObject<HTMLDivElement>;
|
|
38
|
+
targetRef: React.RefObject<HTMLButtonElement>;
|
|
39
|
+
initialFocusRef: React.RefObject<any> | undefined;
|
|
40
|
+
returnFocusRef: React.RefObject<any> | undefined;
|
|
41
|
+
placement: import("@popperjs/core").Placement;
|
|
42
|
+
id: string;
|
|
43
|
+
visibility: "hidden" | "visible";
|
|
44
|
+
};
|
|
45
|
+
events: {
|
|
46
|
+
updatePlacement(data: {
|
|
47
|
+
placement: import("@popperjs/core").Placement;
|
|
48
|
+
}): void;
|
|
49
|
+
show(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
50
|
+
hide(event?: Event | React.SyntheticEvent<Element, Event> | undefined): void;
|
|
51
|
+
};
|
|
52
|
+
}>;
|
|
53
|
+
//# sourceMappingURL=PopupButtonGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PopupButtonGroup.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,cAAc,EAAqB,MAAM,kCAAkC,CAAC;AACpF,OAAO,EAAC,OAAO,EAA8B,MAAM,6BAA6B,CAAC;AAKjF,MAAM,WAAW,qBAAsB,SAAQ,cAAc,EAAE,OAAO;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;CACvC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;wBA4BlC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;EAS3B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { createStencil, handleCsProp } from '@workday/canvas-kit-styling';
|
|
4
|
+
import { system } from '@workday/canvas-tokens-web';
|
|
5
|
+
import { usePopupModel } from './hooks';
|
|
6
|
+
export const popupButtonGroupStencil = createStencil({
|
|
7
|
+
base: { name: "u628z", styles: "box-sizing:border-box;display:flex;gap:var(--cnvs-sys-gap-sm, var(--cnvs-sys-space-x2, 0.5rem));@media screen and (max-width: 768px){flex-direction:column;}" },
|
|
8
|
+
modifiers: {
|
|
9
|
+
position: {
|
|
10
|
+
start: { name: "461870", styles: "justify-content:flex-start;" },
|
|
11
|
+
center: { name: "3xs59f", styles: "justify-content:center;" },
|
|
12
|
+
end: { name: "r67bx", styles: "justify-content:flex-end;" }
|
|
13
|
+
},
|
|
14
|
+
grow: {
|
|
15
|
+
true: { name: "1p9ysq", styles: "& button{width:100%;}" }
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}, "popup-button-group-1d7c77");
|
|
19
|
+
export const PopupButtonGroup = createSubcomponent('div')({
|
|
20
|
+
displayName: 'Popup.ButtonGroup',
|
|
21
|
+
modelHook: usePopupModel,
|
|
22
|
+
})(({ children, position = 'end', grow, ...elemProps }, Element) => {
|
|
23
|
+
return (_jsx(Element, { ...handleCsProp(elemProps, popupButtonGroupStencil({ position, grow })), children: children }));
|
|
24
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopupCard.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AACpD,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAc,MAAM,kCAAkC,CAAC;AAc7E,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAChF,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA6DD,eAAO,MAAM,gBAAgB;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PopupCard.d.ts","sourceRoot":"","sources":["../../../../popup/lib/PopupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAC,IAAI,EAAC,MAAM,gCAAgC,CAAC;AACpD,OAAO,EACL,YAAY,EAGb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAC,cAAc,EAAc,MAAM,kCAAkC,CAAC;AAc7E,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,GAAG,cAAc,CAAC;AAChF,MAAM,WAAW,cAAe,SAAQ,eAAe;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AA6DD,eAAO,MAAM,gBAAgB;;;;;;;;gBAkC3B,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;EA2BpB,CAAC"}
|
|
@@ -58,7 +58,7 @@ export const popupCardStencil = createStencil({
|
|
|
58
58
|
transformOriginHorizontal: '',
|
|
59
59
|
transformOriginVertical: '',
|
|
60
60
|
},
|
|
61
|
-
base: { name: "
|
|
61
|
+
base: { name: "1t20fc", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);font-size:var(--cnvs-sys-font-size-subtext-lg, var(--cnvs-sys-font-size-subtext-large, 0.875rem));line-height:var(--cnvs-sys-line-height-subtext-lg, var(--cnvs-sys-line-height-subtext-large, 1.25rem));color:var(--cnvs-sys-color-fg-default);position:relative;max-width:calc(100vw - var(--cnvs-sys-size-sm, var(--cnvs-sys-space-x8, 2rem)));gap:var(--cnvs-sys-gap-lg, var(--cnvs-sys-space-x6, 1.5rem));box-shadow:var(--cnvs-sys-depth-3);min-height:0;padding:var(--cnvs-sys-padding-xl, var(--cnvs-sys-space-x6, 1.5rem));border-radius:var(--cnvs-sys-shape-xxxl, 2rem);max-height:var(--maxHeight-popup-card-b9f0ce);overflow-y:auto;animation-name:animation-29kkhp;animation-duration:150ms;animation-timing-function:ease-out;transform-origin:var(--transformOriginVertical-popup-card-b9f0ce) var(--transformOriginHorizontal-popup-card-b9f0ce);.wd-no-animation &{animation:none;}@media screen and (max-width: 768px){transform-origin:bottom center;padding:var(--cnvs-sys-padding-lg, var(--cnvs-sys-space-x5, 1.25rem));}" }
|
|
62
62
|
}, "popup-card-b9f0ce");
|
|
63
63
|
export const PopupCard = createSubcomponent('div')({
|
|
64
64
|
displayName: 'Popup.Card',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastCloseIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"ToastCloseIcon.d.ts","sourceRoot":"","sources":["../../../../toast/lib/ToastCloseIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAkB,MAAM,kCAAkC,CAAC;AAE/E,OAAO,EAAC,KAAK,EAAC,MAAM,iCAAiC,CAAC;AAItD,MAAM,WAAW,mBAAoB,SAAQ,YAAY,CAAC,OAAO,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC;CAAG;AAE3F,eAAO,MAAM,qBAAqB,iJAMhC,CAAC;AAEH,eAAO,MAAM,cAAc,4FAYzB,CAAC"}
|
|
@@ -2,10 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
3
|
import { mergeStyles } from '@workday/canvas-kit-react/layout';
|
|
4
4
|
import { Popup } from '@workday/canvas-kit-react/popup';
|
|
5
|
-
import { createStencil
|
|
5
|
+
import { createStencil } from '@workday/canvas-kit-styling';
|
|
6
|
+
import { base } from '@workday/canvas-tokens-web';
|
|
6
7
|
export const toastCloseIconStencil = createStencil({
|
|
7
|
-
base: { name: "
|
|
8
|
-
}, "toast-close-icon-
|
|
8
|
+
base: { name: "2ifk0o", styles: "box-sizing:border-box;position:absolute;inset-block-start:var(--cnvs-base-size-50, 0.25rem);inset-inline-end:var(--cnvs-base-size-50, 0.25rem);" }
|
|
9
|
+
}, "toast-close-icon-05fbc5");
|
|
9
10
|
export const ToastCloseIcon = createComponent('button')({
|
|
10
11
|
displayName: 'Toast.CloseIcon',
|
|
11
12
|
Component: (elemProps, ref, Element) => {
|
package/modal/lib/Modal.tsx
CHANGED
|
@@ -92,6 +92,12 @@ export const Modal = createContainer()({
|
|
|
92
92
|
* full body overflow is desired.
|
|
93
93
|
*/
|
|
94
94
|
OverflowOverlay: ModalOverflowOverlay,
|
|
95
|
+
/**
|
|
96
|
+
* A `Modal.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
97
|
+
* group buttons within a modal and can place buttons at the start, center, or end of the
|
|
98
|
+
* container.
|
|
99
|
+
*/
|
|
100
|
+
ButtonGroup: Popup.ButtonGroup,
|
|
95
101
|
},
|
|
96
102
|
})<ExtractProps<typeof Dialog, never>>(elemProps => {
|
|
97
103
|
return <>{elemProps.children}</>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "16.0.0-alpha.
|
|
3
|
+
"version": "16.0.0-alpha.0465-next.0",
|
|
4
4
|
"description": "The parent module that contains all Workday Canvas Kit React components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@tanstack/react-virtual": "^3.13.9",
|
|
54
54
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
55
55
|
"@workday/canvas-expressive-icons-web": "1.0.2",
|
|
56
|
-
"@workday/canvas-kit-popup-stack": "^16.0.0-alpha.
|
|
57
|
-
"@workday/canvas-kit-styling": "^16.0.0-alpha.
|
|
56
|
+
"@workday/canvas-kit-popup-stack": "^16.0.0-alpha.0465-next.0",
|
|
57
|
+
"@workday/canvas-kit-styling": "^16.0.0-alpha.0465-next.0",
|
|
58
58
|
"@workday/canvas-system-icons-web": "4.0.4",
|
|
59
59
|
"@workday/canvas-tokens-web": "4.4.0-beta.6",
|
|
60
60
|
"@workday/design-assets-types": "^0.3.0",
|
|
@@ -69,5 +69,5 @@
|
|
|
69
69
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
70
70
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "02dd284d77ccf92991d5526190f453d442ccebcc"
|
|
73
73
|
}
|
package/popup/lib/Popup.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import {createContainer} from '@workday/canvas-kit-react/common';
|
|
4
4
|
|
|
5
5
|
import {PopupBody} from './PopupBody';
|
|
6
|
+
import {PopupButtonGroup} from './PopupButtonGroup';
|
|
6
7
|
import {PopupCard} from './PopupCard';
|
|
7
8
|
import {PopupCloseButton} from './PopupCloseButton';
|
|
8
9
|
import {PopupCloseIcon} from './PopupCloseIcon';
|
|
@@ -111,6 +112,12 @@ export const Popup = createContainer()({
|
|
|
111
112
|
* {@link usePopupCloseButton}.
|
|
112
113
|
*/
|
|
113
114
|
CloseButton: PopupCloseButton,
|
|
115
|
+
/**
|
|
116
|
+
* A `Popup.ButtonGroup` component styled with {@link popupButtonGroupStencil}. It is used to
|
|
117
|
+
* visually group buttons within a popup and can place buttons at the start, center, or end of the
|
|
118
|
+
* container.
|
|
119
|
+
*/
|
|
120
|
+
ButtonGroup: PopupButtonGroup,
|
|
114
121
|
},
|
|
115
122
|
})<PopupProps>(({children}: PopupProps) => {
|
|
116
123
|
return <>{children}</>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import {GrowthBehavior, createSubcomponent} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {CSProps, createStencil, handleCsProp} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
6
|
+
|
|
7
|
+
import {usePopupModel} from './hooks';
|
|
8
|
+
|
|
9
|
+
export interface PopupButtonGroupProps extends GrowthBehavior, CSProps {
|
|
10
|
+
/**
|
|
11
|
+
* The contents of the PopupButtonGroup. Can be `Button` children or any valid elements.
|
|
12
|
+
*/
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The position of elements within the PopupButtonGroup. Can be `start`, `center`, or `end`.
|
|
16
|
+
* @default 'end'
|
|
17
|
+
*/
|
|
18
|
+
position?: 'start' | 'center' | 'end';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const popupButtonGroupStencil = createStencil({
|
|
22
|
+
base: {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
gap: system.legacy.gap.sm,
|
|
25
|
+
'@media screen and (max-width: 768px)': {
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
modifiers: {
|
|
30
|
+
position: {
|
|
31
|
+
start: {
|
|
32
|
+
justifyContent: 'flex-start',
|
|
33
|
+
},
|
|
34
|
+
center: {
|
|
35
|
+
justifyContent: 'center',
|
|
36
|
+
},
|
|
37
|
+
end: {
|
|
38
|
+
justifyContent: 'flex-end',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
grow: {
|
|
42
|
+
true: {
|
|
43
|
+
'& button': {
|
|
44
|
+
width: '100%',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const PopupButtonGroup = createSubcomponent('div')({
|
|
52
|
+
displayName: 'Popup.ButtonGroup',
|
|
53
|
+
modelHook: usePopupModel,
|
|
54
|
+
})(({children, position = 'end', grow, ...elemProps}: PopupButtonGroupProps, Element) => {
|
|
55
|
+
return (
|
|
56
|
+
<Element {...handleCsProp(elemProps, popupButtonGroupStencil({position, grow}))}>
|
|
57
|
+
{children}
|
|
58
|
+
</Element>
|
|
59
|
+
);
|
|
60
|
+
});
|
package/popup/lib/PopupCard.tsx
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import {ExtractProps, createComponent} from '@workday/canvas-kit-react/common';
|
|
2
2
|
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
3
3
|
import {Popup} from '@workday/canvas-kit-react/popup';
|
|
4
|
-
import {createStencil
|
|
4
|
+
import {createStencil} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {base} from '@workday/canvas-tokens-web';
|
|
5
6
|
|
|
6
7
|
export interface ToastCloseIconProps extends ExtractProps<typeof Popup.CloseIcon, never> {}
|
|
7
8
|
|
|
8
9
|
export const toastCloseIconStencil = createStencil({
|
|
9
10
|
base: {
|
|
10
11
|
position: 'absolute',
|
|
11
|
-
insetBlockStart:
|
|
12
|
-
insetInlineEnd:
|
|
12
|
+
insetBlockStart: base.legacy.size50,
|
|
13
|
+
insetInlineEnd: base.legacy.size50,
|
|
13
14
|
},
|
|
14
15
|
});
|
|
15
16
|
|