-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui5-ai-prompt-input): initial (experimental) implementation (#9078)
- Loading branch information
Showing
9 changed files
with
405 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<div class="ai-prompt-input-wrapper"> | ||
{{#if label}} | ||
<ui5-label for="input">{{label}}</ui5-label> | ||
{{/if}} | ||
|
||
<div class="ai-prompt-input-form-wrapper"> | ||
<div class="ai-prompt-inner-input-wrapper"> | ||
<ui5-input | ||
id="input" | ||
.value="{{value}}" | ||
placeholder="{{placeholder}}" | ||
value-state="{{valueState}}" | ||
?show-clear-icon={{showClearIcon}} | ||
?disabled="{{disabled}}" | ||
?readonly="{{readonly}}" | ||
@keydown="{{_onkeydown}}" | ||
@ui5-input="{{_onInnerInput}}" | ||
@ui5-change="{{_onInnerChange}}" | ||
> | ||
{{#if valueStateMessage.length}} | ||
<slot name="valueStateMessage" slot="valueStateMessage"></slot> | ||
{{/if}} | ||
</ui5-input> | ||
|
||
{{#if showExceededText}} | ||
<ui5-label class="ai-prompt-input-counter">{{_exceededText}}</ui5-label> | ||
{{/if}} | ||
</div> | ||
<ui5-button ?disabled={{_submitButtonDisabled}} class="ai-prompt-input-button" design="Emphasized" icon="paper-plane" @click="{{_onButtonClick}}"></ui5-button> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,2 +1,8 @@ | ||
#This is the resource bundle for the UI5 Web Components | ||
#__ldi.translation.uuid=96bea51a-d5e3-46f0-b1d1-514d97be02ec | ||
|
||
#XTXT: Text for characters left | ||
PROMPT_INPUT_CHARACTERS_LEFT={0} characters remaining | ||
|
||
#XTXT: Text for characters over | ||
PROMPT_INPUT_CHARACTERS_EXCEEDED={0} characters over limit |
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,30 @@ | ||
.ai-prompt-input-button { | ||
margin-left: .5rem; | ||
margin-top: 3px; | ||
} | ||
|
||
.ai-prompt-input-wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
width: 270px; | ||
} | ||
|
||
.ai-prompt-input-form-wrapper { | ||
display: flex; | ||
flex: 1; | ||
} | ||
|
||
.ai-prompt-input-counter { | ||
font-size: .75rem; | ||
align-self: flex-end; | ||
} | ||
|
||
#input { | ||
width: 100%; | ||
} | ||
|
||
.ai-prompt-inner-input-wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
flex: 1; | ||
} |
Oops, something went wrong.