@workday/canvas-kit-preview-react 14.0.0-alpha.1144-next.0 → 14.0.0-alpha.1146-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/color-picker/lib/ColorPicker.tsx +105 -99
- package/color-picker/lib/parts/ColorReset.tsx +43 -40
- package/color-picker/lib/parts/SwatchBook.tsx +49 -50
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts +69 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +72 -87
- package/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts +5 -0
- package/dist/commonjs/color-picker/lib/parts/ColorReset.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/parts/ColorReset.js +11 -36
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +13 -43
- package/dist/commonjs/divider/lib/Divider.js +1 -1
- package/dist/commonjs/information-highlight/lib/InformationHighlight.js +7 -7
- package/dist/commonjs/information-highlight/lib/parts/Body.js +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Heading.js +1 -1
- package/dist/commonjs/information-highlight/lib/parts/Link.js +1 -1
- package/dist/commonjs/loading-sparkles/lib/LoadingSparkles.js +2 -2
- package/dist/commonjs/multi-select/lib/MultiSelectInput.js +3 -3
- package/dist/commonjs/pill/lib/Pill.js +3 -3
- package/dist/commonjs/pill/lib/PillAvatar.js +1 -1
- package/dist/commonjs/pill/lib/PillCount.js +1 -1
- package/dist/commonjs/pill/lib/PillIcon.js +1 -1
- package/dist/commonjs/pill/lib/PillIconButton.js +1 -1
- package/dist/commonjs/pill/lib/PillLabel.js +1 -1
- package/dist/commonjs/radio/lib/RadioGroup.js +3 -3
- package/dist/commonjs/radio/lib/RadioLabel.js +1 -1
- package/dist/commonjs/radio/lib/RadioText.js +4 -4
- package/dist/commonjs/radio/lib/StyledRadioButton.js +5 -5
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +16 -16
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +4 -4
- package/dist/commonjs/side-panel/lib/SidePanel.js +7 -7
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +11 -11
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +13 -13
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.d.ts +69 -1
- package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +71 -83
- package/dist/es6/color-picker/lib/parts/ColorReset.d.ts +5 -0
- package/dist/es6/color-picker/lib/parts/ColorReset.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/parts/ColorReset.js +10 -32
- package/dist/es6/color-picker/lib/parts/SwatchBook.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/parts/SwatchBook.js +14 -41
- package/dist/es6/divider/lib/Divider.js +1 -1
- package/dist/es6/information-highlight/lib/InformationHighlight.js +7 -7
- package/dist/es6/information-highlight/lib/parts/Body.js +1 -1
- package/dist/es6/information-highlight/lib/parts/Heading.js +1 -1
- package/dist/es6/information-highlight/lib/parts/Link.js +1 -1
- package/dist/es6/loading-sparkles/lib/LoadingSparkles.js +2 -2
- package/dist/es6/multi-select/lib/MultiSelectInput.js +3 -3
- package/dist/es6/pill/lib/Pill.js +3 -3
- package/dist/es6/pill/lib/PillAvatar.js +1 -1
- package/dist/es6/pill/lib/PillCount.js +1 -1
- package/dist/es6/pill/lib/PillIcon.js +1 -1
- package/dist/es6/pill/lib/PillIconButton.js +1 -1
- package/dist/es6/pill/lib/PillLabel.js +1 -1
- package/dist/es6/radio/lib/RadioGroup.js +3 -3
- package/dist/es6/radio/lib/RadioLabel.js +1 -1
- package/dist/es6/radio/lib/RadioText.js +4 -4
- package/dist/es6/radio/lib/StyledRadioButton.js +5 -5
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +16 -16
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +4 -4
- package/dist/es6/side-panel/lib/SidePanel.js +7 -7
- package/dist/es6/side-panel/lib/SidePanelToggleButton.js +11 -11
- package/dist/es6/status-indicator/lib/StatusIndicator.js +13 -13
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +1 -1
- package/package.json +4 -4
|
@@ -15,19 +15,19 @@ const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
|
15
15
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
16
16
|
const radioTextStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
17
17
|
extends: text_1.textStencil,
|
|
18
|
-
base: { name: "
|
|
18
|
+
base: { name: "s56q2v", styles: "box-sizing:border-box;cursor:pointer;" },
|
|
19
19
|
modifiers: {
|
|
20
20
|
variant: {
|
|
21
|
-
inverse: { name: "
|
|
21
|
+
inverse: { name: "s56q2w", styles: "color:var(--cnvs-sys-color-text-inverse);" }
|
|
22
22
|
},
|
|
23
23
|
disabled: {
|
|
24
|
-
true: { name: "
|
|
24
|
+
true: { name: "s56q2x", styles: "cursor:default;color:var(--cnvs-sys-color-text-disabled);" }
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
compound: [
|
|
28
28
|
{
|
|
29
29
|
modifiers: { variant: 'inverse', disabled: true },
|
|
30
|
-
styles: { name: "
|
|
30
|
+
styles: { name: "s56q2y", styles: "color:var(--cnvs-sys-color-text-inverse);opacity:var(--cnvs-sys-opacity-disabled);" }
|
|
31
31
|
}
|
|
32
32
|
],
|
|
33
33
|
defaultModifiers: {
|
|
@@ -14,10 +14,10 @@ const RadioLabel_1 = require("./RadioLabel");
|
|
|
14
14
|
const radioWidth = 18;
|
|
15
15
|
const radioHeight = 18;
|
|
16
16
|
const radioInputStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
17
|
-
base: { name: "
|
|
17
|
+
base: { name: "s56q2a", styles: "box-sizing:border-box;cursor:pointer;height:1.125rem;width:1.125rem;border-radius:var(--cnvs-sys-shape-round);position:absolute;margin:var(--cnvs-sys-space-zero);&:focus-visible, &.focus, &:active{outline:transparent;}&:disabled, &.disabled{cursor:auto;+ .cnvs-radio-check{border-color:var(--cnvs-sys-color-border-input-disabled);background-color:var(--cnvs-sys-color-bg-alt-softer);}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-sys-color-border-input-disabled);}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-accent);border:0.3125rem solid var(--cnvs-brand-primary-base);}}+ .cnvs-radio-check{display:flex;flex-direction:column;align-items:center;background-color:var(--cnvs-sys-color-bg-default);border-radius:var(--cnvs-sys-shape-round);box-sizing:border-box;border:0.0625rem solid var(--cnvs-sys-color-border-input-default);height:1.125rem;width:1.125rem;justify-content:center;pointer-events:none;position:absolute;transition:border 200ms ease, background 200ms;opacity:var(--cnvs-sys-opacity-full);}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-sys-color-border-input-strong);}&:focus-visible + .cnvs-radio-check, &.focus + .cnvs-radio-check{border-color:var(--cnvs-sys-color-border-primary-default);box-shadow:0 0 0 0px var(--cnvs-sys-color-border-inverse), 0 0 0 1px var(--cnvs-brand-common-focus-outline);}&:focus-visible:hover + .cnvs-radio-check, &.focus:hover + .cnvs-radio-check{outline:transparent;}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-accent);border:0.3125rem solid var(--cnvs-brand-primary-base);}&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check{outline:transparent;box-shadow:0 0 0 2px var(--cnvs-sys-color-border-inverse), 0 0 0 4px var(--cnvs-brand-common-focus-outline);}" },
|
|
18
18
|
modifiers: {
|
|
19
19
|
variant: {
|
|
20
|
-
inverse: { name: "
|
|
20
|
+
inverse: { name: "s56q2b", styles: "+ .cnvs-radio-check{background-color:var(--cnvs-sys-color-bg-alt-softer);border-color:var(--cnvs-sys-color-border-input-inverse);}&:disabled, &.disabled{opacity:var(--cnvs-sys-opacity-disabled);+ .cnvs-radio-check{background-color:var(--cnvs-sys-color-bg-alt-softer);border-color:var(--cnvs-sys-color-border-input-disabled);opacity:var(--cnvs-sys-opacity-disabled);}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-base);border-color:var(--cnvs-sys-color-border-inverse);}}&:hover + .cnvs-radio-check, &.hover + .cnvs-radio-check{border-color:var(--cnvs-sys-color-border-input-inverse);}&:focus-visible + .cnvs-radio-check, &.focus + .cnvs-radio-check{border-color:var(--cnvs-sys-color-border-input-inverse);}&:checked + .cnvs-radio-check, &.checked + .cnvs-radio-check{background-color:var(--cnvs-brand-primary-base);border-color:var(--cnvs-sys-color-border-inverse);}&:focus-visible + .cnvs-radio-check, &:focus-visible:hover + .cnvs-radio-check, &.focus + .cnvs-radio-check, &.focus:hover + .cnvs-radio-check{box-shadow:0 0 0 0px var(--cnvs-sys-color-border-contrast-default), 0 0 0 2px var(--cnvs-sys-color-border-inverse);}&:focus-visible:checked + .cnvs-radio-check, &:focus-visible:hover:checked + .cnvs-radio-check, &.focus:checked + .cnvs-radio-check, &.focus:hover:checked + .cnvs-radio-check{box-shadow:0 0 0 2px var(--cnvs-sys-color-border-contrast-default), 0 0 0 4px var(--cnvs-sys-color-border-inverse);}" }
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}, "radio-input-f05aaa");
|
|
@@ -28,13 +28,13 @@ const StyledRadioInput = (0, common_1.createComponent)('input')({
|
|
|
28
28
|
},
|
|
29
29
|
});
|
|
30
30
|
const radioInputWrapperStyles = (0, canvas_kit_styling_1.createStencil)({
|
|
31
|
-
base: { name: "
|
|
31
|
+
base: { name: "s56q2c", styles: "box-sizing:border-box;height:1.125rem;width:1.125rem;flex:0 0 auto;::before{content:'';position:absolute;border-radius:var(--cnvs-sys-shape-round);height:1.125rem;transition:box-shadow 150ms ease-out;width:1.125rem;pointer-events:none;opacity:var(--cnvs-sys-opacity-full);}&:hover:before, &.hover:before{box-shadow:0 0 0 calc(var(--cnvs-sys-space-x2) - 0.0625rem) var(--cnvs-sys-color-bg-alt-soft);}" },
|
|
32
32
|
modifiers: {
|
|
33
33
|
variant: {
|
|
34
|
-
inverse: { name: "
|
|
34
|
+
inverse: { name: "s56q2d", styles: "::before{opacity:var(--cnvs-sys-opacity-disabled);}" }
|
|
35
35
|
},
|
|
36
36
|
disabled: {
|
|
37
|
-
true: { name: "
|
|
37
|
+
true: { name: "s56q2e", styles: "&:hover:before, &.hover:before{box-shadow:none;cursor:auto;}" }
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}, "radio-input-wrapper-styles-fce2c4");
|
|
@@ -37,55 +37,55 @@ const useSegmentedControlModel_1 = require("./hooks/useSegmentedControlModel");
|
|
|
37
37
|
const useSegmentedControlItem_1 = require("./hooks/useSegmentedControlItem");
|
|
38
38
|
exports.segmentedControlItemStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
39
39
|
extends: button_1.buttonStencil,
|
|
40
|
-
base: { name: "
|
|
40
|
+
base: { name: "s56q3s", styles: "box-sizing:border-box;font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-bold);line-height:var(--cnvs-sys-line-height-subtext-large);font-size:var(--cnvs-sys-font-size-subtext-large);letter-spacing:var(--cnvs-base-letter-spacing-150);text-align:start;padding-inline:var(--cnvs-sys-space-zero);gap:var(--cnvs-sys-space-x1);--borderRadius-button-65cb05:var(--cnvs-sys-shape-x1);--label-button-65cb05:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);&:hover, &.hover{--background-button-65cb05:var(--cnvs-sys-color-bg-alt-strong);--label-button-65cb05:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);}&:active, &.active{--background-button-65cb05:var(--cnvs-sys-color-bg-alt-strong);--label-button-65cb05:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);}&:focus-visible, &.focus{--label-button-65cb05:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);}&:disabled, &.disabled{--background-button-65cb05:var(--cnvs-sys-color-bg-alt-soft);}&[aria-pressed='true']{--background-button-65cb05:var(--cnvs-sys-color-bg-default);--border-button-65cb05:var(--cnvs-sys-color-border-input-default);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-strong);--label-button-65cb05:var(--cnvs-sys-color-fg-strong);&:hover, &.hover{--color-system-icon-3a4847:var(--cnvs-sys-color-fg-strong);--label-button-65cb05:var(--cnvs-sys-color-fg-strong);}&:disabled, &.disabled{--border-button-65cb05:var(--cnvs-sys-color-border-input-default);--label-button-65cb05:var(--cnvs-sys-color-fg-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-strong);}}:dir(rtl){svg{transform:scaleX(-1);}}" },
|
|
41
41
|
modifiers: {
|
|
42
42
|
size: {
|
|
43
|
-
large: { name: "
|
|
44
|
-
medium: { name: "
|
|
45
|
-
small: { name: "
|
|
43
|
+
large: { name: "s56q3t", styles: "height:var(--cnvs-sys-space-x10);gap:var(--cnvs-sys-space-x2);" },
|
|
44
|
+
medium: { name: "s56q3u", styles: "height:var(--cnvs-sys-space-x8);" },
|
|
45
|
+
small: { name: "s56q3v", styles: "font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-bold);line-height:var(--cnvs-sys-line-height-subtext-medium);font-size:var(--cnvs-sys-font-size-subtext-medium);letter-spacing:var(--cnvs-base-letter-spacing-100);height:var(--cnvs-sys-space-x6);" }
|
|
46
46
|
},
|
|
47
47
|
variant: {
|
|
48
|
-
iconOnly: { name: "
|
|
49
|
-
textOnly: { name: "
|
|
50
|
-
iconWithText: { name: "
|
|
48
|
+
iconOnly: { name: "s56q3w", styles: "" },
|
|
49
|
+
textOnly: { name: "s56q3x", styles: "" },
|
|
50
|
+
iconWithText: { name: "s56q3y", styles: "" }
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
compound: [
|
|
54
54
|
{
|
|
55
55
|
modifiers: { size: 'large', variant: 'iconOnly' },
|
|
56
|
-
styles: { name: "
|
|
56
|
+
styles: { name: "s56q3z", styles: "min-width:var(--cnvs-sys-space-x10);" }
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
modifiers: { size: 'large', variant: 'iconWithText' },
|
|
60
|
-
styles: { name: "
|
|
60
|
+
styles: { name: "s56q40", styles: "padding-inline:1.25rem var(--cnvs-sys-space-x6);" }
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
modifiers: { size: 'large', variant: 'textOnly' },
|
|
64
|
-
styles: { name: "
|
|
64
|
+
styles: { name: "s56q41", styles: "padding-inline:var(--cnvs-sys-space-x6);" }
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
modifiers: { size: 'medium', variant: 'iconOnly' },
|
|
68
|
-
styles: { name: "
|
|
68
|
+
styles: { name: "s56q42", styles: "min-width:var(--cnvs-sys-space-x8);" }
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
modifiers: { size: 'medium', variant: 'iconWithText' },
|
|
72
|
-
styles: { name: "
|
|
72
|
+
styles: { name: "s56q43", styles: "padding-inline:var(--cnvs-sys-space-x4) 1.25rem;" }
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
modifiers: { size: 'medium', variant: 'textOnly' },
|
|
76
|
-
styles: { name: "
|
|
76
|
+
styles: { name: "s56q44", styles: "padding-inline:1.25rem;" }
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
modifiers: { size: 'small', variant: 'iconOnly' },
|
|
80
|
-
styles: { name: "
|
|
80
|
+
styles: { name: "s56q45", styles: "min-width:var(--cnvs-sys-space-x6);" }
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
modifiers: { size: 'small', variant: 'iconWithText' },
|
|
84
|
-
styles: { name: "
|
|
84
|
+
styles: { name: "s56q46", styles: "padding-inline:var(--cnvs-sys-space-x2) var(--cnvs-sys-space-x3);" }
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
modifiers: { size: 'small', variant: 'textOnly' },
|
|
88
|
-
styles: { name: "
|
|
88
|
+
styles: { name: "s56q47", styles: "padding-inline:var(--cnvs-sys-space-x3);" }
|
|
89
89
|
}
|
|
90
90
|
]
|
|
91
91
|
}, "segmented-control-item-bc271f");
|
|
@@ -11,14 +11,14 @@ exports.segmentedControlListStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
11
11
|
vars: {
|
|
12
12
|
items: '',
|
|
13
13
|
},
|
|
14
|
-
base: { name: "
|
|
14
|
+
base: { name: "s56q33", styles: "box-sizing:border-box;display:inline-grid;background-color:var(--cnvs-sys-color-bg-alt-soft);border:0.0625rem solid var(--cnvs-sys-color-border-input-default);border-radius:var(--cnvs-sys-shape-x2);padding:0.1875rem;grid-gap:var(--cnvs-sys-space-x2);" },
|
|
15
15
|
modifiers: {
|
|
16
16
|
disabled: {
|
|
17
|
-
true: { name: "
|
|
17
|
+
true: { name: "s56q34", styles: "opacity:var(--cnvs-sys-opacity-disabled);" }
|
|
18
18
|
},
|
|
19
19
|
orientation: {
|
|
20
|
-
vertical: { name: "
|
|
21
|
-
horizontal: { name: "
|
|
20
|
+
vertical: { name: "s56q35", styles: "grid-template-rows:repeat(var(--items-segmented-control-list-0a747c), 1fr);" },
|
|
21
|
+
horizontal: { name: "s56q36", styles: "grid-template-columns:repeat(var(--items-segmented-control-list-0a747c), 1fr);" }
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}, "segmented-control-list-0a747c");
|
|
@@ -36,19 +36,19 @@ exports.panelStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
|
36
36
|
expandedWidth: '',
|
|
37
37
|
collapsedWidth: '',
|
|
38
38
|
},
|
|
39
|
-
base: { name: "
|
|
39
|
+
base: { name: "s56q4j", styles: "box-sizing:border-box;overflow:hidden;position:relative;height:100%;outline:0.0625rem solid transparent;transition:width ease-out 200ms, max-width ease-out 200ms;" },
|
|
40
40
|
modifiers: {
|
|
41
41
|
variant: {
|
|
42
|
-
alternate: { name: "
|
|
43
|
-
standard: { name: "
|
|
42
|
+
alternate: { name: "s56q4k", styles: "background-color:var(--cnvs-sys-color-bg-default);box-shadow:var(--cnvs-sys-depth-5);" },
|
|
43
|
+
standard: { name: "s56q4l", styles: "background-color:var(--cnvs-sys-color-bg-alt-softer);" }
|
|
44
44
|
},
|
|
45
45
|
expanded: {
|
|
46
|
-
true: { name: "
|
|
47
|
-
false: { name: "
|
|
46
|
+
true: { name: "s56q4m", styles: "width:var(--expandedWidth-panel-bd9477);max-width:var(--expandedWidth-panel-bd9477);" },
|
|
47
|
+
false: { name: "s56q4n", styles: "width:var(--collapsedWidth-panel-bd9477);max-width:var(--collapsedWidth-panel-bd9477);" }
|
|
48
48
|
},
|
|
49
49
|
touched: {
|
|
50
|
-
true: { name: "
|
|
51
|
-
false: { name: "
|
|
50
|
+
true: { name: "s56q4o", styles: "" },
|
|
51
|
+
false: { name: "s56q4p", styles: "animation:none;" }
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}, "panel-bd9477");
|
|
@@ -34,35 +34,35 @@ const hooks_1 = require("./hooks");
|
|
|
34
34
|
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
35
35
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
36
36
|
exports.sidePanelToggleButtonStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
37
|
-
base: { name: "
|
|
37
|
+
base: { name: "s56q48", styles: "box-sizing:border-box;position:absolute;top:var(--cnvs-sys-space-x6);width:var(--cnvs-sys-space-x8);inset-inline-end:var(--cnvs-sys-space-x4);" },
|
|
38
38
|
modifiers: {
|
|
39
39
|
state: {
|
|
40
|
-
collapsing: { name: "
|
|
41
|
-
collapsed: { name: "
|
|
42
|
-
expanded: { name: "
|
|
43
|
-
expanding: { name: "
|
|
40
|
+
collapsing: { name: "s56q49", styles: "margin:0;transform:scaleX(1);:dir(rtl){transform:scaleX(-1);}" },
|
|
41
|
+
collapsed: { name: "s56q4a", styles: "margin:auto;inset-inline-start:0;inset-inline-end:0;transform:scaleX(1);:dir(rtl){transform:scaleX(-1);}" },
|
|
42
|
+
expanded: { name: "s56q4b", styles: "margin:0;transform:scaleX(-1);:dir(rtl){transform:scaleX(1);}" },
|
|
43
|
+
expanding: { name: "s56q4c", styles: "margin:0;transform:scaleX(-1);:dir(rtl){transform:scaleX(1);}" }
|
|
44
44
|
},
|
|
45
45
|
origin: {
|
|
46
|
-
left: { name: "
|
|
47
|
-
right: { name: "
|
|
46
|
+
left: { name: "s56q4d", styles: "" },
|
|
47
|
+
right: { name: "s56q4e", styles: "" }
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
compound: [
|
|
51
51
|
{
|
|
52
52
|
modifiers: { state: 'collapsed', origin: 'right' },
|
|
53
|
-
styles: { name: "
|
|
53
|
+
styles: { name: "s56q4f", styles: "transform:scaleX(-1);" }
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
modifiers: { state: 'collapsing', origin: 'right' },
|
|
57
|
-
styles: { name: "
|
|
57
|
+
styles: { name: "s56q4g", styles: "transform:scaleX(-1);inset-inline-start:var(--cnvs-sys-space-x4);" }
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
modifiers: { state: 'expanded', origin: 'right' },
|
|
61
|
-
styles: { name: "
|
|
61
|
+
styles: { name: "s56q4h", styles: "transform:scaleX(1);inset-inline-start:var(--cnvs-sys-space-x4);" }
|
|
62
62
|
},
|
|
63
63
|
{
|
|
64
64
|
modifiers: { state: 'expanding', origin: 'right' },
|
|
65
|
-
styles: { name: "
|
|
65
|
+
styles: { name: "s56q4i", styles: "transform:scaleX(1);inset-inline-start:var(--cnvs-sys-space-x4);" }
|
|
66
66
|
}
|
|
67
67
|
]
|
|
68
68
|
}, "side-panel-toggle-button-da8098");
|
|
@@ -10,31 +10,31 @@ const icon_1 = require("@workday/canvas-kit-react/icon");
|
|
|
10
10
|
const StatusIndicatorIcon_1 = require("./StatusIndicatorIcon");
|
|
11
11
|
const StatusIndicatorLabel_1 = require("./StatusIndicatorLabel");
|
|
12
12
|
const statusIndicatorStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
13
|
-
base: { name: "
|
|
13
|
+
base: { name: "s56q57", styles: "box-sizing:border-box;display:inline-flex;gap:var(--cnvs-sys-space-x1);max-width:12.5rem;align-items:center;border-radius:var(--cnvs-sys-shape-half);height:1.25rem;padding:var(--cnvs-sys-space-zero) var(--cnvs-sys-space-x1);outline:0.0625rem solid transparent;" },
|
|
14
14
|
modifiers: {
|
|
15
15
|
gray: {
|
|
16
|
-
high: { name: "
|
|
17
|
-
low: { name: "
|
|
16
|
+
high: { name: "s56q58", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-gray-default);" },
|
|
17
|
+
low: { name: "s56q59", styles: "color:var(--cnvs-sys-color-fg-muted-default);--color-system-icon-3a4847:var(--cnvs-sys-color-static-gray-strong);background:var(--cnvs-sys-color-bg-alt-softer);" }
|
|
18
18
|
},
|
|
19
19
|
orange: {
|
|
20
|
-
high: { name: "
|
|
21
|
-
low: { name: "
|
|
20
|
+
high: { name: "s56q5a", styles: "color:var(--cnvs-sys-color-static-gray-stronger);--color-system-icon-3a4847:var(--cnvs-sys-color-static-gray-stronger);background:var(--cnvs-sys-color-static-amber-default);" },
|
|
21
|
+
low: { name: "s56q5b", styles: "color:var(--cnvs-sys-color-static-amber-strongest);--color-system-icon-3a4847:var(--cnvs-sys-color-static-amber-strongest);background:var(--cnvs-sys-color-static-amber-softer);" }
|
|
22
22
|
},
|
|
23
23
|
blue: {
|
|
24
|
-
high: { name: "
|
|
25
|
-
low: { name: "
|
|
24
|
+
high: { name: "s56q5c", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-blue-default);" },
|
|
25
|
+
low: { name: "s56q5d", styles: "color:var(--cnvs-sys-color-static-blue-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-static-blue-strong);background:var(--cnvs-sys-color-static-blue-softer);" }
|
|
26
26
|
},
|
|
27
27
|
green: {
|
|
28
|
-
high: { name: "
|
|
29
|
-
low: { name: "
|
|
28
|
+
high: { name: "s56q5e", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-green-strong);" },
|
|
29
|
+
low: { name: "s56q5f", styles: "color:var(--cnvs-sys-color-static-green-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-static-green-strong);background:var(--cnvs-sys-color-static-green-softer);" }
|
|
30
30
|
},
|
|
31
31
|
red: {
|
|
32
|
-
high: { name: "
|
|
33
|
-
low: { name: "
|
|
32
|
+
high: { name: "s56q5g", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-static-red-default);" },
|
|
33
|
+
low: { name: "s56q5h", styles: "color:var(--cnvs-sys-color-static-red-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-static-red-strong);background:var(--cnvs-sys-color-static-red-softer);" }
|
|
34
34
|
},
|
|
35
35
|
transparent: {
|
|
36
|
-
high: { name: "
|
|
37
|
-
low: { name: "
|
|
36
|
+
high: { name: "s56q5i", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-bg-translucent);" },
|
|
37
|
+
low: { name: "s56q5j", styles: "color:var(--cnvs-sys-color-static-white);--color-system-icon-3a4847:var(--cnvs-sys-color-static-white);background:var(--cnvs-sys-color-bg-translucent);" }
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}, "status-indicator-1a565e");
|
|
@@ -9,7 +9,7 @@ const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
|
9
9
|
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
10
10
|
const statusIndicatorLabelStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
11
11
|
extends: text_1.textStencil,
|
|
12
|
-
base: { name: "
|
|
12
|
+
base: { name: "s56q56", styles: "box-sizing:border-box;font-weight:var(--cnvs-sys-font-weight-bold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;color:inherit;" },
|
|
13
13
|
defaultModifiers: { typeLevel: 'subtext.large' }
|
|
14
14
|
}, "status-indicator-label-63258e");
|
|
15
15
|
exports.StatusIndicatorLabel = (0, common_1.createComponent)('span')({
|
|
@@ -48,8 +48,76 @@ export interface ColorPickerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
48
48
|
*/
|
|
49
49
|
resetLabel?: string;
|
|
50
50
|
}
|
|
51
|
+
export declare const colorPickerStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{
|
|
52
|
+
readonly button: "color-picker-button";
|
|
53
|
+
readonly form: "color-picker-form";
|
|
54
|
+
readonly hexInput: "color-picker-hex-input";
|
|
55
|
+
readonly inputWrapper: "color-picker-input-wrapper";
|
|
56
|
+
}, {}, never>, {
|
|
57
|
+
readonly button: "color-picker-button";
|
|
58
|
+
readonly form: "color-picker-form";
|
|
59
|
+
readonly hexInput: "color-picker-hex-input";
|
|
60
|
+
readonly inputWrapper: "color-picker-input-wrapper";
|
|
61
|
+
}, {}, never, never>;
|
|
51
62
|
export declare const ColorPicker: {
|
|
52
63
|
({ colorSet, customHexInputLabel, submitLabel, onColorChange, onColorReset, onSubmitClick, resetLabel, resetColor, value, showCustomHexInput, ...elemProps }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
-
defaultColorSet:
|
|
64
|
+
defaultColorSet: {
|
|
65
|
+
blueberry600: string;
|
|
66
|
+
grapeSoda600: string;
|
|
67
|
+
pomegranate600: string;
|
|
68
|
+
cinnamon600: string;
|
|
69
|
+
cantaloupe600: string;
|
|
70
|
+
sourLemon600: string;
|
|
71
|
+
greenApple600: string;
|
|
72
|
+
jewel600: string;
|
|
73
|
+
blueberry500: string;
|
|
74
|
+
grapeSoda500: string;
|
|
75
|
+
pomegranate500: string;
|
|
76
|
+
cinnamon500: string;
|
|
77
|
+
cantaloupe500: string;
|
|
78
|
+
sourLemon500: string;
|
|
79
|
+
greenApple500: string;
|
|
80
|
+
jewel500: string;
|
|
81
|
+
blueberry400: string;
|
|
82
|
+
grapeSoda400: string;
|
|
83
|
+
pomegranate400: string;
|
|
84
|
+
cinnamon400: string;
|
|
85
|
+
cantaloupe400: string;
|
|
86
|
+
sourLemon400: string;
|
|
87
|
+
greenApple400: string;
|
|
88
|
+
jewel400: string;
|
|
89
|
+
blueberry300: string;
|
|
90
|
+
grapeSoda300: string;
|
|
91
|
+
pomegranate300: string;
|
|
92
|
+
cinnamon300: string;
|
|
93
|
+
cantaloupe300: string;
|
|
94
|
+
sourLemon300: string;
|
|
95
|
+
greenApple300: string;
|
|
96
|
+
jewel300: string;
|
|
97
|
+
blueberry200: string;
|
|
98
|
+
grapeSoda200: string;
|
|
99
|
+
pomegranate200: string;
|
|
100
|
+
cinnamon200: string;
|
|
101
|
+
cantaloupe200: string;
|
|
102
|
+
sourLemon200: string;
|
|
103
|
+
greenApple200: string;
|
|
104
|
+
jewel200: string;
|
|
105
|
+
blueberry100: string;
|
|
106
|
+
grapeSoda100: string;
|
|
107
|
+
pomegranate100: string;
|
|
108
|
+
cinnamon100: string;
|
|
109
|
+
cantaloupe100: string;
|
|
110
|
+
sourLemon100: string;
|
|
111
|
+
greenApple100: string;
|
|
112
|
+
jewel100: string;
|
|
113
|
+
blackPepper600: string;
|
|
114
|
+
blackPepper400: string;
|
|
115
|
+
blackPepper300: string;
|
|
116
|
+
blackPepper100: string;
|
|
117
|
+
frenchVanilla500: string;
|
|
118
|
+
frenchVanilla400: string;
|
|
119
|
+
frenchVanilla200: string;
|
|
120
|
+
frenchVanilla100: string;
|
|
121
|
+
};
|
|
54
122
|
};
|
|
55
123
|
//# sourceMappingURL=ColorPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../color-picker/lib/ColorPicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../color-picker/lib/ColorPicker.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAa,qBAAqB,EAAC,MAAM,oBAAoB,CAAC;AAIrE,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,GAAG,qBAAqB,EAAE,CAAC;IAC9C;;;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;AAmED,eAAO,MAAM,kBAAkB;;;;;;;;;;oBA4B7B,CAAC;AAiBH,eAAO,MAAM,WAAW;kKAYrB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDlB,CAAC"}
|
|
@@ -1,92 +1,80 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { colors, space } from '@workday/canvas-kit-react/tokens';
|
|
3
2
|
import { checkIcon } from '@workday/canvas-system-icons-web';
|
|
4
3
|
import { ColorInput } from '@workday/canvas-kit-react/color-picker';
|
|
5
4
|
import { SecondaryButton } from '@workday/canvas-kit-react/button';
|
|
6
5
|
import * as React from 'react';
|
|
7
6
|
import { FormField } from '@workday/canvas-kit-react/form-field';
|
|
8
|
-
import styled from '@emotion/styled';
|
|
9
7
|
import { ResetButton } from './parts/ColorReset';
|
|
10
8
|
import { SwatchBook } from './parts/SwatchBook';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
display: 'flex',
|
|
81
|
-
flexDirection: 'column',
|
|
82
|
-
margin: 0,
|
|
83
|
-
});
|
|
84
|
-
const CheckButton = styled(SecondaryButton)({
|
|
85
|
-
alignSelf: 'flex-end',
|
|
86
|
-
});
|
|
87
|
-
const HexColorInput = styled(ColorInput)({
|
|
88
|
-
width: '168px',
|
|
89
|
-
});
|
|
9
|
+
import { createStencil, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
10
|
+
import { system } from '@workday/canvas-tokens-web';
|
|
11
|
+
const defaultColorSet = {
|
|
12
|
+
blueberry600: '#004387',
|
|
13
|
+
grapeSoda600: '#7c3882',
|
|
14
|
+
pomegranate600: '#99003a',
|
|
15
|
+
cinnamon600: '#a31b12',
|
|
16
|
+
cantaloupe600: '#c06c00',
|
|
17
|
+
sourLemon600: '#bd9100',
|
|
18
|
+
greenApple600: '#217a37',
|
|
19
|
+
jewel600: '#156973',
|
|
20
|
+
blueberry500: '#005cb9',
|
|
21
|
+
grapeSoda500: '#97499e',
|
|
22
|
+
pomegranate500: '#c70550',
|
|
23
|
+
cinnamon500: '#de2e21',
|
|
24
|
+
cantaloupe500: '#f38b00',
|
|
25
|
+
sourLemon500: '#ebb400',
|
|
26
|
+
greenApple500: '#319c4c',
|
|
27
|
+
jewel500: '#1a818c',
|
|
28
|
+
blueberry400: '#0875e1',
|
|
29
|
+
grapeSoda400: '#c860d1',
|
|
30
|
+
pomegranate400: '#f31167',
|
|
31
|
+
cinnamon400: '#ff5347',
|
|
32
|
+
cantaloupe400: '#ffa126',
|
|
33
|
+
sourLemon400: '#ffc629',
|
|
34
|
+
greenApple400: '#43c463',
|
|
35
|
+
jewel400: '#1ea4b3',
|
|
36
|
+
blueberry300: '#40a0ff',
|
|
37
|
+
grapeSoda300: '#de8ae6',
|
|
38
|
+
pomegranate300: '#ff5c9a',
|
|
39
|
+
cinnamon300: '#ff867d',
|
|
40
|
+
cantaloupe300: '#ffbc63',
|
|
41
|
+
sourLemon300: '#ffda61',
|
|
42
|
+
greenApple300: '#5fe380',
|
|
43
|
+
jewel300: '#44c8d7',
|
|
44
|
+
blueberry200: '#a6d2ff',
|
|
45
|
+
grapeSoda200: '#fac0ff',
|
|
46
|
+
pomegranate200: '#ffbdd6',
|
|
47
|
+
cinnamon200: '#fcc9c5',
|
|
48
|
+
cantaloupe200: '#fcd49f',
|
|
49
|
+
sourLemon200: '#ffecab',
|
|
50
|
+
greenApple200: '#acf5be',
|
|
51
|
+
jewel200: '#acecf3',
|
|
52
|
+
blueberry100: '#d7eafc',
|
|
53
|
+
grapeSoda100: '#feebff',
|
|
54
|
+
pomegranate100: '#ffebf3',
|
|
55
|
+
cinnamon100: '#ffefee',
|
|
56
|
+
cantaloupe100: '#ffeed9',
|
|
57
|
+
sourLemon100: '#fff9e6',
|
|
58
|
+
greenApple100: '#ebfff0',
|
|
59
|
+
jewel100: '#ebfdff',
|
|
60
|
+
blackPepper600: '#000000',
|
|
61
|
+
blackPepper400: '#333333',
|
|
62
|
+
blackPepper300: '#494949',
|
|
63
|
+
blackPepper100: '#787878',
|
|
64
|
+
frenchVanilla500: '#a6a6a6',
|
|
65
|
+
frenchVanilla400: '#bdbdbd',
|
|
66
|
+
frenchVanilla200: '#ebebeb',
|
|
67
|
+
frenchVanilla100: '#ffffff',
|
|
68
|
+
};
|
|
69
|
+
export const colorPickerStencil = createStencil({
|
|
70
|
+
parts: {
|
|
71
|
+
button: 'color-picker-button',
|
|
72
|
+
form: 'color-picker-form',
|
|
73
|
+
hexInput: 'color-picker-hex-input',
|
|
74
|
+
inputWrapper: 'color-picker-input-wrapper',
|
|
75
|
+
},
|
|
76
|
+
base: { name: "b13k4", styles: "box-sizing:border-box;width:13.5rem;[data-part=\"color-picker-form\"]{width:100%;display:flex;flex-direction:row;justify-content:space-between;margin-block-start:var(--cnvs-sys-space-x4);}[data-part=\"color-picker-input-wrapper\"]{display:flex;flex-direction:column;margin:var(--cnvs-sys-space-zero);}[data-part=\"color-picker-button\"]{align-self:flex-end;}[data-part=\"color-picker-hex-input\"]{width:10.5rem;}" }
|
|
77
|
+
}, "color-picker-c9dd1d");
|
|
90
78
|
const isCustomColor = (colors, hexCode) => {
|
|
91
79
|
if (!hexCode) {
|
|
92
80
|
return false;
|
|
@@ -101,7 +89,7 @@ const isCustomColor = (colors, hexCode) => {
|
|
|
101
89
|
}
|
|
102
90
|
});
|
|
103
91
|
};
|
|
104
|
-
export const ColorPicker = ({ colorSet = defaultColorSet, customHexInputLabel = 'Custom Hex Color', submitLabel = 'Submit', onColorChange, onColorReset, onSubmitClick, resetLabel = 'Reset', resetColor, value = '', showCustomHexInput = false, ...elemProps }) => {
|
|
92
|
+
export const ColorPicker = ({ colorSet = Object.values(defaultColorSet), customHexInputLabel = 'Custom Hex Color', submitLabel = 'Submit', onColorChange, onColorReset, onSubmitClick, resetLabel = 'Reset', resetColor, value = '', showCustomHexInput = false, ...elemProps }) => {
|
|
105
93
|
const [validHexValue, setValidHexValue] = React.useState('');
|
|
106
94
|
const [disabled, setDisabled] = React.useState(true);
|
|
107
95
|
const [customHexValue, setCustomHexValue] = React.useState(isCustomColor(colorSet, value) ? value : '');
|
|
@@ -121,6 +109,6 @@ export const ColorPicker = ({ colorSet = defaultColorSet, customHexInputLabel =
|
|
|
121
109
|
onColorChange(validHexValue);
|
|
122
110
|
event.preventDefault(); // don't submit the form - default action is to reload the page
|
|
123
111
|
};
|
|
124
|
-
return (_jsxs(
|
|
112
|
+
return (_jsxs("div", { ...handleCsProp(elemProps, colorPickerStencil()), children: [onColorReset && resetColor && (_jsx(ResetButton, { onClick: onColorReset, resetColor: resetColor, label: resetLabel })), _jsx(SwatchBook, { colors: colorSet, onSelect: onColorChange, value: value }), showCustomHexInput && (_jsxs("form", { onSubmit: onSubmit, ...colorPickerStencil.parts.form, children: [_jsxs(FormField, { ...colorPickerStencil.parts.inputWrapper, children: [_jsx(FormField.Label, { children: customHexInputLabel }), _jsx(FormField.Input, { as: ColorInput, onChange: onCustomHexChange, onValidColorChange: onValidCustomHexChange, value: customHexValue, showCheck: value === validHexValue || value === customHexValue, ...colorPickerStencil.parts.hexInput })] }), _jsx(SecondaryButton, { "aria-label": submitLabel, icon: checkIcon, type: "submit", disabled: disabled, ...colorPickerStencil.parts.button })] }))] }));
|
|
125
113
|
};
|
|
126
114
|
ColorPicker.defaultColorSet = defaultColorSet;
|
|
@@ -3,5 +3,10 @@ export interface ResetButtonProps {
|
|
|
3
3
|
resetColor: string;
|
|
4
4
|
onClick: (color: string) => void;
|
|
5
5
|
}
|
|
6
|
+
export declare const resetButtonStencil: import("@workday/canvas-kit-styling").Stencil<import("@workday/canvas-kit-styling").StencilModifierConfig<{
|
|
7
|
+
readonly label: "reset-button-label";
|
|
8
|
+
}, {}, never>, {
|
|
9
|
+
readonly label: "reset-button-label";
|
|
10
|
+
}, {}, never, never>;
|
|
6
11
|
export declare const ResetButton: ({ onClick, resetColor, label }: ResetButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
12
|
//# sourceMappingURL=ColorReset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorReset.d.ts","sourceRoot":"","sources":["../../../../../color-picker/lib/parts/ColorReset.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColorReset.d.ts","sourceRoot":"","sources":["../../../../../color-picker/lib/parts/ColorReset.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,kBAAkB;;;;oBAkC7B,CAAC;AAEH,eAAO,MAAM,WAAW,mCAAkC,gBAAgB,4CAWzE,CAAC"}
|