Skip to content

Commit

Permalink
feat: apply changes for oruga v0.9.0 (#142)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmoravek authored Nov 11, 2024
1 parent 054f83d commit 7f65c6b
Show file tree
Hide file tree
Showing 15 changed files with 175 additions and 116 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" class="theme-light">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
Expand Down
44 changes: 26 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@
"update": "ncu -u"
},
"peerDependencies": {
"@oruga-ui/oruga-next": "0.9.0-pre.2"
"@oruga-ui/oruga-next": "0.9.0"
},
"dependencies": {
"bulma": "1.0.2"
},
"devDependencies": {
"@oruga-ui/examples": "0.9.0-pre.2",
"@oruga-ui/oruga-next": "0.9.0-pre.2",
"@oruga-ui/examples": "0.9.0",
"@oruga-ui/oruga-next": "0.9.0",
"@types/node": "^22.9.0",
"@vitejs/plugin-vue": "5.1.4",
"@vue/eslint-config-prettier": "^10.1.0",
Expand Down
9 changes: 6 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ import components from "@/components";
main {
flex-grow: 1;
width: 100%;
height: 100vh;
padding: 2rem;
padding-bottom: 6rem;
overflow-y: scroll;
padding-left: calc(var(--vp-sidebar-width) + 2rem);
> section {
padding: 1rem 0;
Expand All @@ -56,6 +57,8 @@ import components from "@/components";
}
#nav {
position: fixed;
left: 0;
display: flex;
flex-direction: column;
height: 100vh;
Expand Down Expand Up @@ -84,7 +87,7 @@ import components from "@/components";
font-size: 1rem;
&.router-link-exact-active {
color: #2c3e50;
color: var(--vp-c-brand-1);
}
}
}
Expand All @@ -97,7 +100,7 @@ import components from "@/components";
}
@media (max-width: 576px) {
#main {
#app {
#nav {
display: none;
}
Expand Down
29 changes: 21 additions & 8 deletions src/assets/scss/components/_datepicker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -56,25 +56,38 @@ $datepicker-event-background-color: css.getVar("grey-light") !default;
}
}

// unset opacity when dropdow is disabled
.dropdown {
// dropdown override
.dropdown,
&.dropdown {
// unset opacity when dropdow is disabled
&.is-disabled {
opacity: 1;
}
}

.dropdown-item {
font-size: inherit;
.dropdown-menu {
.dropdown-item {
@include css.register-vars(
(
"dropdown-item-background-l-delta": "transparent",
)
);
font-size: inherit;
padding-inline-end: 1rem;
}
}
}

.datepicker-header {
padding-bottom: 0.875rem;
margin-bottom: 0.875rem;
border-bottom: 1px solid css.getVar("grey-lighter");

.pagination-previous,
.pagination-next {
border-width: css.getVar("button-border-width");
.pagination {
button.pagination-previous,
button.pagination-next {
border-width: css.getVar("button-border-width");
border-radius: css.getVar("control-radius");
}
}
}

Expand Down
22 changes: 8 additions & 14 deletions src/assets/scss/components/_dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@use "bulma/sass/utilities/css-variables" as css;
@use "bulma/sass/utilities/mixins" as mixins;

@use "bulma/sass/components/dropdown" as dropodown;

/* @docs */
$dropdown-mobile-breakpoint: vars.$desktop !default;
$dropdown-background-background-color: hsla(
Expand Down Expand Up @@ -44,6 +46,10 @@ $dropdown-z: 40 !default;
}

.dropdown-item {
@extend a;

cursor: pointer;

&.is-disabled {
cursor: not-allowed;
opacity: css.getVar("dropdown-disabled-opacity");
Expand Down Expand Up @@ -86,6 +92,7 @@ $dropdown-z: 40 !default;
position: static;
display: inline-block;
padding: 0;
overflow: auto;
z-index: 0;
}

Expand Down Expand Up @@ -176,23 +183,10 @@ $dropdown-z: 40 !default;
overflow-y: auto;
z-index: calc(css.getVar("dropdown-z") + 10);

> .dropdown-item,
> .has-link a {
> .dropdown-item {
padding: 1rem 1.5rem;
}
}
}
}

// polyfills for other stuff

.dropdown-menu .has-link a {
@extend .dropdown-item;
padding-right: 3rem;
white-space: nowrap;
}

.navbar-item {
height: 100%;
}
}
10 changes: 10 additions & 0 deletions src/assets/scss/components/_input.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
@use "utils/variables" as var;

.control {
display: inline-block;

&.is-expanded {
width: 100%;
}

> .icon {
@each $name, $value in var.$sizes-map {
&.is-#{$name} {
font-size: #{$value};
}
}
}
}
14 changes: 13 additions & 1 deletion src/assets/scss/components/_menu.scss
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
// nothing todo here
@use "bulma/sass/utilities/css-variables" as css;

.menu {
.menu-item {
&.is-disabled {
@include css.register-vars(
(
"menu-item-background-l-delta": -10%,
)
);
}
}
}
4 changes: 4 additions & 0 deletions src/assets/scss/components/_modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@
max-height: 100vh;
margin: 0;
}

.modal-content {
width: auto;
}
}
17 changes: 8 additions & 9 deletions src/assets/scss/components/_select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@
color: rgba(css.getVar("grey"), 0.7);
}

&:has(+ .icon) {
padding-right: css.getVar("input-height");
&.has-icon-left {
padding-left: css.getVar("input-height");
}
}

&.has-icons-left {
select {
padding-left: css.getVar("input-height");
&.has-icon-right {
padding-right: css.getVar("input-height");
}
}

&.has-icons-right {
select {
padding-right: css.getVar("input-height");
// remove arrow if not has arrow
&:has(select:not(.has-arrow) + .icon) {
&::after {
display: none;
}
}

Expand Down
38 changes: 19 additions & 19 deletions src/assets/scss/components/_steps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@ $steps-vertical-padding: 1em 0 !default;
/* @docs */

.steps-wrapper {
.steps {
@include css.register-vars(
(
"steps-size": #{var.$size-normal},
"steps-divider-height": #{$steps-divider-height},
"steps-details-background-color": #{$steps-details-background-color},
)
);
@include css.register-vars(
(
"steps-size": #{var.$size-normal},
"steps-divider-height": #{$steps-divider-height},
"steps-details-background-color": #{$steps-details-background-color},
)
);

// sizes
@each $name, $value in var.$sizes-map {
&.is-#{$name} {
@include css.register-vars(
(
"steps-size": #{$value},
)
);
}
}

.steps {
display: flex;
flex-wrap: wrap;
font-size: css.getVar("steps-size");
min-height: calc(css.getVar("steps-size") * 2);
list-style: none;

// sizes
@each $name, $value in var.$sizes-map {
&.is-#{$name} {
@include css.register-vars(
(
"steps-size": #{$value},
)
);
}
}

&.is-animated {
.step {
&:not(:first-child),
Expand Down
Loading

0 comments on commit 7f65c6b

Please sign in to comment.