Skip to content

Commit

Permalink
feat(admin): improve look of components
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Sep 22, 2023
1 parent 5750106 commit 2df8009
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 76 deletions.
2 changes: 0 additions & 2 deletions views/js/backend/admin/src/__tests__/components.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {executePdkComponentTests} from '@myparcel-pdk/admin-component-tests';
import {
PsDropdownButton,
PsFormGroup,
PsIcon,
PsToggleInput,
Expand All @@ -12,7 +11,6 @@ import {
} from '../components';

executePdkComponentTests({
DropdownButton: PsDropdownButton,
FormGroup: PsFormGroup,
Icon: PsIcon,
PluginSettingsWrapper: PsPluginSettingsWrapper,
Expand Down
4 changes: 4 additions & 0 deletions views/js/backend/admin/src/assets/scss/_general.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// The MyParcel column in the order grid.
.order_grid_item-type.column-myparcelnl {
min-width: 22ch;
}
1 change: 1 addition & 0 deletions views/js/backend/admin/src/assets/scss/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
@tailwind utilities;

@import './animations';
@import './general';
65 changes: 0 additions & 65 deletions views/js/backend/admin/src/components/pdk/PsDropdownButton.vue

This file was deleted.

2 changes: 0 additions & 2 deletions views/js/backend/admin/src/components/pdk/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export {default as PsCheckboxInput} from './PsCheckboxInput.vue';

export {default as PsDropdownButton} from './PsDropdownButton.vue';

export {default as PsDropoffInput} from './PsDropoffInput.vue';

export {default as PsFormGroup} from './PsFormGroup.vue';
Expand Down
20 changes: 13 additions & 7 deletions views/js/backend/admin/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
DefaultCurrencyInput,
DefaultHeading,
DefaultLink,
DefaultLoader,
DefaultNumberInput,
DefaultTable,
DefaultTableCol,
Expand All @@ -22,11 +21,13 @@ import {
Bootstrap4Notification,
Bootstrap4TextInput,
bootstrap4Config,
Bootstrap4Loader,
Bootstrap4ShipmentLabelWrapper,
Bootstrap4DropdownButton,
} from '@myparcel-pdk/admin-preset-bootstrap4';
import {LogLevel, createPdkAdmin, type ElementInstance} from '@myparcel-pdk/admin';
import {listenForBulkActions} from './functions/listenForBulkActions';
import {
PsDropdownButton,
PsFormGroup,
PsProductSettingsFormGroup,
PsIcon,
Expand Down Expand Up @@ -60,13 +61,13 @@ window.onload = () => {
PdkCol: Bootstrap4Col,
PdkCurrencyInput: DefaultCurrencyInput,
PdkDropOffInput: PsDropoffInput,
PdkDropdownButton: PsDropdownButton,
PdkDropdownButton: Bootstrap4DropdownButton,
PdkFormGroup: PsFormGroup,
PdkHeading: DefaultHeading,
PdkIcon: PsIcon,
PdkImage: Bootstrap4Image,
PdkLink: DefaultLink,
PdkLoader: DefaultLoader,
PdkLoader: Bootstrap4Loader,
PdkModal: Bootstrap4Modal,
PdkMultiSelectInput: PsMultiSelectInput,
PdkNotification: Bootstrap4Notification,
Expand All @@ -77,6 +78,7 @@ window.onload = () => {
PdkRow: PsRow,
PdkSelectInput: PsSelectInput,
PdkSettingsDivider: PsSettingsDivider,
PdkShipmentLabelWrapper: Bootstrap4ShipmentLabelWrapper,
PdkTabNavButton: PsTabNavButton,
PdkTabNavButtonWrapper: PsTabNavButtonWrapper,
PdkTable: DefaultTable,
Expand Down Expand Up @@ -109,9 +111,13 @@ window.onload = () => {
},

cssUtilities: {
animationSpin: 'mypa-spinner',
whitespaceNoWrap: 'whitespace-nowrap',
displayFlex: 'd-flex justify-content-between',
...bootstrap4Config.cssUtilities,
// We have bootstrap 4 and tailwind classes (prefixed with mypa-) in the same project. Prefer bootstrap 4 classes.
animationLoading: 'mypa-loading',
animationSpin: 'mypa-spin',
cursorDefault: 'mypa-cursor-default',
cursorPointer: 'mypa-cursor-pointer',
whitespaceNoWrap: 'mypa-whitespace-nowrap',
},

logLevel: LogLevel.Debug,
Expand Down

0 comments on commit 2df8009

Please sign in to comment.