@workday/canvas-kit-preview-react 8.0.0-alpha.253-next.22 → 8.0.0-alpha.428-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/lib/ColorPicker.tsx +1 -1
- package/dist/commonjs/color-picker/lib/ColorPicker.js +25 -48
- 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 -10
- 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.js +8 -31
- 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 +8 -31
- 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/menu/lib/Menu.d.ts +16 -9
- package/dist/commonjs/menu/lib/Menu.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/Menu.js +108 -132
- package/dist/commonjs/menu/lib/MenuItem.d.ts +17 -7
- package/dist/commonjs/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/commonjs/menu/lib/MenuItem.js +111 -114
- package/dist/commonjs/pill/lib/Pill.d.ts +103 -5
- 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 +2 -0
- package/dist/commonjs/segmented-control/index.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/index.js +4 -0
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts +267 -82
- package/dist/commonjs/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControl.js +42 -7
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts +9 -5
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlItem.js +24 -49
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts +71 -2
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/SegmentedControlList.js +15 -40
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +28 -9
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlItem.js +8 -10
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +233 -83
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -1
- package/dist/commonjs/segmented-control/lib/hooks/useSegmentedControlModel.js +33 -32
- package/dist/commonjs/select/lib/Select.js +147 -187
- package/dist/commonjs/select/lib/SelectBase.js +106 -101
- package/dist/commonjs/select/lib/SelectMenu.js +53 -84
- package/dist/commonjs/select/lib/SelectOption.js +33 -47
- package/dist/commonjs/select/lib/scrolling.js +6 -7
- package/dist/commonjs/select/lib/utils.js +4 -4
- package/dist/commonjs/side-panel/lib/SidePanel.d.ts +13 -26
- 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 +2 -0
- package/dist/commonjs/status-indicator/index.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/index.js +4 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts +32 -8
- package/dist/commonjs/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicator.js +37 -35
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts +10 -0
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
- package/dist/commonjs/status-indicator/lib/StatusIndicatorIcon.js +11 -23
- package/dist/commonjs/status-indicator/lib/StatusIndicatorLabel.js +5 -28
- package/dist/commonjs/status-indicator/lib/hooks/useStatusIndicatorModel.js +6 -15
- 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 +2 -2
- 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 +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/commonjs/text-area/lib/TextAreaField.js +12 -36
- package/dist/commonjs/text-input/lib/TextInput.d.ts +4 -4
- 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 +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/commonjs/text-input/lib/TextInputField.js +13 -25
- 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/lib/ColorPicker.js +16 -39
- 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 -10
- 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.js +4 -27
- 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 +5 -28
- 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/menu/lib/Menu.d.ts +16 -9
- package/dist/es6/menu/lib/Menu.d.ts.map +1 -1
- package/dist/es6/menu/lib/Menu.js +103 -128
- package/dist/es6/menu/lib/MenuItem.d.ts +17 -7
- package/dist/es6/menu/lib/MenuItem.d.ts.map +1 -1
- package/dist/es6/menu/lib/MenuItem.js +107 -111
- package/dist/es6/pill/lib/Pill.d.ts +103 -5
- 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.js +3 -14
- package/dist/es6/pill/lib/PillCount.js +4 -27
- package/dist/es6/pill/lib/PillIcon.js +3 -26
- package/dist/es6/pill/lib/PillIconButton.js +7 -30
- package/dist/es6/pill/lib/PillLabel.js +5 -28
- package/dist/es6/pill/lib/usePillModel.js +8 -16
- package/dist/es6/segmented-control/index.d.ts +2 -0
- package/dist/es6/segmented-control/index.d.ts.map +1 -1
- package/dist/es6/segmented-control/index.js +2 -0
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts +267 -82
- package/dist/es6/segmented-control/lib/SegmentedControl.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControl.js +38 -3
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts +9 -5
- package/dist/es6/segmented-control/lib/SegmentedControlItem.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlItem.js +17 -42
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts +71 -2
- package/dist/es6/segmented-control/lib/SegmentedControlList.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/SegmentedControlList.js +9 -34
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts +28 -9
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlItem.js +5 -7
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts +233 -83
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.d.ts.map +1 -1
- package/dist/es6/segmented-control/lib/hooks/useSegmentedControlModel.js +31 -30
- package/dist/es6/select/lib/Select.js +144 -184
- package/dist/es6/select/lib/SelectBase.js +99 -94
- package/dist/es6/select/lib/SelectMenu.js +49 -80
- package/dist/es6/select/lib/SelectOption.js +30 -44
- package/dist/es6/select/lib/scrolling.js +6 -7
- package/dist/es6/select/lib/utils.js +4 -4
- package/dist/es6/side-panel/lib/SidePanel.d.ts +13 -26
- package/dist/es6/side-panel/lib/SidePanel.d.ts.map +1 -1
- package/dist/es6/side-panel/lib/SidePanel.js +93 -130
- 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 +2 -0
- package/dist/es6/status-indicator/index.d.ts.map +1 -1
- package/dist/es6/status-indicator/index.js +2 -0
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts +32 -8
- package/dist/es6/status-indicator/lib/StatusIndicator.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicator.js +33 -31
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts +10 -0
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.d.ts.map +1 -1
- package/dist/es6/status-indicator/lib/StatusIndicatorIcon.js +6 -18
- package/dist/es6/status-indicator/lib/StatusIndicatorLabel.js +3 -26
- package/dist/es6/status-indicator/lib/hooks/useStatusIndicatorModel.js +6 -15
- 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 +2 -2
- 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 +1 -1
- package/dist/es6/text-area/lib/TextAreaField.d.ts.map +1 -1
- package/dist/es6/text-area/lib/TextAreaField.js +9 -33
- package/dist/es6/text-input/lib/TextInput.d.ts +4 -4
- 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 +1 -1
- package/dist/es6/text-input/lib/TextInputField.d.ts.map +1 -1
- package/dist/es6/text-input/lib/TextInputField.js +12 -24
- 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/FormFieldLabel.tsx +6 -11
- package/form-field/lib/hooks/useFormFieldModel.tsx +1 -3
- package/form-field/lib/hooks/useFormFieldOrientation.tsx +6 -6
- package/menu/lib/Menu.tsx +16 -9
- package/menu/lib/MenuItem.tsx +19 -8
- package/package.json +4 -5
- package/pill/lib/Pill.tsx +109 -10
- package/pill/lib/PillCount.tsx +1 -1
- package/pill/lib/PillIcon.tsx +1 -1
- package/segmented-control/index.ts +2 -0
- package/segmented-control/lib/SegmentedControl.tsx +36 -0
- package/segmented-control/lib/SegmentedControlList.tsx +1 -1
- package/segmented-control/lib/hooks/useSegmentedControlItem.tsx +1 -5
- package/side-panel/lib/SidePanel.tsx +119 -169
- package/side-panel/lib/SidePanelToggleButton.tsx +78 -0
- package/side-panel/lib/hooks.ts +20 -0
- package/status-indicator/index.ts +2 -0
- package/status-indicator/lib/StatusIndicator.tsx +32 -6
- package/status-indicator/lib/StatusIndicatorIcon.tsx +1 -1
- package/table/LICENSE +51 -0
- 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 +6 -2
- package/text-input/lib/TextInput.tsx +9 -6
- package/text-input/lib/TextInputField.tsx +9 -5
- package/text-input/lib/hooks/useTextInputModel.ts +1 -0
- 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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableBody.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableBody.tsx"],"names":[],"mappings":"AAyBA,eAAO,MAAM,SAAS,wMASpB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import { createComponent, styled } from '@workday/canvas-kit-react/common';
|
|
4
|
+
const StyledBody = styled(Grid.as('tbody'))({
|
|
5
|
+
'tr:last-of-type td': {
|
|
6
|
+
borderBottom: 'none',
|
|
7
|
+
},
|
|
8
|
+
'tr:last-of-type th': {
|
|
9
|
+
borderBottom: 'none',
|
|
10
|
+
},
|
|
11
|
+
'tr:first-of-type td': {
|
|
12
|
+
borderTop: 'none',
|
|
13
|
+
},
|
|
14
|
+
'tr:first-of-type th': {
|
|
15
|
+
borderTop: 'none',
|
|
16
|
+
},
|
|
17
|
+
'td:last-of-type': {
|
|
18
|
+
borderRight: 'none',
|
|
19
|
+
},
|
|
20
|
+
'td:first-of-type': {
|
|
21
|
+
borderLeft: 'none',
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
export const TableBody = createComponent('tbody')({
|
|
25
|
+
displayName: 'Table.Body',
|
|
26
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
27
|
+
return (React.createElement(StyledBody, Object.assign({ as: Element, ref: ref }, elemProps), children));
|
|
28
|
+
},
|
|
29
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const TableCaption: import("@workday/canvas-kit-react/common").ElementComponent<"caption", Omit<import("@workday/canvas-kit-react/layout").BoxProps, "display"> & import("@workday/canvas-kit-react/layout").FlexStyleProps>;
|
|
2
|
+
//# sourceMappingURL=TableCaption.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCaption.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCaption.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,0MAgBvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { colors } from '@workday/canvas-kit-react/tokens';
|
|
3
|
+
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
4
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
5
|
+
export const TableCaption = createComponent('caption')({
|
|
6
|
+
displayName: 'Table.Caption',
|
|
7
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
8
|
+
return (React.createElement(Flex, Object.assign({ as: Element, ref: ref, borderBottom: `1px solid ${colors.soap500}`, paddingY: "xxs", paddingX: "s" }, elemProps), children));
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableCell.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS,qMAqBpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import { colors } from '@workday/canvas-kit-react/tokens';
|
|
4
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
5
|
+
export const TableCell = createComponent('td')({
|
|
6
|
+
displayName: 'Table.Cell',
|
|
7
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
8
|
+
return (React.createElement(Grid, Object.assign({ as: Element, ref: ref, alignItems: "center", backgroundColor: "frenchVanilla100", borderBottom: `1px solid ${colors.soap400}`, justifyContent: "left", minHeight: "56px", paddingY: "xxs", paddingX: "s", wordBreak: "break-word" }, elemProps), children));
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableFooter.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableFooter.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,WAAW,wMAStB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
4
|
+
export const TableFooter = createComponent('tfoot')({
|
|
5
|
+
displayName: 'Table.Footer',
|
|
6
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
7
|
+
return (React.createElement(Grid, Object.assign({ as: Element, ref: ref }, elemProps), children));
|
|
8
|
+
},
|
|
9
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHead.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableHead.tsx"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS,wMASpB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import { createComponent, styled } from '@workday/canvas-kit-react/common';
|
|
4
|
+
const StyledHead = styled(Grid.as('thead'))({
|
|
5
|
+
'th:last-of-type': {
|
|
6
|
+
borderRight: 'none',
|
|
7
|
+
},
|
|
8
|
+
'th:first-of-type': {
|
|
9
|
+
borderLeft: 'none',
|
|
10
|
+
},
|
|
11
|
+
});
|
|
12
|
+
export const TableHead = createComponent('thead')({
|
|
13
|
+
displayName: 'Table.Head',
|
|
14
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
15
|
+
return (React.createElement(StyledHead, Object.assign({ as: Element, ref: ref, backgroundColor: "soap100", minHeight: "48px" }, elemProps), children));
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableHeader.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableHeader.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,qMAsBtB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import { colors } from '@workday/canvas-kit-react/tokens';
|
|
4
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
5
|
+
export const TableHeader = createComponent('th')({
|
|
6
|
+
displayName: 'Table.Header',
|
|
7
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
8
|
+
return (React.createElement(Grid, Object.assign({ as: Element, ref: ref, alignItems: "center", backgroundColor: "frenchVanilla100", borderBottom: `1px solid ${colors.soap400}`, justifyContent: "left", minHeight: "56px", paddingY: "xxs", paddingX: "s", wordBreak: "break-word", fontWeight: "medium" }, elemProps), children));
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableRow.d.ts","sourceRoot":"","sources":["../../../../table/lib/TableRow.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,qMAqBnB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Grid } from '@workday/canvas-kit-react/layout';
|
|
3
|
+
import { createComponent } from '@workday/canvas-kit-react/common';
|
|
4
|
+
export const TableRow = createComponent('tr')({
|
|
5
|
+
displayName: 'Table.Row',
|
|
6
|
+
Component: ({ children, ...elemProps }, ref, Element) => {
|
|
7
|
+
const validChildren = (children) => {
|
|
8
|
+
return React.Children.toArray(children).filter(child => React.isValidElement(child));
|
|
9
|
+
};
|
|
10
|
+
const childrenArray = validChildren(children).length;
|
|
11
|
+
return (React.createElement(Grid, Object.assign({ as: Element, ref: ref, gridAutoFlow: "column", gridTemplateColumns: `repeat(${childrenArray}, minmax(10rem, 1fr))` }, elemProps), children));
|
|
12
|
+
},
|
|
13
|
+
});
|
|
@@ -26,7 +26,7 @@ export declare const TextArea: import("@workday/canvas-kit-react/common").Elemen
|
|
|
26
26
|
isRequired: boolean;
|
|
27
27
|
};
|
|
28
28
|
events: {};
|
|
29
|
-
}>, {
|
|
29
|
+
}, {}>, {
|
|
30
30
|
state: {
|
|
31
31
|
id: string;
|
|
32
32
|
hasError: boolean;
|
|
@@ -42,7 +42,7 @@ export declare const TextArea: import("@workday/canvas-kit-react/common").Elemen
|
|
|
42
42
|
};
|
|
43
43
|
events: {};
|
|
44
44
|
}>;
|
|
45
|
-
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p",
|
|
45
|
+
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", Omit<import("@workday/canvas-kit-react/text").TypeLevelProps, "size">, {
|
|
46
46
|
state: {
|
|
47
47
|
id: string;
|
|
48
48
|
hasError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EACL,SAAS,EAGV,MAAM,8CAA8C,CAAC;AAKtD,MAAM,WAAW,aAAc,SAAQ,YAAY,CAAC,OAAO,SAAS,EAAE,KAAK,CAAC;IAC1E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnB,CAAC"}
|
|
@@ -1,41 +1,17 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import React from 'react';
|
|
24
2
|
import { createContainer } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import { FormField, useFormFieldOrientation } from '@workday/canvas-kit-preview-react/form-field';
|
|
26
|
-
import {
|
|
27
|
-
import { useTextAreaModel } from './hooks';
|
|
3
|
+
import { FormField, useFormFieldModel, useFormFieldOrientation, } from '@workday/canvas-kit-preview-react/form-field';
|
|
4
|
+
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
28
5
|
import { TextAreaField } from './TextAreaField';
|
|
29
|
-
export
|
|
6
|
+
export const TextArea = createContainer('div')({
|
|
30
7
|
displayName: 'TextArea',
|
|
31
|
-
modelHook:
|
|
8
|
+
modelHook: useFormFieldModel,
|
|
32
9
|
subComponents: {
|
|
33
10
|
Field: TextAreaField,
|
|
34
11
|
Label: FormField.Label,
|
|
35
12
|
Hint: FormField.Hint,
|
|
36
13
|
},
|
|
37
|
-
})(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return (React.createElement(Stack, __assign({ as: Element }, layoutProps, elemProps), children));
|
|
14
|
+
})(({ children, orientation, ...elemProps }, Element) => {
|
|
15
|
+
const layoutProps = useFormFieldOrientation(orientation);
|
|
16
|
+
return (React.createElement(Flex, Object.assign({ as: Element }, layoutProps, elemProps), children));
|
|
41
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextAreaField.d.ts","sourceRoot":"","sources":["../../../../text-area/lib/TextAreaField.tsx"],"names":[],"mappings":"AA6CA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;EAgCxB,CAAC"}
|
|
@@ -1,34 +1,11 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
/** @jsxRuntime classic */
|
|
24
2
|
/** @jsx jsx */
|
|
25
3
|
import { jsx } from '@emotion/react';
|
|
26
4
|
import { borderRadius, inputColors, spaceNumbers, type, } from '@workday/canvas-kit-react/tokens';
|
|
27
|
-
import { createSubcomponent, useTheme } from '@workday/canvas-kit-react/common';
|
|
28
|
-
import { useThemedRing } from '@workday/canvas-kit-labs-react/common';
|
|
5
|
+
import { createSubcomponent, useTheme, useThemedRing, } from '@workday/canvas-kit-react/common';
|
|
29
6
|
import { FormField } from '@workday/canvas-kit-preview-react/form-field';
|
|
30
7
|
import { useTextInputModel } from '@workday/canvas-kit-preview-react/text-input';
|
|
31
|
-
|
|
8
|
+
const baseStyles = {
|
|
32
9
|
transition: '0.2s box-shadow, 0.2s border-color',
|
|
33
10
|
resize: 'both',
|
|
34
11
|
'&::webkit-resizer': {
|
|
@@ -52,20 +29,19 @@ var baseStyles = {
|
|
|
52
29
|
},
|
|
53
30
|
},
|
|
54
31
|
};
|
|
55
|
-
export
|
|
32
|
+
export const TextAreaField = createSubcomponent('textarea')({
|
|
56
33
|
displayName: 'TextArea.Field',
|
|
57
34
|
modelHook: useTextInputModel,
|
|
58
|
-
})(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
var focusStyles = model.state.hasError
|
|
35
|
+
})(({ ...elemProps }, Element, model) => {
|
|
36
|
+
const theme = useTheme();
|
|
37
|
+
const errorRing = useThemedRing('error');
|
|
38
|
+
const focusStyles = model.state.hasError
|
|
63
39
|
? errorRing
|
|
64
40
|
: {
|
|
65
41
|
'&:focus:not([disabled])': {
|
|
66
42
|
borderColor: theme.canvas.palette.common.focusOutline,
|
|
67
|
-
boxShadow:
|
|
43
|
+
boxShadow: `inset 0 0 0 1px ${theme.canvas.palette.common.focusOutline}`,
|
|
68
44
|
},
|
|
69
45
|
};
|
|
70
|
-
return (jsx(FormField.Input,
|
|
46
|
+
return (jsx(FormField.Input, Object.assign({ as: Element }, type.levels.subtext.large, { css: [baseStyles, focusStyles] }, elemProps, { border: `1px solid ${inputColors.border}`, display: "block", backgroundColor: inputColors.background, borderRadius: borderRadius.m, minHeight: 64, minWidth: 280, padding: spaceNumbers.xxs, margin: 0 })));
|
|
71
47
|
});
|
|
@@ -7,7 +7,7 @@ export interface TextInputProps extends ExtractProps<typeof FormField, never> {
|
|
|
7
7
|
*/
|
|
8
8
|
children: React.ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export declare const TextInput: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("
|
|
10
|
+
export declare const TextInput: import("@workday/canvas-kit-react/common").ElementComponentM<"div", import("@workday/canvas-kit-preview-react/form-field").FormFieldProps & Partial<{
|
|
11
11
|
hasError: boolean;
|
|
12
12
|
id: string;
|
|
13
13
|
isRequired: boolean;
|
|
@@ -18,7 +18,7 @@ export declare const TextInput: import("@workday/canvas-kit-react/common").Eleme
|
|
|
18
18
|
isRequired: boolean;
|
|
19
19
|
};
|
|
20
20
|
events: {};
|
|
21
|
-
}>, {
|
|
21
|
+
}, {}>, {
|
|
22
22
|
state: {
|
|
23
23
|
id: string;
|
|
24
24
|
hasError: boolean;
|
|
@@ -33,7 +33,7 @@ export declare const TextInput: import("@workday/canvas-kit-react/common").Eleme
|
|
|
33
33
|
isRequired: boolean;
|
|
34
34
|
};
|
|
35
35
|
events: {};
|
|
36
|
-
}>, {
|
|
36
|
+
}, {}>, {
|
|
37
37
|
state: {
|
|
38
38
|
id: string;
|
|
39
39
|
hasError: boolean;
|
|
@@ -49,7 +49,7 @@ export declare const TextInput: import("@workday/canvas-kit-react/common").Eleme
|
|
|
49
49
|
};
|
|
50
50
|
events: {};
|
|
51
51
|
}>;
|
|
52
|
-
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p",
|
|
52
|
+
Hint: import("@workday/canvas-kit-react/common").ElementComponentM<"p", Omit<import("@workday/canvas-kit-react/text").TypeLevelProps, "size">, {
|
|
53
53
|
state: {
|
|
54
54
|
id: string;
|
|
55
55
|
hasError: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAkB,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EACL,SAAS,EAGV,MAAM,8CAA8C,CAAC;AAKtD,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC,OAAO,SAAS,EAAE,KAAK,CAAC;IAC3E;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBpB,CAAC"}
|
|
@@ -1,41 +1,17 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
1
|
import React from 'react';
|
|
24
2
|
import { createContainer } from '@workday/canvas-kit-react/common';
|
|
25
|
-
import { FormField, useFormFieldOrientation } from '@workday/canvas-kit-preview-react/form-field';
|
|
26
|
-
import {
|
|
27
|
-
import { useTextInputModel } from './hooks';
|
|
3
|
+
import { FormField, useFormFieldModel, useFormFieldOrientation, } from '@workday/canvas-kit-preview-react/form-field';
|
|
4
|
+
import { Flex } from '@workday/canvas-kit-react/layout';
|
|
28
5
|
import { TextInputField } from './TextInputField';
|
|
29
|
-
export
|
|
6
|
+
export const TextInput = createContainer('div')({
|
|
30
7
|
displayName: 'TextInput',
|
|
31
|
-
modelHook:
|
|
8
|
+
modelHook: useFormFieldModel,
|
|
32
9
|
subComponents: {
|
|
33
10
|
Field: TextInputField,
|
|
34
11
|
Label: FormField.Label,
|
|
35
12
|
Hint: FormField.Hint,
|
|
36
13
|
},
|
|
37
|
-
})(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return (React.createElement(Stack, __assign({ as: Element }, layoutProps, elemProps), children));
|
|
14
|
+
})(({ children, orientation, ...elemProps }, Element) => {
|
|
15
|
+
const layoutProps = useFormFieldOrientation(orientation);
|
|
16
|
+
return (React.createElement(Flex, Object.assign({ as: Element }, layoutProps, elemProps), children));
|
|
41
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputField.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInputField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextInputField.d.ts","sourceRoot":"","sources":["../../../../text-input/lib/TextInputField.tsx"],"names":[],"mappings":"AA6CA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;EAiCzB,CAAC"}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
1
|
/** @jsxRuntime classic */
|
|
13
2
|
/** @jsx jsx */
|
|
14
3
|
import { jsx } from '@emotion/react';
|
|
15
4
|
import { borderRadius, inputColors, space, type, } from '@workday/canvas-kit-react/tokens';
|
|
16
|
-
import { createSubcomponent, useTheme } from '@workday/canvas-kit-react/common';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
var baseStyles = {
|
|
5
|
+
import { createSubcomponent, useTheme, useThemedRing, } from '@workday/canvas-kit-react/common';
|
|
6
|
+
import { FormField, useFormFieldModel } from '@workday/canvas-kit-preview-react/form-field';
|
|
7
|
+
import { useTextInputField } from './hooks';
|
|
8
|
+
const baseStyles = {
|
|
21
9
|
transition: '0.2s box-shadow, 0.2s border-color',
|
|
22
10
|
'&::placeholder': {
|
|
23
11
|
color: inputColors.placeholder,
|
|
@@ -40,20 +28,20 @@ var baseStyles = {
|
|
|
40
28
|
display: 'none',
|
|
41
29
|
},
|
|
42
30
|
};
|
|
43
|
-
export
|
|
31
|
+
export const TextInputField = createSubcomponent('input')({
|
|
44
32
|
displayName: 'TextInput.Field',
|
|
45
|
-
modelHook:
|
|
33
|
+
modelHook: useFormFieldModel,
|
|
46
34
|
elemPropsHook: useTextInputField,
|
|
47
|
-
})(
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
})((elemProps, Element, model) => {
|
|
36
|
+
const theme = useTheme();
|
|
37
|
+
const errorRing = useThemedRing('error');
|
|
38
|
+
const focusStyles = model.state.hasError
|
|
51
39
|
? errorRing
|
|
52
40
|
: {
|
|
53
41
|
'&:focus:not([disabled])': {
|
|
54
42
|
borderColor: theme.canvas.palette.common.focusOutline,
|
|
55
|
-
boxShadow:
|
|
43
|
+
boxShadow: `inset 0 0 0 1px ${theme.canvas.palette.common.focusOutline}`,
|
|
56
44
|
},
|
|
57
45
|
};
|
|
58
|
-
return (jsx(FormField.Input,
|
|
46
|
+
return (jsx(FormField.Input, Object.assign({ as: "input" }, type.levels.subtext.large, { css: [baseStyles, focusStyles], padding: space.xxs, margin: 0, display: "block", height: "40px", minWidth: "280px", border: `1px solid ${inputColors.border}`, backgroundColor: inputColors.background, borderRadius: borderRadius.m }, elemProps)));
|
|
59
47
|
});
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
|
|
3
3
|
*/
|
|
4
|
-
export declare const useTextInputField: <
|
|
4
|
+
export declare const useTextInputField: import("@workday/canvas-kit-react/common").BehaviorHook<{
|
|
5
5
|
state: {
|
|
6
6
|
id: string;
|
|
7
7
|
hasError: boolean;
|
|
8
8
|
isRequired: boolean;
|
|
9
9
|
};
|
|
10
10
|
events: {};
|
|
11
|
-
},
|
|
11
|
+
}, {
|
|
12
12
|
type: string;
|
|
13
|
-
}
|
|
14
|
-
ref: import("react").Ref<R>;
|
|
15
|
-
} : {});
|
|
13
|
+
}>;
|
|
16
14
|
//# sourceMappingURL=useTextInputField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextInputField.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputField.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"useTextInputField.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputField.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;EAI5B,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { useTextInputModel } from './useTextInputModel';
|
|
|
3
3
|
/**
|
|
4
4
|
* Adds the necessary props to a `Field` component. Used by the TextInput.Field subcomponent.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export const useTextInputField = createElemPropsHook(useTextInputModel)(() => {
|
|
7
7
|
return {
|
|
8
8
|
type: 'text',
|
|
9
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTextInputModel.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputModel.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"useTextInputModel.d.ts","sourceRoot":"","sources":["../../../../../text-input/lib/hooks/useTextInputModel.ts"],"names":[],"mappings":"AAEA,yDAAyD;AACzD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;EAAoB,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
import {createContainer
|
|
4
|
-
import {
|
|
3
|
+
import {createContainer} from '@workday/canvas-kit-react/common';
|
|
4
|
+
import {Flex, FlexProps} from '@workday/canvas-kit-react/layout';
|
|
5
5
|
|
|
6
6
|
import {useFormFieldModel, useFormFieldOrientation} from './hooks';
|
|
7
7
|
import {FormFieldInput} from './FormFieldInput';
|
|
8
8
|
import {FormFieldLabel} from './FormFieldLabel';
|
|
9
9
|
import {FormFieldHint} from './FormFieldHint';
|
|
10
10
|
|
|
11
|
-
export interface FormFieldProps extends
|
|
11
|
+
export interface FormFieldProps extends FlexProps {
|
|
12
12
|
/**
|
|
13
13
|
* Children of the Text Input. Should contain a `<FormField.Input>`, a `<FormField.Label>` and an optional `<FormField.Hint>`
|
|
14
14
|
*/
|
|
@@ -17,11 +17,6 @@ export interface FormFieldProps extends Omit<ExtractProps<typeof Stack, never>,
|
|
|
17
17
|
* The direction the child elements should stack
|
|
18
18
|
*/
|
|
19
19
|
orientation: 'vertical' | 'horizontal';
|
|
20
|
-
/**
|
|
21
|
-
* Spacing between children elements
|
|
22
|
-
* @default xxxs when vertical l when orientation is horizontal
|
|
23
|
-
*/
|
|
24
|
-
spacing?: StackSpacing;
|
|
25
20
|
}
|
|
26
21
|
|
|
27
22
|
export const FormField = createContainer('div')({
|
|
@@ -36,8 +31,8 @@ export const FormField = createContainer('div')({
|
|
|
36
31
|
const layoutProps = useFormFieldOrientation(orientation);
|
|
37
32
|
|
|
38
33
|
return (
|
|
39
|
-
<
|
|
34
|
+
<Flex as={Element} {...layoutProps} {...elemProps}>
|
|
40
35
|
{children}
|
|
41
|
-
</
|
|
36
|
+
</Flex>
|
|
42
37
|
);
|
|
43
38
|
});
|