Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Oct 14, 2024
1 parent 3eef30f commit f02794c
Show file tree
Hide file tree
Showing 100 changed files with 610 additions and 629 deletions.
2 changes: 1 addition & 1 deletion src/admin/components/shortcut/style.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.chbe-admin-shortcut-modal {

p {
margin: 0 0 $grid-unit-20 0;
margin: 0 0 $grid-unit-20;
}

ul {
Expand Down
1 change: 1 addition & 0 deletions src/admin/editor-config/components/item-help/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export default function ItemHelp( {
onChange( newValue );
setIsModalOpen( false );
} }
label={ title }
/>
) }
</VStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { createInterpolateElement, useContext } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -31,7 +31,7 @@ export default function AcceptSuggestionOnEnter() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<ToggleControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -54,6 +54,6 @@ export default function AcceptSuggestionOnEnter() {
defaultToggle
value={ editorOptions.acceptSuggestionOnEnter }
/>
</div>
</HStack>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { SelectControl } from '@wordpress/components';
import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -53,7 +53,7 @@ export default function AutoClosingBrackets() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<SelectControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -70,6 +70,6 @@ export default function AutoClosingBrackets() {
colCount="3"
value={ editorOptions.autoClosingBrackets }
/>
</div>
</HStack>
);
}
6 changes: 3 additions & 3 deletions src/admin/editor-config/editor-options/auto-closing-quotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { SelectControl } from '@wordpress/components';
import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -53,7 +53,7 @@ export default function AutoClosingQuotes() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<SelectControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -70,6 +70,6 @@ export default function AutoClosingQuotes() {
colCount="3"
value={ editorOptions.autoClosingQuotes }
/>
</div>
</HStack>
);
}
6 changes: 3 additions & 3 deletions src/admin/editor-config/editor-options/auto-indent.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { SelectControl } from '@wordpress/components';
import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -51,7 +51,7 @@ export default function AutoIndent() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<SelectControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -68,6 +68,6 @@ export default function AutoIndent() {
colCount="3"
value={ editorOptions.autoIndent }
/>
</div>
</HStack>
);
}
6 changes: 3 additions & 3 deletions src/admin/editor-config/editor-options/auto-surround.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { SelectControl } from '@wordpress/components';
import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -58,7 +58,7 @@ export default function AutoSurround() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<SelectControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -74,6 +74,6 @@ export default function AutoSurround() {
items={ items }
value={ editorOptions.autoSurround }
/>
</div>
</HStack>
);
}
6 changes: 3 additions & 3 deletions src/admin/editor-config/editor-options/column-selection.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { createInterpolateElement, useContext } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -31,7 +31,7 @@ export default function ColumnSelection() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<ToggleControl
__nextHasNoMarginBottom
label={ __( 'Enable column selection', 'custom-html-block-extension' ) }
Expand Down Expand Up @@ -80,6 +80,6 @@ export default function ColumnSelection() {
image="editor-options/column-selection.gif"
value={ editorOptions.columnSelection }
/>
</div>
</HStack>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function CommentsInsertSpace() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<ToggleControl
__nextHasNoMarginBottom
label={ title }
Expand Down Expand Up @@ -63,6 +63,6 @@ export default function CommentsInsertSpace() {
] }
value={ editorOptions.comments.insertSpace }
/>
</div>
</HStack>
);
}
6 changes: 3 additions & 3 deletions src/admin/editor-config/editor-options/contextmenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -31,7 +31,7 @@ export default function Contextmenu() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<ToggleControl
__nextHasNoMarginBottom
label={ title }
Expand Down Expand Up @@ -62,6 +62,6 @@ export default function Contextmenu() {
] }
value={ editorOptions.contextmenu }
/>
</div>
</HStack>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -31,7 +31,7 @@ export default function CopyWithSyntaxHighlighting() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<ToggleControl
__nextHasNoMarginBottom
label={ title }
Expand Down Expand Up @@ -60,6 +60,6 @@ export default function CopyWithSyntaxHighlighting() {
] }
value={ editorOptions.copyWithSyntaxHighlighting }
/>
</div>
</HStack>
);
}
6 changes: 3 additions & 3 deletions src/admin/editor-config/editor-options/cursor-blinking.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { SelectControl } from '@wordpress/components';
import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function CursorBlinking() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<SelectControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -77,6 +77,6 @@ export default function CursorBlinking() {
colCount="5"
value={ editorOptions.cursorBlinking }
/>
</div>
</HStack>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -31,7 +31,7 @@ export default function CursorSmoothCaretAnimation() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<ToggleControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -56,6 +56,6 @@ export default function CursorSmoothCaretAnimation() {
] }
value={ editorOptions.cursorSmoothCaretAnimation }
/>
</div>
</HStack>
);
}
6 changes: 3 additions & 3 deletions src/admin/editor-config/editor-options/cursor-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { SelectControl } from '@wordpress/components';
import { SelectControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -65,7 +65,7 @@ export default function CursorStyle() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<SelectControl
__nextHasNoMarginBottom
label={ title }
Expand All @@ -82,6 +82,6 @@ export default function CursorStyle() {
colCount="3"
value={ editorOptions.cursorStyle }
/>
</div>
</HStack>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __ } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { ToggleControl } from '@wordpress/components';
import { ToggleControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function CursorSurroundingLinesStyle() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<ToggleControl
__nextHasNoMarginBottom
label={ title }
Expand Down Expand Up @@ -63,6 +63,6 @@ export default function CursorSurroundingLinesStyle() {
] }
value={ 'all' === editorOptions.cursorSurroundingLinesStyle }
/>
</div>
</HStack>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import { __, sprintf } from '@wordpress/i18n';
import { useContext } from '@wordpress/element';
import { RangeControl } from '@wordpress/components';
import { RangeControl, __experimentalHStack as HStack } from '@wordpress/components';

/**
* Internal dependencies
Expand Down Expand Up @@ -35,7 +35,7 @@ export default function CursorSurroundingLines() {
};

return (
<div className="chbe-admin-editor-config__item">
<HStack justify="start" align="start" wrap>
<RangeControl
__nextHasNoMarginBottom
label={ title }
Expand Down Expand Up @@ -74,6 +74,6 @@ export default function CursorSurroundingLines() {
] }
value={ editorOptions.cursorSurroundingLines }
/>
</div>
</HStack>
);
}
Loading

0 comments on commit f02794c

Please sign in to comment.