Skip to content

Commit

Permalink
Merge branch 'main' into dependency/9/remove-simple-slack-notify
Browse files Browse the repository at this point in the history
  • Loading branch information
rmccar authored Oct 19, 2023
2 parents e66707a + 8935fd8 commit 94a81f7
Show file tree
Hide file tree
Showing 56 changed files with 1,001 additions and 776 deletions.
174 changes: 122 additions & 52 deletions __snapshots__/layout/_template.spec.js.snap

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 12 additions & 10 deletions src/components/address-input/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,19 @@
onsAutosuggest({
"id": params.id + "-autosuggest",
"classes": "ons-address-input__autosuggest ons-u-mb-no",
"width": "50",
"label": {
"text": params.label.text,
"id": params.label.id,
"classes": "ons-js-autosuggest-label"
"input": {
"width": "50",
"label": {
"text": params.label.text,
"id": params.label.id,
"classes": "ons-js-autosuggest-label"
},
"value": params.value,
"attributes": params.attributes,
"error": params.error,
"name": params.name,
"mutuallyExclusive": params.mutuallyExclusive
},
"value": params.value,
"attributes": params.attributes,
"error": params.error,
"name": params.name,
"mutuallyExclusive": params.mutuallyExclusive,
"externalInitialiser": true,
"APIDomain": params.APIDomain,
"APIDomainBearerToken": params.APIDomainBearerToken,
Expand Down
22 changes: 12 additions & 10 deletions src/components/address-input/_macro.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,17 +352,19 @@ describe('macro: address-input', () => {
expect(autosuggestSpy.occurrences[0]).toEqual({
id: 'address-input-example-id-autosuggest',
classes: 'ons-address-input__autosuggest ons-u-mb-no',
width: '50',
label: {
text: '[params.label.text]',
id: '[params.label.id]',
classes: 'ons-js-autosuggest-label',
input: {
width: '50',
label: {
text: '[params.label.text]',
id: '[params.label.id]',
classes: 'ons-js-autosuggest-label',
},
value: '[params.value]',
attributes: '[params.attributes]',
error: '[params.error]',
name: '[params.name]',
mutuallyExclusive: '[params.mutuallyExclusive]',
},
value: '[params.value]',
attributes: '[params.attributes]',
error: '[params.error]',
name: '[params.name]',
mutuallyExclusive: '[params.mutuallyExclusive]',
externalInitialiser: true,
APIDomain: '[params.APIDomain]',
APIDomainBearerToken: '[params.APIDomainBearerToken]',
Expand Down
12 changes: 1 addition & 11 deletions src/components/autosuggest/_macro-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,5 @@
| typeMore | string | true | message to encourage the user to enter more characters to get suggestions |
| resultsTitle | string | true | Title of results to be displayed on screen at the top of the results |
| resultsTitleId | string | true | ID for the results title. The ID is used in the results `aria-labelledby` to provide context for the results |
| mutuallyExclusive | `MutuallyExclusive` [_(ref)_](/components/mutually-exclusive) | false | Configuration object if this is a mutually exclusive input |
| label | `Label` [_(ref)_](/components/label) | false | Settings for the input label. `for` will automatically be set to match the input id |
| classes | string | false | Classes to add to the input. |
| legend | string | Only if mutuallyExclusive is set | Text content for the legend |
| legendClasses | string | false | Classes for the legend |
| error | `Error` [_(ref)_](/components/error) | false | Configuration for validation errors |
| name | string | false | The name of the input |
| value | string | number | false | The value to set the input to |
| attributes | object | false | HTML attributes (for example, data attributes) to add to the input |
| autocomplete | string | true | Autocomplete attribute used to override the browsers native autocomplete |
| accessiblePlaceholder | boolean | false | Will add the provided label as an accessible placeholder |
| input | `Input` [_(ref)_](/components/input) | true | Configuration object for the input |
| language | string | false | The ISO 639-1 Code will override the default language in page. Please note that only 'en', 'cy' and 'ni' is currently supported |
63 changes: 38 additions & 25 deletions src/components/autosuggest/_macro.njk
Original file line number Diff line number Diff line change
Expand Up @@ -37,37 +37,50 @@
>

{% set autosuggestResults %}
<div class="ons-autosuggest__results ons-js-autosuggest-results{% if params.width %} ons-input--w-{{ params.width }}{% else %} ons-input--w-20{% endif %}">
<div class="ons-autosuggest__results ons-js-autosuggest-results{% if params.input.width %} ons-input--w-{{ params.input.width }}{% else %} ons-input--w-20{% endif %}">
<div id="{{ params.resultsTitleId }}" class="ons-autosuggest__results-title ons-u-fs-s">{{ params.resultsTitle }}</div>
<ul class="ons-autosuggest__listbox ons-js-autosuggest-listbox" title="{{ params.resultsTitle }}" role="listbox" id="{{ params.id }}-listbox" tabindex="-1"></ul>
</div>
<div class="ons-autosuggest__instructions ons-u-vh ons-js-autosuggest-instructions" id="{{ params.id }}-instructions" tabindex="-1">{{ params.instructions }}</div>
<div class="ons-autosuggest__status ons-u-vh ons-js-autosuggest-aria-status" aria-live="assertive" aria-atomic="true" role="status" tabindex="-1"></div>
{% endset %}
{{ onsInput({
"id": params.id,
"classes": "ons-js-autosuggest-input " + (params.classes if params.classes else ''),
"width": params.width,
"label": {
"text": params.label.text,
"description": params.label.description,
"id": params.label.id,
"classes": params.label.classes
},
"autocomplete": params.autocomplete,
"legend": params.legend,
"legendClasses": params.legendClasses,
"value": params.value,
"attributes": params.attributes,
"error": params.error,
"mutuallyExclusive": params.mutuallyExclusive,
"accessiblePlaceholder": params.accessiblePlaceholder,
"name": params.name,
"autosuggestResults": autosuggestResults
}) }}

{% if not params.mutuallyExclusive %}
{{ autosuggestResults | safe }}
{% endif %}
{{ onsInput({
"id": params.id,
"type": params.input.type,
"classes": "ons-js-autosuggest-input " + (params.input.classes if params.input.classes else ''),
"width": params.input.width,
"label": params.input.label,
"autocomplete": params.input.autocomplete,
"legend": params.input.legend,
"legendClasses": params.input.legendClasses,
"legendIsQuestionTitle": params.input.legendIsQuestionTitle,
"value": params.input.value,
"attributes": params.input.attributes,
"error": params.input.error,
"mutuallyExclusive": params.input.mutuallyExclusive,
"accessiblePlaceholder": params.input.accessiblePlaceholder,
"name": params.input.name,
"autosuggestResults": autosuggestResults,
"min": params.input.min,
"max": params.input.max,
"minLength": params.input.minLength,
"maxLength": params.input.maxLength,
"prefix": params.input.prefix,
"suffix": params.input.suffix,
"fieldId": params.input.fieldId,
"fieldClasses": params.input.fieldClasses,
"dontWrap": params.input.dontWrap,
"charCheckLimit": params.input.charCheckLimit,
"searchButton": params.input.searchButton,
"postTextboxLinkText": params.input.postTextboxLinkText,
"postTextboxLinkUrl": params.input.postTextboxLinkUrl,
"listeners": params.input.listeners
}) }}

{% if not params.mutuallyExclusive %}
{{ autosuggestResults | safe }}
{% endif %}

</div>
{% endmacro %}
Loading

0 comments on commit 94a81f7

Please sign in to comment.