diff --git a/packages/js-example-app/src/index.js b/packages/js-example-app/src/index.js
index 7a758bd0b..99ab1e38d 100644
--- a/packages/js-example-app/src/index.js
+++ b/packages/js-example-app/src/index.js
@@ -7,6 +7,7 @@ const logsContainer = document.querySelector('#logs');
const blrButton = document.getElementsByTagName('blr-text-button')[0];
const blrCheckbox = document.getElementsByTagName('blr-checkbox')[0];
+const blrSelect = document.getElementsByTagName('blr-select')[0];
const addLog = (log) => {
logsContainer.innerHTML = logsContainer.innerHTML + log + ' ';
@@ -61,3 +62,7 @@ blrCheckbox.addEventListener('blrFocus', () => {
blrCheckbox.addEventListener('blrBlur', () => {
addLog('blr-checkbox blurred');
});
+
+blrSelect.addEventListener('blrChange', (e) => {
+ addLog('blr-select changed');
+});
diff --git a/packages/ui-library/src/components/forms/select/index.css.ts b/packages/ui-library/src/components/forms/select/index.css.ts
index e9e87b6bf..b863948db 100644
--- a/packages/ui-library/src/components/forms/select/index.css.ts
+++ b/packages/ui-library/src/components/forms/select/index.css.ts
@@ -15,6 +15,10 @@ export const { tokenizedLight: selectInputLight, tokenizedDark: selectInputDark
const { UserInput, SurfaceFill, SM, MD, LG, Input, InputBorderRadius, Placeholder, InputIcon } = semanticTokens.Forms;
return typeSafeNestedCss`
+ slot {
+ display: none;
+ }
+
.blr-input-icon {
pointer-events: none;
}
diff --git a/packages/ui-library/src/components/forms/select/index.stories.ts b/packages/ui-library/src/components/forms/select/index.stories.ts
index c9ee7c9c4..3fe5c04ec 100644
--- a/packages/ui-library/src/components/forms/select/index.stories.ts
+++ b/packages/ui-library/src/components/forms/select/index.stories.ts
@@ -33,23 +33,10 @@ const defaultParams: BlrSelectType = {
required: false,
hasError: false,
errorMessage: ' ',
- errorIcon: undefined,
+ errorMessageIcon: undefined,
arialabel: 'Select',
selectId: 'selectId',
name: 'select',
- options: [
- { value: '0', label: 'Option 1', selected: false, disabled: true },
- {
- value: '1',
- label:
- 'To big option Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc, litot Europa usa li sam vocabular. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilite de un nov lingua franca: On refusa continuar payar custosi traductores. At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles. Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. It va esser tam simplic quam Occidental in fact, it va esser Occidental. A un Angleso it va semblar un simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es.Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc, litot Europa usa li sam vocabular. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilite de un nov lingua franca: On refusa continuar payar custosi traductores. At solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles.',
- selected: false,
- disabled: false,
- },
- { value: '2', label: 'Option 3', selected: true, disabled: false },
- { value: '4', label: 'Option 4', selected: false, disabled: false },
- ],
- onChange: (event: Event) => console.log(event.type),
};
export default {
@@ -120,14 +107,8 @@ export default {
options: {
name: 'children (options)',
description:
- 'Enter an array containing information about the label, value and disabled prop for all options that are part of the select.',
+ 'Enter a list of html option elements containing information about the label, value and disabled prop for all options that are part of the select.',
control: 'array',
- options: [
- { value: '0', label: 'Option 1', selected: false, disabled: true },
- { value: '1', label: 'Option 2', selected: false, disabled: false },
- { value: '2', label: 'Option 3', selected: true, disabled: false },
- { value: '4', label: 'Option 4', selected: false, disabled: false },
- ],
table: {
category: 'Content / Settings',
},
@@ -170,7 +151,7 @@ export default {
},
if: { arg: 'hasError', eq: true },
},
- errorIcon: {
+ errorMessageIcon: {
name: 'errorMessageIcon',
description: 'Select an icon which is displayed in front of the error message.',
table: {
@@ -255,7 +236,17 @@ Select presents users with a list of options from which they can make a single s
},
};
-export const BlrSelect = (params: BlrSelectType) => BlrSelectRenderFunction(params);
+const optionsAsChildren = html`
+
+
+
+
+
+
+
+`;
+
+export const BlrSelect = (params: BlrSelectType) => BlrSelectRenderFunction(params, optionsAsChildren);
BlrSelect.storyName = 'Select';
BlrSelect.args = defaultParams;
@@ -288,7 +279,6 @@ const argTypesToDisable = [
const generateDisabledArgTypes = (argTypes: string[]) => {
const disabledArgTypes = {};
argTypes.forEach((argType: string) => {
- // @ts-expect-error todo
disabledArgTypes[argType] = {
table: {
disable: true,
@@ -307,24 +297,33 @@ export const SizeVariant = () => {
return html`
${sharedStyles}