@rebnd/ui 0.0.3 → 0.0.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.
Files changed (79) hide show
  1. package/README.md +5 -3
  2. package/dist/index.d.ts +11 -0
  3. package/dist/src/assets/constants/components.d.ts +3 -0
  4. package/dist/src/components/RAvatar/RAvatar.d.ts +13 -13
  5. package/dist/src/components/RAvatar/utils/avatar.props.d.ts +7 -6
  6. package/dist/src/components/RAvatar/utils/avatar.style.d.ts +14 -10
  7. package/dist/src/components/RAvatarGroup/RAvatarGroup.d.ts +7 -7
  8. package/dist/src/components/RAvatarGroup/utils/avatar-group.props.d.ts +4 -3
  9. package/dist/src/components/RAvatarGroup/utils/avatar-group.style.d.ts +2 -1
  10. package/dist/src/components/RBadge/RBadge.d.ts +13 -13
  11. package/dist/src/components/RBadge/utils/badge.props.d.ts +8 -7
  12. package/dist/src/components/RBadge/utils/badge.style.d.ts +35 -66
  13. package/dist/src/components/RButton/RButton.d.ts +33 -13
  14. package/dist/src/components/RButton/utils/button.props.d.ts +16 -7
  15. package/dist/src/components/RButton/utils/button.style.d.ts +92 -38
  16. package/dist/src/components/RButtonGroup/RButtonGroup.d.ts +62 -0
  17. package/dist/src/components/RButtonGroup/utils/button-group.props.d.ts +30 -0
  18. package/dist/src/components/RButtonGroup/utils/button-group.style.d.ts +123 -0
  19. package/dist/src/components/RCheckbox/RCheckbox.d.ts +62 -0
  20. package/dist/src/components/RCheckbox/utils/checkbox.props.d.ts +27 -0
  21. package/dist/src/components/RCheckbox/utils/checkbox.style.d.ts +38 -0
  22. package/dist/src/components/RCheckboxGroup/RCheckboxGroup.d.ts +80 -0
  23. package/dist/src/components/RCheckboxGroup/utils/checkbox-group.props.d.ts +37 -0
  24. package/dist/src/components/RCheckboxGroup/utils/checkbox-group.style.d.ts +35 -0
  25. package/dist/src/components/RFormGroup/RFormGroup.d.ts +8 -2
  26. package/dist/src/components/RInput/RInput.d.ts +19 -3
  27. package/dist/src/components/RInput/utils/input.props.d.ts +7 -0
  28. package/dist/src/components/RInput/utils/input.style.d.ts +24 -2
  29. package/dist/src/components/RInputPassword/RInputPassword.d.ts +22 -0
  30. package/dist/src/components/RInputPassword/utils/input-password.props.d.ts +8 -0
  31. package/dist/src/components/RInputPassword/utils/input-password.style.d.ts +4 -0
  32. package/dist/src/components/RModal/RModal.d.ts +65 -0
  33. package/dist/src/components/RModal/utils/modal.props.d.ts +30 -0
  34. package/dist/src/components/RModal/utils/modal.style.d.ts +3 -0
  35. package/dist/src/components/RRadio/RRadio.d.ts +60 -0
  36. package/dist/src/components/RRadio/utils/radio.props.d.ts +27 -0
  37. package/dist/src/components/RRadio/utils/radio.style.d.ts +64 -0
  38. package/dist/src/components/RRadioGroup/RRadioGroup.d.ts +78 -0
  39. package/dist/src/components/RRadioGroup/utils/radio-group.props.d.ts +37 -0
  40. package/dist/src/components/RRadioGroup/utils/radio-group.style.d.ts +35 -0
  41. package/dist/src/components/RSwitch/RSwitch.d.ts +86 -0
  42. package/dist/src/components/RSwitch/utils/switch.props.d.ts +39 -0
  43. package/dist/src/components/RSwitch/utils/switch.style.d.ts +142 -0
  44. package/dist/src/components/RTabs/RTabs.d.ts +14 -14
  45. package/dist/src/components/RTabs/utils/tabs.props.d.ts +8 -6
  46. package/dist/src/components/RTabs/utils/tabs.style.d.ts +26 -10
  47. package/dist/src/components/RTextArea/RTextArea.d.ts +21 -1
  48. package/dist/src/components/RTextArea/utils/text-area.props.d.ts +11 -0
  49. package/dist/src/components/RTextArea/utils/text-area.style.d.ts +30 -2
  50. package/dist/src/components/RToast/RToast.d.ts +70 -0
  51. package/dist/src/components/RToast/utils/toast.props.d.ts +33 -0
  52. package/dist/src/components/RToast/utils/toast.style.d.ts +4 -0
  53. package/dist/src/components/RToastRenderer/RToastRenderer.d.ts +31 -0
  54. package/dist/src/components/RToastRenderer/utils/toast-renderer.props.d.ts +14 -0
  55. package/dist/src/components/RToastRenderer/utils/toast-renderer.style.d.ts +21 -0
  56. package/dist/src/components/RToggle/RToggle.d.ts +62 -0
  57. package/dist/src/components/RToggle/utils/toggle.props.d.ts +29 -0
  58. package/dist/src/components/RToggle/utils/toggle.style.d.ts +2 -0
  59. package/dist/src/composables/useModal.d.ts +8 -0
  60. package/dist/src/composables/useToast.d.ts +4 -0
  61. package/dist/src/theme/animations.d.ts +9 -0
  62. package/dist/src/theme/borders.d.ts +24 -0
  63. package/dist/src/theme/colors.d.ts +3696 -233
  64. package/dist/src/theme/fonts.d.ts +46 -0
  65. package/dist/src/theme/index.d.ts +2 -2
  66. package/dist/src/theme/radii.d.ts +24 -0
  67. package/dist/src/theme/semantic-tokens.d.ts +777 -35
  68. package/dist/src/theme/sizes.d.ts +21 -0
  69. package/dist/src/theme/spacing.d.ts +30 -0
  70. package/dist/src/theme/tokens.d.ts +3845 -232
  71. package/dist/src/types/component.d.ts +44 -14
  72. package/dist/src/types/index.d.ts +2 -3
  73. package/dist/src/utils/array.d.ts +3 -0
  74. package/dist/src/utils/regex.d.ts +2 -1
  75. package/dist/src/utils/string.d.ts +2 -1
  76. package/dist/styles.css +3274 -820
  77. package/dist/ui.js +14213 -1881
  78. package/dist/ui.umd.cjs +5 -2
  79. package/package.json +41 -43
@@ -1,33 +1,63 @@
1
+ import { Token } from '../../styled-system/tokens';
1
2
  import { VNode } from 'vue';
2
- type AccordionDisclosure = {
3
+ interface AccordionDisclosure {
3
4
  id: string;
4
5
  title: string;
5
6
  icon?: string;
6
7
  defaultOpen?: boolean;
7
8
  content: string;
8
- };
9
+ }
9
10
  type Alignment = 'start' | 'end' | 'center';
10
11
  type AnchorPosition = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
12
+ type ButtonSize = Extract<Size, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;
11
13
  type ButtonType = 'button' | 'reset' | 'submit';
12
- type Color = 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error';
13
- type ComponentName = 'RebndAccordion' | 'RebndAvatar' | 'RebndAvatarGroup' | 'RebndBadge' | 'RebndBreadcrumb' | 'RebndButton' | 'RebndCard' | 'RebndCombobox' | 'RebndDropdown' | 'RebndForm' | 'RebndFormGroup' | 'RebndIcon' | 'RebndTabs';
14
+ type Color = 'primary' | 'secondary' | Status;
15
+ type ComponentName = 'RebndAccordion' | 'RebndAvatar' | 'RebndAvatarGroup' | 'RebndBadge' | 'RebndBreadcrumb' | 'RebndButton' | 'RebndButtonGroup' | 'RebndCard' | 'RebndCombobox' | 'RebndCheckbox' | 'RebndCheckboxGroup' | 'RebndDropdown' | 'RebndForm' | 'RebndFormGroup' | 'RebndIcon' | 'RebndInputPassword' | 'RebndModal' | 'RebndRadio' | 'RebndRadioGroup' | 'RebndTabs' | 'RebndToggle';
14
16
  type DropdownAction = (fn: () => void) => void;
15
- type Icon = {
17
+ interface Icon {
16
18
  id: IconName;
17
19
  template: string;
18
- };
19
- type IconName = 'arrow' | 'bar' | 'chevron-up-down' | 'dash' | 'dot' | 'external' | 'horizontal-dots' | 'not-found' | 'search' | 'slash' | 'underscore';
20
+ }
21
+ type IconName = 'arrow' | 'bar' | 'chevron-up-down' | 'check' | 'close' | 'cross-circle' | 'dash' | 'dot' | 'exclamation' | 'external' | 'eye' | 'eye-crossed' | 'horizontal-dots' | 'info' | 'not-found' | 'search' | 'spinner' | 'slash' | 'underscore';
20
22
  type LinkRel = 'author' | 'external' | 'help' | 'license' | 'next' | 'nofollow' | 'noopener' | 'noreferrer' | 'noopener noreferrer' | 'nofollow noopener noreferrer';
21
23
  type LinkTarget = '_self' | '_blank' | '_parent' | '_top';
22
24
  type LinkType = 'a' | 'RouterLink' | 'NuxtLink';
23
- type Position = 'top' | 'bottom' | 'left' | 'right';
24
- type Rounded = 'none' | Size | 'full';
25
- type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
26
- type TableColumn<T = unknown> = {
25
+ type Loader = 'dot' | 'bar' | 'spinner';
26
+ type ModalMode = 'fit' | 'fullscreen';
27
+ export type Orientation = 'horizontal' | 'vertical';
28
+ type Placement = 'before' | 'after' | 'hidden';
29
+ type Position = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
30
+ type RadioGroupType = 'list' | 'card' | 'grid';
31
+ type Rounded = 'sharp' | Extract<Size, 'xs' | 'sm' | 'md' | 'lg'> | 'pill';
32
+ type Status = 'info' | 'success' | 'warning' | 'error';
33
+ type Size = 'xs' | 'vs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl';
34
+ interface TableColumn<T = unknown> {
27
35
  id: string;
28
36
  key: keyof T | string;
29
37
  title: string;
30
38
  actions?: VNode | ((row: T) => VNode);
31
- };
32
- type Variant = 'solid' | 'ghost' | 'outlined';
33
- export type { AccordionDisclosure, Alignment, AnchorPosition, ButtonType, Color, ComponentName, DropdownAction, Icon, IconName, LinkRel, LinkTarget, LinkType, Position, Rounded, Size, TableColumn, Variant, };
39
+ }
40
+ interface ToastAction {
41
+ name: string;
42
+ cb: () => void;
43
+ }
44
+ interface ToastIconConfig {
45
+ id: Status;
46
+ icon: IconName;
47
+ color: Token;
48
+ }
49
+ interface ToastOptions {
50
+ title: string;
51
+ message?: string;
52
+ status?: Status;
53
+ autoDismiss?: boolean;
54
+ duration?: number;
55
+ actions?: ToastAction[];
56
+ }
57
+ type ToastPosition = Extract<Position, 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'>;
58
+ type ToastStackItem = {
59
+ id: string;
60
+ config: ToastIconConfig;
61
+ } & ToastOptions;
62
+ type Variant = 'ghost' | 'outline' | 'solid' | 'soft' | 'surface';
63
+ export type { AccordionDisclosure, Alignment, AnchorPosition, ButtonSize, ButtonType, Color, ComponentName, DropdownAction, Icon, IconName, LinkRel, LinkTarget, LinkType, Loader, ModalMode, Placement, Position, RadioGroupType, Rounded, Size, Status, TableColumn, ToastAction, ToastIconConfig, ToastOptions, ToastPosition, ToastStackItem, Variant, };
@@ -1,3 +1,2 @@
1
- import { AccordionDisclosure, Alignment, AnchorPosition, ButtonType, Color, ComponentName, DropdownAction, Icon, IconName, LinkRel, LinkTarget, LinkType, Position, Rounded, Size, TableColumn, Variant } from './component';
2
- import { FormError, FormSubmitEvent } from './form';
3
- export type { AccordionDisclosure, Alignment, AnchorPosition, ButtonType, Color, ComponentName, DropdownAction, FormError, FormSubmitEvent, Icon, IconName, LinkRel, LinkTarget, LinkType, Position, Rounded, Size, TableColumn, Variant, };
1
+ export type * from './component';
2
+ export type * from './form';
@@ -0,0 +1,3 @@
1
+ export declare function addToArray<T>(arr: T[], item: T): T[];
2
+ export declare function cloneArray<T>(arr: T[]): T[];
3
+ export declare function removeFromArray<T>(arr: T[], item: T): T[];
@@ -1,5 +1,6 @@
1
1
  declare const authorizedColor: RegExp;
2
+ declare const authorizedRadius: RegExp;
2
3
  declare const authorizedSize: RegExp;
3
4
  declare const authorizedVariant: RegExp;
4
5
  declare const urlOrPathRegex: RegExp;
5
- export { authorizedColor, authorizedSize, authorizedVariant, urlOrPathRegex };
6
+ export { authorizedColor, authorizedRadius, authorizedSize, authorizedVariant, urlOrPathRegex, };
@@ -1,4 +1,5 @@
1
1
  declare function fuzzyMatch(text: string, query: string): boolean;
2
+ declare function generateShortUID(): string;
2
3
  declare function getInitials(name: string): string;
3
4
  declare function kebabify(str: string): string;
4
- export { fuzzyMatch, getInitials, kebabify };
5
+ export { fuzzyMatch, generateShortUID, getInitials, kebabify };