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

@olo/borderless-authentication

v2.1.1

Published

Packages for Olo's Borderless Authentication.

Downloads

588

Readme

Olo Authentication

@olo/borderless-authentication is a public package allowing Olo's partners to easily import and connect to Olo Auth Service functionality.

Installation

npm install @olo/borderless-authentication

or...

yarn add @olo/borderless-authentication

Usage

The packages can be imported to a project after installation:

import { CreateAccountCheckbox, VerifyAccountOverlay } from '@olo/borderless-authentication';

const checkbox = new CreateAccountCheckbox(...);
const overlay = new VerifyAccountOverlay();
// ...

Customization

The CreateAccountCheckbox accepts custom styles in the shape of:

type CustomStyles = {
  size: string;
  spacing: string;
  border: string;
  background: string;
  borderRadius: string;
  textColor: string;
  labelColor: string;
  fontFamily: string;
  labelFontSize: string;
  textFontSize: string;
  disclaimerFontSize: string;
};

Any of the above styles can be applied to the checkbox through the setStyles method available on a CreateAccountCheckbox instance.

Please be aware of any accessibility and usability concerns that could arise from changing the default styles.

const checkbox = new CreateAccountCheckbox(...);

checkbox.setStyles({
  size: '3ch',
  spacing: '2ch',
  border: '2ch inset #c6cae5',
  background: '#efefef',
  borderRadius: '2ch',
  textColor: '#7e8090',
  labelColor: '#2d76f6',
  fontFamily: 'monospace',
  labelFontSize: '2ch',
  textFontSize: '1.5ch',
  disclaimerFontSize: '1.5ch',
});

The OloCodeVerification component accepts custom styles in the shape of:

type CustomStyles = {
  gap: string;
  padding: string;
  fontSize: string;
  fontWeight: string;
  fontColor: string;
  fontFamily: string;
  background: string;
  primaryColor: string;
  borderColor: string;
  borderWidth: string;
  borderRadius: string;
  borderColorInvalid: string;
};

These styles can also be applied through the setStyles method on the component:

const codeVerificationComponent = document.querySelector('olo-code-verification');

codeVerificationComponent.setStyles({
  gap: '1rem',
  padding: ' 1rem',
  fontSize: '1.5rem',
  fontColor: 'black',
  fontFamily: 'monospace',
  primaryColor: 'lawngreen',
  borderColor: 'black',
  borderRadius: '5rem',
  borderWidth: '2px',
  borderColorInvalid: 'crimson',
});

These can also be changed in the verification overlay by passing custom styles to the VerifyAccountOverlay's setStyles method.

const verificationOverlay = new VerifyAccountOverlay(...);

verificationOverlay.setStyles({
  gap: '1rem',
  padding: ' 1rem',
  fontSize: '1.5rem',
  fontColor: 'black',
  fontFamily: 'monospace',
  primaryColor: 'lawngreen',
  borderColor: 'black',
  borderRadius: '5rem',
  borderWidth: '2px',
  borderColorInvalid: 'crimson',
});

verificationOverlay.attachEmailListener({
  ...,
  useSeparatedInputs: true, // Custom styles only apply to the separated inputs variant of the overlay
});

The WorkflowModal component also accepts the above styles that then get applied to the OloCodeVerification component (separate inputs are the default).

Licenses

This package falls under the terms of the Olo license.

Copyright © 2023 Olo Inc. All rights reserved.

Subject to the terms and conditions of the license, you are hereby granted a non-exclusive, worldwide, royalty-free license to (a) copy and modify the software in source code or binary form for your use in connection with the software services and interfaces provided by Olo, and (b) redistribute unmodified copies of the software to third parties. The above copyright notice and this license shall be included in or with all copies or substantial portions of the software. Your use of this software is subject to the Olo APIs Terms of Use, available at https://www.olo.com/api-usage-terms. This license does not grant you permission to use the trade names, trademarks, service marks, or product names of Olo, except as required for reasonable and customary use in describing the origin of the software and reproducing the content of this license. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Borderless uses Lit under the terms of the BSD-3-Clause license.