@workday/canvas-kit-preview-react 7.1.5 → 7.2.0-427-next.2
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/color-picker/README.md +1 -1
- package/color-picker/index.ts +1 -1
- package/color-picker/lib/ColorPicker.tsx +3 -4
- package/dist/commonjs/color-picker/index.d.ts +1 -1
- package/dist/commonjs/color-picker/index.d.ts.map +1 -1
- package/dist/commonjs/color-picker/index.js +2 -6
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts +1 -2
- package/dist/commonjs/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +28 -50
- package/dist/commonjs/color-picker/lib/parts/ColorReset.js +32 -23
- package/dist/commonjs/color-picker/lib/parts/SwatchBook.js +26 -39
- package/dist/commonjs/form-field/lib/FormField.d.ts +4 -19
- package/dist/commonjs/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormField.js +10 -33
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldHint.js +8 -32
- package/dist/commonjs/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/commonjs/form-field/lib/FormFieldInput.js +6 -17
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts +2 -8
- package/dist/commonjs/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/FormFieldLabel.js +10 -39
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldHint.js +4 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldInput.js +5 -6
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldLabel.js +4 -5
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldModel.js +9 -19
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
- package/dist/commonjs/form-field/lib/hooks/useFormFieldOrientation.js +5 -5
- package/dist/commonjs/index.d.ts +2 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +2 -2
- package/dist/commonjs/menu/index.d.ts +1 -4
- package/dist/commonjs/menu/index.d.ts.map +1 -1
- package/dist/commonjs/menu/index.js +1 -9
- package/dist/commonjs/menu/lib/Menu.d.ts +44 -13
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +127 -130
- package/dist/commonjs/menu/lib/MenuItem.d.ts +45 -14
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +118 -106
- package/dist/commonjs/pill/lib/Pill.d.ts +101 -13
- package/dist/commonjs/pill/lib/Pill.d.ts.map +1 -1
- package/dist/commonjs/pill/lib/Pill.js +158 -64
- package/dist/commonjs/pill/lib/PillAvatar.js +6 -17
- package/dist/commonjs/pill/lib/PillCount.js +7 -30
- package/dist/commonjs/pill/lib/PillIcon.js +8 -31
- package/dist/commonjs/pill/lib/PillIconButton.js +13 -36
- package/dist/commonjs/pill/lib/PillLabel.js +10 -33
- package/dist/commonjs/pill/lib/usePillModel.js +8 -16
- package/dist/commonjs/segmented-control/index.d.ts +5 -0
- package/dist/commonjs/segmented-control/index.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/index.js +18 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +1189 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +57 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +107 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +105 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +135 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +41 -0
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +79 -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 +1202 -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/index.d.ts +0 -3
- package/dist/commonjs/select/index.d.ts.map +1 -1
- package/dist/commonjs/select/index.js +0 -7
- package/dist/commonjs/select/lib/Select.d.ts +0 -1
- package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
- package/dist/commonjs/select/lib/Select.js +147 -191
- package/dist/commonjs/select/lib/SelectBase.d.ts +2 -2
- package/dist/commonjs/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectBase.js +109 -107
- package/dist/commonjs/select/lib/SelectMenu.d.ts +2 -2
- package/dist/commonjs/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectMenu.js +55 -86
- package/dist/commonjs/select/lib/SelectOption.d.ts +1 -2
- package/dist/commonjs/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/commonjs/select/lib/SelectOption.js +35 -48
- package/dist/commonjs/select/lib/scrolling.js +6 -7
- package/dist/commonjs/select/lib/utils.js +4 -4
- package/dist/commonjs/side-panel/index.d.ts +0 -3
- package/dist/commonjs/side-panel/index.d.ts.map +1 -1
- package/dist/commonjs/side-panel/index.js +0 -7
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +13 -27
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/SidePanel.js +95 -133
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
- package/dist/commonjs/side-panel/lib/SidePanelToggleButton.js +65 -0
- package/dist/commonjs/side-panel/lib/hooks.d.ts +20 -0
- package/dist/commonjs/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/commonjs/side-panel/lib/hooks.js +40 -21
- package/dist/commonjs/status-indicator/index.d.ts +4 -0
- package/dist/commonjs/status-indicator/index.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/index.js +17 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +66 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +57 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +83 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +86 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +15 -0
- package/dist/commonjs/status-indicator/lib/hooks/index.d.ts +2 -0
- package/dist/commonjs/status-indicator/lib/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/{breadcrumbs → status-indicator/lib/hooks}/index.js +1 -5
- package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
- package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
- package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.js +25 -0
- package/dist/commonjs/table/index.d.ts +2 -0
- package/dist/commonjs/table/index.d.ts.map +1 -0
- package/dist/commonjs/{text-area/lib/hooks → table}/index.js +1 -1
- package/dist/commonjs/table/lib/Table.d.ts +207 -0
- package/dist/commonjs/table/lib/Table.d.ts.map +1 -0
- package/dist/commonjs/table/lib/Table.js +229 -0
- package/dist/commonjs/table/lib/TableBody.d.ts +2 -0
- package/dist/commonjs/table/lib/TableBody.d.ts.map +1 -0
- package/dist/commonjs/table/lib/TableBody.js +35 -0
- package/dist/commonjs/table/lib/TableCaption.d.ts +2 -0
- package/dist/commonjs/table/lib/TableCaption.d.ts.map +1 -0
- package/dist/commonjs/table/lib/TableCaption.js +16 -0
- package/dist/commonjs/table/lib/TableCell.d.ts +2 -0
- package/dist/commonjs/table/lib/TableCell.d.ts.map +1 -0
- package/dist/commonjs/table/lib/TableCell.js +16 -0
- package/dist/commonjs/table/lib/TableFooter.d.ts +2 -0
- package/dist/commonjs/table/lib/TableFooter.d.ts.map +1 -0
- package/dist/commonjs/table/lib/TableFooter.js +15 -0
- package/dist/commonjs/table/lib/TableHead.d.ts +2 -0
- package/dist/commonjs/table/lib/TableHead.d.ts.map +1 -0
- package/dist/commonjs/table/lib/TableHead.js +23 -0
- package/dist/commonjs/table/lib/TableHeader.d.ts +2 -0
- package/dist/commonjs/table/lib/TableHeader.d.ts.map +1 -0
- package/dist/commonjs/table/lib/TableHeader.js +16 -0
- package/dist/commonjs/table/lib/TableRow.d.ts +2 -0
- package/dist/commonjs/table/lib/TableRow.d.ts.map +1 -0
- package/dist/commonjs/table/lib/TableRow.js +19 -0
- package/dist/commonjs/text-area/lib/TextArea.d.ts +3 -12
- package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextArea.js +9 -33
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts +2 -2
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.js +25 -41
- package/dist/commonjs/text-input/lib/TextInput.d.ts +5 -14
- package/dist/commonjs/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInput.js +9 -33
- package/dist/commonjs/text-input/lib/TextInputField.d.ts +2 -2
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +25 -30
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts +3 -5
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputField.js +3 -3
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/hooks/useTextInputModel.js +2 -1
- package/dist/es6/color-picker/index.d.ts +1 -1
- package/dist/es6/color-picker/index.d.ts.map +1 -1
- package/dist/es6/color-picker/index.js +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.d.ts +1 -2
- package/dist/es6/color-picker/lib/ColorPicker.d.ts.map +1 -1
- package/dist/es6/color-picker/lib/ColorPicker.js +17 -41
- package/dist/es6/color-picker/lib/parts/ColorReset.js +27 -18
- package/dist/es6/color-picker/lib/parts/SwatchBook.js +21 -34
- package/dist/es6/form-field/lib/FormField.d.ts +4 -19
- package/dist/es6/form-field/lib/FormField.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormField.js +5 -28
- package/dist/es6/form-field/lib/FormFieldHint.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldHint.js +7 -31
- package/dist/es6/form-field/lib/FormFieldInput.d.ts +1 -1
- package/dist/es6/form-field/lib/FormFieldInput.js +3 -14
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts +2 -8
- package/dist/es6/form-field/lib/FormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/FormFieldLabel.js +9 -38
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts +3 -5
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldHint.js +2 -3
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts +3 -5
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldInput.js +3 -4
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts +3 -5
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldLabel.js +2 -3
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts +2 -12
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldModel.js +9 -19
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts +4 -4
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.d.ts.map +1 -1
- package/dist/es6/form-field/lib/hooks/useFormFieldOrientation.js +4 -4
- package/dist/es6/index.d.ts +2 -1
- package/dist/es6/index.d.ts.map +1 -1
- package/dist/es6/index.js +2 -2
- package/dist/es6/menu/index.d.ts +1 -4
- package/dist/es6/menu/index.d.ts.map +1 -1
- package/dist/es6/menu/index.js +1 -4
- package/dist/es6/menu/lib/Menu.d.ts +44 -13
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +120 -125
- package/dist/es6/menu/lib/MenuItem.d.ts +45 -14
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.js +112 -102
- package/dist/es6/pill/lib/Pill.d.ts +107 -19
- package/dist/es6/pill/lib/Pill.d.ts.map +1 -1
- package/dist/es6/pill/lib/Pill.js +149 -55
- package/dist/es6/pill/lib/PillAvatar.d.ts +1 -2
- package/dist/es6/pill/lib/PillAvatar.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillAvatar.js +3 -14
- package/dist/es6/pill/lib/PillCount.js +4 -27
- package/dist/es6/pill/lib/PillIcon.d.ts +1 -2
- package/dist/es6/pill/lib/PillIcon.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillIcon.js +3 -26
- package/dist/es6/pill/lib/PillIconButton.d.ts +1 -2
- package/dist/es6/pill/lib/PillIconButton.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillIconButton.js +7 -30
- package/dist/es6/pill/lib/PillLabel.d.ts +1 -2
- package/dist/es6/pill/lib/PillLabel.d.ts.map +1 -1
- package/dist/es6/pill/lib/PillLabel.js +5 -28
- package/dist/es6/pill/lib/usePillModel.d.ts +5 -5
- package/dist/es6/pill/lib/usePillModel.js +8 -16
- package/dist/es6/segmented-control/index.d.ts +5 -0
- package/dist/es6/segmented-control/index.d.ts.map +1 -0
- package/dist/es6/segmented-control/index.js +4 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +1189 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.js +51 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +107 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +83 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +135 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -0
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +19 -0
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +79 -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 +1202 -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/index.d.ts +0 -3
- package/dist/es6/select/index.d.ts.map +1 -1
- package/dist/es6/select/index.js +0 -3
- package/dist/es6/select/lib/Select.d.ts +0 -1
- package/dist/es6/select/lib/Select.d.ts.map +1 -1
- package/dist/es6/select/lib/Select.js +145 -186
- package/dist/es6/select/lib/SelectBase.d.ts +2 -2
- package/dist/es6/select/lib/SelectBase.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectBase.js +101 -97
- package/dist/es6/select/lib/SelectMenu.d.ts +2 -2
- package/dist/es6/select/lib/SelectMenu.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectMenu.js +49 -81
- package/dist/es6/select/lib/SelectOption.d.ts +1 -2
- package/dist/es6/select/lib/SelectOption.d.ts.map +1 -1
- package/dist/es6/select/lib/SelectOption.js +30 -45
- package/dist/es6/select/lib/scrolling.js +6 -7
- package/dist/es6/select/lib/utils.js +4 -4
- package/dist/es6/side-panel/index.d.ts +0 -3
- package/dist/es6/side-panel/index.d.ts.map +1 -1
- package/dist/es6/side-panel/index.js +0 -3
- package/dist/es6/side-panel/lib/SidePanel.d.ts +13 -27
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +93 -131
- package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts +17 -0
- package/dist/es6/side-panel/lib/SidePanelToggleButton.d.ts.map +1 -0
- package/dist/es6/side-panel/lib/SidePanelToggleButton.js +43 -0
- package/dist/es6/side-panel/lib/hooks.d.ts +20 -0
- package/dist/es6/side-panel/lib/hooks.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/hooks.js +37 -18
- package/dist/es6/status-indicator/index.d.ts +4 -0
- package/dist/es6/status-indicator/index.d.ts.map +1 -0
- package/dist/es6/status-indicator/index.js +3 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +66 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.js +51 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +83 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +80 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts +5 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +9 -0
- package/dist/es6/status-indicator/lib/hooks/index.d.ts +2 -0
- package/dist/es6/status-indicator/lib/hooks/index.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/hooks/index.js +1 -0
- package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts +75 -0
- package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.d.ts.map +1 -0
- package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.js +22 -0
- package/dist/es6/table/index.d.ts +2 -0
- package/dist/es6/table/index.d.ts.map +1 -0
- package/dist/es6/table/index.js +1 -0
- package/dist/es6/table/lib/Table.d.ts +207 -0
- package/dist/es6/table/lib/Table.d.ts.map +1 -0
- package/dist/es6/table/lib/Table.js +223 -0
- package/dist/es6/table/lib/TableBody.d.ts +2 -0
- package/dist/es6/table/lib/TableBody.d.ts.map +1 -0
- package/dist/es6/table/lib/TableBody.js +29 -0
- package/dist/es6/table/lib/TableCaption.d.ts +2 -0
- package/dist/es6/table/lib/TableCaption.d.ts.map +1 -0
- package/dist/es6/table/lib/TableCaption.js +10 -0
- package/dist/es6/table/lib/TableCell.d.ts +2 -0
- package/dist/es6/table/lib/TableCell.d.ts.map +1 -0
- package/dist/es6/table/lib/TableCell.js +10 -0
- package/dist/es6/table/lib/TableFooter.d.ts +2 -0
- package/dist/es6/table/lib/TableFooter.d.ts.map +1 -0
- package/dist/es6/table/lib/TableFooter.js +9 -0
- package/dist/es6/table/lib/TableHead.d.ts +2 -0
- package/dist/es6/table/lib/TableHead.d.ts.map +1 -0
- package/dist/es6/table/lib/TableHead.js +17 -0
- package/dist/es6/table/lib/TableHeader.d.ts +2 -0
- package/dist/es6/table/lib/TableHeader.d.ts.map +1 -0
- package/dist/es6/table/lib/TableHeader.js +10 -0
- package/dist/es6/table/lib/TableRow.d.ts +2 -0
- package/dist/es6/table/lib/TableRow.d.ts.map +1 -0
- package/dist/es6/table/lib/TableRow.js +13 -0
- package/dist/es6/text-area/lib/TextArea.d.ts +3 -12
- package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextArea.js +7 -31
- package/dist/es6/text-area/lib/TextAreaField.d.ts +2 -2
- package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextAreaField.js +22 -38
- package/dist/es6/text-input/lib/TextInput.d.ts +5 -14
- package/dist/es6/text-input/lib/TextInput.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInput.js +7 -31
- package/dist/es6/text-input/lib/TextInputField.d.ts +2 -2
- package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInputField.js +24 -29
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts +3 -5
- package/dist/es6/text-input/lib/hooks/useTextInputField.d.ts.map +1 -1
- package/dist/es6/text-input/lib/hooks/useTextInputField.js +1 -1
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts +1 -0
- package/dist/es6/text-input/lib/hooks/useTextInputModel.d.ts.map +1 -1
- package/dist/es6/text-input/lib/hooks/useTextInputModel.js +2 -1
- package/form-field/lib/FormField.tsx +5 -10
- package/form-field/lib/FormFieldHint.tsx +23 -30
- package/form-field/lib/FormFieldLabel.tsx +18 -33
- package/form-field/lib/hooks/useFormFieldModel.tsx +1 -3
- package/form-field/lib/hooks/useFormFieldOrientation.tsx +6 -6
- package/index.ts +2 -3
- package/menu/index.ts +1 -6
- package/menu/lib/Menu.tsx +81 -27
- package/menu/lib/MenuItem.tsx +63 -19
- package/package.json +6 -6
- package/pill/lib/Pill.tsx +109 -10
- package/pill/lib/PillCount.tsx +1 -1
- package/pill/lib/PillIcon.tsx +1 -1
- package/segmented-control/LICENSE +126 -0
- package/segmented-control/README.md +6 -0
- package/segmented-control/index.ts +4 -0
- package/segmented-control/lib/SegmentedControl.tsx +57 -0
- package/segmented-control/lib/SegmentedControlItem.tsx +175 -0
- package/segmented-control/lib/SegmentedControlList.tsx +49 -0
- package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +33 -0
- package/segmented-control/lib/hooks/useSegmentedControlModel.tsx +75 -0
- package/segmented-control/package.json +6 -0
- package/select/README.md +7 -7
- package/select/index.ts +0 -4
- package/select/lib/Select.tsx +1 -3
- package/select/lib/SelectBase.tsx +3 -5
- package/select/lib/SelectMenu.tsx +1 -3
- package/select/lib/SelectOption.tsx +1 -3
- package/side-panel/index.ts +0 -4
- package/side-panel/lib/SidePanel.tsx +119 -170
- package/side-panel/lib/SidePanelToggleButton.tsx +78 -0
- package/side-panel/lib/hooks.ts +20 -0
- package/status-indicator/LICENSE +52 -0
- package/status-indicator/README.md +12 -0
- package/status-indicator/index.ts +3 -0
- package/status-indicator/lib/StatusIndicator.tsx +75 -0
- package/status-indicator/lib/StatusIndicatorIcon.tsx +88 -0
- package/status-indicator/lib/StatusIndicatorLabel.tsx +28 -0
- package/status-indicator/lib/hooks/index.ts +1 -0
- package/status-indicator/lib/hooks/useStatusIndicatorModel.tsx +29 -0
- package/status-indicator/package.json +6 -0
- package/{breadcrumbs → table}/LICENSE +0 -1
- package/table/README.md +5 -0
- package/table/index.ts +1 -0
- package/table/lib/Table.tsx +236 -0
- package/table/lib/TableBody.tsx +35 -0
- package/table/lib/TableCaption.tsx +22 -0
- package/table/lib/TableCell.tsx +27 -0
- package/table/lib/TableFooter.tsx +14 -0
- package/table/lib/TableHead.tsx +23 -0
- package/table/lib/TableHeader.tsx +28 -0
- package/table/lib/TableRow.tsx +26 -0
- package/table/package.json +6 -0
- package/text-area/lib/TextArea.tsx +9 -6
- package/text-area/lib/TextAreaField.tsx +7 -3
- package/text-input/lib/TextInput.tsx +9 -6
- package/text-input/lib/TextInputField.tsx +10 -6
- package/text-input/lib/hooks/useTextInputModel.ts +1 -0
- package/breadcrumbs/README.md +0 -7
- package/breadcrumbs/index.ts +0 -5
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.tsx +0 -85
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.tsx +0 -152
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.tsx +0 -63
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.ts +0 -109
- package/breadcrumbs/lib/Breadcrumbs/Dropdown/index.tsx +0 -38
- package/breadcrumbs/lib/Breadcrumbs/List/Collapsible.tsx +0 -66
- package/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.tsx +0 -64
- package/breadcrumbs/lib/Breadcrumbs/List/Link.tsx +0 -88
- package/breadcrumbs/lib/Breadcrumbs/List/ListItem.tsx +0 -30
- package/breadcrumbs/lib/Breadcrumbs/List/hooks.ts +0 -114
- package/breadcrumbs/lib/Breadcrumbs/List/index.tsx +0 -28
- package/breadcrumbs/lib/Breadcrumbs/List/styles.ts +0 -12
- package/breadcrumbs/lib/Breadcrumbs/Nav.tsx +0 -14
- package/breadcrumbs/lib/Breadcrumbs/hooks.ts +0 -13
- package/breadcrumbs/lib/Breadcrumbs/index.tsx +0 -15
- package/breadcrumbs/lib/Breadcrumbs/types.ts +0 -7
- package/breadcrumbs/package.json +0 -6
- package/dist/commonjs/breadcrumbs/index.d.ts +0 -5
- package/dist/commonjs/breadcrumbs/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -69
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -94
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -73
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -77
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -37
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -78
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -49
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -66
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -43
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -116
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -38
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -16
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -34
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -12
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/index.js +0 -17
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
- package/dist/commonjs/breadcrumbs/lib/Breadcrumbs/types.js +0 -2
- package/dist/commonjs/text-area/lib/hooks/index.d.ts +0 -2
- package/dist/commonjs/text-area/lib/hooks/index.d.ts.map +0 -1
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
- package/dist/commonjs/text-area/lib/hooks/useTextAreaModel.js +0 -5
- package/dist/es6/breadcrumbs/index.d.ts +0 -5
- package/dist/es6/breadcrumbs/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/index.js +0 -4
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts +0 -20
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Button.js +0 -63
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts +0 -38
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/Menu.js +0 -87
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts +0 -14
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/MenuItemLink.js +0 -51
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts +0 -13
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/hooks.js +0 -72
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts +0 -8
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Dropdown/index.js +0 -30
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts +0 -16
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Collapsible.js +0 -55
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts +0 -11
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/CurrentItem.js +0 -42
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts +0 -19
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/Link.js +0 -59
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts +0 -4
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/ListItem.js +0 -36
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts +0 -19
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/hooks.js +0 -91
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts +0 -4
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/index.js +0 -32
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts +0 -3
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/List/styles.js +0 -12
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts +0 -11
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/Nav.js +0 -27
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts +0 -5
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/hooks.js +0 -8
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts +0 -9
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/index.js +0 -14
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts +0 -8
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.d.ts.map +0 -1
- package/dist/es6/breadcrumbs/lib/Breadcrumbs/types.js +0 -1
- package/dist/es6/text-area/lib/hooks/index.d.ts +0 -2
- package/dist/es6/text-area/lib/hooks/index.d.ts.map +0 -1
- package/dist/es6/text-area/lib/hooks/index.js +0 -1
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts +0 -28
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.d.ts.map +0 -1
- package/dist/es6/text-area/lib/hooks/useTextAreaModel.js +0 -2
- package/text-area/lib/hooks/index.ts +0 -1
- package/text-area/lib/hooks/useTextAreaModel.ts +0 -3
|
@@ -1,28 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
6
|
exports.FormFieldInput = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
9
|
+
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
10
|
+
const hooks_1 = require("./hooks");
|
|
22
11
|
exports.FormFieldInput = common_1.createSubcomponent('input')({
|
|
23
12
|
displayName: 'FormField.Input',
|
|
24
13
|
modelHook: hooks_1.useFormFieldModel,
|
|
25
14
|
elemPropsHook: hooks_1.useFormFieldInput,
|
|
26
|
-
})(
|
|
27
|
-
return react_1.default.createElement(layout_1.Box,
|
|
15
|
+
})((elemProps, Element) => {
|
|
16
|
+
return react_1.default.createElement(layout_1.Box, Object.assign({ as: Element }, elemProps));
|
|
28
17
|
});
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export interface FormFieldLabelProps extends Omit<ExtractProps<typeof HStack, never>, 'spacing'> {
|
|
2
|
+
import { FlexProps } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
export interface FormFieldLabelProps extends FlexProps {
|
|
5
4
|
/**
|
|
6
5
|
* The text of the label.
|
|
7
6
|
*/
|
|
8
7
|
children: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* When the input is required, this is spacing between label and asterisk.
|
|
11
|
-
* @default xxxs
|
|
12
|
-
*/
|
|
13
|
-
spacing?: StackSpacing;
|
|
14
8
|
}
|
|
15
9
|
export declare const FormFieldLabel: import("@workday/canvas-kit-react/common").ElementComponentM<"label", FormFieldLabelProps, {
|
|
16
10
|
state: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../form-field/lib/FormFieldLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAO,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAIjE,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,cAAc;;;;;;;EAyBzB,CAAC"}
|
|
@@ -1,50 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
4
|
};
|
|
27
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
6
|
exports.FormFieldLabel = void 0;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var StyledFormFieldLabel = common_1.styled('span')(__assign(__assign({}, tokens_1.type.levels.subtext.large), { fontWeight: tokens_1.type.properties.fontWeights.medium }));
|
|
35
|
-
var StyledAsterisk = common_1.styled(layout_1.Box)({
|
|
36
|
-
fontSize: tokens_1.type.properties.fontSizes[20],
|
|
37
|
-
fontWeight: tokens_1.type.properties.fontWeights.regular,
|
|
38
|
-
textDecoration: 'unset',
|
|
39
|
-
});
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
9
|
+
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
10
|
+
const text_1 = require("@workday/canvas-kit-react/text");
|
|
11
|
+
const hooks_1 = require("./hooks");
|
|
40
12
|
exports.FormFieldLabel = common_1.createSubcomponent('label')({
|
|
41
13
|
displayName: 'FormField.Label',
|
|
42
14
|
modelHook: hooks_1.useFormFieldModel,
|
|
43
15
|
elemPropsHook: hooks_1.useFormFieldLabel,
|
|
44
|
-
})(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
react_1.default.createElement(
|
|
49
|
-
model.state.isRequired && (react_1.default.createElement(StyledAsterisk, { as: "span", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
|
|
16
|
+
})(({ gap = 'xxxs', children, ...elemProps }, Element, model) => {
|
|
17
|
+
const theme = common_1.useTheme();
|
|
18
|
+
return (react_1.default.createElement(layout_1.Flex, Object.assign({ as: Element, gap: gap, minWidth: "180px" }, elemProps),
|
|
19
|
+
react_1.default.createElement(text_1.LabelText, { as: "span", fontWeight: "medium" }, children),
|
|
20
|
+
model.state.isRequired && (react_1.default.createElement(text_1.Text, { fontSize: 20, fontWeight: "regular", textDecoration: "unset", color: theme.canvas.palette.error.main, "aria-hidden": "true" }, "*"))));
|
|
50
21
|
});
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* Adds the necessary props to a `Hint` component.
|
|
3
3
|
* Used by the FormField.Hint subcomponent and other input type components
|
|
4
4
|
*/
|
|
5
|
-
export declare const useFormFieldHint: <
|
|
5
|
+
export declare const useFormFieldHint: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
6
6
|
state: {
|
|
7
7
|
id: string;
|
|
8
8
|
hasError: boolean;
|
|
9
9
|
isRequired: boolean;
|
|
10
10
|
};
|
|
11
11
|
events: {};
|
|
12
|
-
},
|
|
12
|
+
}, {
|
|
13
13
|
id: string;
|
|
14
|
-
}
|
|
15
|
-
ref: import("react").Ref<R>;
|
|
16
|
-
} : {});
|
|
14
|
+
}>;
|
|
17
15
|
//# sourceMappingURL=useFormFieldHint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldHint.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldHint.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"useFormFieldHint.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldHint.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;EAI3B,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormFieldHint = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
const useFormFieldModel_1 = require("./useFormFieldModel");
|
|
6
6
|
/**
|
|
7
7
|
* Adds the necessary props to a `Hint` component.
|
|
8
8
|
* Used by the FormField.Hint subcomponent and other input type components
|
|
9
9
|
*/
|
|
10
|
-
exports.useFormFieldHint = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(
|
|
11
|
-
var state = _a.state;
|
|
10
|
+
exports.useFormFieldHint = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(({ state }) => {
|
|
12
11
|
return {
|
|
13
|
-
id:
|
|
12
|
+
id: `hint-${state.id}`,
|
|
14
13
|
};
|
|
15
14
|
});
|
|
@@ -2,19 +2,17 @@
|
|
|
2
2
|
* Adds the necessary props to an `Input` component.
|
|
3
3
|
* Used by the FormField.Input subcomponent and other input type components
|
|
4
4
|
*/
|
|
5
|
-
export declare const useFormFieldInput: <
|
|
5
|
+
export declare const useFormFieldInput: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
6
6
|
state: {
|
|
7
7
|
id: string;
|
|
8
8
|
hasError: boolean;
|
|
9
9
|
isRequired: boolean;
|
|
10
10
|
};
|
|
11
11
|
events: {};
|
|
12
|
-
},
|
|
12
|
+
}, {
|
|
13
13
|
required: boolean | undefined;
|
|
14
14
|
'aria-invalid': boolean | undefined;
|
|
15
15
|
'aria-describedby': string;
|
|
16
16
|
id: string;
|
|
17
|
-
}
|
|
18
|
-
ref: import("react").Ref<R>;
|
|
19
|
-
} : {});
|
|
17
|
+
}>;
|
|
20
18
|
//# sourceMappingURL=useFormFieldInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"useFormFieldInput.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldInput.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAO5B,CAAC"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormFieldInput = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
const useFormFieldModel_1 = require("./useFormFieldModel");
|
|
6
6
|
/**
|
|
7
7
|
* Adds the necessary props to an `Input` component.
|
|
8
8
|
* Used by the FormField.Input subcomponent and other input type components
|
|
9
9
|
*/
|
|
10
|
-
exports.useFormFieldInput = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(
|
|
11
|
-
var state = _a.state;
|
|
10
|
+
exports.useFormFieldInput = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(({ state }) => {
|
|
12
11
|
return {
|
|
13
12
|
required: state.isRequired ? true : undefined,
|
|
14
13
|
'aria-invalid': state.hasError ? true : undefined,
|
|
15
|
-
'aria-describedby':
|
|
16
|
-
id:
|
|
14
|
+
'aria-describedby': `hint-${state.id}`,
|
|
15
|
+
id: `input-${state.id}`,
|
|
17
16
|
};
|
|
18
17
|
});
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
* Adds the necessary props to a `Label` component.
|
|
3
3
|
* Used by the FormField.Label subcomponent and other input type components
|
|
4
4
|
*/
|
|
5
|
-
export declare const useFormFieldLabel: <
|
|
5
|
+
export declare const useFormFieldLabel: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
6
6
|
state: {
|
|
7
7
|
id: string;
|
|
8
8
|
hasError: boolean;
|
|
9
9
|
isRequired: boolean;
|
|
10
10
|
};
|
|
11
11
|
events: {};
|
|
12
|
-
},
|
|
12
|
+
}, {
|
|
13
13
|
htmlFor: string;
|
|
14
|
-
}
|
|
15
|
-
ref: import("react").Ref<R>;
|
|
16
|
-
} : {});
|
|
14
|
+
}>;
|
|
17
15
|
//# sourceMappingURL=useFormFieldLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"useFormFieldLabel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldLabel.tsx"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;EAI5B,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormFieldLabel = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
5
|
+
const useFormFieldModel_1 = require("./useFormFieldModel");
|
|
6
6
|
/**
|
|
7
7
|
* Adds the necessary props to a `Label` component.
|
|
8
8
|
* Used by the FormField.Label subcomponent and other input type components
|
|
9
9
|
*/
|
|
10
|
-
exports.useFormFieldLabel = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(
|
|
11
|
-
var state = _a.state;
|
|
10
|
+
exports.useFormFieldLabel = common_1.createElemPropsHook(useFormFieldModel_1.useFormFieldModel)(({ state }) => {
|
|
12
11
|
return {
|
|
13
|
-
htmlFor:
|
|
12
|
+
htmlFor: `input-${state.id}`,
|
|
14
13
|
};
|
|
15
14
|
});
|
|
@@ -2,7 +2,6 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
2
2
|
/**
|
|
3
3
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
4
4
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
5
|
-
* @default false
|
|
6
5
|
*/
|
|
7
6
|
hasError: boolean;
|
|
8
7
|
/**
|
|
@@ -13,13 +12,12 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
13
12
|
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
14
13
|
*
|
|
15
14
|
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
16
|
-
* @default
|
|
15
|
+
* @default {useUniqueId}
|
|
17
16
|
*/
|
|
18
17
|
id: string;
|
|
19
18
|
/**
|
|
20
19
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
21
20
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
22
|
-
* @default false
|
|
23
21
|
*/
|
|
24
22
|
isRequired: boolean;
|
|
25
23
|
}> & {} & {}) | undefined) => {
|
|
@@ -28,13 +26,11 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
28
26
|
/**
|
|
29
27
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
30
28
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
31
|
-
* @default false
|
|
32
29
|
*/
|
|
33
30
|
hasError: boolean;
|
|
34
31
|
/**
|
|
35
32
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
36
33
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
37
|
-
* @default false
|
|
38
34
|
*/
|
|
39
35
|
isRequired: boolean;
|
|
40
36
|
};
|
|
@@ -43,7 +39,6 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
43
39
|
/**
|
|
44
40
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
45
41
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
46
|
-
* @default false
|
|
47
42
|
*/
|
|
48
43
|
hasError: boolean;
|
|
49
44
|
/**
|
|
@@ -54,13 +49,12 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
54
49
|
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
55
50
|
*
|
|
56
51
|
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
57
|
-
* @default
|
|
52
|
+
* @default {useUniqueId}
|
|
58
53
|
*/
|
|
59
54
|
id: string;
|
|
60
55
|
/**
|
|
61
56
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
62
57
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
63
|
-
* @default false
|
|
64
58
|
*/
|
|
65
59
|
isRequired: boolean;
|
|
66
60
|
}, {}, {
|
|
@@ -68,13 +62,11 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
68
62
|
/**
|
|
69
63
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
70
64
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
71
|
-
* @default false
|
|
72
65
|
*/
|
|
73
66
|
hasError: boolean;
|
|
74
67
|
/**
|
|
75
68
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
76
69
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
77
|
-
* @default false
|
|
78
70
|
*/
|
|
79
71
|
isRequired: boolean;
|
|
80
72
|
}, {}, {
|
|
@@ -83,13 +75,11 @@ export declare const useFormFieldModel: (<TT_Special_Generic>(config?: (Partial<
|
|
|
83
75
|
/**
|
|
84
76
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
85
77
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
86
|
-
* @default false
|
|
87
78
|
*/
|
|
88
79
|
hasError: boolean;
|
|
89
80
|
/**
|
|
90
81
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
91
82
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
92
|
-
* @default false
|
|
93
83
|
*/
|
|
94
84
|
isRequired: boolean;
|
|
95
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;IAE1B
|
|
1
|
+
{"version":3,"file":"useFormFieldModel.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldModel.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;IAE1B;;;OAGG;;IAEH;;;;;;;;;OASG;;IAEH;;;OAGG;;;;;QAnBH;;;WAGG;;QAaH;;;WAGG;;;;;IAnBH;;;OAGG;;IAEH;;;;;;;;;OASG;;IAEH;;;OAGG;;;;IAnBH;;;OAGG;;IAaH;;;OAGG;;;;;QAnBH;;;WAGG;;QAaH;;;WAGG;;;;EAeL,CAAC"}
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
3
|
exports.useFormFieldModel = void 0;
|
|
15
|
-
|
|
4
|
+
const common_1 = require("@workday/canvas-kit-react/common");
|
|
16
5
|
exports.useFormFieldModel = common_1.createModelHook({
|
|
17
6
|
defaultConfig: {
|
|
18
7
|
/**
|
|
19
8
|
* Optional flag to denote if this field has an error to display. When true the `FormField.Input` will have
|
|
20
9
|
* `required` set to true, and usually some subcomponents will have a error color applied.
|
|
21
|
-
* @default false
|
|
22
10
|
*/
|
|
23
11
|
hasError: false,
|
|
24
12
|
/**
|
|
@@ -29,21 +17,23 @@ exports.useFormFieldModel = common_1.createModelHook({
|
|
|
29
17
|
* - `FormField.Hint` will set `id` to `hint-${id}`
|
|
30
18
|
*
|
|
31
19
|
* If a value is not provided, a unique id will be automatically created by `useUniqueId()`.
|
|
32
|
-
* @default
|
|
20
|
+
* @default {useUniqueId}
|
|
33
21
|
*/
|
|
34
22
|
id: '',
|
|
35
23
|
/**
|
|
36
24
|
* Optional flag to denote if this field is required. When true the `FormField.Input` will have
|
|
37
25
|
* `required` set to true, and an asterisk will be appended to the `FormField.Label`.
|
|
38
|
-
* @default false
|
|
39
26
|
*/
|
|
40
27
|
isRequired: false,
|
|
41
28
|
},
|
|
42
|
-
})(
|
|
43
|
-
|
|
44
|
-
|
|
29
|
+
})(config => {
|
|
30
|
+
const id = common_1.useUniqueId(config.id);
|
|
31
|
+
const state = {
|
|
32
|
+
...config,
|
|
33
|
+
id,
|
|
34
|
+
};
|
|
45
35
|
return {
|
|
46
|
-
state
|
|
36
|
+
state,
|
|
47
37
|
events: {},
|
|
48
38
|
};
|
|
49
39
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FlexProps } from '@workday/canvas-kit-react/layout';
|
|
2
2
|
/**
|
|
3
3
|
* Adds the necessary layout props to a `FormField` component.
|
|
4
4
|
*/
|
|
5
5
|
export declare const useFormFieldOrientation: (orientation: 'horizontal' | 'vertical') => {
|
|
6
|
-
flexDirection:
|
|
7
|
-
alignItems:
|
|
8
|
-
|
|
6
|
+
flexDirection: FlexProps['flexDirection'];
|
|
7
|
+
alignItems: FlexProps['alignItems'];
|
|
8
|
+
gap: FlexProps['gap'];
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=useFormFieldOrientation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"useFormFieldOrientation.d.ts","sourceRoot":"","sources":["../../../../../form-field/lib/hooks/useFormFieldOrientation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,kCAAkC,CAAC;AAG3D;;GAEG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,YAAY,GAAG,UAAU;mBAE3D,SAAS,CAAC,eAAe,CAAC;gBAC7B,SAAS,CAAC,YAAY,CAAC;SAC9B,SAAS,CAAC,KAAK,CAAC;CAkBxB,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useFormFieldOrientation = void 0;
|
|
4
|
-
|
|
4
|
+
const tokens_1 = require("@workday/canvas-kit-react/tokens");
|
|
5
5
|
/**
|
|
6
6
|
* Adds the necessary layout props to a `FormField` component.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const useFormFieldOrientation = (orientation) => {
|
|
9
|
+
let layoutProps;
|
|
10
10
|
if (orientation === 'horizontal') {
|
|
11
11
|
layoutProps = {
|
|
12
12
|
flexDirection: 'row',
|
|
13
|
-
|
|
13
|
+
gap: tokens_1.space.l,
|
|
14
14
|
alignItems: 'center',
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
else {
|
|
18
18
|
layoutProps = {
|
|
19
19
|
flexDirection: 'column',
|
|
20
|
-
|
|
20
|
+
gap: tokens_1.space.xxxs,
|
|
21
21
|
alignItems: 'flex-start',
|
|
22
22
|
};
|
|
23
23
|
}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export * from './breadcrumbs';
|
|
2
1
|
export * from './color-picker';
|
|
3
2
|
export * from './form-field';
|
|
4
3
|
export * from './menu';
|
|
5
4
|
export * from './pill';
|
|
5
|
+
export * from './segmented-control';
|
|
6
6
|
export * from './select';
|
|
7
7
|
export * from './side-panel';
|
|
8
|
+
export * from './status-indicator';
|
|
8
9
|
export * from './text-area';
|
|
9
10
|
export * from './text-input';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC"}
|
package/dist/commonjs/index.js
CHANGED
|
@@ -10,13 +10,13 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./breadcrumbs"), exports);
|
|
14
13
|
__exportStar(require("./color-picker"), exports);
|
|
15
14
|
__exportStar(require("./form-field"), exports);
|
|
16
15
|
__exportStar(require("./menu"), exports);
|
|
17
16
|
__exportStar(require("./pill"), exports);
|
|
17
|
+
__exportStar(require("./segmented-control"), exports);
|
|
18
18
|
__exportStar(require("./select"), exports);
|
|
19
19
|
__exportStar(require("./side-panel"), exports);
|
|
20
|
+
__exportStar(require("./status-indicator"), exports);
|
|
20
21
|
__exportStar(require("./text-area"), exports);
|
|
21
22
|
__exportStar(require("./text-input"), exports);
|
|
22
|
-
/// <reference types="@types/node" />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../menu/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC"}
|
|
@@ -9,14 +9,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
9
9
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
10
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
11
|
};
|
|
12
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
13
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
|
-
};
|
|
15
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
|
|
17
|
-
var Menu_1 = __importDefault(require("./lib/Menu"));
|
|
18
|
-
exports.Menu = Menu_1.default;
|
|
19
|
-
var MenuItem_1 = __importDefault(require("./lib/MenuItem"));
|
|
20
|
-
exports.MenuItem = MenuItem_1.default;
|
|
21
|
-
exports.default = Menu_1.default;
|
|
13
|
+
__exportStar(require("./lib/Menu"), exports);
|
|
22
14
|
__exportStar(require("./lib/MenuItem"), exports);
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DeprecatedMenuItemProps } from './MenuItem';
|
|
3
3
|
import { GrowthBehavior } from '@workday/canvas-kit-react/common';
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* ### Deprecated Menu
|
|
6
|
+
*
|
|
7
|
+
* As of Canvas Kit v8, Menu is being deprecated.
|
|
8
|
+
* It will be removed in v10. Please see the
|
|
9
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
10
|
+
* for more information.
|
|
11
|
+
*/
|
|
12
|
+
export interface DeprecatedMenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLUListElement> {
|
|
5
13
|
/**
|
|
6
|
-
* The
|
|
14
|
+
* The DeprecatedMenuItem children of the DeprecatedMenu (must be at least one). Also accepts other components which share the same interface as `DeprecatedMenuItem`.
|
|
7
15
|
*/
|
|
8
|
-
children?: React.ReactElement<
|
|
16
|
+
children?: React.ReactElement<DeprecatedMenuItemProps> | React.ReactElement<DeprecatedMenuItemProps>[];
|
|
9
17
|
/**
|
|
10
|
-
* If true, set the
|
|
18
|
+
* If true, set the DeprecatedMenu to the open state. Useful for showing and hiding the DeprecatedMenu from a parent component such as a menu button.
|
|
11
19
|
* @default true
|
|
12
20
|
*/
|
|
13
21
|
isOpen?: boolean;
|
|
14
22
|
/**
|
|
15
|
-
* The width of the
|
|
23
|
+
* The width of the DeprecatedMenu. If no value is provided, the DeprecatedMenu will collapse around its content.
|
|
16
24
|
*/
|
|
17
25
|
width?: number | string;
|
|
18
26
|
/**
|
|
@@ -20,7 +28,7 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
|
|
|
20
28
|
*/
|
|
21
29
|
onSelect?: () => void;
|
|
22
30
|
/**
|
|
23
|
-
* The function called when the
|
|
31
|
+
* The function called when the DeprecatedMenu should close. This is called after a menu item is selected or if the escape shortcut key is used. This will not fire if the menu item sets `shouldClose` to false.
|
|
24
32
|
*/
|
|
25
33
|
onClose?: () => void;
|
|
26
34
|
/**
|
|
@@ -28,24 +36,47 @@ export interface MenuProps extends GrowthBehavior, React.HTMLAttributes<HTMLULis
|
|
|
28
36
|
*/
|
|
29
37
|
initialSelectedItem?: number;
|
|
30
38
|
/**
|
|
31
|
-
* The unique id of the
|
|
39
|
+
* The unique id of the DeprecatedMenu used for ARIA and HTML `id` attributes.
|
|
32
40
|
*/
|
|
33
41
|
id?: string;
|
|
34
42
|
/**
|
|
35
|
-
* The HTML `id` of the element that labels the
|
|
43
|
+
* The HTML `id` of the element that labels the DeprecatedMenu. Often used with menu buttons.
|
|
36
44
|
*/
|
|
37
45
|
'aria-labelledby'?: string;
|
|
38
46
|
}
|
|
39
|
-
|
|
47
|
+
/**
|
|
48
|
+
* ### Deprecated Menu State
|
|
49
|
+
*
|
|
50
|
+
* As of Canvas Kit v8, Menu is being deprecated.
|
|
51
|
+
* It will be removed in v10. Please see the
|
|
52
|
+
* [upgrade guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page)
|
|
53
|
+
* for more information.
|
|
54
|
+
*/
|
|
55
|
+
export interface DeprecatedMenuState {
|
|
40
56
|
selectedItemIndex: number;
|
|
41
57
|
}
|
|
42
|
-
|
|
58
|
+
/**
|
|
59
|
+
* As of Canvas Kit v8, Menu is being deprecated.
|
|
60
|
+
* It will be removed in v10. Please see the [upgrade
|
|
61
|
+
* guide](https://workday.github.io/canvas-kit/?path=/story/welcome-upgrade-guides-v8-0--page) for
|
|
62
|
+
* more information.
|
|
63
|
+
*
|
|
64
|
+
* `DeprecatedMenu` renders a styled `<ul role="menu">` element within a {@link Card} and follows
|
|
65
|
+
* the [Active Menu
|
|
66
|
+
* pattern](https://www.w3.org/TR/wai-aria-practices/examples/menu-button/menu-button-actions-active-descendant.html)
|
|
67
|
+
* using `aria-activedescendant`.
|
|
68
|
+
*
|
|
69
|
+
* Undocumented props are spread to the underlying `<ul>` element.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated
|
|
72
|
+
*/
|
|
73
|
+
export declare class DeprecatedMenu extends React.Component<DeprecatedMenuProps, DeprecatedMenuState> {
|
|
43
74
|
private id;
|
|
44
75
|
private animateId;
|
|
45
76
|
private menuRef;
|
|
46
77
|
private firstCharacters;
|
|
47
|
-
constructor(props:
|
|
48
|
-
componentDidUpdate(prevProps:
|
|
78
|
+
constructor(props: DeprecatedMenuProps);
|
|
79
|
+
componentDidUpdate(prevProps: DeprecatedMenuProps): void;
|
|
49
80
|
componentDidMount(): void;
|
|
50
81
|
componentWillUnmount(): void;
|
|
51
82
|
render(): JSX.Element;
|