Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/ab11519 autocomplete #152

Merged
merged 7 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"dependencies": {
"@lit-labs/virtualizer": "^2.0.0",
"@neovici/cosmoz-dropdown": "^4.0.0",
"@neovici/cosmoz-input": "^4.0.0",
"@neovici/cosmoz-input": "^4.3.0",
"@neovici/cosmoz-utils": "^6.0.0",
"@pionjs/pion": "^2.0.0",
"lit-html": "^2.0.0 || ^3.0.0"
Expand Down
1 change: 1 addition & 0 deletions src/autocomplete/chip.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default css`
padding: 0 4px 0 8px;
gap: 4px;
cursor: pointer;
cristinecula marked this conversation as resolved.
Show resolved Hide resolved
transform: translateY(var(--cosmoz-autocomplete-chip-translate-y, 0));
}
.content {
color: var(--cosmoz-autocomplete-chip-color, #424242);
Expand Down
34 changes: 26 additions & 8 deletions stories/cosmoz-autocomplete.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,34 @@ export const wrap = () =>
style="max-width: 170px"
></cosmoz-autocomplete>`;

export const select = () => html`
${css}
export const select = () => html` ${css}
<cosmoz-autocomplete
.label=${'Choose color'}
.source=${colors}
.limit=${1}
.textProperty=${'text'}
.value=${colors[2]}
show-single
preserve-order
.min=${1}
></cosmoz-autocomplete>
`;
cristinecula marked this conversation as resolved.
Show resolved Hide resolved
.value=${[colors[0], colors[1], colors[2]]}
wrap
style="max-width: 170px"
></cosmoz-autocomplete>`;

export const contour = () => html`<style>
cristinecula marked this conversation as resolved.
Show resolved Hide resolved
cosmoz-autocomplete {
--cosmoz-input-color: #aeacac;
--cosmoz-input-border-radius: 4px;
--cosmoz-input-padding: 12px;
--cosmoz-input-line-display: none;
--cosmoz-input-contour-size: 1px;
--cosmoz-input-label-translate-y: 10px;
--cosmoz-autocomplete-chip-translate-y: 8px;
--cosmoz-autocomplete-chip-border-radius: 4px;
}
</style>
<cosmoz-autocomplete
.label=${'Choose color'}
.source=${colors}
.textProperty=${'text'}
.value=${[colors[0], colors[1], colors[2]]}
wrap
style="max-width: 255px;"
></cosmoz-autocomplete> `;
Loading