@workday/canvas-kit-preview-react 9.0.0-alpha.335-next.5 → 9.0.0-alpha.338-next.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/commonjs/form-field/lib/FormField.d.ts +2 -8
  2. package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
  3. package/dist/commonjs/form-field/lib/FormField.js +1 -1
  4. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +2 -8
  5. package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  6. package/dist/commonjs/form-field/lib/FormFieldLabel.js +2 -2
  7. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  8. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  9. package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +2 -2
  10. package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
  11. package/dist/commonjs/pill/lib/Pill.js +4 -4
  12. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +2 -2
  13. package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
  14. package/dist/commonjs/status-indicator/lib/StatusIndicator.js +1 -1
  15. package/dist/commonjs/text-area/lib/TextArea.js +1 -1
  16. package/dist/commonjs/text-input/lib/TextInput.js +1 -1
  17. package/dist/es6/form-field/lib/FormField.d.ts +2 -8
  18. package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
  19. package/dist/es6/form-field/lib/FormField.js +2 -2
  20. package/dist/es6/form-field/lib/FormFieldLabel.d.ts +2 -8
  21. package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
  22. package/dist/es6/form-field/lib/FormFieldLabel.js +3 -3
  23. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
  24. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
  25. package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.js +2 -2
  26. package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
  27. package/dist/es6/pill/lib/Pill.js +5 -5
  28. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +2 -2
  29. package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
  30. package/dist/es6/status-indicator/lib/StatusIndicator.js +2 -2
  31. package/dist/es6/text-area/lib/TextArea.js +2 -2
  32. package/dist/es6/text-input/lib/TextInput.js +2 -2
  33. package/form-field/lib/FormField.tsx +5 -10
  34. package/form-field/lib/FormFieldLabel.tsx +6 -11
  35. package/form-field/lib/hooks/useFormFieldOrientation.tsx +6 -6
  36. package/package.json +4 -4
  37. package/pill/lib/Pill.tsx +8 -8
  38. package/pill/lib/PillCount.tsx +1 -1
  39. package/pill/lib/PillIcon.tsx +1 -1
  40. package/status-indicator/lib/StatusIndicator.tsx +5 -5
  41. package/text-area/lib/TextArea.tsx +3 -3
  42. package/text-input/lib/TextInput.tsx +3 -3
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { Stack, StackSpacing } from '@workday/canvas-kit-react/layout';
4
- export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>, 'spacing'> {
2
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
3
+ export interface FormFieldProps extends FlexProps {
5
4
  /**
6
5
  * Children of the Text Input. Should contain a `<FormField.Input>`, a `<FormField.Label>` and an optional `<FormField.Hint>`
7
6
  */
@@ -10,11 +9,6 @@ export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>,
10
9
  * The direction the child elements should stack
11
10
  */
12
11
  orientation: 'vertical' | 'horizontal';
13
- /**
14
- * Spacing between children elements
15
- * @default xxxs when vertical l when orientation is horizontal
16
- */
17
- spacing?: StackSpacing;
18
12
  }
19
13
  export declare const FormField: import("@workday/canvas-kit-react/common").ElementComponentM<"div", FormFieldProps & Partial<{
20
14
  hasError: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAOrE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IACxF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAOjE,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;CACxC;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
@@ -44,5 +44,5 @@ exports.FormField = common_1.createContainer('div')({
44
44
  })(function (_a, Element) {
45
45
  var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
46
46
  var layoutProps = hooks_1.useFormFieldOrientation(orientation);
47
- return (react_1.default.createElement(layout_1.Stack, __assign({ as: Element }, layoutProps, elemProps), children));
47
+ return (react_1.default.createElement(layout_1.Flex, __assign({ as: Element }, layoutProps, elemProps), children));
48
48
  });
@@ -1,16 +1,10 @@
1
1
  import React from 'react';
2
- import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { HStack, StackSpacing } from '@workday/canvas-kit-react/layout';
4
- export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
2
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
3
+ export interface FormFieldLabelProps extends FlexProps {
5
4
  /**
6
5
  * The text of the label.
7
6
  */
8
7
  children: React.ReactNode;
9
- /**
10
- * When the input is required, this is spacing between label and asterisk.
11
- * @default xxxs
12
- */
13
- spacing?: StackSpacing;
14
8
  }
15
9
  export declare const FormFieldLabel: import("@workday/canvas-kit-react/common").ElementComponentM<"label", FormFieldLabelProps, {
16
10
  state: {
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,YAAY,EAAW,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAItE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAC9F;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;;;;;EAyBzB,CAAC"}
1
+ {"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAIjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc;;;;;;;EAyBzB,CAAC"}
@@ -36,9 +36,9 @@ exports.FormFieldLabel = common_1.createSubcomponent('label')({
36
36
  modelHook: hooks_1.useFormFieldModel,
37
37
  elemPropsHook: hooks_1.useFormFieldLabel,
38
38
  })(function (_a, Element, model) {
39
- var _b = _a.spacing, spacing = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["spacing", "children"]);
39
+ var _b = _a.gap, gap = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["gap", "children"]);
40
40
  var theme = common_1.useTheme();
41
- return (react_1.default.createElement(layout_1.HStack, __assign({ as: Element, spacing: spacing, minWidth: "180px" }, elemProps),
41
+ return (react_1.default.createElement(layout_1.Flex, __assign({ as: Element, gap: gap, minWidth: "180px" }, elemProps),
42
42
  react_1.default.createElement(text_1.LabelText, { as: "span", fontWeight: "medium" }, children),
43
43
  model.state.isRequired && (react_1.default.createElement(text_1.Text, { fontSize: 20, fontWeight: "regular", textDecoration: "unset", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
44
44
  });
@@ -1,10 +1,10 @@
1
- import { StackSpacing, StackProps } from '@workday/canvas-kit-react/layout';
1
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
2
2
  /**
3
3
  * Adds the necessary layout props to a `FormField` component.
4
4
  */
5
5
  export declare const useFormFieldOrientation: (orientation: 'horizontal' | 'vertical') => {
6
- flexDirection: StackProps['flexDirection'];
7
- alignItems: StackProps['alignItems'];
8
- spacing: StackSpacing;
6
+ flexDirection: FlexProps['flexDirection'];
7
+ alignItems: FlexProps['alignItems'];
8
+ gap: FlexProps['gap'];
9
9
  };
10
10
  //# sourceMappingURL=useFormFieldOrientation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAG1E;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,UAAU,CAAC,eAAe,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC;aAC3B,YAAY;CAkBxB,CAAC"}
1
+ {"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAG3D;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,SAAS,CAAC,eAAe,CAAC;gBAC7B,SAAS,CAAC,YAAY,CAAC;SAC9B,SAAS,CAAC,KAAK,CAAC;CAkBxB,CAAC"}
@@ -10,14 +10,14 @@ var useFormFieldOrientation = function (orientation) {
10
10
  if (orientation === 'horizontal') {
11
11
  layoutProps = {
12
12
  flexDirection: 'row',
13
- spacing: tokens_1.space.l,
13
+ gap: tokens_1.space.l,
14
14
  alignItems: 'center',
15
15
  };
16
16
  }
17
17
  else {
18
18
  layoutProps = {
19
19
  flexDirection: 'column',
20
- spacing: tokens_1.space.xxxs,
20
+ gap: tokens_1.space.xxxs,
21
21
  alignItems: 'flex-start',
22
22
  };
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../../pill/lib/Pill.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAC,QAAQ,EAA4B,MAAM,kCAAkC,CAAC;AAWrF,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;CAChD;AAsID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Df,CAAC"}
1
+ {"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../../pill/lib/Pill.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAC,QAAQ,EAAmB,MAAM,kCAAkC,CAAC;AAW5E,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;CAChD;AAsID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Df,CAAC"}
@@ -155,17 +155,17 @@ exports.Pill = common_1.createContainer('button')({
155
155
  variant === 'readOnly' && (react_1.default.createElement(StyledNonInteractivePill, __assign({ maxWidth: model.state.maxWidth, as: Element !== 'button' ? Element : 'span', border: "1px solid " + tokens_1.colors.licorice200, id: model.state.id }, elemProps),
156
156
  react_1.default.createElement(PillLabel_1.PillLabel, null, elemProps.children))),
157
157
  variant === 'default' && (react_1.default.createElement(StyledBasePill, __assign({ colors: getButtonPillColors(), as: Element }, elemProps, { disabled: model.state.disabled }),
158
- react_1.default.createElement(layout_1.HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center" }, react_1.default.Children.map(elemProps.children, function (child, index) {
158
+ react_1.default.createElement(layout_1.Flex, { gap: "xxxs", display: "inline-flex", alignItems: "center" }, react_1.default.Children.map(elemProps.children, function (child, index) {
159
159
  if (typeof child === 'string') {
160
160
  return react_1.default.createElement(PillLabel_1.PillLabel, { key: index }, child);
161
161
  }
162
- return (react_1.default.createElement(layout_1.Stack.Item, { key: index, display: "inline-flex" }, child));
162
+ return (react_1.default.createElement(layout_1.Flex.Item, { key: index, display: "inline-flex" }, child));
163
163
  })))),
164
164
  variant === 'removable' && (react_1.default.createElement(StyledNonInteractivePill, __assign({ colors: getRemovablePillColors(model.state.disabled), as: Element !== 'button' ? Element : 'span', variant: variant }, elemProps),
165
- react_1.default.createElement(layout_1.HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center", justifyContent: "center" }, react_1.default.Children.map(elemProps.children, function (child, index) {
165
+ react_1.default.createElement(layout_1.Flex, { gap: "xxxs", display: "inline-flex", alignItems: "center", justifyContent: "center" }, react_1.default.Children.map(elemProps.children, function (child, index) {
166
166
  if (typeof child === 'string') {
167
167
  return react_1.default.createElement(PillLabel_1.PillLabel, { key: index }, child);
168
168
  }
169
- return react_1.default.createElement(layout_1.Stack.Item, { key: index }, child);
169
+ return react_1.default.createElement(layout_1.Flex.Item, { key: index }, child);
170
170
  }))))));
171
171
  });
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { HStack } from '@workday/canvas-kit-react/layout';
4
- export interface StatusIndicatorProps extends Partial<ExtractProps<typeof HStack, never>> {
3
+ import { Flex } from '@workday/canvas-kit-react/layout';
4
+ export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never> {
5
5
  /**
6
6
  * Children of the `StatusIndicator`. Can contain a `StatusIndicator.Label` and optionally a `StatusIndicator.Icon`.
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../../status-indicator/lib/StatusIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAuC,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAKxD,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,CAAC;IACvF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;OAO7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAwB1B,CAAC"}
1
+ {"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../../status-indicator/lib/StatusIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAuC,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAKtD,MAAM,WAAW,oBAAqB,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IAC5E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;OAO7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAwB1B,CAAC"}
@@ -51,5 +51,5 @@ exports.StatusIndicator = common_1.createContainer('div')({
51
51
  },
52
52
  })(function (_a, Element, model) {
53
53
  var children = _a.children, elemProps = __rest(_a, ["children"]);
54
- return (react_1.default.createElement(layout_1.HStack, __assign({ spacing: 4, as: Element, maxWidth: 200, paddingX: "xxxs", display: "inline-flex", alignItems: "center", height: 20, borderRadius: "s" }, elemProps), children));
54
+ return (react_1.default.createElement(layout_1.Flex, __assign({ gap: "xxxs", as: Element, maxWidth: 200, paddingX: "xxxs", display: "inline-flex", alignItems: "center", height: 20, borderRadius: "s" }, elemProps), children));
55
55
  });
@@ -43,5 +43,5 @@ exports.TextArea = common_1.createContainer('div')({
43
43
  })(function (_a, Element) {
44
44
  var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
45
45
  var layoutProps = form_field_1.useFormFieldOrientation(orientation);
46
- return (react_1.default.createElement(layout_1.Stack, __assign({ as: Element }, layoutProps, elemProps), children));
46
+ return (react_1.default.createElement(layout_1.Flex, __assign({ as: Element }, layoutProps, elemProps), children));
47
47
  });
@@ -43,5 +43,5 @@ exports.TextInput = common_1.createContainer('div')({
43
43
  })(function (_a, Element) {
44
44
  var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
45
45
  var layoutProps = form_field_1.useFormFieldOrientation(orientation);
46
- return (react_1.default.createElement(layout_1.Stack, __assign({ as: Element }, layoutProps, elemProps), children));
46
+ return (react_1.default.createElement(layout_1.Flex, __assign({ as: Element }, layoutProps, elemProps), children));
47
47
  });
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { Stack, StackSpacing } from '@workday/canvas-kit-react/layout';
4
- export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>, 'spacing'> {
2
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
3
+ export interface FormFieldProps extends FlexProps {
5
4
  /**
6
5
  * Children of the Text Input. Should contain a `<FormField.Input>`, a `<FormField.Label>` and an optional `<FormField.Hint>`
7
6
  */
@@ -10,11 +9,6 @@ export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>,
10
9
  * The direction the child elements should stack
11
10
  */
12
11
  orientation: 'vertical' | 'horizontal';
13
- /**
14
- * Spacing between children elements
15
- * @default xxxs when vertical l when orientation is horizontal
16
- */
17
- spacing?: StackSpacing;
18
12
  }
19
13
  export declare const FormField: import("@workday/canvas-kit-react/common").ElementComponentM<"div", FormFieldProps & Partial<{
20
14
  hasError: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAC,KAAK,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAOrE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,KAAK,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IACxF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
1
+ {"version":3,"file":"FormField.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAOjE,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,UAAU,GAAG,YAAY,CAAC;CACxC;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React from 'react';
24
24
  import { createContainer } from '@workday/canvas-kit-react/common';
25
- import { Stack } from '@workday/canvas-kit-react/layout';
25
+ import { Flex } from '@workday/canvas-kit-react/layout';
26
26
  import { useFormFieldModel, useFormFieldOrientation } from './hooks';
27
27
  import { FormFieldInput } from './FormFieldInput';
28
28
  import { FormFieldLabel } from './FormFieldLabel';
@@ -38,5 +38,5 @@ export var FormField = createContainer('div')({
38
38
  })(function (_a, Element) {
39
39
  var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
40
40
  var layoutProps = useFormFieldOrientation(orientation);
41
- return (React.createElement(Stack, __assign({ as: Element }, layoutProps, elemProps), children));
41
+ return (React.createElement(Flex, __assign({ as: Element }, layoutProps, elemProps), children));
42
42
  });
@@ -1,16 +1,10 @@
1
1
  import React from 'react';
2
- import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { HStack, StackSpacing } from '@workday/canvas-kit-react/layout';
4
- export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
2
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
3
+ export interface FormFieldLabelProps extends FlexProps {
5
4
  /**
6
5
  * The text of the label.
7
6
  */
8
7
  children: React.ReactNode;
9
- /**
10
- * When the input is required, this is spacing between label and asterisk.
11
- * @default xxxs
12
- */
13
- spacing?: StackSpacing;
14
8
  }
15
9
  export declare const FormFieldLabel: import("@workday/canvas-kit-react/common").ElementComponentM<"label", FormFieldLabelProps, {
16
10
  state: {
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAqB,YAAY,EAAW,MAAM,kCAAkC,CAAC;AAC5F,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAItE,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAC9F;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB;AAED,eAAO,MAAM,cAAc;;;;;;;EAyBzB,CAAC"}
1
+ {"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAIjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc;;;;;;;EAyBzB,CAAC"}
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React from 'react';
24
24
  import { createSubcomponent, useTheme } from '@workday/canvas-kit-react/common';
25
- import { HStack } from '@workday/canvas-kit-react/layout';
25
+ import { Flex } from '@workday/canvas-kit-react/layout';
26
26
  import { LabelText, Text } from '@workday/canvas-kit-react/text';
27
27
  import { useFormFieldLabel, useFormFieldModel } from './hooks';
28
28
  export var FormFieldLabel = createSubcomponent('label')({
@@ -30,9 +30,9 @@ export var FormFieldLabel = createSubcomponent('label')({
30
30
  modelHook: useFormFieldModel,
31
31
  elemPropsHook: useFormFieldLabel,
32
32
  })(function (_a, Element, model) {
33
- var _b = _a.spacing, spacing = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["spacing", "children"]);
33
+ var _b = _a.gap, gap = _b === void 0 ? 'xxxs' : _b, children = _a.children, elemProps = __rest(_a, ["gap", "children"]);
34
34
  var theme = useTheme();
35
- return (React.createElement(HStack, __assign({ as: Element, spacing: spacing, minWidth: "180px" }, elemProps),
35
+ return (React.createElement(Flex, __assign({ as: Element, gap: gap, minWidth: "180px" }, elemProps),
36
36
  React.createElement(LabelText, { as: "span", fontWeight: "medium" }, children),
37
37
  model.state.isRequired && (React.createElement(Text, { fontSize: 20, fontWeight: "regular", textDecoration: "unset", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
38
38
  });
@@ -1,10 +1,10 @@
1
- import { StackSpacing, StackProps } from '@workday/canvas-kit-react/layout';
1
+ import { FlexProps } from '@workday/canvas-kit-react/layout';
2
2
  /**
3
3
  * Adds the necessary layout props to a `FormField` component.
4
4
  */
5
5
  export declare const useFormFieldOrientation: (orientation: 'horizontal' | 'vertical') => {
6
- flexDirection: StackProps['flexDirection'];
7
- alignItems: StackProps['alignItems'];
8
- spacing: StackSpacing;
6
+ flexDirection: FlexProps['flexDirection'];
7
+ alignItems: FlexProps['alignItems'];
8
+ gap: FlexProps['gap'];
9
9
  };
10
10
  //# sourceMappingURL=useFormFieldOrientation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAC,MAAM,kCAAkC,CAAC;AAG1E;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,UAAU,CAAC,eAAe,CAAC;gBAC9B,UAAU,CAAC,YAAY,CAAC;aAC3B,YAAY;CAkBxB,CAAC"}
1
+ {"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAG3D;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,SAAS,CAAC,eAAe,CAAC;gBAC7B,SAAS,CAAC,YAAY,CAAC;SAC9B,SAAS,CAAC,KAAK,CAAC;CAkBxB,CAAC"}
@@ -7,14 +7,14 @@ export var useFormFieldOrientation = function (orientation) {
7
7
  if (orientation === 'horizontal') {
8
8
  layoutProps = {
9
9
  flexDirection: 'row',
10
- spacing: space.l,
10
+ gap: space.l,
11
11
  alignItems: 'center',
12
12
  };
13
13
  }
14
14
  else {
15
15
  layoutProps = {
16
16
  flexDirection: 'column',
17
- spacing: space.xxxs,
17
+ gap: space.xxxs,
18
18
  alignItems: 'flex-start',
19
19
  };
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../../pill/lib/Pill.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAC,QAAQ,EAA4B,MAAM,kCAAkC,CAAC;AAWrF,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;CAChD;AAsID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Df,CAAC"}
1
+ {"version":3,"file":"Pill.d.ts","sourceRoot":"","sources":["../../../../pill/lib/Pill.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAC,QAAQ,EAAmB,MAAM,kCAAkC,CAAC;AAW5E,MAAM,WAAW,SAAU,SAAQ,QAAQ;IACzC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;CAChD;AAsID,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Df,CAAC"}
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import React from 'react';
24
24
  import { BaseButton } from '@workday/canvas-kit-react/button';
25
25
  import { createContainer, focusRing, mouseFocusBehavior, styled, } from '@workday/canvas-kit-react/common';
26
- import { boxStyleFn, HStack, Stack } from '@workday/canvas-kit-react/layout';
26
+ import { boxStyleFn, Flex } from '@workday/canvas-kit-react/layout';
27
27
  import { borderRadius, colors, space, type } from '@workday/canvas-kit-react/tokens';
28
28
  import { usePillModel } from './usePillModel';
29
29
  import { PillIcon } from './PillIcon';
@@ -149,17 +149,17 @@ export var Pill = createContainer('button')({
149
149
  variant === 'readOnly' && (React.createElement(StyledNonInteractivePill, __assign({ maxWidth: model.state.maxWidth, as: Element !== 'button' ? Element : 'span', border: "1px solid " + colors.licorice200, id: model.state.id }, elemProps),
150
150
  React.createElement(PillLabel, null, elemProps.children))),
151
151
  variant === 'default' && (React.createElement(StyledBasePill, __assign({ colors: getButtonPillColors(), as: Element }, elemProps, { disabled: model.state.disabled }),
152
- React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center" }, React.Children.map(elemProps.children, function (child, index) {
152
+ React.createElement(Flex, { gap: "xxxs", display: "inline-flex", alignItems: "center" }, React.Children.map(elemProps.children, function (child, index) {
153
153
  if (typeof child === 'string') {
154
154
  return React.createElement(PillLabel, { key: index }, child);
155
155
  }
156
- return (React.createElement(Stack.Item, { key: index, display: "inline-flex" }, child));
156
+ return (React.createElement(Flex.Item, { key: index, display: "inline-flex" }, child));
157
157
  })))),
158
158
  variant === 'removable' && (React.createElement(StyledNonInteractivePill, __assign({ colors: getRemovablePillColors(model.state.disabled), as: Element !== 'button' ? Element : 'span', variant: variant }, elemProps),
159
- React.createElement(HStack, { spacing: "xxxs", display: "inline-flex", alignItems: "center", justifyContent: "center" }, React.Children.map(elemProps.children, function (child, index) {
159
+ React.createElement(Flex, { gap: "xxxs", display: "inline-flex", alignItems: "center", justifyContent: "center" }, React.Children.map(elemProps.children, function (child, index) {
160
160
  if (typeof child === 'string') {
161
161
  return React.createElement(PillLabel, { key: index }, child);
162
162
  }
163
- return React.createElement(Stack.Item, { key: index }, child);
163
+ return React.createElement(Flex.Item, { key: index }, child);
164
164
  }))))));
165
165
  });
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ExtractProps } from '@workday/canvas-kit-react/common';
3
- import { HStack } from '@workday/canvas-kit-react/layout';
4
- export interface StatusIndicatorProps extends Partial<ExtractProps<typeof HStack, never>> {
3
+ import { Flex } from '@workday/canvas-kit-react/layout';
4
+ export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never> {
5
5
  /**
6
6
  * Children of the `StatusIndicator`. Can contain a `StatusIndicator.Label` and optionally a `StatusIndicator.Icon`.
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../../status-indicator/lib/StatusIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAuC,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAKxD,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,YAAY,CAAC,OAAO,MAAM,EAAE,KAAK,CAAC,CAAC;IACvF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;OAO7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAwB1B,CAAC"}
1
+ {"version":3,"file":"StatusIndicator.d.ts","sourceRoot":"","sources":["../../../../status-indicator/lib/StatusIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,YAAY,EAAuC,MAAM,kCAAkC,CAAC;AACpG,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAKtD,MAAM,WAAW,oBAAqB,SAAQ,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC;IAC5E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;OAO7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAwB1B,CAAC"}
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  };
23
23
  import React from 'react';
24
24
  import { createContainer, createElemPropsHook } from '@workday/canvas-kit-react/common';
25
- import { HStack } from '@workday/canvas-kit-react/layout';
25
+ import { Flex } from '@workday/canvas-kit-react/layout';
26
26
  import { StatusIndicatorIcon, statusIndicatorColors } from './StatusIndicatorIcon';
27
27
  import { StatusIndicatorLabel } from './StatusIndicatorLabel';
28
28
  import { useStatusIndicatorModel } from './hooks';
@@ -45,5 +45,5 @@ export var StatusIndicator = createContainer('div')({
45
45
  },
46
46
  })(function (_a, Element, model) {
47
47
  var children = _a.children, elemProps = __rest(_a, ["children"]);
48
- return (React.createElement(HStack, __assign({ spacing: 4, as: Element, maxWidth: 200, paddingX: "xxxs", display: "inline-flex", alignItems: "center", height: 20, borderRadius: "s" }, elemProps), children));
48
+ return (React.createElement(Flex, __assign({ gap: "xxxs", as: Element, maxWidth: 200, paddingX: "xxxs", display: "inline-flex", alignItems: "center", height: 20, borderRadius: "s" }, elemProps), children));
49
49
  });
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import React from 'react';
24
24
  import { createContainer } from '@workday/canvas-kit-react/common';
25
25
  import { FormField, useFormFieldOrientation } from '@workday/canvas-kit-preview-react/form-field';
26
- import { Stack } from '@workday/canvas-kit-react/layout';
26
+ import { Flex } from '@workday/canvas-kit-react/layout';
27
27
  import { useTextAreaModel } from './hooks';
28
28
  import { TextAreaField } from './TextAreaField';
29
29
  export var TextArea = createContainer('div')({
@@ -37,5 +37,5 @@ export var TextArea = createContainer('div')({
37
37
  })(function (_a, Element) {
38
38
  var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
39
39
  var layoutProps = useFormFieldOrientation(orientation);
40
- return (React.createElement(Stack, __assign({ as: Element }, layoutProps, elemProps), children));
40
+ return (React.createElement(Flex, __assign({ as: Element }, layoutProps, elemProps), children));
41
41
  });
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
23
23
  import React from 'react';
24
24
  import { createContainer } from '@workday/canvas-kit-react/common';
25
25
  import { FormField, useFormFieldOrientation } from '@workday/canvas-kit-preview-react/form-field';
26
- import { Stack } from '@workday/canvas-kit-react/layout';
26
+ import { Flex } from '@workday/canvas-kit-react/layout';
27
27
  import { useTextInputModel } from './hooks';
28
28
  import { TextInputField } from './TextInputField';
29
29
  export var TextInput = createContainer('div')({
@@ -37,5 +37,5 @@ export var TextInput = createContainer('div')({
37
37
  })(function (_a, Element) {
38
38
  var children = _a.children, orientation = _a.orientation, elemProps = __rest(_a, ["children", "orientation"]);
39
39
  var layoutProps = useFormFieldOrientation(orientation);
40
- return (React.createElement(Stack, __assign({ as: Element }, layoutProps, elemProps), children));
40
+ return (React.createElement(Flex, __assign({ as: Element }, layoutProps, elemProps), children));
41
41
  });
@@ -1,14 +1,14 @@
1
1
  import React from 'react';
2
2
 
3
- import {createContainer, ExtractProps} from '@workday/canvas-kit-react/common';
4
- import {Stack, StackSpacing} from '@workday/canvas-kit-react/layout';
3
+ import {createContainer} from '@workday/canvas-kit-react/common';
4
+ import {Flex, FlexProps} from '@workday/canvas-kit-react/layout';
5
5
 
6
6
  import {useFormFieldModel, useFormFieldOrientation} from './hooks';
7
7
  import {FormFieldInput} from './FormFieldInput';
8
8
  import {FormFieldLabel} from './FormFieldLabel';
9
9
  import {FormFieldHint} from './FormFieldHint';
10
10
 
11
- export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>, 'spacing'> {
11
+ export interface FormFieldProps extends FlexProps {
12
12
  /**
13
13
  * Children of the Text Input. Should contain a `<FormField.Input>`, a `<FormField.Label>` and an optional `<FormField.Hint>`
14
14
  */
@@ -17,11 +17,6 @@ export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>,
17
17
  * The direction the child elements should stack
18
18
  */
19
19
  orientation: 'vertical' | 'horizontal';
20
- /**
21
- * Spacing between children elements
22
- * @default xxxs when vertical l when orientation is horizontal
23
- */
24
- spacing?: StackSpacing;
25
20
  }
26
21
 
27
22
  export const FormField = createContainer('div')({
@@ -36,8 +31,8 @@ export const FormField = createContainer('div')({
36
31
  const layoutProps = useFormFieldOrientation(orientation);
37
32
 
38
33
  return (
39
- <Stack as={Element} {...layoutProps} {...elemProps}>
34
+ <Flex as={Element} {...layoutProps} {...elemProps}>
40
35
  {children}
41
- </Stack>
36
+ </Flex>
42
37
  );
43
38
  });
@@ -1,31 +1,26 @@
1
1
  import React from 'react';
2
2
 
3
- import {createSubcomponent, ExtractProps, useTheme} from '@workday/canvas-kit-react/common';
4
- import {HStack, StackSpacing} from '@workday/canvas-kit-react/layout';
3
+ import {createSubcomponent, useTheme} from '@workday/canvas-kit-react/common';
4
+ import {Flex, FlexProps} from '@workday/canvas-kit-react/layout';
5
5
  import {LabelText, Text} from '@workday/canvas-kit-react/text';
6
6
  import {useFormFieldLabel, useFormFieldModel} from './hooks';
7
7
 
8
- export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
8
+ export interface FormFieldLabelProps extends FlexProps {
9
9
  /**
10
10
  * The text of the label.
11
11
  */
12
12
  children: React.ReactNode;
13
- /**
14
- * When the input is required, this is spacing between label and asterisk.
15
- * @default xxxs
16
- */
17
- spacing?: StackSpacing;
18
13
  }
19
14
 
20
15
  export const FormFieldLabel = createSubcomponent('label')({
21
16
  displayName: 'FormField.Label',
22
17
  modelHook: useFormFieldModel,
23
18
  elemPropsHook: useFormFieldLabel,
24
- })<FormFieldLabelProps>(({spacing = 'xxxs', children, ...elemProps}, Element, model) => {
19
+ })<FormFieldLabelProps>(({gap = 'xxxs', children, ...elemProps}, Element, model) => {
25
20
  const theme = useTheme();
26
21
 
27
22
  return (
28
- <HStack as={Element} spacing={spacing} minWidth="180px" {...elemProps}>
23
+ <Flex as={Element} gap={gap} minWidth="180px" {...elemProps}>
29
24
  <LabelText as="span" fontWeight="medium">
30
25
  {children}
31
26
  </LabelText>
@@ -40,6 +35,6 @@ export const FormFieldLabel = createSubcomponent('label')({
40
35
  *
41
36
  </Text>
42
37
  )}
43
- </HStack>
38
+ </Flex>
44
39
  );
45
40
  });
@@ -1,4 +1,4 @@
1
- import {StackSpacing, StackProps} from '@workday/canvas-kit-react/layout';
1
+ import {FlexProps} from '@workday/canvas-kit-react/layout';
2
2
  import {space} from '@workday/canvas-kit-react/tokens';
3
3
 
4
4
  /**
@@ -6,21 +6,21 @@ import {space} from '@workday/canvas-kit-react/tokens';
6
6
  */
7
7
  export const useFormFieldOrientation = (orientation: 'horizontal' | 'vertical') => {
8
8
  let layoutProps: {
9
- flexDirection: StackProps['flexDirection'];
10
- alignItems: StackProps['alignItems'];
11
- spacing: StackSpacing;
9
+ flexDirection: FlexProps['flexDirection'];
10
+ alignItems: FlexProps['alignItems'];
11
+ gap: FlexProps['gap'];
12
12
  };
13
13
 
14
14
  if (orientation === 'horizontal') {
15
15
  layoutProps = {
16
16
  flexDirection: 'row',
17
- spacing: space.l,
17
+ gap: space.l,
18
18
  alignItems: 'center',
19
19
  };
20
20
  } else {
21
21
  layoutProps = {
22
22
  flexDirection: 'column',
23
- spacing: space.xxxs,
23
+ gap: space.xxxs,
24
24
  alignItems: 'flex-start',
25
25
  };
26
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-preview-react",
3
- "version": "9.0.0-alpha.335-next.5+da341515",
3
+ "version": "9.0.0-alpha.338-next.5+fb2aa9bc",
4
4
  "description": "Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -46,16 +46,16 @@
46
46
  "dependencies": {
47
47
  "@emotion/react": "^11.7.1",
48
48
  "@emotion/styled": "^11.6.0",
49
- "@workday/canvas-kit-react": "^9.0.0-alpha.335-next.5+da341515",
49
+ "@workday/canvas-kit-react": "^9.0.0-alpha.338-next.5+fb2aa9bc",
50
50
  "@workday/canvas-system-icons-web": "^3.0.0",
51
51
  "@workday/design-assets-types": "^0.2.8"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@workday/canvas-accent-icons-web": "^3.0.0",
55
- "@workday/canvas-kit-labs-react": "^9.0.0-alpha.335-next.5+da341515",
55
+ "@workday/canvas-kit-labs-react": "^9.0.0-alpha.338-next.5+fb2aa9bc",
56
56
  "formik": "^2.2.9",
57
57
  "react-hook-form": "7.36.1",
58
58
  "yup": "^0.32.11"
59
59
  },
60
- "gitHead": "da34151551a68819809ef76f724d7906fd9bb0c0"
60
+ "gitHead": "fb2aa9bcbecaf55a5a8b6b01964b54f8c7519dd7"
61
61
  }
package/pill/lib/Pill.tsx CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  styled,
10
10
  StyledType,
11
11
  } from '@workday/canvas-kit-react/common';
12
- import {BoxProps, boxStyleFn, HStack, Stack} from '@workday/canvas-kit-react/layout';
12
+ import {BoxProps, boxStyleFn, Flex} from '@workday/canvas-kit-react/layout';
13
13
  import {borderRadius, colors, space, type} from '@workday/canvas-kit-react/tokens';
14
14
 
15
15
  import {usePillModel} from './usePillModel';
@@ -190,18 +190,18 @@ export const Pill = createContainer('button')({
190
190
  {...elemProps}
191
191
  disabled={model.state.disabled}
192
192
  >
193
- <HStack spacing="xxxs" display="inline-flex" alignItems="center">
193
+ <Flex gap="xxxs" display="inline-flex" alignItems="center">
194
194
  {React.Children.map(elemProps.children, (child, index) => {
195
195
  if (typeof child === 'string') {
196
196
  return <PillLabel key={index}>{child}</PillLabel>;
197
197
  }
198
198
  return (
199
- <Stack.Item key={index} display="inline-flex">
199
+ <Flex.Item key={index} display="inline-flex">
200
200
  {child}
201
- </Stack.Item>
201
+ </Flex.Item>
202
202
  );
203
203
  })}
204
- </HStack>
204
+ </Flex>
205
205
  </StyledBasePill>
206
206
  )}
207
207
  {variant === 'removable' && (
@@ -211,14 +211,14 @@ export const Pill = createContainer('button')({
211
211
  variant={variant}
212
212
  {...elemProps}
213
213
  >
214
- <HStack spacing="xxxs" display="inline-flex" alignItems="center" justifyContent="center">
214
+ <Flex gap="xxxs" display="inline-flex" alignItems="center" justifyContent="center">
215
215
  {React.Children.map(elemProps.children, (child, index) => {
216
216
  if (typeof child === 'string') {
217
217
  return <PillLabel key={index}>{child}</PillLabel>;
218
218
  }
219
- return <Stack.Item key={index}>{child}</Stack.Item>;
219
+ return <Flex.Item key={index}>{child}</Flex.Item>;
220
220
  })}
221
- </HStack>
221
+ </Flex>
222
222
  </StyledNonInteractivePill>
223
223
  )}
224
224
  </>
@@ -25,7 +25,7 @@ export const PillCount = createComponent('span')({
25
25
  height={22}
26
26
  minWidth={22}
27
27
  padding={`0 ${space.xxxs}`}
28
- marginInlineEnd={`-${space.xxs}`} // Remove padding from HStack on the right side
28
+ marginInlineEnd={`-${space.xxs}`} // Remove excess margin at the end
29
29
  marginInlineStart={`${space.xxxs}`}
30
30
  backgroundColor={colors.soap500}
31
31
  data-count="ck-pill-count"
@@ -21,7 +21,7 @@ export const PillIcon = createSubcomponent('span')({
21
21
  })<PillIconProps>(({size, icon, ...elemProps}, Element) => {
22
22
  return (
23
23
  <SystemIcon
24
- marginInlineStart={`-${space.xxxs}`} // remove padding on the left from HStack
24
+ marginInlineStart={`-${space.xxxs}`} // remove excess margin from the start
25
25
  display="flex"
26
26
  as={Element}
27
27
  size={20}
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
 
3
3
  import {ExtractProps, createContainer, createElemPropsHook} from '@workday/canvas-kit-react/common';
4
- import {HStack} from '@workday/canvas-kit-react/layout';
4
+ import {Flex} from '@workday/canvas-kit-react/layout';
5
5
  import {StatusIndicatorIcon, statusIndicatorColors} from './StatusIndicatorIcon';
6
6
  import {StatusIndicatorLabel} from './StatusIndicatorLabel';
7
7
  import {useStatusIndicatorModel} from './hooks';
8
8
 
9
- export interface StatusIndicatorProps extends Partial<ExtractProps<typeof HStack, never>> {
9
+ export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never> {
10
10
  /**
11
11
  * Children of the `StatusIndicator`. Can contain a `StatusIndicator.Label` and optionally a `StatusIndicator.Icon`.
12
12
  */
@@ -32,8 +32,8 @@ export const StatusIndicator = createContainer('div')({
32
32
  },
33
33
  })<StatusIndicatorProps>(({children, ...elemProps}, Element, model) => {
34
34
  return (
35
- <HStack
36
- spacing={4}
35
+ <Flex
36
+ gap="xxxs"
37
37
  as={Element}
38
38
  maxWidth={200}
39
39
  paddingX="xxxs"
@@ -44,6 +44,6 @@ export const StatusIndicator = createContainer('div')({
44
44
  {...elemProps}
45
45
  >
46
46
  {children}
47
- </HStack>
47
+ </Flex>
48
48
  );
49
49
  });
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import {createContainer, ExtractProps} from '@workday/canvas-kit-react/common';
4
4
  import {FormField, useFormFieldOrientation} from '@workday/canvas-kit-preview-react/form-field';
5
- import {Stack} from '@workday/canvas-kit-react/layout';
5
+ import {Flex} from '@workday/canvas-kit-react/layout';
6
6
 
7
7
  import {useTextAreaModel} from './hooks';
8
8
  import {TextAreaField} from './TextAreaField';
@@ -26,8 +26,8 @@ export const TextArea = createContainer('div')({
26
26
  const layoutProps = useFormFieldOrientation(orientation);
27
27
 
28
28
  return (
29
- <Stack as={Element} {...layoutProps} {...elemProps}>
29
+ <Flex as={Element} {...layoutProps} {...elemProps}>
30
30
  {children}
31
- </Stack>
31
+ </Flex>
32
32
  );
33
33
  });
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import {createContainer, ExtractProps} from '@workday/canvas-kit-react/common';
4
4
  import {FormField, useFormFieldOrientation} from '@workday/canvas-kit-preview-react/form-field';
5
- import {Stack} from '@workday/canvas-kit-react/layout';
5
+ import {Flex} from '@workday/canvas-kit-react/layout';
6
6
 
7
7
  import {useTextInputModel} from './hooks';
8
8
  import {TextInputField} from './TextInputField';
@@ -26,8 +26,8 @@ export const TextInput = createContainer('div')({
26
26
  const layoutProps = useFormFieldOrientation(orientation);
27
27
 
28
28
  return (
29
- <Stack as={Element} {...layoutProps} {...elemProps}>
29
+ <Flex as={Element} {...layoutProps} {...elemProps}>
30
30
  {children}
31
- </Stack>
31
+ </Flex>
32
32
  );
33
33
  });