@manifoldco/component-plan-matrix
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -5,7 +5,7 @@ 'use strict'; | ||
const core = require('./core-dcd23087.js'); | ||
const core = require('./core-8e5652e1.js'); | ||
const defineCustomElements = (win, options) => { | ||
return core.patchEsm().then(() => { | ||
core.bootstrapLazy([["manifold-button_3.cjs",[[0,"manifold-plan-matrix"],[0,"manifold-button",{"text":[1],"href":[1]}],[0,"manifold-checkbox",{"inputId":[1,"input-id"],"name":[1],"checked":[4]}]]]], options); | ||
core.bootstrapLazy([["manifold-button_3.cjs",[[0,"manifold-plan-matrix",{"baseUrl":[1,"base-url"],"ctaText":[1,"cta-text"]}],[4,"manifold-button",{"href":[1]}],[0,"manifold-checkbox",{"inputId":[1,"input-id"],"name":[1],"checked":[4]}]]]], options); | ||
}); | ||
@@ -12,0 +12,0 @@ }; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
const core = require('./core-dcd23087.js'); | ||
const core = require('./core-8e5652e1.js'); | ||
@@ -13,3 +13,3 @@ const ManifoldButton = class { | ||
render() { | ||
return (core.h("a", { class: "mp--button", href: this.href }, this.text)); | ||
return (core.h("a", { class: "mp--button", href: this.href }, core.h("slot", null))); | ||
} | ||
@@ -38,2 +38,4 @@ static get style() { return "manifold-button{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;width:100%;text-align:center}.mp--button{-ms-flex:1;flex:1;padding:13px;font-weight:500;font-size:16px;font-style:normal;line-height:19px;text-decoration:none;background:hsl(var(--manifold-button-color));border-radius:var(--manifold-table-border-radius);-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.mp--button,.mp--button:visited{color:hsl(var(--manifold-button-text-color))}.mp--button:hover{background:hsla(var(--manifold-button-color),.85)}"; } | ||
core.registerInstance(this, hostRef); | ||
this.baseUrl = '/signup'; | ||
this.ctaText = 'Get Started'; | ||
} | ||
@@ -82,3 +84,3 @@ addClass(obj, baseClass = '') { | ||
'mp--cell__brs mp--cell__rounded-br': i === gridColumns - 1, | ||
}, 'mp--cell mp--cell__body mp--cell__bbs') }, core.h("manifold-button", { href: "https://google.com", text: "Get Started" })), | ||
}, 'mp--cell mp--cell__body mp--cell__bbs') }, core.h("manifold-button", { href: this.baseUrl }, this.ctaText)), | ||
]))); | ||
@@ -85,0 +87,0 @@ } |
'use strict'; | ||
const core = require('./core-dcd23087.js'); | ||
const core = require('./core-8e5652e1.js'); | ||
core.patchBrowser().then(options => { | ||
return core.bootstrapLazy([["manifold-button_3.cjs",[[0,"manifold-plan-matrix"],[0,"manifold-button",{"text":[1],"href":[1]}],[0,"manifold-checkbox",{"inputId":[1,"input-id"],"name":[1],"checked":[4]}]]]], options); | ||
return core.bootstrapLazy([["manifold-button_3.cjs",[[0,"manifold-plan-matrix",{"baseUrl":[1,"base-url"],"ctaText":[1,"cta-text"]}],[4,"manifold-button",{"href":[1]}],[0,"manifold-checkbox",{"inputId":[1,"input-id"],"name":[1],"checked":[4]}]]]], options); | ||
}); |
import { h } from "@stencil/core"; | ||
export class ManifoldButton { | ||
render() { | ||
return (h("a", { class: "mp--button", href: this.href }, this.text)); | ||
return (h("a", { class: "mp--button", href: this.href }, | ||
h("slot", null))); | ||
} | ||
@@ -14,19 +15,2 @@ static get is() { return "manifold-button"; } | ||
static get properties() { return { | ||
"text": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": false, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "text", | ||
"reflect": false | ||
}, | ||
"href": { | ||
@@ -33,0 +17,0 @@ "type": "string", |
import { h } from "@stencil/core"; | ||
export class ManifoldPricing { | ||
constructor() { | ||
this.baseUrl = '/signup'; | ||
this.ctaText = 'Get Started'; | ||
} | ||
addClass(obj, baseClass = '') { | ||
@@ -55,3 +59,3 @@ const conditionalClasses = Object.keys(obj).map(cl => (obj[cl] ? cl : '')); | ||
}, 'mp--cell mp--cell__body mp--cell__bbs') }, | ||
h("manifold-button", { href: "https://google.com", text: "Get Started" })), | ||
h("manifold-button", { href: this.baseUrl }, this.ctaText)), | ||
]))); | ||
@@ -66,3 +70,41 @@ } | ||
}; } | ||
static get properties() { return { | ||
"baseUrl": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string | undefined", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "base-url", | ||
"reflect": false, | ||
"defaultValue": "'/signup'" | ||
}, | ||
"ctaText": { | ||
"type": "string", | ||
"mutable": false, | ||
"complexType": { | ||
"original": "string", | ||
"resolved": "string | undefined", | ||
"references": {} | ||
}, | ||
"required": false, | ||
"optional": true, | ||
"docs": { | ||
"tags": [], | ||
"text": "" | ||
}, | ||
"attribute": "cta-text", | ||
"reflect": false, | ||
"defaultValue": "'Get Started'" | ||
} | ||
}; } | ||
static get elementRef() { return "el"; } | ||
} |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, h, g as getElement } from './core-119010a7.js'; | ||
import { r as registerInstance, h, g as getElement } from './core-8d632c73.js'; | ||
var ManifoldButton = /** @class */ (function () { | ||
@@ -7,3 +7,3 @@ function ManifoldButton(hostRef) { | ||
ManifoldButton.prototype.render = function () { | ||
return (h("a", { class: "mp--button", href: this.href }, this.text)); | ||
return (h("a", { class: "mp--button", href: this.href }, h("slot", null))); | ||
}; | ||
@@ -39,2 +39,4 @@ Object.defineProperty(ManifoldButton, "style", { | ||
registerInstance(this, hostRef); | ||
this.baseUrl = '/signup'; | ||
this.ctaText = 'Get Started'; | ||
} | ||
@@ -85,3 +87,3 @@ ManifoldPricing.prototype.addClass = function (obj, baseClass) { | ||
'mp--cell__brs mp--cell__rounded-br': i === gridColumns - 1, | ||
}, 'mp--cell mp--cell__body mp--cell__bbs') }, h("manifold-button", { href: "https://google.com", text: "Get Started" })), | ||
}, 'mp--cell mp--cell__body mp--cell__bbs') }, h("manifold-button", { href: _this.baseUrl }, _this.ctaText)), | ||
]; }))); | ||
@@ -88,0 +90,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { r as registerInstance, h, g as getElement } from './core-119010a7.js'; | ||
import { r as registerInstance, h, g as getElement } from './core-8d632c73.js'; | ||
@@ -8,3 +8,3 @@ const ManifoldButton = class { | ||
render() { | ||
return (h("a", { class: "mp--button", href: this.href }, this.text)); | ||
return (h("a", { class: "mp--button", href: this.href }, h("slot", null))); | ||
} | ||
@@ -33,2 +33,4 @@ static get style() { return "manifold-button{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;width:100%;text-align:center}.mp--button{-ms-flex:1;flex:1;padding:13px;font-weight:500;font-size:16px;font-style:normal;line-height:19px;text-decoration:none;background:hsl(var(--manifold-button-color));border-radius:var(--manifold-table-border-radius);-webkit-transition:background-color .3s ease;transition:background-color .3s ease}.mp--button,.mp--button:visited{color:hsl(var(--manifold-button-text-color))}.mp--button:hover{background:hsla(var(--manifold-button-color),.85)}"; } | ||
registerInstance(this, hostRef); | ||
this.baseUrl = '/signup'; | ||
this.ctaText = 'Get Started'; | ||
} | ||
@@ -77,3 +79,3 @@ addClass(obj, baseClass = '') { | ||
'mp--cell__brs mp--cell__rounded-br': i === gridColumns - 1, | ||
}, 'mp--cell mp--cell__body mp--cell__bbs') }, h("manifold-button", { href: "https://google.com", text: "Get Started" })), | ||
}, 'mp--cell mp--cell__body mp--cell__bbs') }, h("manifold-button", { href: this.baseUrl }, this.ctaText)), | ||
]))); | ||
@@ -80,0 +82,0 @@ } |
@@ -1,1 +0,1 @@ | ||
import{p as m,b as a}from"./p-1013ffb9.js";m().then(m=>a([["p-lmm2f9cr",[[0,"manifold-plan-matrix"],[0,"manifold-button",{text:[1],href:[1]}],[0,"manifold-checkbox",{inputId:[1,"input-id"],name:[1],checked:[4]}]]]],m)); | ||
import{p as t,b as a}from"./p-71fd23d4.js";t().then(t=>a([["p-btxep2bt",[[0,"manifold-plan-matrix",{baseUrl:[1,"base-url"],ctaText:[1,"cta-text"]}],[4,"manifold-button",{href:[1]}],[0,"manifold-checkbox",{inputId:[1,"input-id"],name:[1],checked:[4]}]]]],t)); |
@@ -15,3 +15,2 @@ /* eslint-disable */ | ||
'href': string; | ||
'text': string; | ||
} | ||
@@ -23,3 +22,6 @@ interface ManifoldCheckbox { | ||
} | ||
interface ManifoldPlanMatrix {} | ||
interface ManifoldPlanMatrix { | ||
'baseUrl'?: string; | ||
'ctaText'?: string; | ||
} | ||
} | ||
@@ -57,3 +59,2 @@ | ||
'href'?: string; | ||
'text'?: string; | ||
} | ||
@@ -65,3 +66,6 @@ interface ManifoldCheckbox { | ||
} | ||
interface ManifoldPlanMatrix {} | ||
interface ManifoldPlanMatrix { | ||
'baseUrl'?: string; | ||
'ctaText'?: string; | ||
} | ||
@@ -68,0 +72,0 @@ interface IntrinsicElements { |
export declare class ManifoldButton { | ||
text: string; | ||
href: string; | ||
render(): any; | ||
} |
@@ -6,2 +6,4 @@ declare type conditionalClassesObj = { | ||
el: HTMLElement; | ||
baseUrl?: string; | ||
ctaText?: string; | ||
addClass(obj: conditionalClassesObj, baseClass?: string): string; | ||
@@ -8,0 +10,0 @@ render(): any; |
{ | ||
"name": "@manifoldco/component-plan-matrix", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Stencil Component Starter", |
@@ -52,3 +52,34 @@ # @manifoldco/component-plan-matrix | ||
## Using in TypeScript + JSX | ||
This Web Component works in all frameworks & environments, but if you’re using within a React & | ||
TypeScript setup, you’ll also need the following config. | ||
Create a `custom-elements.d.ts` file anywhere in your project that’s within `tsconfig.json`’s | ||
[includes][tsconfig-includes] property: | ||
```ts | ||
import { Components, JSX as LocalJSX } from '@manifoldco/component-plan-matrix/loader'; | ||
import { DetailedHTMLProps, HTMLAttributes } from 'react'; | ||
type StencilProps<T> = { | ||
[P in keyof T]?: Omit<T[P], 'ref'>; | ||
}; | ||
type ReactProps<T> = { | ||
[P in keyof T]?: DetailedHTMLProps<HTMLAttributes<T[P]>, T[P]>; | ||
}; | ||
type StencilToReact<T = LocalJSX.IntrinsicElements, U = HTMLElementTagNameMap> = StencilProps<T> & | ||
ReactProps<U>; | ||
declare global { | ||
export namespace JSX { | ||
interface IntrinsicElements extends StencilToReact {} | ||
} | ||
} | ||
``` | ||
[stencil]: https://stenciljs.com/docs/introduction | ||
[stencil-framework]: https://stenciljs.com/docs/overview | ||
[tsconfig-includes]: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#examples |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
798838
12208
85
10