@onereach/ui-components 5.0.1-beta.3131.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.js +2 -3
- package/dist/bundled/v2/components/OrCheckboxV3/OrCheckbox.vue.d.ts +5 -5
- package/dist/bundled/v2/components/OrDatePickerV3/OrDatePicker.js +1 -1
- package/dist/bundled/v2/components/OrDatePickerV3/index.js +1 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/OrDateTimePicker.js +1 -1
- package/dist/bundled/v2/components/OrDateTimePickerV3/index.js +1 -1
- package/dist/bundled/v2/components/OrInputV3/OrInput.js +2 -2
- package/dist/bundled/v2/components/OrLabelV3/OrLabel.js +3 -7
- package/dist/bundled/v2/components/OrLabelV3/OrLabel.vue.d.ts +5 -16
- package/dist/bundled/v2/components/OrLabelV3/props.d.ts +1 -2
- package/dist/bundled/v2/components/OrLabelV3/props.js +0 -1
- package/dist/bundled/v2/components/OrLabelV3/styles.d.ts +2 -2
- package/dist/bundled/v2/components/OrLabelV3/styles.js +5 -14
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.js +24 -142
- package/dist/bundled/v2/components/OrSelectV3/OrSelect.vue.d.ts +0 -14
- package/dist/bundled/v2/components/OrSelectV3/styles.d.ts +1 -3
- package/dist/bundled/v2/components/OrSelectV3/styles.js +2 -12
- package/dist/bundled/v2/components/OrTimePickerV3/OrTimePicker.js +1 -1
- package/dist/bundled/v2/components/OrTimePickerV3/index.js +1 -1
- package/dist/bundled/v2/components/index.js +1 -1
- package/dist/bundled/v2/directives/dropdown-close.js +2 -0
- package/dist/bundled/v2/directives/dropdown-open.js +3 -1
- package/dist/bundled/v2/index.js +2 -2
- package/dist/bundled/v3/{OrCardCollection.vue_vue_type_script_lang-c93da401.js → OrCardCollection.vue_vue_type_script_lang-40124ef0.js} +1 -1
- package/dist/bundled/v3/{OrCheckbox.vue_vue_type_script_lang-38736023.js → OrCheckbox.vue_vue_type_script_lang-eeb6b419.js} +1 -1
- package/dist/bundled/v3/{OrCheckboxGroup.vue_vue_type_script_lang-51bbd047.js → OrCheckboxGroup.vue_vue_type_script_lang-3b25afe5.js} +2 -2
- package/dist/bundled/v3/{OrCheckboxTree.vue_vue_type_script_lang-e67747a4.js → OrCheckboxTree.vue_vue_type_script_lang-ab30a5c4.js} +1 -1
- package/dist/bundled/v3/{OrCode.vue_vue_type_script_lang-0e34e3c4.js → OrCode.vue_vue_type_script_lang-a99a2768.js} +1 -1
- package/dist/bundled/v3/{OrCombinedInput.vue_vue_type_script_lang-230d4d9c.js → OrCombinedInput.vue_vue_type_script_lang-cb7a88f3.js} +1 -1
- package/dist/bundled/v3/{OrConfirm.vue_vue_type_script_lang-383e286f.js → OrConfirm.vue_vue_type_script_lang-3f6484d7.js} +1 -1
- package/dist/bundled/v3/{OrDatePicker.vue_vue_type_script_lang-ae3aabc6.js → OrDatePicker.vue_vue_type_script_lang-15cde361.js} +2 -2
- package/dist/bundled/v3/{OrDateTimePicker.vue_vue_type_script_lang-911a50a3.js → OrDateTimePicker.vue_vue_type_script_lang-e3f9a844.js} +2 -2
- package/dist/bundled/v3/{OrDateTimePickerPopoverHeader-eff1f44b.js → OrDateTimePickerPopoverHeader-d9eef487.js} +1 -1
- package/dist/bundled/v3/{OrFormGroup.vue_vue_type_script_lang-d67479fc.js → OrFormGroup.vue_vue_type_script_lang-1c6844d6.js} +1 -1
- package/dist/bundled/v3/{OrInput.vue_vue_type_script_lang-ec80afeb.js → OrInput.vue_vue_type_script_lang-0ddddd27.js} +1 -1
- package/dist/bundled/v3/{OrLabel.vue_vue_type_script_lang-fcdfd80d.js → OrLabel.vue_vue_type_script_lang-3e11ab8a.js} +3 -6
- package/dist/bundled/v3/{OrRadio.vue_vue_type_script_lang-08ab2220.js → OrRadio.vue_vue_type_script_lang-48c2bc6b.js} +1 -1
- package/dist/bundled/v3/{OrRadioGroup.vue_vue_type_script_lang-d84948fc.js → OrRadioGroup.vue_vue_type_script_lang-d7f6f8ca.js} +2 -2
- package/dist/bundled/v3/{OrSearch.vue_vue_type_script_lang-12bbade9.js → OrSearch.vue_vue_type_script_lang-495149b0.js} +1 -1
- package/dist/bundled/v3/{OrSelect.vue_vue_type_script_lang-5f42a363.js → OrSelect.vue_vue_type_script_lang-cb556343.js} +8 -36
- package/dist/bundled/v3/{OrSwitch.vue_vue_type_script_lang-14b4ec0a.js → OrSwitch.vue_vue_type_script_lang-ee55263f.js} +1 -1
- package/dist/bundled/v3/{OrTagInput.vue_vue_type_script_lang-00010fb4.js → OrTagInput.vue_vue_type_script_lang-9f594179.js} +1 -1
- package/dist/bundled/v3/{OrTextarea.vue_vue_type_script_lang-a7cfbe82.js → OrTextarea.vue_vue_type_script_lang-7562cca1.js} +1 -1
- package/dist/bundled/v3/{OrTimePicker.vue_vue_type_script_lang-a3554386.js → OrTimePicker.vue_vue_type_script_lang-7de3a004.js} +2 -2
- package/dist/bundled/v3/components/OrCardCollectionV3/OrCardCollection.js +5 -5
- package/dist/bundled/v3/components/OrCardCollectionV3/index.js +4 -4
- package/dist/bundled/v3/components/OrCheckboxGroupV3/OrCheckboxGroup.js +6 -6
- package/dist/bundled/v3/components/OrCheckboxGroupV3/index.js +5 -5
- package/dist/bundled/v3/components/OrCheckboxTreeV3/OrCheckboxTree.js +4 -4
- package/dist/bundled/v3/components/OrCheckboxTreeV3/index.js +3 -3
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.js +4 -5
- package/dist/bundled/v3/components/OrCheckboxV3/OrCheckbox.vue.d.ts +3 -3
- package/dist/bundled/v3/components/OrCheckboxV3/index.js +2 -2
- package/dist/bundled/v3/components/OrCodeV3/OrCode.js +3 -3
- package/dist/bundled/v3/components/OrCodeV3/index.js +2 -2
- package/dist/bundled/v3/components/OrCombinedInputV3/OrCombinedInput.js +3 -3
- package/dist/bundled/v3/components/OrCombinedInputV3/index.js +2 -2
- package/dist/bundled/v3/components/OrConfirmV3/OrConfirm.js +4 -4
- package/dist/bundled/v3/components/OrConfirmV3/index.js +3 -3
- package/dist/bundled/v3/components/OrDatePickerV3/OrDatePicker.js +4 -4
- package/dist/bundled/v3/components/OrDatePickerV3/index.js +3 -3
- package/dist/bundled/v3/components/OrDateTimePickerV3/OrDateTimePicker.js +4 -4
- package/dist/bundled/v3/components/OrDateTimePickerV3/index.js +3 -3
- package/dist/bundled/v3/components/OrFormGroupV3/OrFormGroup.js +3 -3
- package/dist/bundled/v3/components/OrFormGroupV3/index.js +2 -2
- package/dist/bundled/v3/components/OrInputV3/OrInput.js +3 -3
- package/dist/bundled/v3/components/OrInputV3/index.js +2 -2
- package/dist/bundled/v3/components/OrLabelV3/OrLabel.js +3 -4
- package/dist/bundled/v3/components/OrLabelV3/OrLabel.vue.d.ts +3 -12
- package/dist/bundled/v3/components/OrLabelV3/index.js +1 -1
- package/dist/bundled/v3/components/OrLabelV3/props.d.ts +1 -2
- package/dist/bundled/v3/components/OrLabelV3/props.js +0 -1
- package/dist/bundled/v3/components/OrLabelV3/styles.d.ts +2 -2
- package/dist/bundled/v3/components/OrLabelV3/styles.js +5 -14
- package/dist/bundled/v3/components/OrRadioGroupV3/OrRadioGroup.js +5 -5
- package/dist/bundled/v3/components/OrRadioGroupV3/index.js +4 -4
- package/dist/bundled/v3/components/OrRadioV3/OrRadio.js +3 -3
- package/dist/bundled/v3/components/OrRadioV3/index.js +2 -2
- package/dist/bundled/v3/components/OrSearchV3/OrSearch.js +4 -4
- package/dist/bundled/v3/components/OrSearchV3/index.js +3 -3
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.js +43 -93
- package/dist/bundled/v3/components/OrSelectV3/OrSelect.vue.d.ts +0 -7
- package/dist/bundled/v3/components/OrSelectV3/index.js +4 -4
- package/dist/bundled/v3/components/OrSelectV3/styles.d.ts +1 -3
- package/dist/bundled/v3/components/OrSelectV3/styles.js +2 -12
- package/dist/bundled/v3/components/OrSwitchV3/OrSwitch.js +3 -3
- package/dist/bundled/v3/components/OrSwitchV3/index.js +2 -2
- package/dist/bundled/v3/components/OrTagInputV3/OrTagInput.js +3 -3
- package/dist/bundled/v3/components/OrTagInputV3/index.js +2 -2
- package/dist/bundled/v3/components/OrTextareaV3/OrTextarea.js +3 -3
- package/dist/bundled/v3/components/OrTextareaV3/index.js +2 -2
- package/dist/bundled/v3/components/OrTimePickerV3/OrTimePicker.js +4 -4
- package/dist/bundled/v3/components/OrTimePickerV3/index.js +3 -3
- package/dist/bundled/v3/components/index.js +21 -21
- package/dist/bundled/v3/directives/dropdown-close.js +2 -0
- package/dist/bundled/v3/directives/dropdown-open.js +3 -1
- package/dist/bundled/v3/index.js +22 -22
- package/dist/esm/v2/{OrCardCollection-10ae5e3a.js → OrCardCollection-9aaa7a3c.js} +1 -1
- package/dist/esm/v2/{OrCheckbox-ae903071.js → OrCheckbox-db66b4ea.js} +3 -4
- package/dist/esm/v2/{OrCheckboxGroup-74dc7c1d.js → OrCheckboxGroup-a04f27fe.js} +2 -2
- package/dist/esm/v2/{OrCheckboxTree-19f5d69b.js → OrCheckboxTree-f48db82f.js} +1 -1
- package/dist/esm/v2/{OrCode-65f78f9f.js → OrCode-dd915faf.js} +1 -1
- package/dist/esm/v2/{OrCombinedInput-2639e3e1.js → OrCombinedInput-45187323.js} +1 -1
- package/dist/esm/v2/{OrConfirm-d2ae622a.js → OrConfirm-a0875502.js} +1 -1
- package/dist/esm/v2/{OrDatePicker-3eef3059.js → OrDatePicker-0b119ef4.js} +3 -3
- package/dist/esm/v2/{OrDateTimePicker-aeebd5ea.js → OrDateTimePicker-061c7472.js} +1 -1
- package/dist/esm/v2/{OrDateTimePicker.vue_rollup-plugin-vue_script-5044ee23.js → OrDateTimePicker.vue_rollup-plugin-vue_script-18dea32e.js} +3 -3
- package/dist/esm/v2/{OrDateTimePickerPopoverHeader-83eb5ad1.js → OrDateTimePickerPopoverHeader-30ec0bf4.js} +1 -1
- package/dist/esm/v2/{OrFormGroup-9000fcdf.js → OrFormGroup-29a514db.js} +1 -1
- package/dist/esm/v2/{OrInput-fbed0b61.js → OrInput-99ccfff7.js} +3 -3
- package/dist/esm/v2/{OrLabel-4a3d8904.js → OrLabel-63380256.js} +6 -18
- package/dist/esm/v2/{OrRadio-0fc3ae14.js → OrRadio-b32dfbfe.js} +1 -1
- package/dist/esm/v2/{OrRadioGroup-1108883d.js → OrRadioGroup-d1c2e460.js} +2 -2
- package/dist/esm/v2/{OrSearch-598dee09.js → OrSearch-f49e5f70.js} +1 -1
- package/dist/esm/v2/{OrSelect-36461157.js → OrSelect-5e9508c9.js} +27 -156
- package/dist/esm/v2/{OrSwitch-a3da6bec.js → OrSwitch-e49ce2d8.js} +1 -1
- package/dist/esm/v2/{OrTagInput-400f0605.js → OrTagInput-5b1ac86e.js} +1 -1
- package/dist/esm/v2/{OrTextarea-6fe8b65f.js → OrTextarea-824f7048.js} +1 -1
- package/dist/esm/v2/{OrTimePicker-b6c79be1.js → OrTimePicker-d73ce31e.js} +4 -4
- package/dist/esm/v2/components/index.js +23 -23
- package/dist/esm/v2/components/or-card-collection-v3/index.js +4 -4
- package/dist/esm/v2/components/or-checkbox-group-v3/index.js +5 -5
- package/dist/esm/v2/components/or-checkbox-tree-v3/index.js +3 -3
- package/dist/esm/v2/components/or-checkbox-v3/OrCheckbox.vue.d.ts +5 -5
- package/dist/esm/v2/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v2/components/or-code-v3/index.js +2 -2
- package/dist/esm/v2/components/or-combined-input-v3/index.js +2 -2
- package/dist/esm/v2/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v2/components/or-date-picker-v3/index.js +4 -4
- package/dist/esm/v2/components/or-date-time-picker-v3/index.js +5 -5
- package/dist/esm/v2/components/or-form-group-v3/index.js +2 -2
- package/dist/esm/v2/components/or-input-v3/index.js +2 -2
- package/dist/esm/v2/components/or-label-v3/OrLabel.vue.d.ts +5 -16
- package/dist/esm/v2/components/or-label-v3/index.js +1 -1
- package/dist/esm/v2/components/or-label-v3/props.d.ts +1 -2
- package/dist/esm/v2/components/or-label-v3/styles.d.ts +2 -2
- package/dist/esm/v2/components/or-radio-group-v3/index.js +4 -4
- package/dist/esm/v2/components/or-radio-v3/index.js +2 -2
- package/dist/esm/v2/components/or-search-v3/index.js +3 -3
- package/dist/esm/v2/components/or-select-v3/OrSelect.vue.d.ts +0 -14
- package/dist/esm/v2/components/or-select-v3/index.js +6 -6
- package/dist/esm/v2/components/or-select-v3/styles.d.ts +1 -3
- package/dist/esm/v2/components/or-switch-v3/index.js +2 -2
- package/dist/esm/v2/components/or-tag-input-v3/index.js +2 -2
- package/dist/esm/v2/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v2/components/or-time-picker-v3/index.js +5 -5
- package/dist/esm/v2/directives/index.js +1 -1
- package/dist/esm/{v3/dropdown-open-06d651cf.js → v2/dropdown-open-e1f90e0a.js} +5 -1
- package/dist/esm/v2/index.js +23 -23
- package/dist/esm/v3/{OrCardCollection-7d647b53.js → OrCardCollection-5a10ca80.js} +1 -1
- package/dist/esm/v3/{OrCheckbox-a571fc90.js → OrCheckbox-09f62aab.js} +2 -3
- package/dist/esm/v3/{OrCheckboxGroup-7fe25d85.js → OrCheckboxGroup-6c054793.js} +2 -2
- package/dist/esm/v3/{OrCheckboxTree-bea23696.js → OrCheckboxTree-bb32455e.js} +1 -1
- package/dist/esm/v3/{OrCode-fd372d76.js → OrCode-98aceeef.js} +1 -1
- package/dist/esm/v3/{OrCombinedInput-6dd0f75d.js → OrCombinedInput-2800ee8b.js} +1 -1
- package/dist/esm/v3/{OrConfirm-de678c6c.js → OrConfirm-8d0351b9.js} +1 -1
- package/dist/esm/v3/{OrDatePicker-10c4e1ea.js → OrDatePicker-819007d7.js} +3 -3
- package/dist/esm/v3/{OrDateTimePicker-044dd6fb.js → OrDateTimePicker-7b08665c.js} +3 -3
- package/dist/esm/v3/{OrDateTimePickerPopoverHeader-ae493df9.js → OrDateTimePickerPopoverHeader-c3900e9a.js} +1 -1
- package/dist/esm/v3/{OrFormGroup-c4631ef0.js → OrFormGroup-9f581536.js} +1 -1
- package/dist/esm/v3/{OrInput-487c7632.js → OrInput-cfc9d445.js} +1 -1
- package/dist/esm/v3/{OrLabel-d4c46bb6.js → OrLabel-4da56db0.js} +7 -19
- package/dist/esm/v3/{OrRadio-48cd02a9.js → OrRadio-7b722b16.js} +1 -1
- package/dist/esm/v3/{OrRadioGroup-82d10aa8.js → OrRadioGroup-58c0214c.js} +2 -2
- package/dist/esm/v3/{OrSearch-998e4390.js → OrSearch-c823ee5e.js} +1 -1
- package/dist/esm/v3/{OrSelect-1ef6f9d9.js → OrSelect-d4bbddf1.js} +47 -135
- package/dist/esm/v3/{OrSwitch-f4d9e196.js → OrSwitch-a6efd081.js} +1 -1
- package/dist/esm/v3/{OrTagInput-65e725b0.js → OrTagInput-b5f6be7c.js} +1 -1
- package/dist/esm/v3/{OrTextarea-f3412790.js → OrTextarea-6c471ccd.js} +1 -1
- package/dist/esm/v3/{OrTimePicker-ef98ec36.js → OrTimePicker-27be4172.js} +4 -4
- package/dist/esm/v3/components/index.js +22 -22
- package/dist/esm/v3/components/or-card-collection-v3/index.js +4 -4
- package/dist/esm/v3/components/or-checkbox-group-v3/index.js +5 -5
- package/dist/esm/v3/components/or-checkbox-tree-v3/index.js +3 -3
- package/dist/esm/v3/components/or-checkbox-v3/OrCheckbox.vue.d.ts +3 -3
- package/dist/esm/v3/components/or-checkbox-v3/index.js +2 -2
- package/dist/esm/v3/components/or-code-v3/index.js +2 -2
- package/dist/esm/v3/components/or-combined-input-v3/index.js +2 -2
- package/dist/esm/v3/components/or-confirm-v3/index.js +3 -3
- package/dist/esm/v3/components/or-date-picker-v3/index.js +4 -4
- package/dist/esm/v3/components/or-date-time-picker-v3/index.js +4 -4
- package/dist/esm/v3/components/or-form-group-v3/index.js +2 -2
- package/dist/esm/v3/components/or-input-v3/index.js +2 -2
- package/dist/esm/v3/components/or-label-v3/OrLabel.vue.d.ts +3 -12
- package/dist/esm/v3/components/or-label-v3/index.js +1 -1
- package/dist/esm/v3/components/or-label-v3/props.d.ts +1 -2
- package/dist/esm/v3/components/or-label-v3/styles.d.ts +2 -2
- package/dist/esm/v3/components/or-radio-group-v3/index.js +4 -4
- package/dist/esm/v3/components/or-radio-v3/index.js +2 -2
- package/dist/esm/v3/components/or-search-v3/index.js +3 -3
- package/dist/esm/v3/components/or-select-v3/OrSelect.vue.d.ts +0 -7
- package/dist/esm/v3/components/or-select-v3/index.js +6 -6
- package/dist/esm/v3/components/or-select-v3/styles.d.ts +1 -3
- package/dist/esm/v3/components/or-switch-v3/index.js +2 -2
- package/dist/esm/v3/components/or-tag-input-v3/index.js +2 -2
- package/dist/esm/v3/components/or-textarea-v3/index.js +2 -2
- package/dist/esm/v3/components/or-time-picker-v3/index.js +5 -5
- package/dist/esm/v3/directives/index.js +1 -1
- package/dist/esm/{v2/dropdown-open-06d651cf.js → v3/dropdown-open-e1f90e0a.js} +5 -1
- package/dist/esm/v3/index.js +22 -22
- package/package.json +4 -9
- package/src/components/or-checkbox-v3/OrCheckbox.vue +0 -1
- package/src/components/or-input-v3/OrInput.vue +0 -1
- package/src/components/or-label-v3/OrLabel.vue +5 -9
- package/src/components/or-label-v3/props.ts +0 -1
- package/src/components/or-label-v3/styles.ts +4 -16
- package/src/components/or-select-v3/OrSelect.vue +27 -123
- package/src/components/or-select-v3/styles.ts +1 -18
- package/src/components/or-toast/constants.ts +4 -4
- package/src/directives/dropdown-close.ts +3 -0
- package/src/directives/dropdown-open.ts +4 -1
- package/dist/bundled/v2/components/OrSelect/stories.helpers.d.ts +0 -6
- package/dist/bundled/v3/components/OrSelect/stories.helpers.d.ts +0 -6
- package/dist/esm/v2/components/or-select/stories.helpers.d.ts +0 -6
- package/dist/esm/v3/components/or-select/stories.helpers.d.ts +0 -6
- package/src/components/or-avatar/OrAvatar.stories.ts +0 -44
- package/src/components/or-button/OrButton.stories.ts +0 -364
- package/src/components/or-button-v2/OrButton.stories.ts +0 -136
- package/src/components/or-card/OrCard.stories.ts +0 -58
- package/src/components/or-card-collection/OrCardCollection.stories.ts +0 -110
- package/src/components/or-checkbox/OrCheckbox.stories.ts +0 -383
- package/src/components/or-chips/OrChips.stories.ts +0 -96
- package/src/components/or-chips/or-chip/OrChip.stories.ts +0 -59
- package/src/components/or-code/OrCode.stories.ts +0 -328
- package/src/components/or-collapse/OrCollapse.stories.ts +0 -654
- package/src/components/or-color-picker/OrColorPicker.stories.ts +0 -48
- package/src/components/or-confirm/OrConfirm.stories.ts +0 -175
- package/src/components/or-date-time-picker/OrDateTimePicker.stories.ts +0 -162
- package/src/components/or-error/OrError.stories.ts +0 -35
- package/src/components/or-floating/OrFloating.stories.ts +0 -81
- package/src/components/or-hint/OrHint.stories.ts +0 -26
- package/src/components/or-icon/OrIcon.stories.ts +0 -74
- package/src/components/or-icon/or-icon-tips.stories.mdx +0 -26
- package/src/components/or-icon-button-v2/OrIconButton.stories.ts +0 -134
- package/src/components/or-inline-text-edit/OrInlineTextEdit.stories.ts +0 -187
- package/src/components/or-input/OrInput.stories.ts +0 -375
- package/src/components/or-input/or-textbox-migration.stories.mdx +0 -32
- package/src/components/or-label/OrLabel.stories.ts +0 -64
- package/src/components/or-list/OrList.stories.ts +0 -229
- package/src/components/or-list-of-inputs/OrListOfInputs.stories.ts +0 -164
- package/src/components/or-loader/OrLoader.stories.ts +0 -43
- package/src/components/or-modal/OrModal.stories.ts +0 -215
- package/src/components/or-notification/OrNotification.stories.ts +0 -98
- package/src/components/or-number-input/OrNumberInput.stories.ts +0 -354
- package/src/components/or-overflow-menu/OrOverflowMenu.stories.ts +0 -167
- package/src/components/or-overlay/OrOverlay.stories.ts +0 -53
- package/src/components/or-password/OrPassword.stories.ts +0 -367
- package/src/components/or-progress/OrProgress.stories.ts +0 -162
- package/src/components/or-radio/OrRadio.stories.ts +0 -143
- package/src/components/or-search/OrSearch.stories.ts +0 -402
- package/src/components/or-select/OrSelect.stories.ts +0 -330
- package/src/components/or-select/partials/OrSelectContent.stories.ts +0 -191
- package/src/components/or-select/partials/OrSelectInput.stories.ts +0 -115
- package/src/components/or-select/stories.helpers.ts +0 -40
- package/src/components/or-sidebar/OrSidebar.stories.ts +0 -242
- package/src/components/or-skeleton/OrSkeleton.stories.ts +0 -120
- package/src/components/or-skeleton/or-skeleton-circle/OrSkeletonCircle.stories.ts +0 -35
- package/src/components/or-skeleton/or-skeleton-rect/OrSkeletonRect.stories.ts +0 -53
- package/src/components/or-skeleton/or-skeleton-text/OrSkeletonText.stories.ts +0 -52
- package/src/components/or-slider/OrSlider.stories.ts +0 -49
- package/src/components/or-stepper/OrStepper.stories.ts +0 -50
- package/src/components/or-switch/OrSwitch.stories.ts +0 -194
- package/src/components/or-tabs/OrTabs.stories.ts +0 -166
- package/src/components/or-tag/OrTag.stories.ts +0 -87
- package/src/components/or-teleport/OrTeleport.stories.ts +0 -54
- package/src/components/or-textarea/OrTextarea.stories.ts +0 -367
- package/src/components/or-textbox/OrTextbox.stories.ts +0 -596
- package/src/components/or-toast/OrToast.stories.ts +0 -59
- package/src/components/or-toast/or-toast-container/OrToastContainer.stories.mdx +0 -101
- package/src/components/or-toast/or-toast-container/OrToastContainer.stories.ts +0 -96
- package/src/components/or-tooltip/OrTooltip.stories.ts +0 -205
- package/src/hooks/useResponsive/useResponsive.stories.mdx +0 -26
- /package/dist/bundled/v2/{OrDateTimePickerPopoverHeader-f3d67e5d.js → OrDateTimePickerPopoverHeader-a4f77733.js} +0 -0
|
@@ -1,330 +0,0 @@
|
|
|
1
|
-
import Faker from 'faker';
|
|
2
|
-
import { Story } from '@storybook/vue';
|
|
3
|
-
import { action } from '@storybook/addon-actions';
|
|
4
|
-
|
|
5
|
-
import OrSelect from './OrSelect.vue';
|
|
6
|
-
import {
|
|
7
|
-
getTestOption,
|
|
8
|
-
getLongTestOption,
|
|
9
|
-
searchInOptions,
|
|
10
|
-
getSlotLabel,
|
|
11
|
-
getSlotOptionStyle,
|
|
12
|
-
} from './stories.helpers';
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
title: 'Components/OrSelect/OrSelect',
|
|
16
|
-
component: OrSelect,
|
|
17
|
-
argTypes: {
|
|
18
|
-
label: { type: 'string' },
|
|
19
|
-
error: { type: 'string' },
|
|
20
|
-
placeholder: { type: 'string' },
|
|
21
|
-
noResultsTitle: { type: 'string' },
|
|
22
|
-
noResultsStartText: { type: 'string' },
|
|
23
|
-
noResultsEndText: { type: 'string' },
|
|
24
|
-
updateSearchText: { type: 'string' },
|
|
25
|
-
ignoreClickOutside: { type: 'boolean' },
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const Template: Story = (args, { argTypes }) => ({
|
|
30
|
-
props: Object.keys(argTypes),
|
|
31
|
-
components: { OrSelect },
|
|
32
|
-
template: `
|
|
33
|
-
<or-select
|
|
34
|
-
v-bind="$props"
|
|
35
|
-
v-model="modelValue"
|
|
36
|
-
@search-change="onSearchChange"
|
|
37
|
-
@update:modelValue="onUpdateValue"
|
|
38
|
-
@open="onOpen"
|
|
39
|
-
@close="onClose"
|
|
40
|
-
/>
|
|
41
|
-
`,
|
|
42
|
-
data() {
|
|
43
|
-
return {
|
|
44
|
-
modelValue: [],
|
|
45
|
-
};
|
|
46
|
-
},
|
|
47
|
-
methods: {
|
|
48
|
-
onUpdateValue: action('update:modelValue'),
|
|
49
|
-
onSearchChange: action('search-change'),
|
|
50
|
-
onOpen: action('open'),
|
|
51
|
-
onClose: action('close'),
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
const BASIC_OPTIONS = Array.from(Array(10).keys()).map(getTestOption);
|
|
56
|
-
|
|
57
|
-
export const Default = Template.bind({});
|
|
58
|
-
Default.args = {
|
|
59
|
-
modelValue: [],
|
|
60
|
-
options: Array.from(Array(10).keys()).map(getLongTestOption),
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export const Disabled = Template.bind({});
|
|
64
|
-
Disabled.args = {
|
|
65
|
-
isDisabled: true,
|
|
66
|
-
modelValue: BASIC_OPTIONS[0].value,
|
|
67
|
-
options: BASIC_OPTIONS,
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const IgnoreClickOutside = Template.bind({});
|
|
71
|
-
IgnoreClickOutside.args = {
|
|
72
|
-
ignoreClickOutside: true,
|
|
73
|
-
modelValue: BASIC_OPTIONS[0].value,
|
|
74
|
-
options: BASIC_OPTIONS,
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
export const MultipleValuesDisabled = Template.bind({});
|
|
78
|
-
MultipleValuesDisabled.args = {
|
|
79
|
-
isMultiSelect: true,
|
|
80
|
-
isDisabled: true,
|
|
81
|
-
modelValue: BASIC_OPTIONS.slice(0, 5).map((option) => option.value),
|
|
82
|
-
options: BASIC_OPTIONS,
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
export const WithLabelAndError = Template.bind({});
|
|
86
|
-
WithLabelAndError.args = {
|
|
87
|
-
modelValue: [],
|
|
88
|
-
options: Array.from(Array(10).keys()).map(getLongTestOption),
|
|
89
|
-
placeholder: Faker.commerce.productName(),
|
|
90
|
-
label: Faker.commerce.productName(),
|
|
91
|
-
error: Faker.commerce.productName(),
|
|
92
|
-
isInvalid: true,
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export const SimpleValueWithSearch = Template.bind({});
|
|
96
|
-
SimpleValueWithSearch.args = {
|
|
97
|
-
modelValue: BASIC_OPTIONS[0].value,
|
|
98
|
-
options: BASIC_OPTIONS,
|
|
99
|
-
useSearch: true,
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
export const LotsOfValuesWithSearch = Template.bind({});
|
|
103
|
-
LotsOfValuesWithSearch.args = {
|
|
104
|
-
modelValue: BASIC_OPTIONS.slice(0, 5).map((option) => option.value),
|
|
105
|
-
options: BASIC_OPTIONS,
|
|
106
|
-
useSearch: true,
|
|
107
|
-
isMultiSelect: true,
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
const EmptyOptionsWithSlotTemplate: Story = (args, { argTypes }) => ({
|
|
112
|
-
props: Object.keys(argTypes),
|
|
113
|
-
components: { OrSelect },
|
|
114
|
-
template: `
|
|
115
|
-
<or-select v-bind="$props">
|
|
116
|
-
<template v-slot:empty-options="{ search }">
|
|
117
|
-
<div style="color: orangered; padding: 1rem; text-align: center;">
|
|
118
|
-
${Faker.commerce.productName()} {{ search }}
|
|
119
|
-
</div>
|
|
120
|
-
</template>
|
|
121
|
-
</or-select>
|
|
122
|
-
`,
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
export const EmptyOptionsWithSlot = EmptyOptionsWithSlotTemplate.bind({});
|
|
126
|
-
EmptyOptionsWithSlot.args = {
|
|
127
|
-
options: [],
|
|
128
|
-
searchOptions: [],
|
|
129
|
-
useSearch: true,
|
|
130
|
-
label: Faker.commerce.productName(),
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
const DemoSimpleSearchTemplate: Story = () => ({
|
|
134
|
-
components: { OrSelect },
|
|
135
|
-
template: `
|
|
136
|
-
<or-select
|
|
137
|
-
v-model="value"
|
|
138
|
-
:options="options"
|
|
139
|
-
:search-options="searchResult"
|
|
140
|
-
:label="label"
|
|
141
|
-
:use-search="true"
|
|
142
|
-
@search-change="handleSearchChange"
|
|
143
|
-
/>
|
|
144
|
-
`,
|
|
145
|
-
data() {
|
|
146
|
-
return {
|
|
147
|
-
value: '',
|
|
148
|
-
options: Array.from(Array(10).keys()).map(getTestOption),
|
|
149
|
-
label: Faker.commerce.productName(),
|
|
150
|
-
searchResult: null,
|
|
151
|
-
};
|
|
152
|
-
},
|
|
153
|
-
methods: {
|
|
154
|
-
handleSearchChange(this: any, search: string): void {
|
|
155
|
-
search
|
|
156
|
-
? (this.searchResult = searchInOptions(search, this.options))
|
|
157
|
-
: (this.searchResult = null);
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
});
|
|
161
|
-
|
|
162
|
-
export const DemoSimpleSearch = DemoSimpleSearchTemplate.bind({});
|
|
163
|
-
|
|
164
|
-
const DemoSimpleWithSlotsTemplate: Story = () => ({
|
|
165
|
-
components: { OrSelect },
|
|
166
|
-
template: `
|
|
167
|
-
<or-select
|
|
168
|
-
v-model="value"
|
|
169
|
-
:options="options"
|
|
170
|
-
:label="label"
|
|
171
|
-
>
|
|
172
|
-
<template v-slot:input-value="{ value, options }">
|
|
173
|
-
<div style="display: flex; align-items: center; color: orangered;">
|
|
174
|
-
{{ getSlotLabel(value, options) }}
|
|
175
|
-
</div>
|
|
176
|
-
</template>
|
|
177
|
-
|
|
178
|
-
<template v-slot:content-option="{ option, isActive, onSelect }">
|
|
179
|
-
<div
|
|
180
|
-
:style="getSlotOptionStyle(isActive)"
|
|
181
|
-
@click="onSelect"
|
|
182
|
-
>
|
|
183
|
-
{{ option.label }}
|
|
184
|
-
</div>
|
|
185
|
-
</template>
|
|
186
|
-
</or-select>
|
|
187
|
-
`,
|
|
188
|
-
data() {
|
|
189
|
-
return {
|
|
190
|
-
value: '',
|
|
191
|
-
options: Array.from(Array(10).keys()).map(getTestOption),
|
|
192
|
-
label: Faker.commerce.productName(),
|
|
193
|
-
};
|
|
194
|
-
},
|
|
195
|
-
methods: {
|
|
196
|
-
getSlotLabel,
|
|
197
|
-
getSlotOptionStyle,
|
|
198
|
-
},
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
export const DemoSimpleWithSlots = DemoSimpleWithSlotsTemplate.bind({});
|
|
202
|
-
|
|
203
|
-
const DemoSimpleSearchFunctionTemplate: Story = () => ({
|
|
204
|
-
components: { OrSelect },
|
|
205
|
-
template: `
|
|
206
|
-
<or-select
|
|
207
|
-
v-model="value"
|
|
208
|
-
:options="options"
|
|
209
|
-
:label="label"
|
|
210
|
-
:use-search="true"
|
|
211
|
-
:search-function="searchInOptions"
|
|
212
|
-
/>
|
|
213
|
-
`,
|
|
214
|
-
data() {
|
|
215
|
-
return {
|
|
216
|
-
value: '',
|
|
217
|
-
options: Array.from(Array(10).keys()).map(getTestOption),
|
|
218
|
-
label: Faker.commerce.productName(),
|
|
219
|
-
};
|
|
220
|
-
},
|
|
221
|
-
methods: {
|
|
222
|
-
searchInOptions(this: any, args: { search: string; }) {
|
|
223
|
-
return searchInOptions(args.search, this.options);
|
|
224
|
-
},
|
|
225
|
-
},
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
export const DemoSimpleSearchFunction = DemoSimpleSearchFunctionTemplate.bind({});
|
|
229
|
-
|
|
230
|
-
const DemoMultiTemplate: Story = () => ({
|
|
231
|
-
components: { OrSelect },
|
|
232
|
-
template: `
|
|
233
|
-
<or-select
|
|
234
|
-
v-model="value"
|
|
235
|
-
:options="options"
|
|
236
|
-
:label="label"
|
|
237
|
-
:is-multi-select="true"
|
|
238
|
-
:use-search="true"
|
|
239
|
-
:search-function="searchInOptions"
|
|
240
|
-
/>
|
|
241
|
-
`,
|
|
242
|
-
data() {
|
|
243
|
-
return {
|
|
244
|
-
value: [],
|
|
245
|
-
options: Array.from(Array(10).keys()).map(getTestOption),
|
|
246
|
-
label: Faker.commerce.productName(),
|
|
247
|
-
};
|
|
248
|
-
},
|
|
249
|
-
methods: {
|
|
250
|
-
searchInOptions(this: any, args: { search: string; }) {
|
|
251
|
-
return searchInOptions(args.search, this.options);
|
|
252
|
-
},
|
|
253
|
-
},
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
export const DemoMultiSelect = DemoMultiTemplate.bind({});
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* User can completely override content of options,
|
|
260
|
-
* for example, in order to add virtual scroll.
|
|
261
|
-
* V-Model is going to be auto managed by "onSelectOption" handler.
|
|
262
|
-
*/
|
|
263
|
-
const DemoTemplateContentOptionsSlot: Story = () => ({
|
|
264
|
-
components: { OrSelect },
|
|
265
|
-
template: `
|
|
266
|
-
<or-select
|
|
267
|
-
v-model="value"
|
|
268
|
-
label="${Faker.commerce.productName()}"
|
|
269
|
-
:options="[option]"
|
|
270
|
-
:use-search="true"
|
|
271
|
-
@search-change="onSearchChange"
|
|
272
|
-
>
|
|
273
|
-
<template v-slot:content-options="{ onSelectOption }">
|
|
274
|
-
<div
|
|
275
|
-
style="color: dodgerblue; padding: 1rem; text-align: center; cursor: pointer"
|
|
276
|
-
@click="onSelectOption(option)"
|
|
277
|
-
>
|
|
278
|
-
{{ option.label }}
|
|
279
|
-
</div>
|
|
280
|
-
</template>
|
|
281
|
-
</or-select>
|
|
282
|
-
`,
|
|
283
|
-
data() {
|
|
284
|
-
return {
|
|
285
|
-
value: '',
|
|
286
|
-
option: {
|
|
287
|
-
value: Faker.datatype.uuid(),
|
|
288
|
-
label: Faker.commerce.productName(),
|
|
289
|
-
},
|
|
290
|
-
};
|
|
291
|
-
},
|
|
292
|
-
methods: {
|
|
293
|
-
onSearchChange: action('search-change'),
|
|
294
|
-
},
|
|
295
|
-
});
|
|
296
|
-
|
|
297
|
-
export const DemoContentOptionsSlot = DemoTemplateContentOptionsSlot.bind({});
|
|
298
|
-
DemoContentOptionsSlot.args = {
|
|
299
|
-
label: Faker.commerce.productName(),
|
|
300
|
-
};
|
|
301
|
-
|
|
302
|
-
const DemoValueNumberTemplate: Story = () => ({
|
|
303
|
-
components: { OrSelect },
|
|
304
|
-
template: `
|
|
305
|
-
<or-select
|
|
306
|
-
v-model="value"
|
|
307
|
-
:options="options"
|
|
308
|
-
:label="label"
|
|
309
|
-
:use-search="true"
|
|
310
|
-
:search-function="searchInOptions"
|
|
311
|
-
/>
|
|
312
|
-
`,
|
|
313
|
-
data() {
|
|
314
|
-
return {
|
|
315
|
-
value: undefined,
|
|
316
|
-
options: Array.from(Array(10).keys()).map((e, i) => ({
|
|
317
|
-
value: i,
|
|
318
|
-
label: Faker.commerce.productName(),
|
|
319
|
-
})),
|
|
320
|
-
label: Faker.commerce.productName(),
|
|
321
|
-
};
|
|
322
|
-
},
|
|
323
|
-
methods: {
|
|
324
|
-
searchInOptions(this: any, args: { search: string; }) {
|
|
325
|
-
return searchInOptions(args.search, this.options);
|
|
326
|
-
},
|
|
327
|
-
},
|
|
328
|
-
});
|
|
329
|
-
|
|
330
|
-
export const DemoValueNumberSelect = DemoValueNumberTemplate.bind({});
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import Faker from 'faker';
|
|
2
|
-
import { Story } from '@storybook/vue';
|
|
3
|
-
import { action } from '@storybook/addon-actions';
|
|
4
|
-
|
|
5
|
-
import OrSelectContent from './OrSelectContent.vue';
|
|
6
|
-
import {
|
|
7
|
-
getTestOption,
|
|
8
|
-
getLongTestOption,
|
|
9
|
-
getSlotOptionStyle,
|
|
10
|
-
} from '../stories.helpers';
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
title: 'Components/OrSelect/OrSelectContent',
|
|
14
|
-
component: OrSelectContent,
|
|
15
|
-
argTypes: {
|
|
16
|
-
noResultsTitle: { type: 'string' },
|
|
17
|
-
noResultsStartText: { type: 'string' },
|
|
18
|
-
noResultsEndText: { type: 'string' },
|
|
19
|
-
updateSearchText: { type: 'string' },
|
|
20
|
-
},
|
|
21
|
-
parameters: {
|
|
22
|
-
backgrounds: { default: 'onereach-light' },
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const Template: Story = (args, { argTypes }) => ({
|
|
27
|
-
props: Object.keys(argTypes),
|
|
28
|
-
components: { OrSelectContent },
|
|
29
|
-
template: `
|
|
30
|
-
<or-select-content
|
|
31
|
-
v-bind="$props"
|
|
32
|
-
@search-change="onSearchChange"
|
|
33
|
-
@select-option="onSelectOption"
|
|
34
|
-
/>
|
|
35
|
-
`,
|
|
36
|
-
methods: {
|
|
37
|
-
onSearchChange: action('search-change'),
|
|
38
|
-
onSelectOption: action('select-option'),
|
|
39
|
-
},
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const BASIC_OPTIONS = Array.from(Array(10).keys()).map(getTestOption);
|
|
43
|
-
const LARGE_OPTIONS = Array.from(Array(10).keys()).map(getLongTestOption);
|
|
44
|
-
|
|
45
|
-
export const Default = Template.bind({});
|
|
46
|
-
Default.args = {
|
|
47
|
-
useSearch: true,
|
|
48
|
-
value: BASIC_OPTIONS[0].value,
|
|
49
|
-
options: BASIC_OPTIONS,
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const DropUp = Template.bind({});
|
|
53
|
-
DropUp.args = {
|
|
54
|
-
...Default.args,
|
|
55
|
-
isTop: true,
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export const MultiSelect = Template.bind({});
|
|
59
|
-
MultiSelect.args = {
|
|
60
|
-
useSearch: true,
|
|
61
|
-
isMultiSelect: true,
|
|
62
|
-
value: [BASIC_OPTIONS[0].value],
|
|
63
|
-
options: BASIC_OPTIONS,
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
export const Loading = Template.bind({});
|
|
67
|
-
Loading.args = {
|
|
68
|
-
isLoading: true,
|
|
69
|
-
useSearch: true,
|
|
70
|
-
options: BASIC_OPTIONS,
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export const VeryLongText = Template.bind({});
|
|
74
|
-
VeryLongText.args = {
|
|
75
|
-
useSearch: true,
|
|
76
|
-
value: LARGE_OPTIONS[0].value,
|
|
77
|
-
options: LARGE_OPTIONS,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
export const ShortOptionsList = Template.bind({});
|
|
81
|
-
ShortOptionsList.args = {
|
|
82
|
-
useSearch: true,
|
|
83
|
-
value: LARGE_OPTIONS[0].value,
|
|
84
|
-
options: LARGE_OPTIONS.slice(0, 3),
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export const EmptyOptionsList = Template.bind({});
|
|
88
|
-
EmptyOptionsList.args = {
|
|
89
|
-
useSearch: true,
|
|
90
|
-
options: [],
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export const EmptyOptionsListWithCustomText = Template.bind({});
|
|
94
|
-
EmptyOptionsListWithCustomText.args = {
|
|
95
|
-
...EmptyOptionsList.args,
|
|
96
|
-
noResultsTitle: 'Not found',
|
|
97
|
-
noResultsStartText: 'Option "',
|
|
98
|
-
noResultsEndText: '" is not found.',
|
|
99
|
-
updateSearchText: 'Try something else.',
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
const TemplateWithSlot: Story = (args, { argTypes }) => ({
|
|
103
|
-
props: Object.keys(argTypes),
|
|
104
|
-
components: { OrSelectContent },
|
|
105
|
-
template: `
|
|
106
|
-
<or-select-content
|
|
107
|
-
v-bind="$props"
|
|
108
|
-
@search-change="onSearchChange"
|
|
109
|
-
@select-option="onSelectOption"
|
|
110
|
-
>
|
|
111
|
-
<template v-slot:content-option="{ option, isActive, onSelect }">
|
|
112
|
-
<div
|
|
113
|
-
:style="getSlotOptionStyle(isActive)"
|
|
114
|
-
@click="onSelect"
|
|
115
|
-
>
|
|
116
|
-
{{ option.label }}
|
|
117
|
-
</div>
|
|
118
|
-
</template>
|
|
119
|
-
</or-select-content>
|
|
120
|
-
`,
|
|
121
|
-
methods: {
|
|
122
|
-
onSearchChange: action('search-change'),
|
|
123
|
-
onSelectOption: action('select-option'),
|
|
124
|
-
getSlotOptionStyle,
|
|
125
|
-
},
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
export const DefaultWithSlot = TemplateWithSlot.bind({});
|
|
129
|
-
DefaultWithSlot.args = {
|
|
130
|
-
useSearch: true,
|
|
131
|
-
value: BASIC_OPTIONS[0].value,
|
|
132
|
-
options: BASIC_OPTIONS,
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
const TemplateWithEmptyOptionsSlot: Story = (args, { argTypes }) => ({
|
|
136
|
-
props: Object.keys(argTypes),
|
|
137
|
-
components: { OrSelectContent },
|
|
138
|
-
template: `
|
|
139
|
-
<or-select-content v-bind="$props">
|
|
140
|
-
<template v-slot:empty-options="{ search }">
|
|
141
|
-
<div style="color: orangered; padding: 1rem; text-align: center;">
|
|
142
|
-
${Faker.commerce.productName()}
|
|
143
|
-
</div>
|
|
144
|
-
</template>
|
|
145
|
-
</or-select-content>
|
|
146
|
-
`,
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
export const EmptyOptionsSlot = TemplateWithEmptyOptionsSlot.bind({});
|
|
150
|
-
EmptyOptionsSlot.args = {
|
|
151
|
-
useSearch: true,
|
|
152
|
-
options: [],
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/* User can completely override main content for options */
|
|
156
|
-
const TemplateContentOptionsSlot: Story = (args, { argTypes }) => ({
|
|
157
|
-
props: Object.keys(argTypes),
|
|
158
|
-
components: { OrSelectContent },
|
|
159
|
-
template: `
|
|
160
|
-
<or-select-content
|
|
161
|
-
v-bind="$props"
|
|
162
|
-
:options="[option]"
|
|
163
|
-
@select-option="onOptionClick"
|
|
164
|
-
>
|
|
165
|
-
<template v-slot:content-options="{ onSelectOption }">
|
|
166
|
-
<div
|
|
167
|
-
style="color: dodgerblue; padding: 1rem; text-align: center; cursor: pointer"
|
|
168
|
-
@click="onSelectOption(option)"
|
|
169
|
-
>
|
|
170
|
-
{{ option.label }}
|
|
171
|
-
</div>
|
|
172
|
-
</template>
|
|
173
|
-
</or-select-content>
|
|
174
|
-
`,
|
|
175
|
-
data() {
|
|
176
|
-
return {
|
|
177
|
-
option: {
|
|
178
|
-
value: Faker.datatype.uuid(),
|
|
179
|
-
label: Faker.commerce.productName(),
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
},
|
|
183
|
-
methods: {
|
|
184
|
-
onOptionClick: action('select-option'),
|
|
185
|
-
},
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
export const ContentOptionsSlot = TemplateContentOptionsSlot.bind({});
|
|
189
|
-
ContentOptionsSlot.args = {
|
|
190
|
-
useSearch: true,
|
|
191
|
-
};
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import Faker from 'faker';
|
|
2
|
-
import { Story } from '@storybook/vue';
|
|
3
|
-
import { action } from '@storybook/addon-actions';
|
|
4
|
-
|
|
5
|
-
import OrSelectInput from './OrSelectInput.vue';
|
|
6
|
-
import {
|
|
7
|
-
getTestOption,
|
|
8
|
-
getLongTestOption,
|
|
9
|
-
getSlotLabel,
|
|
10
|
-
} from '../stories.helpers';
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
title: 'Components/OrSelect/OrSelectInput',
|
|
14
|
-
component: OrSelectInput,
|
|
15
|
-
argTypes: {
|
|
16
|
-
placeholder: { type: 'string' },
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const Template: Story = (args, { argTypes }) => ({
|
|
21
|
-
props: Object.keys(argTypes),
|
|
22
|
-
components: { OrSelectInput },
|
|
23
|
-
template: `
|
|
24
|
-
<or-select-input
|
|
25
|
-
v-bind="$props"
|
|
26
|
-
@toggle-content="onToggleContent"
|
|
27
|
-
@delete-value="onDeleteValue"
|
|
28
|
-
/>
|
|
29
|
-
`,
|
|
30
|
-
methods: {
|
|
31
|
-
onToggleContent: action('toggle-content'),
|
|
32
|
-
onDeleteValue: action('delete-value'),
|
|
33
|
-
},
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
const BASIC_OPTIONS = Array.from(Array(10).keys()).map(getTestOption);
|
|
37
|
-
const LARGE_OPTIONS = Array.from(Array(10).keys()).map(getLongTestOption);
|
|
38
|
-
|
|
39
|
-
export const Default = Template.bind({});
|
|
40
|
-
Default.args = {
|
|
41
|
-
value: [],
|
|
42
|
-
options: [],
|
|
43
|
-
placeholder: Faker.commerce.productName(),
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export const EmptyOptions = Template.bind({});
|
|
47
|
-
EmptyOptions.args = {
|
|
48
|
-
value: BASIC_OPTIONS[0].value,
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export const SimpleValue = Template.bind({});
|
|
52
|
-
SimpleValue.args = {
|
|
53
|
-
value: BASIC_OPTIONS[0].value,
|
|
54
|
-
options: BASIC_OPTIONS,
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export const SimpleValueOpen = Template.bind({});
|
|
58
|
-
SimpleValueOpen.args = {
|
|
59
|
-
isOpen: true,
|
|
60
|
-
value: BASIC_OPTIONS[0].value,
|
|
61
|
-
options: BASIC_OPTIONS,
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export const DropUpOpen = Template.bind({});
|
|
65
|
-
DropUpOpen.args = {
|
|
66
|
-
...SimpleValueOpen.args,
|
|
67
|
-
isTop: true,
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
export const VeryLongSingleValue = Template.bind({});
|
|
71
|
-
VeryLongSingleValue.args = {
|
|
72
|
-
value: LARGE_OPTIONS[0].value,
|
|
73
|
-
options: LARGE_OPTIONS,
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export const MultiLongValue = Template.bind({});
|
|
77
|
-
MultiLongValue.args = {
|
|
78
|
-
isMultiSelect: true,
|
|
79
|
-
value: LARGE_OPTIONS.slice(0, 3).map((option) => option.value),
|
|
80
|
-
options: LARGE_OPTIONS,
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export const LotsOfValues = Template.bind({});
|
|
84
|
-
LotsOfValues.args = {
|
|
85
|
-
isMultiSelect: true,
|
|
86
|
-
value: BASIC_OPTIONS.map((option) => option.value),
|
|
87
|
-
options: BASIC_OPTIONS,
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const TemplateWithSlot: Story = (args, { argTypes }) => ({
|
|
91
|
-
props: Object.keys(argTypes),
|
|
92
|
-
components: { OrSelectInput },
|
|
93
|
-
template: `
|
|
94
|
-
<or-select-input
|
|
95
|
-
v-bind="$props"
|
|
96
|
-
@toggle-content="onToggleContent"
|
|
97
|
-
>
|
|
98
|
-
<template v-slot:input-value="{ value, options }">
|
|
99
|
-
<div style="display: flex; align-items: center; color: orangered;">
|
|
100
|
-
{{ getSlotLabel(value, options) }}
|
|
101
|
-
</div>
|
|
102
|
-
</template>
|
|
103
|
-
</or-select-input>
|
|
104
|
-
`,
|
|
105
|
-
methods: {
|
|
106
|
-
onToggleContent: action('toggle-content'),
|
|
107
|
-
getSlotLabel,
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
export const InputWithSlot = TemplateWithSlot.bind({});
|
|
112
|
-
InputWithSlot.args = {
|
|
113
|
-
value: BASIC_OPTIONS[0].value,
|
|
114
|
-
options: BASIC_OPTIONS,
|
|
115
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import Faker from 'faker';
|
|
2
|
-
import { Option } from './types';
|
|
3
|
-
|
|
4
|
-
export function getTestOption(): Option {
|
|
5
|
-
return {
|
|
6
|
-
value: Faker.datatype.uuid(),
|
|
7
|
-
label: Faker.commerce.productName(),
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function getLongTestOption(): Option {
|
|
12
|
-
return {
|
|
13
|
-
value: Faker.datatype.uuid(),
|
|
14
|
-
label: Faker.lorem.paragraph(),
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function searchInOptions(search: string, options: Option[]): Option[] {
|
|
19
|
-
return options.filter((option) => {
|
|
20
|
-
const term = search.toLowerCase();
|
|
21
|
-
const content = option.label ?? option.value;
|
|
22
|
-
return content.toLowerCase().includes(term);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function getSlotLabel(value: string, options: Option[]): string {
|
|
27
|
-
/* eslint-disable-next-line */
|
|
28
|
-
return options.find((i) => i.value === value)!.label!;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function getSlotOptionStyle(isActive: boolean): Record<string, string> {
|
|
32
|
-
return {
|
|
33
|
-
display: 'flex',
|
|
34
|
-
'align-items': 'center',
|
|
35
|
-
height: '2.125rem',
|
|
36
|
-
padding: '0 0.625rem',
|
|
37
|
-
color: isActive ? 'orangered' : 'dodgerblue',
|
|
38
|
-
cursor: 'pointer',
|
|
39
|
-
};
|
|
40
|
-
}
|