Skip to content

build: bump husky from 5.0.1 to 5.1.1 #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"gulp-cli": "^2.3.0",
"gulp-sass": "^4.0.2",
"highlight.js": "^10.4.0",
"husky": "5.0.1",
"husky": "5.1.1",
"inquirer": "^7.1.0",
"jasmine": "^3.5.0",
"jasmine-core": "^3.5.0",
Expand Down
32 changes: 16 additions & 16 deletions src/material/slider/slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ By default the minimum value of the slider is `0`, the maximum value is `100`, a
in increments of `1`. These values can be changed by setting the `min`, `max`, and `step` attributes
respectively. The initial value is set to the minimum value unless otherwise specified.

默认情况下,滑竿(slider)的最小值是 `0`,最大值是 `100`,滑块(thumb)移动时的增量是 `1`。
默认情况下,滑杆(slider)的最小值是 `0`,最大值是 `100`,滑块(thumb)移动时的增量是 `1`。
这些值可以通过设置 `min`、`max` 和 `step` 属性进行修改。除非另行指定,否则其初始值就等于最小值。

```html
Expand All @@ -32,7 +32,7 @@ By default sliders are horizontal with the minimum value on the left and the max
right. The `vertical` attribute can be added to a slider to make it vertical with the minimum value
on bottom and the maximum value on top.

默认情况下,滑竿是水平放置的,其最小值在左侧,最大值在右侧。可以给滑竿添加 `vertical` 属性,来让它变成垂直的,其最小值在底部,而最大值在顶部。
默认情况下,滑杆是水平放置的,其最小值在左侧,最大值在右侧。可以给滑杆添加 `vertical` 属性,来让它变成垂直的,其最小值在底部,而最大值在顶部。

```html
<mat-slider vertical></mat-slider>
Expand All @@ -44,7 +44,7 @@ on the left, while an inverted vertical slider will have the minimum value on to
value on bottom.

还可以指定 `invert` 属性,来翻转坐标轴(滑块会沿着它移动)。
翻转后的水平滑竿,其最小值在右侧,而最大值在左侧;翻转后的垂直滑竿,其最小值在上部,而最大值在底部。
翻转后的水平滑杆,其最小值在右侧,而最大值在左侧;翻转后的垂直滑杆,其最小值在上部,而最大值在底部。

```html
<mat-slider invert></mat-slider>
Expand All @@ -57,13 +57,13 @@ value on bottom.
By default, the exact selected value of a slider is not visible to the user. However, this value can
be added to the thumb by adding the `thumbLabel` attribute.

默认情况下,滑竿所选的精确值不会显示给用户。不过,可以通过 `thumbLabel` 属性来把这个值显示在滑块上。
默认情况下,滑杆所选的精确值不会显示给用户。不过,可以通过 `thumbLabel` 属性来把这个值显示在滑块上。

The [Material Design spec](https://material.io/design/components/sliders.html#discrete-slider) recommends using the
`thumbLabel` attribute (along with `tickInterval="1"`) only for sliders that are used to display a
discrete value (such as a 1-5 rating).

[Material Design 规范](https://material.io/design/components/sliders.html#discrete-slider)建议只为那些用来显示离散值(比如 1~5 的打分值)的滑竿使用 `thumbLabel` 属性(同时设置 `tickInterval="1"`)。
[Material Design 规范](https://material.io/design/components/sliders.html#discrete-slider)建议只为那些用来显示离散值(比如 1~5 的打分值)的滑杆使用 `thumbLabel` 属性(同时设置 `tickInterval="1"`)。

```html
<mat-slider thumbLabel tickInterval="1"></mat-slider>
Expand Down Expand Up @@ -91,7 +91,7 @@ By default, sliders do not show tick marks along the thumb track. This can be en
of steps between ticks. For example a `tickInterval` of `3` with a `step` of `4` will draw
tick marks at every `3` steps, which is the same as every `12` values.

默认情况下,滑竿不会在滑块的导轨(track)上显示刻度标记,不过可以使用 `tickInterval` 属性来启用它。`tickInterval` 的值应该是一个表示刻度之间步长的数字。比如 `tickInterval` 为 `3` 而 `step` 为 `4` 时,将会每隔 `3` 步画出一个标记,每 `12` 个值重复一轮。
默认情况下,滑杆不会在滑块的导轨(track)上显示刻度标记,不过可以使用 `tickInterval` 属性来启用它。`tickInterval` 的值应该是一个表示刻度之间步长的数字。比如 `tickInterval` 为 `3` 而 `step` 为 `4` 时,将会每隔 `3` 步画出一个标记,每 `12` 个值重复一轮。

```html
<mat-slider step="4" tickInterval="3"></mat-slider>
Expand All @@ -110,37 +110,37 @@ The slider will always show a tick at the beginning and end of the track. If the
doesn't add up perfectly the last interval will be shortened or lengthened so that the tick can be
shown at the end of the track.

滑竿始终会在导轨的起点和终点显示一个刻度。如果剩下的控件不够添加了,那么最后一个间距可能被缩短或拉长,以便让刻度显示在导轨的末尾。
滑杆始终会在导轨的起点和终点显示一个刻度。如果剩下的控件不够添加了,那么最后一个间距可能被缩短或拉长,以便让刻度显示在导轨的末尾。

The [Material Design spec](https://material.io/design/components/sliders.html#discrete-slider) recommends using the
`tickInterval` attribute (set to `1` along with the `thumbLabel` attribute) only for sliders that
are used to display a discrete value (such as a 1-5 rating).

[Material Design 规范](https://material.io/design/components/sliders.html#discrete-slider) 建议只为那些用来显示离散值(比如 1~5 的打分值)的滑竿设置 `tickInterval` 属性(同时把 `thumbLabel` 属性设置为 `1`)。
[Material Design 规范](https://material.io/design/components/sliders.html#discrete-slider) 建议只为那些用来显示离散值(比如 1~5 的打分值)的滑杆设置 `tickInterval` 属性(同时把 `thumbLabel` 属性设置为 `1`)。

### Keyboard interaction

### 键盘交互

The slider has the following keyboard bindings:

滑竿具有下列键盘绑定
滑杆具有下列键盘绑定

| Key | Action |
|-------------|------------------------------------------------------------------------------------|
| 按键 | 操作 |
| Right arrow | Increment the slider value by one step (decrements in RTL). |
| 右方向键 | 滑竿的值增加一步(在 RTL 下则减小)。 |
| 右方向键 | 滑杆的值增加一步(在 RTL 下则减小)。 |
| Up arrow | Increment the slider value by one step. |
| 上方向键 | 滑竿的值增加一步。 |
| 上方向键 | 滑杆的值增加一步。 |
| Left arrow | Decrement the slider value by one step (increments in RTL). |
| 左方向键 | 滑竿的值减小一步(在 RTL 下则增加)。 |
| 左方向键 | 滑杆的值减小一步(在 RTL 下则增加)。 |
| Down arrow | Decrement the slider value by one step. |
| 下方向键 | 滑竿的值减小一步。 |
| 下方向键 | 滑杆的值减小一步。 |
| Page up | Increment the slider value by 10 steps. |
| 上翻页 | 滑竿的值增加 10 步。 |
| 上翻页 | 滑杆的值增加 10 步。 |
| Page down | Decrement the slider value by 10 steps. |
| 下翻页 | 滑竿的值减小 10 步。 |
| 下翻页 | 滑杆的值减小 10 步。 |
| End | Set the value to the maximum possible. |
| End | 设置为可能的最大值。 |
| Home | Set the value to the minimum possible. |
Expand All @@ -153,4 +153,4 @@ The slider has the following keyboard bindings:
Sliders without text or labels should be given a meaningful label via `aria-label` or
`aria-labelledby`.

没有文本或标签的滑竿应该通过 `aria-label` 或 `aria-labelledby` 给出一个有意义的标签。
没有文本或标签的滑杆应该通过 `aria-label` 或 `aria-labelledby` 给出一个有意义的标签。
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6883,10 +6883,10 @@ https-proxy-agent@^5.0.0:
agent-base "6"
debug "4"

husky@5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/husky/-/husky-5.0.1.tgz#c1b1f2b0da297399e295b6c204b680e45f26feda"
integrity sha512-ZNfMqtluHyMaW795l1jOLGOGSFAyZ6JC8jZj1QkagBmfuxrSFKX+Wrbb9gR+OD8iNJb8JNDpaMtCpE5XnLdHMw==
husky@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/husky/-/husky-5.1.1.tgz#8678953fd8deb86f387cbf1ad50bb2f7f96e83f2"
integrity sha512-80LZ736V0Nr4/st0c2COYaMbEQhHNmAbLMN8J/kLk7/mo0QdUkUGNDjv/7jVkhug377Wh8wfbWyaVXEJ/h2B/Q==

[email protected], iconv-lite@^0.4.24, iconv-lite@^0.4.4, iconv-lite@~0.4.11:
version "0.4.24"
Expand Down