Semantic-Org / Semantic-UI

Semantic is a UI component framework based around useful principles from natural language.
http://www.semantic-ui.com
MIT License
51.07k stars 4.96k forks source link

Single Component Modules #7071

Closed Biosphakus closed 2 years ago

Biosphakus commented 2 years ago

Edit: I noted I'd better open this in the Fomantic-UI repository. So I closed it here.

I am using single component modules with NPM and Parcel like that:

// require modules
var $ = require("jquery");
    $.fn.search       = require('semantic-ui-search');
    $.fn.popup       = require('semantic-ui-popup');
    $.fn.dropdown = require('fomantic-ui-dropdown');

// initialize UI elements
$('.ui popup').dropdown();
$('.ui dropdown').dropdown();

With transitioning to Fomantic-UI (from Semantic UI), these single component modules don't seem to be widely available. I have tried to install the Fomantic UI version for the dropdown and managed to do so.

npm install fomantic-ui-dropdown

However, it seems to be only 2.7.7 (not 2.8.8). This is also reflected in my package.json:

  "dependencies": {
    "fomantic-ui": "^2.8.8",
    "fomantic-ui-dropdown": "^2.7.7",
...
}

Seems like this was published two years ago: Link on NPM.

Background: I'm trying to use a Javascript-initalized description in my dropdown menu but the descriptions won't show (no error messages). I think the issue is that I can't install the latest version as this feature might not be present in 2.7.7?

<div class="ui dropdown">
  <span class="description"></span>
  <span class="text"></span>
  <i class="dropdown icon"></i>
</div>
$('#verticaldescription').dropdown({
    placeholder: 'Show descriptions',
    values:[{
      "name": "name1",
      "value": "value1",
      "description": "description1"
    },
    {
      "name": "name2",
      "value": "value2",
      "description": "description2",
      "descriptionVertical": true
    }]
})
;

Would it be possible to provide the single component modules or is there a better solution?