npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

integralui-web-radiobutton

v22.2.0

Published

IntegralUI Web - RadioButton is a native Web Component that represents a radio button

Downloads

1

Readme

IntegralUI Web - RadioButton, v22.2

IntegralUI Web - RadioButton is a native Web Component that represents a radio button.

IntegralUI Web - RadioButton, 22.2 - a native Web Component that represents a radio button for Angular, React and Vue

Note This component is part of IntegralUI Web library.

Here is a brief overview of what is included:

Components

RadioGroup - Allows you to create a group of radio buttons

RadioButton - Represents a radio button

Services

Common - Includes a set of common functions usable in most applications

Dependencies

IntegralUI Web is built on top of LitElement. All necessary files from that library are already included in the /external subfolder of this repository.

DEMO

Online QuickStart App - An online demo of RadioButton component is included

Installation

Install the repository by running

npm install https://github.com/lidorsystems/integralui-web-radiobutton.git

or directly from NPM

npm i integralui-web-radiobutton

How to Use

Note A detailed information is available here: How to Use IntegralUI Web Components. Explains how to setup and use components for each framework: Angular, React or Vanilla JavaScript.

In general, you need to open your application and add a reference to a component you want to use. For example, if you are using the IntegralUI RadioButton component:

Angular

import 'integralui-web-radiobutton/components/integralui.radiobutton.js';
import 'integralui-web-radiobutton/components/integralui.radiogroup.js';

Then, place the component in HTML using its tag. Here is an example:

<div class="sample-block" id="radiobutton-overview">
    <iui-radiogroup id="radiogroup-1" [theme]="currentTheme" (buttonChecked)="onButtonChecked($event, 'group 1')">
        <iui-radiobutton [checked]="true">Radio 1</iui-radiobutton>
        <iui-radiobutton>Radio 2</iui-radiobutton>
        <iui-radiobutton>Radio 3</iui-radiobutton>
    </iui-radiogroup>
</div>

Depending on current version of TypeScript, you may need to add some settings in tsconfig.json, under "angularCompilerOptions":


    . . .

    "suppressImplicitAnyIndexErrors": true,     // solves implicit any values
    "noImplicitAny": false,             // solves angular could not find a declaration file for module implicitly has an 'any' type
    "strictNullChecks": false           // solves type null is not assignable to type

}

React

Currently ReactJS doesn't have full support for Web Components. Mainly because of the way data is passed to the component via attributes and their own synthetic event system. For this reason, you can use available wrappers located under /wrappers directory, which are ReactJS components that provide all public API from an IntegralUI component.

import IntegralUIRadioButtonComponent from 'integralui-web-radiobutton/wrappers/react.integralui.radiobutton.js';
import IntegralUIRadioGroupComponent from 'integralui-web-radiobutton/wrappers/react.integralui.radiogroup.js';

Then, place the component in HTML using its tag. Here is an example:

render() {
    return (
        <div className="sample-block" id="radiobutton-overview">
            <IntegralUIRadioGroupComponent id="radiogroup-1" theme={this.state.currentTheme} buttonChecked={(e) => this.onButtonChecked(e, 'group 1')}>
                <IntegralUIRadioButtonComponent checked={true}>Radio 1</IntegralUIRadioButtonComponent>
                <IntegralUIRadioButtonComponent>Radio 2</IntegralUIRadioButtonComponent>
                <IntegralUIRadioButtonComponent>Radio 3</IntegralUIRadioButtonComponent>
            </IntegralUIRadioGroupComponent>
        </div>
    );
}

Vanilla JavaScript

<script type="module" src="integralui-web-radiobutton/components/integralui.radiobutton.js"></script>
<script type="module" src="integralui-web-radiobutton/components/integralui.radiogroup.js"></script>

Then, place the component in HTML using its tag. Here is an example:

<div class="sample-block" id="radiobutton-overview">
    <iui-radiogroup id="radiogroup-1" theme="Office">
        <iui-radiobutton checked="true">Radio 1</iui-radiobutton>
        <iui-radiobutton>Radio 2</iui-radiobutton>
        <iui-radiobutton>Radio 3</iui-radiobutton>
    </iui-radiogroup>
</div>

How to Change Appearance

To modify the RadioButton appearance, you can use CSS custom properties:

[id="radiogroup-1"] {
    --radio-button-margin: 20px 0 0 0;
    --radio-button-btn-border-radius: 3px;
    --radio-button-btn-checked-border-color: #0ba131;
    --radio-button-btn-checked-content-background: #0ba131;
    --radio-button-btn-content-border-radius: 3px;

    --radio-button-btn-hovered-border-color: #0ba131;
    --radio-button-btn-checked-hovered-border-color: #08bf36;
    --radio-button-btn-checked-content-hovered-background: #08bf36;
}

QuickStart App

There is a demo application with source code that contains samples for each component included in the IntegralUI Web library. It can help you to get started quickly with learning about the components and write tests immediatelly.

From IntegralUI Web - QuickStart you can download a demo app for Angular, AngularJS, React and Vanilla JavaScript. A detailed information about each of these quick-start demos is available in ReadMe file, located in the root folder of the demo app.

License Information

You are FREE to use this product to develop Internet and Intranet web sites, web applications and other products, with no-charge.

This project has been released under the IntegralUI Web Lite License, and may not be used except in compliance with the License. A copy of the License should have been installed in the product's root installation directory or it can be found here: License Agreement.

This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.