@workday/canvas-kit-preview-react 15.0.0-alpha.0008-next.0 → 15.0.0-alpha.0023-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/avatar/lib/Avatar.js +13 -13
- package/dist/commonjs/avatar/lib/AvatarImage.js +1 -1
- package/dist/commonjs/avatar/lib/AvatarName.js +1 -1
- package/dist/commonjs/avatar/lib/BaseAvatar.js +12 -12
- package/dist/commonjs/color-picker/lib/ColorPicker.js +1 -1
- package/dist/commonjs/color-picker/lib/parts/ColorReset.js +1 -1
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +1 -1
- package/dist/commonjs/divider/lib/Divider.js +1 -1
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +0 -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/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 +15 -15
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +1 -1
- package/dist/commonjs/version/lib/version.js +1 -1
- package/dist/es6/avatar/lib/Avatar.js +13 -13
- package/dist/es6/avatar/lib/AvatarImage.js +1 -1
- package/dist/es6/avatar/lib/AvatarName.js +1 -1
- package/dist/es6/avatar/lib/BaseAvatar.js +12 -12
- package/dist/es6/color-picker/lib/ColorPicker.js +1 -1
- package/dist/es6/color-picker/lib/parts/ColorReset.js +1 -1
- package/dist/es6/color-picker/lib/parts/SwatchBook.js +1 -1
- package/dist/es6/divider/lib/Divider.js +1 -1
- package/dist/es6/index.d.ts +0 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +0 -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/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 +15 -15
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +1 -1
- package/dist/es6/version/lib/version.js +1 -1
- package/index.ts +0 -1
- package/package.json +4 -4
- package/dist/commonjs/segmented-control/index.d.ts +0 -5
- package/dist/commonjs/segmented-control/index.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/index.js +0 -20
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +0 -1324
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +0 -54
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +0 -256
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +0 -114
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +0 -153
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +0 -34
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +0 -140
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +0 -21
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +0 -1336
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +0 -75
- package/dist/es6/segmented-control/index.d.ts +0 -5
- package/dist/es6/segmented-control/index.d.ts.map +0 -1
- package/dist/es6/segmented-control/index.js +0 -4
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +0 -1324
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/SegmentedControl.js +0 -51
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +0 -256
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +0 -88
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +0 -153
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +0 -31
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +0 -140
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +0 -18
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +0 -1336
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +0 -69
- package/segmented-control/index.ts +0 -4
- package/segmented-control/lib/SegmentedControl.tsx +0 -57
- package/segmented-control/lib/SegmentedControlItem.tsx +0 -230
- package/segmented-control/lib/SegmentedControlList.tsx +0 -64
- package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +0 -33
- package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +0 -75
- package/segmented-control/package.json +0 -6
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const useSegmentedControlItem: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
3
|
-
state: {
|
|
4
|
-
selectedIds: string[] | "all";
|
|
5
|
-
unselectedIds: string[];
|
|
6
|
-
cursorId: string | string[];
|
|
7
|
-
columnCount: number;
|
|
8
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
9
|
-
cursorIndexRef: {
|
|
10
|
-
readonly current: number;
|
|
11
|
-
};
|
|
12
|
-
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
|
|
13
|
-
UNSTABLE_defaultItemHeight: number;
|
|
14
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
15
|
-
id: string;
|
|
16
|
-
orientation: "horizontal" | "vertical";
|
|
17
|
-
indexRef: React.MutableRefObject<number>;
|
|
18
|
-
nonInteractiveIds: string[];
|
|
19
|
-
isVirtualized: boolean;
|
|
20
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
21
|
-
};
|
|
22
|
-
events: {
|
|
23
|
-
select(data: {
|
|
24
|
-
id: string;
|
|
25
|
-
}): void;
|
|
26
|
-
selectAll(): void;
|
|
27
|
-
unselectAll(): void;
|
|
28
|
-
setSelectedIds(ids: string[] | "all"): void;
|
|
29
|
-
remove(data: {
|
|
30
|
-
id: string;
|
|
31
|
-
nextId?: string | undefined;
|
|
32
|
-
event?: Event | React.SyntheticEvent<Element, Event> | undefined;
|
|
33
|
-
}): void;
|
|
34
|
-
goTo(data: {
|
|
35
|
-
id: string;
|
|
36
|
-
}): void;
|
|
37
|
-
goToNext(): void;
|
|
38
|
-
goToPrevious(): void;
|
|
39
|
-
goToPreviousRow(): void;
|
|
40
|
-
goToNextRow(): void;
|
|
41
|
-
goToFirst(): void;
|
|
42
|
-
goToLast(): void;
|
|
43
|
-
goToFirstOfRow(): void;
|
|
44
|
-
goToLastOfRow(): void;
|
|
45
|
-
goToNextPage(): void;
|
|
46
|
-
goToPreviousPage(): void;
|
|
47
|
-
registerItem(data: {
|
|
48
|
-
id: string;
|
|
49
|
-
textValue: string;
|
|
50
|
-
}): void;
|
|
51
|
-
unregisterItem(data: {
|
|
52
|
-
id: string;
|
|
53
|
-
}): void;
|
|
54
|
-
updateItemHeight(data: {
|
|
55
|
-
value: number;
|
|
56
|
-
}): void;
|
|
57
|
-
};
|
|
58
|
-
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
|
|
59
|
-
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
|
|
60
|
-
getId: (item: any) => string;
|
|
61
|
-
getTextValue: (item: any) => string;
|
|
62
|
-
UNSTABLE_parentModel: {
|
|
63
|
-
state: {
|
|
64
|
-
selectedIds: string[] | "all";
|
|
65
|
-
unselectedIds: string[];
|
|
66
|
-
cursorId: string | string[];
|
|
67
|
-
columnCount: number;
|
|
68
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
69
|
-
cursorIndexRef: {
|
|
70
|
-
readonly current: number;
|
|
71
|
-
};
|
|
72
|
-
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
|
|
73
|
-
UNSTABLE_defaultItemHeight: number;
|
|
74
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
75
|
-
id: string;
|
|
76
|
-
orientation: "horizontal" | "vertical";
|
|
77
|
-
indexRef: React.MutableRefObject<number>;
|
|
78
|
-
nonInteractiveIds: string[];
|
|
79
|
-
isVirtualized: boolean;
|
|
80
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
81
|
-
};
|
|
82
|
-
events: {
|
|
83
|
-
select(data: {
|
|
84
|
-
id: string;
|
|
85
|
-
}): void;
|
|
86
|
-
selectAll(): void;
|
|
87
|
-
unselectAll(): void;
|
|
88
|
-
setSelectedIds(ids: string[] | "all"): void;
|
|
89
|
-
remove(data: {
|
|
90
|
-
id: string;
|
|
91
|
-
nextId?: string | undefined;
|
|
92
|
-
event?: Event | React.SyntheticEvent<Element, Event> | undefined;
|
|
93
|
-
}): void;
|
|
94
|
-
goTo(data: {
|
|
95
|
-
id: string;
|
|
96
|
-
}): void;
|
|
97
|
-
goToNext(): void;
|
|
98
|
-
goToPrevious(): void;
|
|
99
|
-
goToPreviousRow(): void;
|
|
100
|
-
goToNextRow(): void;
|
|
101
|
-
goToFirst(): void;
|
|
102
|
-
goToLast(): void;
|
|
103
|
-
goToFirstOfRow(): void;
|
|
104
|
-
goToLastOfRow(): void;
|
|
105
|
-
goToNextPage(): void;
|
|
106
|
-
goToPreviousPage(): void;
|
|
107
|
-
registerItem(data: {
|
|
108
|
-
id: string;
|
|
109
|
-
textValue: string;
|
|
110
|
-
}): void;
|
|
111
|
-
unregisterItem(data: {
|
|
112
|
-
id: string;
|
|
113
|
-
}): void;
|
|
114
|
-
updateItemHeight(data: {
|
|
115
|
-
value: number;
|
|
116
|
-
}): void;
|
|
117
|
-
};
|
|
118
|
-
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
|
|
119
|
-
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
|
|
120
|
-
getId: (item: any) => string;
|
|
121
|
-
getTextValue: (item: any) => string;
|
|
122
|
-
} | undefined;
|
|
123
|
-
}, import("@workday/canvas-kit-react/common").RemoveNulls<import("@workday/canvas-kit-react/common").MergeProps<{
|
|
124
|
-
readonly onClick: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;
|
|
125
|
-
}, import("@workday/canvas-kit-react/common").MergeProps<{
|
|
126
|
-
readonly id: `${string}-${string}`;
|
|
127
|
-
readonly 'aria-pressed': boolean;
|
|
128
|
-
}, import("@workday/canvas-kit-react/common").MergeProps<{
|
|
129
|
-
readonly ref: (instance: Element | null | undefined) => void;
|
|
130
|
-
readonly 'data-id': string;
|
|
131
|
-
readonly disabled: true | undefined;
|
|
132
|
-
readonly 'aria-setsize': number | undefined;
|
|
133
|
-
readonly 'aria-posinset': number | undefined;
|
|
134
|
-
readonly 'data-index': number | undefined;
|
|
135
|
-
readonly style: React.CSSProperties;
|
|
136
|
-
readonly id: string;
|
|
137
|
-
}, import("@workday/canvas-kit-react/common").MergeProps<{
|
|
138
|
-
readonly disabled: true | undefined;
|
|
139
|
-
}, import("@workday/canvas-kit-react/common").MergeProps<{}, import("@workday/canvas-kit-react/common").MergeProps<{}, {}>>>>>>>>;
|
|
140
|
-
//# sourceMappingURL=useSegmentedControlItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useSegmentedControlItem.d.ts","sourceRoot":"","sources":["../../../../../segmented-control/lib/hooks/useSegmentedControlItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iIAsBnC,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useSegmentedControlItem = void 0;
|
|
4
|
-
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
-
const collection_1 = require("@workday/canvas-kit-react/collection");
|
|
6
|
-
const useSegmentedControlModel_1 = require("./useSegmentedControlModel");
|
|
7
|
-
exports.useSegmentedControlItem = (0, common_1.composeHooks)(collection_1.useListItemSelect, (0, common_1.createElemPropsHook)(useSegmentedControlModel_1.useSegmentedControlModel)((model, _, elemProps = {}) => {
|
|
8
|
-
const name = elemProps['data-id'] || '';
|
|
9
|
-
const selected = !!name && (0, collection_1.isSelected)(name, model.state);
|
|
10
|
-
return {
|
|
11
|
-
id: `${model.state.id}-${name}`,
|
|
12
|
-
'aria-pressed': selected,
|
|
13
|
-
};
|
|
14
|
-
}), collection_1.useListItemRegister, (0, common_1.createElemPropsHook)(useSegmentedControlModel_1.useSegmentedControlModel)(({ state }) => {
|
|
15
|
-
return {
|
|
16
|
-
// override the default disabled functionality of `useListItemRegister`
|
|
17
|
-
// it shouldn't allow to set disabled state only for one button
|
|
18
|
-
// state prop will disable the whole container
|
|
19
|
-
disabled: state.disabled ? true : undefined,
|
|
20
|
-
};
|
|
21
|
-
}));
|