@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIzB;;;;;;;OAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;;;;;;OAOG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKL,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createContainer } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { useSegmentedControlModel } from './hooks/useSegmentedControlModel';
|
|
4
|
-
import { SegmentedControlList } from './SegmentedControlList';
|
|
5
|
-
import { SegmentedControlItem } from './SegmentedControlItem';
|
|
6
|
-
/**
|
|
7
|
-
* `SegmentedControl` is a container component that is responsible for creating a
|
|
8
|
-
* {@link SegmentedControlModel} and sharing it with its subcomponents using React context. It does
|
|
9
|
-
* not represent a real element.
|
|
10
|
-
*
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <SegmentedControl items={[]}>{Child components}</SegmentedControl>
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* Alternatively, you may pass in a model using the [hoisted model
|
|
16
|
-
* pattern](/getting-started/for-developers/resources/compound-components/#configuring-a-model).
|
|
17
|
-
*
|
|
18
|
-
* ```tsx
|
|
19
|
-
* const model = useSegmentedControlModel({
|
|
20
|
-
* items: [],
|
|
21
|
-
* });
|
|
22
|
-
*
|
|
23
|
-
* <SegmentedControl model={model}>{Child components}</SegmentedControl>;
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export const SegmentedControl = createContainer()({
|
|
27
|
-
displayName: 'SegmentedControl',
|
|
28
|
-
modelHook: useSegmentedControlModel,
|
|
29
|
-
subComponents: {
|
|
30
|
-
/**
|
|
31
|
-
* `SegmentedControl.List` renders {@link Grid} under the hood. It is a container for
|
|
32
|
-
* {@link SegmentedControlItem SegmentedControl.Item} subcomponents.
|
|
33
|
-
*
|
|
34
|
-
* ```tsx
|
|
35
|
-
* <SegmentedControl.List>{SegmentedControl.Items}</SegmentedControl.List>
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
List: SegmentedControlList,
|
|
39
|
-
/**
|
|
40
|
-
* `SegmentedControl.Item` is a `button` element built on `BaseButton`. `SegmentedControl.Item`
|
|
41
|
-
* has a `data-id` prop to handle `onSelect` properly.
|
|
42
|
-
*
|
|
43
|
-
* ```tsx
|
|
44
|
-
* <SegmentedControl.Item data-id="table">Table</SegmentedControl.Item>
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
Item: SegmentedControlItem,
|
|
48
|
-
},
|
|
49
|
-
})(({ children }) => {
|
|
50
|
-
return _jsx(_Fragment, { children: children });
|
|
51
|
-
});
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ButtonContainerProps } from '@workday/canvas-kit-react/button';
|
|
3
|
-
import { CanvasSystemIcon } from '@workday/design-assets-types';
|
|
4
|
-
import { TooltipProps } from '@workday/canvas-kit-react/tooltip';
|
|
5
|
-
export interface ItemProps extends ButtonContainerProps {
|
|
6
|
-
/**
|
|
7
|
-
* Optionally pass index to the item. This should be done if `SegmentedControl.Item` components were created
|
|
8
|
-
* via a `[Array::map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map)` function. This index will ensure keyboard navigation works even if items are
|
|
9
|
-
* inserted out of order.
|
|
10
|
-
*/
|
|
11
|
-
index?: number;
|
|
12
|
-
/**
|
|
13
|
-
* The contents of the item. This is text used as the accessible name of the button for screen readers.
|
|
14
|
-
*/
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* The identifier of the item. This identifier will be used in change events and for `initialTab`.
|
|
18
|
-
* If this property is not provided, it will default to a string representation
|
|
19
|
-
* of the the zero-based index of the item when it was initialized.
|
|
20
|
-
*/
|
|
21
|
-
'data-id'?: string;
|
|
22
|
-
/**
|
|
23
|
-
* Optional id. If not set, it will inherit the ID passed to the `SegmentedControl` component and append the
|
|
24
|
-
* index at the end. Only set this for advanced cases.
|
|
25
|
-
*/
|
|
26
|
-
id?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Part of the ARIA specification for buttons. Lets screen readers know which button is active. This
|
|
29
|
-
* should either be `true` or `false`. This is automatically set by the
|
|
30
|
-
* component and should only be used in advanced cases.
|
|
31
|
-
*/
|
|
32
|
-
'aria-pressed'?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The icon of the button.
|
|
35
|
-
*/
|
|
36
|
-
icon?: CanvasSystemIcon;
|
|
37
|
-
/**
|
|
38
|
-
* Tooltip Props
|
|
39
|
-
*/
|
|
40
|
-
tooltipProps?: Omit<TooltipProps, 'children'>;
|
|
41
|
-
}
|
|
42
|
-
export declare const segmentedControlItemStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
43
|
-
size: {
|
|
44
|
-
large: {
|
|
45
|
-
height: "--cnvs-sys-space-x10";
|
|
46
|
-
gap: "--cnvs-sys-space-x2";
|
|
47
|
-
};
|
|
48
|
-
medium: {
|
|
49
|
-
height: "--cnvs-sys-space-x8";
|
|
50
|
-
};
|
|
51
|
-
small: {
|
|
52
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
53
|
-
height: "--cnvs-sys-space-x6";
|
|
54
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
55
|
-
lineHeight: "--cnvs-sys-line-height-subtext-medium";
|
|
56
|
-
fontSize: "--cnvs-sys-font-size-subtext-medium";
|
|
57
|
-
letterSpacing: "--cnvs-base-letter-spacing-100";
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
variant: {
|
|
61
|
-
iconOnly: {};
|
|
62
|
-
textOnly: {};
|
|
63
|
-
iconWithText: {};
|
|
64
|
-
};
|
|
65
|
-
}, {}, {}, import("@workday/canvas-kit-styling").Stencil<{
|
|
66
|
-
size: {
|
|
67
|
-
large: {
|
|
68
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
69
|
-
height: "var(--cnvs-sys-size-xl, 3rem)";
|
|
70
|
-
paddingInline: "var(--cnvs-sys-padding-xxl, var(--cnvs-sys-space-x8))";
|
|
71
|
-
minWidth: "--cnvs-base-size-1400";
|
|
72
|
-
fontFamily: "--cnvs-sys-font-family-default";
|
|
73
|
-
lineHeight: "var(--cnvs-sys-line-height-body-sm, var(--cnvs-sys-line-height-body-small))";
|
|
74
|
-
fontSize: "var(--cnvs-sys-font-size-body-sm, var(--cnvs-sys-font-size-body-small))";
|
|
75
|
-
letterSpacing: "var(--cnvs-sys-letter-spacing-body-sm, var(--cnvs-base-letter-spacing-200))";
|
|
76
|
-
};
|
|
77
|
-
medium: {
|
|
78
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
79
|
-
minWidth: "--cnvs-base-size-1200";
|
|
80
|
-
paddingInline: "var(--cnvs-sys-padding-xl, var(--cnvs-sys-space-x6))";
|
|
81
|
-
height: "var(--cnvs-sys-size-lg, var(--cnvs-sys-space-x10))";
|
|
82
|
-
fontFamily: "var(--cnvs-sys-font-family-default, var(--cnvs-sys-font-family-default))";
|
|
83
|
-
lineHeight: "var(--cnvs-sys-line-height-subtext-lg, var(--cnvs-sys-line-height-subtext-large))";
|
|
84
|
-
fontSize: "var(--cnvs-sys-font-size-subtext-lg, var(--cnvs-sys-font-size-subtext-large))";
|
|
85
|
-
letterSpacing: "var(--cnvs-sys-letter-spacing-subtext-lg, var(--cnvs-base-letter-spacing-50))";
|
|
86
|
-
};
|
|
87
|
-
small: {
|
|
88
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
89
|
-
height: "var(--cnvs-sys-size-md, var(--cnvs-sys-space-x8))";
|
|
90
|
-
minWidth: "--cnvs-base-size-1000";
|
|
91
|
-
paddingInline: "var(--cnvs-sys-padding-md, var(--cnvs-sys-space-x4))";
|
|
92
|
-
gap: "var(--cnvs-sys-gap-xs, var(--cnvs-sys-space-x1))";
|
|
93
|
-
fontFamily: "var(--cnvs-sys-font-family-default, var(--cnvs-sys-font-family-default))";
|
|
94
|
-
lineHeight: "var(--cnvs-sys-line-height-subtext-lg, var(--cnvs-sys-line-height-subtext-large))";
|
|
95
|
-
fontSize: "var(--cnvs-sys-font-size-subtext-lg, var(--cnvs-sys-font-size-subtext-large))";
|
|
96
|
-
letterSpacing: "var(--cnvs-sys-letter-spacing-subtext-lg, var(--cnvs-base-letter-spacing-50))";
|
|
97
|
-
};
|
|
98
|
-
extraSmall: {
|
|
99
|
-
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
100
|
-
height: "var(--cnvs-sys-size-sm, var(--cnvs-sys-space-x6))";
|
|
101
|
-
minWidth: string;
|
|
102
|
-
paddingInline: "var(--cnvs-sys-padding-sm, var(--cnvs-sys-space-x3))";
|
|
103
|
-
gap: "var(--cnvs-sys-gap-xs, var(--cnvs-sys-space-x1))";
|
|
104
|
-
fontFamily: "var(--cnvs-sys-font-family-default, var(--cnvs-sys-font-family-default))";
|
|
105
|
-
lineHeight: "var(--cnvs-sys-line-height-subtext-md, var(--cnvs-sys-line-height-subtext-medium))";
|
|
106
|
-
fontSize: "var(--cnvs-sys-font-size-subtext-md, var(--cnvs-sys-font-size-subtext-medium))";
|
|
107
|
-
letterSpacing: "var(--cnvs-sys-letter-spacing-subtext-md, var(--cnvs-base-letter-spacing-100))";
|
|
108
|
-
};
|
|
109
|
-
};
|
|
110
|
-
grow: {
|
|
111
|
-
true: {
|
|
112
|
-
width: string;
|
|
113
|
-
maxWidth: string;
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
iconPosition: {
|
|
117
|
-
only: {
|
|
118
|
-
padding: "var(--cnvs-sys-padding-none, var(--cnvs-sys-space-zero))";
|
|
119
|
-
};
|
|
120
|
-
start: {};
|
|
121
|
-
end: {};
|
|
122
|
-
};
|
|
123
|
-
}, {}, {
|
|
124
|
-
background: string;
|
|
125
|
-
border: string;
|
|
126
|
-
boxShadowInner: string;
|
|
127
|
-
boxShadowOuter: string;
|
|
128
|
-
label: string;
|
|
129
|
-
opacity: string;
|
|
130
|
-
borderRadius: string;
|
|
131
|
-
}, never, never>, never>;
|
|
132
|
-
export declare const SegmentedControlItem: import("@workday/canvas-kit-react/common").ElementComponentM<"button", ItemProps, {
|
|
133
|
-
state: {
|
|
134
|
-
disabled: boolean;
|
|
135
|
-
size: "medium" | "small" | "large";
|
|
136
|
-
selectedIds: string[] | "all";
|
|
137
|
-
unselectedIds: string[];
|
|
138
|
-
cursorId: string | string[];
|
|
139
|
-
columnCount: number;
|
|
140
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
141
|
-
cursorIndexRef: {
|
|
142
|
-
readonly current: number;
|
|
143
|
-
};
|
|
144
|
-
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
|
|
145
|
-
UNSTABLE_defaultItemHeight: number;
|
|
146
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
147
|
-
id: string;
|
|
148
|
-
orientation: "horizontal" | "vertical";
|
|
149
|
-
indexRef: React.MutableRefObject<number>;
|
|
150
|
-
nonInteractiveIds: string[];
|
|
151
|
-
isVirtualized: boolean;
|
|
152
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
153
|
-
};
|
|
154
|
-
events: {
|
|
155
|
-
select(data: {
|
|
156
|
-
id: string;
|
|
157
|
-
}): void;
|
|
158
|
-
selectAll(): void;
|
|
159
|
-
unselectAll(): void;
|
|
160
|
-
setSelectedIds(ids: string[] | "all"): void;
|
|
161
|
-
remove(data: {
|
|
162
|
-
id: string;
|
|
163
|
-
nextId?: string | undefined;
|
|
164
|
-
event?: Event | React.SyntheticEvent<Element, Event> | undefined;
|
|
165
|
-
}): void;
|
|
166
|
-
goTo(data: {
|
|
167
|
-
id: string;
|
|
168
|
-
}): void;
|
|
169
|
-
goToNext(): void;
|
|
170
|
-
goToPrevious(): void;
|
|
171
|
-
goToPreviousRow(): void;
|
|
172
|
-
goToNextRow(): void;
|
|
173
|
-
goToFirst(): void;
|
|
174
|
-
goToLast(): void;
|
|
175
|
-
goToFirstOfRow(): void;
|
|
176
|
-
goToLastOfRow(): void;
|
|
177
|
-
goToNextPage(): void;
|
|
178
|
-
goToPreviousPage(): void;
|
|
179
|
-
registerItem(data: {
|
|
180
|
-
id: string;
|
|
181
|
-
textValue: string;
|
|
182
|
-
}): void;
|
|
183
|
-
unregisterItem(data: {
|
|
184
|
-
id: string;
|
|
185
|
-
}): void;
|
|
186
|
-
updateItemHeight(data: {
|
|
187
|
-
value: number;
|
|
188
|
-
}): void;
|
|
189
|
-
};
|
|
190
|
-
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
|
|
191
|
-
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
|
|
192
|
-
getId: (item: any) => string;
|
|
193
|
-
getTextValue: (item: any) => string;
|
|
194
|
-
UNSTABLE_parentModel: {
|
|
195
|
-
state: {
|
|
196
|
-
selectedIds: string[] | "all";
|
|
197
|
-
unselectedIds: string[];
|
|
198
|
-
cursorId: string | string[];
|
|
199
|
-
columnCount: number;
|
|
200
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
201
|
-
cursorIndexRef: {
|
|
202
|
-
readonly current: number;
|
|
203
|
-
};
|
|
204
|
-
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
|
|
205
|
-
UNSTABLE_defaultItemHeight: number;
|
|
206
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
207
|
-
id: string;
|
|
208
|
-
orientation: "horizontal" | "vertical";
|
|
209
|
-
indexRef: React.MutableRefObject<number>;
|
|
210
|
-
nonInteractiveIds: string[];
|
|
211
|
-
isVirtualized: boolean;
|
|
212
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
213
|
-
};
|
|
214
|
-
events: {
|
|
215
|
-
select(data: {
|
|
216
|
-
id: string;
|
|
217
|
-
}): void;
|
|
218
|
-
selectAll(): void;
|
|
219
|
-
unselectAll(): void;
|
|
220
|
-
setSelectedIds(ids: string[] | "all"): void;
|
|
221
|
-
remove(data: {
|
|
222
|
-
id: string;
|
|
223
|
-
nextId?: string | undefined;
|
|
224
|
-
event?: Event | React.SyntheticEvent<Element, Event> | undefined;
|
|
225
|
-
}): void;
|
|
226
|
-
goTo(data: {
|
|
227
|
-
id: string;
|
|
228
|
-
}): void;
|
|
229
|
-
goToNext(): void;
|
|
230
|
-
goToPrevious(): void;
|
|
231
|
-
goToPreviousRow(): void;
|
|
232
|
-
goToNextRow(): void;
|
|
233
|
-
goToFirst(): void;
|
|
234
|
-
goToLast(): void;
|
|
235
|
-
goToFirstOfRow(): void;
|
|
236
|
-
goToLastOfRow(): void;
|
|
237
|
-
goToNextPage(): void;
|
|
238
|
-
goToPreviousPage(): void;
|
|
239
|
-
registerItem(data: {
|
|
240
|
-
id: string;
|
|
241
|
-
textValue: string;
|
|
242
|
-
}): void;
|
|
243
|
-
unregisterItem(data: {
|
|
244
|
-
id: string;
|
|
245
|
-
}): void;
|
|
246
|
-
updateItemHeight(data: {
|
|
247
|
-
value: number;
|
|
248
|
-
}): void;
|
|
249
|
-
};
|
|
250
|
-
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
|
|
251
|
-
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
|
|
252
|
-
getId: (item: any) => string;
|
|
253
|
-
getTextValue: (item: any) => string;
|
|
254
|
-
} | undefined;
|
|
255
|
-
}>;
|
|
256
|
-
//# sourceMappingURL=SegmentedControlItem.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlItem.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAa,oBAAoB,EAAgB,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAK9D,OAAO,EAAU,YAAY,EAAC,MAAM,mCAAmC,CAAC;AAKxE,MAAM,WAAW,SAAU,SAAQ,oBAAoB;IACrD;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAsItC,CAAC;AAyBH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB/B,CAAC"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { BaseButton, buttonStencil } from '@workday/canvas-kit-react/button';
|
|
4
|
-
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
5
|
-
import { createStencil, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
6
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
7
|
-
import { systemIconStencil } from '@workday/canvas-kit-react/icon';
|
|
8
|
-
import { Tooltip } from '@workday/canvas-kit-react/tooltip';
|
|
9
|
-
import { Text } from '@workday/canvas-kit-react/text';
|
|
10
|
-
import { useSegmentedControlModel } from './hooks/useSegmentedControlModel';
|
|
11
|
-
import { useSegmentedControlItem } from './hooks/useSegmentedControlItem';
|
|
12
|
-
export const segmentedControlItemStencil = createStencil({
|
|
13
|
-
extends: buttonStencil,
|
|
14
|
-
base: { name: "20d23", 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-f6d2bd:var(--cnvs-sys-shape-x1);--label-button-f6d2bd:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);&:hover, &.hover{--background-button-f6d2bd:var(--cnvs-sys-color-bg-alt-strong);--label-button-f6d2bd:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);}&:active, &.active{--background-button-f6d2bd:var(--cnvs-sys-color-bg-alt-strong);--label-button-f6d2bd:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);}&:focus-visible, &.focus{--label-button-f6d2bd:var(--cnvs-sys-color-fg-muted-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-muted-strong);}&:disabled, &.disabled{--background-button-f6d2bd:var(--cnvs-sys-color-bg-alt-soft);}&[aria-pressed='true']{--background-button-f6d2bd:var(--cnvs-sys-color-bg-default);--border-button-f6d2bd:var(--cnvs-sys-color-border-input-default);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-strong);--label-button-f6d2bd:var(--cnvs-sys-color-fg-strong);&:hover, &.hover{--color-system-icon-3a4847:var(--cnvs-sys-color-fg-strong);--label-button-f6d2bd:var(--cnvs-sys-color-fg-strong);}&:disabled, &.disabled{--border-button-f6d2bd:var(--cnvs-sys-color-border-input-default);--label-button-f6d2bd:var(--cnvs-sys-color-fg-strong);--color-system-icon-3a4847:var(--cnvs-sys-color-fg-strong);}}:dir(rtl){svg{transform:scaleX(-1);}}" },
|
|
15
|
-
modifiers: {
|
|
16
|
-
size: {
|
|
17
|
-
large: { name: "1sin8t", styles: "height:var(--cnvs-sys-space-x10);gap:var(--cnvs-sys-space-x2);" },
|
|
18
|
-
medium: { name: "1v6j6e", styles: "height:var(--cnvs-sys-space-x8);" },
|
|
19
|
-
small: { name: "27htgd", 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);" }
|
|
20
|
-
},
|
|
21
|
-
variant: {
|
|
22
|
-
iconOnly: { name: "s83x2", styles: "" },
|
|
23
|
-
textOnly: { name: "1az9gt", styles: "" },
|
|
24
|
-
iconWithText: { name: "psdjn", styles: "" }
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
compound: [
|
|
28
|
-
{
|
|
29
|
-
modifiers: { size: 'large', variant: 'iconOnly' },
|
|
30
|
-
styles: { name: "bwc4z", styles: "min-width:var(--cnvs-sys-space-x10);" }
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
modifiers: { size: 'large', variant: 'iconWithText' },
|
|
34
|
-
styles: { name: "11fn7r", styles: "padding-inline:1.25rem var(--cnvs-sys-space-x6);" }
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
modifiers: { size: 'large', variant: 'textOnly' },
|
|
38
|
-
styles: { name: "3pr8f5", styles: "padding-inline:var(--cnvs-sys-space-x6);" }
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
modifiers: { size: 'medium', variant: 'iconOnly' },
|
|
42
|
-
styles: { name: "1rc7hf", styles: "min-width:var(--cnvs-sys-space-x8);" }
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
modifiers: { size: 'medium', variant: 'iconWithText' },
|
|
46
|
-
styles: { name: "26kdn1", styles: "padding-inline:var(--cnvs-sys-space-x4) 1.25rem;" }
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
modifiers: { size: 'medium', variant: 'textOnly' },
|
|
50
|
-
styles: { name: "1051y1", styles: "padding-inline:1.25rem;" }
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
modifiers: { size: 'small', variant: 'iconOnly' },
|
|
54
|
-
styles: { name: "2rwd91", styles: "min-width:var(--cnvs-sys-space-x6);" }
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
modifiers: { size: 'small', variant: 'iconWithText' },
|
|
58
|
-
styles: { name: "1vc9r4", styles: "padding-inline:var(--cnvs-sys-space-x2) var(--cnvs-sys-space-x3);" }
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
modifiers: { size: 'small', variant: 'textOnly' },
|
|
62
|
-
styles: { name: "vuvwr", styles: "padding-inline:var(--cnvs-sys-space-x3);" }
|
|
63
|
-
}
|
|
64
|
-
]
|
|
65
|
-
}, "segmented-control-item-bc271f");
|
|
66
|
-
const Container = ({ tooltipProps, children }) => {
|
|
67
|
-
return tooltipProps ? (_jsx(Tooltip, { ...tooltipProps, children: children })) : (_jsx(React.Fragment, { children: children }));
|
|
68
|
-
};
|
|
69
|
-
const getVariant = (icon, children) => {
|
|
70
|
-
if (icon && children) {
|
|
71
|
-
return 'iconWithText';
|
|
72
|
-
}
|
|
73
|
-
else if (!icon && children) {
|
|
74
|
-
return 'textOnly';
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
return 'iconOnly';
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
export const SegmentedControlItem = createSubcomponent('button')({
|
|
81
|
-
displayName: 'SegmentedControl.Item',
|
|
82
|
-
modelHook: useSegmentedControlModel,
|
|
83
|
-
elemPropsHook: useSegmentedControlItem,
|
|
84
|
-
})(({ children, icon, tooltipProps, ...elemProps }, Element, { state: { size } }) => {
|
|
85
|
-
const variant = getVariant(icon, children);
|
|
86
|
-
const iconSize = size === 'small' ? 'extraSmall' : 'small';
|
|
87
|
-
return (_jsx(Container, { tooltipProps: tooltipProps, children: _jsxs(BaseButton, { as: Element, ...handleCsProp(elemProps, segmentedControlItemStencil({ size, variant })), children: [icon && _jsx(BaseButton.Icon, { icon: icon, size: iconSize }), children && _jsx(Text, { children: children })] }) }));
|
|
88
|
-
});
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ExtractProps } from '@workday/canvas-kit-react/common';
|
|
3
|
-
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
4
|
-
export interface SegmentedControlListProps<T = any> extends Omit<Partial<ExtractProps<typeof Grid, never>>, 'children'> {
|
|
5
|
-
'aria-label': string;
|
|
6
|
-
children: ((item: T) => React.ReactNode) | React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
export declare const segmentedControlListStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
9
|
-
disabled: {
|
|
10
|
-
true: {
|
|
11
|
-
opacity: "--cnvs-sys-opacity-disabled";
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
orientation: {
|
|
15
|
-
vertical: ({ items }: {
|
|
16
|
-
items: `--${string}`;
|
|
17
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
18
|
-
gridTemplateRows: string;
|
|
19
|
-
};
|
|
20
|
-
horizontal: ({ items }: {
|
|
21
|
-
items: `--${string}`;
|
|
22
|
-
} & import("@workday/canvas-kit-styling").StencilVarsParts<{}>) => {
|
|
23
|
-
gridTemplateColumns: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
}, {}, {
|
|
27
|
-
items: string;
|
|
28
|
-
}, never, never>;
|
|
29
|
-
export declare const SegmentedControlList: import("@workday/canvas-kit-react/common").ElementComponentM<"div", SegmentedControlListProps<any>, {
|
|
30
|
-
state: {
|
|
31
|
-
disabled: boolean;
|
|
32
|
-
size: "medium" | "small" | "large";
|
|
33
|
-
selectedIds: string[] | "all";
|
|
34
|
-
unselectedIds: string[];
|
|
35
|
-
cursorId: string | string[];
|
|
36
|
-
columnCount: number;
|
|
37
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
38
|
-
cursorIndexRef: {
|
|
39
|
-
readonly current: number;
|
|
40
|
-
};
|
|
41
|
-
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
|
|
42
|
-
UNSTABLE_defaultItemHeight: number;
|
|
43
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
44
|
-
id: string;
|
|
45
|
-
orientation: "horizontal" | "vertical";
|
|
46
|
-
indexRef: React.MutableRefObject<number>;
|
|
47
|
-
nonInteractiveIds: string[];
|
|
48
|
-
isVirtualized: boolean;
|
|
49
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
50
|
-
};
|
|
51
|
-
events: {
|
|
52
|
-
select(data: {
|
|
53
|
-
id: string;
|
|
54
|
-
}): void;
|
|
55
|
-
selectAll(): void;
|
|
56
|
-
unselectAll(): void;
|
|
57
|
-
setSelectedIds(ids: string[] | "all"): void;
|
|
58
|
-
remove(data: {
|
|
59
|
-
id: string;
|
|
60
|
-
nextId?: string | undefined;
|
|
61
|
-
event?: Event | React.SyntheticEvent<Element, Event> | undefined;
|
|
62
|
-
}): void;
|
|
63
|
-
goTo(data: {
|
|
64
|
-
id: string;
|
|
65
|
-
}): void;
|
|
66
|
-
goToNext(): void;
|
|
67
|
-
goToPrevious(): void;
|
|
68
|
-
goToPreviousRow(): void;
|
|
69
|
-
goToNextRow(): void;
|
|
70
|
-
goToFirst(): void;
|
|
71
|
-
goToLast(): void;
|
|
72
|
-
goToFirstOfRow(): void;
|
|
73
|
-
goToLastOfRow(): void;
|
|
74
|
-
goToNextPage(): void;
|
|
75
|
-
goToPreviousPage(): void;
|
|
76
|
-
registerItem(data: {
|
|
77
|
-
id: string;
|
|
78
|
-
textValue: string;
|
|
79
|
-
}): void;
|
|
80
|
-
unregisterItem(data: {
|
|
81
|
-
id: string;
|
|
82
|
-
}): void;
|
|
83
|
-
updateItemHeight(data: {
|
|
84
|
-
value: number;
|
|
85
|
-
}): void;
|
|
86
|
-
};
|
|
87
|
-
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
|
|
88
|
-
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
|
|
89
|
-
getId: (item: any) => string;
|
|
90
|
-
getTextValue: (item: any) => string;
|
|
91
|
-
UNSTABLE_parentModel: {
|
|
92
|
-
state: {
|
|
93
|
-
selectedIds: string[] | "all";
|
|
94
|
-
unselectedIds: string[];
|
|
95
|
-
cursorId: string | string[];
|
|
96
|
-
columnCount: number;
|
|
97
|
-
pageSizeRef: React.MutableRefObject<number>;
|
|
98
|
-
cursorIndexRef: {
|
|
99
|
-
readonly current: number;
|
|
100
|
-
};
|
|
101
|
-
UNSTABLE_virtual: import("@tanstack/virtual-core").Virtualizer<HTMLDivElement, Element>;
|
|
102
|
-
UNSTABLE_defaultItemHeight: number;
|
|
103
|
-
containerRef: React.RefObject<HTMLDivElement>;
|
|
104
|
-
id: string;
|
|
105
|
-
orientation: "horizontal" | "vertical";
|
|
106
|
-
indexRef: React.MutableRefObject<number>;
|
|
107
|
-
nonInteractiveIds: string[];
|
|
108
|
-
isVirtualized: boolean;
|
|
109
|
-
items: import("@workday/canvas-kit-react/collection").Item<any>[];
|
|
110
|
-
};
|
|
111
|
-
events: {
|
|
112
|
-
select(data: {
|
|
113
|
-
id: string;
|
|
114
|
-
}): void;
|
|
115
|
-
selectAll(): void;
|
|
116
|
-
unselectAll(): void;
|
|
117
|
-
setSelectedIds(ids: string[] | "all"): void;
|
|
118
|
-
remove(data: {
|
|
119
|
-
id: string;
|
|
120
|
-
nextId?: string | undefined;
|
|
121
|
-
event?: Event | React.SyntheticEvent<Element, Event> | undefined;
|
|
122
|
-
}): void;
|
|
123
|
-
goTo(data: {
|
|
124
|
-
id: string;
|
|
125
|
-
}): void;
|
|
126
|
-
goToNext(): void;
|
|
127
|
-
goToPrevious(): void;
|
|
128
|
-
goToPreviousRow(): void;
|
|
129
|
-
goToNextRow(): void;
|
|
130
|
-
goToFirst(): void;
|
|
131
|
-
goToLast(): void;
|
|
132
|
-
goToFirstOfRow(): void;
|
|
133
|
-
goToLastOfRow(): void;
|
|
134
|
-
goToNextPage(): void;
|
|
135
|
-
goToPreviousPage(): void;
|
|
136
|
-
registerItem(data: {
|
|
137
|
-
id: string;
|
|
138
|
-
textValue: string;
|
|
139
|
-
}): void;
|
|
140
|
-
unregisterItem(data: {
|
|
141
|
-
id: string;
|
|
142
|
-
}): void;
|
|
143
|
-
updateItemHeight(data: {
|
|
144
|
-
value: number;
|
|
145
|
-
}): void;
|
|
146
|
-
};
|
|
147
|
-
selection: import("@workday/canvas-kit-react/collection").SelectionManager;
|
|
148
|
-
navigation: import("@workday/canvas-kit-react/collection").NavigationManager;
|
|
149
|
-
getId: (item: any) => string;
|
|
150
|
-
getTextValue: (item: any) => string;
|
|
151
|
-
} | undefined;
|
|
152
|
-
}>;
|
|
153
|
-
//# sourceMappingURL=SegmentedControlList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlList.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControlList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAqB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAC,IAAI,EAAC,MAAM,kCAAkC,CAAC;AAKtD,MAAM,WAAW,yBAAyB,CAAC,CAAC,GAAG,GAAG,CAChD,SAAQ,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,OAAO,IAAI,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC;IACnE,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;gBA2BtC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB/B,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createStencil, handleCsProp, px2rem } from '@workday/canvas-kit-styling';
|
|
3
|
-
import { createSubcomponent } from '@workday/canvas-kit-react/common';
|
|
4
|
-
import { system } from '@workday/canvas-tokens-web';
|
|
5
|
-
import { useSegmentedControlModel } from './hooks/useSegmentedControlModel';
|
|
6
|
-
import { useListRenderItems } from '@workday/canvas-kit-react/collection';
|
|
7
|
-
export const segmentedControlListStencil = createStencil({
|
|
8
|
-
vars: {
|
|
9
|
-
items: '',
|
|
10
|
-
},
|
|
11
|
-
base: { name: "4cpmnj", 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);" },
|
|
12
|
-
modifiers: {
|
|
13
|
-
disabled: {
|
|
14
|
-
true: { name: "12d36n", styles: "opacity:var(--cnvs-sys-opacity-disabled);" }
|
|
15
|
-
},
|
|
16
|
-
orientation: {
|
|
17
|
-
vertical: { name: "1o9xbs", styles: "grid-template-rows:repeat(var(--items-segmented-control-list-0a747c), 1fr);" },
|
|
18
|
-
horizontal: { name: "3upbf9", styles: "grid-template-columns:repeat(var(--items-segmented-control-list-0a747c), 1fr);" }
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}, "segmented-control-list-0a747c");
|
|
22
|
-
export const SegmentedControlList = createSubcomponent('div')({
|
|
23
|
-
displayName: 'SegmentedControl.List',
|
|
24
|
-
modelHook: useSegmentedControlModel,
|
|
25
|
-
})(({ children, ...elemProps }, Element, model) => {
|
|
26
|
-
return (_jsx(Element, { role: "group", ...handleCsProp(elemProps, segmentedControlListStencil({
|
|
27
|
-
disabled: model.state.disabled,
|
|
28
|
-
items: `${model.state.items.length}`,
|
|
29
|
-
orientation: model.state.orientation,
|
|
30
|
-
})), children: useListRenderItems(model, children) }));
|
|
31
|
-
});
|