2.0.1-alpha.17 • Published 2 months ago

@politico/vue-accessible-selects v2.0.1-alpha.17

Weekly downloads
65
License
MIT
Repository
github
Last release
2 months ago

vue-accessible-selects

Current Development

This entire repo is very much in an alpha state, and should currently be used only within internal Politico projects, as props / events / classes remain fluid. However, we are working towards a 1.0.0 release, and want to capture our relevant bugs fixed during that process.

References

Current Usage (updated 9/14/20)

// In component

import { SelectSingle, SelectMultiple, SelectOption } from '@politico/vue-accessible-selects'

const sampleOptions: SelectOption[] = [{
	label: 'One Option',
	value: 'one_option'
}, {
	label: 'Another Option',
	value: 'another_option'
}]

export default Vue.extend({
	components: { SelectSingle, SelectMultiple },
	data() {
		return {
			sampleOptions,
			selectSingleValue: {} as SelectOption,
			selectMultipleValues: [] as SelectOption[]
		}
	},
	methods: {
		handleSelectEvent(selectedValue: SelectOption) {
			// selectedValue will be the most recently selected value
			// *generally not necessary*, if state can be handled w/ v-model alone
		},
		handleRemoveEvent(selectedValue: SelectOption) {
			// selectedValue will be the most recently removed value
			// *generally not necessary*, if state can be handled w/ v-model alone
		},
		handleSearchChangeEvent(inputValue: string) {
			// inputValue will be the current user-provided search string
			// primarily useful for making autocomplete calls
		}
	}
})
<SelectSingle
	v-model="selectSingleValue"
	:options="sampleOptions"
	label="My Single Select"
	:labelisVisible="true"
	@select="handleSelectEvent"
/>

<SelectMultiple
	v-model="selectMultipleValues"
	:options="sampleOptions"
	label="My Multiple Select"
	:labelIsVisible="true"
	placeholder="Default Text to Display"
	@select="handleSelectEvent"
	@remove="handleRemoveEvent"
	@searchChange="handleSearchChangeEvent"
/>
// For now, we provide SCSS mixins to customize w/ colors
// Soon, we'll add documentation for the primary classes to target, as well as a default .css file to include
// So in a .scss file used by your project...

// Using Webpack syntax: `~` indicates "look in the current working directory"
@import '~@politico/vue-accessible-selects/dist/mixins.scss';

@include select(
	$primary-background-color: white,
	$focus-background-color: green,
)
@include select-multi(
	$selected-option-pill-color: blue,
	$selected-option-pill-background-color: lightblue
)
2.0.1-alpha.18

2 months ago

2.0.1-alpha.17

5 months ago

2.0.1-alpha.15

7 months ago

2.0.1-alpha.16

6 months ago

2.0.1-alpha.13

8 months ago

2.0.1-alpha.14

8 months ago

2.0.1-alpha.11

10 months ago

2.0.1-alpha.12

9 months ago

2.0.1-alpha.10

10 months ago

1.9.1

6 months ago

2.0.1-alpha.6

10 months ago

1.9.0

7 months ago

2.0.1-alpha.7

10 months ago

2.0.1-alpha.8

10 months ago

2.0.1-alpha.9

10 months ago

2.0.1-alpha.0

10 months ago

2.0.1-alpha.2

10 months ago

2.0.1-alpha.3

10 months ago

2.0.1-alpha.4

10 months ago

2.0.1-alpha.5

10 months ago

1.8.8

8 months ago

1.8.2

1 year ago

1.8.7

11 months ago

1.8.6

11 months ago

1.8.5

1 year ago

1.8.4

1 year ago

1.8.3

1 year ago

1.8.1

1 year ago

1.8.0

1 year ago

1.7.0

1 year ago

1.6.0

1 year ago

1.5.0

1 year ago

1.4.0

1 year ago

1.3.0

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.1.0

2 years ago

0.17.0

3 years ago

0.16.0

3 years ago

0.14.0

3 years ago

0.13.1

3 years ago

0.13.0

3 years ago

0.12.1-alpha.3

3 years ago

0.12.1

3 years ago

0.12.0

3 years ago

0.11.2

3 years ago

0.11.1

3 years ago

0.11.0

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.8.0

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.1

4 years ago

0.5.1-alpha.1

4 years ago

0.4.5

4 years ago

0.5.0

4 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.3-alpha.0

4 years ago

0.4.2

4 years ago

0.4.2-alpha.1

4 years ago

0.4.2-alpha.0

4 years ago

0.4.1-alpha.0

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1-alpha.0

4 years ago

0.3.0

4 years ago

0.2.1-alpha.3

4 years ago

0.2.1-alpha.2

4 years ago

0.2.1-alpha.0

4 years ago

0.2.1-alpha.1

4 years ago

0.2.0

4 years ago

0.1.1-alpha.0

4 years ago

0.1.0

4 years ago

0.0.2-alpha.6

4 years ago

0.0.2-alpha.5

4 years ago

0.0.2-alpha.2

4 years ago

0.0.2-alpha.4

4 years ago

0.0.2-alpha.3

4 years ago

0.0.2-alpha.1

4 years ago

0.0.2-alpha.0

4 years ago

0.0.1

4 years ago