Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
freddyDOTCMS committed May 15, 2024
2 parents d582f88 + 9f8874c commit 9043f3d
Show file tree
Hide file tree
Showing 36 changed files with 2,020 additions and 2,675 deletions.
1 change: 1 addition & 0 deletions .github/filters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ backend: &backend
- 'build-parent/**'
- 'core-web/pom.xml'
- 'dotCMS/src/main/webapp/html/**/!(*.{css,js})'
- 'dotcms-postman/**'
- 'dotCMS/!(src/main/webapp/html/)**'
- 'dotcms-integration/**'
- 'independent-projects/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
# The artifacts are uploaded to Artifactory using the 'deploy-artifact-artifactory' action.
- name: CLI Deploy
continue-on-error: true
id: cli_deploy
uses: ./.github/actions/deploy-artifact-artifactory
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// How to write stories? https://storybook.js.org/docs/6.5/angular/writing-stories/introduction
// Controls https://storybook.js.org/docs/6.5/angular/essentials/controls
// Annotations: https://storybook.js.org/docs/6.5/angular/essentials/controls#annotation

import { Meta, Story } from '@storybook/angular';

import { Button } from 'primeng/button';
Expand All @@ -12,24 +8,29 @@ export default {
args: {
label: 'Button',
disabled: false,
icon: false,
size: 'p-button-md',
iconPos: 'left',
severity: '-',
type: '-'
type: '-',
rounded: '-',
icon: 'pi pi-home'
},
argTypes: {
size: {
options: ['p-button-sm', 'p-button-md', 'p-button-lg'],
control: { type: 'radio' }
},
severity: {
options: ['-', 'p-button-secondary', 'p-button-danger'],
control: { type: 'select' }
options: ['-', 'p-button-secondary', 'p-button-tertiary', 'p-button-danger'],
control: { type: 'radio' }
},
rounded: {
options: ['-', 'p-button-rounded'],
control: { type: 'radio' }
},
type: {
options: ['-', 'p-button-text', 'p-button-outlined', 'p-button-link'],
control: { type: 'select' }
control: { type: 'radio' }
},
iconPos: {
control: 'inline-radio',
Expand All @@ -39,8 +40,10 @@ export default {
} as Meta;

export const Main: Story = (args) => {
const argsWithClasses = ['size', 'severity', 'type', 'rounded'];
const parts = [];
for (const key of Object.keys(args)) {

for (const key of argsWithClasses) {
if (
typeof args[key] === 'string' &&
args[key].trim() !== '-' &&
Expand All @@ -57,7 +60,7 @@ export const Main: Story = (args) => {
label: args.label,
classes: joined,
disabled: args.disabled,
icon: args.icon ? 'pi pi-home' : '',
icon: args.icon ?? '',
iconPos: args.iconPos
},
template: `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,22 +48,9 @@
}
}

// Shared disabled styles
.p-button:disabled:not(.p-splitbutton-defaultbutton, .p-splitbutton-menubutton) {
@extend #button-disabled;

&.p-button-outlined {
@extend #button-disabled-outlined;
}

&.p-button-text {
@extend #button-disabled-text;
}
}

// Severity for basic button
.p-button:enabled,
// Used for file upload button
// Used for file upload button
.p-button.p-fileupload-choose {
@extend #main-primary-severity;

Expand All @@ -78,6 +65,11 @@
@extend #outlined-secondary-severity;
border: transparent;
}

&.p-button-tertiary {
color: $color-palette-primary;
@extend #main-tertiary-severity;
}
}

// Severity for outlined button
Expand All @@ -96,6 +88,14 @@
@extend #outlined-secondary-severity-sm;
}
}

&.p-button-tertiary {
@extend #outlined-tertiary-severity;

&.p-button-sm {
@extend #outlined-tertiary-severity-sm;
}
}
}

// Severity for text button
Expand All @@ -107,11 +107,31 @@ a.p-button.p-button-text {
@extend #text-secondary-severity;
}

&.p-button-tertiary {
@extend #text-tertiary-severity;
}

&.p-button-danger {
@extend #text-danger-severity;
}
}

// Shared disabled styles
.p-button:disabled:not(.p-splitbutton-defaultbutton, .p-splitbutton-menubutton),
.p-button.p-button-secondary:disabled:not(.p-splitbutton-defaultbutton, .p-splitbutton-menubutton),
.p-button.p-button-tertiary:disabled:not(.p-splitbutton-defaultbutton, .p-splitbutton-menubutton) {
// Default
@extend #button-disabled;

&.p-button-outlined {
@extend #button-disabled-outlined;
}

&.p-button-text {
@extend #button-disabled-text;
}
}

// Icon Only Sizes
.p-button-icon-only:not(.p-splitbutton-menubutton) {
height: $field-height-md;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,23 @@
}
}

#main-tertiary-severity {
background-color: $color-palette-primary-200;

&:hover {
background-color: $color-palette-primary-300;
}

&:active {
background-color: $color-palette-primary-400;
}

&:focus {
background-color: $color-palette-primary-200;
@include field-focus;
}
}

#outlined-primary-severity {
background-color: transparent;
border: $field-border-size solid $color-palette-primary;
Expand Down Expand Up @@ -119,6 +136,35 @@
border: 1px solid $color-palette-secondary;
}

// outlined only apply to icon-only
#outlined-tertiary-severity.p-button-icon-only {
border: $field-border-size solid $color-palette-primary-300;
white-space: nowrap;

.p-button-label,
.p-button-icon,
.pi {
color: $color-palette-primary;
}

&:hover {
background-color: $color-palette-primary-100;
}

&:active {
background-color: $color-palette-primary-200;
}

&:focus {
background-color: $white;
@include field-focus;
}
}

#outlined-tertiary-severity-sm {
border: 1px solid $color-palette-primary-300;
}

#text-primary-severity {
background-color: transparent;
color: $black;
Expand Down Expand Up @@ -158,7 +204,7 @@
}

.p-button-label {
color: inherit;
color: $color-palette-secondary;
}

.p-button-icon,
Expand Down Expand Up @@ -187,6 +233,45 @@
}
}

// Apply for icon only and button
#text-tertiary-severity {
background-color: $white;
color: $color-palette-primary-500;
overflow: hidden;
max-width: 100%;

.p-button-label {
color: $color-palette-primary-500;
@include truncate-text;
}

.p-button-icon,
.pi {
color: $color-palette-primary-500;
}

&.p-button-icon-only {
.p-button-icon,
.pi {
color: $color-palette-gray-800;
}
}

&:hover {
background-color: $white;
}

&:active {
background-color: $white;
}

&:focus {
background-color: $color-palette-primary-200;

@include field-focus;
}
}

#text-danger-severity {
background-color: transparent;
color: $color-accessible-text-red;
Expand Down Expand Up @@ -223,6 +308,14 @@

#button-disabled-outlined {
border: $field-border-size solid $color-palette-gray-300;
background-color: $color-palette-gray-200;

&.p-button-icon-only {
.p-button-icon,
.pi {
color: $color-palette-gray-500;
}
}
}

#button-disabled-text {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ describe('EditEmaStore', () => {
state: EDITOR_STATE.IDLE,
code: undefined,
isVTL: false,
changedFromLoading: true
shouldReload: true
});
done();
});
Expand Down Expand Up @@ -619,7 +619,8 @@ describe('EditEmaStore', () => {
isLocked: false,
lockedByUser: ''
}
}
},
shouldReload: true
});
done();
});
Expand Down Expand Up @@ -659,8 +660,10 @@ describe('EditEmaStore', () => {
canLock: true,
isLocked: false,
lockedByUser: ''
}
}
},
variantId: undefined
},
shouldReload: true
});
expect(spyGetPage).toHaveBeenCalledWith(params);
expect(spyWhenReloaded).toHaveBeenCalled();
Expand Down Expand Up @@ -1073,7 +1076,7 @@ describe('EditEmaStore', () => {
state: EDITOR_STATE.IDLE,
code: '<html><body><h1>Hello, World!</h1></body></html>',
isVTL: true,
changedFromLoading: true
shouldReload: true
});
done();
});
Expand Down Expand Up @@ -1148,7 +1151,8 @@ describe('EditEmaStore', () => {
lockedByUser: ''
},
variantId: undefined
}
},
shouldReload: true
});
done();
});
Expand Down
Loading

0 comments on commit 9043f3d

Please sign in to comment.