@byyuurin/ui 0.1.0 → 0.3.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 (140) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +5 -3
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +2 -2
  5. package/dist/runtime/components/Accordion.vue +41 -41
  6. package/dist/runtime/components/Accordion.vue.d.ts +11 -7
  7. package/dist/runtime/components/Alert.vue +63 -63
  8. package/dist/runtime/components/Alert.vue.d.ts +4 -4
  9. package/dist/runtime/components/App.vue +11 -10
  10. package/dist/runtime/components/App.vue.d.ts +11 -7
  11. package/dist/runtime/components/Avatar.vue +29 -29
  12. package/dist/runtime/components/Avatar.vue.d.ts +4 -3
  13. package/dist/runtime/components/AvatarGroup.vue +4 -4
  14. package/dist/runtime/components/AvatarGroup.vue.d.ts +1 -1
  15. package/dist/runtime/components/Badge.vue +32 -32
  16. package/dist/runtime/components/Badge.vue.d.ts +2 -2
  17. package/dist/runtime/components/Breadcrumb.vue +49 -49
  18. package/dist/runtime/components/Breadcrumb.vue.d.ts +10 -6
  19. package/dist/runtime/components/Button.vue +52 -51
  20. package/dist/runtime/components/Button.vue.d.ts +1 -1
  21. package/dist/runtime/components/Calendar.vue +75 -77
  22. package/dist/runtime/components/Calendar.vue.d.ts +16 -12
  23. package/dist/runtime/components/Card.vue +41 -41
  24. package/dist/runtime/components/Card.vue.d.ts +1 -1
  25. package/dist/runtime/components/Carousel.vue +85 -66
  26. package/dist/runtime/components/Carousel.vue.d.ts +14 -10
  27. package/dist/runtime/components/Checkbox.vue +46 -46
  28. package/dist/runtime/components/Checkbox.vue.d.ts +4 -3
  29. package/dist/runtime/components/CheckboxGroup.vue +131 -0
  30. package/dist/runtime/components/CheckboxGroup.vue.d.ts +93 -0
  31. package/dist/runtime/components/Chip.vue +15 -15
  32. package/dist/runtime/components/Chip.vue.d.ts +2 -2
  33. package/dist/runtime/components/Collapsible.vue +14 -14
  34. package/dist/runtime/components/Collapsible.vue.d.ts +2 -2
  35. package/dist/runtime/components/Drawer.vue +76 -76
  36. package/dist/runtime/components/Drawer.vue.d.ts +6 -6
  37. package/dist/runtime/components/DropdownMenu.vue +28 -28
  38. package/dist/runtime/components/DropdownMenu.vue.d.ts +17 -9
  39. package/dist/runtime/components/DropdownMenuContent.vue +152 -153
  40. package/dist/runtime/components/DropdownMenuContent.vue.d.ts +11 -7
  41. package/dist/runtime/components/FieldGroup.vue +3 -3
  42. package/dist/runtime/components/FieldGroup.vue.d.ts +2 -2
  43. package/dist/runtime/components/Form.vue +9 -9
  44. package/dist/runtime/components/Form.vue.d.ts +13 -8
  45. package/dist/runtime/components/FormField.vue +39 -38
  46. package/dist/runtime/components/FormField.vue.d.ts +7 -2
  47. package/dist/runtime/components/Icon.vue +2 -2
  48. package/dist/runtime/components/Icon.vue.d.ts +1 -1
  49. package/dist/runtime/components/Input.vue +48 -48
  50. package/dist/runtime/components/Input.vue.d.ts +16 -12
  51. package/dist/runtime/components/InputNumber.vue +48 -50
  52. package/dist/runtime/components/InputNumber.vue.d.ts +128 -129
  53. package/dist/runtime/components/InputTags.vue +156 -0
  54. package/dist/runtime/components/InputTags.vue.d.ts +90 -0
  55. package/dist/runtime/components/Kbd.vue +3 -3
  56. package/dist/runtime/components/Kbd.vue.d.ts +2 -2
  57. package/dist/runtime/components/Link.vue +26 -25
  58. package/dist/runtime/components/Link.vue.d.ts +16 -6
  59. package/dist/runtime/components/LinkBase.vue +3 -3
  60. package/dist/runtime/components/LinkBase.vue.d.ts +2 -2
  61. package/dist/runtime/components/Marquee.vue +38 -0
  62. package/dist/runtime/components/Marquee.vue.d.ts +54 -0
  63. package/dist/runtime/components/Modal.vue +74 -74
  64. package/dist/runtime/components/Modal.vue.d.ts +6 -6
  65. package/dist/runtime/components/NavigationMenu.vue +243 -234
  66. package/dist/runtime/components/NavigationMenu.vue.d.ts +53 -14
  67. package/dist/runtime/components/OverlayProvider.vue +9 -9
  68. package/dist/runtime/components/Pagination.vue +47 -47
  69. package/dist/runtime/components/Pagination.vue.d.ts +4 -4
  70. package/dist/runtime/components/PinInput.vue +23 -23
  71. package/dist/runtime/components/PinInput.vue.d.ts +14 -10
  72. package/dist/runtime/components/Popover.vue +22 -22
  73. package/dist/runtime/components/Popover.vue.d.ts +11 -7
  74. package/dist/runtime/components/Progress.vue +25 -25
  75. package/dist/runtime/components/Progress.vue.d.ts +2 -2
  76. package/dist/runtime/components/RadioGroup.vue +50 -50
  77. package/dist/runtime/components/RadioGroup.vue.d.ts +13 -9
  78. package/dist/runtime/components/ScrollArea.vue +32 -32
  79. package/dist/runtime/components/ScrollArea.vue.d.ts +2 -2
  80. package/dist/runtime/components/Select.vue +299 -148
  81. package/dist/runtime/components/Select.vue.d.ts +103 -123
  82. package/dist/runtime/components/Separator.vue +30 -30
  83. package/dist/runtime/components/Separator.vue.d.ts +2 -2
  84. package/dist/runtime/components/Skeleton.vue +11 -11
  85. package/dist/runtime/components/Skeleton.vue.d.ts +2 -2
  86. package/dist/runtime/components/Slider.vue +25 -25
  87. package/dist/runtime/components/Slider.vue.d.ts +11 -7
  88. package/dist/runtime/components/Stepper.vue +116 -0
  89. package/dist/runtime/components/Stepper.vue.d.ts +83 -0
  90. package/dist/runtime/components/Switch.vue +30 -30
  91. package/dist/runtime/components/Switch.vue.d.ts +4 -3
  92. package/dist/runtime/components/Table.vue +188 -166
  93. package/dist/runtime/components/Table.vue.d.ts +27 -22
  94. package/dist/runtime/components/Tabs.vue +74 -74
  95. package/dist/runtime/components/Tabs.vue.d.ts +12 -8
  96. package/dist/runtime/components/Textarea.vue +47 -47
  97. package/dist/runtime/components/Textarea.vue.d.ts +16 -11
  98. package/dist/runtime/components/Timeline.vue +102 -0
  99. package/dist/runtime/components/Timeline.vue.d.ts +78 -0
  100. package/dist/runtime/components/Toast.vue +93 -93
  101. package/dist/runtime/components/Toast.vue.d.ts +5 -5
  102. package/dist/runtime/components/ToastProvider.vue +29 -29
  103. package/dist/runtime/components/ToastProvider.vue.d.ts +3 -3
  104. package/dist/runtime/components/Tooltip.vue +24 -25
  105. package/dist/runtime/components/Tooltip.vue.d.ts +2 -2
  106. package/dist/runtime/components/Tree.vue +241 -0
  107. package/dist/runtime/components/Tree.vue.d.ts +121 -0
  108. package/dist/runtime/composables/defineShortcuts.d.ts +1 -0
  109. package/dist/runtime/composables/defineShortcuts.js +44 -8
  110. package/dist/runtime/composables/useLocale.d.ts +12 -0
  111. package/dist/runtime/locale/en.d.ts +6 -0
  112. package/dist/runtime/locale/en.js +6 -0
  113. package/dist/runtime/locale/zh_tw.d.ts +6 -0
  114. package/dist/runtime/locale/zh_tw.js +6 -0
  115. package/dist/runtime/types/html.d.ts +8 -0
  116. package/dist/runtime/types/html.js +0 -0
  117. package/dist/runtime/types/index.d.ts +7 -0
  118. package/dist/runtime/types/index.js +7 -0
  119. package/dist/runtime/types/input.d.ts +5 -5
  120. package/dist/runtime/types/locale.d.ts +6 -0
  121. package/dist/runtime/types/unocss.d.ts +4 -4
  122. package/dist/runtime/types/utils.d.ts +9 -6
  123. package/dist/runtime/utils/index.d.ts +3 -3
  124. package/dist/runtime/utils/link.d.ts +2 -1
  125. package/dist/runtime/utils/link.js +40 -29
  126. package/dist/runtime/vue/components/Icon.vue +2 -2
  127. package/dist/runtime/vue/components/Icon.vue.d.ts +1 -1
  128. package/dist/runtime/vue/components/Link.vue +7 -12
  129. package/dist/runtime/vue/components/Link.vue.d.ts +11 -40
  130. package/dist/setup.d.mts +1 -1
  131. package/dist/shared/{ui.CzIlLITK.mjs → ui.9kQouwss.mjs} +5 -3
  132. package/dist/shared/{ui.DpbffTXs.d.mts → ui.D8Bg1HWt.d.mts} +2 -0
  133. package/dist/shared/{ui.DSyJHSTk.mjs → ui.DpkP12cX.mjs} +784 -84
  134. package/dist/unocss.mjs +1 -1
  135. package/dist/unplugin.d.mts +1 -1
  136. package/dist/unplugin.mjs +2 -2
  137. package/dist/vite.d.mts +1 -1
  138. package/dist/vite.mjs +2 -2
  139. package/package.json +29 -29
  140. package/vue-plugin.d.ts +5 -5
@@ -57,78 +57,78 @@ const ui = computed(() => {
57
57
  </script>
58
58
 
59
59
  <template>
60
- <DialogRoot v-slot="{ open, close }" v-bind="rootProps">
61
- <DialogTrigger v-if="!!slots.default" as-child :class="props.class">
62
- <slot :open="open"></slot>
63
- </DialogTrigger>
64
-
65
- <DialogPortal v-bind="portalProps">
66
- <DialogOverlay v-if="props.overlay" :class="ui.overlay({ class: props.ui?.overlay })" data-part="overlay" />
67
-
68
- <DialogContent
69
- :class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
70
- v-bind="contentProps"
71
- data-part="content"
72
- @after-enter="emit('after-enter')"
73
- @after-leave="emit('after-leave')"
74
- v-on="contentEvents"
75
- >
76
- <VisuallyHidden v-if="!!slots.content || !!slots.header || !props.title && !slots.title">
77
- <DialogTitle />
78
- </VisuallyHidden>
79
-
80
- <slot name="content" :close="close">
81
- <div
82
- v-if="slots.header || props.title || slots.title || props.description || slots.description || props.close || slots.close"
83
- :class="ui.header({ class: props.ui?.header })"
84
- data-part="header"
85
- >
86
- <slot name="header" :close="close">
87
- <DialogTitle
88
- v-if="props.title || slots.title"
89
- :class="ui.title({ class: props.ui?.title })"
90
- data-part="title"
91
- >
92
- <slot name="title">
93
- {{ props.title }}
94
- </slot>
95
- </DialogTitle>
96
-
97
- <DialogClose v-if="props.close || slots.close" as-child>
98
- <slot name="close" :close="close" :ui="ui">
99
- <Button
100
- variant="ghost"
101
- color="neutral"
102
- :icon="props.closeIcon || appConfig.ui.icons.close"
103
- v-bind="typeof props.close === 'boolean' ? {} : props.close"
104
- :aria-label="t('modal.close')"
105
- :class="ui.close({ class: props.ui?.close })"
106
- data-part="close"
107
- />
108
- </slot>
109
- </DialogClose>
110
-
111
- <DialogDescription
112
- v-if="props.description || slots.description"
113
- :class="ui.description({ class: props.ui?.description })"
114
- data-part="description"
115
- >
116
- <slot name="description">
117
- {{ props.description }}
118
- </slot>
119
- </DialogDescription>
120
- </slot>
121
- </div>
122
-
123
- <div v-if="slots.body" :class="ui.body({ class: props.ui?.body })" data-part="body">
124
- <slot name="body" :close="close"></slot>
125
- </div>
126
-
127
- <div v-if="slots.footer" :class="ui.footer({ class: props.ui?.footer })" data-part="footer">
128
- <slot name="footer" :close="close"></slot>
129
- </div>
130
- </slot>
131
- </DialogContent>
132
- </DialogPortal>
133
- </DialogRoot>
60
+ <DialogRoot v-slot="{ open, close }" v-bind="rootProps">
61
+ <DialogTrigger v-if="!!slots.default" as-child :class="props.class">
62
+ <slot :open="open"></slot>
63
+ </DialogTrigger>
64
+
65
+ <DialogPortal v-bind="portalProps">
66
+ <DialogOverlay v-if="props.overlay" :class="ui.overlay({ class: props.ui?.overlay })" data-part="overlay" />
67
+
68
+ <DialogContent
69
+ :class="ui.content({ class: [props.ui?.content, !slots.default && props.class] })"
70
+ v-bind="contentProps"
71
+ data-part="content"
72
+ @after-enter="emit('after-enter')"
73
+ @after-leave="emit('after-leave')"
74
+ v-on="contentEvents"
75
+ >
76
+ <VisuallyHidden v-if="!!slots.content || !!slots.header || !props.title && !slots.title">
77
+ <DialogTitle />
78
+ </VisuallyHidden>
79
+
80
+ <slot name="content" :close="close">
81
+ <div
82
+ v-if="slots.header || props.title || slots.title || props.description || slots.description || props.close || slots.close"
83
+ :class="ui.header({ class: props.ui?.header })"
84
+ data-part="header"
85
+ >
86
+ <slot name="header" :close="close">
87
+ <DialogTitle
88
+ v-if="props.title || slots.title"
89
+ :class="ui.title({ class: props.ui?.title })"
90
+ data-part="title"
91
+ >
92
+ <slot name="title">
93
+ {{ props.title }}
94
+ </slot>
95
+ </DialogTitle>
96
+
97
+ <DialogClose v-if="props.close || slots.close" as-child>
98
+ <slot name="close" :close="close" :ui="ui">
99
+ <Button
100
+ variant="ghost"
101
+ color="neutral"
102
+ :icon="props.closeIcon || appConfig.ui.icons.close"
103
+ v-bind="typeof props.close === 'object' ? props.close : {}"
104
+ :aria-label="t('modal.close')"
105
+ :class="ui.close({ class: props.ui?.close })"
106
+ data-part="close"
107
+ />
108
+ </slot>
109
+ </DialogClose>
110
+
111
+ <DialogDescription
112
+ v-if="props.description || slots.description"
113
+ :class="ui.description({ class: props.ui?.description })"
114
+ data-part="description"
115
+ >
116
+ <slot name="description">
117
+ {{ props.description }}
118
+ </slot>
119
+ </DialogDescription>
120
+ </slot>
121
+ </div>
122
+
123
+ <div v-if="slots.body" :class="ui.body({ class: props.ui?.body })" data-part="body">
124
+ <slot name="body" :close="close"></slot>
125
+ </div>
126
+
127
+ <div v-if="slots.footer" :class="ui.footer({ class: props.ui?.footer })" data-part="footer">
128
+ <slot name="footer" :close="close"></slot>
129
+ </div>
130
+ </slot>
131
+ </DialogContent>
132
+ </DialogPortal>
133
+ </DialogRoot>
134
134
  </template>
@@ -1,6 +1,6 @@
1
1
  import type { DialogContentEmits, DialogContentProps, DialogRootEmits, DialogRootProps } from 'reka-ui';
2
2
  import theme from '#build/ui/modal';
3
- import type { ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps } from '../types';
3
+ import type { ButtonProps, ComponentBaseProps, ComponentStyler, ComponentUIProps, IconProps, LinkPropsKeys } from '../types';
4
4
  import type { EmitsToProps, StaticSlot } from '../types/utils';
5
5
  export interface ModalProps extends ComponentBaseProps, DialogRootProps {
6
6
  title?: string;
@@ -31,7 +31,7 @@ export interface ModalProps extends ComponentBaseProps, DialogRootProps {
31
31
  * Display a close button to dismiss the modal.
32
32
  * @default true
33
33
  */
34
- close?: boolean | Partial<ButtonProps>;
34
+ close?: boolean | Omit<ButtonProps, LinkPropsKeys>;
35
35
  /** @default app.icons.close */
36
36
  closeIcon?: IconProps['name'];
37
37
  /**
@@ -69,6 +69,8 @@ export interface ModalSlots {
69
69
  close: () => void;
70
70
  }>;
71
71
  }
72
+ declare const _default: typeof __VLS_export;
73
+ export default _default;
72
74
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ModalProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
73
75
  "update:open": (value: boolean) => any;
74
76
  "after-leave": () => any;
@@ -80,15 +82,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<ModalP
80
82
  "onAfter-enter"?: (() => any) | undefined;
81
83
  "onClose-prevent"?: (() => any) | undefined;
82
84
  }>, {
83
- overlay: boolean;
84
- close: boolean | Partial<ButtonProps>;
85
+ close: boolean | Omit<ButtonProps, LinkPropsKeys>;
85
86
  transition: boolean;
87
+ overlay: boolean;
86
88
  modal: boolean;
87
89
  portal: boolean | string | HTMLElement;
88
90
  dismissible: boolean;
89
91
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, ModalSlots>;
90
- declare const _default: typeof __VLS_export;
91
- export default _default;
92
92
  type __VLS_WithSlots<T, S> = T & {
93
93
  new (): {
94
94
  $slots: S;