@workday/canvas-kit-react 15.0.0-alpha.0010-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/action-bar/lib/ActionBarList.js +1 -1
- package/dist/commonjs/action-bar/lib/ActionBarOverflowButton.js +1 -1
- package/dist/commonjs/avatar/lib/Avatar.js +20 -20
- package/dist/commonjs/badge/lib/CountBadge.js +6 -6
- package/dist/commonjs/banner/lib/Banner.js +5 -5
- package/dist/commonjs/banner/lib/BannerActionText.js +2 -2
- package/dist/commonjs/banner/lib/BannerIcon.js +1 -1
- package/dist/commonjs/banner/lib/BannerLabel.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsCurrentItem.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsLink.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsList.js +1 -1
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsMenu.js +2 -2
- package/dist/commonjs/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
- package/dist/commonjs/button/lib/BaseButton.js +21 -21
- package/dist/commonjs/button/lib/DeleteButton.js +1 -1
- package/dist/commonjs/button/lib/ExternalHyperlink.js +1 -1
- package/dist/commonjs/button/lib/Hyperlink.js +4 -4
- package/dist/commonjs/button/lib/PrimaryButton.js +2 -2
- package/dist/commonjs/button/lib/SecondaryButton.js +2 -2
- package/dist/commonjs/button/lib/TertiaryButton.js +17 -17
- package/dist/commonjs/button/lib/ToolbarDropdownButton.js +3 -3
- package/dist/commonjs/button/lib/ToolbarIconButton.js +1 -1
- package/dist/commonjs/card/lib/Card.js +3 -3
- package/dist/commonjs/card/lib/CardBody.js +1 -1
- package/dist/commonjs/card/lib/CardHeading.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckBackground.js +3 -3
- package/dist/commonjs/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/commonjs/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/commonjs/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/commonjs/collection/lib/ListBox.js +3 -3
- package/dist/commonjs/color-picker/lib/ColorInput.js +3 -3
- package/dist/commonjs/color-picker/lib/ColorPreview.js +1 -1
- package/dist/commonjs/color-picker/lib/parts/ColorSwatch.js +2 -2
- package/dist/commonjs/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/commonjs/common/lib/AccessibleHide.js +1 -1
- package/dist/commonjs/common/lib/CanvasProvider.js +1 -1
- package/dist/commonjs/expandable/lib/Expandable.js +1 -1
- package/dist/commonjs/expandable/lib/ExpandableAvatar.js +1 -1
- package/dist/commonjs/expandable/lib/ExpandableContent.js +1 -1
- package/dist/commonjs/expandable/lib/ExpandableIcon.js +10 -10
- package/dist/commonjs/expandable/lib/ExpandableTarget.js +1 -1
- package/dist/commonjs/expandable/lib/ExpandableTitle.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldField.js +1 -1
- package/dist/commonjs/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/commonjs/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldHint.js +3 -3
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +6 -6
- package/dist/commonjs/form-field/lib/formFieldStencil.js +8 -8
- package/dist/commonjs/icon/lib/AccentIcon.js +2 -2
- package/dist/commonjs/icon/lib/AppletIcon.js +1 -1
- package/dist/commonjs/icon/lib/Graphic.js +4 -4
- package/dist/commonjs/icon/lib/Svg.js +3 -3
- package/dist/commonjs/icon/lib/SystemIcon.js +1 -1
- package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
- package/dist/commonjs/loading-dots/lib/LoadingDots.js +3 -3
- package/dist/commonjs/menu/lib/MenuCard.js +1 -1
- package/dist/commonjs/menu/lib/MenuDivider.js +1 -1
- package/dist/commonjs/menu/lib/MenuGroup.js +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +1 -1
- package/dist/commonjs/menu/lib/MenuList.js +3 -3
- package/dist/commonjs/modal/lib/ModalBody.js +1 -1
- package/dist/commonjs/modal/lib/ModalCard.js +1 -1
- package/dist/commonjs/modal/lib/ModalHeading.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/commonjs/modal/lib/ModalOverlay.js +2 -2
- package/dist/commonjs/pagination/lib/Pagination/AdditionalDetails.js +2 -2
- package/dist/commonjs/pagination/lib/Pagination/Controls.js +2 -2
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Form.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/Label.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/GoTo/TextInput.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Nav.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/PageButton.js +2 -2
- package/dist/commonjs/pagination/lib/Pagination/PageList.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/Pagination.js +1 -1
- package/dist/commonjs/pagination/lib/Pagination/common/List.js +2 -2
- package/dist/commonjs/popup/lib/PopupBody.js +1 -1
- package/dist/commonjs/popup/lib/PopupCard.js +2 -2
- package/dist/commonjs/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/commonjs/popup/lib/PopupHeading.js +1 -1
- package/dist/commonjs/popup/lib/hooks/useDisableBodyScroll.js +1 -1
- package/dist/commonjs/segmented-control/index.d.ts +3 -0
- package/dist/commonjs/segmented-control/index.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/index.js +3 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +1316 -24
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +43 -53
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +256 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +114 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +153 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +34 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +140 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +21 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1336 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +75 -0
- package/dist/commonjs/select/lib/SelectCard.js +1 -1
- package/dist/commonjs/select/lib/SelectInput.js +3 -3
- package/dist/commonjs/skeleton/lib/Skeleton.js +2 -2
- package/dist/commonjs/skeleton/lib/parts/SkeletonHeader.js +1 -1
- package/dist/commonjs/skeleton/lib/parts/SkeletonShape.js +1 -1
- package/dist/commonjs/skeleton/lib/parts/SkeletonText.js +1 -1
- package/dist/commonjs/switch/lib/Switch.js +7 -7
- package/dist/commonjs/table/lib/BaseTable.js +1 -1
- package/dist/commonjs/table/lib/Table.js +7 -7
- package/dist/commonjs/table/lib/parts/BaseTableBody.js +1 -1
- package/dist/commonjs/table/lib/parts/BaseTableCaption.js +1 -1
- package/dist/commonjs/table/lib/parts/BaseTableCell.js +1 -1
- package/dist/commonjs/table/lib/parts/BaseTableHead.js +1 -1
- package/dist/commonjs/table/lib/parts/BaseTableHeader.js +1 -1
- package/dist/commonjs/table/lib/parts/css-grid-table/TableRow.js +1 -1
- package/dist/commonjs/tabs/lib/TabsItem.js +1 -1
- package/dist/commonjs/tabs/lib/TabsList.js +8 -8
- package/dist/commonjs/tabs/lib/TabsOverflowButton.js +1 -1
- package/dist/commonjs/text/lib/LabelText.js +6 -6
- package/dist/commonjs/text/lib/Text.js +16 -16
- package/dist/commonjs/text/lib/TypeLevelComponents.js +4 -4
- package/dist/commonjs/text-area/lib/TextArea.js +5 -5
- package/dist/commonjs/text-input/lib/InputGroup.js +6 -6
- package/dist/commonjs/text-input/lib/TextInput.js +5 -5
- package/dist/commonjs/toast/lib/Toast.js +1 -1
- package/dist/commonjs/toast/lib/ToastBody.js +1 -1
- package/dist/commonjs/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastIcon.js +1 -1
- package/dist/commonjs/toast/lib/ToastMessage.js +1 -1
- package/dist/commonjs/tooltip/lib/TooltipContainer.js +2 -2
- package/dist/commonjs/version/lib/version.js +1 -1
- package/dist/es6/action-bar/lib/ActionBarList.js +1 -1
- package/dist/es6/action-bar/lib/ActionBarOverflowButton.js +1 -1
- package/dist/es6/avatar/lib/Avatar.js +20 -20
- package/dist/es6/badge/lib/CountBadge.js +6 -6
- package/dist/es6/banner/lib/Banner.js +5 -5
- package/dist/es6/banner/lib/BannerActionText.js +2 -2
- package/dist/es6/banner/lib/BannerIcon.js +1 -1
- package/dist/es6/banner/lib/BannerLabel.js +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsCurrentItem.js +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsItem.js +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsLink.js +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsList.js +1 -1
- package/dist/es6/breadcrumbs/lib/BreadcrumbsMenu.js +2 -2
- package/dist/es6/breadcrumbs/lib/BreadcrumbsOverflowButton.js +1 -1
- package/dist/es6/button/lib/BaseButton.js +21 -21
- package/dist/es6/button/lib/DeleteButton.js +1 -1
- package/dist/es6/button/lib/ExternalHyperlink.js +1 -1
- package/dist/es6/button/lib/Hyperlink.js +4 -4
- package/dist/es6/button/lib/PrimaryButton.js +2 -2
- package/dist/es6/button/lib/SecondaryButton.js +2 -2
- package/dist/es6/button/lib/TertiaryButton.js +17 -17
- package/dist/es6/button/lib/ToolbarDropdownButton.js +3 -3
- package/dist/es6/button/lib/ToolbarIconButton.js +1 -1
- package/dist/es6/card/lib/Card.js +3 -3
- package/dist/es6/card/lib/CardBody.js +1 -1
- package/dist/es6/card/lib/CardHeading.js +1 -1
- package/dist/es6/checkbox/lib/CheckBackground.js +3 -3
- package/dist/es6/checkbox/lib/CheckboxCheck.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxContainer.js +1 -1
- package/dist/es6/checkbox/lib/CheckboxInput.js +5 -5
- package/dist/es6/checkbox/lib/CheckboxRipple.js +1 -1
- package/dist/es6/collection/lib/ListBox.js +3 -3
- package/dist/es6/color-picker/lib/ColorInput.js +3 -3
- package/dist/es6/color-picker/lib/ColorPreview.js +1 -1
- package/dist/es6/color-picker/lib/parts/ColorSwatch.js +2 -2
- package/dist/es6/combobox/lib/ComboboxMenuList.js +1 -1
- package/dist/es6/common/lib/AccessibleHide.js +1 -1
- package/dist/es6/common/lib/CanvasProvider.js +1 -1
- package/dist/es6/expandable/lib/Expandable.js +1 -1
- package/dist/es6/expandable/lib/ExpandableAvatar.js +1 -1
- package/dist/es6/expandable/lib/ExpandableContent.js +1 -1
- package/dist/es6/expandable/lib/ExpandableIcon.js +10 -10
- package/dist/es6/expandable/lib/ExpandableTarget.js +1 -1
- package/dist/es6/expandable/lib/ExpandableTitle.js +1 -1
- package/dist/es6/form-field/lib/FormFieldContainer.js +1 -1
- package/dist/es6/form-field/lib/FormFieldField.js +1 -1
- package/dist/es6/form-field/lib/FormFieldGroupLabel.js +5 -5
- package/dist/es6/form-field/lib/FormFieldGroupList.js +3 -3
- package/dist/es6/form-field/lib/FormFieldHint.js +3 -3
- package/dist/es6/form-field/lib/FormFieldLabel.js +6 -6
- package/dist/es6/form-field/lib/formFieldStencil.js +8 -8
- package/dist/es6/icon/lib/AccentIcon.js +2 -2
- package/dist/es6/icon/lib/AppletIcon.js +1 -1
- package/dist/es6/icon/lib/Graphic.js +4 -4
- package/dist/es6/icon/lib/Svg.js +3 -3
- package/dist/es6/icon/lib/SystemIcon.js +1 -1
- package/dist/es6/icon/lib/SystemIconCircle.js +1 -1
- package/dist/es6/loading-dots/lib/LoadingDots.js +3 -3
- package/dist/es6/menu/lib/MenuCard.js +1 -1
- package/dist/es6/menu/lib/MenuDivider.js +1 -1
- package/dist/es6/menu/lib/MenuGroup.js +1 -1
- package/dist/es6/menu/lib/MenuItem.js +1 -1
- package/dist/es6/menu/lib/MenuList.js +3 -3
- package/dist/es6/modal/lib/ModalBody.js +1 -1
- package/dist/es6/modal/lib/ModalCard.js +1 -1
- package/dist/es6/modal/lib/ModalHeading.js +1 -1
- package/dist/es6/modal/lib/ModalOverflowOverlay.js +1 -1
- package/dist/es6/modal/lib/ModalOverlay.js +2 -2
- package/dist/es6/pagination/lib/Pagination/AdditionalDetails.js +2 -2
- package/dist/es6/pagination/lib/Pagination/Controls.js +2 -2
- package/dist/es6/pagination/lib/Pagination/GoTo/Form.js +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/Label.js +1 -1
- package/dist/es6/pagination/lib/Pagination/GoTo/TextInput.js +1 -1
- package/dist/es6/pagination/lib/Pagination/Nav.js +1 -1
- package/dist/es6/pagination/lib/Pagination/PageButton.js +2 -2
- package/dist/es6/pagination/lib/Pagination/PageList.js +1 -1
- package/dist/es6/pagination/lib/Pagination/Pagination.js +1 -1
- package/dist/es6/pagination/lib/Pagination/common/List.js +2 -2
- package/dist/es6/popup/lib/PopupBody.js +1 -1
- package/dist/es6/popup/lib/PopupCard.js +2 -2
- package/dist/es6/popup/lib/PopupCloseIcon.js +1 -1
- package/dist/es6/popup/lib/PopupHeading.js +1 -1
- package/dist/es6/popup/lib/hooks/useDisableBodyScroll.js +1 -1
- package/dist/es6/segmented-control/index.d.ts +3 -0
- package/dist/es6/segmented-control/index.d.ts.map +1 -1
- package/dist/es6/segmented-control/index.js +3 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +1316 -24
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControl.js +45 -32
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +256 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +88 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +153 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +31 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +140 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +18 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +1336 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +69 -0
- package/dist/es6/select/lib/SelectCard.js +1 -1
- package/dist/es6/select/lib/SelectInput.js +3 -3
- package/dist/es6/skeleton/lib/Skeleton.js +2 -2
- package/dist/es6/skeleton/lib/parts/SkeletonHeader.js +1 -1
- package/dist/es6/skeleton/lib/parts/SkeletonShape.js +1 -1
- package/dist/es6/skeleton/lib/parts/SkeletonText.js +1 -1
- package/dist/es6/switch/lib/Switch.js +7 -7
- package/dist/es6/table/lib/BaseTable.js +1 -1
- package/dist/es6/table/lib/Table.js +7 -7
- package/dist/es6/table/lib/parts/BaseTableBody.js +1 -1
- package/dist/es6/table/lib/parts/BaseTableCaption.js +1 -1
- package/dist/es6/table/lib/parts/BaseTableCell.js +1 -1
- package/dist/es6/table/lib/parts/BaseTableHead.js +1 -1
- package/dist/es6/table/lib/parts/BaseTableHeader.js +1 -1
- package/dist/es6/table/lib/parts/css-grid-table/TableRow.js +1 -1
- package/dist/es6/tabs/lib/TabsItem.js +1 -1
- package/dist/es6/tabs/lib/TabsList.js +8 -8
- package/dist/es6/tabs/lib/TabsOverflowButton.js +1 -1
- package/dist/es6/text/lib/LabelText.js +6 -6
- package/dist/es6/text/lib/Text.js +16 -16
- package/dist/es6/text/lib/TypeLevelComponents.js +4 -4
- package/dist/es6/text-area/lib/TextArea.js +5 -5
- package/dist/es6/text-input/lib/InputGroup.js +6 -6
- package/dist/es6/text-input/lib/TextInput.js +5 -5
- package/dist/es6/toast/lib/Toast.js +1 -1
- package/dist/es6/toast/lib/ToastBody.js +1 -1
- package/dist/es6/toast/lib/ToastCloseIcon.js +1 -1
- package/dist/es6/toast/lib/ToastIcon.js +1 -1
- package/dist/es6/toast/lib/ToastMessage.js +1 -1
- package/dist/es6/tooltip/lib/TooltipContainer.js +2 -2
- package/dist/es6/version/lib/version.js +1 -1
- package/package.json +5 -5
- package/segmented-control/index.ts +3 -0
- package/segmented-control/lib/SegmentedControl.tsx +46 -75
- package/segmented-control/lib/SegmentedControlItem.tsx +230 -0
- package/segmented-control/lib/SegmentedControlList.tsx +64 -0
- package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +33 -0
- package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +75 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts +0 -16
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.d.ts.map +0 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlButton.js +0 -29
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts +0 -16
- package/dist/es6/segmented-control/lib/SegmentedControlButton.d.ts.map +0 -1
- package/dist/es6/segmented-control/lib/SegmentedControlButton.js +0 -26
- package/segmented-control/lib/SegmentedControlButton.tsx +0 -114
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../../../segmented-control/lib/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
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,64 +1,54 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.SegmentedControl = void 0;
|
|
27
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
const React = __importStar(require("react"));
|
|
29
5
|
const common_1 = require("@workday/canvas-kit-react/common");
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
existingOnClick(event);
|
|
34
|
-
}
|
|
35
|
-
const target = event.currentTarget;
|
|
36
|
-
if (target && onChange) {
|
|
37
|
-
if (target.value) {
|
|
38
|
-
onChange(target.value);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
onChange(index);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
6
|
+
const useSegmentedControlModel_1 = require("./hooks/useSegmentedControlModel");
|
|
7
|
+
const SegmentedControlList_1 = require("./SegmentedControlList");
|
|
8
|
+
const SegmentedControlItem_1 = require("./SegmentedControlItem");
|
|
45
9
|
/**
|
|
46
|
-
*
|
|
10
|
+
* `SegmentedControl` is a container component that is responsible for creating a
|
|
11
|
+
* {@link SegmentedControlModel} and sharing it with its subcomponents using React context. It does
|
|
12
|
+
* not represent a real element.
|
|
13
|
+
*
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <SegmentedControl items={[]}>{Child components}</SegmentedControl>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* Alternatively, you may pass in a model using the [hoisted model
|
|
19
|
+
* pattern](/getting-started/for-developers/resources/compound-components/#configuring-a-model).
|
|
20
|
+
*
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const model = useSegmentedControlModel({
|
|
23
|
+
* items: [],
|
|
24
|
+
* });
|
|
25
|
+
*
|
|
26
|
+
* <SegmentedControl model={model}>{Child components}</SegmentedControl>;
|
|
27
|
+
* ```
|
|
47
28
|
*/
|
|
48
|
-
exports.SegmentedControl = (0, common_1.
|
|
29
|
+
exports.SegmentedControl = (0, common_1.createContainer)()({
|
|
49
30
|
displayName: 'SegmentedControl',
|
|
50
|
-
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)("div", { ...elemProps, children: React.Children.map(children, (child, index) => {
|
|
52
|
-
if (typeof child.type === typeof SegmentedControlButton_1.SegmentedControlButton) {
|
|
53
|
-
return React.cloneElement(child, {
|
|
54
|
-
toggled: typeof value === 'number' ? index === value : child.props.value === value,
|
|
55
|
-
onClick: onButtonClick.bind(undefined, child.props.onClick, onChange, index),
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
return child;
|
|
59
|
-
}) }));
|
|
60
|
-
},
|
|
31
|
+
modelHook: useSegmentedControlModel_1.useSegmentedControlModel,
|
|
61
32
|
subComponents: {
|
|
62
|
-
|
|
33
|
+
/**
|
|
34
|
+
* `SegmentedControl.List` renders {@link Grid} under the hood. It is a container for
|
|
35
|
+
* {@link SegmentedControlItem SegmentedControl.Item} subcomponents.
|
|
36
|
+
*
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <SegmentedControl.List>{SegmentedControl.Items}</SegmentedControl.List>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
List: SegmentedControlList_1.SegmentedControlList,
|
|
42
|
+
/**
|
|
43
|
+
* `SegmentedControl.Item` is a `button` element built on `BaseButton`. `SegmentedControl.Item`
|
|
44
|
+
* has a `data-id` prop to handle `onSelect` properly.
|
|
45
|
+
*
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <SegmentedControl.Item data-id="table">Table</SegmentedControl.Item>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
Item: SegmentedControlItem_1.SegmentedControlItem,
|
|
63
51
|
},
|
|
52
|
+
})(({ children }) => {
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
64
54
|
});
|
|
@@ -0,0 +1,256 @@
|
|
|
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("../..").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("../..").SelectionManager;
|
|
191
|
+
navigation: import("../..").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("../..").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("../..").SelectionManager;
|
|
251
|
+
navigation: import("../..").NavigationManager;
|
|
252
|
+
getId: (item: any) => string;
|
|
253
|
+
getTextValue: (item: any) => string;
|
|
254
|
+
} | undefined;
|
|
255
|
+
}>;
|
|
256
|
+
//# sourceMappingURL=SegmentedControlItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.SegmentedControlItem = exports.segmentedControlItemStencil = void 0;
|
|
27
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
const React = __importStar(require("react"));
|
|
29
|
+
const button_1 = require("@workday/canvas-kit-react/button");
|
|
30
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
31
|
+
const canvas_kit_styling_1 = require("@workday/canvas-kit-styling");
|
|
32
|
+
const canvas_tokens_web_1 = require("@workday/canvas-tokens-web");
|
|
33
|
+
const icon_1 = require("@workday/canvas-kit-react/icon");
|
|
34
|
+
const tooltip_1 = require("@workday/canvas-kit-react/tooltip");
|
|
35
|
+
const text_1 = require("@workday/canvas-kit-react/text");
|
|
36
|
+
const useSegmentedControlModel_1 = require("./hooks/useSegmentedControlModel");
|
|
37
|
+
const useSegmentedControlItem_1 = require("./hooks/useSegmentedControlItem");
|
|
38
|
+
exports.segmentedControlItemStencil = (0, canvas_kit_styling_1.createStencil)({
|
|
39
|
+
extends: button_1.buttonStencil,
|
|
40
|
+
base: { name: "3atsas", 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);}}" },
|
|
41
|
+
modifiers: {
|
|
42
|
+
size: {
|
|
43
|
+
large: { name: "bng9t", styles: "height:var(--cnvs-sys-space-x10);gap:var(--cnvs-sys-space-x2);" },
|
|
44
|
+
medium: { name: "2dknnd", styles: "height:var(--cnvs-sys-space-x8);" },
|
|
45
|
+
small: { name: "my4b8", 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);" }
|
|
46
|
+
},
|
|
47
|
+
variant: {
|
|
48
|
+
iconOnly: { name: "3wf10r", styles: "" },
|
|
49
|
+
textOnly: { name: "46f2uo", styles: "" },
|
|
50
|
+
iconWithText: { name: "irtyo", styles: "" }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
compound: [
|
|
54
|
+
{
|
|
55
|
+
modifiers: { size: 'large', variant: 'iconOnly' },
|
|
56
|
+
styles: { name: "108c3i", styles: "min-width:var(--cnvs-sys-space-x10);" }
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
modifiers: { size: 'large', variant: 'iconWithText' },
|
|
60
|
+
styles: { name: "1x9dcg", styles: "padding-inline:1.25rem var(--cnvs-sys-space-x6);" }
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
modifiers: { size: 'large', variant: 'textOnly' },
|
|
64
|
+
styles: { name: "2imfpk", styles: "padding-inline:var(--cnvs-sys-space-x6);" }
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
modifiers: { size: 'medium', variant: 'iconOnly' },
|
|
68
|
+
styles: { name: "1jgwsz", styles: "min-width:var(--cnvs-sys-space-x8);" }
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
modifiers: { size: 'medium', variant: 'iconWithText' },
|
|
72
|
+
styles: { name: "xhbwr", styles: "padding-inline:var(--cnvs-sys-space-x4) 1.25rem;" }
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
modifiers: { size: 'medium', variant: 'textOnly' },
|
|
76
|
+
styles: { name: "wegnu", styles: "padding-inline:1.25rem;" }
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
modifiers: { size: 'small', variant: 'iconOnly' },
|
|
80
|
+
styles: { name: "2yq4c7", styles: "min-width:var(--cnvs-sys-space-x6);" }
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
modifiers: { size: 'small', variant: 'iconWithText' },
|
|
84
|
+
styles: { name: "37is28", styles: "padding-inline:var(--cnvs-sys-space-x2) var(--cnvs-sys-space-x3);" }
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
modifiers: { size: 'small', variant: 'textOnly' },
|
|
88
|
+
styles: { name: "dijw6", styles: "padding-inline:var(--cnvs-sys-space-x3);" }
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
}, "segmented-control-item-accad5");
|
|
92
|
+
const Container = ({ tooltipProps, children }) => {
|
|
93
|
+
return tooltipProps ? ((0, jsx_runtime_1.jsx)(tooltip_1.Tooltip, { ...tooltipProps, children: children })) : ((0, jsx_runtime_1.jsx)(React.Fragment, { children: children }));
|
|
94
|
+
};
|
|
95
|
+
const getVariant = (icon, children) => {
|
|
96
|
+
if (icon && children) {
|
|
97
|
+
return 'iconWithText';
|
|
98
|
+
}
|
|
99
|
+
else if (!icon && children) {
|
|
100
|
+
return 'textOnly';
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
return 'iconOnly';
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
exports.SegmentedControlItem = (0, common_1.createSubcomponent)('button')({
|
|
107
|
+
displayName: 'SegmentedControl.Item',
|
|
108
|
+
modelHook: useSegmentedControlModel_1.useSegmentedControlModel,
|
|
109
|
+
elemPropsHook: useSegmentedControlItem_1.useSegmentedControlItem,
|
|
110
|
+
})(({ children, icon, tooltipProps, ...elemProps }, Element, { state: { size } }) => {
|
|
111
|
+
const variant = getVariant(icon, children);
|
|
112
|
+
const iconSize = size === 'small' ? 'extraSmall' : 'small';
|
|
113
|
+
return ((0, jsx_runtime_1.jsx)(Container, { tooltipProps: tooltipProps, children: (0, jsx_runtime_1.jsxs)(button_1.BaseButton, { as: Element, ...(0, canvas_kit_styling_1.handleCsProp)(elemProps, (0, exports.segmentedControlItemStencil)({ size, variant })), children: [icon && (0, jsx_runtime_1.jsx)(button_1.BaseButton.Icon, { icon: icon, size: iconSize }), children && (0, jsx_runtime_1.jsx)(text_1.Text, { children: children })] }) }));
|
|
114
|
+
});
|
|
@@ -0,0 +1,153 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|