New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@financial-times/o-toggle

Package Overview
Dependencies
Maintainers
18
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@financial-times/o-toggle - npm Package Compare versions

Comparing version 2.1.3 to 3.0.0-0

.eslintignore

7

origami.json
{
"description": "Utility that provides toggle (show/hide) behaviour to a <button> or <a> tag and a target.",
"keywords": [ "toggle", "show", "hide" ],
"brands": [

@@ -9,5 +7,4 @@ "master",

],
"origamiType": "module",
"origamiCategory": "primitives",
"origamiVersion": 1,
"origamiType": "component",
"origamiVersion": "2.0",
"support": "https://github.com/Financial-Times/o-toggle/issues",

@@ -14,0 +11,0 @@ "supportContact": {

{
"browser": "browser.js",
"module": "module.js",
"eslintIgnore": [
"module.js",
"browser.js",
"dist/",
"dist-esm/"
],
"name": "@financial-times/o-toggle",
"version": "3.0.0-0",
"description": "Utility that provides toggle (show/hide) behaviour to a <button> or <a> tag and a target.",
"keywords": [
"origami",
"component",
"ft"
"toggle",
"show",
"hide"
],
"name": "@financial-times/o-toggle",
"version": "2.1.3",
"dependencies": {},
"component": "o-toggle",
"scripts": {},
"homepage": "https://registry.origami.ft.com/components/o-toggle",
"bugs": {
"url": "https://registry.origami.ft.com/components/o-toggle"
},
"license": "MIT",
"type": "module",
"browser": "main.js",
"scripts": {
"start": "npx serve ./demos/local",
"build": "npm_config_yes=true npx \"origami-build-tools@prerelease\" install && npm_config_yes=true npx \"origami-build-tools@prerelease\" demo"
},
"devDependencies": {
"eslint": "^7.8.1",
"eslint-config-origami-component": "^2.1.0",
"origami-ci-tools": "^2.0.2",
"eslint": "^7.24.0",
"eslint-config-origami-component": "^2.1.1",
"remark": "^13.0.0",
"remark-lint": "^8.0.0",
"remark-preset-lint-origami-component": "^1.1.3",
"stylelint": "^13.7.0",
"remark-lint": "^7.0.1",
"remark-preset-lint-origami-component": "prerelease",
"stylelint": "^13.12.0",
"stylelint-config-origami-component": "^1.0.4"
},
"engines": {
"npm": "^7"
},
"volta": {
"node": "14.16.1",
"npm": "7.10.0"
}
}

@@ -5,9 +5,9 @@ # o-toggle [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](#licence)

- [Usage](#usage)
- [Markup](#markup)
- [Sass](#sass)
- [JavaScript](#javascript)
- [Migration guide](#migration-guide)
- [Contact](#contact)
- [Licence](#licence)
- [Usage](#usage)
- [Markup](#markup)
- [Sass](#sass)
- [JavaScript](#javascript)
- [Migration guide](#migration-guide)
- [Contact](#contact)
- [Licence](#licence)

@@ -68,3 +68,3 @@ ## Usage

```js
import 'o-toggle';
import '@financial-times/o-toggle';
document.addEventListener("DOMContentLoaded", function() {

@@ -77,3 +77,3 @@ document.dispatchEvent(new CustomEvent('o.DOMContentLoaded'));

```js
import Toggle from 'o-toggle';
import Toggle from '@financial-times/o-toggle';
Toggle.init();

@@ -85,3 +85,3 @@ ```

```js
import Toggle from 'o-toggle';
import Toggle from '@financial-times/o-toggle';
const toggleEl = document.querySelector('.o-toggle');

@@ -102,6 +102,6 @@ const toggle = new Toggle(toggleEl, {

- _target_: HTMLElement or selector of the element that will be toggled
- _callback_: Function or content of a function as _string_ that will be executed every time a toggle happens. It has the following parameters:
- State. 'open' or 'close'
- Click event object if it comes from the event handler on the toggle
- _target_: HTMLElement or selector of the element that will be toggled
- _callback_: Function or content of a function as _string_ that will be executed every time a toggle happens. It has the following parameters:
- State. 'open' or 'close'
- Click event object if it comes from the event handler on the toggle

@@ -119,3 +119,3 @@ ## Migration guide

----
***

@@ -122,0 +122,0 @@ ## Licence

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc