@workday/canvas-kit-labs-react 16.1.4 → 16.2.0-0604-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/dist/commonjs/ai-ingress-button/lib/AIIngressButton.js +5 -5
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/kbd/lib/KBD.js +6 -6
- package/dist/commonjs/kbd/lib/KBDItem.js +6 -6
- package/dist/commonjs/selection-group/index.d.ts +7 -0
- package/dist/commonjs/selection-group/index.d.ts.map +1 -0
- package/dist/commonjs/selection-group/index.js +22 -0
- package/dist/commonjs/selection-group/lib/SelectionGroup.d.ts +1499 -0
- package/dist/commonjs/selection-group/lib/SelectionGroup.d.ts.map +1 -0
- package/dist/commonjs/selection-group/lib/SelectionGroup.js +61 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupIcon.d.ts +17 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupIcon.d.ts.map +1 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupIcon.js +24 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupItem.d.ts +173 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupItem.d.ts.map +1 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupItem.js +37 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupList.d.ts +172 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupList.d.ts.map +1 -0
- package/dist/commonjs/selection-group/lib/SelectionGroupList.js +35 -0
- package/dist/commonjs/selection-group/lib/hooks/useSelectionGroupItem.d.ts +146 -0
- package/dist/commonjs/selection-group/lib/hooks/useSelectionGroupItem.d.ts.map +1 -0
- package/dist/commonjs/selection-group/lib/hooks/useSelectionGroupItem.js +29 -0
- package/dist/commonjs/selection-group/lib/hooks/useSelectionGroupModel.d.ts +1602 -0
- package/dist/commonjs/selection-group/lib/hooks/useSelectionGroupModel.d.ts.map +1 -0
- package/dist/commonjs/selection-group/lib/hooks/useSelectionGroupModel.js +166 -0
- package/dist/commonjs/version/lib/version.js +1 -1
- package/dist/es6/ai-ingress-button/lib/AIIngressButton.js +5 -5
- package/dist/es6/index.d.ts +1 -0
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +1 -0
- package/dist/es6/kbd/lib/KBD.js +6 -6
- package/dist/es6/kbd/lib/KBDItem.js +6 -6
- package/dist/es6/selection-group/index.d.ts +7 -0
- package/dist/es6/selection-group/index.d.ts.map +1 -0
- package/dist/es6/selection-group/index.js +6 -0
- package/dist/es6/selection-group/lib/SelectionGroup.d.ts +1499 -0
- package/dist/es6/selection-group/lib/SelectionGroup.d.ts.map +1 -0
- package/dist/es6/selection-group/lib/SelectionGroup.js +58 -0
- package/dist/es6/selection-group/lib/SelectionGroupIcon.d.ts +17 -0
- package/dist/es6/selection-group/lib/SelectionGroupIcon.d.ts.map +1 -0
- package/dist/es6/selection-group/lib/SelectionGroupIcon.js +21 -0
- package/dist/es6/selection-group/lib/SelectionGroupItem.d.ts +173 -0
- package/dist/es6/selection-group/lib/SelectionGroupItem.d.ts.map +1 -0
- package/dist/es6/selection-group/lib/SelectionGroupItem.js +34 -0
- package/dist/es6/selection-group/lib/SelectionGroupList.d.ts +172 -0
- package/dist/es6/selection-group/lib/SelectionGroupList.d.ts.map +1 -0
- package/dist/es6/selection-group/lib/SelectionGroupList.js +32 -0
- package/dist/es6/selection-group/lib/hooks/useSelectionGroupItem.d.ts +146 -0
- package/dist/es6/selection-group/lib/hooks/useSelectionGroupItem.d.ts.map +1 -0
- package/dist/es6/selection-group/lib/hooks/useSelectionGroupItem.js +26 -0
- package/dist/es6/selection-group/lib/hooks/useSelectionGroupModel.d.ts +1602 -0
- package/dist/es6/selection-group/lib/hooks/useSelectionGroupModel.d.ts.map +1 -0
- package/dist/es6/selection-group/lib/hooks/useSelectionGroupModel.js +160 -0
- package/dist/es6/version/lib/version.js +1 -1
- package/index.ts +1 -0
- package/package.json +4 -4
- package/selection-group/index.ts +6 -0
- package/selection-group/lib/SelectionGroup.tsx +65 -0
- package/selection-group/lib/SelectionGroupIcon.tsx +60 -0
- package/selection-group/lib/SelectionGroupItem.tsx +143 -0
- package/selection-group/lib/SelectionGroupList.tsx +89 -0
- package/selection-group/lib/hooks/useSelectionGroupItem.tsx +46 -0
- package/selection-group/lib/hooks/useSelectionGroupModel.tsx +195 -0
- package/selection-group/package.json +6 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSelectionGroupModel.d.ts","sourceRoot":"","sources":["../../../../../selection-group/lib/hooks/useSelectionGroupModel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,gBAAgB,EAIjB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,UAAU,CAAC;AACvD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,SAAS,CAAC;AAatD,eAAO,MAAM,sBAAsB;IAG/B;;;OAGG;;IAEH;;;;;;;;;OASG;;IAEH;;;;;;OAMG;;IAEH;;;;;;;OAOG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;;;;OAQG;;IAEH;;;;;OAKG;;IAEH;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA3EH;;;OAGG;;IAEH;;;;;;;;;OASG;;IAEH;;;;;;OAMG;;IAEH;;;;;;;OAOG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;;;;OAQG;;IAEH;;;;;OAKG;;IAEH;;;OAGG;;IAEH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2FL,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useSelectionGroupModel = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const collection_1 = require("@workday/canvas-kit-react/collection");
|
|
9
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
10
|
+
/**
|
|
11
|
+
* `createModelHook` runs a model's guards and callbacks unless the event it is wrapping is already
|
|
12
|
+
* a wrapped event. The overrides below delegate to events from the list model, which runs those
|
|
13
|
+
* same guards and callbacks because both models share a config, so they are marked as wrapped too.
|
|
14
|
+
* Without this, the `onGoTo*` callbacks would fire twice for a single key press.
|
|
15
|
+
*/
|
|
16
|
+
const asWrappedEvent = (fn) => {
|
|
17
|
+
fn._wrapped = true;
|
|
18
|
+
return fn;
|
|
19
|
+
};
|
|
20
|
+
exports.useSelectionGroupModel = (0, common_1.createModelHook)({
|
|
21
|
+
defaultConfig: {
|
|
22
|
+
...collection_1.useListModel.defaultConfig,
|
|
23
|
+
/**
|
|
24
|
+
* Optional id for the whole `SelectionGroup`. If not provided, a unique id will be created.
|
|
25
|
+
* @default useUniqueId()
|
|
26
|
+
*/
|
|
27
|
+
id: '',
|
|
28
|
+
/**
|
|
29
|
+
* The selection mode of the group. `single` allows one selection at a time and behaves like a
|
|
30
|
+
* radio group. `multiple` allows more than one selection and behaves like a checkbox group.
|
|
31
|
+
*
|
|
32
|
+
* This drives more than selection - it also determines the `radio`/`checkbox` role of an item,
|
|
33
|
+
* the `radiogroup`/`group` role of the list, whether the group is one tab stop or many, and the
|
|
34
|
+
* shape of the item's icon. The matching `selection` manager is derived from it, so most groups
|
|
35
|
+
* should set `mode` rather than passing a `selection` manager directly.
|
|
36
|
+
* @default 'single'
|
|
37
|
+
*/
|
|
38
|
+
mode: 'single',
|
|
39
|
+
/**
|
|
40
|
+
* The selection manager the underlying list model uses. Leave this unset unless you need
|
|
41
|
+
* selection to behave differently from what `mode` provides - `mode` picks
|
|
42
|
+
* `singleSelectionManager` or `multiSelectionManager` for you. Setting this does not change
|
|
43
|
+
* the roles or keyboard behavior that `mode` controls.
|
|
44
|
+
* @default `singleSelectionManager`, or `multiSelectionManager` when `mode` is `'multiple'`
|
|
45
|
+
*/
|
|
46
|
+
selection: undefined,
|
|
47
|
+
/**
|
|
48
|
+
* Controls how item widths are calculated within the group. All items in a group use the same
|
|
49
|
+
* sizing method.
|
|
50
|
+
* - `content`: each item is sized to its own label.
|
|
51
|
+
* - `equal`: each item is sized to match the widest item.
|
|
52
|
+
* - `column`: each item spans the full width of the group.
|
|
53
|
+
* @default 'content'
|
|
54
|
+
*/
|
|
55
|
+
width: 'content',
|
|
56
|
+
/**
|
|
57
|
+
* The initially selected ids of the group. Use this for uncontrolled groups. For `single` mode,
|
|
58
|
+
* provide a single id. If not provided, nothing is selected until the user interacts.
|
|
59
|
+
*/
|
|
60
|
+
initialSelectedIds: [],
|
|
61
|
+
/**
|
|
62
|
+
* The selected ids of the group. Providing this prop puts the model in a controlled state: the
|
|
63
|
+
* group renders exactly what is passed in and will not change on its own. Use `onSelect` to
|
|
64
|
+
* respond to selection.
|
|
65
|
+
*/
|
|
66
|
+
selectedIds: undefined,
|
|
67
|
+
/**
|
|
68
|
+
* Sets disabled state for every item in the group. To disable individual items instead, pass
|
|
69
|
+
* their ids to `nonInteractiveIds` so keyboard navigation skips over them.
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
disabled: false,
|
|
73
|
+
/**
|
|
74
|
+
* The type of error associated with the group (if applicable). Notification states apply to the
|
|
75
|
+
* whole group rather than to individual items.
|
|
76
|
+
*
|
|
77
|
+
* This prop only changes the group's border color, which is not sufficient on its own. Always
|
|
78
|
+
* pair it with visible text describing the state and reference that text with
|
|
79
|
+
* `aria-describedby`. Wrapping the group in a `FormField` with a `FormField.Hint` does this
|
|
80
|
+
* for you.
|
|
81
|
+
*/
|
|
82
|
+
error: undefined,
|
|
83
|
+
/**
|
|
84
|
+
* If true, the group is marked invalid to assistive technology. Only applies when `mode` is
|
|
85
|
+
* `'single'`, because `aria-invalid` is not allowed on the `group` role that a multi-select
|
|
86
|
+
* group renders.
|
|
87
|
+
* @default true when `error` is `'error'`, otherwise undefined
|
|
88
|
+
*/
|
|
89
|
+
'aria-invalid': undefined,
|
|
90
|
+
/**
|
|
91
|
+
* The id of the element describing the group, such as the hint text of a `FormField`. This is
|
|
92
|
+
* set automatically when the group is used as a `FormField.Input`.
|
|
93
|
+
*/
|
|
94
|
+
'aria-describedby': undefined,
|
|
95
|
+
/**
|
|
96
|
+
* The orientation of keyboard navigation within the group.
|
|
97
|
+
* @default 'horizontal'
|
|
98
|
+
*/
|
|
99
|
+
orientation: 'horizontal',
|
|
100
|
+
},
|
|
101
|
+
requiredConfig: collection_1.useListModel.requiredConfig,
|
|
102
|
+
})(config => {
|
|
103
|
+
var _a;
|
|
104
|
+
const isControlled = config.selectedIds !== undefined;
|
|
105
|
+
const selection = config.selection ||
|
|
106
|
+
(config.mode === 'multiple' ? collection_1.multiSelectionManager : collection_1.singleSelectionManager);
|
|
107
|
+
const listModel = (0, collection_1.useListModel)(collection_1.useListModel.mergeConfig(config, {
|
|
108
|
+
orientation: config.orientation || 'horizontal',
|
|
109
|
+
selection,
|
|
110
|
+
initialSelectedIds: config.selectedIds || config.initialSelectedIds,
|
|
111
|
+
shouldVirtualize: false,
|
|
112
|
+
// `mergeConfig` combines this with a `shouldSelect` from the consumer rather than replacing
|
|
113
|
+
// it. Guarding here means a blocked selection never reaches `onSelect`.
|
|
114
|
+
shouldSelect: () => !config.disabled,
|
|
115
|
+
}));
|
|
116
|
+
// A single-select group is a radio group, so selection follows focus while arrowing through
|
|
117
|
+
// items. The cursor events below set this, and the effect selects whatever the cursor landed on.
|
|
118
|
+
const shouldSelectCursorRef = react_1.default.useRef(false);
|
|
119
|
+
// A navigation event doesn't always move the cursor - a single-item group, or a non-wrapping
|
|
120
|
+
// navigation manager at either end of the list, leaves it where it is. Counting the events gives
|
|
121
|
+
// the effect below something that always changes, so an arrow key still selects in those cases.
|
|
122
|
+
const [navigationCount, setNavigationCount] = react_1.default.useState(0);
|
|
123
|
+
const state = {
|
|
124
|
+
...listModel.state,
|
|
125
|
+
mode: config.mode,
|
|
126
|
+
width: config.width,
|
|
127
|
+
disabled: config.disabled,
|
|
128
|
+
error: config.error,
|
|
129
|
+
'aria-invalid': (_a = config['aria-invalid']) !== null && _a !== void 0 ? _a : (config.error === 'error' ? true : undefined),
|
|
130
|
+
'aria-describedby': config['aria-describedby'],
|
|
131
|
+
selectedIds: isControlled ? config.selectedIds : listModel.state.selectedIds,
|
|
132
|
+
};
|
|
133
|
+
const navigationEvents = Object.keys(listModel.events).filter(name => name.startsWith('goTo') && name !== 'goTo');
|
|
134
|
+
const selectFollowsFocusEvents = navigationEvents.reduce((result, eventName) => {
|
|
135
|
+
result[eventName] = asWrappedEvent(() => {
|
|
136
|
+
// Let the cursor model resolve the target and move the cursor. Navigation skips
|
|
137
|
+
// `nonInteractiveIds`, so this can't land selection on a non-interactive item.
|
|
138
|
+
listModel.events[eventName]();
|
|
139
|
+
shouldSelectCursorRef.current = true;
|
|
140
|
+
setNavigationCount(count => count + 1);
|
|
141
|
+
});
|
|
142
|
+
return result;
|
|
143
|
+
}, {});
|
|
144
|
+
const events = {
|
|
145
|
+
...listModel.events,
|
|
146
|
+
...(config.mode === 'single' ? selectFollowsFocusEvents : {}),
|
|
147
|
+
};
|
|
148
|
+
const { cursorId } = listModel.state;
|
|
149
|
+
react_1.default.useEffect(() => {
|
|
150
|
+
if (!shouldSelectCursorRef.current) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
shouldSelectCursorRef.current = false;
|
|
154
|
+
if (typeof cursorId === 'string' && cursorId && !state.nonInteractiveIds.includes(cursorId)) {
|
|
155
|
+
listModel.events.select({ id: cursorId });
|
|
156
|
+
}
|
|
157
|
+
// Selection follows the cursor, so this should only run after a navigation event, whether or
|
|
158
|
+
// not that event moved the cursor.
|
|
159
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
160
|
+
}, [cursorId, navigationCount]);
|
|
161
|
+
return {
|
|
162
|
+
...listModel,
|
|
163
|
+
state,
|
|
164
|
+
events,
|
|
165
|
+
};
|
|
166
|
+
});
|
|
@@ -23,20 +23,20 @@ const glowHappyHour = base.legacy.orange400; //'#FD7E00';
|
|
|
23
23
|
const glowThumbtack = base.legacy.coral500; //'#FC5B05';
|
|
24
24
|
export const AIIngressButtonStencil = createStencil({
|
|
25
25
|
extends: buttonStencil,
|
|
26
|
-
base: { name: "
|
|
26
|
+
base: { name: "47qtme", styles: "box-sizing:border-box;--background-button-a19f67:var(--cnvs-sys-color-accent-ai, var(--cnvs-sys-color-bg-ai-stronger, oklch(0.2452 0.0752 254.55 / 1)));border-radius:var(--cnvs-sys-shape-full, var(--cnvs-sys-shape-round, 65rem));height:calc(var(--cnvs-sys-size-md, var(--cnvs-sys-space-x10, 2.5rem)) + var(--cnvs-base-size-50, 0.25rem));width:calc(var(--cnvs-sys-size-md, var(--cnvs-sys-space-x10, 2.5rem)) + var(--cnvs-base-size-50, 0.25rem));transition:box-shadow 300ms ease-out, background 300ms ease-out;.wd-icon-ai-ingress-button{.wd-icon-fill{transition:fill 300ms ease-out;}> linearGradient > stop{transition:300ms ease-out;stop-color:var(--cnvs-sys-color-fg-inverse);}}&:is(:hover, .hover):not(:disabled, .disabled){.wd-icon-ai-ingress-button{linearGradient > stop:first-child{stop-color:var(--cnvs-base-palette-red-200, oklch(0.8339 0.092 28.19 / 1));}linearGradient > stop:nth-child(2){stop-color:var(--cnvs-base-palette-orange-200, oklch(0.8606 0.1002 65.34 / 1));}linearGradient > stop:nth-child(3){stop-color:var(--cnvs-base-palette-orange-200, oklch(0.8606 0.1002 65.34 / 1));}linearGradient > stop:nth-child(4){stop-color:var(--cnvs-base-palette-amber-200, oklch(0.9191 0.1547 99.7 / 1));}linearGradient > stop:nth-child(5){stop-color:var(--cnvs-base-palette-amber-300, oklch(0.8432 0.1713 85.24 / 1));}}}&:disabled, &:disabled:active, &.disabled{opacity:var(--cnvs-sys-opacity-disabled);}&:is(:focus-visible, .focus):not(:disabled, .disabled){box-shadow:0 0 0 0px var(--cnvs-sys-color-border-inverse-default, var(--cnvs-base-palette-neutral-0)), 0 0 0 2px var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));}" },
|
|
27
27
|
modifiers: {
|
|
28
28
|
variant: {
|
|
29
|
-
inverse: { name: "
|
|
29
|
+
inverse: { name: "1t8dql", styles: "--background-button-a19f67:var(--cnvs-sys-color-bg-default);.wd-icon-ai-ingress-button{.wd-icon-fill{transition:fill 300ms ease-out;}> linearGradient > stop{transition:300ms ease-out;stop-color:var(--cnvs-sys-color-fg-ai);}}&:is(:hover, .hover):not(:disabled, .disabled){.wd-icon-ai-ingress-button{linearGradient > stop:first-child{stop-color:var(--cnvs-base-palette-red-200, oklch(0.8339 0.092 28.19 / 1));}linearGradient > stop:nth-child(2){stop-color:var(--cnvs-base-palette-orange-200, oklch(0.8606 0.1002 65.34 / 1));}linearGradient > stop:nth-child(3){stop-color:var(--cnvs-base-palette-orange-200, oklch(0.8606 0.1002 65.34 / 1));}linearGradient > stop:nth-child(4){stop-color:var(--cnvs-base-palette-amber-200, oklch(0.9191 0.1547 99.7 / 1));}linearGradient > stop:nth-child(5){stop-color:var(--cnvs-base-palette-amber-300, oklch(0.8432 0.1713 85.24 / 1));}}}&:is(:focus-visible, .focus):not(:disabled, .disabled){box-shadow:0 0 0 0px var(--cnvs-sys-color-border-inverse-default, var(--cnvs-base-palette-neutral-0)), 0 0 0 2px var(--cnvs-sys-color-fg-inverse);border:2px solid var(--cnvs-sys-color-accent-ai, var(--cnvs-sys-color-bg-ai-stronger, oklch(0.2452 0.0752 254.55 / 1))) ;}" }
|
|
30
30
|
},
|
|
31
31
|
toggled: {
|
|
32
|
-
true: { name: "
|
|
33
|
-
false: { name: "
|
|
32
|
+
true: { name: "3vjc4x", styles: "--background-button-a19f67:var(--cnvs-sys-color-bg-default);transition:box-shadow 300ms ease-out, background 300ms ease-out;box-shadow:0px 0px 4.9px 0px var(--cnvs-base-palette-magenta-200, oklch(0.887 0.1029 327.44 / 1)), 0px 0px 0.98px 0px var(--cnvs-base-palette-amber-100, oklch(0.9567 0.0948 100.22 / 1)), 0px 0px 1.96px 0px var(--cnvs-base-palette-amber-300, oklch(0.8432 0.1713 85.24 / 1)), 0px 0px 2.94px 0px var(--cnvs-base-palette-amber-300, oklch(0.8432 0.1713 85.24 / 1)), 0px 0px 4.9px 0px var(--cnvs-base-palette-orange-400, oklch(0.7261 0.1852 52.58 / 1)), 0px 0px 7.36px 0px var(--cnvs-base-palette-coral-500, oklch(0.6779 0.2096 40.36 / 1)), 0px 0px 9.81px 0px var(--cnvs-base-palette-magenta-200, oklch(0.887 0.1029 327.44 / 1)), 0px 0px 12.26px 0px rgba(255, 194, 253, 0.50);.wd-icon-ai-ingress-button{.wd-icon-fill{transition:fill 300ms ease-out;}> linearGradient > stop{transition:300ms ease-out;stop-color:var(--cnvs-sys-color-fg-ai);}}> linearGradient > stop{transition:300ms ease-out;stop-color:var(--cnvs-sys-color-fg-ai);}&:is(:focus-visible, .focus):not(:disabled, .disabled){box-shadow:0 0 0 2px var(--cnvs-sys-color-border-inverse-default, var(--cnvs-base-palette-neutral-0)), 0 0 0 4px var(--cnvs-brand-common-focus-outline, rgba(8,117,225,1));border:1px solid var(--cnvs-sys-color-border-strong, var(--cnvs-sys-color-border-container, oklch(0.2442 0.0693 257.66 / 0.21))) ;}" },
|
|
33
|
+
false: { name: "2koy36", styles: "transition:box-shadow 300ms ease-out, background 300ms ease-out;" }
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
compound: [
|
|
37
37
|
{
|
|
38
38
|
modifiers: { toggled: true, variant: 'inverse' },
|
|
39
|
-
styles: { name: "
|
|
39
|
+
styles: { name: "i3mww", styles: "--background-button-a19f67:var(--cnvs-sys-color-accent-ai, var(--cnvs-sys-color-bg-ai-stronger, oklch(0.2452 0.0752 254.55 / 1)));.wd-icon-ai-ingress-button{.wd-icon-fill{transition:fill 300ms ease-out;}> linearGradient > stop{transition:300ms ease-out;stop-color:var(--cnvs-sys-color-fg-inverse);}}&:is(:focus-visible, .focus):not(:disabled, .disabled){box-shadow:0 0 0 0px var(--cnvs-sys-color-border-inverse-default, var(--cnvs-base-palette-neutral-0)), 0 0 0 2px var(--cnvs-sys-color-fg-inverse);border:none;}" }
|
|
40
40
|
}
|
|
41
41
|
]
|
|
42
42
|
}, "a-i-ingress-button-5576f1");
|
package/dist/es6/index.d.ts
CHANGED
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,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,OAAO,CAAC;AACtB,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC"}
|
package/dist/es6/index.js
CHANGED
package/dist/es6/kbd/lib/KBD.js
CHANGED
|
@@ -6,16 +6,16 @@ import { system } from '@workday/canvas-tokens-web';
|
|
|
6
6
|
import { KBDItem } from './KBDItem';
|
|
7
7
|
import { useKBDModel } from './useKBDModel';
|
|
8
8
|
export const kbdStencil = createStencil({
|
|
9
|
-
base: { name: "
|
|
9
|
+
base: { name: "h216m", styles: "box-sizing:border-box;display:inline-flex;align-items:center;gap:var(--cnvs-sys-gap-xs, var(--cnvs-sys-space-x1, 0.25rem));" },
|
|
10
10
|
modifiers: {
|
|
11
11
|
variant: {
|
|
12
|
-
plain: { name: "
|
|
13
|
-
default: { name: "
|
|
12
|
+
plain: { name: "8rd0k", styles: "color:var(--cnvs-sys-color-fg-muted-default);" },
|
|
13
|
+
default: { name: "2t54nj", styles: "color:var(--cnvs-sys-color-fg-muted-strong);" }
|
|
14
14
|
},
|
|
15
15
|
size: {
|
|
16
|
-
large: { name: "
|
|
17
|
-
medium: { name: "
|
|
18
|
-
small: { name: "
|
|
16
|
+
large: { name: "39p0w4", styles: "span{font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-subtext-lg);font-size:var(--cnvs-sys-font-size-subtext-lg);letter-spacing:var(--cnvs-sys-letter-spacing-subtext-lg);}" },
|
|
17
|
+
medium: { name: "73akr", styles: "span{font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-subtext-md);font-size:var(--cnvs-sys-font-size-subtext-md);letter-spacing:var(--cnvs-sys-letter-spacing-subtext-md);}" },
|
|
18
|
+
small: { name: "3lre8l", styles: "span{font-family:var(--cnvs-sys-font-family-default);font-weight:var(--cnvs-sys-font-weight-normal);line-height:var(--cnvs-sys-line-height-subtext-sm);font-size:var(--cnvs-sys-font-size-subtext-sm);letter-spacing:var(--cnvs-sys-letter-spacing-subtext-sm);}" }
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}, "kbd-482771");
|
|
@@ -6,11 +6,11 @@ import { system } from '@workday/canvas-tokens-web';
|
|
|
6
6
|
import { useKBDModel } from './useKBDModel';
|
|
7
7
|
export const kbdItemStencil = createStencil({
|
|
8
8
|
extends: cornerShapeStencil,
|
|
9
|
-
base: { name: "
|
|
9
|
+
base: { name: "2brg4k", styles: "box-sizing:border-box;--shape-corner-shape-ccab68:var(--cnvs-sys-shape-sm, var(--cnvs-sys-shape-x1, 0.25rem));text-align:center;display:flex;align-items:center;justify-content:center;" },
|
|
10
10
|
modifiers: {
|
|
11
11
|
variant: {
|
|
12
|
-
plain: { name: "
|
|
13
|
-
default: { name: "
|
|
12
|
+
plain: { name: "3swtn1", styles: "background-color:var(--cnvs-sys-color-surface-transparent, var(--cnvs-sys-color-bg-transparent-default, oklch(0 0 0 / 0)));border-radius:0;corner-shape:unset;" },
|
|
13
|
+
default: { name: "21uhlk", styles: "background-color:var(--cnvs-sys-color-surface-alt-default, oklch(0 0 0 / 0.0392));" }
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
compound: [
|
|
@@ -19,21 +19,21 @@ export const kbdItemStencil = createStencil({
|
|
|
19
19
|
size: 'large',
|
|
20
20
|
variant: 'default',
|
|
21
21
|
},
|
|
22
|
-
styles: { name: "
|
|
22
|
+
styles: { name: "1g863o", styles: "min-width:var(--cnvs-sys-size-xs, var(--cnvs-sys-space-x6, 1.5rem));padding:0.125rem var(--cnvs-sys-padding-xxs, var(--cnvs-sys-space-x1, 0.25rem));" }
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
modifiers: {
|
|
26
26
|
size: 'medium',
|
|
27
27
|
variant: 'default',
|
|
28
28
|
},
|
|
29
|
-
styles: { name: "
|
|
29
|
+
styles: { name: "2vqvjc", styles: "min-width:var(--cnvs-sys-size-xxs, var(--cnvs-sys-space-x5, 1.25rem));padding:0.125rem var(--cnvs-sys-padding-xxs, var(--cnvs-sys-space-x1, 0.25rem));" }
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
modifiers: {
|
|
33
33
|
size: 'small',
|
|
34
34
|
variant: 'default',
|
|
35
35
|
},
|
|
36
|
-
styles: { name: "
|
|
36
|
+
styles: { name: "1lr3wq", styles: "min-width:var(--cnvs-sys-size-xxxs, var(--cnvs-sys-space-x4, 1rem));padding-inline:0.125rem;" }
|
|
37
37
|
}
|
|
38
38
|
]
|
|
39
39
|
}, "kbd-item-9a5f62");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './lib/SelectionGroup';
|
|
2
|
+
export * from './lib/SelectionGroupIcon';
|
|
3
|
+
export * from './lib/SelectionGroupList';
|
|
4
|
+
export * from './lib/SelectionGroupItem';
|
|
5
|
+
export * from './lib/hooks/useSelectionGroupModel';
|
|
6
|
+
export * from './lib/hooks/useSelectionGroupItem';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../selection-group/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './lib/SelectionGroup';
|
|
2
|
+
export * from './lib/SelectionGroupIcon';
|
|
3
|
+
export * from './lib/SelectionGroupList';
|
|
4
|
+
export * from './lib/SelectionGroupItem';
|
|
5
|
+
export * from './lib/hooks/useSelectionGroupModel';
|
|
6
|
+
export * from './lib/hooks/useSelectionGroupItem';
|