@workday/canvas-kit-labs-react 6.4.0-next.2 → 6.4.3
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/dist/commonjs/search-form/lib/SearchForm.d.ts +0 -5
- package/dist/commonjs/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/commonjs/search-form/lib/SearchForm.js +2 -2
- package/dist/es6/search-form/lib/SearchForm.d.ts +0 -5
- package/dist/es6/search-form/lib/SearchForm.d.ts.map +1 -1
- package/dist/es6/search-form/lib/SearchForm.js +2 -2
- package/package.json +4 -4
- package/search-form/lib/SearchForm.tsx +1 -7
- package/ts3.5/dist/commonjs/search-form/lib/SearchForm.d.ts +0 -5
- package/ts3.5/dist/es6/search-form/lib/SearchForm.d.ts +0 -5
|
@@ -73,11 +73,6 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
|
|
|
73
73
|
* @default 40
|
|
74
74
|
*/
|
|
75
75
|
height?: number;
|
|
76
|
-
/**
|
|
77
|
-
* If true, allow onSubmit being called when input value is empty.
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
allowEmptyStringSearch?: boolean;
|
|
81
76
|
}
|
|
82
77
|
export interface SearchFormState {
|
|
83
78
|
showForm: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../../search-form/lib/SearchForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,cAAc,EAA2B,MAAM,kCAAkC,CAAC;AAM1F,OAAO,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAC,qBAAqB,EAAgB,WAAW,EAAC,MAAM,UAAU,CAAC;AAG1E,MAAM,WAAW,eAAgB,SAAQ,cAAc,EAAE,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC;IAChG;;OAEG;IACH,QAAQ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C,CAI9B;IAEF,OAAO,CAAC,QAAQ,CAUd;IAEF,OAAO,CAAC,cAAc,CAMpB;IAEF,iBAAiB,kHAOf;IAEF,YAAY,oDAOV;IAEF,mBAAmB,aAIjB;IAEF,oBAAoB,aAIlB;IAEF,kBAAkB,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe;IAWzE,UAAU,aAIR;IAEF,SAAS,aAIP;IAEF,WAAW,aAET;IAEF,UAAU,aAER;IAEF,uBAAuB,uDAMrB;IAEF,MAAM;CAmGP"}
|
|
@@ -237,7 +237,7 @@ var SearchForm = /** @class */ (function (_super) {
|
|
|
237
237
|
};
|
|
238
238
|
_this.handleSubmit = function (event) {
|
|
239
239
|
event.preventDefault();
|
|
240
|
-
if (_this.
|
|
240
|
+
if (_this.state.searchQuery.trim()) {
|
|
241
241
|
_this.props.onSubmit(event);
|
|
242
242
|
}
|
|
243
243
|
else {
|
|
@@ -291,7 +291,7 @@ var SearchForm = /** @class */ (function (_super) {
|
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
293
|
SearchForm.prototype.render = function () {
|
|
294
|
-
var _a = this.props, _b = _a.clearButtonAriaLabel, clearButtonAriaLabel = _b === void 0 ? 'Reset Search Form' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'Search' : _c, _d = _a.inputLabel, inputLabel = _d === void 0 ? 'Search' : _d, _e = _a.submitAriaLabel, submitAriaLabel = _e === void 0 ? 'Search' : _e, _f = _a.openButtonAriaLabel, openButtonAriaLabel = _f === void 0 ? 'Open Search' : _f, _g = _a.closeButtonAriaLabel, closeButtonAriaLabel = _g === void 0 ? 'Cancel' : _g, _h = _a.showClearButton, showClearButton = _h === void 0 ? true : _h, _j = _a.height, height = _j === void 0 ? 40 : _j, grow = _a.grow, onSubmit = _a.onSubmit, isCollapsed = _a.isCollapsed, onInputChange = _a.onInputChange, autocompleteItems = _a.autocompleteItems, initialValue = _a.initialValue, searchTheme = _a.searchTheme, rightAlign = _a.rightAlign,
|
|
294
|
+
var _a = this.props, _b = _a.clearButtonAriaLabel, clearButtonAriaLabel = _b === void 0 ? 'Reset Search Form' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'Search' : _c, _d = _a.inputLabel, inputLabel = _d === void 0 ? 'Search' : _d, _e = _a.submitAriaLabel, submitAriaLabel = _e === void 0 ? 'Search' : _e, _f = _a.openButtonAriaLabel, openButtonAriaLabel = _f === void 0 ? 'Open Search' : _f, _g = _a.closeButtonAriaLabel, closeButtonAriaLabel = _g === void 0 ? 'Cancel' : _g, _h = _a.showClearButton, showClearButton = _h === void 0 ? true : _h, _j = _a.height, height = _j === void 0 ? 40 : _j, grow = _a.grow, onSubmit = _a.onSubmit, isCollapsed = _a.isCollapsed, onInputChange = _a.onInputChange, autocompleteItems = _a.autocompleteItems, initialValue = _a.initialValue, searchTheme = _a.searchTheme, rightAlign = _a.rightAlign, elemProps = __rest(_a, ["clearButtonAriaLabel", "placeholder", "inputLabel", "submitAriaLabel", "openButtonAriaLabel", "closeButtonAriaLabel", "showClearButton", "height", "grow", "onSubmit", "isCollapsed", "onInputChange", "autocompleteItems", "initialValue", "searchTheme", "rightAlign"]);
|
|
295
295
|
return (React.createElement(StyledSearchForm, __assign({ role: "search", action: ".", rightAlign: rightAlign, grow: grow, "aria-labelledby": this.labelId, isCollapsed: isCollapsed, onSubmit: this.handleSubmit, showForm: this.state.showForm }, elemProps),
|
|
296
296
|
React.createElement(SearchContainer, { height: height },
|
|
297
297
|
React.createElement(SearchIcon, { "aria-label": submitAriaLabel, icon: canvas_system_icons_web_1.searchIcon, isCollapsed: isCollapsed, variant: this.getIconButtonType(), type: "submit", isHidden: !!isCollapsed && !this.state.showForm }),
|
|
@@ -73,11 +73,6 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
|
|
|
73
73
|
* @default 40
|
|
74
74
|
*/
|
|
75
75
|
height?: number;
|
|
76
|
-
/**
|
|
77
|
-
* If true, allow onSubmit being called when input value is empty.
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
allowEmptyStringSearch?: boolean;
|
|
81
76
|
}
|
|
82
77
|
export interface SearchFormState {
|
|
83
78
|
showForm: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../../search-form/lib/SearchForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAC,cAAc,EAA2B,MAAM,kCAAkC,CAAC;AAM1F,OAAO,EAAC,aAAa,EAAC,MAAM,wCAAwC,CAAC;AACrE,OAAO,EAAC,qBAAqB,EAAgB,WAAW,EAAC,MAAM,UAAU,CAAC;AAG1E,MAAM,WAAW,eAAgB,SAAQ,cAAc,EAAE,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC;IAChG;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAC3D;;OAEG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,EAAE,CAAC;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,GAAG,qBAAqB,CAAC;IAClD;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,C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CAAC,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAuMD,qBAAa,UAAW,SAAQ,KAAK,CAAC,SAAS,CAAC,eAAe,EAAE,eAAe,CAAC;IAC/E,MAAM,CAAC,KAAK,qBAAe;IAE3B,OAAO,CAAC,QAAQ,CAAuC;IACvD,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,OAAO,CAAsB;IAErC,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAI9B;IAEF,OAAO,CAAC,QAAQ,CAUd;IAEF,OAAO,CAAC,cAAc,CAMpB;IAEF,iBAAiB,kHAOf;IAEF,YAAY,oDAOV;IAEF,mBAAmB,aAIjB;IAEF,oBAAoB,aAIlB;IAEF,kBAAkB,CAAC,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe;IAWzE,UAAU,aAIR;IAEF,SAAS,aAIP;IAEF,WAAW,aAET;IAEF,UAAU,aAER;IAEF,uBAAuB,uDAMrB;IAEF,MAAM;CAmGP"}
|
|
@@ -225,7 +225,7 @@ var SearchForm = /** @class */ (function (_super) {
|
|
|
225
225
|
};
|
|
226
226
|
_this.handleSubmit = function (event) {
|
|
227
227
|
event.preventDefault();
|
|
228
|
-
if (_this.
|
|
228
|
+
if (_this.state.searchQuery.trim()) {
|
|
229
229
|
_this.props.onSubmit(event);
|
|
230
230
|
}
|
|
231
231
|
else {
|
|
@@ -279,7 +279,7 @@ var SearchForm = /** @class */ (function (_super) {
|
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
SearchForm.prototype.render = function () {
|
|
282
|
-
var _a = this.props, _b = _a.clearButtonAriaLabel, clearButtonAriaLabel = _b === void 0 ? 'Reset Search Form' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'Search' : _c, _d = _a.inputLabel, inputLabel = _d === void 0 ? 'Search' : _d, _e = _a.submitAriaLabel, submitAriaLabel = _e === void 0 ? 'Search' : _e, _f = _a.openButtonAriaLabel, openButtonAriaLabel = _f === void 0 ? 'Open Search' : _f, _g = _a.closeButtonAriaLabel, closeButtonAriaLabel = _g === void 0 ? 'Cancel' : _g, _h = _a.showClearButton, showClearButton = _h === void 0 ? true : _h, _j = _a.height, height = _j === void 0 ? 40 : _j, grow = _a.grow, onSubmit = _a.onSubmit, isCollapsed = _a.isCollapsed, onInputChange = _a.onInputChange, autocompleteItems = _a.autocompleteItems, initialValue = _a.initialValue, searchTheme = _a.searchTheme, rightAlign = _a.rightAlign,
|
|
282
|
+
var _a = this.props, _b = _a.clearButtonAriaLabel, clearButtonAriaLabel = _b === void 0 ? 'Reset Search Form' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? 'Search' : _c, _d = _a.inputLabel, inputLabel = _d === void 0 ? 'Search' : _d, _e = _a.submitAriaLabel, submitAriaLabel = _e === void 0 ? 'Search' : _e, _f = _a.openButtonAriaLabel, openButtonAriaLabel = _f === void 0 ? 'Open Search' : _f, _g = _a.closeButtonAriaLabel, closeButtonAriaLabel = _g === void 0 ? 'Cancel' : _g, _h = _a.showClearButton, showClearButton = _h === void 0 ? true : _h, _j = _a.height, height = _j === void 0 ? 40 : _j, grow = _a.grow, onSubmit = _a.onSubmit, isCollapsed = _a.isCollapsed, onInputChange = _a.onInputChange, autocompleteItems = _a.autocompleteItems, initialValue = _a.initialValue, searchTheme = _a.searchTheme, rightAlign = _a.rightAlign, elemProps = __rest(_a, ["clearButtonAriaLabel", "placeholder", "inputLabel", "submitAriaLabel", "openButtonAriaLabel", "closeButtonAriaLabel", "showClearButton", "height", "grow", "onSubmit", "isCollapsed", "onInputChange", "autocompleteItems", "initialValue", "searchTheme", "rightAlign"]);
|
|
283
283
|
return (React.createElement(StyledSearchForm, __assign({ role: "search", action: ".", rightAlign: rightAlign, grow: grow, "aria-labelledby": this.labelId, isCollapsed: isCollapsed, onSubmit: this.handleSubmit, showForm: this.state.showForm }, elemProps),
|
|
284
284
|
React.createElement(SearchContainer, { height: height },
|
|
285
285
|
React.createElement(SearchIcon, { "aria-label": submitAriaLabel, icon: searchIcon, isCollapsed: isCollapsed, variant: this.getIconButtonType(), type: "submit", isHidden: !!isCollapsed && !this.state.showForm }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-labs-react",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.3",
|
|
4
4
|
"description": "Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functionality. The Labs modules allow us to do that as needed.",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@emotion/core": "^10.0.28",
|
|
56
56
|
"@emotion/is-prop-valid": "^0.8.2",
|
|
57
57
|
"@emotion/styled": "^10.0.27",
|
|
58
|
-
"@workday/canvas-kit-preview-react": "^6.4.
|
|
59
|
-
"@workday/canvas-kit-react": "^6.4.
|
|
58
|
+
"@workday/canvas-kit-preview-react": "^6.4.3",
|
|
59
|
+
"@workday/canvas-kit-react": "^6.4.3",
|
|
60
60
|
"@workday/canvas-system-icons-web": "1.0.41",
|
|
61
61
|
"chroma-js": "^2.1.0",
|
|
62
62
|
"csstype": "^2.6.17",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/lodash.flatten": "^4.4.6"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "5050446dff8ead91655998bc4bb8bfc2fbb3a2d9"
|
|
70
70
|
}
|
|
@@ -82,11 +82,6 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
|
|
|
82
82
|
* @default 40
|
|
83
83
|
*/
|
|
84
84
|
height?: number;
|
|
85
|
-
/**
|
|
86
|
-
* If true, allow onSubmit being called when input value is empty.
|
|
87
|
-
* @default false
|
|
88
|
-
*/
|
|
89
|
-
allowEmptyStringSearch?: boolean;
|
|
90
85
|
}
|
|
91
86
|
|
|
92
87
|
export interface SearchFormState {
|
|
@@ -336,7 +331,7 @@ export class SearchForm extends React.Component<SearchFormProps, SearchFormState
|
|
|
336
331
|
|
|
337
332
|
handleSubmit = (event: React.FormEvent<HTMLFormElement>): void => {
|
|
338
333
|
event.preventDefault();
|
|
339
|
-
if (this.
|
|
334
|
+
if (this.state.searchQuery.trim()) {
|
|
340
335
|
this.props.onSubmit(event);
|
|
341
336
|
} else {
|
|
342
337
|
this.focusInput();
|
|
@@ -412,7 +407,6 @@ export class SearchForm extends React.Component<SearchFormProps, SearchFormState
|
|
|
412
407
|
initialValue,
|
|
413
408
|
searchTheme,
|
|
414
409
|
rightAlign,
|
|
415
|
-
allowEmptyStringSearch = false,
|
|
416
410
|
...elemProps
|
|
417
411
|
} = this.props;
|
|
418
412
|
|
|
@@ -73,11 +73,6 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
|
|
|
73
73
|
* @default 40
|
|
74
74
|
*/
|
|
75
75
|
height?: number;
|
|
76
|
-
/**
|
|
77
|
-
* If true, allow onSubmit being called when input value is empty.
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
allowEmptyStringSearch?: boolean;
|
|
81
76
|
}
|
|
82
77
|
export interface SearchFormState {
|
|
83
78
|
showForm: boolean;
|
|
@@ -73,11 +73,6 @@ export interface SearchFormProps extends GrowthBehavior, React.FormHTMLAttribute
|
|
|
73
73
|
* @default 40
|
|
74
74
|
*/
|
|
75
75
|
height?: number;
|
|
76
|
-
/**
|
|
77
|
-
* If true, allow onSubmit being called when input value is empty.
|
|
78
|
-
* @default false
|
|
79
|
-
*/
|
|
80
|
-
allowEmptyStringSearch?: boolean;
|
|
81
76
|
}
|
|
82
77
|
export interface SearchFormState {
|
|
83
78
|
showForm: boolean;
|