@workday/canvas-kit-mcp 15.0.0-alpha.0075-next.0 → 15.0.0-alpha.0076-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.
@@ -31,6 +31,7 @@ space tokens, the new tokens aim to add more semantic meaning to allow for bette
31
31
  - [Buttons](#buttons)
32
32
  - [Removals](#removals)
33
33
  - [Segmented Control (Deprecated)](#segmented-control-deprecated)
34
+ - [Select (Deprecated)](#select-deprecated)
34
35
  - [Search Form (Labs)](#search-form-labs)
35
36
  - [Combobox (Labs)](#combobox-labs)
36
37
  - [Glossary](#glossary)
@@ -126,6 +127,8 @@ import {Pill} from '@workday/canvas-kit-react/pill';
126
127
 
127
128
  ### Segmented Control ⚡️
128
129
 
130
+ **PR:** [#3633](https://github.com/Workday/canvas-kit/pull/3633)
131
+
129
132
  We've promoted `SegmentedControl` from [Preview](#preview) to [Main](#main). This replaces the deprecated `SegmentedControl` that was previously in Main.
130
133
 
131
134
  **Before in v14**
@@ -226,6 +229,8 @@ The promoted `SegmentedControl` includes several new features:
226
229
 
227
230
  ### Information Highlight ⚡️
228
231
 
232
+ **PR:** [#3633](https://github.com/Workday/canvas-kit/pull/3633)
233
+
229
234
  We've promoted `InformationHighlight` from [Preview](#preview) to [Main](#main). There are no changes to the functionality or styling of the component. The only change required is updating the import statement.
230
235
 
231
236
  **Before in v14**
@@ -265,6 +270,124 @@ Please migrate to the new `SegmentedControl` component (promoted from Preview) w
265
270
  component pattern with `SegmentedControl.List` and `SegmentedControl.Item`. See the
266
271
  [API Differences](#api-differences) section above for migration guidance.
267
272
 
273
+ ### Select (Deprecated)
274
+
275
+ **PR:** [#3658](https://github.com/Workday/canvas-kit/pull/3658)
276
+
277
+ The `Select` component in `@workday/canvas-kit-preview-react/select` has been removed. Please use the
278
+ `Select` component from `@workday/canvas-kit-react/select` instead.
279
+
280
+ **Before in v14**
281
+
282
+ ```tsx
283
+ import {Select} from '@workday/canvas-kit-preview-react/select';
284
+ ```
285
+
286
+ **After in v15**
287
+
288
+ ```tsx
289
+ import {Select} from '@workday/canvas-kit-react/select';
290
+ ```
291
+
292
+ #### API Differences
293
+
294
+ The Main `Select` is a [compound component](/getting-started/for-developers/resources/compound-components/)
295
+ built on top of the Combobox component with a composition-based API, whereas the Preview Select was a
296
+ monolithic class-based component.
297
+
298
+ ##### Structure Changes
299
+
300
+ | Preview (Removed) | Main |
301
+ | --------------------------- | ------------------------------------------------------------- |
302
+ | `Select` (single component) | `Select` + `Select.Input` + `Select.Popper` + `Select.Card` + `Select.List` + `Select.Item` |
303
+
304
+ ##### Prop Changes
305
+
306
+ | Feature | Preview (Removed) | Main |
307
+ | ---------------- | ------------------------------------------ | ------------------------------------------------ |
308
+ | Options | `options` prop (array of Option objects) | `items` prop (array of any type) |
309
+ | Selected value | `value` prop | Managed via model (`useSelectModel`) |
310
+ | Change handler | `onChange={(e) => {}}` | `onChange` on `Select.Input` |
311
+ | Error state | `error={Select.ErrorType.Error}` | `error="error"` or `error="caution"` |
312
+ | Custom rendering | `renderOption` / `renderSelected` props | Composition via `Select.Item` children |
313
+ | Form integration | Manual | Built-in with `FormField` wrapper |
314
+ | Accessibility | Manual ARIA | Built-in via Combobox foundation |
315
+
316
+ ##### Code Migration
317
+
318
+ **Preview API (Removed)**
319
+
320
+ ```tsx
321
+ import {Select} from '@workday/canvas-kit-preview-react/select';
322
+
323
+ const options = [
324
+ {label: 'Small', value: 'small'},
325
+ {label: 'Medium', value: 'medium'},
326
+ {label: 'Large', value: 'large'},
327
+ ];
328
+
329
+ const [value, setValue] = React.useState('medium');
330
+
331
+ <Select
332
+ options={options}
333
+ value={value}
334
+ onChange={e => setValue(e.target.value)}
335
+ />
336
+ ```
337
+
338
+ **Main API (v15)**
339
+
340
+ ```tsx
341
+ import {Select} from '@workday/canvas-kit-react/select';
342
+ import {FormField} from '@workday/canvas-kit-react/form-field';
343
+
344
+ const items = ['Small', 'Medium', 'Large'];
345
+
346
+ <Select items={items}>
347
+ <FormField label="Size">
348
+ <Select.Input onChange={e => console.log('Selected:', e.target.value)} />
349
+ <Select.Popper>
350
+ <Select.Card>
351
+ <Select.List>
352
+ {item => <Select.Item>{item}</Select.Item>}
353
+ </Select.List>
354
+ </Select.Card>
355
+ </Select.Popper>
356
+ </FormField>
357
+ </Select>
358
+ ```
359
+
360
+ ##### Main Select Features
361
+
362
+ The Main `Select` includes features not available in the Preview version:
363
+
364
+ - **Composition-based API**: Full control over structure with subcomponents
365
+ - **FormField integration**: Built-in accessibility when wrapped with FormField
366
+ - **Model-based state**: Use `useSelectModel` for advanced state management
367
+ - **Virtualization support**: Enable for large lists via model config
368
+ - **Icons in input**: Use `inputStartIcon` prop on `Select.Input`
369
+ - **Icons in items**: Use `Select.Item.Icon` subcomponent
370
+
371
+ ```tsx
372
+ // With icons
373
+ <Select.Input inputStartIcon={myIcon} />
374
+
375
+ // With item icons
376
+ <Select.Item>
377
+ <Select.Item.Icon icon={starIcon} />
378
+ Favorite
379
+ </Select.Item>
380
+
381
+ // With model for controlled state
382
+ const model = useSelectModel({
383
+ items: myItems,
384
+ onSelect: ({id}) => console.log('Selected:', id),
385
+ });
386
+
387
+ <Select model={model}>
388
+ ...
389
+ </Select>
390
+ ```
268
391
  ### Search Form (Labs)
269
392
 
270
393
  The deprecated `SearchForm` component has been removed from `@workday/canvas-kit-labs-react`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-mcp",
3
- "version": "15.0.0-alpha.0075-next.0",
3
+ "version": "15.0.0-alpha.0076-next.0",
4
4
  "description": "MCP package for Canvas Kit",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -53,5 +53,5 @@
53
53
  "tsx": "^4.7.0",
54
54
  "typescript": "5.0"
55
55
  },
56
- "gitHead": "85c5dfa329d29263f96a49be74ef55f551990c7b"
56
+ "gitHead": "5d389f1b5a66cf5bde37eb570ff634a7b143ee98"
57
57
  }