Giter Site home page Giter Site logo

coloris-npm's Introduction

Melloware Logo

Reputation

Stack Overflow GitHub GitHub Sponsors

Sponsor Me ❤️

GitHub Sponsor PayPal

Tech Stack

Java JavaScript Typescript Quarkus React.js HTML5 CSS3

coloris-npm's People

Contributors

blutorange avatar dependabot[bot] avatar jepsar avatar melloware avatar nuykon 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

coloris-npm's Issues

Inline colorpicker not calculating the right area dimensions

I want to display the colorpicker in a custom popup without any input. I used the following options:


    Coloris({
      el: null,
      inline: true,
      parent: '#' + anchorId,
      autoClose: false,
      focusInput: false,
      alpha: false,
    })

coloris

The colorpicker opens as expected but when using the colorArea the color marker is locked to the right of the area because the x / y dimensions getting calculated are a bit off in the updatePickerPosition() function. I fixed it by using getBoundingClientRect() for the dimensions. I can provide the fix as a PR but it probably needs some testing on other use cases.

undefined error when reading getBoundingClientRect in updatePickerPosition()

There is an error in updatePickerPosition() with the latest (0.19.0) release on npm, which appears to be due to the line added in 9af0f49 not being in the actual npm 0.19.0 release.

Specifically, the release on GitHub includes the following check:

if (!picker || (!currentEl && !settings.inline)) return; //** DO NOT REMOVE: in case called before initialized

However, the version hosted at npmjs.com, and downloaded via npm, does not:

Screenshot 2023-04-22 at 20 02 37

This is causing the following error:
Screenshot 2023-04-22 at 19 07 34

Angular 15 no loaders are configured to process coloris.css

I am trying to use the colorpicker in an Anguar 15 project but I get an error when running the project:

./node_modules/@melloware/coloris/dist/coloris.css?ngGlobalStyle:1:0 - Error: Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> .clr-picker {
|   display: none;
|   flex-wrap: wrap;

[Bug] import_coloris.default.init is not a function

I have same kind of errors as #13

Just by adding

import "@melloware/coloris/dist/coloris.css";
import Coloris from "@melloware/coloris";
Coloris.init();
Coloris({el: "#coloris"});

I have the error:

Uncaught TypeError: import_coloris.default.init is not a function

Using CDN is working properly, am I missing something ?

Reference to input element

IMPORTANT: Before reporting anything here please report it on the main project at https://github.com/mdbassit/Coloris That is the main repository where bugs should be fixed and we will port them to this project once the original Coloris project does a release.

If your issue is NPM or TypeScript related then it is OK to report that here.

Is that possible to support passing element as an input on top of query Selector for el? In case of shadow dom, passing the query selector might not work.

Non-passive event listener [Google Chrome]

Hello guys,

Thanks for the library.

I just started using the library and as soon I opened in Google Chrome I got this warning message:

coloris.js:928 [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

Any idea to remove the warning?

Builds Failing

@blutorange Do you mind looking into why the builds are failing? It doesn't look like any code was changed but they seem to be failing

Readme should focus on NPM

.. remove other docs which might make it confusing to users. We should refer to the original repo for documentation.

[Vue] init is not a function

Hi, after importing with npm, and adding the following to the top of the vue file

import "@melloware/coloris/dist/coloris.css";
import Coloris from "@melloware/coloris";
Coloris.init();
Coloris({el: "#coloris"});

I get the following error.

Uncaught (in promise) TypeError: _melloware_coloris__WEBPACK_IMPORTED_MODULE_1___default().init is not a function

If i add the library through the CDN, it works just fine.

Use in vanilla JS app

@blutorange Do you have instructions on how to use this version with Vanilla JS? The reason I ask is I am working on a PF component and I need the ability to control when "init" is called like you did here so it's not on DOMReady.

Any advice would be appreciated.

Import stylesheets into scss BUG

When I import into scss - @import "@melloware/coloris/dist/coloris.css";

Syntax Error: Error: Package path ./dist/coloris.css is not exported from package .../node_modules/@melloware/coloris (see exports field in .../node_modules/@melloware/coloris/package.json)

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.