@workday/canvas-kit-preview-react 11.1.0-833-next.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/divider/index.d.ts +2 -0
- package/dist/commonjs/divider/index.d.ts.map +1 -0
- package/dist/commonjs/divider/index.js +13 -0
- package/dist/commonjs/divider/lib/Divider.d.ts +34 -0
- package/dist/commonjs/divider/lib/Divider.d.ts.map +1 -0
- package/dist/commonjs/divider/lib/Divider.js +54 -0
- package/dist/commonjs/index.d.ts +2 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -1
- package/dist/es6/divider/index.d.ts +2 -0
- package/dist/es6/divider/index.d.ts.map +1 -0
- package/dist/es6/divider/index.js +1 -0
- package/dist/es6/divider/lib/Divider.d.ts +34 -0
- package/dist/es6/divider/lib/Divider.d.ts.map +1 -0
- package/dist/es6/divider/lib/Divider.js +32 -0
- package/dist/es6/index.d.ts +2 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +2 -1
- package/divider/index.ts +1 -0
- package/divider/lib/Divider.tsx +60 -0
- package/divider/package.json +6 -0
- package/index.ts +2 -1
- package/package.json +4 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../divider/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./lib/Divider"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CSProps } from '@workday/canvas-kit-styling';
|
|
2
|
+
export declare const dividerStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{
|
|
3
|
+
space: string;
|
|
4
|
+
}, never>, {
|
|
5
|
+
space: string;
|
|
6
|
+
}, never, never>;
|
|
7
|
+
export interface DividerProps extends CSProps {
|
|
8
|
+
/**
|
|
9
|
+
* Applies top and bottom margin evenly. It divides the provided value by two and applies half to each end.
|
|
10
|
+
* E.g. `space="2rem"` would apply `1rem` margin to the top, and `1rem` margin to the bottom.
|
|
11
|
+
* @default `system.space.x4` (1rem)
|
|
12
|
+
*/
|
|
13
|
+
space?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* # Divider
|
|
17
|
+
* A divider to segment and visually organize content. By default, it renders a semantic `[<hr>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)` element.
|
|
18
|
+
*
|
|
19
|
+
* [View Docs](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react)
|
|
20
|
+
*
|
|
21
|
+
* The `space` prop will equally apply top and bottom margin styles.
|
|
22
|
+
* In the example below, `x2` (0.5rem), adds `0.25rem` margin to the top and `0.25rem` to the bottom
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { Divider } from '@workday/canvas-kit-preview-react/divider';
|
|
27
|
+
* import {system} from '@workday/canvas-tokens-web';
|
|
28
|
+
*
|
|
29
|
+
* <Divider space={system.space.x2} />
|
|
30
|
+
*
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const Divider: import("@workday/canvas-kit-react/common").ElementComponent<"hr", DividerProps>;
|
|
34
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../divider/lib/Divider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,OAAO,EAIR,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,cAAc;;;;gBAazB,CAAC;AAEH,MAAM,WAAW,YAAa,SAAQ,OAAO;IAC3C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,OAAO,iFAKlB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.Divider = exports.dividerStencil = void 0;
|
|
23
|
+
const React = __importStar(require("react"));
|
|
24
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
25
|
+
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
26
|
+
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
27
|
+
exports.dividerStencil = canvas_kit_styling_1.createStencil({
|
|
28
|
+
vars: {
|
|
29
|
+
space: canvas_kit_styling_1.cssVar(canvas_tokens_web_1.system.space.x4),
|
|
30
|
+
},
|
|
31
|
+
base: { name: "0e6d61", styles: "--space-divider-156e29:var(--cnvs-sys-space-x4);box-sizing:border-box;display:block;height:0.0625rem;border:none;border-top:1px solid var(--cnvs-sys-color-border-divider);margin:calc(var(--space-divider-156e29) / 2) 0;" }
|
|
32
|
+
}, "divider-156e29");
|
|
33
|
+
/**
|
|
34
|
+
* # Divider
|
|
35
|
+
* A divider to segment and visually organize content. By default, it renders a semantic `[<hr>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)` element.
|
|
36
|
+
*
|
|
37
|
+
* [View Docs](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react)
|
|
38
|
+
*
|
|
39
|
+
* The `space` prop will equally apply top and bottom margin styles.
|
|
40
|
+
* In the example below, `x2` (0.5rem), adds `0.25rem` margin to the top and `0.25rem` to the bottom
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import { Divider } from '@workday/canvas-kit-preview-react/divider';
|
|
45
|
+
* import {system} from '@workday/canvas-tokens-web';
|
|
46
|
+
*
|
|
47
|
+
* <Divider space={system.space.x2} />
|
|
48
|
+
*
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
exports.Divider = common_1.createComponent('hr')({
|
|
52
|
+
displayName: 'Divider',
|
|
53
|
+
Component: ({ space, ...elemProps }, ref, Element) => (React.createElement(Element, Object.assign({ ref: ref }, canvas_kit_styling_1.handleCsProp(elemProps, exports.dividerStencil({ space }))))),
|
|
54
|
+
});
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export * from './color-picker';
|
|
2
|
+
export * from './divider';
|
|
2
3
|
export * from './form-field';
|
|
3
4
|
export * from './loading-sparkles';
|
|
4
5
|
export * from './menu';
|
|
5
6
|
export * from './pill';
|
|
7
|
+
export * from './radio';
|
|
6
8
|
export * from './segmented-control';
|
|
7
9
|
export * from './select';
|
|
8
10
|
export * from './side-panel';
|
|
9
11
|
export * from './status-indicator';
|
|
10
12
|
export * from './text-area';
|
|
11
13
|
export * from './text-input';
|
|
12
|
-
export * from './radio';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -11,14 +11,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
__exportStar(require("./color-picker"), exports);
|
|
14
|
+
__exportStar(require("./divider"), exports);
|
|
14
15
|
__exportStar(require("./form-field"), exports);
|
|
15
16
|
__exportStar(require("./loading-sparkles"), exports);
|
|
16
17
|
__exportStar(require("./menu"), exports);
|
|
17
18
|
__exportStar(require("./pill"), exports);
|
|
19
|
+
__exportStar(require("./radio"), exports);
|
|
18
20
|
__exportStar(require("./segmented-control"), exports);
|
|
19
21
|
__exportStar(require("./select"), exports);
|
|
20
22
|
__exportStar(require("./side-panel"), exports);
|
|
21
23
|
__exportStar(require("./status-indicator"), exports);
|
|
22
24
|
__exportStar(require("./text-area"), exports);
|
|
23
25
|
__exportStar(require("./text-input"), exports);
|
|
24
|
-
__exportStar(require("./radio"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../divider/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/Divider';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CSProps } from '@workday/canvas-kit-styling';
|
|
2
|
+
export declare const dividerStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{
|
|
3
|
+
space: string;
|
|
4
|
+
}, never>, {
|
|
5
|
+
space: string;
|
|
6
|
+
}, never, never>;
|
|
7
|
+
export interface DividerProps extends CSProps {
|
|
8
|
+
/**
|
|
9
|
+
* Applies top and bottom margin evenly. It divides the provided value by two and applies half to each end.
|
|
10
|
+
* E.g. `space="2rem"` would apply `1rem` margin to the top, and `1rem` margin to the bottom.
|
|
11
|
+
* @default `system.space.x4` (1rem)
|
|
12
|
+
*/
|
|
13
|
+
space?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* # Divider
|
|
17
|
+
* A divider to segment and visually organize content. By default, it renders a semantic `[<hr>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)` element.
|
|
18
|
+
*
|
|
19
|
+
* [View Docs](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react)
|
|
20
|
+
*
|
|
21
|
+
* The `space` prop will equally apply top and bottom margin styles.
|
|
22
|
+
* In the example below, `x2` (0.5rem), adds `0.25rem` margin to the top and `0.25rem` to the bottom
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { Divider } from '@workday/canvas-kit-preview-react/divider';
|
|
27
|
+
* import {system} from '@workday/canvas-tokens-web';
|
|
28
|
+
*
|
|
29
|
+
* <Divider space={system.space.x2} />
|
|
30
|
+
*
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare const Divider: import("@workday/canvas-kit-react/common").ElementComponent<"hr", DividerProps>;
|
|
34
|
+
//# sourceMappingURL=Divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.d.ts","sourceRoot":"","sources":["../../../../divider/lib/Divider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,OAAO,EAIR,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,cAAc;;;;gBAazB,CAAC;AAEH,MAAM,WAAW,YAAa,SAAQ,OAAO;IAC3C;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,OAAO,iFAKlB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
3
|
+
import { createStencil, handleCsProp, calc, cssVar, px2rem, } from '@workday/canvas-kit-styling';
|
|
4
|
+
import { system } from '@workday/canvas-tokens-web';
|
|
5
|
+
export const dividerStencil = createStencil({
|
|
6
|
+
vars: {
|
|
7
|
+
space: cssVar(system.space.x4),
|
|
8
|
+
},
|
|
9
|
+
base: { name: "0e6d61", styles: "--space-divider-156e29:var(--cnvs-sys-space-x4);box-sizing:border-box;display:block;height:0.0625rem;border:none;border-top:1px solid var(--cnvs-sys-color-border-divider);margin:calc(var(--space-divider-156e29) / 2) 0;" }
|
|
10
|
+
}, "divider-156e29");
|
|
11
|
+
/**
|
|
12
|
+
* # Divider
|
|
13
|
+
* A divider to segment and visually organize content. By default, it renders a semantic `[<hr>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)` element.
|
|
14
|
+
*
|
|
15
|
+
* [View Docs](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react)
|
|
16
|
+
*
|
|
17
|
+
* The `space` prop will equally apply top and bottom margin styles.
|
|
18
|
+
* In the example below, `x2` (0.5rem), adds `0.25rem` margin to the top and `0.25rem` to the bottom
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* import { Divider } from '@workday/canvas-kit-preview-react/divider';
|
|
23
|
+
* import {system} from '@workday/canvas-tokens-web';
|
|
24
|
+
*
|
|
25
|
+
* <Divider space={system.space.x2} />
|
|
26
|
+
*
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export const Divider = createComponent('hr')({
|
|
30
|
+
displayName: 'Divider',
|
|
31
|
+
Component: ({ space, ...elemProps }, ref, Element) => (React.createElement(Element, Object.assign({ ref: ref }, handleCsProp(elemProps, dividerStencil({ space }))))),
|
|
32
|
+
});
|
package/dist/es6/index.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
export * from './color-picker';
|
|
2
|
+
export * from './divider';
|
|
2
3
|
export * from './form-field';
|
|
3
4
|
export * from './loading-sparkles';
|
|
4
5
|
export * from './menu';
|
|
5
6
|
export * from './pill';
|
|
7
|
+
export * from './radio';
|
|
6
8
|
export * from './segmented-control';
|
|
7
9
|
export * from './select';
|
|
8
10
|
export * from './side-panel';
|
|
9
11
|
export * from './status-indicator';
|
|
10
12
|
export * from './text-area';
|
|
11
13
|
export * from './text-input';
|
|
12
|
-
export * from './radio';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/es6/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
package/dist/es6/index.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export * from './color-picker';
|
|
2
|
+
export * from './divider';
|
|
2
3
|
export * from './form-field';
|
|
3
4
|
export * from './loading-sparkles';
|
|
4
5
|
export * from './menu';
|
|
5
6
|
export * from './pill';
|
|
7
|
+
export * from './radio';
|
|
6
8
|
export * from './segmented-control';
|
|
7
9
|
export * from './select';
|
|
8
10
|
export * from './side-panel';
|
|
9
11
|
export * from './status-indicator';
|
|
10
12
|
export * from './text-area';
|
|
11
13
|
export * from './text-input';
|
|
12
|
-
export * from './radio';
|
package/divider/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/Divider';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
3
|
+
import {
|
|
4
|
+
createStencil,
|
|
5
|
+
handleCsProp,
|
|
6
|
+
CSProps,
|
|
7
|
+
calc,
|
|
8
|
+
cssVar,
|
|
9
|
+
px2rem,
|
|
10
|
+
} from '@workday/canvas-kit-styling';
|
|
11
|
+
import {system} from '@workday/canvas-tokens-web';
|
|
12
|
+
|
|
13
|
+
export const dividerStencil = createStencil({
|
|
14
|
+
vars: {
|
|
15
|
+
space: cssVar(system.space.x4),
|
|
16
|
+
},
|
|
17
|
+
base: ({space}) => {
|
|
18
|
+
return {
|
|
19
|
+
display: 'block',
|
|
20
|
+
height: px2rem(1),
|
|
21
|
+
border: 'none',
|
|
22
|
+
borderTop: `1px solid ${system.color.border.divider}`,
|
|
23
|
+
margin: `${calc.divide(space, 2)} 0`,
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export interface DividerProps extends CSProps {
|
|
29
|
+
/**
|
|
30
|
+
* Applies top and bottom margin evenly. It divides the provided value by two and applies half to each end.
|
|
31
|
+
* E.g. `space="2rem"` would apply `1rem` margin to the top, and `1rem` margin to the bottom.
|
|
32
|
+
* @default `system.space.x4` (1rem)
|
|
33
|
+
*/
|
|
34
|
+
space?: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* # Divider
|
|
39
|
+
* A divider to segment and visually organize content. By default, it renders a semantic `[<hr>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr)` element.
|
|
40
|
+
*
|
|
41
|
+
* [View Docs](https://workday.github.io/canvas-kit/?path=/docs/preview-divider-react)
|
|
42
|
+
*
|
|
43
|
+
* The `space` prop will equally apply top and bottom margin styles.
|
|
44
|
+
* In the example below, `x2` (0.5rem), adds `0.25rem` margin to the top and `0.25rem` to the bottom
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* import { Divider } from '@workday/canvas-kit-preview-react/divider';
|
|
49
|
+
* import {system} from '@workday/canvas-tokens-web';
|
|
50
|
+
*
|
|
51
|
+
* <Divider space={system.space.x2} />
|
|
52
|
+
*
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export const Divider = createComponent('hr')({
|
|
56
|
+
displayName: 'Divider',
|
|
57
|
+
Component: ({space, ...elemProps}: DividerProps, ref, Element) => (
|
|
58
|
+
<Element ref={ref} {...handleCsProp(elemProps, dividerStencil({space}))} />
|
|
59
|
+
),
|
|
60
|
+
});
|
package/index.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export * from './color-picker';
|
|
2
|
+
export * from './divider';
|
|
2
3
|
export * from './form-field';
|
|
3
4
|
export * from './loading-sparkles';
|
|
4
5
|
export * from './menu';
|
|
5
6
|
export * from './pill';
|
|
7
|
+
export * from './radio';
|
|
6
8
|
export * from './segmented-control';
|
|
7
9
|
export * from './select';
|
|
8
10
|
export * from './side-panel';
|
|
9
11
|
export * from './status-indicator';
|
|
10
12
|
export * from './text-area';
|
|
11
13
|
export * from './text-input';
|
|
12
|
-
export * from './radio';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-preview-react",
|
|
3
|
-
"version": "11.1.0
|
|
3
|
+
"version": "11.1.0",
|
|
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,8 +46,8 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@emotion/react": "^11.7.1",
|
|
48
48
|
"@emotion/styled": "^11.6.0",
|
|
49
|
-
"@workday/canvas-kit-react": "^11.1.0
|
|
50
|
-
"@workday/canvas-kit-styling": "^11.1.0
|
|
49
|
+
"@workday/canvas-kit-react": "^11.1.0",
|
|
50
|
+
"@workday/canvas-kit-styling": "^11.1.0",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^2.0.0",
|
|
53
53
|
"@workday/design-assets-types": "^0.2.8"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react-hook-form": "7.36.1",
|
|
59
59
|
"yup": "^0.32.11"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "0b38e0b6ec6a0990e4bad0375dc57ecf15239d2c"
|
|
62
62
|
}
|