@aleph-alpha/ui-library 2.4.2 → 2.4.4
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/config.d.ts +13 -0
- package/config.js +78 -3
- package/dist/system/components/UiSelect/UiSelectItem.vue.d.ts +4 -1
- package/dist/system/components/core/select/SelectItem.vue.d.ts +1 -0
- package/dist/system/lib.js +1663 -1640
- package/docs/public-docs/quick-start.md +2 -1
- package/package.json +4 -1
- package/src/components/UiDrawer/UiDrawer.stories.ts +8 -8
- package/src/components/UiIcon/__tests__/UiIcon.test.ts +10 -0
- package/src/components/UiSelect/UiSelect.stories.ts +98 -0
- package/src/components/UiSelect/UiSelectContent.vue +1 -1
- package/src/components/UiSelect/UiSelectItem.vue +12 -2
- package/src/components/UiSelect/UiSelectTrigger.vue +2 -2
- package/src/components/UiSelect/__tests__/UiSelectContent.test.ts +31 -0
- package/src/components/UiSelect/__tests__/UiSelectItem.test.ts +110 -0
- package/src/components/UiSelect/__tests__/UiSelectTrigger.test.ts +88 -0
- package/src/components/core/select/SelectItem.vue +6 -2
- package/src/components/core/select/SelectTrigger.vue +1 -1
- package/src/theme/BorderRadius.stories.ts +115 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import { defineComponent, h } from 'vue';
|
|
3
|
+
|
|
4
|
+
const ThemePlaceholder = defineComponent({
|
|
5
|
+
name: 'ThemePlaceholder',
|
|
6
|
+
render() {
|
|
7
|
+
return h('div');
|
|
8
|
+
},
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const meta: Meta<typeof ThemePlaceholder> = {
|
|
12
|
+
title: 'CSS utility/Border radius',
|
|
13
|
+
component: ThemePlaceholder,
|
|
14
|
+
tags: ['autodocs'],
|
|
15
|
+
parameters: {
|
|
16
|
+
layout: 'fullscreen',
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof ThemePlaceholder>;
|
|
22
|
+
|
|
23
|
+
const copyScript = `
|
|
24
|
+
function copyToClipboard(text, el) {
|
|
25
|
+
navigator.clipboard.writeText(text).then(() => {
|
|
26
|
+
el.classList.add('copied');
|
|
27
|
+
setTimeout(() => el.classList.remove('copied'), 1500);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Border radius utilities generated from `aa.corner-radius` in `tokens.json`.
|
|
34
|
+
* Use `rounded-xs` … `rounded-4xl` and `rounded-full` instead of raw radius values.
|
|
35
|
+
*/
|
|
36
|
+
export const RadiusScale: Story = {
|
|
37
|
+
render: () => ({
|
|
38
|
+
template: `
|
|
39
|
+
<div class="p-8 bg-background-surface-secondary min-h-screen">
|
|
40
|
+
<style>
|
|
41
|
+
.copy-btn { cursor: pointer; transition: all 0.15s; }
|
|
42
|
+
.copy-btn:hover { background: rgba(0,0,0,0.05); }
|
|
43
|
+
.copy-btn.copied { background: #22c55e22; }
|
|
44
|
+
.copy-btn.copied::after { content: ' ✓'; color: #22c55e; }
|
|
45
|
+
</style>
|
|
46
|
+
<script>${copyScript}</script>
|
|
47
|
+
|
|
48
|
+
<div class="mb-8 max-w-3xl">
|
|
49
|
+
<h2 class="heading-s text-content-on-surface-primary mb-1">Border radius</h2>
|
|
50
|
+
<p class="body-14-regular text-content-on-surface-muted">
|
|
51
|
+
Token-backed radius utilities from <code class="label-12-medium">aa.corner-radius</code>.
|
|
52
|
+
Click a class name to copy.
|
|
53
|
+
</p>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-6">
|
|
57
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
58
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-none"></div>
|
|
59
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-none', this)">rounded-none</code>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
63
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-xs"></div>
|
|
64
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-xs', this)">rounded-xs</code>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
68
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-sm"></div>
|
|
69
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-sm', this)">rounded-sm</code>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
73
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded"></div>
|
|
74
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded', this)">rounded</code>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
78
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-md"></div>
|
|
79
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-md', this)">rounded-md</code>
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
83
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-lg"></div>
|
|
84
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-lg', this)">rounded-lg</code>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
88
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-xl"></div>
|
|
89
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-xl', this)">rounded-xl</code>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
93
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-2xl"></div>
|
|
94
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-2xl', this)">rounded-2xl</code>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
98
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-3xl"></div>
|
|
99
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-3xl', this)">rounded-3xl</code>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
103
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-4xl"></div>
|
|
104
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-4xl', this)">rounded-4xl</code>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div class="rounded-lg bg-background-surface-primary shadow-sm p-4">
|
|
108
|
+
<div class="mx-auto h-40 w-32 bg-background-accent-soft border border-border-surface-default rounded-full"></div>
|
|
109
|
+
<code class="copy-btn label-12-regular text-content-on-surface-muted block mt-3" onclick="copyToClipboard('rounded-full', this)">rounded-full</code>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
`,
|
|
114
|
+
}),
|
|
115
|
+
};
|