-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update type param to variant on various components (#3047)
- Loading branch information
Showing
58 changed files
with
312 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
| Name | Type | Required | Description | | ||
| -------------------------- | ------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| type | string | false | Set to “check” to add the character limit checker to the input | | ||
| id | string | true | The HTML `id` of the component | | ||
| limit | integer | true | The maximum number of characters allowed in the input | | ||
| charCountPlural | string | true (unless `type` is set) | The string displayed when multiple characters can be entered before the limit is reached. Set `{x}` in the string to be replaced with the number, for example “You have {x} characters remaining”. | | ||
| charCountSingular | string | true (unless `type` is set) | The string displayed when one more character can be entered before the limit is reached. Set `{x}` in the string to be replaced with the number, for example “You have {x} character remaining”. | | ||
| charCountOverLimitPlural | string | false (unless `type` is set) | The string displayed when multiple characters over the limit have been entered. Set `{x}` in the string to be replaced with the number, for example “{x} characters too many”. | | ||
| charCountOverLimitSingular | string | false (unless `type` is set) | The string displayed when one character over the limit has been entered. Set `{x}` in the string to be replaced with the number, for example “{x} character too many”. | | ||
| Name | Type | Required | Description | | ||
| -------------------------- | ------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| variant | string | false | Set to “check” to add the character limit checker to the input | | ||
| id | string | true | The HTML `id` of the component | | ||
| limit | integer | true | The maximum number of characters allowed in the input | | ||
| charCountPlural | string | true (unless `variant` is set) | The string displayed when multiple characters can be entered before the limit is reached. Set `{x}` in the string to be replaced with the number, for example “You have {x} characters remaining”. | | ||
| charCountSingular | string | true (unless `variant` is set) | The string displayed when one more character can be entered before the limit is reached. Set `{x}` in the string to be replaced with the number, for example “You have {x} character remaining”. | | ||
| charCountOverLimitPlural | string | false (unless `variant` is set) | The string displayed when multiple characters over the limit have been entered. Set `{x}` in the string to be replaced with the number, for example “{x} characters too many”. | | ||
| charCountOverLimitSingular | string | false (unless `variant` is set) | The string displayed when one character over the limit has been entered. Set `{x}` in the string to be replaced with the number, for example “{x} character too many”. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
{% macro patternLibExampleGrid(params) %} | ||
{% if params.container -%} | ||
<div class="ons-container"> | ||
{% endif -%} | ||
{% if params.container -%} | ||
<div class="ons-container"> | ||
{% endif -%} | ||
|
||
<div class="ons-grid"> | ||
{% for item in (params.itemsList if params.itemsList is iterable else params.itemsList.items()) -%} | ||
{% for i in range(0, item.repeat | default(1) ) -%} | ||
<div class="ons-grid__col ons-col-{{ item.col }}@m {{ item.classes }}"> | ||
<div class="ons-pl-grid-col">{{ item.col }} col</div> | ||
</div> | ||
{%- endfor %} | ||
{%- endfor %} | ||
</div> | ||
|
||
{% if params.container -%} | ||
<div class="ons-grid"> | ||
{% for item in (params.itemsList if params.itemsList is iterable else params.itemsList.items()) -%} | ||
{% for i in range(0, item.repeat | default(1) ) -%} | ||
<div class="ons-grid__col ons-col-{{ item.col }}@m {{ item.classes }}"> | ||
<div class="ons-pl-grid-col">{{ item.col }} col</div> | ||
</div> | ||
{%- endfor %} | ||
{%- endfor %} | ||
</div> | ||
{% endif -%} | ||
|
||
{% if params.container -%} | ||
</div> | ||
{% endif -%} | ||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
{%- macro onsMessage(params) -%} | ||
<div class="ons-message ons-message--{{ params.type }}"> | ||
<div class="ons-message__head"> | ||
<dl class="ons-message__metadata" {% if params.id %} id="{{ params.id }}"{% endif %}> | ||
<div class="ons-message__sender"> | ||
<dt class="ons-message__term ons-u-fw-b">{{ params.fromLabel }}:</dt> | ||
<dd class="ons-message__value ons-u-fw-b" {% if params.fromId %} id="{{ params.fromId }}"{% endif %} {% if params.fromName %} name="{{ params.fromName }}"{% endif %}>{{ params.fromValue }}</dd> | ||
<div class="ons-message ons-message--{{ params.variant }}"> | ||
<div class="ons-message__head"> | ||
<dl class="ons-message__metadata" {% if params.id %} id="{{ params.id }}"{% endif %}> | ||
<div class="ons-message__sender"> | ||
<dt class="ons-message__term ons-u-fw-b">{{ params.fromLabel }}:</dt> | ||
<dd class="ons-message__value ons-u-fw-b" {% if params.fromId %} id="{{ params.fromId }}"{% endif %} {% if params.fromName %} name="{{ params.fromName }}"{% endif %}>{{ params.fromValue }}</dd> | ||
</div> | ||
<div class="ons-message__timestamp"> | ||
<dt class="ons-message__term ons-u-fs-s">{{ params.sentLabel }}:</dt> | ||
<dd class="ons-message__value ons-u-fs-s" {% if params.sentId %} id="{{ params.sentId }}"{% endif %} {% if params.sentName %} name="{{ params.sentName }}"{% endif %}>{{ params.sentValue }}</dd> | ||
</div> | ||
</dl> | ||
{% if params.unreadLink %} | ||
<a class="ons-message__unread-link" {% if params.unreadLinkId %}id="{{ params.unreadLinkId }}"{% endif %} href="{{ params.unreadLink }}">{{ params.unreadLinkText }}</a> | ||
{% endif %} | ||
</div> | ||
<div class="ons-message__timestamp"> | ||
<dt class="ons-message__term ons-u-fs-s">{{ params.sentLabel }}:</dt> | ||
<dd class="ons-message__value ons-u-fs-s" {% if params.sentId %} id="{{ params.sentId }}"{% endif %} {% if params.sentName %} name="{{ params.sentName }}"{% endif %}>{{ params.sentValue }}</dd> | ||
<div class="ons-message__body" {% if params.messageID %} id="{{ params.messageID }}"{% endif %}> | ||
{{ caller() }} | ||
</div> | ||
</dl> | ||
{% if params.unreadLink %} | ||
<a class="ons-message__unread-link" {% if params.unreadLinkId %}id="{{ params.unreadLinkId }}"{% endif %} href="{{ params.unreadLink }}">{{ params.unreadLinkText }}</a> | ||
{% endif %} | ||
</div> | ||
<div class="ons-message__body" {% if params.messageID %} id="{{ params.messageID }}"{% endif %}> | ||
{{ caller() }} | ||
</div> | ||
</div> | ||
{%- endmacro -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.