@youcan/celeste 0.6.56 → 0.6.59
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/dist/celeste.css +301 -70
- package/dist/cjs/chunks/index.js +245 -1
- package/dist/cjs/chunks/pagination-first.js +32 -0
- package/dist/cjs/chunks/pagination-item.js +32 -0
- package/dist/cjs/chunks/pagination-last.js +32 -0
- package/dist/cjs/chunks/pagination-next.js +32 -0
- package/dist/cjs/chunks/pagination-previous.js +32 -0
- package/dist/cjs/chunks/use-color-model.js +3 -0
- package/dist/cjs/index.js +24 -0
- package/dist/cjs/pagination-content.js +30 -0
- package/dist/cjs/pagination-ellipsis.js +34 -0
- package/dist/cjs/pagination-first.js +3 -0
- package/dist/cjs/pagination-item.js +3 -0
- package/dist/cjs/pagination-last.js +3 -0
- package/dist/cjs/pagination-next.js +3 -0
- package/dist/cjs/pagination-previous.js +3 -0
- package/dist/cjs/pagination.js +59 -0
- package/dist/cjs/table-body.js +23 -0
- package/dist/cjs/table-caption.js +23 -0
- package/dist/cjs/table-cell.js +25 -0
- package/dist/cjs/table-empty.js +43 -0
- package/dist/cjs/table-footer.js +23 -0
- package/dist/cjs/table-head.js +24 -0
- package/dist/cjs/table-header.js +20 -0
- package/dist/cjs/table-row.js +31 -0
- package/dist/cjs/table.js +26 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/pagination/index.d.ts +16 -0
- package/dist/components/pagination/pagination-content.d.ts +21 -0
- package/dist/components/pagination/pagination-ellipsis.d.ts +14 -0
- package/dist/components/pagination/pagination-first.d.ts +14 -0
- package/dist/components/pagination/pagination-item.d.ts +16 -0
- package/dist/components/pagination/pagination-last.d.ts +14 -0
- package/dist/components/pagination/pagination-next.d.ts +14 -0
- package/dist/components/pagination/pagination-previous.d.ts +14 -0
- package/dist/components/pagination/pagination.d.ts +32 -0
- package/dist/components/table/index.d.ts +18 -0
- package/dist/components/table/table-body.d.ts +13 -0
- package/dist/components/table/table-caption.d.ts +13 -0
- package/dist/components/table/table-cell.d.ts +16 -0
- package/dist/components/table/table-empty.d.ts +16 -0
- package/dist/components/table/table-footer.d.ts +13 -0
- package/dist/components/table/table-head.d.ts +16 -0
- package/dist/components/table/table-header.d.ts +13 -0
- package/dist/components/table/table-row.d.ts +16 -0
- package/dist/components/table/table.d.ts +13 -0
- package/dist/es/chunks/index.js +309 -65
- package/dist/es/chunks/index3.js +1 -1
- package/dist/es/chunks/modal-close.js +1 -1
- package/dist/es/chunks/pagination-first.js +33 -0
- package/dist/es/chunks/pagination-item.js +33 -0
- package/dist/es/chunks/pagination-last.js +33 -0
- package/dist/es/chunks/pagination-next.js +33 -0
- package/dist/es/chunks/pagination-previous.js +33 -0
- package/dist/es/chunks/select-group.js +1 -1
- package/dist/es/chunks/use-color-model.js +3 -0
- package/dist/es/combobox-group.js +1 -1
- package/dist/es/combobox-input.js +1 -1
- package/dist/es/combobox-item.js +1 -1
- package/dist/es/combobox-list.js +1 -1
- package/dist/es/combobox-root.js +1 -1
- package/dist/es/combobox-separator.js +1 -1
- package/dist/es/combobox-trigger.js +1 -1
- package/dist/es/command-group.js +1 -1
- package/dist/es/command-input.js +1 -1
- package/dist/es/command-item.js +1 -1
- package/dist/es/command-list.js +1 -1
- package/dist/es/command-root.js +1 -1
- package/dist/es/command-separator.js +1 -1
- package/dist/es/digit-input-slot.js +1 -1
- package/dist/es/digit-input.js +1 -1
- package/dist/es/dropdown-menu-content.js +1 -1
- package/dist/es/dropdown-menu-group.js +1 -1
- package/dist/es/dropdown-menu-item.js +1 -1
- package/dist/es/dropdown-menu-label.js +1 -1
- package/dist/es/dropdown-menu-separator.js +1 -1
- package/dist/es/dropdown-menu-sub-content.js +1 -1
- package/dist/es/dropdown-menu-sub-trigger.js +1 -1
- package/dist/es/dropdown-menu-trigger.js +1 -1
- package/dist/es/dropdown-menu.js +1 -1
- package/dist/es/index.js +51 -27
- package/dist/es/modal-content.js +1 -1
- package/dist/es/modal-header.js +1 -1
- package/dist/es/pagination-content.js +31 -0
- package/dist/es/pagination-ellipsis.js +35 -0
- package/dist/es/pagination-first.js +4 -0
- package/dist/es/pagination-item.js +4 -0
- package/dist/es/pagination-last.js +4 -0
- package/dist/es/pagination-next.js +4 -0
- package/dist/es/pagination-previous.js +4 -0
- package/dist/es/pagination.js +60 -0
- package/dist/es/popover-content.js +1 -1
- package/dist/es/popover-trigger.js +1 -1
- package/dist/es/progress-bar.js +1 -1
- package/dist/es/progress-circle.js +1 -1
- package/dist/es/scroll-bar.js +1 -1
- package/dist/es/segmented-control-item.js +1 -1
- package/dist/es/segmented-control.js +1 -1
- package/dist/es/select-content.js +1 -1
- package/dist/es/select-item.js +1 -1
- package/dist/es/select-trigger.js +1 -1
- package/dist/es/select-value.js +1 -1
- package/dist/es/tab-menu-content.js +1 -1
- package/dist/es/tab-menu-item.js +1 -1
- package/dist/es/tab-menu-list.js +1 -1
- package/dist/es/tab-menu.js +1 -1
- package/dist/es/table-body.js +24 -0
- package/dist/es/table-caption.js +24 -0
- package/dist/es/table-cell.js +26 -0
- package/dist/es/table-empty.js +44 -0
- package/dist/es/table-footer.js +24 -0
- package/dist/es/table-head.js +25 -0
- package/dist/es/table-header.js +21 -0
- package/dist/es/table-row.js +32 -0
- package/dist/es/table.js +27 -0
- package/dist/es/tooltip.js +1 -1
- package/package.json +4 -3
- package/src/components/color-picker/composable/use-color-model.ts +4 -0
- package/src/components/index.ts +1 -0
- package/src/components/pagination/index.ts +23 -0
- package/src/components/pagination/pagination-content.vue +36 -0
- package/src/components/pagination/pagination-ellipsis.vue +47 -0
- package/src/components/pagination/pagination-first.vue +29 -0
- package/src/components/pagination/pagination-item.vue +28 -0
- package/src/components/pagination/pagination-last.vue +29 -0
- package/src/components/pagination/pagination-next.vue +29 -0
- package/src/components/pagination/pagination-previous.vue +33 -0
- package/src/components/pagination/pagination.vue +157 -0
- package/src/components/pagination/stories/pagination.stories.ts +154 -0
- package/src/components/switch/switch.vue +34 -16
- package/src/components/table/index.ts +26 -0
- package/src/components/table/stories/table.stories.ts +138 -0
- package/src/components/table/table-body.vue +24 -0
- package/src/components/table/table-caption.vue +26 -0
- package/src/components/table/table-cell.vue +49 -0
- package/src/components/table/table-empty.vue +43 -0
- package/src/components/table/table-footer.vue +24 -0
- package/src/components/table/table-head.vue +47 -0
- package/src/components/table/table-header.vue +18 -0
- package/src/components/table/table-row.vue +52 -0
- package/src/components/table/table.vue +36 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import { TableCell, TableRow } from '@/components/table';
|
|
4
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
5
|
+
import clsx from 'clsx';
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<TableEmptyProps>(),
|
|
9
|
+
{ colspan: 1 },
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
const delegated = useDelegatedProps(props, 'class');
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script lang="ts">
|
|
16
|
+
export interface TableEmptyProps {
|
|
17
|
+
colspan?: number;
|
|
18
|
+
class?: HTMLAttributes['class'];
|
|
19
|
+
}
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<TableRow>
|
|
24
|
+
<TableCell v-bind="delegated" :class="clsx('celeste-table-empty', props.class)">
|
|
25
|
+
<div class="celeste-table-empty-content">
|
|
26
|
+
<slot />
|
|
27
|
+
</div>
|
|
28
|
+
</TableCell>
|
|
29
|
+
</TableRow>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<style scoped>
|
|
33
|
+
.celeste-table-empty {
|
|
34
|
+
align-self: middle;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.celeste-table-empty-content {
|
|
39
|
+
display: flex;
|
|
40
|
+
place-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<TableFooterProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export interface TableFooterProps {
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<tfoot :class="clsx('celeste-table-footer', props.class)">
|
|
16
|
+
<slot />
|
|
17
|
+
</tfoot>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<style scoped>
|
|
21
|
+
.celeste-table-footer {
|
|
22
|
+
background-color: var(--color-bg-weak-50);
|
|
23
|
+
}
|
|
24
|
+
</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<TableHeadProps>(),
|
|
7
|
+
{ end: false },
|
|
8
|
+
);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
export interface TableHeadProps {
|
|
13
|
+
class?: HTMLAttributes['class'];
|
|
14
|
+
end?: boolean;
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<th
|
|
20
|
+
:class="clsx('celeste-table-head', props.class, { 'celeste-table-head-align-end': props.end })"
|
|
21
|
+
>
|
|
22
|
+
<slot />
|
|
23
|
+
</th>
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<style scoped>
|
|
27
|
+
.celeste-table-head {
|
|
28
|
+
padding: var(--spacing-8) var(--spacing-12);
|
|
29
|
+
background: var(--color-bg-weak-50);
|
|
30
|
+
color: var(--color-text-sub-600);
|
|
31
|
+
font: var(--paragraph-sm);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.celeste-table-head-align-end {
|
|
35
|
+
text-align: end;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.celeste-table-head:first-child {
|
|
39
|
+
border-start-start-radius: var(--radius-8);
|
|
40
|
+
border-end-start-radius: var(--radius-8);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.celeste-table-head:last-child {
|
|
44
|
+
border-start-end-radius: var(--radius-8);
|
|
45
|
+
border-end-end-radius: var(--radius-8);
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<TableHeaderProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export interface TableHeaderProps {
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<thead :class="clsx('celeste-table-header', props.class)">
|
|
16
|
+
<slot />
|
|
17
|
+
</thead>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<TableRowProps>(),
|
|
7
|
+
{ hoverable: true },
|
|
8
|
+
);
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
export interface TableRowProps {
|
|
13
|
+
class?: HTMLAttributes['class'];
|
|
14
|
+
hoverable?: boolean;
|
|
15
|
+
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<tr :class="clsx('celeste-table-row', props.class, { 'celeste-table-row-hoverable': props.hoverable })">
|
|
20
|
+
<slot />
|
|
21
|
+
</tr>
|
|
22
|
+
<tr aria-hidden="true" class="celeste-table-row-divider">
|
|
23
|
+
<td colspan="100" />
|
|
24
|
+
</tr>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<style scoped>
|
|
28
|
+
.celeste-table-row {
|
|
29
|
+
transition:
|
|
30
|
+
color,
|
|
31
|
+
background-color var(--animation-fast) ease;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.celeste-table-row-divider {
|
|
35
|
+
height: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.celeste-table-row-divider td {
|
|
39
|
+
height: 0;
|
|
40
|
+
padding: var(--spacing-0);
|
|
41
|
+
border-bottom: 1px solid var(--color-stroke-soft-200);
|
|
42
|
+
line-height: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.celeste-table-row-divider:last-child {
|
|
46
|
+
display: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.celeste-table-row-hoverable:hover :deep(.celeste-table-cell) {
|
|
50
|
+
background-color: var(--color-bg-weak-50);
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
|
|
5
|
+
const props = defineProps<TableProps>();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
export interface TableProps {
|
|
10
|
+
class?: HTMLAttributes['class'];
|
|
11
|
+
}
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="celeste-table-wrapper">
|
|
16
|
+
<table :class="clsx('celeste-table', props.class)">
|
|
17
|
+
<slot />
|
|
18
|
+
</table>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
.celeste-table-wrapper {
|
|
24
|
+
position: relative;
|
|
25
|
+
width: 100%;
|
|
26
|
+
overflow: auto;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.celeste-table-wrapper .celeste-table {
|
|
30
|
+
width: 100%;
|
|
31
|
+
caption-side: bottom;
|
|
32
|
+
border-spacing: var(--spacing-0) var(--spacing-4);
|
|
33
|
+
border-collapse: separate;
|
|
34
|
+
font: var(--paragraph-sm);
|
|
35
|
+
}
|
|
36
|
+
</style>
|