diff --git a/package.json b/package.json index bdf6ee360e9f3afd06a517cc2fba49a49128bcb6..06ba8158bcfa73f08505d12cf3656bd895855d86 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,5 @@ "extends": [ "plugin:storybook/recommended" ] - }, - "volta": { - "node": "23.1.0" } } diff --git a/src/Playground.vue b/src/Playground.vue index c27834cd4c153c73a6e97d1c898c21eac86d43cc..c15d980971ded46b12153164f659d4ef2725366e 100644 --- a/src/Playground.vue +++ b/src/Playground.vue @@ -112,6 +112,34 @@ const tableColumns: ITableColumn[] = [ name: 'Country', type: 'text', }, + { + name: 'Is gay?', + type: 'checkbox', + }, + { + name: 'Status', + type: 'select', + options: { + options: [{ value: 'Married' }, { value: 'Oh no...(s)he is dead' }], + theme: 'sky', + }, + }, + { + name: 'Children', + type: 'rating', + options: { + theme: 'yellow', + }, + }, + { + name: 'Job progress', + type: 'progressBar', + options: { + theme: 'red', + width: '150px', + size: 'small', + }, + }, ]; const tableData = ref([ [ @@ -127,6 +155,18 @@ const tableData = ref([ { value: 'USA', }, + { + value: false, + }, + { + value: 'Married', + }, + { + value: 0, + }, + { + value: 30, + }, ], [ { @@ -141,6 +181,18 @@ const tableData = ref([ { value: 'Canada', }, + { + value: true, + }, + { + value: 'Married', + }, + { + value: 0, + }, + { + value: 30, + }, ], [ { @@ -155,6 +207,18 @@ const tableData = ref([ { value: 'Russia', }, + { + value: false, + }, + { + value: 'Married', + }, + { + value: 0, + }, + { + value: 30, + }, ], [ { @@ -169,6 +233,18 @@ const tableData = ref([ { value: 'Russia', }, + { + value: false, + }, + { + value: 'Married', + }, + { + value: 0, + }, + { + value: 30, + }, ], [ { @@ -183,6 +259,18 @@ const tableData = ref([ { value: 'Russia', }, + { + value: false, + }, + { + value: 'Married', + }, + { + value: 0, + }, + { + value: 30, + }, ], ]); const activeCheckbox = ref(); @@ -217,25 +305,19 @@ const knob = ref(0); {{ activeCheckbox }} - - - - -
+ + + + + {{ tableData[1] }}
diff --git a/src/common/interfaces/componentsProp.ts b/src/common/interfaces/componentsProp.ts index 69d53ab403974435642ae1046fbfc1bc2c932a28..4bb98d8f71eb5cb25339e6d8750a73916f5f2002 100644 --- a/src/common/interfaces/componentsProp.ts +++ b/src/common/interfaces/componentsProp.ts @@ -19,7 +19,7 @@ export interface ITableColumn { } export interface ITableItem { - value: string | boolean; + value: string | number | boolean; editable?: boolean; } diff --git a/src/common/interfaces/componentsProps.ts b/src/common/interfaces/componentsProps.ts index 9346010fd3facdddb4037f50d74e8cc3c55042d0..ab0f0a38ea284735e5a25d781b816494da80079a 100644 --- a/src/common/interfaces/componentsProps.ts +++ b/src/common/interfaces/componentsProps.ts @@ -158,7 +158,7 @@ export interface IPopupProps { } export interface ISelectProps { - options: ISelectOption[]; + options?: ISelectOption[]; groups?: ISelectGroup[]; selected?: string; width?: string; @@ -205,7 +205,7 @@ export interface IButtonProps { } export interface IProgressBarProps { - value: number; + value?: number; max?: number; width?: string; height?: string; diff --git a/src/components/Checkbox/Checkbox.vue b/src/components/Checkbox/Checkbox.vue index 38bb0376a4b92e5135453206ad3d71c74cb6dd67..a35190825ab749640f703ec177ccc3e27293c67e 100644 --- a/src/components/Checkbox/Checkbox.vue +++ b/src/components/Checkbox/Checkbox.vue @@ -1,6 +1,6 @@