@workday/canvas-kit-preview-react 7.0.0-alpha.104-next.29 → 7.0.0-alpha.140-next.6
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/breadcrumbs/index.ts +0 -4
- package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +3 -5
- package/breadcrumbs/package.json +2 -1
- package/color-picker/README.md +1 -1
- package/color-picker/index.ts +1 -1
- package/color-picker/lib/ColorPicker.tsx +2 -3
- package/color-picker/package.json +2 -1
- package/dist/commonjs/breadcrumbs/index.d.ts +0 -3
- package/dist/commonjs/breadcrumbs/index.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/index.js +0 -4
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +2 -14
- package/dist/commonjs/color-picker/index.d.ts +1 -1
- package/dist/commonjs/color-picker/index.d.ts.map +1 -1
- package/dist/commonjs/color-picker/index.js +2 -6
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts +1 -2
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +5 -4
- package/dist/commonjs/menu/index.d.ts +1 -4
- package/dist/commonjs/menu/index.d.ts.map +1 -1
- package/dist/commonjs/menu/index.js +1 -9
- package/dist/commonjs/menu/lib/Menu.d.ts +1 -1
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +3 -2
- package/dist/commonjs/menu/lib/MenuItem.d.ts +1 -2
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +2 -1
- package/dist/commonjs/pill/lib/Pill.d.ts +7 -0
- package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/Pill.js +11 -4
- package/dist/commonjs/pill/lib/PillAvatar.d.ts +1 -0
- package/dist/commonjs/pill/lib/PillAvatar.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/PillAvatar.js +1 -1
- package/dist/commonjs/pill/lib/PillIcon.d.ts +1 -0
- package/dist/commonjs/pill/lib/PillIcon.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/PillIcon.js +1 -1
- package/dist/commonjs/pill/lib/PillIconButton.d.ts +6 -0
- package/dist/commonjs/pill/lib/PillIconButton.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/PillIconButton.js +17 -24
- package/dist/commonjs/pill/lib/PillLabel.d.ts +1 -0
- package/dist/commonjs/pill/lib/PillLabel.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/PillLabel.js +1 -1
- package/dist/commonjs/pill/lib/usePillModel.d.ts +13 -0
- package/dist/commonjs/pill/lib/usePillModel.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/usePillModel.js +7 -1
- package/dist/commonjs/select/index.d.ts +1 -4
- package/dist/commonjs/select/index.d.ts.map +1 -1
- package/dist/commonjs/select/index.js +0 -7
- package/dist/commonjs/select/lib/Select.d.ts +0 -1
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +2 -6
- package/dist/commonjs/select/lib/SelectBase.d.ts +21 -2
- package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectBase.js +12 -13
- package/dist/commonjs/select/lib/SelectMenu.d.ts +2 -2
- package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectMenu.js +2 -2
- package/dist/commonjs/select/lib/SelectOption.d.ts +1 -2
- package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectOption.js +2 -1
- package/dist/commonjs/side-panel/index.d.ts +0 -3
- package/dist/commonjs/side-panel/index.d.ts.map +1 -1
- package/dist/commonjs/side-panel/index.js +0 -7
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +1 -2
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +3 -3
- package/dist/es6/breadcrumbs/index.d.ts +0 -3
- package/dist/es6/breadcrumbs/index.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/index.js +0 -3
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +1 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +2 -14
- package/dist/es6/color-picker/index.d.ts +1 -1
- package/dist/es6/color-picker/index.d.ts.map +1 -1
- package/dist/es6/color-picker/index.js +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.d.ts +1 -2
- package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +2 -3
- package/dist/es6/menu/index.d.ts +1 -4
- package/dist/es6/menu/index.d.ts.map +1 -1
- package/dist/es6/menu/index.js +1 -4
- package/dist/es6/menu/lib/Menu.d.ts +1 -1
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +2 -2
- package/dist/es6/menu/lib/MenuItem.d.ts +1 -2
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.js +1 -1
- package/dist/es6/pill/lib/Pill.d.ts +14 -7
- package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
- package/dist/es6/pill/lib/Pill.js +11 -4
- package/dist/es6/pill/lib/PillAvatar.d.ts +2 -2
- package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillAvatar.js +1 -1
- package/dist/es6/pill/lib/PillIcon.d.ts +2 -2
- package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillIcon.js +1 -1
- package/dist/es6/pill/lib/PillIconButton.d.ts +7 -2
- package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillIconButton.js +18 -25
- package/dist/es6/pill/lib/PillLabel.d.ts +2 -2
- package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillLabel.js +1 -1
- package/dist/es6/pill/lib/usePillModel.d.ts +18 -5
- package/dist/es6/pill/lib/usePillModel.d.ts.map +1 -1
- package/dist/es6/pill/lib/usePillModel.js +8 -2
- package/dist/es6/select/index.d.ts +1 -4
- package/dist/es6/select/index.d.ts.map +1 -1
- package/dist/es6/select/index.js +0 -3
- package/dist/es6/select/lib/Select.d.ts +0 -1
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +1 -2
- package/dist/es6/select/lib/SelectBase.d.ts +21 -2
- package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectBase.js +9 -8
- package/dist/es6/select/lib/SelectMenu.d.ts +2 -2
- package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectMenu.js +1 -2
- package/dist/es6/select/lib/SelectOption.d.ts +1 -2
- package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectOption.js +1 -2
- package/dist/es6/side-panel/index.d.ts +0 -3
- package/dist/es6/side-panel/index.d.ts.map +1 -1
- package/dist/es6/side-panel/index.js +0 -3
- package/dist/es6/side-panel/lib/SidePanel.d.ts +1 -2
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +1 -2
- package/form-field/package.json +2 -1
- package/menu/index.ts +1 -6
- package/menu/lib/Menu.tsx +2 -2
- package/menu/lib/MenuItem.tsx +1 -3
- package/menu/package.json +2 -1
- package/package.json +8 -7
- package/pill/lib/Pill.tsx +10 -2
- package/pill/lib/PillAvatar.tsx +1 -0
- package/pill/lib/PillIcon.tsx +2 -0
- package/pill/lib/PillIconButton.tsx +36 -32
- package/pill/lib/PillLabel.tsx +1 -0
- package/pill/lib/usePillModel.tsx +8 -1
- package/pill/package.json +2 -1
- package/select/README.md +7 -7
- package/select/index.ts +6 -4
- package/select/lib/Select.tsx +1 -3
- package/select/lib/SelectBase.tsx +30 -8
- package/select/lib/SelectMenu.tsx +1 -3
- package/select/lib/SelectOption.tsx +1 -3
- package/select/package.json +2 -1
- package/side-panel/index.ts +0 -4
- package/side-panel/lib/SidePanel.tsx +1 -2
- package/side-panel/package.json +2 -1
- package/text-area/package.json +2 -1
- package/text-input/package.json +2 -1
|
@@ -8,8 +8,14 @@ export declare const usePillModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
|
8
8
|
* Use to disable a pill.
|
|
9
9
|
*/
|
|
10
10
|
disabled: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* ID used to add accessibility labels to pill elements.
|
|
13
|
+
* @default `useUniqueId()`
|
|
14
|
+
*/
|
|
15
|
+
id: string;
|
|
11
16
|
}> & {} & {}) | undefined) => {
|
|
12
17
|
state: {
|
|
18
|
+
id: string;
|
|
13
19
|
/**
|
|
14
20
|
* Determines the max width of the pill. If the pill text is longer than the max width,
|
|
15
21
|
* text will be truncated and a tooltip will show the rest of the content when hovered over
|
|
@@ -31,7 +37,13 @@ export declare const usePillModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
|
31
37
|
* Use to disable a pill.
|
|
32
38
|
*/
|
|
33
39
|
disabled: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* ID used to add accessibility labels to pill elements.
|
|
42
|
+
* @default `useUniqueId()`
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
34
45
|
}, {}, {
|
|
46
|
+
id: string;
|
|
35
47
|
/**
|
|
36
48
|
* Determines the max width of the pill. If the pill text is longer than the max width,
|
|
37
49
|
* text will be truncated and a tooltip will show the rest of the content when hovered over
|
|
@@ -43,6 +55,7 @@ export declare const usePillModel: (<TT_Special_Generic>(config?: (Partial<{
|
|
|
43
55
|
disabled: boolean;
|
|
44
56
|
}, {}, {
|
|
45
57
|
state: {
|
|
58
|
+
id: string;
|
|
46
59
|
/**
|
|
47
60
|
* Determines the max width of the pill. If the pill text is longer than the max width,
|
|
48
61
|
* text will be truncated and a tooltip will show the rest of the content when hovered over
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePillModel.d.ts","sourceRoot":"","sources":["../../../../pill/lib/usePillModel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;IAErB;;;OAGG;;IAEH;;OAEG
|
|
1
|
+
{"version":3,"file":"usePillModel.d.ts","sourceRoot":"","sources":["../../../../pill/lib/usePillModel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;IAErB;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;;;;;QAZH;;;WAGG;;QAEH;;WAEG;;;;;IAPH;;;OAGG;;IAEH;;OAEG;;IAEH;;;OAGG;;;;IAZH;;;OAGG;;IAEH;;OAEG;;;;;QAPH;;;WAGG;;QAEH;;WAEG;;;;EAgBL,CAAC"}
|
|
@@ -24,8 +24,14 @@ exports.usePillModel = common_1.createModelHook({
|
|
|
24
24
|
* Use to disable a pill.
|
|
25
25
|
*/
|
|
26
26
|
disabled: false,
|
|
27
|
+
/**
|
|
28
|
+
* ID used to add accessibility labels to pill elements.
|
|
29
|
+
* @default `useUniqueId()`
|
|
30
|
+
*/
|
|
31
|
+
id: '',
|
|
27
32
|
},
|
|
28
33
|
})(function (config) {
|
|
29
|
-
var
|
|
34
|
+
var id = common_1.useUniqueId(config.id);
|
|
35
|
+
var state = __assign(__assign({}, config), { id: id });
|
|
30
36
|
return { state: state, events: {} };
|
|
31
37
|
});
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import Select from './lib/Select';
|
|
2
|
-
export default Select;
|
|
3
|
-
export { Select };
|
|
4
1
|
export * from './lib/Select';
|
|
5
|
-
export { Option, RenderableOption, RenderOptionFunction } from './lib/SelectBase';
|
|
2
|
+
export { Option, RenderableOption, RenderOptionFunction, RenderSelectedFunction, } from './lib/SelectBase';
|
|
6
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../select/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../select/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC"}
|
|
@@ -9,12 +9,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.Select = void 0;
|
|
17
|
-
var Select_1 = __importDefault(require("./lib/Select"));
|
|
18
|
-
exports.Select = Select_1.default;
|
|
19
|
-
exports.default = Select_1.default;
|
|
20
13
|
__exportStar(require("./lib/Select"), exports);
|
|
@@ -21,5 +21,4 @@ export interface SelectProps extends CoreSelectBaseProps {
|
|
|
21
21
|
export declare const Select: import("@workday/canvas-kit-react/common").ElementComponent<"button", SelectProps> & {
|
|
22
22
|
ErrorType: typeof ErrorType;
|
|
23
23
|
};
|
|
24
|
-
export default Select;
|
|
25
24
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../select/lib/Select.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EAKV,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAa,mBAAmB,EAAE,MAAM,EAAmB,MAAM,cAAc,CAAC;AAIvF,MAAM,WAAW,WAAY,SAAQ,mBAAmB;IACtD;;;;;;;;;;;;;;OAcG;IACH,OAAO,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CAC9B;AAoiBD,eAAO,MAAM,MAAM;;CAUjB,CAAC"}
|
|
@@ -53,15 +53,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
53
53
|
}
|
|
54
54
|
return t;
|
|
55
55
|
};
|
|
56
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
57
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
58
|
-
};
|
|
59
56
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
57
|
exports.Select = void 0;
|
|
61
58
|
var React = __importStar(require("react"));
|
|
62
59
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
63
60
|
var SelectMenu_1 = require("./SelectMenu");
|
|
64
|
-
var SelectBase_1 =
|
|
61
|
+
var SelectBase_1 = require("./SelectBase");
|
|
65
62
|
var utils_1 = require("./utils");
|
|
66
63
|
var SelectContainer = /** @class */ (function (_super) {
|
|
67
64
|
__extends(SelectContainer, _super);
|
|
@@ -504,7 +501,7 @@ var SelectContainer = /** @class */ (function (_super) {
|
|
|
504
501
|
onOptionSelection: this.handleOptionSelection,
|
|
505
502
|
}
|
|
506
503
|
: {};
|
|
507
|
-
return (React.createElement(SelectBase_1.
|
|
504
|
+
return (React.createElement(SelectBase_1.SelectBase, __assign({ forwardedButtonRef: this.forwardedButtonRef, localButtonRef: this.localButtonRef, focusedOptionIndex: focusedOptionIndex, inputRef: this.inputRef, menuRef: this.menuRef, menuVisibility: menuVisibility, options: this.normalizedOptions, value: value }, eventHandlers, elemProps)));
|
|
508
505
|
};
|
|
509
506
|
SelectContainer.ErrorType = common_1.ErrorType;
|
|
510
507
|
return SelectContainer;
|
|
@@ -519,4 +516,3 @@ exports.Select = common_1.createComponent('button')({
|
|
|
519
516
|
ErrorType: common_1.ErrorType,
|
|
520
517
|
},
|
|
521
518
|
});
|
|
522
|
-
exports.default = exports.Select;
|
|
@@ -17,6 +17,9 @@ export interface NormalizedOption extends Option {
|
|
|
17
17
|
id: string;
|
|
18
18
|
label: string;
|
|
19
19
|
}
|
|
20
|
+
export interface RenderSelectedFunction {
|
|
21
|
+
(option: NormalizedOption): React.ReactNode;
|
|
22
|
+
}
|
|
20
23
|
export interface RenderableOption extends NormalizedOption {
|
|
21
24
|
focused: boolean;
|
|
22
25
|
selected: boolean;
|
|
@@ -47,6 +50,22 @@ export interface CoreSelectBaseProps extends Themeable, GrowthBehavior, Pick<Rea
|
|
|
47
50
|
* @default defaultRenderOption
|
|
48
51
|
*/
|
|
49
52
|
renderOption?: RenderOptionFunction;
|
|
53
|
+
/**
|
|
54
|
+
* The function called to render the selected option.
|
|
55
|
+
*
|
|
56
|
+
* The `option` argument passed to the function is an object which contains the following:
|
|
57
|
+
*
|
|
58
|
+
* * `data: object` (data object carried over from the corresponding option originally passed into the component)
|
|
59
|
+
* * `disabled: boolean`
|
|
60
|
+
* * `id: string`
|
|
61
|
+
* * `label: string`
|
|
62
|
+
* * `value: string`
|
|
63
|
+
*
|
|
64
|
+
* If you omit the `renderSelected` prop, each option will be rendered using a `defaultRenderSelected` function provided by the component.
|
|
65
|
+
*
|
|
66
|
+
* @default defaultRenderSelected
|
|
67
|
+
*/
|
|
68
|
+
renderSelected?: RenderSelectedFunction;
|
|
50
69
|
/**
|
|
51
70
|
* The value of the Select.
|
|
52
71
|
*/
|
|
@@ -118,6 +137,6 @@ export interface SelectBaseProps extends CoreSelectBaseProps, StyledType {
|
|
|
118
137
|
}
|
|
119
138
|
export declare const buttonBorderWidth = 1;
|
|
120
139
|
export declare const buttonDefaultWidth = 280;
|
|
121
|
-
declare const SelectBase: ({ "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex, grow, inputRef, menuPlacement, menuRef, menuVisibility, onChange, onKeyDown, onClose, onOptionSelection, options, renderOption, required, shouldMenuAutoFlip, shouldMenuAutoFocus, value, ...elemProps }: SelectBaseProps) => JSX.Element;
|
|
122
|
-
export
|
|
140
|
+
export declare const SelectBase: ({ "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired, as, forwardedButtonRef, localButtonRef, disabled, error, focusedOptionIndex, grow, inputRef, menuPlacement, menuRef, menuVisibility, onChange, onKeyDown, onClose, onOptionSelection, options, renderOption, renderSelected, required, shouldMenuAutoFlip, shouldMenuAutoFocus, value, ...elemProps }: SelectBaseProps) => JSX.Element;
|
|
141
|
+
export {};
|
|
123
142
|
//# sourceMappingURL=SelectBase.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBase.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAE7C,OAAO,EACL,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EAIV,MAAM,kCAAkC,CAAC;AAe1C,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAGtD,UAAU,UAAU;IAIlB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAiB,SAAQ,MAAM;IAE9C,IAAI,EAAE,U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,aAAa,CAAC;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;;OAGG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC9D;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;;;OAOG;IACH,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,MAAM,CAAC;AA8GtC,eAAO,MAAM,UAAU,8WA0BpB,eAAe,gBAgKjB,CAAC"}
|
|
@@ -40,18 +40,15 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
40
40
|
}
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
44
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
45
|
-
};
|
|
46
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
-
exports.buttonDefaultWidth = exports.buttonBorderWidth = void 0;
|
|
44
|
+
exports.SelectBase = exports.buttonDefaultWidth = exports.buttonBorderWidth = void 0;
|
|
48
45
|
var react_1 = __importStar(require("react"));
|
|
49
46
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
50
47
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
51
48
|
var canvas_system_icons_web_1 = require("@workday/canvas-system-icons-web");
|
|
52
49
|
var icon_1 = require("@workday/canvas-kit-react/icon");
|
|
53
|
-
var SelectMenu_1 =
|
|
54
|
-
var SelectOption_1 =
|
|
50
|
+
var SelectMenu_1 = require("./SelectMenu");
|
|
51
|
+
var SelectOption_1 = require("./SelectOption");
|
|
55
52
|
var scrolling_1 = require("./scrolling");
|
|
56
53
|
var utils_1 = require("./utils");
|
|
57
54
|
exports.buttonBorderWidth = 1;
|
|
@@ -126,10 +123,13 @@ var SelectWrapper = common_1.styled('div')({
|
|
|
126
123
|
});
|
|
127
124
|
});
|
|
128
125
|
var defaultRenderOption = function (option) {
|
|
129
|
-
return react_1.default.createElement("div", null, option
|
|
126
|
+
return react_1.default.createElement("div", null, defaultRenderSelected(option));
|
|
127
|
+
};
|
|
128
|
+
var defaultRenderSelected = function (option) {
|
|
129
|
+
return option.label;
|
|
130
130
|
};
|
|
131
131
|
var SelectBase = function (_a) {
|
|
132
|
-
var ariaLabelledBy = _a["aria-labelledby"], ariaRequired = _a["aria-required"], as = _a.as, forwardedButtonRef = _a.forwardedButtonRef, localButtonRef = _a.localButtonRef, disabled = _a.disabled, error = _a.error, _b = _a.focusedOptionIndex, focusedOptionIndex = _b === void 0 ? 0 : _b, grow = _a.grow, inputRef = _a.inputRef, _c = _a.menuPlacement, menuPlacement = _c === void 0 ? 'bottom' : _c, menuRef = _a.menuRef, _d = _a.menuVisibility, menuVisibility = _d === void 0 ? 'closed' : _d, onChange = _a.onChange, onKeyDown = _a.onKeyDown, onClose = _a.onClose, onOptionSelection = _a.onOptionSelection, options = _a.options, _e = _a.renderOption, renderOption = _e === void 0 ? defaultRenderOption : _e, required = _a.required,
|
|
132
|
+
var ariaLabelledBy = _a["aria-labelledby"], ariaRequired = _a["aria-required"], as = _a.as, forwardedButtonRef = _a.forwardedButtonRef, localButtonRef = _a.localButtonRef, disabled = _a.disabled, error = _a.error, _b = _a.focusedOptionIndex, focusedOptionIndex = _b === void 0 ? 0 : _b, grow = _a.grow, inputRef = _a.inputRef, _c = _a.menuPlacement, menuPlacement = _c === void 0 ? 'bottom' : _c, menuRef = _a.menuRef, _d = _a.menuVisibility, menuVisibility = _d === void 0 ? 'closed' : _d, onChange = _a.onChange, onKeyDown = _a.onKeyDown, onClose = _a.onClose, onOptionSelection = _a.onOptionSelection, options = _a.options, _e = _a.renderOption, renderOption = _e === void 0 ? defaultRenderOption : _e, _f = _a.renderSelected, renderSelected = _f === void 0 ? defaultRenderSelected : _f, required = _a.required, _g = _a.shouldMenuAutoFlip, shouldMenuAutoFlip = _g === void 0 ? true : _g, _h = _a.shouldMenuAutoFocus, shouldMenuAutoFocus = _h === void 0 ? true : _h, value = _a.value, elemProps = __rest(_a, ['aria-labelledby', 'aria-required', "as", "forwardedButtonRef", "localButtonRef", "disabled", "error", "focusedOptionIndex", "grow", "inputRef", "menuPlacement", "menuRef", "menuVisibility", "onChange", "onKeyDown", "onClose", "onOptionSelection", "options", "renderOption", "renderSelected", "required", "shouldMenuAutoFlip", "shouldMenuAutoFocus", "value"]);
|
|
133
133
|
var focusedOptionRef = react_1.default.useRef(null);
|
|
134
134
|
var menuId = common_1.useUniqueId();
|
|
135
135
|
var renderOptions = function (renderOption) {
|
|
@@ -148,7 +148,7 @@ var SelectBase = function (_a) {
|
|
|
148
148
|
: {}));
|
|
149
149
|
// Pass in additional information about the option state: focused, selected
|
|
150
150
|
var normalizedOption = __assign(__assign({}, option), { focused: optionProps.focused, selected: !!optionProps['aria-selected'] });
|
|
151
|
-
return react_1.default.createElement(SelectOption_1.
|
|
151
|
+
return react_1.default.createElement(SelectOption_1.SelectOption, __assign({}, optionProps), renderOption(normalizedOption));
|
|
152
152
|
});
|
|
153
153
|
};
|
|
154
154
|
// If the focused option changed, scroll the newly focused option into view (if
|
|
@@ -204,7 +204,6 @@ var SelectBase = function (_a) {
|
|
|
204
204
|
// Do a bit of error-checking in case options weren't provided
|
|
205
205
|
var hasOptions = options.length > 0;
|
|
206
206
|
var selectedOption = hasOptions ? options[utils_1.getCorrectedIndexByValue(options, value)] : null;
|
|
207
|
-
var selectedOptionLabel = selectedOption ? selectedOption.label : '';
|
|
208
207
|
var selectedOptionValue = selectedOption ? selectedOption.value : '';
|
|
209
208
|
return (react_1.default.createElement(SelectWrapper, { grow: grow, disabled: disabled },
|
|
210
209
|
react_1.default.createElement(SelectButton, __assign({ "aria-expanded": menuVisibility !== 'closed' ? 'true' : undefined, "aria-haspopup": "listbox", "aria-controls": menuVisibility !== 'closed' ? menuId : undefined, as: as, disabled: disabled, error: error, grow: grow, menuVisibility: menuVisibility, onKeyDown: onKeyDown,
|
|
@@ -213,9 +212,9 @@ var SelectBase = function (_a) {
|
|
|
213
212
|
// the menu)
|
|
214
213
|
onKeyUp: function (e) {
|
|
215
214
|
e.preventDefault();
|
|
216
|
-
}, ref: forwardedButtonRef, type: "button", value: selectedOptionValue }, elemProps),
|
|
215
|
+
}, ref: forwardedButtonRef, type: "button", value: selectedOptionValue }, elemProps), !!selectedOption && renderSelected(selectedOption)),
|
|
217
216
|
react_1.default.createElement(SelectInput, { onChange: onChange, ref: inputRef, type: "text", value: selectedOptionValue }),
|
|
218
|
-
hasOptions && menuVisibility !== 'closed' && (react_1.default.createElement(SelectMenu_1.
|
|
217
|
+
hasOptions && menuVisibility !== 'closed' && (react_1.default.createElement(SelectMenu_1.SelectMenu, { "aria-activedescendant": options[focusedOptionIndex].id, "aria-labelledby": ariaLabelledBy, "aria-required": ariaRequired || required ? true : undefined, buttonRef: localButtonRef, id: menuId, error: error, menuRef: menuRef, onKeyDown: onKeyDown, onClose: onClose, placement: menuPlacement, shouldAutoFlip: shouldMenuAutoFlip, shouldAutoFocus: shouldMenuAutoFocus, visibility: menuVisibility }, renderOptions(renderOption))),
|
|
219
218
|
react_1.default.createElement(SelectMenuIcon, { className: "menu-icon", icon: canvas_system_icons_web_1.caretDownSmallIcon, color: disabled ? tokens_1.colors.licorice100 : tokens_1.colors.licorice200, colorHover: disabled ? tokens_1.colors.licorice100 : tokens_1.colors.licorice500, size: menuIconSize })));
|
|
220
219
|
};
|
|
221
|
-
exports.
|
|
220
|
+
exports.SelectBase = SelectBase;
|
|
@@ -37,6 +37,6 @@ interface SelectMenuProps extends Themeable, React.HTMLAttributes<HTMLUListEleme
|
|
|
37
37
|
visibility?: MenuVisibility;
|
|
38
38
|
}
|
|
39
39
|
export declare const menuAnimationDuration = 200;
|
|
40
|
-
declare const SelectMenu: ({ buttonRef, children, error, menuRef, onClose, placement, shouldAutoFlip, shouldAutoFocus, visibility, ...elemProps }: SelectMenuProps) => JSX.Element;
|
|
41
|
-
export
|
|
40
|
+
export declare const SelectMenu: ({ buttonRef, children, error, menuRef, onClose, placement, shouldAutoFlip, shouldAutoFocus, visibility, ...elemProps }: SelectMenuProps) => JSX.Element;
|
|
41
|
+
export {};
|
|
42
42
|
//# sourceMappingURL=SelectMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectMenu.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAgC,SAAS,EAAS,MAAM,kCAAkC,CAAC;AAYlG,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAErC,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAEtD,UAAU,eACR,SAAQ,SAAS,EACf,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EACtC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAwKzC,
|
|
1
|
+
{"version":3,"file":"SelectMenu.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAG/E,OAAO,EAAgC,SAAS,EAAS,MAAM,kCAAkC,CAAC;AAYlG,OAAO,EAAC,WAAW,EAAC,MAAM,UAAU,CAAC;AAErC,OAAO,EAAC,aAAa,EAAE,cAAc,EAAC,MAAM,SAAS,CAAC;AAEtD,UAAU,eACR,SAAQ,SAAS,EACf,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,EACtC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAwKzC,eAAO,MAAM,UAAU,2HAWpB,eAAe,gBA2DjB,CAAC"}
|
|
@@ -41,7 +41,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
-
exports.menuAnimationDuration = void 0;
|
|
44
|
+
exports.SelectMenu = exports.menuAnimationDuration = void 0;
|
|
45
45
|
var react_1 = __importStar(require("react"));
|
|
46
46
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
47
47
|
var popup_1 = require("@workday/canvas-kit-react/popup");
|
|
@@ -235,4 +235,4 @@ var SelectMenu = function (_a) {
|
|
|
235
235
|
react_1.default.createElement(Menu, { error: error, visibility: visibility, width: width },
|
|
236
236
|
react_1.default.createElement(MenuList, __assign({ error: error, ref: menuRef, role: "listbox", tabIndex: -1 }, elemProps), children))));
|
|
237
237
|
};
|
|
238
|
-
exports.
|
|
238
|
+
exports.SelectMenu = SelectMenu;
|
|
@@ -28,6 +28,5 @@ export interface SelectOptionProps extends Themeable, React.LiHTMLAttributes<HTM
|
|
|
28
28
|
*/
|
|
29
29
|
value?: string;
|
|
30
30
|
}
|
|
31
|
-
declare const SelectOption: ({ children, focused, interactive, optionRef, value, ...elemProps }: SelectOptionProps) => JSX.Element;
|
|
32
|
-
export default SelectOption;
|
|
31
|
+
export declare const SelectOption: ({ children, focused, interactive, optionRef, value, ...elemProps }: SelectOptionProps) => JSX.Element;
|
|
33
32
|
//# sourceMappingURL=SelectOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EACT,SAAS,EAGV,MAAM,kCAAkC,CAAC;AAG1C,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACzF;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqED,
|
|
1
|
+
{"version":3,"file":"SelectOption.d.ts","sourceRoot":"","sources":["../../../../select/lib/SelectOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAEL,SAAS,EACT,SAAS,EAGV,MAAM,kCAAkC,CAAC;AAG1C,MAAM,WAAW,iBAAkB,SAAQ,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,aAAa,CAAC;IACzF;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqED,eAAO,MAAM,YAAY,uEAOtB,iBAAiB,gBAanB,CAAC"}
|
|
@@ -41,6 +41,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
41
41
|
return t;
|
|
42
42
|
};
|
|
43
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
44
|
+
exports.SelectOption = void 0;
|
|
44
45
|
var React = __importStar(require("react"));
|
|
45
46
|
var common_1 = require("@workday/canvas-kit-react/common");
|
|
46
47
|
var tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
@@ -99,4 +100,4 @@ var SelectOption = function (_a) {
|
|
|
99
100
|
var children = _a.children, _b = _a.focused, focused = _b === void 0 ? false : _b, _c = _a.interactive, interactive = _c === void 0 ? true : _c, optionRef = _a.optionRef, value = _a.value, elemProps = __rest(_a, ["children", "focused", "interactive", "optionRef", "value"]);
|
|
100
101
|
return (React.createElement(Option, __assign({ "data-value": value, focused: focused, interactive: interactive, ref: optionRef, role: "option" }, elemProps), children));
|
|
101
102
|
};
|
|
102
|
-
exports.
|
|
103
|
+
exports.SelectOption = SelectOption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../side-panel/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../side-panel/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
|
|
@@ -9,13 +9,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.SidePanel = void 0;
|
|
17
|
-
var SidePanel_1 = __importDefault(require("./lib/SidePanel"));
|
|
18
|
-
exports.SidePanel = SidePanel_1.default;
|
|
19
|
-
exports.default = SidePanel_1.default;
|
|
20
13
|
__exportStar(require("./lib/hooks"), exports);
|
|
21
14
|
__exportStar(require("./lib/SidePanel"), exports);
|
|
@@ -66,7 +66,7 @@ export declare const SidePanelContext: React.Context<{
|
|
|
66
66
|
state: string;
|
|
67
67
|
origin: string;
|
|
68
68
|
}>;
|
|
69
|
-
declare const SidePanel: {
|
|
69
|
+
export declare const SidePanel: {
|
|
70
70
|
({ as, children, collapsedWidth, expanded, expandedWidth, onAnimationEnd, onAnimationStart, onExpandedChange, onStateTransition, origin, variant, touched, ...elemProps }: SidePanelProps): jsx.JSX.Element;
|
|
71
71
|
ToggleButton: ({ variant, icon, tooltipTextExpand: expandLabel, tooltipTextCollapse: collapseLabel, ...rest }: ToggleButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>) => jsx.JSX.Element;
|
|
72
72
|
};
|
|
@@ -82,5 +82,4 @@ export declare type ToggleButtonProps = TertiaryButtonProps & {
|
|
|
82
82
|
*/
|
|
83
83
|
tooltipTextCollapse?: string;
|
|
84
84
|
};
|
|
85
|
-
export default SidePanel;
|
|
86
85
|
//# sourceMappingURL=SidePanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanel.d.ts","sourceRoot":"","sources":["../../../../side-panel/lib/SidePanel.tsx"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,eAAe;AACf,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAM,GAAG,EAAuB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAiB,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AAKrF,oBAAY,gBAAgB,GAAG,UAAU,GAAG,WAAW,CAAC;AACxD,oBAAY,yBAAyB,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,WAAW,CAAC;AAE9F,MAAM,WAAW,cAAe,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC1E;;;;OAIG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC1B;;;;OAIG;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C,KAAK,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAChE;;;;OAIG;IACH,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B;;;;OAIG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAsCD,eAAO,MAAM,gBAAgB;;;EAG3B,CAAC;AAEH,eAAO,MAAM,SAAS;+KAcnB,cAAc;mHA0Gd,iBAAiB,GAAG,MAAM,oBAAoB,CAAC,iBAAiB,CAAC;CAxBnE,CAAC;AAEF,oBAAY,iBAAiB,GAAG,mBAAmB,GAAG;IACpD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B,CAAC"}
|
|
@@ -45,7 +45,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
45
45
|
return t;
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.SidePanelContext = void 0;
|
|
48
|
+
exports.SidePanel = exports.SidePanelContext = void 0;
|
|
49
49
|
/** @jsxRuntime classic */
|
|
50
50
|
/** @jsx jsx */
|
|
51
51
|
var React = __importStar(require("react"));
|
|
@@ -136,6 +136,7 @@ var SidePanel = function (_a) {
|
|
|
136
136
|
origin: origin,
|
|
137
137
|
} }, children)));
|
|
138
138
|
};
|
|
139
|
+
exports.SidePanel = SidePanel;
|
|
139
140
|
/**
|
|
140
141
|
* A toggle button styled specifically for the side panel container.
|
|
141
142
|
*/
|
|
@@ -167,6 +168,5 @@ var ToggleButton = function (_a) {
|
|
|
167
168
|
return (react_1.jsx(tooltip_1.Tooltip, { title: context.state === 'collapsed' ? expandLabel : collapseLabel, type: "muted" },
|
|
168
169
|
react_1.jsx(button_1.TertiaryButton, __assign({ type: "button", css: buttonStyle, icon: icon, variant: variant }, rest))));
|
|
169
170
|
};
|
|
170
|
-
SidePanel.ToggleButton = ToggleButton;
|
|
171
|
-
exports.default = SidePanel;
|
|
171
|
+
exports.SidePanel.ToggleButton = ToggleButton;
|
|
172
172
|
var templateObject_1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../breadcrumbs/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../breadcrumbs/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/List/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,oBAAY,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAE1E,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../breadcrumbs/lib/Breadcrumbs/List/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,oBAAY,oBAAoB,GAAG,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAE1E,eAAO,MAAM,eAAe,yFAmB1B,CAAC"}
|
|
@@ -9,24 +9,12 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
12
|
import React from 'react';
|
|
24
13
|
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
25
14
|
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
26
15
|
export var BreadcrumbsList = createComponent('ul')({
|
|
27
16
|
displayName: 'BreadcrumbsList',
|
|
28
|
-
Component: function (
|
|
29
|
-
|
|
30
|
-
return (React.createElement(Flex, __assign({ padding: "zero", margin: "zero", display: "inline-flex", alignItems: "center", minHeight: 40, listStyle: "none", style: { boxSizing: 'border-box' }, as: "ul", role: "list", ref: ref }, elemProps), children));
|
|
17
|
+
Component: function (elemProps, ref, Element) {
|
|
18
|
+
return (React.createElement(Flex, __assign({ as: Element, padding: "zero", margin: "zero", display: "inline-flex", alignItems: "center", minHeight: 40, listStyle: "none", style: { boxSizing: 'border-box' }, role: "list", ref: ref }, elemProps)));
|
|
31
19
|
},
|
|
32
20
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ColorPicker, ColorPickerProps } from './lib/ColorPicker';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../color-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../color-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { ColorPicker } from './lib/ColorPicker';
|
|
@@ -47,9 +47,8 @@ export interface ColorPickerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
47
47
|
*/
|
|
48
48
|
resetLabel?: string;
|
|
49
49
|
}
|
|
50
|
-
declare const ColorPicker: {
|
|
50
|
+
export declare const ColorPicker: {
|
|
51
51
|
({ colorSet, customHexInputLabel, submitLabel, onColorChange, onColorReset, onSubmitClick, resetLabel, resetColor, value, showCustomHexInput, ...elemProps }: ColorPickerProps): JSX.Element;
|
|
52
52
|
defaultColorSet: string[];
|
|
53
53
|
};
|
|
54
|
-
export default ColorPicker;
|
|
55
54
|
//# sourceMappingURL=ColorPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../color-picker/lib/ColorPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5E;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IACjD;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAsGD,
|
|
1
|
+
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../color-picker/lib/ColorPicker.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5E;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC;IACjD;;;OAGG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAsGD,eAAO,MAAM,WAAW;kKAYrB,gBAAgB;;CA0ClB,CAAC"}
|
|
@@ -25,7 +25,7 @@ import { checkIcon } from '@workday/canvas-system-icons-web';
|
|
|
25
25
|
import { ColorInput } from '@workday/canvas-kit-react/color-picker';
|
|
26
26
|
import { SecondaryButton } from '@workday/canvas-kit-react/button';
|
|
27
27
|
import * as React from 'react';
|
|
28
|
-
import FormField from '@workday/canvas-kit-react/form-field';
|
|
28
|
+
import { FormField } from '@workday/canvas-kit-react/form-field';
|
|
29
29
|
import styled from '@emotion/styled';
|
|
30
30
|
import { ResetButton } from './parts/ColorReset';
|
|
31
31
|
import { SwatchBook } from './parts/SwatchBook';
|
|
@@ -115,7 +115,7 @@ var isCustomColor = function (colors, hexCode) {
|
|
|
115
115
|
var lowercaseHex = hexCode.toLowerCase();
|
|
116
116
|
return !colors.includes(lowercaseHex);
|
|
117
117
|
};
|
|
118
|
-
var ColorPicker = function (_a) {
|
|
118
|
+
export var ColorPicker = function (_a) {
|
|
119
119
|
var _b = _a.colorSet, colorSet = _b === void 0 ? defaultColorSet : _b, _c = _a.customHexInputLabel, customHexInputLabel = _c === void 0 ? 'Custom Hex Color' : _c, _d = _a.submitLabel, submitLabel = _d === void 0 ? 'Submit' : _d, onColorChange = _a.onColorChange, onColorReset = _a.onColorReset, onSubmitClick = _a.onSubmitClick, _e = _a.resetLabel, resetLabel = _e === void 0 ? 'Reset' : _e, resetColor = _a.resetColor, _f = _a.value, value = _f === void 0 ? '' : _f, _g = _a.showCustomHexInput, showCustomHexInput = _g === void 0 ? false : _g, elemProps = __rest(_a, ["colorSet", "customHexInputLabel", "submitLabel", "onColorChange", "onColorReset", "onSubmitClick", "resetLabel", "resetColor", "value", "showCustomHexInput"]);
|
|
120
120
|
var _h = React.useState(''), validHexValue = _h[0], setValidHexValue = _h[1];
|
|
121
121
|
var _j = React.useState(isCustomColor(colorSet, value) ? value : ''), customHexValue = _j[0], setCustomHexValue = _j[1];
|
|
@@ -140,4 +140,3 @@ var ColorPicker = function (_a) {
|
|
|
140
140
|
React.createElement(CheckButton, { "aria-label": submitLabel, icon: checkIcon })))));
|
|
141
141
|
};
|
|
142
142
|
ColorPicker.defaultColorSet = defaultColorSet;
|
|
143
|
-
export default ColorPicker;
|
package/dist/es6/menu/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
package/dist/es6/menu/index.js
CHANGED
|
@@ -39,7 +39,7 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
|
|
|
39
39
|
export interface MenuState {
|
|
40
40
|
selectedItemIndex: number;
|
|
41
41
|
}
|
|
42
|
-
export
|
|
42
|
+
export declare class Menu extends React.Component<MenuProps, MenuState> {
|
|
43
43
|
private id;
|
|
44
44
|
private animateId;
|
|
45
45
|
private menuRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,aAAa,EAAC,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAiB,cAAc,EAAmB,MAAM,kCAAkC,CAAC;AAElG,MAAM,WAAW,SAAU,SAAQ,cAAc,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IACvF;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACnF;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,SAAS;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAaD,
|
|
1
|
+
{"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../../menu/lib/Menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,aAAa,E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AC,kBAAkB,CAWxB;IAEF,OAAO,CAAC,kBAAkB,CA+BxB;IAEF,OAAO,CAAC,sBAAsB,CAU5B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;CACH"}
|
|
@@ -160,7 +160,7 @@ var Menu = /** @class */ (function (_super) {
|
|
|
160
160
|
_this.setFirstCharacters = function () {
|
|
161
161
|
var getFirstCharacter = function (child) {
|
|
162
162
|
var character = '';
|
|
163
|
-
if (!child || typeof child === 'boolean'
|
|
163
|
+
if (!child || typeof child === 'boolean') {
|
|
164
164
|
character = '';
|
|
165
165
|
}
|
|
166
166
|
else if (typeof child === 'string' || typeof child === 'number') {
|
|
@@ -260,4 +260,4 @@ var Menu = /** @class */ (function (_super) {
|
|
|
260
260
|
};
|
|
261
261
|
return Menu;
|
|
262
262
|
}(React.Component));
|
|
263
|
-
export
|
|
263
|
+
export { Menu };
|
|
@@ -43,11 +43,10 @@ export interface MenuItemProps extends React.LiHTMLAttributes<HTMLLIElement> {
|
|
|
43
43
|
*/
|
|
44
44
|
shouldClose?: boolean;
|
|
45
45
|
}
|
|
46
|
-
declare class MenuItem extends React.Component<MenuItemProps> {
|
|
46
|
+
export declare class MenuItem extends React.Component<MenuItemProps> {
|
|
47
47
|
ref: React.RefObject<HTMLLIElement>;
|
|
48
48
|
componentDidUpdate: (prevProps: MenuItemProps) => void;
|
|
49
49
|
render(): React.ReactNode;
|
|
50
50
|
private handleClick;
|
|
51
51
|
}
|
|
52
|
-
export default MenuItem;
|
|
53
52
|
//# sourceMappingURL=MenuItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../../menu/lib/MenuItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,gBAAgB,CAAC,aAAa,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