-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5df900e
commit 00dd240
Showing
224 changed files
with
2,820 additions
and
1,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+2.75 KB
.yarn/cache/@babel-helper-annotate-as-pure-npm-7.18.6-36e25293d8-88ccd15ced.zip
Binary file not shown.
Binary file added
BIN
+15.5 KB
.yarn/cache/@babel-helper-create-class-features-plugin-npm-7.18.9-3c99e4cac5-020dba79b9.zip
Binary file not shown.
Binary file added
BIN
+2.89 KB
.yarn/cache/@babel-helper-environment-visitor-npm-7.18.9-9f5b3635a1-b25101f616.zip
Binary file not shown.
Binary file added
BIN
+3.85 KB
.yarn/cache/@babel-helper-function-name-npm-7.18.9-89df62ccc8-d04c44e027.zip
Binary file not shown.
Binary file added
BIN
+2.99 KB
.yarn/cache/@babel-helper-hoist-variables-npm-7.18.6-6eb061f405-fd9c35bb43.zip
Binary file not shown.
Binary file added
BIN
+15.9 KB
...n/cache/@babel-helper-member-expression-to-functions-npm-7.18.9-3d2128582a-fcf8184e3b.zip
Binary file not shown.
Binary file added
BIN
+2.89 KB
.yarn/cache/@babel-helper-optimise-call-expression-npm-7.18.6-65705387c4-e518fe8418.zip
Binary file not shown.
Binary file added
BIN
+3.34 KB
.yarn/cache/@babel-helper-plugin-utils-npm-7.18.9-00d0302512-ebae876cd6.zip
Binary file not shown.
Binary file added
BIN
+4.21 KB
.yarn/cache/@babel-helper-replace-supers-npm-7.18.9-90b3bab25c-2de8b29cc4.zip
Binary file not shown.
Binary file added
BIN
+3.17 KB
.yarn/cache/@babel-helper-split-export-declaration-npm-7.18.6-53ebf8ad4c-c6d3dede53.zip
Binary file not shown.
Binary file added
BIN
+4.25 KB
.yarn/cache/@babel-helper-string-parser-npm-7.18.10-cf6fe67f9a-d554a43933.zip
Binary file not shown.
Binary file added
BIN
+9.08 KB
.yarn/cache/@babel-helper-validator-identifier-npm-7.18.6-357e4653ab-e295254d61.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.22 KB
...he/@babel-plugin-proposal-private-property-in-object-npm-7.18.6-755223e615-c8e56a9729.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-7.41 KB
.yarn/cache/@base2-pretty-print-object-npm-1.0.1-e7e95cfd98-1e8a5af578.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-21 KB
.yarn/cache/@emotion-is-prop-valid-npm-0.8.8-261a0f2426-bb7ec6d48c.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-26.9 KB
.yarn/cache/@emotion-serialize-npm-0.11.16-ffd808625b-2949832fab.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-41.7 KB
.yarn/cache/@emotion-styled-base-npm-10.3.0-37d578811d-ac0bb8f39e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-7.62 KB
.yarn/cache/@emotion-weak-memoize-npm-0.2.5-9f2e49e7c8-27d402b0c6.zip
Binary file not shown.
Binary file added
BIN
+26.5 KB
.yarn/cache/@jridgewell-gen-mapping-npm-0.3.2-c64eeb4a4e-1832707a1c.zip
Binary file not shown.
Binary file added
BIN
+8.65 KB
.yarn/cache/@jridgewell-set-array-npm-1.1.2-45b82d7fb6-69a84d5980.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+89.8 KB
.yarn/cache/@storybook-addon-a11y-npm-6.5.10-7062f47eae-8264ea473b.zip
Binary file not shown.
Binary file removed
BIN
-74.9 KB
.yarn/cache/@storybook-addon-actions-npm-6.4.22-a978f9b7cd-ca0f9140fd.zip
Binary file not shown.
Binary file added
BIN
+76.8 KB
.yarn/cache/@storybook-addon-actions-npm-6.5.10-474b9bf118-b864ceb0ec.zip
Binary file not shown.
Binary file removed
BIN
-50.5 KB
.yarn/cache/@storybook-addon-backgrounds-npm-6.4.22-70c164eb3d-e0c3328cf4.zip
Binary file not shown.
Binary file added
BIN
+46.5 KB
.yarn/cache/@storybook-addon-backgrounds-npm-6.5.10-45296f5cee-665ff48ea7.zip
Binary file not shown.
Binary file removed
BIN
-20.4 KB
.yarn/cache/@storybook-addon-controls-npm-6.4.22-80ce966753-6f73962c4d.zip
Binary file not shown.
Binary file added
BIN
+20 KB
.yarn/cache/@storybook-addon-controls-npm-6.5.10-2aeb5a6298-3c8152e4a4.zip
Binary file not shown.
Binary file removed
BIN
-467 KB
.yarn/cache/@storybook-addon-docs-npm-6.4.22-c0fa0c888e-e1086af6b9.zip
Binary file not shown.
Binary file added
BIN
+158 KB
.yarn/cache/@storybook-addon-docs-npm-6.5.10-15698ab8ac-5fecd18ea3.zip
Binary file not shown.
Binary file removed
BIN
-9.72 KB
.yarn/cache/@storybook-addon-essentials-npm-6.4.22-723a77a4b6-7f2889fe58.zip
Binary file not shown.
Binary file added
BIN
+9.16 KB
.yarn/cache/@storybook-addon-essentials-npm-6.5.10-7ac8384e4a-9682869229.zip
Binary file not shown.
Binary file removed
BIN
-35.2 KB
.yarn/cache/@storybook-addon-links-npm-6.4.22-9f81184ddd-893b2fe7c1.zip
Binary file not shown.
Binary file added
BIN
+34 KB
.yarn/cache/@storybook-addon-links-npm-6.5.10-9ad92825f7-5ffecdc7f1.zip
Binary file not shown.
Binary file removed
BIN
-42.8 KB
.yarn/cache/@storybook-addon-measure-npm-6.4.22-c4f72b200f-17eea8b263.zip
Binary file not shown.
Binary file added
BIN
+41.5 KB
.yarn/cache/@storybook-addon-measure-npm-6.5.10-38df42ca3a-7a6be7fc80.zip
Binary file not shown.
Binary file removed
BIN
-26.5 KB
.yarn/cache/@storybook-addon-outline-npm-6.4.22-2741fdcc62-34e8b32b1c.zip
Binary file not shown.
Binary file added
BIN
+26.6 KB
.yarn/cache/@storybook-addon-outline-npm-6.5.10-be72b363b0-8d3e12a612.zip
Binary file not shown.
Binary file removed
BIN
-44.7 KB
.yarn/cache/@storybook-addon-toolbars-npm-6.4.22-0b91e52d6e-ca814cc8c7.zip
Binary file not shown.
Binary file added
BIN
+45.9 KB
.yarn/cache/@storybook-addon-toolbars-npm-6.5.10-136d0416a3-49c44596fd.zip
Binary file not shown.
Binary file removed
BIN
-31.6 KB
.yarn/cache/@storybook-addon-viewport-npm-6.4.22-1bd99f8107-8d54855c76.zip
Binary file not shown.
Binary file added
BIN
+32 KB
.yarn/cache/@storybook-addon-viewport-npm-6.5.10-d590049990-6cbd32053d.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-49.6 KB
.yarn/cache/@storybook-builder-webpack4-npm-6.4.22-aba07e840e-fe6d0f0100.zip
Binary file not shown.
Binary file added
BIN
+49.5 KB
.yarn/cache/@storybook-builder-webpack4-npm-6.5.10-6d9d1bef2a-26921bbc47.zip
Binary file not shown.
Binary file removed
BIN
-48.9 KB
.yarn/cache/@storybook-builder-webpack5-npm-6.4.22-d0c52daf71-9d55ff5765.zip
Binary file not shown.
Binary file added
BIN
+50.9 KB
.yarn/cache/@storybook-builder-webpack5-npm-6.5.10-ece0d6ed20-a2a0d7cbdc.zip
Binary file not shown.
Binary file removed
BIN
-16.7 KB
.yarn/cache/@storybook-channel-postmessage-npm-6.4.22-2d23fdd79c-870258cbc8.zip
Binary file not shown.
Binary file added
BIN
+16.2 KB
.yarn/cache/@storybook-channel-postmessage-npm-6.5.10-e6381fc789-c0bb9cccb8.zip
Binary file not shown.
Binary file removed
BIN
-8.41 KB
.yarn/cache/@storybook-channel-websocket-npm-6.4.22-e3946eae87-c3be4a9289.zip
Binary file not shown.
Binary file added
BIN
+7.85 KB
.yarn/cache/@storybook-channel-websocket-npm-6.5.10-eaaa82811a-e8c6df2ae0.zip
Binary file not shown.
Binary file removed
BIN
-9.26 KB
.yarn/cache/@storybook-channels-npm-6.4.22-d8cac108b6-cffd205590.zip
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-38.3 KB
.yarn/cache/@storybook-client-api-npm-6.4.22-56897dc9ac-606bde50ca.zip
Binary file not shown.
Binary file added
BIN
+39.1 KB
.yarn/cache/@storybook-client-api-npm-6.5.10-ca558428bb-c939abed09.zip
Binary file not shown.
Binary file removed
BIN
-8.52 KB
.yarn/cache/@storybook-client-logger-npm-6.4.22-1b618ac6e7-ed615b4f4e.zip
Binary file not shown.
Binary file added
BIN
+8.58 KB
.yarn/cache/@storybook-client-logger-npm-6.5.10-bb974af121-6aa15e27e1.zip
Binary file not shown.
Binary file removed
BIN
-896 KB
.yarn/cache/@storybook-components-npm-6.4.22-4910759d22-c558f9148a.zip
Binary file not shown.
Binary file added
BIN
+1.59 MB
.yarn/cache/@storybook-components-npm-6.5.10-0d685af473-ee0d520048.zip
Binary file not shown.
Binary file removed
BIN
-39.5 KB
.yarn/cache/@storybook-core-client-npm-6.4.22-8027529106-6b93171f3b.zip
Binary file not shown.
Binary file added
BIN
+39.4 KB
.yarn/cache/@storybook-core-client-npm-6.5.10-22db7b1741-c8bc4b41af.zip
Binary file not shown.
Binary file added
BIN
+141 KB
.yarn/cache/@storybook-core-common-npm-6.5.10-8ece82b0cf-b3b95214a4.zip
Binary file not shown.
Binary file removed
BIN
-8.62 KB
.yarn/cache/@storybook-core-events-npm-6.4.22-d2138ff2bb-d114e0ab9e.zip
Binary file not shown.
Binary file added
BIN
+8.72 KB
.yarn/cache/@storybook-core-events-npm-6.5.10-5ec127438f-89139f3f34.zip
Binary file not shown.
Binary file renamed
BIN
+6.95 KB
...core-npm-6.4.22-af725ed674-ae7728f9b3.zip → ...core-npm-6.5.10-13e0903a9d-ee80fa596c.zip
Binary file not shown.
Binary file removed
BIN
-174 KB
.yarn/cache/@storybook-core-server-npm-6.4.22-a44fba2c4f-38183ededd.zip
Binary file not shown.
Binary file added
BIN
+171 KB
.yarn/cache/@storybook-core-server-npm-6.5.10-8cc862e027-0359f8cf68.zip
Binary file not shown.
Binary file added
BIN
+15.8 KB
.yarn/cache/@storybook-csf-npm-0.0.2--canary.4566f4d.1-687f17115d-afac948e1e.zip
Binary file not shown.
Binary file added
BIN
+43.4 KB
.yarn/cache/@storybook-csf-tools-npm-6.5.10-f45507ce83-9bb4b61822.zip
Binary file not shown.
Binary file added
BIN
+92.5 KB
.yarn/cache/@storybook-docs-tools-npm-6.5.10-0608951085-7fe14992ba.zip
Binary file not shown.
Binary file removed
BIN
-604 KB
.yarn/cache/@storybook-manager-webpack4-npm-6.4.22-657621fd00-8e20325642.zip
Binary file not shown.
Binary file added
BIN
+902 KB
.yarn/cache/@storybook-manager-webpack4-npm-6.5.10-439b237653-954f93dded.zip
Binary file not shown.
Binary file removed
BIN
-603 KB
.yarn/cache/@storybook-manager-webpack5-npm-6.4.22-cd41e09ad6-532a39a9df.zip
Binary file not shown.
Binary file added
BIN
+901 KB
.yarn/cache/@storybook-manager-webpack5-npm-6.5.10-0e5723072d-0e7542ed57.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.46 KB
.yarn/cache/@storybook-node-logger-npm-6.5.10-714da76459-684eddeadc.zip
Binary file not shown.
Binary file removed
BIN
-13.6 KB
.yarn/cache/@storybook-postinstall-npm-6.4.22-7b64be139a-d406b2fdfc.zip
Binary file not shown.
Binary file added
BIN
+13.7 KB
.yarn/cache/@storybook-postinstall-npm-6.5.10-39e36a3a2d-ee6355953c.zip
Binary file not shown.
Binary file removed
BIN
-85.4 KB
.yarn/cache/@storybook-preview-web-npm-6.4.22-00bcdcbe43-378a908621.zip
Binary file not shown.
Binary file added
BIN
+111 KB
.yarn/cache/@storybook-preview-web-npm-6.5.10-e3f1b0ca7d-ad4ee24410.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-48.4 KB
.yarn/cache/@storybook-source-loader-npm-6.4.22-b33fb53efa-2b64533932.zip
Binary file not shown.
Binary file added
BIN
+48.6 KB
.yarn/cache/@storybook-source-loader-npm-6.5.10-59f3874d68-77d7a0255c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+43.2 KB
.yarn/cache/@storybook-telemetry-npm-6.5.10-bebee7d975-774acc7f5d.zip
Binary file not shown.
Binary file removed
BIN
-53.9 KB
.yarn/cache/@storybook-theming-npm-6.4.22-2db7c3ecdb-bb95f7fa40.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-5.24 KB
.yarn/cache/@types-color-convert-npm-2.0.0-f59f3c146a-027b68665d.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-4.76 KB
.yarn/cache/@types-overlayscrollbars-npm-1.12.1-117aea41b1-4d539db07a.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-9.67 KB
.yarn/cache/@types-react-syntax-highlighter-npm-11.0.5-90d671364b-8f4dce3eb5.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-49.6 KB
.yarn/cache/babel-plugin-emotion-npm-10.2.2-91c217c25d-763f38c67f.zip
Binary file not shown.
Binary file removed
BIN
-12.4 KB
.yarn/cache/babel-plugin-macros-npm-2.8.0-451367d7e7-59b09a21cf.zip
Binary file not shown.
Binary file added
BIN
+5.48 KB
.yarn/cache/babel-plugin-named-exports-order-npm-0.0.2-4bf2bfe8f6-d918390a09.zip
Binary file not shown.
Binary file removed
BIN
-1.67 KB
.yarn/cache/babel-plugin-syntax-jsx-npm-6.18.0-fcf0a98a71-0c7ce5b81d.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-29.9 KB
.yarn/cache/compute-scroll-into-view-npm-1.0.17-708f0ecc3d-b20c05a10c.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+5.4 KB
.yarn/cache/detect-package-manager-npm-2.0.1-e5377363d9-e72b910182.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-13.4 KB
.yarn/cache/hoist-non-react-statics-npm-3.3.2-e7b709e6c1-b153827042.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-64.6 KB
.yarn/cache/react-element-to-jsx-string-npm-14.3.4-47e7176d93-42bcd4423f.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-31.6 KB
.yarn/cache/react-popper-tooltip-npm-3.1.1-c2261b0eab-c820122a4f.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-795 KB
.yarn/cache/react-syntax-highlighter-npm-13.5.3-fe40d3f7c4-fa03880a88.zip
Binary file not shown.
Binary file removed
BIN
-22.3 KB
.yarn/cache/react-textarea-autosize-npm-8.3.3-ef925643e7-da3d019282.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-6.06 KB
.yarn/cache/use-isomorphic-layout-effect-npm-1.1.2-65facd0a4b-a6532f7fc9.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-3.26 KB
.yarn/cache/vue-inbrowser-compiler-demi-npm-4.44.23-3ae7340fcb-0628af4dfc.zip
Binary file not shown.
Binary file added
BIN
+20.6 KB
.yarn/cache/vue-inbrowser-compiler-independent-utils-npm-4.52.0-063011a0dc-744ce56a12.zip
Binary file not shown.
Binary file removed
BIN
-28.4 KB
.yarn/cache/vue-inbrowser-compiler-utils-npm-4.44.23-733a11cb06-6082a38e3b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
yarnPath: .yarn/releases/yarn-3.2.0.cjs | ||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-3.2.0.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
import { sbCompPrefix, storyParametersObject } from '@/global/storybook-utils'; | ||
|
||
import { CvComboBox } from '.'; | ||
import { action } from '@storybook/addon-actions'; | ||
import { ref } from 'vue'; | ||
|
||
const fruits = [ | ||
'Apple', | ||
'Banana', | ||
'Cherry', | ||
'Date', | ||
'Elderberry', | ||
'Fig', | ||
'Grape', | ||
'Kiwi Fruit', | ||
'Lemon', | ||
'Lime', | ||
'Mango', | ||
'Orange', | ||
'Passion Fruit', | ||
'Raisin', | ||
'Satsuma', | ||
'Tangerine', | ||
'Ugli Fruit', | ||
'Watermelon', | ||
].map(item => { | ||
const nameVal = item.replace(/\W/, '_').toLowerCase(); | ||
return { | ||
name: nameVal, | ||
label: item, | ||
value: `val-${nameVal}`, | ||
}; | ||
}); | ||
const initArgs = { | ||
title: 'Combo Box title', | ||
options: fruits, | ||
helperText: 'Combobox helper text', | ||
}; | ||
|
||
export default { | ||
title: `${sbCompPrefix}/CvComboBox`, | ||
component: CvComboBox, | ||
parameters: { | ||
a11y: { | ||
config: { | ||
rules: [ | ||
{ | ||
// The autocomplete rule will not run based on the CSS selector provided | ||
id: 'aria-input-field-name', | ||
selector: '.bx--combo-box', | ||
}, | ||
], | ||
}, | ||
options: {}, | ||
manual: true, | ||
}, | ||
}, | ||
argTypes: { | ||
title: { type: String, description: 'Combo Box title' }, | ||
options: { type: Array, description: 'Combo Box options' }, | ||
}, | ||
}; | ||
|
||
const template = ` | ||
<div style='width: 18.75rem'> | ||
<cv-combo-box aria-label='Choose a fruit' @change='onChange' @onFilter='onFilter' v-bind='args' > | ||
</cv-combo-box> | ||
</div> | ||
`; | ||
const Template = args => { | ||
return { | ||
components: { CvComboBox }, | ||
setup: () => ({ | ||
args, | ||
onChange: action('change'), | ||
onFilter: action('filter'), | ||
}), | ||
template, | ||
}; | ||
}; | ||
|
||
export const Default = Template.bind({}); | ||
Default.args = initArgs; | ||
Default.parameters = storyParametersObject( | ||
Default.parameters, | ||
template, | ||
Default.args | ||
); | ||
|
||
/** | ||
* Slots | ||
*/ | ||
const use_invalidMessageSlot = ref(false); | ||
const use_helperTextSlot = ref(false); | ||
const templateSlots = ` | ||
<div style='width: 18.75rem'> | ||
<cv-combo-box aria-label='Choose a fruit' @change='onChange' @onFilter='onFilter' v-bind='args' > | ||
<template v-if="use_helperTextSlot" #helper-text>Some helpful text</template> | ||
<template v-if="use_invalidMessageSlot" #invalid-message>Invalid message text</template> | ||
</cv-combo-box> | ||
</div> | ||
`; | ||
const TemplateSlots = args => { | ||
return { | ||
components: { CvComboBox }, | ||
setup: () => ({ | ||
args, | ||
use_helperTextSlot: args.use_helperTextSlot, | ||
use_invalidMessageSlot: args.use_invalidMessageSlot, | ||
onChange: action('change'), | ||
onFilter: action('filter'), | ||
}), | ||
template: templateSlots, | ||
}; | ||
}; | ||
export const slots = TemplateSlots.bind({}); | ||
slots.args = { | ||
use_helperTextSlot: use_helperTextSlot.value, | ||
use_invalidMessageSlot: use_invalidMessageSlot.value, | ||
title: 'Combo Box title', | ||
options: fruits, | ||
}; | ||
slots.parameters = storyParametersObject( | ||
slots.parameters, | ||
templateSlots, | ||
slots.args | ||
); | ||
|
||
/** | ||
* v-model story | ||
*/ | ||
const modelValue = ref('val-fig'); | ||
const templateVModel = ` | ||
<div style='width: 50%'> | ||
<div style='width: 18.75rem'> | ||
<cv-combo-box aria-label='Choose a fruit' @change='onChange' @onFilter='onFilter' v-bind='args' v-model="modelValue"> | ||
</cv-combo-box> | ||
</div> | ||
<div style="margin-top:2rem; background-color: #888888; padding:1rem"> | ||
<div style="font-size: 150%;">Sample interaction</div> | ||
<label for="fruits" style='margin: 0.5rem'>V-model:</label> | ||
<select style='margin: 0.5rem' name="fruits" id="fruits" @change="(ev) => {modelValue = ev.currentTarget.value}"> | ||
<option value="val-elderberry">Elderberry</option> | ||
<option value="val-fig">Fig</option> | ||
<option value="val-grape">Grape</option> | ||
<option value="val-apple">Apple</option> | ||
</select> | ||
<div style='margin: 0.5rem'>Value: <span style="font-weight: bold;">{{modelValue}}</span></div> | ||
</div> | ||
</div> | ||
`; | ||
|
||
const TemplateVModel = args => { | ||
return { | ||
components: { CvComboBox }, | ||
setup: () => ({ | ||
args, | ||
modelValue, | ||
onChange: action('change'), | ||
onFilter: action('filter'), | ||
}), | ||
template: templateVModel, | ||
}; | ||
}; | ||
export const vModel = TemplateVModel.bind({}); | ||
vModel.args = initArgs; | ||
vModel.parameters = storyParametersObject( | ||
vModel.parameters, | ||
templateVModel, | ||
vModel.args | ||
); |
Oops, something went wrong.