diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b0815e..2a8eb2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), enforced with [semantic-release](https://github.com/semantic-release/semantic-release). +## [11.3.0](https://github.com/silinternational/ui-components/compare/v11.2.0...v11.3.0) (2024-04-16) + + +### Fixed + +* **Select:** update to match installed version of material/select ([a739d35](https://github.com/silinternational/ui-components/commit/a739d35b5635c74f3846feb3cee3485e5db2929d)) + + +### Added + +* **Select:** Add Select.name for convenient form submission ([8f7380b](https://github.com/silinternational/ui-components/commit/8f7380bcd34df41600d3be7bbe9fafc3187c4df8)) +* **Select:** Add Select.required prop ([94bab91](https://github.com/silinternational/ui-components/commit/94bab918ba3a6560c49670622802aa942ee32628)) +* **Select:** Add Select.ShowError prop which applies the mdc-select--invalid class to the ([3d8f95d](https://github.com/silinternational/ui-components/commit/3d8f95d4657a1ee99f6900522a3449126790f20e)) + + ## [11.2.0](https://github.com/silinternational/ui-components/compare/v11.1.2...v11.2.0) (2024-04-09) diff --git a/components/mdc/Select/Select.svelte b/components/mdc/Select/Select.svelte index d9879e3..08c09c4 100644 --- a/components/mdc/Select/Select.svelte +++ b/components/mdc/Select/Select.svelte @@ -15,6 +15,12 @@ export let width = '280px' export let disabled = false /** @type {string} The ID of the selected option. */ export let selectedID = '' +/** @type {boolean} makes a selection required and adds invalid class when none selected */ +export let required = false +/** @type {boolean} applies the mdc-select--invalid class */ +export let showError = false +/** @type {string} a name for the hidden input field for form submission*/ +export let name = '' const dispatch = createEventDispatcher() const labelID = generateRandomID('select-label-') @@ -61,13 +67,32 @@ afterUpdate(() => { }) -