Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: form-js-viewer styles export changes #789

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 0 additions & 39 deletions packages/form-js-carbon-styles/src/carbon-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -860,49 +860,10 @@ const DATETIME_INPUTS = css`
position: unset;
}

.flatpickr-calendar.static {
top: calc(100% + 3px);
}

.flatpickr-calendar .flatpickr-prev-month svg,
.flatpickr-calendar .flatpickr-next-month svg {
height: 16px;
}

.flatpickr-day.today {
position: relative;
color: var(--cds-link-primary);
font-weight: 600;
border-color: transparent;
}

.flatpickr-day.selected,
.flatpickr-day.today.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.today.selected:hover {
background-color: var(--cds-button-primary);
color: var(--cds-text-on-color);
}

.flatpickr-day:focus {
outline: 2px solid var(--cds-focus);
outline-offset: -2px;
}

.flatpickr-day.selected:focus {
outline: 0.0625rem solid var(--cds-focus);
outline-offset: -0.1875rem;
}

.flatpickr-day:hover {
background: var(--cds-layer-hover);
}

.flatpickr-days,
.flatpickr-weekdays {
padding: unset;
width: unset;
}
}
}
`}
Expand Down
51 changes: 51 additions & 0 deletions packages/form-js-viewer/assets/flatpickr-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@use "flatpickr/dist/themes/light.css";

/**
* Flatpickr style adjustments
*/

.fjs-container .flatpickr-day.today {
border-color: transparent;
background-color: transparent;
font-weight: bold;
}

.fjs-container .flatpickr-day.today:hover,
.fjs-container .flatpickr-day.today:focus {
border-color: var(--color-borders);
background-color: var(--color-datepicker-focused-day);
color: var(--color-text-inverted);
}

.fjs-container .flatpickr-day.selected {
border-color: var(--color-accent);
background-color: inherit;
color: inherit;
font-weight: normal;
}

.fjs-container .flatpickr-day.selected.today {
font-weight: bold;
}

.fjs-container .flatpickr-day.selected:hover,
.fjs-container .flatpickr-day.selected:focus {
background-color: var(--color-accent);
font-weight: bold;
color: var(--color-text-inverted);
border-color: var(--color-accent);
}

.fjs-container .flatpickr-days, .flatpickr-weekdays {
padding: 10px;
width: 100%;
}

.fjs-container .flatpickr-calendar.hasTime.noCalendar {
width: auto;
max-width: 250px;
}

.fjs-container .flatpickr-calendar {
width: 326px;
}
50 changes: 0 additions & 50 deletions packages/form-js-viewer/assets/form-js-base.css
Original file line number Diff line number Diff line change
Expand Up @@ -880,53 +880,3 @@
height: 64px;
margin: 4px 0;
}

/**
* Flatpickr style adjustments
*/

.fjs-container .flatpickr-day.today {
border-color: transparent;
background-color: transparent;
font-weight: bold;
}

.fjs-container .flatpickr-day.today:hover,
.fjs-container .flatpickr-day.today:focus {
border-color: var(--color-borders);
background-color: var(--color-datepicker-focused-day);
color: var(--color-text-inverted);
}

.fjs-container .flatpickr-day.selected {
border-color: var(--color-accent);
background-color: inherit;
color: inherit;
font-weight: normal;
}

.fjs-container .flatpickr-day.selected.today {
font-weight: bold;
}

.fjs-container .flatpickr-day.selected:hover,
.fjs-container .flatpickr-day.selected:focus {
background-color: var(--color-accent);
font-weight: bold;
color: var(--color-text-inverted);
border-color: var(--color-accent);
}

.fjs-container .flatpickr-days, .flatpickr-weekdays {
padding: 10px;
width: 100%;
}

.fjs-container .flatpickr-calendar.hasTime.noCalendar {
width: auto;
max-width: 250px;
}

.fjs-container .flatpickr-calendar {
width: 326px;
}
2 changes: 2 additions & 0 deletions packages/form-js-viewer/assets/form-js-carbon-compat.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@use "form-js-base";
@use "grid.scss";
3 changes: 3 additions & 0 deletions packages/form-js-viewer/assets/form-js.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@use "form-js-base";
@use "grid.scss";
@use "flatpickr-light.scss";
3 changes: 0 additions & 3 deletions packages/form-js-viewer/assets/index.scss

This file was deleted.

2 changes: 1 addition & 1 deletion packages/form-js-viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"build": "run-p bundle bundle:scss generate-types",
"start": "SINGLE_START=basic npm run dev",
"bundle": "rollup -c --failAfterWarnings --bundleConfigAsCjs",
"bundle:scss": "sass --no-source-map --load-path=\"../../node_modules\" assets/index.scss dist/assets/form-js.css",
"bundle:scss": "sass --no-source-map --load-path=\"../../node_modules\" assets/form-js.scss:dist/assets/form-js.css assets/flatpickr-light.scss:dist/assets/flatpickr-light.css assets/form-js-carbon-compat.scss:dist/assets/form-js-carbon-compat.css",
"bundle:watch": "run-p bundle:watch-js bundle:watch-scss",
"bundle:watch-js": "rollup -c -w --bundleConfigAsCjs",
"bundle:watch-scss": "npm run bundle:scss -- --watch",
Expand Down
1 change: 0 additions & 1 deletion packages/form-js-viewer/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export default [
copy({
targets: [
{ src: 'assets/form-js-base.css', dest: 'dist/assets' },
{ src: '../../node_modules/flatpickr/dist/themes/light.css', dest: 'dist/assets/flatpickr' }
]
})
]),
Expand Down
2 changes: 1 addition & 1 deletion packages/form-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"./dist/assets/form-js.css": "./dist/assets/form-js.css",
"./dist/assets/form-js-base.css": "./dist/assets/form-js-base.css",
"./dist/assets/dragula.css": "./dist/assets/dragula.css",
"./dist/assets/flatpickr/light.css": "./dist/assets/flatpickr/light.css",
"./dist/assets/flatpickr-light.css": "./dist/assets/flatpickr-light.css",
"./dist/assets/properties-panel.css": "./dist/assets/properties-panel.css",
"./dist/assets/form-js-editor.css": "./dist/assets/form-js-editor.css",
"./dist/assets/form-js-editor-base.css": "./dist/assets/form-js-editor-base.css",
Expand Down
3 changes: 1 addition & 2 deletions packages/form-js/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export default [
plugins: [
copy({
targets: [
{ src: '../../node_modules/@bpmn-io/form-js-viewer/dist/assets/**/*[!light].css', dest: 'dist/assets', },
{ src: '../../node_modules/@bpmn-io/form-js-viewer/dist/assets/flatpickr/*.css', dest: 'dist/assets/flatpickr', },
{ src: '../../node_modules/@bpmn-io/form-js-viewer/dist/assets/**/*.css', dest: 'dist/assets', },
{ src: '../../node_modules/@bpmn-io/form-js-editor/dist/assets/**/*.css', dest: 'dist/assets' },
{ src: '../../node_modules/@bpmn-io/form-js-playground/dist/assets/**/*.css', dest: 'dist/assets' },
{ src: '../../node_modules/@bpmn-io/form-js-carbon-styles/src/carbon-styles.js', dest: 'dist' }
Expand Down
Loading