@teammodlr/ui-kit 3.0.0-beta.22 → 3.0.0-beta.24
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.
- package/lib/components/dialog/Dialog.vue.d.ts +1 -2
- package/lib/components/dialogprovider/types.d.ts +0 -2
- package/lib/components/select/Select.vue.d.ts +23 -1
- package/lib/components/select/style/Select.css.d.ts +6 -0
- package/lib/index.cjs.js +3 -3
- package/lib/index.es.js +3355 -3344
- package/lib/style.css +1 -1
- package/package.json +1 -1
- package/src/components/dialog/Dialog.vue +8 -26
- package/src/components/dialogprovider/DialogProvider.vue +1 -7
- package/src/components/dialogprovider/types.ts +0 -2
- package/src/components/select/Select.vue +25 -7
- package/src/components/select/examples/fill.vue +52 -0
- package/src/components/select/examples/index.stories.ts +2 -1
- package/src/components/select/examples/index.ts +1 -0
- package/src/components/select/style/Select.css.ts +96 -4
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div style="display: grid; grid-template-columns: 120px 1fr 1fr; border: 1px solid #e5e7eb;">
|
|
3
|
+
<div style="padding: 6px 8px; font-size: 13px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; background: #f9fafb; font-weight: 500;">Row 1</div>
|
|
4
|
+
<div style="height: 36px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;">
|
|
5
|
+
<MSelect size="xs" v-model="row1Status" :options="statusOptions" fill no-border />
|
|
6
|
+
</div>
|
|
7
|
+
<div style="height: 36px; border-bottom: 1px solid #e5e7eb;">
|
|
8
|
+
<MSelect size="xs" v-model="row1Priority" :options="priorityOptions" fill no-border />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div style="padding: 6px 8px; font-size: 13px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; background: #f9fafb; font-weight: 500;">Row 2</div>
|
|
12
|
+
<div style="height: 36px; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;">
|
|
13
|
+
<MSelect size="xs" v-model="row2Status" :options="statusOptions" fill no-border />
|
|
14
|
+
</div>
|
|
15
|
+
<div style="height: 36px; border-bottom: 1px solid #e5e7eb;">
|
|
16
|
+
<MSelect size="xs" v-model="row2Priority" :options="priorityOptions" fill no-border />
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div style="padding: 6px 8px; font-size: 13px; border-right: 1px solid #e5e7eb; background: #f9fafb; font-weight: 500;">Row 3</div>
|
|
20
|
+
<div style="height: 36px; border-right: 1px solid #e5e7eb;">
|
|
21
|
+
<MSelect size="xs" v-model="row3Status" :options="statusOptions" fill no-border />
|
|
22
|
+
</div>
|
|
23
|
+
<div style="height: 36px;">
|
|
24
|
+
<MSelect size="xs" v-model="row3Priority" :options="priorityOptions" fill no-border />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script lang="ts" setup>
|
|
30
|
+
import { ref } from 'vue';
|
|
31
|
+
|
|
32
|
+
const statusOptions = [
|
|
33
|
+
{ value: 'todo', label: 'To Do' },
|
|
34
|
+
{ value: 'in_progress', label: 'In Progress' },
|
|
35
|
+
{ value: 'in_review', label: 'In Review' },
|
|
36
|
+
{ value: 'done', label: 'Done' }
|
|
37
|
+
];
|
|
38
|
+
|
|
39
|
+
const priorityOptions = [
|
|
40
|
+
{ value: 'low', label: 'Low' },
|
|
41
|
+
{ value: 'medium', label: 'Medium' },
|
|
42
|
+
{ value: 'high', label: 'High' },
|
|
43
|
+
{ value: 'critical', label: 'Critical' }
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
const row1Status = ref('in_progress');
|
|
47
|
+
const row1Priority = ref('high');
|
|
48
|
+
const row2Status = ref('todo');
|
|
49
|
+
const row2Priority = ref('medium');
|
|
50
|
+
const row3Status = ref('done');
|
|
51
|
+
const row3Priority = ref('low');
|
|
52
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import MSelect from '../Select.vue';
|
|
2
|
-
import { MSelectBasic, MSelectSearchable, MSelectMultiple } from './index';
|
|
2
|
+
import { MSelectBasic, MSelectSearchable, MSelectMultiple, MSelectFill } from './index';
|
|
3
3
|
|
|
4
4
|
import { createStory, sizeArgType } from '../../../__storybook__';
|
|
5
5
|
|
|
@@ -14,3 +14,4 @@ export default {
|
|
|
14
14
|
export const Basic = createStory(MSelectBasic);
|
|
15
15
|
export const Searchable = createStory(MSelectSearchable);
|
|
16
16
|
export const Multiple = createStory(MSelectMultiple);
|
|
17
|
+
export const Fill = createStory(MSelectFill);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from '@vanilla-extract/css';
|
|
7
7
|
import { themeVars } from '../../../styles/theme.css';
|
|
8
8
|
|
|
9
|
-
const
|
|
9
|
+
const heights = {
|
|
10
10
|
xs: '26px',
|
|
11
11
|
sm: '30px',
|
|
12
12
|
md: '38px',
|
|
@@ -42,7 +42,7 @@ export const wrapper = style({
|
|
|
42
42
|
|
|
43
43
|
export const base = style({
|
|
44
44
|
vars: {
|
|
45
|
-
[vars.height]:
|
|
45
|
+
[vars.height]: heights.md,
|
|
46
46
|
[vars.radius]: borderRadiuses.md,
|
|
47
47
|
[vars.paddingX]: themeVars.space[2],
|
|
48
48
|
[vars.paddingY]: themeVars.space[0],
|
|
@@ -371,12 +371,104 @@ export const arrow = style({
|
|
|
371
371
|
height: themeVars.space[4],
|
|
372
372
|
position: 'absolute',
|
|
373
373
|
right: themeVars.space[3],
|
|
374
|
-
top:
|
|
374
|
+
top: '50%',
|
|
375
|
+
transform: 'translateY(-50%)',
|
|
375
376
|
display: 'flex',
|
|
376
377
|
color: themeVars.color.gray[500],
|
|
377
378
|
transition: 'transform 0.3s ease',
|
|
378
379
|
});
|
|
379
380
|
|
|
380
381
|
export const arrowOpen = style({
|
|
381
|
-
transform: 'rotate(180deg)',
|
|
382
|
+
transform: 'translateY(-50%) rotate(180deg)',
|
|
382
383
|
})
|
|
384
|
+
|
|
385
|
+
export const fillRoot = style({
|
|
386
|
+
display: 'flex',
|
|
387
|
+
flexDirection: 'column',
|
|
388
|
+
height: '100%',
|
|
389
|
+
width: '100%'
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
export const fill = style({
|
|
393
|
+
flexGrow: 1,
|
|
394
|
+
width: '100%',
|
|
395
|
+
minHeight: 0
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
export const sizes = styleVariants({
|
|
399
|
+
xs: {
|
|
400
|
+
vars: {
|
|
401
|
+
[vars.height]: heights.xs,
|
|
402
|
+
[vars.radius]: borderRadiuses.xs,
|
|
403
|
+
[vars.paddingX]: themeVars.space[1]
|
|
404
|
+
},
|
|
405
|
+
fontSize: themeVars.fontSize.small
|
|
406
|
+
},
|
|
407
|
+
sm: {
|
|
408
|
+
vars: {
|
|
409
|
+
[vars.height]: heights.sm,
|
|
410
|
+
[vars.radius]: borderRadiuses.sm,
|
|
411
|
+
[vars.paddingX]: themeVars.space[1.5]
|
|
412
|
+
},
|
|
413
|
+
fontSize: themeVars.fontSize.small
|
|
414
|
+
},
|
|
415
|
+
md: {
|
|
416
|
+
vars: {
|
|
417
|
+
[vars.height]: heights.md,
|
|
418
|
+
[vars.radius]: borderRadiuses.md
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
lg: {
|
|
422
|
+
vars: {
|
|
423
|
+
[vars.height]: heights.lg,
|
|
424
|
+
[vars.radius]: borderRadiuses.lg,
|
|
425
|
+
[vars.paddingX]: themeVars.space[2.5]
|
|
426
|
+
},
|
|
427
|
+
fontSize: themeVars.fontSize.large
|
|
428
|
+
},
|
|
429
|
+
xl: {
|
|
430
|
+
vars: {
|
|
431
|
+
[vars.height]: heights.xl,
|
|
432
|
+
[vars.radius]: borderRadiuses.xl,
|
|
433
|
+
[vars.paddingX]: themeVars.space[3]
|
|
434
|
+
},
|
|
435
|
+
fontSize: themeVars.fontSize.large
|
|
436
|
+
}
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
export const fillBase = style({
|
|
440
|
+
minHeight: 'unset',
|
|
441
|
+
height: '100%',
|
|
442
|
+
lineHeight: 'normal',
|
|
443
|
+
display: 'flex',
|
|
444
|
+
alignItems: 'center',
|
|
445
|
+
overflow: 'hidden',
|
|
446
|
+
paddingRight: '2rem'
|
|
447
|
+
});
|
|
448
|
+
|
|
449
|
+
export const fillLabel = style({
|
|
450
|
+
overflow: 'hidden',
|
|
451
|
+
whiteSpace: 'nowrap',
|
|
452
|
+
textOverflow: 'ellipsis',
|
|
453
|
+
flex: 1,
|
|
454
|
+
minWidth: 0
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
export const noBorder = style({
|
|
458
|
+
vars: {
|
|
459
|
+
[vars.borderColor]: 'transparent'
|
|
460
|
+
},
|
|
461
|
+
borderRadius: 0,
|
|
462
|
+
boxShadow: 'none',
|
|
463
|
+
':hover': {
|
|
464
|
+
vars: {
|
|
465
|
+
[vars.borderColor]: 'transparent'
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
':focus': {
|
|
469
|
+
vars: {
|
|
470
|
+
[vars.borderColor]: 'transparent'
|
|
471
|
+
},
|
|
472
|
+
boxShadow: 'none'
|
|
473
|
+
}
|
|
474
|
+
});
|