@youcan/celeste 0.6.75 → 0.6.80
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 +655 -645
- package/dist/cjs/alert.js +2 -2
- package/dist/cjs/checkbox-card.js +2 -2
- package/dist/cjs/checkbox-label.js +2 -2
- package/dist/cjs/chunks/checkbox.js +1 -1
- package/dist/cjs/chunks/content-divider.vue_vue_type_style_index_0_lang.js +5 -5
- package/dist/cjs/chunks/counter-input.js +1 -1
- package/dist/cjs/chunks/radio-group-item.js +1 -1
- package/dist/cjs/chunks/radio-group.js +1 -1
- package/dist/cjs/chunks/select.js +1 -1
- package/dist/cjs/chunks/sidebar-menu-badge.js +1 -1
- package/dist/cjs/chunks/sidebar-provider.vue_vue_type_style_index_0_lang.js +1 -1
- package/dist/cjs/chunks/sidebar-separator.vue_vue_type_style_index_0_lang.js +9 -1
- package/dist/cjs/chunks/slider.js +1 -1
- package/dist/cjs/chunks/switch.js +1 -1
- package/dist/cjs/chunks/table-header.js +20 -0
- package/dist/cjs/chunks/tooltip-root.js +1 -1
- package/dist/cjs/chunks/tooltip.js +1 -1
- package/dist/cjs/color-area.js +2 -2
- package/dist/cjs/color-picker.js +4 -4
- package/dist/cjs/color-swatch.js +3 -3
- package/dist/cjs/dropdown-menu-content.js +2 -2
- package/dist/cjs/dropdown-menu-item.js +2 -2
- package/dist/cjs/dropdown-menu-label.js +2 -2
- package/dist/cjs/dropdown-menu-separator.js +2 -2
- package/dist/cjs/dropdown-menu-sub-content.js +2 -2
- package/dist/cjs/dropdown-menu-sub-trigger.js +2 -2
- package/dist/cjs/dropdown-menu.js +2 -2
- package/dist/cjs/extra-settings.js +1 -1
- package/dist/cjs/file-upload-area.js +2 -2
- package/dist/cjs/hue-slider.js +1 -1
- package/dist/cjs/index.js +27 -0
- package/dist/cjs/label.js +3 -3
- package/dist/cjs/link-bubble.js +17 -5
- package/dist/cjs/modal-content.js +2 -2
- package/dist/cjs/modal-header.js +2 -2
- package/dist/cjs/popover-content.js +3 -3
- package/dist/cjs/progress-bar.js +3 -3
- package/dist/cjs/progress-circle.js +3 -3
- package/dist/cjs/radio-group-card.js +2 -2
- package/dist/cjs/radio-group-label.js +2 -2
- package/dist/cjs/rich-editor.js +9 -9
- package/dist/cjs/scroll-area.js +3 -3
- package/dist/cjs/scroll-bar.js +3 -3
- package/dist/cjs/segmented-control-item.js +2 -2
- package/dist/cjs/segmented-control.js +2 -2
- package/dist/cjs/select-content.js +2 -2
- package/dist/cjs/select-icon.js +2 -2
- package/dist/cjs/select-item.js +2 -2
- package/dist/cjs/select-label.js +2 -2
- package/dist/cjs/select-separator.js +2 -2
- package/dist/cjs/select-trigger.js +2 -2
- package/dist/cjs/select-value.js +2 -2
- package/dist/cjs/sheet-content.js +2 -2
- package/dist/cjs/sidebar-trigger.js +2 -2
- package/dist/cjs/tab-menu-content.js +2 -2
- package/dist/cjs/tab-menu-item.js +2 -2
- package/dist/cjs/tab-menu-list.js +2 -2
- package/dist/cjs/table-cell.js +1 -0
- package/dist/cjs/table-empty.js +2 -1
- package/dist/cjs/table-header.js +2 -19
- package/dist/cjs/table-row.js +3 -2
- package/dist/cjs/text-input-affix.js +2 -2
- package/dist/cjs/text-input-button.js +2 -2
- package/dist/cjs/text-input.js +2 -2
- package/dist/cjs/tooltip-content.js +3 -3
- package/dist/components/index.d.ts +1 -0
- package/dist/es/alert.js +2 -2
- package/dist/es/checkbox-card.js +2 -2
- package/dist/es/checkbox-label.js +2 -2
- package/dist/es/chunks/checkbox.js +1 -1
- package/dist/es/chunks/content-divider.vue_vue_type_style_index_0_lang.js +5 -5
- package/dist/es/chunks/counter-input.js +1 -1
- package/dist/es/chunks/radio-group-item.js +1 -1
- package/dist/es/chunks/radio-group.js +1 -1
- package/dist/es/chunks/select.js +1 -1
- package/dist/es/chunks/sidebar-menu-badge.js +1 -1
- package/dist/es/chunks/sidebar-provider.vue_vue_type_style_index_0_lang.js +1 -1
- package/dist/es/chunks/sidebar-separator.vue_vue_type_style_index_0_lang.js +9 -1
- package/dist/es/chunks/slider.js +1 -1
- package/dist/es/chunks/switch.js +1 -1
- package/dist/es/chunks/table-header.js +21 -0
- package/dist/es/chunks/tooltip-root.js +1 -1
- package/dist/es/chunks/tooltip.js +1 -1
- package/dist/es/color-area.js +2 -2
- package/dist/es/color-picker.js +4 -4
- package/dist/es/color-swatch.js +3 -3
- package/dist/es/dropdown-menu-content.js +2 -2
- package/dist/es/dropdown-menu-item.js +2 -2
- package/dist/es/dropdown-menu-label.js +2 -2
- package/dist/es/dropdown-menu-separator.js +2 -2
- package/dist/es/dropdown-menu-sub-content.js +2 -2
- package/dist/es/dropdown-menu-sub-trigger.js +2 -2
- package/dist/es/dropdown-menu.js +2 -2
- package/dist/es/extra-settings.js +1 -1
- package/dist/es/file-upload-area.js +2 -2
- package/dist/es/hue-slider.js +1 -1
- package/dist/es/index.js +39 -12
- package/dist/es/label.js +3 -3
- package/dist/es/link-bubble.js +18 -6
- package/dist/es/modal-content.js +2 -2
- package/dist/es/modal-header.js +2 -2
- package/dist/es/popover-content.js +3 -3
- package/dist/es/progress-bar.js +3 -3
- package/dist/es/progress-circle.js +3 -3
- package/dist/es/radio-group-card.js +2 -2
- package/dist/es/radio-group-label.js +2 -2
- package/dist/es/rich-editor.js +3 -3
- package/dist/es/scroll-area.js +3 -3
- package/dist/es/scroll-bar.js +3 -3
- package/dist/es/segmented-control-item.js +2 -2
- package/dist/es/segmented-control.js +2 -2
- package/dist/es/select-content.js +2 -2
- package/dist/es/select-icon.js +2 -2
- package/dist/es/select-item.js +2 -2
- package/dist/es/select-label.js +2 -2
- package/dist/es/select-separator.js +2 -2
- package/dist/es/select-trigger.js +2 -2
- package/dist/es/select-value.js +2 -2
- package/dist/es/sheet-content.js +2 -2
- package/dist/es/sidebar-trigger.js +2 -2
- package/dist/es/tab-menu-content.js +2 -2
- package/dist/es/tab-menu-item.js +2 -2
- package/dist/es/tab-menu-list.js +2 -2
- package/dist/es/table-cell.js +1 -0
- package/dist/es/table-empty.js +4 -3
- package/dist/es/table-header.js +1 -18
- package/dist/es/table-row.js +3 -2
- package/dist/es/text-input-affix.js +2 -2
- package/dist/es/text-input-button.js +2 -2
- package/dist/es/text-input.js +2 -2
- package/dist/es/tooltip-content.js +3 -3
- package/package.json +24 -22
- package/src/components/alert/alert.vue +1 -1
- package/src/components/checkbox/checkbox-card.vue +1 -1
- package/src/components/checkbox/checkbox-label.vue +1 -1
- package/src/components/checkbox/checkbox.vue +1 -1
- package/src/components/collapsible/stories/collapsible.stories.ts +1 -1
- package/src/components/color-picker/alpha-slider.vue +1 -1
- package/src/components/color-picker/color-area.vue +1 -1
- package/src/components/color-picker/color-picker.vue +2 -2
- package/src/components/color-picker/color-swatch.vue +1 -1
- package/src/components/color-picker/hue-slider.vue +1 -1
- package/src/components/content-divider/content-divider.vue +7 -7
- package/src/components/counter-input/counter-input.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu-content.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu-item.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu-label.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu-separator.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu-sub-content.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu-sub-trigger.vue +1 -1
- package/src/components/dropdown-menu/dropdown-menu.vue +1 -1
- package/src/components/file-upload/file-upload-area.vue +1 -1
- package/src/components/file-upload/stories/file-upload-area.stories.ts +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/label/label.vue +2 -2
- package/src/components/modal/modal-content.vue +1 -1
- package/src/components/modal/modal-header.vue +1 -1
- package/src/components/pagination/stories/pagination.stories.ts +1 -1
- package/src/components/popover/popover-content.vue +2 -2
- package/src/components/popover/stories/popover.stories.ts +1 -1
- package/src/components/progress/progress-bar.vue +1 -1
- package/src/components/progress/progress-circle.vue +1 -1
- package/src/components/radio-group/radio-group-card.vue +1 -1
- package/src/components/radio-group/radio-group-item.vue +1 -1
- package/src/components/radio-group/radio-group-label.vue +1 -1
- package/src/components/radio-group/radio-group.vue +1 -1
- package/src/components/radio-group/stories/radio-group-card.stories.ts +1 -1
- package/src/components/rich-editor/extra-settings.vue +1 -1
- package/src/components/rich-editor/link-bubble.vue +33 -7
- package/src/components/rich-editor/rich-editor.vue +7 -7
- package/src/components/rich-editor/stories/rich-editor.stories.ts +23 -1
- package/src/components/scroll-area/scroll-area.vue +1 -1
- package/src/components/scroll-area/scroll-bar.vue +1 -1
- package/src/components/segmented-control/segmented-control-item.vue +1 -1
- package/src/components/segmented-control/segmented-control.vue +1 -1
- package/src/components/select/select-content.vue +1 -1
- package/src/components/select/select-icon.vue +1 -1
- package/src/components/select/select-item.vue +1 -1
- package/src/components/select/select-label.vue +1 -1
- package/src/components/select/select-separator.vue +1 -1
- package/src/components/select/select-trigger.vue +1 -1
- package/src/components/select/select-value.vue +1 -1
- package/src/components/select/select.vue +1 -1
- package/src/components/sheet/sheet-content.vue +1 -1
- package/src/components/sidebar/sidebar-menu-badge.vue +1 -1
- package/src/components/sidebar/sidebar-provider.vue +1 -1
- package/src/components/sidebar/sidebar-separator.vue +1 -1
- package/src/components/sidebar/sidebar-trigger.vue +1 -1
- package/src/components/sidebar/sidebar.vue +1 -1
- package/src/components/sidebar/stories/sidebar.stories.ts +1 -1
- package/src/components/slider/slider.vue +1 -1
- package/src/components/switch/switch.vue +1 -1
- package/src/components/tab-menu/tab-menu-content.vue +1 -1
- package/src/components/tab-menu/tab-menu-item.vue +1 -1
- package/src/components/tab-menu/tab-menu-list.vue +1 -1
- package/src/components/table/table-empty.vue +1 -1
- package/src/components/text-input/stories/text-input.stories.ts +1 -1
- package/src/components/text-input/text-input-affix.vue +1 -1
- package/src/components/text-input/text-input-button.vue +1 -1
- package/src/components/text-input/text-input.vue +1 -1
- package/src/components/tooltip/tooltip-content.vue +2 -2
- package/src/components/tooltip/tooltip-root.vue +1 -1
- package/src/components/tooltip/tooltip.vue +1 -1
- package/src/utils/sonner.ts +1 -1
- package/LICENSE +0 -9
- /package/dist/cjs/chunks/{rich-editor.vue_vue_type_style_index_0_scoped_dbc85b1a_lang.js → rich-editor.vue_vue_type_style_index_0_scoped_4e1c9896_lang.js} +0 -0
- /package/dist/es/chunks/{rich-editor.vue_vue_type_style_index_0_scoped_dbc85b1a_lang.js → rich-editor.vue_vue_type_style_index_0_scoped_4e1c9896_lang.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Editor } from '@tiptap/vue-3';
|
|
3
|
+
import { computed, defineAsyncComponent, nextTick, onMounted, onUnmounted, ref } from 'vue';
|
|
3
4
|
import Button from '@/components/button/button.vue';
|
|
4
5
|
import CompactButton from '@/components/button/compact-button.vue';
|
|
5
6
|
import LinkButton from '@/components/button/link-button.vue';
|
|
@@ -7,7 +8,6 @@ import Label from '@/components/label/label.vue';
|
|
|
7
8
|
import Switch from '@/components/switch/switch.vue';
|
|
8
9
|
import TextInputAffix from '@/components/text-input/text-input-affix.vue';
|
|
9
10
|
import TextInput from '@/components/text-input/text-input.vue';
|
|
10
|
-
import { computed, defineAsyncComponent, onMounted, onUnmounted, ref } from 'vue';
|
|
11
11
|
|
|
12
12
|
const props = defineProps<{
|
|
13
13
|
editor: Editor;
|
|
@@ -37,6 +37,11 @@ function startEdit() {
|
|
|
37
37
|
const attrs = props.editor.getAttributes('link');
|
|
38
38
|
href.value = attrs.href || '';
|
|
39
39
|
openInNewTab.value = attrs.target === '_blank';
|
|
40
|
+
|
|
41
|
+
nextTick(() => {
|
|
42
|
+
const transaction = props.editor.state.tr.setMeta('bubbleMenu', 'updatePosition');
|
|
43
|
+
props.editor.view.dispatch(transaction);
|
|
44
|
+
});
|
|
40
45
|
}
|
|
41
46
|
|
|
42
47
|
function removeLink() {
|
|
@@ -158,10 +163,18 @@ onUnmounted(() => {
|
|
|
158
163
|
:should-show="() => true"
|
|
159
164
|
:editor="editor"
|
|
160
165
|
:options="{
|
|
166
|
+
strategy: 'fixed',
|
|
161
167
|
placement: 'bottom',
|
|
162
|
-
offset:
|
|
163
|
-
|
|
164
|
-
|
|
168
|
+
offset: 12,
|
|
169
|
+
flip: {
|
|
170
|
+
padding: 20,
|
|
171
|
+
mainAxis: true,
|
|
172
|
+
crossAxis: true,
|
|
173
|
+
},
|
|
174
|
+
shift: {
|
|
175
|
+
padding: 20,
|
|
176
|
+
mainAxis: true,
|
|
177
|
+
crossAxis: true,
|
|
165
178
|
},
|
|
166
179
|
}"
|
|
167
180
|
>
|
|
@@ -177,7 +190,7 @@ onUnmounted(() => {
|
|
|
177
190
|
v-model="href"
|
|
178
191
|
type="url"
|
|
179
192
|
size="xs"
|
|
180
|
-
placeholder="
|
|
193
|
+
placeholder="https://example.com"
|
|
181
194
|
class="link-input"
|
|
182
195
|
@keydown.enter="applyLink"
|
|
183
196
|
@keydown.esc="reset"
|
|
@@ -236,8 +249,7 @@ onUnmounted(() => {
|
|
|
236
249
|
|
|
237
250
|
<style scoped lang="scss">
|
|
238
251
|
.link-bubble {
|
|
239
|
-
|
|
240
|
-
z-index: 1000;
|
|
252
|
+
max-width: calc(100vw - 40px);
|
|
241
253
|
padding: var(--spacing-12);
|
|
242
254
|
border: 1px solid var(--color-stroke-soft-200);
|
|
243
255
|
border-radius: var(--radius-12);
|
|
@@ -252,10 +264,24 @@ onUnmounted(() => {
|
|
|
252
264
|
.set-link {
|
|
253
265
|
display: flex;
|
|
254
266
|
gap: var(--spacing-8);
|
|
267
|
+
|
|
268
|
+
.link-input {
|
|
269
|
+
flex: 1;
|
|
270
|
+
min-width: 140px;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
button {
|
|
274
|
+
flex-shrink: 0;
|
|
275
|
+
white-space: nowrap;
|
|
276
|
+
}
|
|
255
277
|
}
|
|
256
278
|
|
|
257
279
|
:deep(.celeste-switch[aria-checked='true']) {
|
|
258
280
|
background-color: var(--color-neutral-700);
|
|
281
|
+
|
|
282
|
+
.celeste-switch-thumb::before {
|
|
283
|
+
background-color: currentcolor;
|
|
284
|
+
}
|
|
259
285
|
}
|
|
260
286
|
|
|
261
287
|
.switch-button-box {
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { ToolbarItem } from './types';
|
|
3
|
+
import Link from '@tiptap/extension-link';
|
|
4
|
+
import TextAlign from '@tiptap/extension-text-align';
|
|
5
|
+
import { TextStyleKit } from '@tiptap/extension-text-style';
|
|
6
|
+
import { CharacterCount, Placeholder } from '@tiptap/extensions';
|
|
7
|
+
import StarterKit from '@tiptap/starter-kit';
|
|
8
|
+
import { Editor, EditorContent } from '@tiptap/vue-3';
|
|
9
|
+
import { computed, onBeforeUnmount, onMounted, type PropType, ref, watch } from 'vue';
|
|
3
10
|
import CompactButton from '@/components/button/compact-button.vue';
|
|
4
11
|
import SelectContent from '@/components/select/select-content.vue';
|
|
5
12
|
import SelectIcon from '@/components/select/select-icon.vue';
|
|
@@ -8,13 +15,6 @@ import SelectTrigger from '@/components/select/select-trigger.vue';
|
|
|
8
15
|
import SelectValue from '@/components/select/select-value.vue';
|
|
9
16
|
import Select from '@/components/select/select.vue';
|
|
10
17
|
import Tooltip from '@/components/tooltip/tooltip.vue';
|
|
11
|
-
import Link from '@tiptap/extension-link';
|
|
12
|
-
import TextAlign from '@tiptap/extension-text-align';
|
|
13
|
-
import { TextStyleKit } from '@tiptap/extension-text-style';
|
|
14
|
-
import { CharacterCount, Placeholder } from '@tiptap/extensions';
|
|
15
|
-
import StarterKit from '@tiptap/starter-kit';
|
|
16
|
-
import { Editor, EditorContent } from '@tiptap/vue-3';
|
|
17
|
-
import { computed, onBeforeUnmount, onMounted, type PropType, ref, watch } from 'vue';
|
|
18
18
|
import { fullToolbar, onActionClick, selectedOption } from './config';
|
|
19
19
|
import ExtraSettings from './extra-settings.vue';
|
|
20
20
|
import LinkBubble from './link-bubble.vue';
|
|
@@ -52,7 +52,7 @@ export const Default: Story = {
|
|
|
52
52
|
return { args };
|
|
53
53
|
},
|
|
54
54
|
template: `
|
|
55
|
-
|
|
55
|
+
<RichEditor v-bind="args" />
|
|
56
56
|
`,
|
|
57
57
|
}),
|
|
58
58
|
};
|
|
@@ -85,3 +85,25 @@ export const CustomToolbar: Story = {
|
|
|
85
85
|
`,
|
|
86
86
|
}),
|
|
87
87
|
};
|
|
88
|
+
|
|
89
|
+
export const SmallEditor: Story = {
|
|
90
|
+
args: {
|
|
91
|
+
modelValue: '',
|
|
92
|
+
customToolbar: [],
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
render: args => ({
|
|
96
|
+
components: { RichEditor },
|
|
97
|
+
setup() {
|
|
98
|
+
return { args };
|
|
99
|
+
},
|
|
100
|
+
template: `
|
|
101
|
+
<div style="display: flex;">
|
|
102
|
+
<div style="flex-basis: 80%"></div>
|
|
103
|
+
<div style="flex-basis: 20%">
|
|
104
|
+
<RichEditor v-bind="args" />
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
`,
|
|
108
|
+
}),
|
|
109
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import {
|
|
6
5
|
ScrollAreaCorner,
|
|
@@ -8,6 +7,7 @@ import {
|
|
|
8
7
|
type ScrollAreaRootProps,
|
|
9
8
|
ScrollAreaViewport,
|
|
10
9
|
} from 'radix-vue';
|
|
10
|
+
import { useDelegatedProps } from '@/composables';
|
|
11
11
|
import ScrollBar from './scroll-bar.vue';
|
|
12
12
|
|
|
13
13
|
const props = defineProps<ScrollAreaRootProps & { class?: HTMLAttributes['class'] }>();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables';
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(defineProps<ScrollAreaScrollbarProps & { class?: HTMLAttributes['class'] }>(), {
|
|
8
8
|
orientation: 'vertical',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { ToggleGroupItem as SegmentedControlItem, type ToggleGroupItemProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<ToggleGroupItemProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const delegatedProps = useDelegatedProps(props, 'class');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { ToggleGroupRoot as SegmentedControlRoot, type ToggleGroupRootEmits, type ToggleGroupRootProps, useForwardPropsEmits } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<Omit<ToggleGroupRootProps, 'type'> & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const emits = defineEmits<ToggleGroupRootEmits>();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SelectContent, type SelectContentEmits, type SelectContentProps, SelectPortal, SelectViewport, useForwardPropsEmits } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(defineProps<SelectContentProps & {
|
|
8
8
|
class?: HTMLAttributes['class'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
4
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{ class?: HTMLAttributes['class'] }>();
|
|
7
7
|
const delegatedProps = useDelegatedProps(props, 'class');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SelectItem, SelectItemIndicator, type SelectItemProps, SelectItemText } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<SelectItemProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const delegatedProps = useDelegatedProps(props, 'class');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SelectLabel, type SelectLabelProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<SelectLabelProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const delegatedProps = useDelegatedProps(props, 'class');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SelectSeparator, type SelectSeparatorProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<SelectSeparatorProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const delegatedProps = useDelegatedProps(props, 'class');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SelectIcon, SelectTrigger, type SelectTriggerProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(defineProps<SelectTriggerProps & {
|
|
8
8
|
class?: HTMLAttributes['class'];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SelectValue, type SelectValueProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<SelectValueProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const delegatedProps = useDelegatedProps(props, 'class');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SelectRoot, type SelectRootEmits, type SelectRootProps, useForwardPropsEmits } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<SelectRootProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const emits = defineEmits<SelectRootEmits>();
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { DialogContentEmits, DialogContentProps } from 'radix-vue';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
|
-
import CompactButton from '@/components/button/compact-button.vue';
|
|
5
4
|
import { reactiveOmit } from '@vueuse/core';
|
|
6
5
|
import clsx from 'clsx';
|
|
7
6
|
import {
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
DialogPortal,
|
|
12
11
|
useForwardPropsEmits,
|
|
13
12
|
} from 'radix-vue';
|
|
13
|
+
import CompactButton from '@/components/button/compact-button.vue';
|
|
14
14
|
|
|
15
15
|
defineOptions({
|
|
16
16
|
inheritAttrs: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import Badge from '@/components/badge/badge.vue';
|
|
4
3
|
import clsx from 'clsx';
|
|
4
|
+
import Badge from '@/components/badge/badge.vue';
|
|
5
5
|
|
|
6
6
|
const props = withDefaults(defineProps<SidebarMenuBadgeProps>(), {
|
|
7
7
|
variant: 'lighter',
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes, Ref } from 'vue';
|
|
3
|
-
import { provideSidebarContext, SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON } from '@/composables/use-sidebar';
|
|
4
3
|
import { defaultDocument, useEventListener, useMediaQuery, useVModel } from '@vueuse/core';
|
|
5
4
|
import clsx from 'clsx';
|
|
6
5
|
import { computed, ref } from 'vue';
|
|
6
|
+
import { provideSidebarContext, SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME, SIDEBAR_KEYBOARD_SHORTCUT, SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON } from '@/composables/use-sidebar';
|
|
7
7
|
|
|
8
8
|
const props = withDefaults(defineProps<{
|
|
9
9
|
defaultOpen?: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import CompactButton from '@/components/button/compact-button.vue';
|
|
4
5
|
import { useSidebar } from '@/composables/use-sidebar';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<{
|
|
8
8
|
class?: HTMLAttributes['class'];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import { Sheet, SheetContent } from '@/components/sheet';
|
|
4
5
|
import { SIDEBAR_WIDTH_MOBILE, useSidebar } from '@/composables/use-sidebar';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
6
|
|
|
7
7
|
defineOptions({
|
|
8
8
|
inheritAttrs: false,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import { ref } from 'vue';
|
|
2
3
|
import CompactButton from '@/components/button/compact-button.vue';
|
|
3
4
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/collapsible';
|
|
4
5
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/dropdown-menu';
|
|
5
6
|
import SidebarMenuBadge from '@/components/sidebar/sidebar-menu-badge.vue';
|
|
6
|
-
import { ref } from 'vue';
|
|
7
7
|
import { Sidebar, SidebarContent, SidebarElement, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuAction, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarSeparator, SidebarTrigger } from '..';
|
|
8
8
|
|
|
9
9
|
const meta: Meta<typeof Sidebar> = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SliderRange, SliderRoot, type SliderRootEmits, type SliderRootProps, SliderThumb, SliderTrack, useForwardPropsEmits } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<Omit<SliderRootProps, 'orientation'> & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const emits = defineEmits<SliderRootEmits>();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { SwitchRoot, type SwitchRootEmits, type SwitchRootProps, SwitchThumb, useForwardPropsEmits } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<SwitchRootProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const emits = defineEmits<SwitchRootEmits>();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { TabsContent, type TabsContentProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<TabsContentProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { TabsTrigger, type TabsTriggerProps, useForwardProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<TabsTriggerProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
5
4
|
import { TabsList, type TabsListProps } from 'radix-vue';
|
|
5
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
6
6
|
|
|
7
7
|
const props = defineProps<TabsListProps & { class?: HTMLAttributes['class'] }>();
|
|
8
8
|
const delegatedProps = useDelegatedProps(props, 'class');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
import clsx from 'clsx';
|
|
3
4
|
import { TableCell, TableRow } from '@/components/table';
|
|
4
5
|
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
5
|
-
import clsx from 'clsx';
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(
|
|
8
8
|
defineProps<TableEmptyProps>(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import { ref } from 'vue';
|
|
2
3
|
import Button from '@/components/button/button.vue';
|
|
3
4
|
import Combobox from '@/components/combobox/combobox.vue';
|
|
4
|
-
import { ref } from 'vue';
|
|
5
5
|
import TextInputAffix from '../text-input-affix.vue';
|
|
6
6
|
import TextInputButton from '../text-input-button.vue';
|
|
7
7
|
import TextInput from '../text-input.vue';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
3
|
import clsx from 'clsx';
|
|
4
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{
|
|
7
7
|
class?: HTMLAttributes['class'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import clsx from 'clsx';
|
|
2
3
|
import Button, { type ButtonProps } from '@/components/button/button.vue';
|
|
3
4
|
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
5
|
|
|
6
6
|
const props = withDefaults(
|
|
7
7
|
defineProps<Omit</* @vue-ignore */ButtonProps, 'type' | 'size' | 'variant'> & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { uid } from '@/utils/crypto';
|
|
3
2
|
import clsx from 'clsx';
|
|
4
3
|
import { Primitive } from 'radix-vue';
|
|
5
4
|
import { computed, type InputHTMLAttributes } from 'vue';
|
|
5
|
+
import { uid } from '@/utils/crypto';
|
|
6
6
|
import TextInputButton from './text-input-button.vue';
|
|
7
7
|
|
|
8
8
|
const props = withDefaults(defineProps<TextInputProps>(), {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { HTMLAttributes } from 'vue';
|
|
3
|
-
import CompactButton from '@/components/button/compact-button.vue';
|
|
4
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
5
3
|
import clsx from 'clsx';
|
|
6
4
|
import { type TooltipContentProps as PrimitiveProps, TooltipArrow, TooltipContent, type TooltipContentEmits, TooltipPortal, useForwardPropsEmits } from 'radix-vue';
|
|
5
|
+
import CompactButton from '@/components/button/compact-button.vue';
|
|
6
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
7
7
|
|
|
8
8
|
const props = withDefaults(
|
|
9
9
|
defineProps<TooltipContentProps>(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
3
2
|
import { type TooltipRootProps as PrimitiveProps, TooltipRoot, type TooltipRootEmits, useForwardPropsEmits } from 'radix-vue';
|
|
4
3
|
import { ref } from 'vue';
|
|
4
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
5
5
|
|
|
6
6
|
const props = defineProps<TooltipRootProps>();
|
|
7
7
|
const emits = defineEmits<TooltipRootEmits>();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { TooltipContentProps, TooltipRootEmits, TooltipRootProps } from 'radix-vue';
|
|
3
3
|
import type { HTMLAttributes } from 'vue';
|
|
4
|
-
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
5
4
|
import { useForwardPropsEmits } from 'radix-vue';
|
|
6
5
|
import { ref } from 'vue';
|
|
6
|
+
import { useDelegatedProps } from '@/composables/use-delegated-props';
|
|
7
7
|
import { TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger } from '.';
|
|
8
8
|
|
|
9
9
|
const props = withDefaults(defineProps<TooltipProps>(), {
|
package/src/utils/sonner.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { SonnerAlertProps } from '@/components/sonner/sonner-alert.vue';
|
|
2
|
-
import SonnerAlert from '@/components/sonner/sonner-alert.vue';
|
|
3
2
|
import { markRaw } from 'vue';
|
|
4
3
|
import { type ExternalToast, toast as sonner } from 'vue-sonner';
|
|
4
|
+
import SonnerAlert from '@/components/sonner/sonner-alert.vue';
|
|
5
5
|
|
|
6
6
|
export interface ToastOptions extends ExternalToast {
|
|
7
7
|
state?: SonnerAlertProps['state'];
|
package/LICENSE
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2024-present YouCan Inc.
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
7
|
-
The rights granted above may only be exercised to develop and distribute applications that integrate or interoperate with YouCan software or services, and in the case of external, stand-alone applications that do not embed directly inside YouCan, the rights granted above may only be exercised to develop and distribute applications that are dissimilar and visually distinct from YouCan products and services (including the YouCan store admin), as determined by YouCan in its sole discretion.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
File without changes
|