@byyuurin/ui 0.0.2 → 0.0.3

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 (132) hide show
  1. package/README.md +75 -5
  2. package/dist/index.cjs +38 -0
  3. package/dist/index.d.ts +3 -3
  4. package/dist/index.mjs +3 -3
  5. package/dist/nuxt.d.mts +13 -0
  6. package/dist/nuxt.d.ts +6 -3
  7. package/dist/nuxt.mjs +6 -3
  8. package/dist/resolver.d.mts +13 -0
  9. package/dist/resolver.d.ts +6 -3
  10. package/dist/resolver.mjs +5 -2
  11. package/dist/{components → runtime/components}/Accordion.vue +19 -3
  12. package/dist/{components → runtime/components}/Button.vue +93 -94
  13. package/dist/{components → runtime/components}/Checkbox.vue +104 -104
  14. package/dist/{components → runtime/components}/RadioGroup.vue +180 -180
  15. package/dist/{components → runtime/components}/Select.vue +262 -258
  16. package/dist/{components → runtime/components}/Switch.vue +99 -99
  17. package/dist/{components → runtime/components}/Tabs.vue +117 -117
  18. package/dist/{components → runtime/components}/Toaster.vue +35 -1
  19. package/dist/runtime/components/index.cjs +132 -0
  20. package/dist/runtime/composables/index.cjs +33 -0
  21. package/dist/runtime/composables/useComponentIcons.cjs +30 -0
  22. package/dist/runtime/composables/useModal.cjs +55 -0
  23. package/dist/runtime/composables/useTheme.cjs +30 -0
  24. package/dist/{composables → runtime/composables}/useTheme.d.ts +0 -1
  25. package/dist/{composables → runtime/composables}/useTheme.mjs +3 -3
  26. package/dist/runtime/composables/useToast.cjs +51 -0
  27. package/dist/{composables → runtime/composables}/useToast.d.ts +1 -1
  28. package/dist/runtime/theme/accordion.cjs +27 -0
  29. package/dist/runtime/theme/app.cjs +15 -0
  30. package/dist/runtime/theme/button.cjs +127 -0
  31. package/dist/runtime/theme/card.cjs +17 -0
  32. package/dist/runtime/theme/checkbox.cjs +56 -0
  33. package/dist/runtime/theme/drawer.cjs +73 -0
  34. package/dist/runtime/theme/index.cjs +125 -0
  35. package/dist/runtime/theme/input.cjs +115 -0
  36. package/dist/runtime/theme/link.cjs +23 -0
  37. package/dist/runtime/theme/modal.cjs +55 -0
  38. package/dist/runtime/theme/popover.cjs +13 -0
  39. package/dist/runtime/theme/radioGroup.cjs +73 -0
  40. package/dist/runtime/theme/select.cjs +128 -0
  41. package/dist/runtime/theme/switch.cjs +73 -0
  42. package/dist/runtime/theme/tabs.cjs +105 -0
  43. package/dist/runtime/theme/toast.cjs +33 -0
  44. package/dist/runtime/theme/toaster.cjs +72 -0
  45. package/dist/runtime/theme/tooltip.cjs +14 -0
  46. package/dist/runtime/types/components.cjs +1 -0
  47. package/dist/runtime/types/index.cjs +27 -0
  48. package/dist/{types → runtime/types}/index.d.ts +1 -1
  49. package/dist/runtime/types/utils.cjs +1 -0
  50. package/dist/runtime/utils/extend-theme.cjs +24 -0
  51. package/dist/runtime/utils/index.cjs +119 -0
  52. package/dist/{utils → runtime/utils}/index.d.ts +3 -1
  53. package/dist/{utils → runtime/utils}/index.mjs +3 -1
  54. package/dist/runtime/utils/link.cjs +10 -0
  55. package/dist/runtime/utils/styler.cjs +18 -0
  56. package/dist/{internal → runtime/utils}/styler.d.ts +0 -1
  57. package/dist/runtime/utils/styler.mjs +10 -0
  58. package/dist/{internal/constants.mjs → shared/ui.CPXA9QoM.mjs} +4 -2
  59. package/dist/unocss-preset.d.mts +49 -0
  60. package/dist/unocss-preset.d.ts +20 -8
  61. package/dist/unocss-preset.mjs +428 -78
  62. package/package.json +15 -10
  63. package/dist/internal/constants.d.ts +0 -3
  64. package/dist/internal/index.d.ts +0 -4
  65. package/dist/internal/index.mjs +0 -4
  66. package/dist/internal/styler.mjs +0 -236
  67. package/dist/utils/unocss.d.ts +0 -3
  68. package/dist/utils/unocss.mjs +0 -50
  69. /package/dist/{components → runtime/components}/App.vue +0 -0
  70. /package/dist/{components → runtime/components}/Card.vue +0 -0
  71. /package/dist/{components → runtime/components}/Drawer.vue +0 -0
  72. /package/dist/{components → runtime/components}/Input.vue +0 -0
  73. /package/dist/{components → runtime/components}/Link.vue +0 -0
  74. /package/dist/{components → runtime/components}/Modal.vue +0 -0
  75. /package/dist/{components → runtime/components}/ModalProvider.vue +0 -0
  76. /package/dist/{components → runtime/components}/Popover.vue +0 -0
  77. /package/dist/{components → runtime/components}/Toast.vue +0 -0
  78. /package/dist/{components → runtime/components}/Tooltip.vue +0 -0
  79. /package/dist/{components → runtime/components}/index.d.ts +0 -0
  80. /package/dist/{components → runtime/components}/index.mjs +0 -0
  81. /package/dist/{composables → runtime/composables}/index.d.ts +0 -0
  82. /package/dist/{composables → runtime/composables}/index.mjs +0 -0
  83. /package/dist/{composables → runtime/composables}/useComponentIcons.d.ts +0 -0
  84. /package/dist/{composables → runtime/composables}/useComponentIcons.mjs +0 -0
  85. /package/dist/{composables → runtime/composables}/useModal.d.ts +0 -0
  86. /package/dist/{composables → runtime/composables}/useModal.mjs +0 -0
  87. /package/dist/{composables → runtime/composables}/useToast.mjs +0 -0
  88. /package/dist/{theme → runtime/theme}/accordion.d.ts +0 -0
  89. /package/dist/{theme → runtime/theme}/accordion.mjs +0 -0
  90. /package/dist/{theme → runtime/theme}/app.d.ts +0 -0
  91. /package/dist/{theme → runtime/theme}/app.mjs +0 -0
  92. /package/dist/{theme → runtime/theme}/button.d.ts +0 -0
  93. /package/dist/{theme → runtime/theme}/button.mjs +0 -0
  94. /package/dist/{theme → runtime/theme}/card.d.ts +0 -0
  95. /package/dist/{theme → runtime/theme}/card.mjs +0 -0
  96. /package/dist/{theme → runtime/theme}/checkbox.d.ts +0 -0
  97. /package/dist/{theme → runtime/theme}/checkbox.mjs +0 -0
  98. /package/dist/{theme → runtime/theme}/drawer.d.ts +0 -0
  99. /package/dist/{theme → runtime/theme}/drawer.mjs +0 -0
  100. /package/dist/{theme → runtime/theme}/index.d.ts +0 -0
  101. /package/dist/{theme → runtime/theme}/index.mjs +0 -0
  102. /package/dist/{theme → runtime/theme}/input.d.ts +0 -0
  103. /package/dist/{theme → runtime/theme}/input.mjs +0 -0
  104. /package/dist/{theme → runtime/theme}/link.d.ts +0 -0
  105. /package/dist/{theme → runtime/theme}/link.mjs +0 -0
  106. /package/dist/{theme → runtime/theme}/modal.d.ts +0 -0
  107. /package/dist/{theme → runtime/theme}/modal.mjs +0 -0
  108. /package/dist/{theme → runtime/theme}/popover.d.ts +0 -0
  109. /package/dist/{theme → runtime/theme}/popover.mjs +0 -0
  110. /package/dist/{theme → runtime/theme}/radioGroup.d.ts +0 -0
  111. /package/dist/{theme → runtime/theme}/radioGroup.mjs +0 -0
  112. /package/dist/{theme → runtime/theme}/select.d.ts +0 -0
  113. /package/dist/{theme → runtime/theme}/select.mjs +0 -0
  114. /package/dist/{theme → runtime/theme}/switch.d.ts +0 -0
  115. /package/dist/{theme → runtime/theme}/switch.mjs +0 -0
  116. /package/dist/{theme → runtime/theme}/tabs.d.ts +0 -0
  117. /package/dist/{theme → runtime/theme}/tabs.mjs +0 -0
  118. /package/dist/{theme → runtime/theme}/toast.d.ts +0 -0
  119. /package/dist/{theme → runtime/theme}/toast.mjs +0 -0
  120. /package/dist/{theme → runtime/theme}/toaster.d.ts +0 -0
  121. /package/dist/{theme → runtime/theme}/toaster.mjs +0 -0
  122. /package/dist/{theme → runtime/theme}/tooltip.d.ts +0 -0
  123. /package/dist/{theme → runtime/theme}/tooltip.mjs +0 -0
  124. /package/dist/{types → runtime/types}/components.d.ts +0 -0
  125. /package/dist/{types → runtime/types}/components.mjs +0 -0
  126. /package/dist/{types → runtime/types}/index.mjs +0 -0
  127. /package/dist/{types → runtime/types}/utils.d.ts +0 -0
  128. /package/dist/{types → runtime/types}/utils.mjs +0 -0
  129. /package/dist/{internal → runtime/utils}/extend-theme.d.ts +0 -0
  130. /package/dist/{internal → runtime/utils}/extend-theme.mjs +0 -0
  131. /package/dist/{internal → runtime/utils}/link.d.ts +0 -0
  132. /package/dist/{internal → runtime/utils}/link.mjs +0 -0
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useModal = exports.provideModalState = exports.injectModalState = void 0;
7
+ var _core = require("@vueuse/core");
8
+ var _vue = require("vue");
9
+ var _utils = require("../utils/index.cjs");
10
+ const {
11
+ inject: injectModalState,
12
+ provide: provideModalState
13
+ } = (0, _utils.createInjection)("ui.modal");
14
+ exports.provideModalState = provideModalState;
15
+ exports.injectModalState = injectModalState;
16
+ const useModal = exports.useModal = (0, _core.createSharedComposable)(() => {
17
+ const modalState = injectModalState();
18
+ const isOpen = (0, _vue.ref)(false);
19
+ function open(component, props) {
20
+ if (!modalState) throw new Error("useModal() is called without provider");
21
+ modalState.value = {
22
+ component,
23
+ props: props ?? {}
24
+ };
25
+ isOpen.value = true;
26
+ }
27
+ function close() {
28
+ if (!modalState) return;
29
+ isOpen.value = false;
30
+ }
31
+ function reset() {
32
+ if (!modalState) return;
33
+ modalState.value = {
34
+ component: "div",
35
+ props: {}
36
+ };
37
+ }
38
+ function patch(props) {
39
+ if (!modalState) return;
40
+ modalState.value = {
41
+ ...modalState.value,
42
+ props: {
43
+ ...modalState.value.props,
44
+ ...props
45
+ }
46
+ };
47
+ }
48
+ return {
49
+ open,
50
+ close,
51
+ reset,
52
+ patch,
53
+ isOpen
54
+ };
55
+ });
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useTheme = exports.provideThemeExtension = exports.injectThemeExtension = void 0;
7
+ var _unocssPreset = require("@byyuurin/ui/unocss-preset");
8
+ var _core = require("@vueuse/core");
9
+ var _vue = require("vue");
10
+ var theme = _interopRequireWildcard(require("../theme/index.cjs"));
11
+ var _utils = require("../utils/index.cjs");
12
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ const {
15
+ provide: provideThemeExtension,
16
+ inject: injectThemeExtension
17
+ } = (0, _utils.createInjection)("ui.themeExtension", {});
18
+ exports.injectThemeExtension = injectThemeExtension;
19
+ exports.provideThemeExtension = provideThemeExtension;
20
+ const useTheme = exports.useTheme = (0, _core.createSharedComposable)(() => {
21
+ const _theme = injectThemeExtension();
22
+ const mergeRules = (0, _unocssPreset.createMergeRules)();
23
+ const {
24
+ createStyler
25
+ } = (0, _utils.prepareStyler)(mergeRules);
26
+ return {
27
+ theme: (0, _vue.computed)(() => (0, _utils.extendTheme)((0, _vue.toValue)(_theme), theme)),
28
+ createStyler
29
+ };
30
+ });
@@ -1,7 +1,6 @@
1
1
  import type { MaybeRefOrGetter } from 'vue';
2
2
  import * as theme from '../theme';
3
3
  export declare const provideThemeExtension: (value: MaybeRefOrGetter<import("../types").PartialTheme<typeof theme>>) => void, injectThemeExtension: () => MaybeRefOrGetter<import("../types").PartialTheme<typeof theme>>;
4
- export declare const mergeRules: import("@byyuurin/ui-kit/index").CRRule[];
5
4
  export declare const useTheme: () => {
6
5
  theme: import("vue").ComputedRef<typeof theme>;
7
6
  createStyler: <V extends import("@byyuurin/ui-kit/index").CVVariants<S, B>, CV extends import("@byyuurin/ui-kit/index").CVCompoundVariants<V, S, B>, B extends import("@byyuurin/ui-kit/index").ClassValue = undefined, S extends import("@byyuurin/ui-kit/index").CVSlots = undefined>(theme: import("@byyuurin/ui-kit/index").CVMeta<V, CV, never, B, S>) => [keyof V] extends string[] ? (props: Required<import("@byyuurin/ui-kit/index").VariantProps<import("@byyuurin/ui-kit/index").CVReturnType<V, S, B>>> & import("../types").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit/index").CVHandler<V, S, string>; } : (props?: import("../types").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit/index").CVHandler<V, S, string>; };
@@ -1,15 +1,15 @@
1
+ import { createMergeRules } from "@byyuurin/ui/unocss-preset";
1
2
  import { createSharedComposable } from "@vueuse/core";
2
3
  import { computed, toValue } from "vue";
3
- import { createMergeRules, extendTheme, prepareStyler } from "../internal/index.mjs";
4
4
  import * as theme from "../theme/index.mjs";
5
- import { createInjection } from "../utils/index.mjs";
5
+ import { createInjection, extendTheme, prepareStyler } from "../utils/index.mjs";
6
6
  export const {
7
7
  provide: provideThemeExtension,
8
8
  inject: injectThemeExtension
9
9
  } = createInjection("ui.themeExtension", {});
10
- export const mergeRules = createMergeRules();
11
10
  export const useTheme = createSharedComposable(() => {
12
11
  const _theme = injectThemeExtension();
12
+ const mergeRules = createMergeRules();
13
13
  const { createStyler } = prepareStyler(mergeRules);
14
14
  return {
15
15
  theme: computed(() => extendTheme(toValue(_theme), theme)),
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useToast = void 0;
7
+ var _core = require("@vueuse/core");
8
+ var _vue = require("vue");
9
+ const useToast = exports.useToast = (0, _core.createSharedComposable)(() => {
10
+ const toasts = (0, _vue.ref)([]);
11
+ function add(toast) {
12
+ const body = {
13
+ id: Date.now().toString(),
14
+ open: true,
15
+ ...toast
16
+ };
17
+ const index = toasts.value.findIndex(t => t.id === body.id);
18
+ if (index === -1) toasts.value.push(body);
19
+ toasts.value = toasts.value.slice(-5);
20
+ return body;
21
+ }
22
+ function update(id, toast) {
23
+ const index = toasts.value.findIndex(t => t.id === id);
24
+ if (index === -1) return;
25
+ toasts.value[index] = {
26
+ ...toasts.value[index],
27
+ ...toast
28
+ };
29
+ }
30
+ function remove(id) {
31
+ const index = toasts.value.findIndex(t => t.id === id);
32
+ if (index === -1) return;
33
+ toasts.value[index] = {
34
+ ...toasts.value[index],
35
+ open: false
36
+ };
37
+ setTimeout(() => {
38
+ toasts.value = toasts.value.filter(t => t.id !== id);
39
+ }, 200);
40
+ }
41
+ function clear() {
42
+ toasts.value = [];
43
+ }
44
+ return {
45
+ toasts,
46
+ add,
47
+ update,
48
+ remove,
49
+ clear
50
+ };
51
+ });
@@ -1,4 +1,4 @@
1
- import type { ToastProps } from '../types';
1
+ import type { ToastProps } from '@byyuurin/ui';
2
2
  export interface Toast extends Omit<ToastProps, 'defaultOpen'> {
3
3
  id: string | number;
4
4
  click?: (toast: Toast) => void;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _uiKit = require("@byyuurin/ui-kit");
8
+ module.exports = (0, _uiKit.ct)({
9
+ slots: {
10
+ root: "w-full color-ui-cb",
11
+ item: "border-b last:border-b-0",
12
+ header: "flex",
13
+ trigger: "group flex-1 flex items-center gap-2 font-medium text-sm py-4 focus-visible:outline-ui-fill min-w-0",
14
+ content: ["overflow-hidden focus:outline-none", "data-[state=open]:animate-[accordion-down_200ms_ease-out]", "data-[state=closed]:animate-[accordion-up_200ms_ease-out]"],
15
+ body: "text-sm pb-4 color-ui-cb/80",
16
+ icon: "shrink-0 size-5",
17
+ trailingIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200",
18
+ label: "text-start break-words"
19
+ },
20
+ variants: {
21
+ disabled: {
22
+ true: {
23
+ trigger: "cursor-not-allowed opacity-50"
24
+ }
25
+ }
26
+ }
27
+ });
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ module.exports = {
8
+ icons: {
9
+ close: "i-mdi-close-thick",
10
+ loading: "i-mdi-loading",
11
+ check: "i-mdi-check-bold",
12
+ indeterminate: "i-mdi-minus-thick",
13
+ down: "i-mdi-chevron-down"
14
+ }
15
+ };
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _uiKit = require("@byyuurin/ui-kit");
8
+ module.exports = (0, _uiKit.ct)({
9
+ slots: {
10
+ base: ["inline-flex items-center leading-normal transition-colors", "disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:opacity-50"],
11
+ label: "color-inherit",
12
+ prefixIcon: "shrink-0 size-1.5em",
13
+ suffixIcon: "shrink-0 size-1.5em"
14
+ },
15
+ variants: {
16
+ variant: {
17
+ solid: {
18
+ base: ["color-ui-c1 bg-ui-fill/90", "hover:bg-ui-fill/80 active:bg-ui-fill", "disabled:bg-ui-fill/90 aria-disabled:bg-ui-fill/90"]
19
+ },
20
+ outline: {
21
+ base: ["color-ui-fill bg-ui-c1 ring ring-inset ring-ui-fill", "hover:bg-ui-fill/10 active:bg-ui-fill/25", "disabled:bg-ui-c1 aria-disabled:bg-ui-c1"]
22
+ },
23
+ soft: {
24
+ base: ["color-ui-content/80 bg-ui-fill/10", "hover:bg-ui-fill/15 hover:color-ui-content/80 active:bg-ui-fill/20 active:color-ui-content/90", "disabled:bg-ui-fill/10 aria-disabled:bg-ui-fill/10 disabled:color-ui-content/80 aria-disabled:color-ui-content/80"]
25
+ },
26
+ ghost: {
27
+ base: ["color-ui-fill/80 bg-transparent", "hover:bg-ui-fill/10 hover:color-ui-fill/80 active:bg-ui-fill/20 active:color-ui-fill/90", "disabled:bg-transparent aria-disabled:bg-transparent disabled:color-ui-fill/80 aria-disabled:color-ui-fill/80"]
28
+ },
29
+ link: {
30
+ base: ["color-ui-fill bg-transparent", "hover:color-ui-fill/80 active:color-ui-fill/90", "disabled:color-ui-fill aria-disabled:color-ui-fill"]
31
+ }
32
+ },
33
+ size: {
34
+ xs: {
35
+ base: "text-xs"
36
+ },
37
+ sm: {
38
+ base: "text-sm"
39
+ },
40
+ md: {
41
+ base: "text-base"
42
+ },
43
+ lg: {
44
+ base: "text-lg"
45
+ },
46
+ xl: {
47
+ base: "text-xl"
48
+ }
49
+ },
50
+ round: {
51
+ true: {
52
+ base: "rounded-full"
53
+ },
54
+ false: {
55
+ base: "rounded-ui-button"
56
+ }
57
+ },
58
+ active: {
59
+ true: ""
60
+ },
61
+ prefix: {
62
+ true: ""
63
+ },
64
+ suffix: {
65
+ true: ""
66
+ },
67
+ loading: {
68
+ true: ""
69
+ }
70
+ },
71
+ compoundVariants: [{
72
+ size: ["xs", "sm", "md"],
73
+ class: {
74
+ base: "p-1.5",
75
+ label: "px-1"
76
+ }
77
+ }, {
78
+ size: ["lg", "xl"],
79
+ class: {
80
+ base: "p-2.5",
81
+ label: "px-2"
82
+ }
83
+ }, {
84
+ active: true,
85
+ variant: "solid",
86
+ class: {
87
+ base: "bg-ui-fill hover:bg-ui-fill"
88
+ }
89
+ }, {
90
+ active: true,
91
+ variant: "outline",
92
+ class: {
93
+ base: "bg-ui-fill/25 hover:bg-ui-fill/25"
94
+ }
95
+ }, {
96
+ active: true,
97
+ variant: "soft",
98
+ class: {
99
+ base: "color-ui-content/90 bg-ui-fill/20 hover:color-ui-content/90 hover:bg-ui-fill/20"
100
+ }
101
+ }, {
102
+ active: true,
103
+ variant: "ghost",
104
+ class: {
105
+ base: "color-ui-fill/90 bg-ui-fill/20 hover:color-ui-fill/90 hover:bg-ui-fill/20"
106
+ }
107
+ }, {
108
+ active: true,
109
+ variant: "link",
110
+ class: {
111
+ base: "color-ui-fill/90 hover:color-ui-fill/90"
112
+ }
113
+ }, {
114
+ loading: true,
115
+ prefix: true,
116
+ class: {
117
+ prefixIcon: "animate-spin"
118
+ }
119
+ }, {
120
+ loading: true,
121
+ prefix: false,
122
+ suffix: true,
123
+ class: {
124
+ suffixIcon: "animate-spin"
125
+ }
126
+ }]
127
+ });
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _uiKit = require("@byyuurin/ui-kit");
8
+ module.exports = (0, _uiKit.ct)({
9
+ slots: {
10
+ root: "color-ui-cb bg-ui-c1 ring ring-ui-cb/10 divide-y divide-ui-cb/10 rounded-ui-box shadow-sm shadow-ui-cb/10",
11
+ header: "flex flex-wrap items-center gap-1 px-4 py-5 sm:px-6",
12
+ body: "flex-1 overflow-y-auto p-4 sm:p-6 empty:hidden",
13
+ footer: "flex items-center gap-1.5 p-4 sm:px-6",
14
+ title: "flex-grow color-ui-cb text-xl font-semibold",
15
+ description: "w-full color-ui-cb/80"
16
+ }
17
+ });
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _uiKit = require("@byyuurin/ui-kit");
8
+ module.exports = (0, _uiKit.ct)({
9
+ slots: {
10
+ root: "relative flex items-start",
11
+ base: ["size-1.25em shrink-0 flex items-center justify-center rounded-ui-base color-ui-c1 ring ring-inset ring-ui-cb", "focus-visible:outline-ui-cb focus-visible:outline-2 focus-visible:outline-offset-2"],
12
+ container: "flex items-center h-1.25em",
13
+ wrapper: "text-inherit ms-2",
14
+ icon: "shrink-0 size-1em data-[state=checked]:animate-[scale-in_200ms_ease-out]",
15
+ label: "flex color-ui-cb after:content-empty",
16
+ description: "color-ui-cb/60"
17
+ },
18
+ variants: {
19
+ size: {
20
+ xs: {
21
+ root: "text-xs"
22
+ },
23
+ sm: {
24
+ root: "text-sm"
25
+ },
26
+ md: {
27
+ root: "text-base"
28
+ },
29
+ lg: {
30
+ root: "text-lg"
31
+ },
32
+ xl: {
33
+ root: "text-xl"
34
+ }
35
+ },
36
+ required: {
37
+ true: {
38
+ label: `after:content-['*'] after:ms-0.5`
39
+ }
40
+ },
41
+ disabled: {
42
+ true: {
43
+ root: "opacity-50 after:content-empty after:absolute after:inset-0 after:cursor-not-allowed"
44
+ },
45
+ false: {
46
+ label: "cursor-pointer"
47
+ }
48
+ },
49
+ checked: {
50
+ true: {
51
+ base: "ring-2 ring-ui-content bg-ui-content",
52
+ icon: "color-ui-c1"
53
+ }
54
+ }
55
+ }
56
+ });
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _uiKit = require("@byyuurin/ui-kit");
8
+ module.exports = (0, _uiKit.ct)({
9
+ slots: {
10
+ overlay: "fixed inset-0 bg-ui-c3/75",
11
+ content: "fixed bg-ui-c1 ring ring-ui-cb/5 flex focus:outline-none",
12
+ handle: "shrink-0 rounded-full bg-ui-cb/17.5",
13
+ container: "w-full flex flex-col overflow-hidden overflow-y-auto",
14
+ header: "p-4 sm:px-6 sibling:pt-0",
15
+ title: "color-ui-cb text-xl font-semibold",
16
+ description: "mt-1 color-ui-cb/80",
17
+ body: "p-4 sm:px-6 flex-1 sibling:pt-0",
18
+ footer: "p-4 sm:px-6 flex flex-col gap-1.5"
19
+ },
20
+ variants: {
21
+ direction: {
22
+ top: {
23
+ content: "top-0 mb-24 flex-col-reverse rounded-b-ui-box",
24
+ handle: "mb-4"
25
+ },
26
+ right: {
27
+ content: "right-4 flex-row rounded-l-ui-box",
28
+ handle: "ml-4"
29
+ },
30
+ bottom: {
31
+ content: "bottom-0 mt-24 flex-col rounded-t-ui-box",
32
+ handle: "mt-4"
33
+ },
34
+ left: {
35
+ content: "left-4 flex-row-reverse rounded-r-ui-box",
36
+ handle: "mr-4"
37
+ }
38
+ },
39
+ blur: {
40
+ true: {
41
+ overlay: "backdrop-blur-sm"
42
+ }
43
+ },
44
+ full: {
45
+ true: ""
46
+ }
47
+ },
48
+ compoundVariants: [{
49
+ direction: ["top", "bottom"],
50
+ class: {
51
+ content: "inset-x-0 h-auto max-h-[96%]",
52
+ handle: "w-12 h-1.5 mx-auto"
53
+ }
54
+ }, {
55
+ direction: ["top", "bottom"],
56
+ full: false,
57
+ class: {
58
+ content: "inset-x-4 my-4 rounded-ui-box after:hidden"
59
+ }
60
+ }, {
61
+ direction: ["right", "left"],
62
+ class: {
63
+ content: "inset-y-0 w-auto max-w-[calc(100%-2rem)]",
64
+ handle: "h-12 w-1.5 my-auto"
65
+ }
66
+ }, {
67
+ direction: ["right", "left"],
68
+ full: false,
69
+ class: {
70
+ content: "inset-y-4 rounded-ui-box after:hidden"
71
+ }
72
+ }]
73
+ });
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "accordion", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _accordion.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "app", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _app.default;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "button", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _button.default;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "card", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _card.default;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "checkbox", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _checkbox.default;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "drawer", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _drawer.default;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "input", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _input.default;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "link", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _link.default;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "modal", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _modal.default;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "popover", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _popover.default;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "radioGroup", {
67
+ enumerable: true,
68
+ get: function () {
69
+ return _radioGroup.default;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "select", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _select.default;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "switch", {
79
+ enumerable: true,
80
+ get: function () {
81
+ return _switch.default;
82
+ }
83
+ });
84
+ Object.defineProperty(exports, "tabs", {
85
+ enumerable: true,
86
+ get: function () {
87
+ return _tabs.default;
88
+ }
89
+ });
90
+ Object.defineProperty(exports, "toast", {
91
+ enumerable: true,
92
+ get: function () {
93
+ return _toast.default;
94
+ }
95
+ });
96
+ Object.defineProperty(exports, "toaster", {
97
+ enumerable: true,
98
+ get: function () {
99
+ return _toaster.default;
100
+ }
101
+ });
102
+ Object.defineProperty(exports, "tooltip", {
103
+ enumerable: true,
104
+ get: function () {
105
+ return _tooltip.default;
106
+ }
107
+ });
108
+ var _accordion = _interopRequireDefault(require("./accordion.cjs"));
109
+ var _app = _interopRequireDefault(require("./app.cjs"));
110
+ var _button = _interopRequireDefault(require("./button.cjs"));
111
+ var _card = _interopRequireDefault(require("./card.cjs"));
112
+ var _checkbox = _interopRequireDefault(require("./checkbox.cjs"));
113
+ var _drawer = _interopRequireDefault(require("./drawer.cjs"));
114
+ var _input = _interopRequireDefault(require("./input.cjs"));
115
+ var _link = _interopRequireDefault(require("./link.cjs"));
116
+ var _modal = _interopRequireDefault(require("./modal.cjs"));
117
+ var _popover = _interopRequireDefault(require("./popover.cjs"));
118
+ var _radioGroup = _interopRequireDefault(require("./radioGroup.cjs"));
119
+ var _select = _interopRequireDefault(require("./select.cjs"));
120
+ var _switch = _interopRequireDefault(require("./switch.cjs"));
121
+ var _tabs = _interopRequireDefault(require("./tabs.cjs"));
122
+ var _toast = _interopRequireDefault(require("./toast.cjs"));
123
+ var _toaster = _interopRequireDefault(require("./toaster.cjs"));
124
+ var _tooltip = _interopRequireDefault(require("./tooltip.cjs"));
125
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }