@dayoakin/vue-ui 0.0.0-stage → 0.1.2

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 (55) hide show
  1. package/README.md +121 -2
  2. package/dist/components/AnimeHeight/index.vue.d.ts +28 -0
  3. package/dist/components/Badge/Badge.vue.d.ts +110 -0
  4. package/dist/components/Button/Button.vue.d.ts +231 -0
  5. package/dist/components/Button/ButtonGroup.vue.d.ts +41 -0
  6. package/dist/components/Button/SecondaryButton/index.vue.d.ts +231 -0
  7. package/dist/components/Card/Card.vue.d.ts +139 -0
  8. package/dist/components/CardSelect/CardSelect.vue.d.ts +178 -0
  9. package/dist/components/CodeBlock/index.vue.d.ts +291 -0
  10. package/dist/components/EmptyState/index.vue.d.ts +98 -0
  11. package/dist/components/Hr/index.vue.d.ts +3 -0
  12. package/dist/components/Input/AddressAutocomplete/index.vue.d.ts +218 -0
  13. package/dist/components/Input/CheckboxInput/index.vue.d.ts +115 -0
  14. package/dist/components/Input/CurrencyConverterInput/index.vue.d.ts +561 -0
  15. package/dist/components/Input/CurrencyInput/index.vue.d.ts +310 -0
  16. package/dist/components/Input/DateInput/index.vue.d.ts +276 -0
  17. package/dist/components/Input/DoubleRangeInput/index.vue.d.ts +206 -0
  18. package/dist/components/Input/Input.vue.d.ts +377 -0
  19. package/dist/components/Input/OtpInput/index.vue.d.ts +294 -0
  20. package/dist/components/Input/OtpInput/singleOtpInput.vue.d.ts +258 -0
  21. package/dist/components/Input/RadioInput/index.vue.d.ts +107 -0
  22. package/dist/components/Input/SearchInput/index.vue.d.ts +170 -0
  23. package/dist/components/Input/Select/index.vue.d.ts +250 -0
  24. package/dist/components/Input/TelInput/index.vue.d.ts +242 -0
  25. package/dist/components/Input/Upload/index.vue.d.ts +353 -0
  26. package/dist/components/Loaders/index.d.ts +8 -0
  27. package/dist/components/Loaders/index.vue.d.ts +104 -0
  28. package/dist/components/Loaders/loaderService.d.ts +18 -0
  29. package/dist/components/Modals/Modal.vue.d.ts +189 -0
  30. package/dist/components/Modals/RightSidebar.vue.d.ts +146 -0
  31. package/dist/components/Notification/AlertBox/AlertBox.vue.d.ts +103 -0
  32. package/dist/components/Notification/AlertBox/alertService.d.ts +21 -0
  33. package/dist/components/Notification/AlertBox/index.d.ts +8 -0
  34. package/dist/components/Notification/InlineToast/InlineToast.vue.d.ts +103 -0
  35. package/dist/components/Notification/Toast/index.d.ts +8 -0
  36. package/dist/components/Notification/Toast/index.vue.d.ts +76 -0
  37. package/dist/components/Notification/Toast/toastServices.d.ts +20 -0
  38. package/dist/components/Pagination/Pagination.vue.d.ts +238 -0
  39. package/dist/components/Skeleton/index.vue.d.ts +81 -0
  40. package/dist/components/Spinner/index.vue.d.ts +71 -0
  41. package/dist/components/Tab/Tab.vue.d.ts +149 -0
  42. package/dist/components/Table/index.vue.d.ts +551 -0
  43. package/dist/components/Tooltip/Tooltip.vue.d.ts +90 -0
  44. package/dist/components/index.d.ts +38 -0
  45. package/dist/components/ts/api.d.ts +4 -0
  46. package/dist/core/theme.d.ts +4 -0
  47. package/dist/core/ui.d.ts +88 -0
  48. package/dist/index-z9l8C72U-BM4uarLu.cjs +14 -0
  49. package/dist/index-z9l8C72U-CAfHR3NZ.js +3733 -0
  50. package/dist/index.cjs +7 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.js +16257 -0
  53. package/dist/lib.d.ts +3 -0
  54. package/dist/style.css +1 -0
  55. package/package.json +53 -4
@@ -0,0 +1,88 @@
1
+ import { ComputedRef } from 'vue';
2
+ type CSSProperties = Record<string, string | number | undefined>;
3
+ /** Turn a colour *or* a theme token name into a valid CSS colour value. */
4
+ export declare function resolveColor<T extends string | undefined | null>(value: T): T;
5
+ /** "primary" or an already-resolved `var(--primary, var(--color-primary, primary))` → "primary" */
6
+ export declare function tokenName(value?: string | null): string | undefined;
7
+ /** True when the value is a bare theme token (e.g. "primary"). */
8
+ export declare function isToken(value?: string | null): boolean;
9
+ /**
10
+ * Append an alpha channel to any colour.
11
+ * withAlpha("#7c3aed", "28") → "#7c3aed28" (same as before)
12
+ * withAlpha("primary", "28") → color-mix(in srgb, <primary> 16%, transparent)
13
+ * `hexAlpha` is the 2-digit suffix the library always used ("14", "22", "28").
14
+ */
15
+ export declare function withAlpha(color: string | undefined, hexAlpha: string): string;
16
+ /**
17
+ * Token-aware view of a component's props. Use it as the first line of
18
+ * `setup`: setup(rawProps) { const props = tokenProps(rawProps); … }
19
+ * Every `*Color` string prop is run through `resolveColor` when read, so
20
+ * `props.bgColor` is a valid CSS value even for `bgColor="primary"`.
21
+ */
22
+ export declare function tokenProps<T extends object>(raw: T): T;
23
+ /**
24
+ * Computed, token-resolved copies of every colour prop, to spread into the
25
+ * object `setup` returns so that the TEMPLATE also sees resolved values:
26
+ * return { …, ...tokenRefs(rawProps) }
27
+ */
28
+ export declare function tokenRefs<T extends object>(raw: T): Record<string, ComputedRef<unknown>>;
29
+ export interface UiRootResult {
30
+ style: CSSProperties;
31
+ "data-ui-d"?: string;
32
+ }
33
+ /**
34
+ * Merge the library's own inline style with the consumer's `className` and
35
+ * `style`, so that **Tailwind classes win**:
36
+ *
37
+ * • `bg-red-500`, `rounded-full`, `p-6`, `text-lg` … → the matching inline
38
+ * default is dropped (only that property – `px-8` leaves vertical padding alone)
39
+ * • `hover:bg-red-500`, `md:p-8`, `focus:ring-2` … → the inline default is
40
+ * kept as a *low-priority* default (see `[data-ui-d]` in theme.css), so the
41
+ * variant can still override it
42
+ * • the consumer's own `style` prop is merged on top instead of replacing
43
+ *
44
+ * Spread it on the element that receives `className`, AFTER `{...rest}`:
45
+ * <div className={cn(…, className)} {...rest} {...uiRoot(className, style, rest.style)} />
46
+ */
47
+ export declare function uiRoot(className: string | undefined, style?: CSSProperties, userStyle?: unknown): UiRootResult;
48
+ /**
49
+ * One call for a component root:
50
+ * <button v-bind="uiAttrs($attrs, buttonStyle, hover)" …>
51
+ * Replaces `v-bind="$attrs" :style="buttonStyle"`. Returns the fall-through
52
+ * attrs (class, listeners, data-*) with the style merged so that Tailwind
53
+ * classes win over the library's inline defaults and the consumer's own
54
+ * `style` is merged on top. Pass `hoverProps(...)` as the 3rd argument to add
55
+ * the hover state.
56
+ */
57
+ export declare function uiAttrs(attrs: Record<string, unknown>, style?: CSSProperties, hoverIn?: HoverOptions | HoverResult): Record<string, unknown>;
58
+ export interface HoverOptions {
59
+ /** the element's background (token, colour or `var(--x)`); omit when transparent */
60
+ bgColor?: string;
61
+ hoverBgColor?: string;
62
+ hoverTextColor?: string;
63
+ hoverBorderColor?: string;
64
+ /** consumer className – if it already has `hover:` utilities we step aside */
65
+ className?: string;
66
+ /** set false to opt a single element out of the automatic hover */
67
+ hover?: boolean;
68
+ /** true for outline / ghost / any element with no fill of its own */
69
+ soft?: boolean;
70
+ }
71
+ export interface HoverResult {
72
+ className: string;
73
+ style: CSSProperties;
74
+ attrs: Record<string, string | undefined>;
75
+ }
76
+ /**
77
+ * Hover behaviour for any interactive element:
78
+ *
79
+ * const h = hoverProps({ bgColor, hoverBgColor, className });
80
+ * <button className={cn(h.className, …)} style={{ ...h.style, … }} {...h.attrs} />
81
+ *
82
+ * 1. Explicit `hoverBgColor` / `hoverTextColor` / `hoverBorderColor` win.
83
+ * 2. `bgColor="primary"` uses `--primary-hover` when your :root defines it.
84
+ * 3. Any other filled background is darkened ~12 % (`color-mix`), a transparent
85
+ * one gets a faint tint of its own text colour.
86
+ */
87
+ export declare function hoverProps(o?: HoverOptions): HoverResult;
88
+ export {};