@financial-times/o-toggle
Advanced tools
Comparing version 2.1.3 to 3.0.0-0
{ | ||
"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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
7
0
Yes
16753
19
258
2
1