diff --git a/packages/default/scss/toolbar/_layout.scss b/packages/default/scss/toolbar/_layout.scss index 57d5d78211f..1b3c371235b 100644 --- a/packages/default/scss/toolbar/_layout.scss +++ b/packages/default/scss/toolbar/_layout.scss @@ -132,12 +132,6 @@ } - // Angular specific - .k-toolbar-renderer { - display: inline-block; - border-color: inherit; - } - // Toolbar sizes @each $size, $size-props in $kendo-toolbar-sizes { $_padding-x: map.get( $size-props, padding-x ); diff --git a/packages/fluent/scss/toolbar/_layout.scss b/packages/fluent/scss/toolbar/_layout.scss index 454f4dbc087..aecd0f064a6 100644 --- a/packages/fluent/scss/toolbar/_layout.scss +++ b/packages/fluent/scss/toolbar/_layout.scss @@ -110,12 +110,6 @@ gap: inherit; } - // Angular specific - .k-toolbar-renderer { - display: inline-block; - border-color: inherit; - } - // Toolbar sizes @each $size, $size-props in $kendo-toolbar-sizes { $_padding-x: map.get( $size-props, padding-x ); diff --git a/packages/html/src/toolbar/index.ts b/packages/html/src/toolbar/index.ts index e400a2a7aa5..19e2110cb4c 100644 --- a/packages/html/src/toolbar/index.ts +++ b/packages/html/src/toolbar/index.ts @@ -1,9 +1,6 @@ export * from './toolbar.spec'; -export * from './toolbar-angular.spec'; export * from './toolbar-separator'; export * from './toolbar-item.spec'; export * from './toolbar-popup.spec'; export * from './templates/toolbar-normal'; export * from './templates/toolbar-resizable'; -export * from './templates/toolbar-angular-normal'; -export * from './templates/toolbar-angular-resizable'; diff --git a/packages/html/src/toolbar/templates/toolbar-angular-normal.tsx b/packages/html/src/toolbar/templates/toolbar-angular-normal.tsx deleted file mode 100644 index c7e8195817c..00000000000 --- a/packages/html/src/toolbar/templates/toolbar-angular-normal.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import { ToolbarAngular } from "../toolbar-angular.spec"; -import { Button } from "../../button"; -import { ButtonGroup } from "../../button-group"; -import { MenuButton } from "../../menu-button"; -import { SplitButton } from "../../split-button"; - -export const ToolbarAngularNormal = (props) => ( - Button, - , - Split button, - - - - - - ]} - {...props} - /> -); diff --git a/packages/html/src/toolbar/templates/toolbar-angular-resizable.tsx b/packages/html/src/toolbar/templates/toolbar-angular-resizable.tsx deleted file mode 100644 index 8e5f315469a..00000000000 --- a/packages/html/src/toolbar/templates/toolbar-angular-resizable.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import { ToolbarAngular } from "../toolbar-angular.spec"; -import { Button } from "../../button"; -import { ButtonGroup } from "../../button-group"; -import { MenuButton } from "../../menu-button"; -import { SplitButton } from "../../split-button"; - -export const ToolbarAngularResizable = (props) => ( - Button, - , - Split button, - - - - - , - - ]} - {...props} - /> -); diff --git a/packages/html/src/toolbar/tests/toolbar-angular.tsx b/packages/html/src/toolbar/tests/toolbar-angular.tsx deleted file mode 100644 index 6fbef515aea..00000000000 --- a/packages/html/src/toolbar/tests/toolbar-angular.tsx +++ /dev/null @@ -1,68 +0,0 @@ -import { Button } from '../../button'; -import { SplitButton } from '../../split-button'; -import { MenuButton } from '../../menu-button'; -import { ToolbarAngularNormal, ToolbarSeparator } from '../../toolbar'; -import { ButtonGroup } from '../../button-group'; - -export default () =>( - <> -
- - Angular specific rendering and spacing -
- - -
- -
- Split button -
- -
- -
- -
- - - - - - -
-
- - - wrapped - rtl - -
- - - Split button - - - - - - - - -
-
- - - Split button - - - - - - - - -
- -
- -); diff --git a/packages/html/src/toolbar/toolbar-angular.spec.tsx b/packages/html/src/toolbar/toolbar-angular.spec.tsx deleted file mode 100644 index ff1a3cdf877..00000000000 --- a/packages/html/src/toolbar/toolbar-angular.spec.tsx +++ /dev/null @@ -1,193 +0,0 @@ -import { Button } from '../button'; -import { ButtonGroup } from '../button-group'; -import { ColorPicker } from '../colorpicker'; -import { Combobox } from '../combobox'; -import { DropdownList } from '../dropdownlist'; -import { MenuButton } from '../menu-button'; -import SplitButton from '../split-button/split-button.spec'; -import { classNames, optionClassNames, stateClassNames, States, Size, FillMode } from '../misc'; - -export const TOOLBARANGULAR_CLASSNAME = `k-toolbar`; - -const states = [ - States.focus, -]; - -const options = { - size: [ Size.small, Size.medium, Size.large ], - fillMode: [FillMode.solid, FillMode.outline, FillMode.flat], -}; - -export type KendoToolbarAngularOptions = { - size?: (typeof options.size)[number] | null; - fillMode?: (typeof options.fillMode)[number] | null; -}; - -export type KendoToolbarAngularProps = KendoToolbarAngularOptions & { - resizable?: boolean; -}; - -export type KendoToolbarAngularState = { [K in (typeof states)[number]]?: boolean }; - -const defaultOptions = { - size: Size.medium, - fillMode: FillMode.solid -}; - -export const ToolbarAngular = ( - props: KendoToolbarAngularProps & - KendoToolbarAngularState & - React.HTMLAttributes -) => { - const { - size = defaultOptions.size, - fillMode = defaultOptions.fillMode, - focus, - resizable, - ...other - } = props; - - const toolbarChildren: React.JSX.Element[] = []; - - const addUniqueToolClass = (child, index) => { - const tempToolbarChildren: React.JSX.Element[] = []; - - if (child.type === Button && child.props.className && child.props.className.includes('k-toolbar-overflow-button')) { - tempToolbarChildren.push( - - ); - } else if (child.type === Button) { - tempToolbarChildren.push( -
- -
- ); - } else if (child.type === MenuButton) { - tempToolbarChildren.push( -
- -
- ); - } else if (child.type === SplitButton) { - tempToolbarChildren.push( -
- -
- ); - } else if (child.type === ButtonGroup || child.props.className && child.props.className.includes('k-button-group')) { - const buttonGroupItems: React.JSX.Element[] = []; - const childrenArray = Array.isArray(child.props.children) ? child.props.children : [ child.props.children ]; - - childrenArray.forEach((button, bindex) => { - buttonGroupItems.push( - - ); - }); - - tempToolbarChildren.push( -
- - {buttonGroupItems} - -
- ); - } else if (child.type === Combobox) { - tempToolbarChildren.push( -
- -
- ); - } else if (child.type === DropdownList) { - tempToolbarChildren.push( -
- -
- ); - } else if (child.type === ColorPicker) { - tempToolbarChildren.push( -
- -
- ); - } else { - tempToolbarChildren.push(child); - } - - tempToolbarChildren.forEach(item => { - toolbarChildren.push(item); - }); - }; - - if (props.children) { - const childrenArray = Array.isArray(props.children) ? props.children : [ props.children ]; - - childrenArray.forEach((child, index) => { - addUniqueToolClass(child, index); - }); - } - - return ( -
- {toolbarChildren} -
- ); -}; - -ToolbarAngular.states = states; -ToolbarAngular.options = options; -ToolbarAngular.className = TOOLBARANGULAR_CLASSNAME; -ToolbarAngular.defaultOptions = defaultOptions; - -export default ToolbarAngular; diff --git a/tests/_output/bootstrap/toolbar/toolbar-angular.png b/tests/_output/bootstrap/toolbar/toolbar-angular.png deleted file mode 100644 index d63682e5e50..00000000000 Binary files a/tests/_output/bootstrap/toolbar/toolbar-angular.png and /dev/null differ diff --git a/tests/_output/classic/toolbar/toolbar-angular.png b/tests/_output/classic/toolbar/toolbar-angular.png deleted file mode 100644 index 6b44a80c678..00000000000 Binary files a/tests/_output/classic/toolbar/toolbar-angular.png and /dev/null differ diff --git a/tests/_output/default/toolbar/toolbar-angular.png b/tests/_output/default/toolbar/toolbar-angular.png deleted file mode 100644 index 580b2fcfdcb..00000000000 Binary files a/tests/_output/default/toolbar/toolbar-angular.png and /dev/null differ diff --git a/tests/_output/fluent/toolbar/toolbar-angular.png b/tests/_output/fluent/toolbar/toolbar-angular.png deleted file mode 100644 index 10298f34ab1..00000000000 Binary files a/tests/_output/fluent/toolbar/toolbar-angular.png and /dev/null differ diff --git a/tests/_output/material/toolbar/toolbar-angular.png b/tests/_output/material/toolbar/toolbar-angular.png deleted file mode 100644 index 1c88ee84de8..00000000000 Binary files a/tests/_output/material/toolbar/toolbar-angular.png and /dev/null differ diff --git a/tests/toolbar/toolbar-angular.html b/tests/toolbar/toolbar-angular.html deleted file mode 100644 index 7e6115c12fa..00000000000 --- a/tests/toolbar/toolbar-angular.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - Document - - - - - - - - -
- Angular specific rendering and spacing -
-
-
- -
-
-
-
-
-
- - -
-
-
-
-
-
- -
-
-
-
-
-
- - - - -
-
-
-
- wrapped - rtl -
-
-
- -
-
-
- - -
-
-
- -
-
-
- - - - -
-
-
-
-
-
-
- -
-
-
- - -
-
-
- -
-
-
- - - - -
-
-
-
-
- -