Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@springernature/global-forms

Package Overview
Dependencies
Maintainers
13
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@springernature/global-forms - npm Package Compare versions

Comparing version 5.0.0-rc.1 to 5.0.0-rc.2

view/fields/globalFormButtons.hbs

69

demo/context.json

@@ -24,13 +24,12 @@ {

{
"template": "text",
"template": "globalFormText",
"label": "Your name (simple)",
"id": "your-name",
"name": "your-name",
"attributes": {
"something": "yes",
"nothing": "no"
"dataAttrs": {
"test": "someValue"
}
},
{
"template": "text",
"template": "globalFormText",
"label": "Your name (with hint)",

@@ -42,7 +41,7 @@ "hint": "Your name is on your passport",

{
"template": "html",
"template": "globalFormHTML",
"content": "<p>Here is some content appearing between fields. You can put any HTML here that you wish.</p>"
},
{
"template": "text",
"template": "globalFormText",
"label": "Your name (with error)",

@@ -56,3 +55,3 @@ "hint": "Your name is on your passport",

{
"template": "text",
"template": "globalFormText",
"label": "Your name (disabled)",

@@ -69,3 +68,3 @@ "id": "your-name-disabled",

{
"template": "select",
"template": "globalFormSelect",
"label": "Animal (simple)",

@@ -91,3 +90,3 @@ "id": "select-animals",

{
"template": "select",
"template": "globalFormSelect",
"label": "Animal (with hint)",

@@ -119,3 +118,3 @@ "id": "select-animals-hint",

{
"template": "radios",
"template": "globalFormRadios",
"label": "Animal",

@@ -136,3 +135,3 @@ "id": "radios-animals",

{
"template": "text",
"template": "globalFormText",
"label": "What type of monkey?",

@@ -160,3 +159,3 @@ "id": "monkey-type",

{
"template": "textarea",
"template": "globalFormTextarea",
"label": "Enter some text",

@@ -174,3 +173,3 @@ "id": "textarea-example",

{
"template": "checkbox",
"template": "globalFormCheckbox",
"label": "Agree to our terms (basic)",

@@ -181,3 +180,3 @@ "id": "checkbox-terms",

{
"template": "checkbox",
"template": "globalFormCheckbox",
"label": "Agree to our terms (with hint)",

@@ -189,3 +188,3 @@ "hint": "You should have read these. Read them, then agree to them.",

{
"template": "checkbox",
"template": "globalFormCheckbox",
"label": "Agree to our terms (with error)",

@@ -203,3 +202,3 @@ "error": "Agree to the terms to continue",

{
"template": "file",
"template": "globalFormFile",
"label": "Journal upload",

@@ -214,3 +213,3 @@ "id": "file-upload",

{
"template": "buttons",
"template": "globalFormButtons",
"buttons": [

@@ -233,20 +232,20 @@ {

"dynamicPartials": {
"fieldset": "./toolkits/global/packages/global-forms/view/fieldset.hbs",
"label": "./toolkits/global/packages/global-forms/view/label.hbs",
"error": "./toolkits/global/packages/global-forms/view/error.hbs",
"errorSummary": "./toolkits/global/packages/global-forms/view/errorSummary.hbs",
"inputCommonAttributes": "./toolkits/global/packages/global-forms/view/inputCommonAttributes.hbs",
"text": "./toolkits/global/packages/global-forms/view/fields/text.hbs",
"email": "./toolkits/global/packages/global-forms/view/fields/email.hbs",
"select": "./toolkits/global/packages/global-forms/view/fields/select.hbs",
"textarea": "./toolkits/global/packages/global-forms/view/fields/textarea.hbs",
"checkbox": "./toolkits/global/packages/global-forms/view/fields/checkbox.hbs",
"file": "./toolkits/global/packages/global-forms/view/fields/file.hbs",
"radios": "./toolkits/global/packages/global-forms/view/fields/radios.hbs",
"radio": "./toolkits/global/packages/global-forms/view/fields/radio.hbs",
"html": "./toolkits/global/packages/global-forms/view/fields/html.hbs",
"buttons": "./toolkits/global/packages/global-forms/view/fields/buttons.hbs",
"iconError": "./toolkits/global/packages/global-forms/view/iconError.hbs",
"iconSelect": "./toolkits/global/packages/global-forms/view/iconSelect.hbs"
"globalFormFieldset": "./toolkits/global/packages/global-forms/view/globalFormFieldset.hbs",
"globalFormLabel": "./toolkits/global/packages/global-forms/view/globalFormLabel.hbs",
"globalFormError": "./toolkits/global/packages/global-forms/view/globalFormError.hbs",
"globalFormErrorSummary": "./toolkits/global/packages/global-forms/view/globalFormErrorSummary.hbs",
"globalFormAttributes": "./toolkits/global/packages/global-forms/view/globalFormAttributes.hbs",
"globalFormText": "./toolkits/global/packages/global-forms/view/fields/globalFormText.hbs",
"globalFormEmail": "./toolkits/global/packages/global-forms/view/fields/globalFormEmail.hbs",
"globalFormSelect": "./toolkits/global/packages/global-forms/view/fields/globalFormSelect.hbs",
"globalFormTextarea": "./toolkits/global/packages/global-forms/view/fields/globalFormTextarea.hbs",
"globalFormCheckbox": "./toolkits/global/packages/global-forms/view/fields/globalFormCheckbox.hbs",
"globalFormFile": "./toolkits/global/packages/global-forms/view/fields/globalFormFile.hbs",
"globalFormRadios": "./toolkits/global/packages/global-forms/view/fields/globalFormRadios.hbs",
"globalFormRadio": "./toolkits/global/packages/global-forms/view/fields/globalFormRadio.hbs",
"globalFormHTML": "./toolkits/global/packages/global-forms/view/fields/globalFormHTML.hbs",
"globalFormButtons": "./toolkits/global/packages/global-forms/view/fields/globalFormButtons.hbs",
"globalFormIconError": "./toolkits/global/packages/global-forms/view/globalFormIconError.hbs",
"globalFormIconSelect": "./toolkits/global/packages/global-forms/view/globalFormIconSelect.hbs"
}
}
# History
## 5.0.0-rc.2 (2022-07-11)
* BREAKING:
* Arbitrary attributes now restricted to data attributes
* All templates now namespaced so partials can be more safely registered
* Documenting the need for importing button utilities
* Now aligned with brand-context `25.0.0`
## 5.0.0-rc.1 (2022-07-01)

@@ -4,0 +11,0 @@ * BREAKING:

{
"name": "@springernature/global-forms",
"version": "5.0.0-rc.1",
"version": "5.0.0-rc.2",
"license": "MIT",

@@ -11,3 +11,3 @@ "description": "form component",

"author": "Jack Watkins",
"brandContext": "^24.0.0"
"brandContext": "^25.0.0"
}

@@ -19,2 +19,5 @@ # Global Forms

@import '@springernature/global-forms/scss/50-components/forms';
// Include this with your utilities (if it isn’t already there)
@import '@springernature/brand-context/default/scss/60-utilities/buttons.scss';
```

@@ -52,3 +55,3 @@

{
"template": "text",
"template": "globalFormText",
"label": "Your name",

@@ -59,3 +62,3 @@ "id": "your-name",

{
"template": "text",
"template": "globalFormText",
"label": "Your email",

@@ -88,3 +91,3 @@ "id": "your-email",

The `template` property sets the type of field - for example, `"template": "text"` renders a text input field. Aim to make the `template`, `label`, `id`, and `name` properties mandatory parts of your data schema.
The `template` property sets the type of field - for example, `"template": "globalFormText"` renders a text input field if that is what you have registered the **view/fields/globalFormText.hbs** template as. Aim to make the `template`, `label`, `id`, and `name` properties mandatory parts of your data schema.

@@ -95,3 +98,3 @@ This component supports a wide range of standard form field attributes. For example, to include a `readonly` attribute on your text input, you can include a property of the same name on the data:

{
"template": "text",
"template": "globalFormText",
"label": "Your email address",

@@ -116,12 +119,12 @@ "id": "your-email",

In addition to these top-level properties, you can add any arbitrary attributes using the `attributes` field property. For example, you can add a `data-test` attribute for your text input’s unit testing:
In addition to these top-level properties, you can add data properties as a `dataAttrs` array, which can be useful for unit testing.
```json
{
"template": "text",
"template": "globalFormText",
"label": "Your email address",
"id": "your-email",
"name": "your-email",
"attributes": {
"data-test": "someValue"
"dataAttrs": {
"test": "someValue"
}

@@ -131,2 +134,4 @@ }

This would create the following attribution: `data-test: someValue`.
### Errors

@@ -138,3 +143,3 @@

{
"template": "text",
"template": "globalFormText",
"label": "Your name",

@@ -188,3 +193,3 @@ "id": "your-name",

{
"template": "radios",
"template": "globalFormRadios",
"label": "Animal",

@@ -221,3 +226,3 @@ "inputs": [

{
"template": "text",
"template": "globalFormText",
"label": "What type of monkey?",

@@ -239,3 +244,3 @@ "id": "monkey-type",

{
"template": "checkbox",
"template": "globalFormCheckbox",
"label": "Monkeys",

@@ -246,3 +251,3 @@ "id": "checkbox-monkeys",

{
"template": "checkbox",
"template": "globalFormCheckbox",
"label": "Horses",

@@ -265,3 +270,3 @@ "id": "checkbox-horses",

{
"template": "buttons",
"template": "globalFormButtons",
"buttons": [

@@ -268,0 +273,0 @@ {

Sorry, the diff of this file is not supported yet

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