@ouestfrance/sipa-bms-ui 8.22.2 → 8.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/components/button/BmsButton.vue.d.ts +1 -1
  2. package/dist/components/button/BmsIconButton.vue.d.ts +1 -1
  3. package/dist/components/button/BmsToggleIcon.vue.d.ts +24 -0
  4. package/dist/components/button/UiButton.vue.d.ts +1 -1
  5. package/dist/components/form/BmsInputText.vue.d.ts +1 -1
  6. package/dist/components/form/BmsSearch.vue.d.ts +3 -3
  7. package/dist/components/form/BmsSelect.vue.d.ts +1 -1
  8. package/dist/components/form/RawSelect.vue.d.ts +1 -1
  9. package/dist/components/layout/BmsHeaderTitle.vue.d.ts +1 -1
  10. package/dist/components/navigation/BmsBreadcrumb.vue.d.ts +1 -1
  11. package/dist/components/navigation/BmsShortLinkMenu.vue.d.ts +2 -2
  12. package/dist/components/navigation/UiTenantSwitcher.vue.d.ts +3 -3
  13. package/dist/components/table/BmsPagination.vue.d.ts +4 -2
  14. package/dist/components/table/BmsServerTable.vue.d.ts +3 -3
  15. package/dist/components/table/BmsTable.vue.d.ts +3 -3
  16. package/dist/components/table/BmsTableFilters.vue.d.ts +5 -3
  17. package/dist/components/table/UiBmsTable.vue.d.ts +3 -3
  18. package/dist/components/table/UiFilterButton.vue.d.ts +2 -0
  19. package/dist/index.d.ts +2 -1
  20. package/dist/models/table.model.d.ts +5 -0
  21. package/dist/plugins/field/FieldComponent.vue.d.ts +1 -1
  22. package/dist/plugins/router-history/router-history.composable.d.ts +1 -1
  23. package/dist/showroom/pages/table.vue.d.ts +2 -0
  24. package/dist/sipa-bms-ui.css +167 -103
  25. package/dist/sipa-bms-ui.es.js +3838 -3301
  26. package/dist/sipa-bms-ui.es.js.map +1 -1
  27. package/dist/sipa-bms-ui.umd.js +3842 -3303
  28. package/dist/sipa-bms-ui.umd.js.map +1 -1
  29. package/package.json +19 -19
  30. package/src/components/button/BmsButton.stories.js +142 -3
  31. package/src/components/button/BmsToggleIcon.stories.js +145 -0
  32. package/src/components/button/BmsToggleIcon.vue +108 -0
  33. package/src/components/form/BmsChip.stories.js +104 -2
  34. package/src/components/form/BmsInputCheckboxCaptionGroup.stories.js +157 -2
  35. package/src/components/form/BmsInputCheckboxGroup.stories.js +119 -2
  36. package/src/components/form/BmsInputCode.stories.js +109 -2
  37. package/src/components/form/BmsInputFile.stories.js +110 -2
  38. package/src/components/form/BmsInputNumber.stories.js +12 -2
  39. package/src/components/form/BmsInputNumber.vue +2 -1
  40. package/src/components/form/BmsInputRadioCaptionGroup.stories.js +138 -2
  41. package/src/components/form/BmsInputRadioGroup.stories.js +120 -2
  42. package/src/components/form/BmsInputText.stories.js +278 -1
  43. package/src/components/form/BmsInputText.vue +2 -0
  44. package/src/components/form/BmsMultiSelect.vue +3 -1
  45. package/src/components/form/BmsSearch.stories.js +89 -2
  46. package/src/components/form/BmsSelect.stories.js +220 -2
  47. package/src/components/form/BmsSelect.vue +5 -3
  48. package/src/components/form/BmsTag.stories.js +119 -3
  49. package/src/components/form/BmsTextArea.stories.js +146 -2
  50. package/src/components/form/RawAutocomplete.vue +3 -1
  51. package/src/components/layout/BmsFloatingWindow.vue +12 -1
  52. package/src/components/layout/BmsForm.stories.js +216 -0
  53. package/src/components/layout/BmsHeaderTitle.stories.js +136 -1
  54. package/src/components/layout/BmsSplitWindow.vue +1 -1
  55. package/src/components/table/BmsPagination.vue +3 -0
  56. package/src/components/table/BmsServerTable.stories.js +59 -3
  57. package/src/components/table/BmsServerTable.vue +9 -2
  58. package/src/components/table/BmsTable.stories.js +312 -2
  59. package/src/components/table/BmsTable.vue +14 -3
  60. package/src/components/table/BmsTableFilters.vue +15 -5
  61. package/src/components/table/UiBmsTable.stories.js +3 -0
  62. package/src/components/table/UiBmsTable.vue +14 -5
  63. package/src/components/table/UiFilterButton.vue +6 -1
  64. package/src/documentation/button/secondaryButton.mdx +114 -3
  65. package/src/documentation/checkboxCaptionGroup.mdx +99 -0
  66. package/src/documentation/checkboxGroup.mdx +99 -0
  67. package/src/documentation/chip.mdx +85 -11
  68. package/src/documentation/inputCode.mdx +97 -0
  69. package/src/documentation/inputFile.mdx +90 -13
  70. package/src/documentation/inputText.mdx +183 -0
  71. package/src/documentation/layout/form.mdx +74 -0
  72. package/src/documentation/layout/headerTitle.mdx +124 -0
  73. package/src/documentation/layout/table.mdx +111 -0
  74. package/src/documentation/radioCaptionGroup.mdx +86 -19
  75. package/src/documentation/radioGroup.mdx +85 -18
  76. package/src/documentation/search.mdx +85 -13
  77. package/src/documentation/select.mdx +137 -16
  78. package/src/documentation/tag.mdx +91 -11
  79. package/src/documentation/textArea.mdx +126 -13
  80. package/src/index.ts +3 -0
  81. package/src/models/table.model.ts +6 -0
  82. package/src/showroom/pages/floating-window.vue +36 -0
  83. package/src/documentation/fields_text.mdx +0 -31
@@ -1,11 +1,15 @@
1
1
  import BmsTable from '@/components/table/BmsTable.vue';
2
2
  import BmsButton from '@/components/button/BmsButton.vue';
3
3
  import BmsIconButton from '@/components/button/BmsIconButton.vue';
4
- import { Save, Trash } from 'lucide-vue-next';
4
+ import { BmsTag } from '@/index';
5
+ import { Save, Trash, Pencil } from 'lucide-vue-next';
5
6
 
6
7
  export default {
7
8
  title: 'Composants/table/Table',
8
9
  component: BmsTable,
10
+ parameters: {
11
+ chromatic: { disable: true },
12
+ },
9
13
  argTypes: {
10
14
  disableSearch: {
11
15
  control: { type: 'boolean' },
@@ -14,7 +18,7 @@ export default {
14
18
  options: ['single', 'default'],
15
19
  },
16
20
  mode: {
17
- options: ['normal', 'dense'],
21
+ options: ['normal', 'dense', 'small'],
18
22
  },
19
23
  loading: {
20
24
  control: { type: 'boolean' },
@@ -132,6 +136,70 @@ FiltersClosed.args = {
132
136
  disableSearch: true,
133
137
  };
134
138
 
139
+ export const Small = Template.bind({});
140
+ Small.args = {
141
+ mode: 'small',
142
+ headers: [
143
+ {
144
+ label: 'Column 1',
145
+ key: 'col1',
146
+ align: 'start',
147
+ },
148
+ {
149
+ label: 'Column 2',
150
+ key: 'col2',
151
+ align: 'center',
152
+ },
153
+ {
154
+ label: 'Column 3',
155
+ key: 'col3',
156
+ align: 'end',
157
+ },
158
+ ],
159
+ filters: [
160
+ {
161
+ label: 'Input',
162
+ key: 'col1',
163
+ type: 'input',
164
+ value: 'Val',
165
+ },
166
+ {
167
+ label: 'Select',
168
+ key: 'col2',
169
+ type: 'select',
170
+ selectOptions: [
171
+ {
172
+ label: 'option1',
173
+ value: 'option1',
174
+ },
175
+ {
176
+ label: 'option2',
177
+ value: 'option2',
178
+ },
179
+ ],
180
+ },
181
+ {
182
+ label: 'Boolean',
183
+ key: 'col3',
184
+ type: 'boolean',
185
+ },
186
+ ],
187
+ items: [
188
+ {
189
+ col1: 'Value1',
190
+ col2: 'Value2',
191
+ col3: 'Value3',
192
+ },
193
+ {
194
+ col1: 'Value2',
195
+ col2: 'Value2',
196
+ col3: 'Value3',
197
+ },
198
+ ],
199
+ disableSearch: true,
200
+ defaultFiltersOpened: true,
201
+ };
202
+
135
203
  export const FiltersOpened = Template.bind({});
136
204
  FiltersOpened.args = {
137
205
  headers: [
@@ -1088,3 +1156,245 @@ WithActionColumnAndChildElement.args = {
1088
1156
  selectedItems: [],
1089
1157
  selectable: true,
1090
1158
  };
1159
+
1160
+ // Simple template for documentation
1161
+ const SimpleTemplate = (args) => ({
1162
+ components: {
1163
+ BmsTable,
1164
+ BmsButton,
1165
+ BmsTag,
1166
+ },
1167
+ setup() {
1168
+ return { args };
1169
+ },
1170
+ template: `
1171
+ <BmsTable v-bind="args">
1172
+ <template v-if="args.hasCustomAction" #custom-action>
1173
+ <div style="display: flex; gap: 8px;">
1174
+ <BmsTag
1175
+ v-for="tag in args.filterTags"
1176
+ :key="tag.id"
1177
+ :active="tag.active"
1178
+ @click="tag.onClick"
1179
+ >
1180
+ {{ tag.label }}
1181
+ </BmsTag>
1182
+ </div>
1183
+ </template>
1184
+ </BmsTable>
1185
+ `,
1186
+ });
1187
+
1188
+ // Common headers and items for documentation examples
1189
+ const commonHeaders = [
1190
+ {
1191
+ label: 'Name',
1192
+ key: 'name',
1193
+ align: 'start',
1194
+ sortable: true,
1195
+ },
1196
+ {
1197
+ label: 'Email',
1198
+ key: 'email',
1199
+ align: 'start',
1200
+ },
1201
+ {
1202
+ label: 'Status',
1203
+ key: 'status',
1204
+ align: 'center',
1205
+ },
1206
+ ];
1207
+
1208
+ const commonItems = [
1209
+ { name: 'John Doe', email: 'john@example.com', status: 'Active' },
1210
+ { name: 'Jane Smith', email: 'jane@example.com', status: 'Active' },
1211
+ { name: 'Bob Johnson', email: 'bob@example.com', status: 'Inactive' },
1212
+ { name: 'Alice Williams', email: 'alice@example.com', status: 'Active' },
1213
+ { name: 'Charlie Brown', email: 'charlie@example.com', status: 'Pending' },
1214
+ ];
1215
+
1216
+ // Playground with default values for documentation
1217
+ export const PlaygroundTable = SimpleTemplate.bind({});
1218
+ PlaygroundTable.parameters = { chromatic: { disable: true } };
1219
+ PlaygroundTable.args = {
1220
+ headers: commonHeaders,
1221
+ items: commonItems,
1222
+ disableSearch: false,
1223
+ filters: [],
1224
+ hasCustomAction: false,
1225
+ };
1226
+
1227
+ // Do: Table with search
1228
+ export const DoWithSearch = SimpleTemplate.bind({});
1229
+ DoWithSearch.parameters = { chromatic: { disable: true } };
1230
+ DoWithSearch.args = {
1231
+ headers: commonHeaders,
1232
+ items: commonItems,
1233
+ disableSearch: false,
1234
+ filters: [],
1235
+ hasCustomAction: false,
1236
+ };
1237
+
1238
+ // Do: Table without search
1239
+ export const DoWithoutSearch = SimpleTemplate.bind({});
1240
+ DoWithoutSearch.parameters = { chromatic: { disable: true } };
1241
+ DoWithoutSearch.args = {
1242
+ headers: commonHeaders,
1243
+ items: commonItems,
1244
+ disableSearch: true,
1245
+ filters: [],
1246
+ hasCustomAction: false,
1247
+ };
1248
+
1249
+ // Do: Table with filters
1250
+ export const DoWithFilters = SimpleTemplate.bind({});
1251
+ DoWithFilters.parameters = { chromatic: { disable: true } };
1252
+ DoWithFilters.args = {
1253
+ headers: commonHeaders,
1254
+ items: commonItems,
1255
+ disableSearch: false,
1256
+ filters: [
1257
+ {
1258
+ label: 'Status',
1259
+ key: 'status',
1260
+ type: 'select',
1261
+ selectOptions: [
1262
+ { label: 'Active', value: 'Active' },
1263
+ { label: 'Inactive', value: 'Inactive' },
1264
+ { label: 'Pending', value: 'Pending' },
1265
+ ],
1266
+ },
1267
+ ],
1268
+ hasCustomAction: false,
1269
+ };
1270
+
1271
+ // Do: Table without filters
1272
+ export const DoWithoutFilters = SimpleTemplate.bind({});
1273
+ DoWithoutFilters.parameters = { chromatic: { disable: true } };
1274
+ DoWithoutFilters.args = {
1275
+ headers: commonHeaders,
1276
+ items: commonItems,
1277
+ disableSearch: false,
1278
+ filters: [],
1279
+ hasCustomAction: false,
1280
+ };
1281
+
1282
+ // Do: Table with custom actions (filter tags)
1283
+ export const DoWithCustomActions = SimpleTemplate.bind({});
1284
+ DoWithCustomActions.parameters = { chromatic: { disable: true } };
1285
+ DoWithCustomActions.args = {
1286
+ headers: commonHeaders,
1287
+ items: commonItems,
1288
+ disableSearch: false,
1289
+ filters: [],
1290
+ hasCustomAction: true,
1291
+ filterTags: [
1292
+ { id: '1', label: 'Active', active: true, onClick: () => {} },
1293
+ { id: '2', label: 'Inactive', active: false, onClick: () => {} },
1294
+ { id: '3', label: 'Pending', active: false, onClick: () => {} },
1295
+ ],
1296
+ };
1297
+
1298
+ // Do: Table with action icons
1299
+ const TemplateWithActionIcons = (args) => ({
1300
+ components: {
1301
+ BmsTable,
1302
+ BmsIconButton,
1303
+ Pencil,
1304
+ Trash,
1305
+ },
1306
+ setup() {
1307
+ return { args };
1308
+ },
1309
+ template: `
1310
+ <BmsTable v-bind="args">
1311
+ <template #actions="{ row, isChildElement }">
1312
+ <template v-if="isChildElement">
1313
+ <span style="color: var(--bms-grey-50);">No actions</span>
1314
+ </template>
1315
+ <template v-else>
1316
+ <div style="display: flex; gap: 8px;">
1317
+ <BmsIconButton><Pencil/></BmsIconButton>
1318
+ <BmsIconButton mode="danger"><Trash/></BmsIconButton>
1319
+ </div>
1320
+ </template>
1321
+ </template>
1322
+ </BmsTable>
1323
+ `,
1324
+ });
1325
+
1326
+ export const DoWithActionIcons = TemplateWithActionIcons.bind({});
1327
+ DoWithActionIcons.args = {
1328
+ headers: [
1329
+ ...commonHeaders,
1330
+ {
1331
+ label: 'Actions',
1332
+ key: 'actions',
1333
+ action: true,
1334
+ },
1335
+ ],
1336
+ items: commonItems,
1337
+ disableSearch: false,
1338
+ filters: [],
1339
+ };
1340
+
1341
+ // Do: Table with search and filters
1342
+ export const DoWithSearchAndFilters = SimpleTemplate.bind({});
1343
+ DoWithSearchAndFilters.parameters = { chromatic: { disable: true } };
1344
+ DoWithSearchAndFilters.args = {
1345
+ headers: commonHeaders,
1346
+ items: commonItems,
1347
+ disableSearch: false,
1348
+ filters: [
1349
+ {
1350
+ label: 'Status',
1351
+ key: 'status',
1352
+ type: 'select',
1353
+ selectOptions: [
1354
+ { label: 'Active', value: 'Active' },
1355
+ { label: 'Inactive', value: 'Inactive' },
1356
+ { label: 'Pending', value: 'Pending' },
1357
+ ],
1358
+ },
1359
+ ],
1360
+ hasCustomAction: false,
1361
+ };
1362
+
1363
+ // Do: Table with search, filters and actions
1364
+ export const DoWithSearchFiltersAndActions = SimpleTemplate.bind({});
1365
+ DoWithSearchFiltersAndActions.parameters = { chromatic: { disable: true } };
1366
+ DoWithSearchFiltersAndActions.args = {
1367
+ headers: commonHeaders,
1368
+ items: commonItems,
1369
+ disableSearch: false,
1370
+ filters: [
1371
+ {
1372
+ label: 'Status',
1373
+ key: 'status',
1374
+ type: 'select',
1375
+ selectOptions: [
1376
+ { label: 'Active', value: 'Active' },
1377
+ { label: 'Inactive', value: 'Inactive' },
1378
+ { label: 'Pending', value: 'Pending' },
1379
+ ],
1380
+ },
1381
+ ],
1382
+ hasCustomAction: true,
1383
+ filterTags: [
1384
+ { id: '1', label: 'Active', active: true, onClick: () => {} },
1385
+ { id: '2', label: 'Inactive', active: false, onClick: () => {} },
1386
+ ],
1387
+ };
1388
+
1389
+ // Do: Table with row selection
1390
+ export const DoWithRowSelection = SimpleTemplate.bind({});
1391
+ DoWithRowSelection.parameters = { chromatic: { disable: true } };
1392
+ DoWithRowSelection.args = {
1393
+ headers: commonHeaders,
1394
+ items: commonItems,
1395
+ disableSearch: false,
1396
+ filters: [],
1397
+ hasCustomAction: false,
1398
+ selectable: true,
1399
+ selectedItems: [],
1400
+ };
@@ -13,6 +13,7 @@ import {
13
13
  Sort,
14
14
  SortValue,
15
15
  TableHeader,
16
+ TableMode,
16
17
  } from '@/models';
17
18
  import { computed, Ref, ref, watch, watchEffect } from 'vue';
18
19
  import BmsTableFilters from './BmsTableFilters.vue';
@@ -21,6 +22,7 @@ import { BmsTag } from '@/index';
21
22
  import * as lucideIcons from 'lucide-vue-next';
22
23
  import { Trash } from 'lucide-vue-next';
23
24
  import { useRoute } from 'vue-router';
25
+ import Table from '@/showroom/pages/table.vue';
24
26
 
25
27
  const route = useRoute();
26
28
  const slots = defineSlots();
@@ -32,7 +34,7 @@ interface UiTableProps {
32
34
  savedFilters?: SavedFilter[];
33
35
  canSaveFilters?: boolean;
34
36
  items: unknown[];
35
- mode?: 'normal' | 'dense';
37
+ mode?: TableMode;
36
38
  persistent?: boolean;
37
39
  pagination?: number[];
38
40
  size?: number;
@@ -45,7 +47,7 @@ interface UiTableProps {
45
47
  }
46
48
 
47
49
  const props = withDefaults(defineProps<UiTableProps>(), {
48
- mode: 'normal',
50
+ mode: TableMode.NORMAL,
49
51
  persistent: true,
50
52
  pagination: () => [25, 50, 100],
51
53
  size: 25,
@@ -233,6 +235,8 @@ const onSelectAll = () => {
233
235
  };
234
236
 
235
237
  const totalSize = computed(() => elementsAndChildElements.value.length);
238
+
239
+ const isTableSmall = computed(() => props.mode === TableMode.SMALL);
236
240
  </script>
237
241
 
238
242
  <template>
@@ -264,6 +268,7 @@ const totalSize = computed(() => elementsAndChildElements.value.length);
264
268
  <div v-show="isFilterVisible" class="filters-container">
265
269
  <BmsTableFilters
266
270
  v-model="filters"
271
+ :small="isTableSmall"
267
272
  :canSaveFilters="canSaveFilters"
268
273
  @saveFilter="onSaveFilter"
269
274
  @reset-filters="resetFilters"
@@ -300,10 +305,15 @@ const totalSize = computed(() => elementsAndChildElements.value.length);
300
305
  :activeFiltersNb="numberOfActiveFilters"
301
306
  :isFilterVisible="isFilterVisible"
302
307
  @toggleFilters="toggleFilters"
308
+ :small="isTableSmall"
303
309
  />
304
310
  <template v-if="!disableSearch">
305
311
  <slot name="search">
306
- <BmsSearch v-model="search" class="table-search" />
312
+ <BmsSearch
313
+ v-model="search"
314
+ class="table-search"
315
+ :small="isTableSmall"
316
+ />
307
317
  </slot>
308
318
  </template>
309
319
  </template>
@@ -325,6 +335,7 @@ const totalSize = computed(() => elementsAndChildElements.value.length);
325
335
  :currentPage="currentPage"
326
336
  :sizes="paginationsOptions"
327
337
  :pages="totalPages"
338
+ :small="isTableSmall"
328
339
  @prev="onPrevClick"
329
340
  @next="onNextClick"
330
341
  @go="go($event)"
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="filters">
2
+ <div class="filters" :class="{ 'filters--small': small }">
3
3
  <div class="filters__header">
4
4
  <div class="filters__header-title">
5
5
  <FilterIcon />
@@ -23,7 +23,7 @@
23
23
  </BmsIconButton>
24
24
  </span>
25
25
  </div>
26
- <div class="filters__inputs">
26
+ <div class="filters__inputs" :class="{ 'filters__inputs--small': small }">
27
27
  <span
28
28
  v-for="filter in modelValue"
29
29
  class="input"
@@ -34,6 +34,7 @@
34
34
  >
35
35
  <component
36
36
  :is="getFilterComponent(filter.type)"
37
+ :small="small"
37
38
  :label="filter.label"
38
39
  :inputType="filter.inputType"
39
40
  :modelValue="transformValueForComponent(filter?.value, filter.type)"
@@ -104,9 +105,11 @@ const props = withDefaults(
104
105
  defineProps<{
105
106
  modelValue: Filter[];
106
107
  canSaveFilters?: boolean;
108
+ small?: boolean;
107
109
  }>(),
108
110
  {
109
111
  canSaveFilters: false,
112
+ small: false,
110
113
  },
111
114
  );
112
115
 
@@ -246,11 +249,15 @@ watch(
246
249
 
247
250
  <style lang="scss" scoped>
248
251
  .filters {
249
- padding: 16px;
252
+ padding: 1em;
250
253
  background: var(--bms-white);
251
254
  border: 1px solid var(--bms-grey-10);
252
255
  border-radius: var(--bms-border-radius-large);
253
- margin-bottom: 16px;
256
+ margin-bottom: 1em;
257
+ &--small {
258
+ margin-bottom: 0.5em;
259
+ padding: 0.5em;
260
+ }
254
261
 
255
262
  &__header {
256
263
  display: flex;
@@ -268,9 +275,12 @@ watch(
268
275
  &__inputs {
269
276
  display: flex;
270
277
  flex-wrap: wrap;
271
- padding-top: 16px;
272
278
  align-items: flex-end;
273
279
  row-gap: 8px;
280
+ padding-top: 1em;
281
+ &--small {
282
+ padding-top: 0.5em;
283
+ }
274
284
 
275
285
  .input {
276
286
  width: 25%;
@@ -11,6 +11,9 @@ export default {
11
11
  page: template,
12
12
  },
13
13
  },
14
+ argTypes: {
15
+ mode: { options: ['normal', 'dense', 'small'] },
16
+ },
14
17
  tags: ['code-only'],
15
18
  title: 'Composants/table/UiBmsTable',
16
19
  component: UiBmsTable,
@@ -5,6 +5,7 @@ import {
5
5
  SortValue,
6
6
  StatusType,
7
7
  type TableHeader,
8
+ TableMode,
8
9
  } from '@/models';
9
10
  import _get from 'lodash/get';
10
11
  import _isEqual from 'lodash/isEqual';
@@ -27,7 +28,7 @@ import UiBmsTableRow from './UiBmsTableRow.vue';
27
28
  interface UiBmsTableProps {
28
29
  headers: TableHeader[];
29
30
  items: any[];
30
- mode?: 'normal' | 'dense';
31
+ mode?: TableMode;
31
32
  loading?: boolean;
32
33
  hasFilters?: boolean;
33
34
  sort?: Sort;
@@ -40,7 +41,7 @@ interface UiBmsTableProps {
40
41
  }
41
42
 
42
43
  const props = withDefaults(defineProps<UiBmsTableProps>(), {
43
- mode: 'normal',
44
+ mode: TableMode.NORMAL,
44
45
  hasFilters: false,
45
46
  sort: () => ({
46
47
  key: null,
@@ -211,7 +212,10 @@ onMounted(() => {
211
212
 
212
213
  <template>
213
214
  <div class="bms-table">
214
- <div class="bms-table__actions">
215
+ <div
216
+ class="bms-table__actions"
217
+ :class="{ 'bms-table__actions--small': mode === TableMode.SMALL }"
218
+ >
215
219
  <div class="bms-table__actions__saved-filters">
216
220
  <div class="bms-table__actions__custom">
217
221
  <slot name="custom-actions"></slot>
@@ -321,7 +325,7 @@ onMounted(() => {
321
325
  :headers="filteredHeaders"
322
326
  :select-mode="selectMode"
323
327
  :selectable-disabled="selectableDisabled"
324
- :dense="mode === 'dense'"
328
+ :dense="mode === TableMode.DENSE || mode === TableMode.SMALL"
325
329
  @select="onItemSelect"
326
330
  >
327
331
  <template v-for="cell in headers" v-slot:[cell.key]="slotData">
@@ -400,7 +404,11 @@ onMounted(() => {
400
404
  display: flex;
401
405
  align-items: center;
402
406
  justify-content: space-between;
403
- margin-bottom: 16px;
407
+ margin-bottom: 1em;
408
+
409
+ &--small {
410
+ margin-bottom: 0.5em;
411
+ }
404
412
 
405
413
  &__saved-filters {
406
414
  display: flex;
@@ -528,6 +536,7 @@ onMounted(() => {
528
536
  visibility: hidden;
529
537
  --table-blob-height: 80px;
530
538
 
539
+ &.small,
531
540
  &.dense {
532
541
  --table-blob-height: 50px;
533
542
  }
@@ -4,6 +4,7 @@
4
4
  class="filter-button"
5
5
  :color="isFilterVisible ? StatusType.Default : StatusType.Information"
6
6
  :mode="isFilterVisible ? 'fill' : 'ghost'"
7
+ :small="small"
7
8
  @click="$emits('toggleFilters')"
8
9
  >
9
10
  <FilterIcon />
@@ -23,11 +24,13 @@ import { StatusType } from '@/models';
23
24
  interface UiFilterButtonProps {
24
25
  isFilterVisible: boolean;
25
26
  activeFiltersNb: number;
27
+ small?: boolean;
26
28
  }
27
29
 
28
30
  const props = withDefaults(defineProps<UiFilterButtonProps>(), {
29
31
  isFilterVisible: false,
30
32
  activeFiltersNb: 0,
33
+ small: false,
31
34
  });
32
35
 
33
36
  const $emits = defineEmits<{
@@ -43,8 +46,10 @@ const showIndicator = computed(
43
46
  .filter-button-container {
44
47
  position: relative;
45
48
 
49
+ :deep(.bms-button .content) {
50
+ margin: 0;
51
+ }
46
52
  .filter-button {
47
- padding: 0.5em 0;
48
53
  font-size: 20px;
49
54
  }
50
55
  .indicator {