Skip to content
Merged
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- `open = true` and a first render with `open` show the backdrop at once, as they do the dialog. So do an append of an open dialog and a reopen after a close that the dialog cannot cancel. Before, the backdrop faded in. `show()` still fades both in.
- #### Dropdown
- <kbd>Enter</kbd> closes the open list also when no item is active, as in the select. Before, the list stayed open.
- #### Form controls
- `defaultValue` has the type of the default that the control keeps. Before, its type was `unknown`. The type is `string` for the input, textarea, mask input and color picker, `number` for the rating and slider, `string | undefined` for the select, `ComboValue<T>[]` for the combo, `Date | null` for the date time input and date picker, `DateRangeValue | null` for the date range picker, and `null` for the file input. As for `value`, the date controls also accept a string. In TypeScript, a write of another type is now an error.
- #### Library
- The library supports the last 2 major versions of Chrome, Edge, Firefox, Opera and Safari. The fallbacks for older browsers are removed, and the styles no longer have vendor prefixes for them.
- #### Mask input
Expand Down Expand Up @@ -109,7 +111,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- In single input mode, the calendar shows the month of the end that you type or spin, as it does with two inputs. Before, it showed only the month of the start.
- The `igcInput` and `igcChange` events of content in the prefix and suffix slots of the inputs reach your handlers, and they no longer change the value of the picker. Before, the picker stopped them, and an `igcChange` from that content cleared the value, or its end date with two inputs.
- A change of `name` renames the submitted `-start` and `-end` entries at once. Before, the form submitted the range under the old name.
- #### Date time input
- The API reference and the custom elements manifest give `value` the type `Date | null`. Before, they gave `T | null`. The TypeScript type does not change.
- #### File input
- A form reset always clears the selection and submits no files, also after code writes `defaultValue`. Before, the form submitted a file list written to `defaultValue` while the control showed no files, and a string one character per entry.
- The selected files are submitted under the current `name`. Before, a change of `name` kept them under the old name, and a `name` set after the selection submitted no files.
- #### Form controls
- A change of the `value` or `checked` attribute keeps the control pristine, so a later `defaultValue` or `defaultChecked` still sets the value, as for a native control.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-color-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ defineComponents(IgcColorPickerComponent);
hsl(a) and named colors.

An empty, whitespace-only or invalid string clears the value.
- `defaultValue`: `string`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `format`: `'hex' | 'rgb' | 'hsl'`. Default: `'hex'`. Attribute: `format`.
The color format of the string value.

Expand Down Expand Up @@ -58,10 +62,6 @@ defineComponents(IgcColorPickerComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-combo.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ defineComponents(IgcComboComponent);
- `value`: `ComboValue<T>[]`. Attribute: `value`.
The values of the selected items. With a `valueKey`, each value is that
field of an item. Without it, each value is the item itself.
- `defaultValue`: `ComboValue<T>[]`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `selection`: `T[]`. Read-only. No attribute.
Returns the current selection as an array of objects as provided in the `data` source.
- `pendingValue`: `ComboValue<T>[]`. Read-only. No attribute.
Expand All @@ -97,10 +101,6 @@ defineComponents(IgcComboComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-date-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ defineComponents(IgcDatePickerComponent);
intermediate state stays in the editor and is committed - together with an
`igcChange` event - when the edit is committed on blur. Use the `igcInput` event
to observe the value as it is being typed.
- `defaultValue`: `Date | null`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `placeholder`: `string`. Attribute: `placeholder`.
The placeholder text of the control.
- `selectionStart`: `number`. Read-only. No attribute.
Expand All @@ -37,10 +41,6 @@ defineComponents(IgcDatePickerComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-date-range-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ defineComponents(IgcDateRangePickerComponent);

- `value`: `DateRangeValue | null`. Attribute: `value`.
The value of the picker: a range with a `start` and an `end` date, or `null` when the range is empty.
- `defaultValue`: `DateRangeValue | null`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `visibleMonths`: `number`. Default: `2`. Attribute: `visible-months`.
The number of months displayed in the calendar: 1 or 2.
- `customRanges`: `CustomDateRange[]`. Default: `[]`. No attribute.
Expand Down Expand Up @@ -42,10 +46,6 @@ defineComponents(IgcDateRangePickerComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
10 changes: 5 additions & 5 deletions api-reference/igc-date-time-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,17 @@ defineComponents(IgcDateTimeInputComponent);

## Properties

- `value`: `T | null`. Attribute: `value`.
- `value`: `Date | null`. Attribute: `value`.
The value of the input.

Only ever holds a committed value. While the user is typing, the intermediate
state lives in the masked text and is committed - together with an `igcChange`
event - when the edit is committed on blur. Use the `igcInput` event to observe
the value as it is being typed.
- `defaultValue`: `Date | null`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `readOnly`: `boolean`. Default: `false`. Attribute: `readonly`, reflected.
Whether the control is read-only. The user cannot change its value.
- `mask`: `string`. Attribute: `mask`.
Expand All @@ -31,10 +35,6 @@ defineComponents(IgcDateTimeInputComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
7 changes: 3 additions & 4 deletions api-reference/igc-file-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ defineComponents(IgcFileInputComponent);
- `value`: `string`. Attribute: `value`.
The value of the control: the name of the first selected file, as the native file input gives it.
As for the native file input, only an empty string can be set. It clears the selection.
- `defaultValue`: `null`. No attribute.
The default value of the control. Always `null`: a file input has no
default selection, so a form reset clears it.
- `multiple`: `boolean`. Default: `false`. Attribute: `multiple`, reflected.
Whether the control allows the user to select more than one file.
- `directory`: `boolean`. Default: `false`. Attribute: `directory`.
Expand All @@ -36,10 +39,6 @@ defineComponents(IgcFileInputComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ defineComponents(IgcInputComponent);

- `value`: `string`. Attribute: `value`.
The value of the control.
- `defaultValue`: `string`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `type`: `'number' | 'text' | 'email' | 'password' | 'search' | 'tel' | 'url'`. Default: `'text'`. Attribute: `type`, reflected.
The type of the control.
- `readOnly`: `boolean`. Default: `false`. Attribute: `readonly`, reflected.
Expand Down Expand Up @@ -49,10 +53,6 @@ defineComponents(IgcInputComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-mask-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ defineComponents(IgcMaskInputComponent);
The value of the control. Its format depends on `valueMode`.

An empty value is always an empty string, regardless of the value mode.
- `defaultValue`: `string`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `mask`: `string`. Default: `'CCCCCCCCCC'`. Attribute: `mask`.
The mask pattern of the control.
- `prompt`: `string`. Default: `'_'`. Attribute: `prompt`.
Expand All @@ -35,10 +39,6 @@ defineComponents(IgcMaskInputComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-rating.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ defineComponents(IgcRatingComponent);
Use it for screen readers and for localization.
- `value`: `number`. Default: `0`. Attribute: `value`.
The value of the rating, clamped between 0 and `max`.
- `defaultValue`: `number`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `hoverPreview`: `boolean`. Default: `false`. Attribute: `hover-preview`, reflected.
Whether to show a preview of the value when hovering over the symbols.
- `readOnly`: `boolean`. Default: `false`. Attribute: `readonly`, reflected.
Expand All @@ -42,10 +46,6 @@ defineComponents(IgcRatingComponent);
to it. It also sets `step` to 1 and rounds the value up.
- `allowReset`: `boolean`. Default: `false`. Attribute: `allow-reset`, reflected.
Whether to reset the rating when the user selects the same value.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ defineComponents(IgcSelectComponent);

- `value`: `string | undefined`. Attribute: `value`.
The value of the control.
- `defaultValue`: `string | undefined`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `outlined`: `boolean`. Default: `false`. Attribute: `outlined`, reflected.
Whether the control has an outlined appearance.
- `autofocus`: `boolean`. Attribute: `autofocus`.
Expand All @@ -33,10 +37,6 @@ defineComponents(IgcSelectComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
2 changes: 1 addition & 1 deletion api-reference/igc-slider.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defineComponents(IgcSliderComponent);

- `value`: `number`. Attribute: `value`.
The current value of the component.
- `defaultValue`: `unknown`. No attribute.
- `defaultValue`: `number`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
Expand Down
8 changes: 4 additions & 4 deletions api-reference/igc-textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ defineComponents(IgcTextareaComponent);
less than 1 shows 2 lines.
- `value`: `string`. Attribute: `value`.
The value of the component.
- `defaultValue`: `string`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `spellcheck`: `boolean`. Default: `true`. Attribute: `spellcheck`.
Whether the browser checks the spelling of the value. As for the native attribute,
only the `"false"` attribute value turns the check off.
Expand All @@ -61,10 +65,6 @@ defineComponents(IgcTextareaComponent);
- `required`: `boolean`. Default: `false`. Attribute: `required`, reflected.
Whether the control is required. A required control that has no value,
or is not checked, fails validation.
- `defaultValue`: `unknown`. No attribute.
The default value of the control. A form reset restores the value to it.
While the value is unchanged since the start or the last form reset, a
new default also sets the value. The `value` attribute also sets it.
- `name`: `string`. Attribute: `name`, reflected.
The name of the control, submitted with the form data.
- `disabled`: `boolean`. Default: `false`. Attribute: `disabled`, reflected.
Expand Down
Loading