-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix(tokens): brand becomes Brand * refactor(tokens): updates token name * feat(tokens): adds MD and LG paddings * feat(tokens): adds LG tokens * feat(ui-library): select is back * feat(ui-library): renderfunction for icons * fix(ui-library): snapshot --------- Co-authored-by: christian.b.hoffmann <christian.b.hoffmann@accenture.com>
- Loading branch information
1 parent
cc682f2
commit ded4de5
Showing
10 changed files
with
633 additions
and
13 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
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 |
---|---|---|
|
@@ -1746,7 +1746,7 @@ | |
"type": "color" | ||
} | ||
}, | ||
"brand": { | ||
"Brand": { | ||
"Default": { | ||
"Shape": { | ||
"Background": { | ||
|
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,16 @@ | ||
import { css } from 'lit'; | ||
|
||
export const styleCustom = css` | ||
.blr-select { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
position: relative; | ||
} | ||
.blr-select-option { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
} | ||
`; |
108 changes: 108 additions & 0 deletions
108
packages/ui-library/src/components/select/index.stories.ts
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,108 @@ | ||
/* eslint-disable no-console */ | ||
import { html } from 'lit-html'; | ||
import { BlrSelectRenderFunction, BlrSelectType } from './index'; | ||
import { FormSizes } from '../../globals/constants'; | ||
import { IconKeys } from '@boiler/icons'; | ||
import { getIconName } from '../../utils/get-icon-name'; | ||
import './index'; | ||
|
||
export default { | ||
title: 'BlrSelect', | ||
argTypes: { | ||
size: { | ||
options: FormSizes, | ||
control: { type: 'select' }, | ||
}, | ||
trailingIcon: { | ||
options: [...getIconName(IconKeys)], | ||
control: { type: 'select' }, | ||
}, | ||
hintIcon: { | ||
options: [...getIconName(IconKeys)], | ||
control: { type: 'select' }, | ||
}, | ||
options: { | ||
control: 'array', | ||
options: [ | ||
{ value: 'uschi', label: 'Uschi', selected: false, disabled: false }, | ||
{ value: '1', label: 'Option 1', selected: false, disabled: false }, | ||
{ value: '2', label: 'Option 2', selected: true, disabled: false }, | ||
{ value: 'dieter', label: 'Dieter', selected: true, disabled: false }, | ||
], | ||
}, | ||
onChange: { | ||
action: 'onChange', | ||
description: '(@change)="onChange($event)"', | ||
}, | ||
}, | ||
parameters: { | ||
previewTabs: { | ||
canvas: { hidden: true }, | ||
}, | ||
viewMode: 'docs', | ||
}, | ||
}; | ||
|
||
export const BlrSelect = ({ | ||
selectId, | ||
onChange, | ||
name, | ||
options, | ||
disabled, | ||
size, | ||
required, | ||
errorMessage, | ||
hint, | ||
hintIcon, | ||
hasError, | ||
labelAppendix, | ||
showTrailingIcon, | ||
trailingIcon, | ||
hasLabel, | ||
label, | ||
}: BlrSelectType) => | ||
html` | ||
${BlrSelectRenderFunction({ | ||
selectId, | ||
onChange, | ||
name, | ||
options, | ||
disabled, | ||
size, | ||
required, | ||
errorMessage, | ||
hint, | ||
hintIcon, | ||
hasError, | ||
labelAppendix, | ||
showTrailingIcon, | ||
trailingIcon, | ||
hasLabel, | ||
label, | ||
})} | ||
`; | ||
|
||
BlrSelect.storyName = 'BlrSelect'; | ||
|
||
BlrSelect.args = { | ||
name: 'Text Input', | ||
hasLabel: true, | ||
label: 'Label', | ||
labelAppendix: '(Optional)', | ||
showTrailingIcon: true, | ||
size: 'md', | ||
hasError: false, | ||
errorMessage: 'This is error message', | ||
disabled: false, | ||
required: false, | ||
hint: 'Field is used for hint', | ||
hintIcon: 'blrInfo', | ||
selectId: 'Peter', | ||
trailingIcon: 'blr360', | ||
options: [ | ||
{ value: 'uschi', label: 'Uschi', disabled: true }, | ||
{ value: '1', label: 'Option 1' }, | ||
{ value: '2', label: 'Option 2', selected: true }, | ||
{ value: 'dieter', label: 'Dieter' }, | ||
], | ||
}; |
Oops, something went wrong.