Git Product home page Git Product logo

theme-bulma's Introduction

Bulma theme for Oruga

Install

npm install @oruga-ui/theme-bulma

or

yarn add @oruga-ui/theme-bulma

Configure

import { createApp } from 'vue'
import App from './App.vue'

import Oruga from '@oruga-ui/oruga-next'
import { bulmaConfig } from '@oruga-ui/theme-bulma'

import '@oruga-ui/theme-bulma/dist/bulma.css'

createApp(App)
    .use(Oruga, bulmaConfig)
    .mount('#app')

Please note, the package also works for @oruga-ui/oruga (Vue 2) and you can use it without importing the full Oruga bundle.

Customization (SASS/SCSS)

Using the following sample code you don't need import '@oruga-ui/theme-bulma/dist/bulma.css' but you have to add a custom sass/scss file to customize Bulma and theme variables.

@import "~bulma/sass/utilities/_all";

// Set your colors
$primary: #8c67ef;
$primary-light: findLightColor($primary);
$primary-dark: findDarkColor($primary);
$primary-invert: findColorInvert($primary);
$twitter: #4099FF;
$twitter-invert: findColorInvert($twitter);

// Lists and maps
$custom-colors: null !default;
$custom-shades: null !default;

// Setup $colors to use as bulma classes (e.g. 'is-twitter')
$colors: mergeColorMaps(
    (
        "white": (
            $white,
            $black,
        ),
        "black": (
            $black,
            $white,
        ),
        "light": (
            $light,
            $light-invert,
        ),
        "dark": (
            $dark,
            $dark-invert,
        ),
        "primary": (
            $primary,
            $primary-invert,
            $primary-light,
            $primary-dark,
        ),
        "link": (
            $link,
            $link-invert,
            $link-light,
            $link-dark,
        ),
        "info": (
            $info,
            $info-invert,
            $info-light,
            $info-dark,
        ),
        "success": (
            $success,
            $success-invert,
            $success-light,
            $success-dark,
        ),
        "warning": (
            $warning,
            $warning-invert,
            $warning-light,
            $warning-dark,
        ),
        "danger": (
            $danger,
            $danger-invert,
            $danger-light,
            $danger-dark,
        ),
    ),
    $custom-colors
);

// Links
$link: $primary;
$link-invert: $primary-invert;
$link-focus-border: $primary;

@import "~bulma/bulma";
@import '~@oruga-ui/theme-bulma/dist/scss/bulma';

Override default config

In case you want to replace the default style of a component you can override or add new classes changing bulmaConfig; more details about components customization on https://oruga.io/documentation/#customization

import { createApp } from 'vue'

import Oruga from '@oruga-ui/oruga-next'
import { bulmaConfig } from '@oruga-ui/theme-bulma'

import '@oruga-ui/theme-bulma/dist/bulma.css'

const customBulmaConfig = {
    ...bulmaConfig,
    checkbox: {
        override: true,
        rootClass: 'checkbox'
    }
}

createApp(App)
    .use(Oruga, customBulmaConfig)
    .mount('#app')

Buefy users

Components

Buefy Oruga Note
Taginput Inputitems
Toast N.A. You can customize Notification with noticeClass and/or passing a component using programmatic way
Snackbar N.A. You can customize Notification with noticeClass and/or passing a component using programmatic way

At the moment you won't find Carousel, Dialog, Navbar, Menu but we'll add them soon in Oruga core code.

Props

Buefy Oruga Component Note
type variant - Removed prefix is-
size size - Removed prefix is-
loading N.A. - Not supported
label-position N.A. Field Not suppported but you can easily add is-floating-label or is-floating-in-label class to root-class prop
size N.A. Tooltip You can use multiline-class or content-class
custom N.A. Dropdown Item You can use tag prop
has-modal-card N.A. Modal You have to add content-class="modal-content" when you don't use modal-card classes as content

Contributors

Thank you to everyone involved for improving this project, day by day 💚

Complete list.

Credits

Logo designed by rubjo

License

Code released under MIT license.

theme-bulma's People

Contributors

admhpr avatar astagi avatar blm768 avatar donovanglover avatar dwhoop55 avatar idank avatar ilyasemenov avatar jewpaltz avatar jtommy avatar levirs565 avatar mattze avatar messenjer avatar miguemartelo avatar milad-mirkarimi avatar mllull avatar pablosirera avatar rubjo avatar subdavis avatar thedomeffm avatar themodernpk avatar u-ashish avatar urkle avatar whiplashwebb avatar ztefn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

theme-bulma's Issues

Example of tree shaking usage

I can't find documentation on how to use bulma theme with tree shaking.

createApp(...)
  .use(Autocomplete, bulmaConfig)
  .use(Sidebar, bulmaConfig)

This doesn't seem to work. But .use(Oruga, bulmaConfig) does work.

Thanks!

o-table pagination issue

Hey guys, I'm currently trying to integrate Oruga into my app that has been using Buefy.

I'm using Oruga 0.5.2 and theme-bulma 0.2.1.

I'm having an issue with the appearance of the pagination section when I use the Oruga Table Component o-table.

When I compare it to Buefy's pagination for b-table, I notice that all the level classes aren't being applied. For example: level top, level-right, level-left and so on.

As a temporary fix, I manually wrote the scss for the level classes to be applied to the pagination divs.

I've included the styles below...

I think a more permanent solution will have to be an update to both theme-bulma and oruga. Oruga needs to have the customizations for those divs so theme-bulma can set the configuration for the level classes. Right now, the only customization for this is paginationWrapperClass, and theme-bulma sets this to empty when it should at least make it the level class.

// Temp solution to getting the pagination to look right.
.b-table.table-wrapper {
  margin-bottom: 0;

  .pagination-link {
    padding-left: 0.5em;
    padding-right: 0.5em;
  }

  + div {
    padding: 1.125rem 1.5rem;
    margin: 0;
    border-top: rgba(24, 28, 33, 0.06);
    background: #f5f5f5;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;

    div {
      display: flex;
      flex-basis: auto;
      -webkit-box-flex: 0;
      flex-grow: 0;
      flex-shrink: 0;
      -webkit-box-align: center;
      -ms-flex-align: center;
      align-items: center;
    }
    div:nth-child(1) {
      -webkit-box-pack: start;
      -ms-flex-pack: start;
      justify-content: flex-start;
    }
    div:nth-child(2) {
      -webkit-box-pack: end;
      -ms-flex-pack: end;
      justify-content: flex-end;

      div {
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        flex-basis: auto;
        -webkit-box-flex: 0;
        flex-grow: 0;
        flex-shrink: 0;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
      }
    }
  }
}

table with mobile cards not working with Bulma theme

Overview of the problem

NOTE: This is also reported as an issue in oruga-ui/oruga

I am currently using these versions of Oruga and theme-bulma

"@oruga-ui/oruga": "^0.5.9",
"@oruga-ui/theme-bulma": "^0.2.9",
"vue": "2.7.5",

**OS/Browser**: Chrome

Description

I am replacing all references to Buefy tables (<b-table>) with Oruga tables (<o-table>) as part of our eventual upgrade to Vue 3.

I have one instance where the <b-table> will convert to cards on mobile, but it will not with my <o-table> replacement.

When I look at the table in Chrome dev tools, I see this code for the

<div class="b-table is-mobile">
    <div style="display: none;"> ... </div>
    <div class="table-wrapper ">
        <table class="table> ...</table>
    </div>
</div>

When I compare the Buefy table with the Oruga table, I can get it to display as a card by manually updating the CSS for this line to be this:

    <div class="table-wrapper has-mobile-cards">

If you look at the initial code snippet I have above, it puts a blank space after the class for table-wrapper but is not adding the additional class has-mobile-cards. The presence of the space looks like it wants to add that additional class but does not, which is causing the table to not display as a card on mobile.

The Bulma CSS will format it correctly as a card, but it needs to see the classes of .table-wrapper.has-mobile-cards. Without both classes, it will not format as a card.

Steps to reproduce

  1. Install Oruga and Bulma Theme with Vue 2
  2. Resize the browser window so it looks like a mobile device
  3. Table does not convert to a card

Expected behavior

The o-table should display as a card on mobile and look like this:

Screenshot 2023-05-30 at 5 27 44 PM

Actual behavior

The o-table on mobile is displayed as a table instead of a card. It looks like this:

Screenshot 2023-05-30 at 5 22 47 PM

inputitems sizing does not work correctly.

When I set the size to small

<o-inputitems size="small"/>

the component display small initially, however as soon as an entry is selected it increases in size.

The issues I've found so far are:

  1. when blank the o-inputitems component renders at 30.7px high (vs a o-input control as small renders at 30px)

    • this causes visual discontinuity between the two components when next to each other (e.g. as filter on an o-table)
      image
  2. when an entry is added to the o-inputitems the size increases to 36.1667px
    image

Other sizes are also not inline either.
default 40 vs 39.8
medium 50 vs 48.9
large 60 vs 58

for Buefy the taginput sizes are 29.6, 39.8, 50, 60.2 and do not have the issue of changing sizes with or without the "tags".

Programmatically opened Modal not showing

Bulma uses the is-active class in combination with modal (https://bulma.io/documentation/components/modal/). When opening a modal programmatically one needs to add active: true to the props or the modal will be added to the DOM, but not be displayed.

  this.$oruga.modal.open({
    parent: this,
    component: ModalForm,
    // Needs 'active' to show
    active: true,
  });

As the Oruga demo code works without adding the active: true I'd propose to adjust this behaviour in the bulmaConfig.
Since each programmatically launched Modal has programmatic == true set this can be easily done by overwriting the rootClass like so:

Vue.use(Config, {
  ...bulmaConfig,
  modal: {
    ...bulmaConfig.modal,
    rootClass: (_, { props }) => {
      const classes = ['modal'];
      if (props.active || props.programmatic) {
        classes.push('is-active');
      }
      return classes.join(' ');
    },
  },
})

I've built a working demo here: https://codesandbox.io/s/oruga-bulma-modal-u72gq

To adapt this change we would need to change

if (props.active) classes.push('is-active')

I'll prepare a tiny PR which can then be accepted or rejected depending on if this behaviour is desired.

[Fixed] Dependency @oruga-ui/bulma-theme could not be found.

For some god forsaken reason my project today did not run, I got ... Dependency @oruga-ui/bulma-theme could not be found. but the dependency was certainly there in node_modules.

Found out that for some reason whenever I was doing npm install @oruga-ui/theme-bulma npm was adding "@oruga-ui/theme-bulma": "github:oruga-ui/theme-bulma", to package.json instead of "@oruga-ui/theme-bulma": "^0.2.4"

Doing npm i @oruga-ui/[email protected] fixed my Issue and now even doing the normal npm install will not add the github bit, weird.

The problem is fixed in my end. I write this just in case anyone ever has same problem.

Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Using Nuxt 3 and building my project gives this warning for several component scss :

Deprecation Warning: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($switch-width, 2)

Found in :

  • dist/scss/components/_switch.scss 32:23
  • dist/scss/components/_switch.scss 50:26
  • dist/scss/components/_switch.scss 51:27
  • dist/scss/components/utils/_functions.scss 17:18
  • dist/scss/components/_slider.scss 20:17

It was apparently fixed in Bulma since 0.9.3 :
jgthms/bulma#3364 (comment)

Notification renders double close button

First off, great library, keep up the good work!

I'm using @oruga-ui/oruga-next 0.5.6 and @oruga-ui/theme-bulma 0.2.7 in a Vue 3 app with fontawesome. When I open a notification like this

	const { oruga } = useProgrammatic();
	oruga.notification.open({
		message: 'This is a test error message',
		variant: 'danger',
		closable: true,
	});

oruga creates a notification with a double close button like this

Screen Shot 2022-09-16 at 12 39 03 PM

This issue is theme applies bulma's delete class to the close element (creating the circular close button using css) and also generates an icon using the default value of the closeIcon prop in the component. I was able to get around this problem by passing an empty string for closeIcon in my config like this:

import oruga from '@oruga-ui/oruga-next';
import { bulmaConfig } from '@oruga-ui/theme-bulma';
import { merge } from 'lodash';

export const overrideConfig = {
	notification: {
		// This removes a duplicate close icon
		closeIcon: '',
	},
};

app.use(oruga, merge(bulmaConfig, overrideConfig));

I would recommend making this a part of the theme for a smoother dev experience.

Duplicated close icons

The problem affects Modal, Inputitems and probably other closable components (based on #65)

image

Oruga, by default, uses "close" icon. Bulma, on the other hand, uses "delete" class. In the result both close icons appears:

<span class="tag">
  <span>rock</span>
  <span class="icon is-clickable delete is-small"> <!-- delete class (bulma) -->
    <i class="mdi mdi-close mdi-24px"></i> <!-- close icon (oruga) -->
  </span>
</span>

Is there any way to fix this other than using empty close icon or template slot? Maybe it could be fixed within the theme itself?

<OInputitems close-icon="" />

<OInputitems>
  <slot #selected>
    <!-- customized template -->
  </slot>
</OInputitems>

Update to Latest Bulma v1

Hello everyone,

I'm writing to request an update to be compatible with the latest version of Bulma version 1, which was released today (March 21, 2024). I understand that this has just been launched and the update might require some challenges. This issue is merely to bring it to our attention for future consideration.

Thanks and best regards.

Upload component shows extra, standard HTML "Choose File" button

Vue version: 3.2.25
Bulma theme: 0.2.2
Oruga: 0.5.4

Using the example of the base Upload component in the Oruga documentation, I'm getting two buttons: one o-button, and one that seems to be the standard upload element's button reading "Choose File".

I haven't looked into it yet, but has this component been confirmed working before with the Bulma plugin? Can't use it like this. :)

Cannot load externally because of unexpected characters in global namespace

Hello,

I like to load theme-bulma externally using webpack. But because the global name @orugaUi/themeBulma used in bulma.js contains non-ascii characters this is not possible. Works fine if I modify the bulma.js file myself to use a global name such as themeBulma.

Is there any chance the global name will be changed to something compatible with webpack in the near future? Or do you see this as a bug in webpack itself?

vue.config.js

  module.exports.configureWebpack = {
    externals: {
      "@oruga-ui/oruga-next": 'Oruga',
      "@oruga-ui/theme-bulma": "@orugaUi/themeBulma"
    }
  }

npm run build

Unexpected character '@' (1:35)
| var __WEBPACK_NAMESPACE_OBJECT__ = @orugaUi/themeBulma;
while analyzing module external var "@orugaUi/themeBulma" for concatenation

 ERROR  Error: Build failed with errors.

[Bug Report] position="" for o-tabs is not working

Overview of the problem

Oruga version: [0.6.0]
Vuejs version: [3.2.47]
OS/Browser: Windows 11/Firefox
theme-bulma: [0.2.10]

Description

The tab items should be centered after adding position="centered" but it's not being centered.

Steps to reproduce

  1. add position="centered" to o-tabs

Expected behavior

image

Actual behavior

image

[Bug Report] Close icon for bulma theme modal is abnormal

Overview of the problem

Oruga version: [0.6.0]
Vuejs version: [3.2.47]
OS/Browser: Windows 11/Firefox
theme-bulma: [0.2.10]

Description

The close icon for modal is being overlapped by the small sized close icon, even I use closeIconSize to make it bigger but also not working.

Steps to reproduce

  1. Click the open modal button
  2. Pop up modal

Expected behavior

image

Actual behavior

image

Incorrect passwordVisibleIcon

Overview of the problem

Oruga version: [0.8.5]
Vuejs version: [3.4.21]
OS/Browser: Windows 11, Firefox

Description

Currently, the eye icon will be shown when the password is invisible
image

Currently, the eye-off icon will be shown when the password is visible
image

Steps to reproduce

  1. add a password input
  2. add passwordReveal prop
  3. type something
  4. the eye icon will be shown when the password is invisible

Expected behavior

eye-off icon will be shown when the password is invisible and eye icon will be shown when the password is visible.

Actual behavior

it shows eye-off icon when the password is visible and eye icon when the password is invisible.

Feature: loading style

  • Loading style using Buefy scss
  • Add a few examples

Keep in mind that Oruga offers a slot with a default icon so it won't be necessary to add the default Buefy spinner.

Datepicker header fields are not attached

Hello,

I have an issue with the datepicker component: month and year fields are not attached.

Following HTML rendered (differences seems to be <div class="pagination-list"> children) and screenshots

With Buefy (0.9.10) / bulma (0.9.3), I got this:

image

      <div class="field">
        <!---->
        <div class="field-body">
          <div class="field has-addons">
            <!---->
            <div class="control">
              <span class="select"><select>
                  <!---->
                  <option value="0"> January </option>
                  ...

            <div class="control">
              <span class="select">
                <select>
                  <!---->
                  <option value="2022"> 2022 </option>

And now with oruga-next: (0.5.4) / theme-bulma (0.2.3), it display like this:

image

    <div class="pagination-list">
      <div class="control select">
        <select class="">
          <!--v-if-->
          <option value="0">January</option>
          ...

      <div class="control select">
        <select class="">
          <!--v-if-->
          <option value="2022">2022</option>

I presume we need to have this missing part:

<div class="field">
  <div class="field-body">
    <div class="field has-addons">

I tried to add the Bulma field has-addons classes to the div.pagination-list using the listsClass prop but it overflows 😞:

image

Last (ugly) try, I updated the .dropdown-menu with min-width: 25rem ...

Docs: New logo

Using Oruga logo and Bulma logo "draw" a new logo to publish in the Readme and in the official docs.

Your profile will be mentioned in the README 🎉

Missing declaration file

The types are currently not exposed to the NPM package. This makes my environment angry.

Thanks

Switch disabled style is not applied

Hello,

I do not know if it is a theme-bulma or oruga issue but a switch with disabled property set is not render as expected (with cursor: not-allowed; and color: #7a7a7a;

Following example:

<o-switch v-model="status" disabled />

Render like this:

<label class="switch is-rounded">
  <input type="checkbox" class="" disabled="" true-value="true" false-value="false" value="false">
  <span class="check">
    ::before
    <span class=""></span>
  </span>
  <span class="control-label">
  </span>
</label>

Previously with buefy (0.9.10) / bulma (0.9.3):

<label disabled="disabled" class="switch is-disabled is-rounded">
  <input type="checkbox" disabled="disabled" true-value="true" value="false">
  <span class="check">
    ::before
  </span>
  <!---->
</label>

It seems disabled="disabled" is missing in label tag. After adding manually in DOM it works as expected.

oruga-next: "0.5.4"
theme-bulma: "0.2.2",
vue: "3.2.31",

sass/scss customization with Nuxt 3

Hi,
I have a fresh installation with nuxt3, oruga-next and theme-bulma configured with the plugin as described in this comment. Everything works as expected.
I have several unsuccessful attempts of sass/scss customization.
I think that following this and this docs, the attempts closest to the correct implementation are both with the same nuxt.config.js:

nuxt.config.js

export default defineNuxtConfig({
  css: [
    'assets/scss/style.scss'
  ],
})

With

assets/scss/style.scss

@import "bulma/sass/utilities/_all";

$custom: red;
$primary: $custom;

@import "bulma/bulma";
@import '@oruga-ui/theme-bulma/dist/scss/bulma';

But customs variables are not applied.

Or:

assets/scss/style.scss

@import "bulma/sass/utilities/_all";

$custom: red;
$primary: $custom;

@import "bulma/bulma";
@import '@oruga-ui/theme-bulma/dist/scss/bulma';
@import '@oruga-ui/oruga-next/src/scss/oruga-full-vars';

package.json

{
  "devDependencies": {
    "nuxt": "^3.3.1",
    "sass": "^1.59.3",
    "sass-loader": "^13.2.1"
  },
  "dependencies": {
    "@oruga-ui/oruga-next": "^0.5.10",
    "@oruga-ui/theme-bulma": "^0.2.9",
  }
}

I get the error:

 ERROR  [sass] Expected identifier.                                                                                                                        
  ┌──> node_modules/@oruga-ui/oruga-next/src/scss/components/_button.scss
65│         &--#{$name} {
  │              ^^^^^ 
  ╵
  ╷
1 │ &--2.5rem 
  │      ━ error in interpolated output
  ╵
  node_modules/@oruga-ui/oruga-next/src/scss/components/_button.scss 65:14  @import
  node_modules/@oruga-ui/oruga-next/src/scss/oruga-common.scss 10:9         @import
  node_modules/@oruga-ui/oruga-next/src/scss/oruga-full-vars.scss 5:9       @import

Which is the correct method to customize the scss?
Thanks

Please provide examples on how to use theme-bulma with Vue 2, especially when importing single components

the readme states: 'Please note, the package also works for @oruga-ui/oruga (Vue 2) and you can use it without importing the full Oruga bundle.'.

I am using Vue 3 however, but am using the Options API like so.

import { OButton } from '@oruga-ui/oruga-next';
import { bulmaConfig } from '@oruga-ui/theme-bulma';

export default {
  components: {
    OButton
  }
  ...blah blah blah
}

But how would I use the bulmaConfig to configure that individual components where there are needed? I really do not want to import the entire package into my app, I only need a few components.

Table scrolling not working

Versions

vue: 3.2.33
@oruga-ui/oruga-next: 0.5.5
@oruga-ui/theme-bulma: 0.2.5

Issue

With the Bulma theme, the Oruga table prop scrollable doesn't make the table scrollable. This property works fine with oruga-next.

image

Note how there is no scrollbar at the bottom of the table, despite the content overflowing the width of the table.

On further investigation, it appears that the table wrapper is being given class is-scrollable which isn't used in the Bulma style.

Docs: Disappearance of buttons

Sometimes, when reloading the page (F5 or CTRL + F5), the buttons are no longer displayed.

Screenshot

The problem only occurs in the context of the Bulma theme. I have also encountered this error in different browsers.

sticky-header on table does not work with theme-bulma

adding the sticky-header prop on an o-table when using theme-bulma does nothing as

  1. the configuration does not set a class for stickyHeaderClass
  2. when using "has-sticky-header" it some-what works
    • the first TR in the thead sticks
    • sticky columns, however, do not work

Other usability-questions regarding sticky Headers.

  1. how does one get the filter row to also be sticky?
  2. how does one control the height of the table when in "sticky" mode. It seems odd to fix it at 300px always. (on a per-table basis not globally)

is-active class is applied to all the link of a dropdown

Using

<div class="navbar-item" v-if="isConnected">
  <o-dropdown dusk="agency-menu" ariaRole="list" v-if="hasRole(['agent', 'admin'])" >
    <template #trigger="{ active }">
      <o-button variant="primary">
        <span><o-icon icon="home" /></span>
        <o-icon :icon="active ? 'menu-up' : 'menu-down'"></o-icon>
      </o-button>
    </template>

    <o-dropdown-item
      tag="router-link"
      :to="{name: 'agency.show', params: { agency_id: user.agency_id}}"
      aria-role="listitem"
      >
      My agency
    </o-dropdown-item>
    <o-dropdown-item
      tag="router-link"
      :to="{name: 'appointment.agency'}"
      aria-role="listitem"
      >
      Appointments pool
    </o-dropdown-item>
  </o-dropdown>
</div>

When you use a link from the dropdown, all the link are set has active.

You can put value on the link to avoid the bug.

Feature: create packaging

This repository aims to bring a default configuration to use Oruga components with Bulma styles.

We need some help to

  • create build scripts
  • reorganize code
  • reorganize dependencies

to make it ready to be built as a NPM package.

Incorrect validation color

Overview of the problem

Oruga version: [0.8.5]
Vuejs version: [3.4.21]
OS/Browser: Windows 11, Firefox

Description

When i submit a form without filling any value, the inputs should be turned to red color and red color message will be shown. However, the color is incorrect.

Steps to reproduce

  1. add required attribute to <OInput />

Expected behavior

image

Actual behavior

image

Switch not showing after upgrade to Oruga 0.5.x

After upgrading to Oruga 0.5, the Switch component did not show on screen, as can be seen here:
image
if I remove theme-bulma, the switch appears again, as can be seen here:
image
the HTML code is:

<OField label="Estado">
      <OSwitch v-model="estado_cliente"
                      true-value="Activo"
                      false-value="Inactivo"
        >
            {{ estado_cliente }}
         </OSwitch>
</OField>

and the app file is:

import './plageco_iconos'

import { createApp } from 'vue'
import App from './components/landing/App.vue'
import router from './router/index_back'
import store from './store'
import mitt from 'mitt'
import Oruga from '@oruga-ui/oruga-next'
import { bulmaConfig } from '@oruga-ui/theme-bulma'

import '../sass/backplageco.scss'

// import '@oruga-ui/oruga-next/dist/oruga.css'

import '@oruga-ui/theme-bulma/dist/bulma.css'

const plagecov1 = createApp(App)

const emitter = mitt()

plagecov1.config.globalProperties.emitter = emitter

// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const customBulmaConfig = {
    ...bulmaConfig,
    iconPack: 'far'
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
plagecov1.use(Oruga, customBulmaConfig)
// plagecov1.use(Oruga)

plagecov1.use(store).use(router).mount('#app')

I think that some detil sliped during the Oruga upgrade and is afecting theme-bulma.
Will be alert for any test request or aditional information needed.

Feature: sidebar style

  • Sidebar style using Buefy scss
  • Add a few examples

Probably not all Buefy features will be available on Oruga components but please write them as note in the PR.

Bulma: expanded autocomplete doesn't expand

Overview of the problem

Oruga version: 0.6.0
Bulma theme version: 0.2.9
Vuejs version: 3.2.47
OS/Browser: Chrome 112

Description

Autocomplete with expanded doesn't set expanded class on the outer element (class="autocomplete control"). It sets the class on the inner nested control, where it is disregarded by Bulma.

Steps to reproduce

<o-field>
  <o-autocomplete expanded />
  <p class="control">
    <o-button>
      <o-icon icon="close" />
    </o-button>
  </p>
</o-field>

Expected behavior

is-expanded is added to the direct child of field has-addons:

<div class="control">
  <div class="field has-addons">
    <div class="autocomplete control is-expanded">
      <div class="control">
        <input
          aria-autocomplete="list"
          class="input"
          type="text"
          autocomplete="off"
        /><!--v-if--><!--v-if--><!--v-if-->
      </div>
      <div
        class="dropdown-menu dropdown-content is-opened-bottom"
        is="div"
        style="display: none"
      >
        <!--v-if--><!--v-if--><!--v-if--><!--v-if-->
      </div>
    </div>
    <p class="control">
      <button type="button" class="button">
        <span class="button-wrapper"
          ><!--v-if--><span class=""
            ><span class="icon"
              ><i class="mdi mdi-close mdi-24px"></i></span></span
          ><!--v-if--></span
        >
      </button>
    </p>
  </div>
</div>
image

(In fact, the inner <div class="control"> wrapper is probably not needed at all.)

Actual behavior

is-expanded is misplaced and doesn't work (see screenshot below):

<div class="control">
  <div class="field has-addons">
    <div class="autocomplete control">
      <div class="control is-expanded">
        <input
          aria-autocomplete="list"
          class="input"
          type="text"
          autocomplete="off"
        /><!--v-if--><!--v-if--><!--v-if-->
      </div>
      <div
        class="dropdown-menu dropdown-content is-opened-bottom"
        is="div"
        style="display: none"
      >
        <!--v-if--><!--v-if--><!--v-if--><!--v-if-->
      </div>
    </div>
    <p class="control">
      <button type="button" class="button">
        <span class="button-wrapper"
          ><!--v-if--><span class=""
            ><span class="icon"
              ><i class="mdi mdi-close mdi-24px"></i></span></span
          ><!--v-if--></span
        >
      </button>
    </p>
  </div>
</div>
image

Problems with mouse hovering for slider and dropdown component

Hi everybody,
Because Vue 2 is EOL now, I finally want to migrate some older projects from Vue 2 to Vue 3.
Because Buefy doesn't support Vue 3 I would like to migrate the UI toolkit to Orgua with the Bulma theme as well.

However, during my evaluation of the Orgua I noticed a lot of hover issue that seem to be present when using Firefox (119) and Chrome (120) (both on Linux).
I will show you a few screen recordings that I took from the website.

The first one is regarding the Slider component, which my website uses quite a lot.
As you can see, as soon as you move the mouse over the thumb, the tooltip appears but flickers heavily.
This seems to be the case with both Bulma and Bootstrap theme.
Screencast from 2024-01-08 15-38-39.webm

The next issue I noticed is the dropdown component in hover mode when using smaller screen sizes.
As you can see, as soon as you move the mouse over the dropdown component, the menu opens (correct) but also the whole screen turns dark, because apparently an overlay is added.
Screencast from 2024-01-08 15-47-33.webm

Are those known issues?
And if yes, I would like to ask if this UI toolkit can be considered to be production ready or more of a work-in-progress project?

Edit: In both cases, the base Orgua style seems to be unaffected.

How to set mdi icons

Hello,
how can I add mdi icons in theme?
my main.js:
import '@oruga-ui/theme-bulma/dist/bulma.css'
import { bulmaConfig } from '@oruga-ui/theme-bulma'
createApp(App).use(Oruga, bulmaConfig).use(router).mount('#app')

Thanks!

datepicker appearance with month type

Hi,

Thank you very much for the project!

My environment:

With the following code (from Oruga documentation):

<o-datepicker
  placeholder="Click to select..."
  icon="calendar"
  type="month"
  >
</o-datepicker>

I get the following result:
image

From Oruga documentation (https://oruga.io/components/datepicker.html), I should get something like this:
image

firefox inspector gives the following html:
<div class="dropdown dropdown-menu-animation is-active" aria-modal="true"><div tabindex="-1" class="dropdown-trigger" aria-haspopup="true"><div class="control has-icons-left"><input placeholder="Click to select..." readonly="" class="input" type="text" autocomplete="off"><span class="icon is-left"><!-- custom icon component --><svg class="svg-inline--fa fa-calendar" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="calendar" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path class="" fill="currentColor" d="M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"></path></svg></span><!--v-if--><!--v-if--></div></div><div class="background" aria-hidden="false" style=""></div><div is="div" class="dropdown-content dropdown-menu" aria-hidden="false" role="dialog" aria-modal="true" style=""><div class="dropdown-item" tabindex="0"><header class="datepicker-header"><div class="pagination field is-centered"><a class="pagination-previous" role="button" href="#"><span class="icon is-clickable"><!-- custom icon component --><svg class="svg-inline--fa fa-angle-left" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="angle-left" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path class="" fill="currentColor" d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 246.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"></path></svg></span></a><a class="pagination-next" role="button" href="#"><span class="icon is-clickable"><!-- custom icon component --><svg class="svg-inline--fa fa-angle-right" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="angle-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path class="" fill="currentColor" d="M278.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-160 160c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L210.7 256 73.4 118.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l160 160z"></path></svg></span></a><div class="pagination-list"><!--v-if--><div class="control select"><select class=""><!--v-if--><option value="2032">2032</option><option value="2031">2031</option><option value="2030">2030</option><option value="2029">2029</option><option value="2028">2028</option><option value="2027">2027</option><option value="2026">2026</option><option value="2025">2025</option><option value="2024">2024</option><option value="2023">2023</option><option value="2022">2022</option><option value="2021">2021</option><option value="2020">2020</option><option value="2019">2019</option><option value="2018">2018</option><option value="2017">2017</option><option value="2016">2016</option><option value="2015">2015</option><option value="2014">2014</option><option value="2013">2013</option><option value="2012">2012</option><option value="2011">2011</option><option value="2010">2010</option><option value="2009">2009</option><option value="2008">2008</option><option value="2007">2007</option><option value="2006">2006</option><option value="2005">2005</option><option value="2004">2004</option><option value="2003">2003</option><option value="2002">2002</option><option value="2001">2001</option><option value="2000">2000</option><option value="1999">1999</option><option value="1998">1998</option><option value="1997">1997</option><option value="1996">1996</option><option value="1995">1995</option><option value="1994">1994</option><option value="1993">1993</option><option value="1992">1992</option><option value="1991">1991</option><option value="1990">1990</option><option value="1989">1989</option><option value="1988">1988</option><option value="1987">1987</option><option value="1986">1986</option><option value="1985">1985</option><option value="1984">1984</option><option value="1983">1983</option><option value="1982">1982</option><option value="1981">1981</option><option value="1980">1980</option><option value="1979">1979</option><option value="1978">1978</option><option value="1977">1977</option><option value="1976">1976</option><option value="1975">1975</option><option value="1974">1974</option><option value="1973">1973</option><option value="1972">1972</option><option value="1971">1971</option><option value="1970">1970</option><option value="1969">1969</option><option value="1968">1968</option><option value="1967">1967</option><option value="1966">1966</option><option value="1965">1965</option><option value="1964">1964</option><option value="1963">1963</option><option value="1962">1962</option><option value="1961">1961</option><option value="1960">1960</option><option value="1959">1959</option><option value="1958">1958</option><option value="1957">1957</option><option value="1956">1956</option><option value="1955">1955</option><option value="1954">1954</option><option value="1953">1953</option><option value="1952">1952</option><option value="1951">1951</option><option value="1950">1950</option><option value="1949">1949</option><option value="1948">1948</option><option value="1947">1947</option><option value="1946">1946</option><option value="1945">1945</option><option value="1944">1944</option><option value="1943">1943</option><option value="1942">1942</option><option value="1941">1941</option><option value="1940">1940</option><option value="1939">1939</option><option value="1938">1938</option><option value="1937">1937</option><option value="1936">1936</option><option value="1935">1935</option><option value="1934">1934</option><option value="1933">1933</option><option value="1932">1932</option><option value="1931">1931</option><option value="1930">1930</option><option value="1929">1929</option><option value="1928">1928</option><option value="1927">1927</option><option value="1926">1926</option><option value="1925">1925</option><option value="1924">1924</option><option value="1923">1923</option><option value="1922">1922</option></select><!--v-if--><!--v-if--></div></div></div></header><!--v-if--><section class=""><div class=""><div class=""><a class="" role="button" href="#" disabled="false" tabindex="-1">janvier <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">février <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">mars <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">avril <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">mai <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">juin <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">juillet <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">août <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">septembre <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">octobre <!--v-if--></a><a class="" role="button" href="#" disabled="false">novembre <!--v-if--></a><a class="" role="button" href="#" disabled="false" tabindex="-1">décembre <!--v-if--></a></div></div></section><!--v-if--></div></div></div>

Table wrapper missing the class has-mobile-cards

Table wrapper is missing the class "has-mobile-cards" when mobileCards is true and the browser is in mobile/responsive view. So the table is incorrectly rendered and the cards are not displayed as shown on the Oruga documentation page:
https://vue2.oruga.io/components/Table.html#examples

<o-table :data="data" :mobile-cards="true">

We updated the config as shown below in order to get this working which is not the best solution.

import { ModalProgrammatic as OModal } from '@oruga-ui/oruga'
import { bulmaConfig } from '@oruga-ui/theme-bulma'

bulmaConfig.table.wrapperClass = 'table-wrapper has-mobile-cards';
ConfigProgrammatic.setOptions(bulmaConfig

theme-bulma breaks table mobile cards

Hi, I'm currently using these versions of oruga-next and theme-bulma

"@oruga-ui/oruga-next": "^0.5.5",
"@oruga-ui/theme-bulma": "^0.2.4"

and adding bulmaConfig to the Vue app breaks the table's mobileCards behavior.

With the following configuration, mobile cards work as expected.

import { createApp } from "vue";
import App from "./App.vue";
import Oruga from "@oruga-ui/oruga-next";
import "@oruga-ui/oruga-next/dist/oruga.css";

createApp(App).use(Oruga).mount("#app");

Screen Shot 2022-03-31 at 8 44 36 PM

But setting the config as presented in the theme-bulma README breaks the functionality.

import { createApp } from "vue";
import App from "./App.vue";

import Oruga from "@oruga-ui/oruga-next";
import { bulmaConfig } from "@oruga-ui/theme-bulma";

import "@oruga-ui/theme-bulma/dist/bulma.css";

createApp(App).use(Oruga, bulmaConfig).mount("#app");

Screen Shot 2022-03-31 at 8 46 13 PM

This is the code for the component I tested it with.

<script setup lang="ts">
import { ref } from "vue";

const data = ref([
  {
    id: 1,
    first_name: "Jesse",
    last_name: "Simmons",
    date: "2016/10/15 13:43:27",
    gender: "Male",
  },
  {
    id: 2,
    first_name: "John",
    last_name: "Jacobs",
    date: "2016/12/15 06:00:53",
    gender: "Male",
  },
  {
    id: 3,
    first_name: "Tina",
    last_name: "Gilbert",
    date: "2016/04/26 06:26:28",
    gender: "Female",
  },
  {
    id: 4,
    first_name: "Clarence",
    last_name: "Flores",
    date: "2016/04/10 10:28:46",
    gender: "Male",
  },
  {
    id: 5,
    first_name: "Anne",
    last_name: "Lee",
    date: "2016/12/06 14:38:38",
    gender: "Female",
  },
]);
</script>

<template>
  <section>
    <o-table :data="data">
      <o-table-column field="id" label="ID" width="40" numeric v-slot="props">
        {{ props.row.id }}
      </o-table-column>

      <o-table-column field="first_name" label="First Name" v-slot="props">
        {{ props.row.first_name }}
      </o-table-column>

      <o-table-column field="last_name" label="Last Name" v-slot="props">
        {{ props.row.last_name }}
      </o-table-column>

      <o-table-column
        field="date"
        label="Date"
        position="centered"
        v-slot="props"
      >
        {{ new Date(props.row.date).toLocaleDateString() }}
      </o-table-column>

      <o-table-column label="Gender" v-slot="props">
        <span>
          <o-icon
            pack="fas"
            :icon="props.row.gender === 'Male' ? 'mars' : 'venus'"
          >
          </o-icon>
          {{ props.row.gender }}
        </span>
      </o-table-column>
    </o-table>
  </section>
</template>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.