@workday/canvas-kit-docs 13.1.5 → 13.1.7

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.
@@ -128309,17 +128309,8 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
128309
128309
  "name": "data-focus-id",
128310
128310
  "required": true,
128311
128311
  "type": {
128312
- "kind": "union",
128313
- "value": [
128314
- {
128315
- "kind": "primitive",
128316
- "value": "any"
128317
- },
128318
- {
128319
- "kind": "primitive",
128320
- "value": "any"
128321
- }
128322
- ]
128312
+ "kind": "primitive",
128313
+ "value": "string"
128323
128314
  },
128324
128315
  "description": "",
128325
128316
  "tags": {},
@@ -128601,17 +128592,8 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
128601
128592
  "name": "data-focus-id",
128602
128593
  "required": true,
128603
128594
  "type": {
128604
- "kind": "union",
128605
- "value": [
128606
- {
128607
- "kind": "primitive",
128608
- "value": "any"
128609
- },
128610
- {
128611
- "kind": "primitive",
128612
- "value": "any"
128613
- }
128614
- ]
128595
+ "kind": "primitive",
128596
+ "value": "string"
128615
128597
  },
128616
128598
  "description": "",
128617
128599
  "tags": {},
@@ -186119,7 +186101,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
186119
186101
  {
186120
186102
  "name": "useUniqueId",
186121
186103
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/common/lib/utils/useUniqueId.ts",
186122
- "description": "Generate a unique ID if one is not provided. The generated ID will be stable across renders",
186104
+ "description": "Generate a unique ID if one is not provided. The generated ID will be stable across renders. Uses\n`React.useId()` if available.",
186123
186105
  "declarations": [
186124
186106
  {
186125
186107
  "name": "useUniqueId",
@@ -249817,7 +249799,7 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
249817
249799
  {
249818
249800
  "kind": "symbol",
249819
249801
  "name": "BehaviorHook",
249820
- "value": "BehaviorHook<Model<any, any>, { readonly onKeyDown: (event: KeyboardEvent<HTMLElement>) => void; readonly onClick: () => void; readonly 'data-focus-id': `${string}-undefined` | `${string}-${string}`; readonly tabIndex: 0 | -1; }>"
249802
+ "value": "BehaviorHook<Model<any, any>, { readonly onKeyDown: (event: KeyboardEvent<HTMLElement>) => void; readonly onClick: () => void; readonly 'data-focus-id': string; readonly tabIndex: 0 | -1; }>"
249821
249803
  },
249822
249804
  {
249823
249805
  "kind": "function",
@@ -338465,6 +338447,186 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
338465
338447
  ]
338466
338448
  }
338467
338449
  },
338450
+ {
338451
+ "name": "useTabOverflowScroll",
338452
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx",
338453
+ "description": "",
338454
+ "declarations": [
338455
+ {
338456
+ "name": "useTabOverflowScroll",
338457
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx"
338458
+ }
338459
+ ],
338460
+ "tags": {},
338461
+ "type": {
338462
+ "kind": "function",
338463
+ "name": {
338464
+ "kind": "symbol",
338465
+ "name": "createElemPropsHook"
338466
+ },
338467
+ "parameters": [
338468
+ {
338469
+ "kind": "parameter",
338470
+ "name": "model",
338471
+ "description": "",
338472
+ "tags": {},
338473
+ "declarations": [],
338474
+ "type": {
338475
+ "kind": "symbol",
338476
+ "name": "TabsModel"
338477
+ },
338478
+ "required": true
338479
+ },
338480
+ {
338481
+ "kind": "parameter",
338482
+ "name": "elemProps",
338483
+ "description": "",
338484
+ "tags": {},
338485
+ "declarations": [],
338486
+ "type": {
338487
+ "kind": "object",
338488
+ "properties": [
338489
+ {
338490
+ "kind": "property",
338491
+ "name": "aria-orientation",
338492
+ "required": false,
338493
+ "type": {
338494
+ "kind": "union",
338495
+ "value": [
338496
+ {
338497
+ "kind": "string",
338498
+ "value": "vertical"
338499
+ },
338500
+ {
338501
+ "kind": "string",
338502
+ "value": "horizontal"
338503
+ }
338504
+ ]
338505
+ },
338506
+ "description": "",
338507
+ "declarations": [
338508
+ {
338509
+ "name": "aria-orientation",
338510
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx"
338511
+ }
338512
+ ],
338513
+ "tags": {}
338514
+ }
338515
+ ]
338516
+ },
338517
+ "required": false
338518
+ },
338519
+ {
338520
+ "kind": "parameter",
338521
+ "name": "ref",
338522
+ "description": "",
338523
+ "tags": {},
338524
+ "declarations": [],
338525
+ "type": {
338526
+ "kind": "external",
338527
+ "name": "React.Ref",
338528
+ "url": "https://reactjs.org/docs/refs-and-the-dom.html"
338529
+ },
338530
+ "required": false
338531
+ }
338532
+ ],
338533
+ "returnType": {
338534
+ "kind": "object",
338535
+ "properties": [
338536
+ {
338537
+ "kind": "property",
338538
+ "name": "ref",
338539
+ "required": true,
338540
+ "type": {
338541
+ "kind": "function",
338542
+ "parameters": [
338543
+ {
338544
+ "kind": "parameter",
338545
+ "name": "instance",
338546
+ "type": {
338547
+ "kind": "union",
338548
+ "value": [
338549
+ {
338550
+ "kind": "symbol",
338551
+ "name": "T",
338552
+ "value": "T"
338553
+ },
338554
+ {
338555
+ "kind": "primitive",
338556
+ "value": "null"
338557
+ }
338558
+ ]
338559
+ },
338560
+ "required": true,
338561
+ "rest": false,
338562
+ "description": "",
338563
+ "declarations": [
338564
+ {
338565
+ "name": "instance",
338566
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/node_modules/@types/react/ts5.0/index.d.ts"
338567
+ }
338568
+ ],
338569
+ "tags": {}
338570
+ }
338571
+ ],
338572
+ "members": [],
338573
+ "returnType": {
338574
+ "kind": "primitive",
338575
+ "value": "void"
338576
+ }
338577
+ },
338578
+ "description": "",
338579
+ "tags": {},
338580
+ "declarations": []
338581
+ },
338582
+ {
338583
+ "kind": "property",
338584
+ "name": "onScroll",
338585
+ "required": true,
338586
+ "type": {
338587
+ "kind": "function",
338588
+ "parameters": [
338589
+ {
338590
+ "kind": "parameter",
338591
+ "name": "event",
338592
+ "type": {
338593
+ "kind": "symbol",
338594
+ "name": "React.UIEvent",
338595
+ "typeParameters": [
338596
+ {
338597
+ "kind": "symbol",
338598
+ "name": "HTMLDivElement",
338599
+ "value": "HTMLDivElement"
338600
+ }
338601
+ ],
338602
+ "value": "UIEvent<T, E>"
338603
+ },
338604
+ "required": true,
338605
+ "rest": false,
338606
+ "description": "",
338607
+ "declarations": [
338608
+ {
338609
+ "name": "event",
338610
+ "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx"
338611
+ }
338612
+ ],
338613
+ "tags": {}
338614
+ }
338615
+ ],
338616
+ "members": [],
338617
+ "returnType": {
338618
+ "kind": "primitive",
338619
+ "value": "void"
338620
+ }
338621
+ },
338622
+ "description": "",
338623
+ "tags": {},
338624
+ "declarations": []
338625
+ }
338626
+ ]
338627
+ }
338628
+ }
338629
+ },
338468
338630
  {
338469
338631
  "name": "useTabsList",
338470
338632
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx",
@@ -338483,6 +338645,12 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
338483
338645
  "name": "composeHooks"
338484
338646
  },
338485
338647
  "parameters": [
338648
+ {
338649
+ "kind": "symbol",
338650
+ "name": "useTabOverflowScroll",
338651
+ "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx",
338652
+ "value": "useTabOverflowScroll"
338653
+ },
338486
338654
  {
338487
338655
  "kind": "function",
338488
338656
  "name": {
@@ -338545,20 +338713,12 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
338545
338713
  },
338546
338714
  {
338547
338715
  "kind": "property",
338548
- "name": "overflowX",
338716
+ "name": "aria-orientation",
338549
338717
  "required": true,
338550
338718
  "type": {
338551
- "kind": "union",
338552
- "value": [
338553
- {
338554
- "kind": "string",
338555
- "value": "auto"
338556
- },
338557
- {
338558
- "kind": "primitive",
338559
- "value": "undefined"
338560
- }
338561
- ]
338719
+ "kind": "symbol",
338720
+ "name": "Orientation",
338721
+ "value": "any"
338562
338722
  },
338563
338723
  "description": "",
338564
338724
  "tags": {},
@@ -339503,85 +339663,6 @@ export const docs = (typeof window !== 'undefined' && window.__docs) ||
339503
339663
  "model": "TabsModel"
339504
339664
  }
339505
339665
  },
339506
- {
339507
- "name": "useTouchDirection",
339508
- "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx",
339509
- "description": "",
339510
- "declarations": [
339511
- {
339512
- "name": "useTouchDirection",
339513
- "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx"
339514
- }
339515
- ],
339516
- "tags": {},
339517
- "type": {
339518
- "kind": "function",
339519
- "parameters": [],
339520
- "members": [],
339521
- "returnType": {
339522
- "kind": "object",
339523
- "properties": [
339524
- {
339525
- "kind": "property",
339526
- "name": "direction",
339527
- "defaultValue": {
339528
- "kind": "unknown",
339529
- "value": "unknown",
339530
- "text": "touchDir"
339531
- },
339532
- "type": {
339533
- "kind": "union",
339534
- "value": [
339535
- {
339536
- "kind": "string",
339537
- "value": "left"
339538
- },
339539
- {
339540
- "kind": "string",
339541
- "value": "right"
339542
- },
339543
- {
339544
- "kind": "primitive",
339545
- "value": "undefined"
339546
- }
339547
- ]
339548
- },
339549
- "required": false,
339550
- "description": "",
339551
- "declarations": [
339552
- {
339553
- "name": "direction",
339554
- "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx"
339555
- }
339556
- ],
339557
- "tags": {}
339558
- },
339559
- {
339560
- "kind": "property",
339561
- "name": "isDragging",
339562
- "defaultValue": {
339563
- "kind": "unknown",
339564
- "value": "unknown",
339565
- "text": "isDragging"
339566
- },
339567
- "type": {
339568
- "kind": "primitive",
339569
- "value": "boolean"
339570
- },
339571
- "required": true,
339572
- "description": "",
339573
- "declarations": [
339574
- {
339575
- "name": "isDragging",
339576
- "filePath": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsList.tsx"
339577
- }
339578
- ],
339579
- "tags": {}
339580
- }
339581
- ]
339582
- }
339583
- }
339584
- },
339585
339666
  {
339586
339667
  "name": "MenuPopperProps",
339587
339668
  "fileName": "/home/runner/work/canvas-kit/canvas-kit/modules/react/tabs/lib/TabsMenuPopper.tsx",
@@ -18,11 +18,11 @@ export const packageJSONFile = `{
18
18
  "@emotion/react": "11.11.4",
19
19
  "@types/react": "18.2.60",
20
20
  "@types/react-dom": "18.2.19",
21
- "@workday/canvas-kit-labs-react": "13.1.5",
22
- "@workday/canvas-kit-preview-react": "13.1.5",
23
- "@workday/canvas-kit-react": "13.1.5",
24
- "@workday/canvas-kit-react-fonts": "^13.1.5",
25
- "@workday/canvas-kit-styling": "13.1.5",
21
+ "@workday/canvas-kit-labs-react": "13.1.7",
22
+ "@workday/canvas-kit-preview-react": "13.1.7",
23
+ "@workday/canvas-kit-react": "13.1.7",
24
+ "@workday/canvas-kit-react-fonts": "^13.1.7",
25
+ "@workday/canvas-kit-styling": "13.1.7",
26
26
  "@workday/canvas-system-icons-web": "3.0.22",
27
27
  "@workday/canvas-tokens-web": "2.0.0"
28
28
  },
@@ -18,11 +18,11 @@ export const packageJSONFile = `{
18
18
  "@emotion/react": "11.11.4",
19
19
  "@types/react": "18.2.60",
20
20
  "@types/react-dom": "18.2.19",
21
- "@workday/canvas-kit-labs-react": "13.1.5",
22
- "@workday/canvas-kit-preview-react": "13.1.5",
23
- "@workday/canvas-kit-react": "13.1.5",
24
- "@workday/canvas-kit-react-fonts": "^13.1.5",
25
- "@workday/canvas-kit-styling": "13.1.5",
21
+ "@workday/canvas-kit-labs-react": "13.1.7",
22
+ "@workday/canvas-kit-preview-react": "13.1.7",
23
+ "@workday/canvas-kit-react": "13.1.7",
24
+ "@workday/canvas-kit-react-fonts": "^13.1.7",
25
+ "@workday/canvas-kit-styling": "13.1.7",
26
26
  "@workday/canvas-system-icons-web": "3.0.22",
27
27
  "@workday/canvas-tokens-web": "2.0.0"
28
28
  },
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
+ import {slugify} from '@workday/canvas-kit-react/common';
3
4
  import {isCursor} from '@workday/canvas-kit-react/collection';
4
5
  import {Tabs, useTabsModel} from '@workday/canvas-kit-react/tabs';
5
6
 
@@ -46,13 +47,15 @@ export default () => {
46
47
 
47
48
  // wait for stabilization of state
48
49
  requestAnimationFrame(() => {
49
- document.querySelector<HTMLElement>(`#${model.state.id}-${nextId}`)?.focus();
50
+ document
51
+ .querySelector<HTMLElement>(`[id="${slugify(`${model.state.id}-${nextId}`)}"]`)
52
+ ?.focus();
50
53
  });
51
54
  }
52
55
  };
53
56
 
54
57
  const onKeyDown = (id: string) => (e: React.KeyboardEvent<HTMLElement>) => {
55
- if (e.key === 'Delete' && id !== 'add') {
58
+ if ((e.key === 'Delete' || e.key === 'Backspace') && id !== 'add') {
56
59
  setTabs(tabs.filter(item => item.id !== id));
57
60
  const model = modelRef.current;
58
61
  removeItem(id, model);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-docs",
3
- "version": "13.1.5",
3
+ "version": "13.1.7",
4
4
  "description": "Documentation components of Canvas Kit components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -45,10 +45,10 @@
45
45
  "@emotion/styled": "^11.6.0",
46
46
  "@stackblitz/sdk": "^1.11.0",
47
47
  "@storybook/csf": "0.0.1",
48
- "@workday/canvas-kit-labs-react": "^13.1.5",
49
- "@workday/canvas-kit-preview-react": "^13.1.5",
50
- "@workday/canvas-kit-react": "^13.1.5",
51
- "@workday/canvas-kit-styling": "^13.1.5",
48
+ "@workday/canvas-kit-labs-react": "^13.1.7",
49
+ "@workday/canvas-kit-preview-react": "^13.1.7",
50
+ "@workday/canvas-kit-react": "^13.1.7",
51
+ "@workday/canvas-kit-styling": "^13.1.7",
52
52
  "@workday/canvas-system-icons-web": "^3.0.0",
53
53
  "@workday/canvas-tokens-web": "^2.1.1",
54
54
  "markdown-to-jsx": "^7.2.0",
@@ -61,5 +61,5 @@
61
61
  "mkdirp": "^1.0.3",
62
62
  "typescript": "5.0"
63
63
  },
64
- "gitHead": "48b690ad1d028f0d74a81246a6b67e305bda2362"
64
+ "gitHead": "7a01b146074ec8508bfd2fc3c90c9a5183bde716"
65
65
  }