ropav 0.0.8 → 0.0.9

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 (146) hide show
  1. package/dist/accordion.css +10 -10
  2. package/dist/accordion.js +2 -2
  3. package/dist/alert.css +109 -0
  4. package/dist/alert.js +168 -0
  5. package/dist/aspect-ratio.css +17 -0
  6. package/dist/aspect-ratio.js +26 -0
  7. package/dist/avatar.css +97 -0
  8. package/dist/avatar.js +161 -0
  9. package/dist/badge.css +40 -115
  10. package/dist/badge.js +19 -16
  11. package/dist/base.css +609 -180
  12. package/dist/button-link.css +161 -0
  13. package/dist/button-link.js +108 -0
  14. package/dist/button.css +50 -229
  15. package/dist/button.js +7 -9
  16. package/dist/card.css +12 -12
  17. package/dist/check.js +12 -0
  18. package/dist/checkbox.css +16 -57
  19. package/dist/checkbox.js +14 -31
  20. package/dist/collapse.css +2 -2
  21. package/dist/collapse.js +1 -1
  22. package/dist/color-input.css +108 -0
  23. package/dist/color-input.js +344 -0
  24. package/dist/color-picker.css +304 -0
  25. package/dist/color-picker.js +717 -0
  26. package/dist/color-picker2.js +18 -0
  27. package/dist/color-swatch.css +50 -0
  28. package/dist/color-swatch.js +73 -0
  29. package/dist/color.js +190 -0
  30. package/dist/componentColors.js +206 -13
  31. package/dist/components/alert/alert.d.ts +30 -0
  32. package/dist/components/alert/index.d.ts +3 -0
  33. package/dist/components/alert/index.js +2 -0
  34. package/dist/components/alert/types.d.ts +20 -0
  35. package/dist/components/alert/useAlertColor.d.ts +3 -0
  36. package/dist/components/aspect-ratio/aspect-ratio.d.ts +21 -0
  37. package/dist/components/aspect-ratio/index.d.ts +2 -0
  38. package/dist/components/aspect-ratio/index.js +2 -0
  39. package/dist/components/aspect-ratio/types.d.ts +3 -0
  40. package/dist/components/avatar/avatar.d.ts +24 -0
  41. package/dist/components/avatar/index.d.ts +3 -0
  42. package/dist/components/avatar/index.js +2 -0
  43. package/dist/components/avatar/types.d.ts +20 -0
  44. package/dist/components/avatar/useAvatarColor.d.ts +3 -0
  45. package/dist/components/badge/types.d.ts +2 -1
  46. package/dist/components/badge/useBadgeColor.d.ts +3 -8
  47. package/dist/components/button/types.d.ts +1 -0
  48. package/dist/components/button/useButtonColor.d.ts +3 -13
  49. package/dist/components/button-link/button-link.d.ts +27 -0
  50. package/dist/components/button-link/index.d.ts +2 -0
  51. package/dist/components/button-link/index.js +2 -0
  52. package/dist/components/button-link/types.d.ts +20 -0
  53. package/dist/components/checkbox/types.d.ts +1 -0
  54. package/dist/components/checkbox/useCheckbox.d.ts +2 -4
  55. package/dist/components/color-input/color-input.d.ts +29 -0
  56. package/dist/components/color-input/index.d.ts +2 -0
  57. package/dist/components/color-input/index.js +2 -0
  58. package/dist/components/color-input/types.d.ts +34 -0
  59. package/dist/components/color-input/useColorInput.d.ts +27 -0
  60. package/dist/components/color-input/useColorInputEyeDropper.d.ts +13 -0
  61. package/dist/components/color-input/useColorInputPopover.d.ts +11 -0
  62. package/dist/components/color-input/useColorInputValue.d.ts +8 -0
  63. package/dist/components/color-picker/color-picker-saturation.d.ts +21 -0
  64. package/dist/components/color-picker/color-picker-slider.d.ts +21 -0
  65. package/dist/components/color-picker/color-picker-utils.d.ts +23 -0
  66. package/dist/components/color-picker/color-picker.d.ts +23 -0
  67. package/dist/components/color-picker/index.d.ts +3 -0
  68. package/dist/components/color-picker/index.js +3 -0
  69. package/dist/components/color-picker/types.d.ts +39 -0
  70. package/dist/components/color-picker/useColorPickerDrag.d.ts +11 -0
  71. package/dist/components/color-picker/useColorPickerSwatches.d.ts +21 -0
  72. package/dist/components/color-picker/useColorPickerValue.d.ts +15 -0
  73. package/dist/components/color-swatch/color-swatch.d.ts +21 -0
  74. package/dist/components/color-swatch/index.d.ts +2 -0
  75. package/dist/components/color-swatch/index.js +2 -0
  76. package/dist/components/color-swatch/types.d.ts +6 -0
  77. package/dist/components/color-swatch/useColorSwatchColor.d.ts +5 -0
  78. package/dist/components/dropdown-menu/dropdown-menu.d.ts +2 -2
  79. package/dist/components/dropdown-menu/useDropdownMenu.d.ts +1 -1
  80. package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +1 -1
  81. package/dist/components/dropdown-menu/useDropdownSubmenus.d.ts +1 -1
  82. package/dist/components/field/types.d.ts +0 -2
  83. package/dist/components/field/useField.d.ts +0 -2
  84. package/dist/components/icon-button/types.d.ts +1 -0
  85. package/dist/components/input/types.d.ts +3 -0
  86. package/dist/components/number-input/index.d.ts +2 -0
  87. package/dist/components/number-input/index.js +2 -0
  88. package/dist/components/number-input/number-input.d.ts +29 -0
  89. package/dist/components/number-input/types.d.ts +34 -0
  90. package/dist/components/number-input/useNumberInput.d.ts +31 -0
  91. package/dist/components/popover/index.d.ts +1 -0
  92. package/dist/components/popover/index.js +2 -1
  93. package/dist/components/popover/types.d.ts +2 -1
  94. package/dist/components/progress/types.d.ts +1 -1
  95. package/dist/components/radio/types.d.ts +3 -0
  96. package/dist/components/radio/useRadio.d.ts +2 -4
  97. package/dist/components/select/index.d.ts +1 -1
  98. package/dist/components/select/types.d.ts +3 -0
  99. package/dist/components/slider/index.d.ts +2 -1
  100. package/dist/components/slider/index.js +2 -2
  101. package/dist/components/slider/range-slider.d.ts +45 -0
  102. package/dist/components/slider/types.d.ts +14 -2
  103. package/dist/components/slider/useRangeSlider.d.ts +59 -0
  104. package/dist/components/slider/useRangeSliderTooltipCollision.d.ts +7 -0
  105. package/dist/components/slider/useRangeSliderTooltipTransition.d.ts +4 -0
  106. package/dist/components/switch/useSwitch.d.ts +2 -3
  107. package/dist/components/tooltip/types.d.ts +1 -0
  108. package/dist/dropdown-menu.css +17 -17
  109. package/dist/field.css +15 -18
  110. package/dist/field.js +17 -35
  111. package/dist/icon-button.css +57 -236
  112. package/dist/icon-button.js +5 -6
  113. package/dist/index.d.ts +8 -0
  114. package/dist/index.js +16 -4
  115. package/dist/input.css +40 -46
  116. package/dist/input.js +39 -21
  117. package/dist/minus.js +12 -0
  118. package/dist/modal.css +9 -9
  119. package/dist/modal.js +1 -1
  120. package/dist/number-input.css +86 -0
  121. package/dist/number-input.js +350 -0
  122. package/dist/overlay.css +5 -5
  123. package/dist/overlay.js +3 -3
  124. package/dist/popover.css +54 -21
  125. package/dist/popover.js +8 -5
  126. package/dist/popover2.js +17 -0
  127. package/dist/progress.css +9 -30
  128. package/dist/progress.js +3 -6
  129. package/dist/radio.css +34 -62
  130. package/dist/radio.js +28 -16
  131. package/dist/select.css +105 -61
  132. package/dist/select.js +12 -8
  133. package/dist/slider.css +508 -41
  134. package/dist/slider.js +1122 -48
  135. package/dist/switch.css +19 -44
  136. package/dist/switch.js +4 -5
  137. package/dist/tabs.css +36 -36
  138. package/dist/tabs.js +1 -1
  139. package/dist/textarea.css +33 -25
  140. package/dist/tooltip.css +7 -35
  141. package/dist/tooltip.js +13 -8
  142. package/dist/useButtonColor.js +16 -14
  143. package/package.json +40 -8
  144. package/src/styles/_mixins.scss +25 -41
  145. package/src/styles/_tokens.scss +615 -182
  146. package/src/styles/_variables.scss +177 -49
@@ -0,0 +1,24 @@
1
+ import { AvatarProps } from './types';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<AvatarProps & {
4
+ onLoad?: ((event: Event) => any) | undefined;
5
+ onError?: ((event: Event) => any) | undefined;
6
+ }> & (typeof globalThis extends {
7
+ __VLS_PROPS_FALLBACK: infer P;
8
+ } ? P : {});
9
+ expose: (exposed: {}) => void;
10
+ attrs: any;
11
+ slots: {
12
+ default?: (props: {}) => any;
13
+ };
14
+ emit: ((evt: "load", event: Event) => void) & ((evt: "error", event: Event) => void);
15
+ }>) => import('vue').VNode & {
16
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
17
+ };
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
21
+ [K in keyof T]: T[K];
22
+ } : {
23
+ [K in keyof T as K]: T[K];
24
+ }) & {};
@@ -0,0 +1,3 @@
1
+ export { default as Avatar } from './avatar';
2
+ export { avatarColors, avatarRadiuses, avatarSizes, avatarVariants } from './types';
3
+ export type { AvatarColor, AvatarProps, AvatarRadius, AvatarSize, AvatarVariant } from './types';
@@ -0,0 +1,2 @@
1
+ import { a as avatar_default, i as avatarVariants, n as avatarRadiuses, r as avatarSizes, t as avatarColors } from "../../avatar.js";
2
+ export { avatar_default as Avatar, avatarColors, avatarRadiuses, avatarSizes, avatarVariants };
@@ -0,0 +1,20 @@
1
+ import { ComponentColorValue } from '../../utils/componentColors';
2
+ export declare const avatarColors: readonly ["dark", "gray", "red", "pink", "grape", "violet", "indigo", "blue", "cyan", "teal", "green", "lime", "yellow", "orange"];
3
+ export declare const avatarSizes: readonly ["xs", "sm", "md", "lg", "xl"];
4
+ export declare const avatarRadiuses: readonly ["none", "xs", "sm", "md", "lg", "xl", "full"];
5
+ export declare const avatarVariants: readonly ["solid", "subtle", "surface", "outline"];
6
+ export type AvatarColor = ComponentColorValue;
7
+ export type AvatarSize = (typeof avatarSizes)[number];
8
+ export type AvatarRadius = (typeof avatarRadiuses)[number];
9
+ export type AvatarVariant = (typeof avatarVariants)[number];
10
+ export interface AvatarProps {
11
+ src?: string | null;
12
+ alt?: string;
13
+ ariaLabel?: string;
14
+ name?: string;
15
+ variant?: AvatarVariant;
16
+ color?: AvatarColor;
17
+ autoContrast?: boolean;
18
+ size?: AvatarSize;
19
+ radius?: AvatarRadius;
20
+ }
@@ -0,0 +1,3 @@
1
+ import { CSSProperties } from 'vue';
2
+ import { AvatarColor, AvatarVariant } from './types';
3
+ export declare function getAvatarColorStyle(color: AvatarColor | undefined, variant: AvatarVariant | undefined, autoContrast: boolean | undefined): CSSProperties | undefined;
@@ -1,5 +1,5 @@
1
1
  import { ComponentColorValue } from '../../utils/componentColors';
2
- export declare const badgeColors: readonly ["primary", "secondary", "success", "warning", "danger", "info", "neutral"];
2
+ export declare const badgeColors: readonly ["dark", "gray", "red", "pink", "grape", "violet", "indigo", "blue", "cyan", "teal", "green", "lime", "yellow", "orange"];
3
3
  export declare const badgeSizes: readonly ["xs", "sm", "md", "lg", "xl"];
4
4
  export declare const badgeRadiuses: readonly ["none", "xs", "sm", "md", "lg", "xl", "full"];
5
5
  export declare const badgeVariants: readonly ["solid", "subtle", "surface", "outline"];
@@ -10,6 +10,7 @@ export type BadgeVariant = (typeof badgeVariants)[number];
10
10
  export interface BadgeProps {
11
11
  variant?: BadgeVariant;
12
12
  color?: BadgeColor;
13
+ autoContrast?: boolean;
13
14
  size?: BadgeSize;
14
15
  radius?: BadgeRadius;
15
16
  ariaLabel?: string;
@@ -1,8 +1,3 @@
1
- import { BadgeColor } from './types';
2
- export declare function getBadgeColorStyle(color: BadgeColor | undefined): {
3
- '--_rp-badge-custom-color': string & {};
4
- '--_rp-badge-custom-fg': string & {};
5
- '--_rp-badge-custom-on': string;
6
- '--_rp-badge-custom-subtle-bg': string;
7
- '--_rp-badge-custom-border': string;
8
- } | undefined;
1
+ import { CSSProperties } from 'vue';
2
+ import { BadgeColor, BadgeVariant } from './types';
3
+ export declare function getBadgeColorStyle(color: BadgeColor | undefined, variant: BadgeVariant | undefined, autoContrast: boolean | undefined): CSSProperties | undefined;
@@ -6,6 +6,7 @@ export type ButtonVariant = 'solid' | 'subtle' | 'surface' | 'outline' | 'ghost'
6
6
  export interface ButtonProps {
7
7
  variant?: ButtonVariant;
8
8
  color?: ButtonColor;
9
+ autoContrast?: boolean;
9
10
  size?: ButtonSize;
10
11
  radius?: ButtonRadius;
11
12
  type?: 'button' | 'submit' | 'reset';
@@ -1,13 +1,3 @@
1
- import { ButtonColor } from './types';
2
- export declare function getButtonColorStyle(color: ButtonColor | undefined): {
3
- '--_rp-button-custom-color': string & {};
4
- '--_rp-button-custom-hover': string;
5
- '--_rp-button-custom-active': string;
6
- '--_rp-button-custom-on': string;
7
- '--_rp-button-custom-subtle-bg': string;
8
- '--_rp-button-custom-subtle-bg-hover': string;
9
- '--_rp-button-custom-subtle-bg-active': string;
10
- '--_rp-button-custom-border': string;
11
- '--_rp-button-custom-border-hover': string;
12
- '--_rp-button-custom-fg': string & {};
13
- } | undefined;
1
+ import { CSSProperties } from 'vue';
2
+ import { ButtonColor, ButtonVariant } from './types';
3
+ export declare function getButtonColorStyle(color: ButtonColor | undefined, variant: ButtonVariant | undefined, autoContrast: boolean | undefined): CSSProperties | undefined;
@@ -0,0 +1,27 @@
1
+ import { ButtonLinkProps } from './types';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<ButtonLinkProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ loading?: (props: {}) => any;
10
+ } & {
11
+ left?: (props: {}) => any;
12
+ } & {
13
+ default?: (props: {}) => any;
14
+ } & {
15
+ right?: (props: {}) => any;
16
+ };
17
+ emit: {};
18
+ }>) => import('vue').VNode & {
19
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
20
+ };
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;
23
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
24
+ [K in keyof T]: T[K];
25
+ } : {
26
+ [K in keyof T as K]: T[K];
27
+ }) & {};
@@ -0,0 +1,2 @@
1
+ export { default as ButtonLink } from './button-link';
2
+ export type { ButtonLinkColor, ButtonLinkProps, ButtonLinkRadius, ButtonLinkSize, ButtonLinkTarget, ButtonLinkVariant, } from './types';
@@ -0,0 +1,2 @@
1
+ import { t as button_link_default } from "../../button-link.js";
2
+ export { button_link_default as ButtonLink };
@@ -0,0 +1,20 @@
1
+ import { ButtonColor, ButtonRadius, ButtonSize, ButtonVariant } from '../button/types';
2
+ export type ButtonLinkColor = ButtonColor;
3
+ export type ButtonLinkSize = ButtonSize;
4
+ export type ButtonLinkRadius = ButtonRadius;
5
+ export type ButtonLinkVariant = ButtonVariant;
6
+ export type ButtonLinkTarget = '_self' | '_blank' | '_parent' | '_top' | (string & {});
7
+ export interface ButtonLinkProps {
8
+ href?: string;
9
+ target?: ButtonLinkTarget;
10
+ rel?: string;
11
+ download?: string | boolean;
12
+ hreflang?: string;
13
+ variant?: ButtonLinkVariant;
14
+ color?: ButtonLinkColor;
15
+ autoContrast?: boolean;
16
+ size?: ButtonLinkSize;
17
+ radius?: ButtonLinkRadius;
18
+ disabled?: boolean;
19
+ loading?: boolean;
20
+ }
@@ -9,6 +9,7 @@ export interface CheckboxProps {
9
9
  modelValue: boolean;
10
10
  variant?: CheckboxVariant;
11
11
  color?: CheckboxColor;
12
+ autoContrast?: boolean;
12
13
  size?: CheckboxSize;
13
14
  radius?: CheckboxRadius;
14
15
  disabled?: boolean;
@@ -1,10 +1,8 @@
1
+ import { CSSProperties } from 'vue';
1
2
  import { CheckboxProps } from './types';
2
3
  export declare function useCheckbox(props: Readonly<CheckboxProps>, emitUpdate: (value: boolean) => void): {
3
4
  control: import('../../composables/useControlState').ControlState;
4
5
  rootClass: import('vue').ComputedRef<string[]>;
5
- rootStyle: import('vue').ComputedRef<{
6
- '--_rp-checkbox-custom-color': string & {};
7
- '--_rp-checkbox-custom-on-color': string;
8
- } | undefined>;
6
+ rootStyle: import('vue').ComputedRef<CSSProperties | undefined>;
9
7
  onChange: (e: Event) => void;
10
8
  };
@@ -0,0 +1,29 @@
1
+ import { ColorInputProps } from './types';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<ColorInputProps & {
4
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
5
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
6
+ }> & (typeof globalThis extends {
7
+ __VLS_PROPS_FALLBACK: infer P;
8
+ } ? P : {});
9
+ expose: (exposed: {}) => void;
10
+ attrs: any;
11
+ slots: {
12
+ left?: (props: {
13
+ color: string | undefined;
14
+ empty: boolean;
15
+ }) => any;
16
+ } & {
17
+ 'eye-dropper-icon'?: (props: {}) => any;
18
+ };
19
+ emit: ((evt: "update:open", value: boolean) => void) & ((evt: "update:modelValue", value: string) => void);
20
+ }>) => import('vue').VNode & {
21
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
22
+ };
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
26
+ [K in keyof T]: T[K];
27
+ } : {
28
+ [K in keyof T as K]: T[K];
29
+ }) & {};
@@ -0,0 +1,2 @@
1
+ export { default as ColorInput } from './color-input';
2
+ export type { ColorInputProps } from './types';
@@ -0,0 +1,2 @@
1
+ import { t as color_input_default } from "../../color-input.js";
2
+ export { color_input_default as ColorInput };
@@ -0,0 +1,34 @@
1
+ import { InputHTMLAttributes } from 'vue';
2
+ import { ColorPickerFormat, ColorPickerValue } from '../color-picker/types';
3
+ import { InputRadius, InputSize } from '../input/types';
4
+ import { PopoverPlacement } from '../popover/types';
5
+ export interface ColorInputProps {
6
+ id?: string;
7
+ name?: string;
8
+ modelValue: ColorPickerValue;
9
+ format?: ColorPickerFormat;
10
+ size?: InputSize;
11
+ radius?: InputRadius;
12
+ placeholder?: string;
13
+ disabled?: boolean;
14
+ readonly?: boolean;
15
+ disallowInput?: boolean;
16
+ swatchesOnly?: boolean;
17
+ required?: boolean;
18
+ invalid?: boolean;
19
+ valid?: boolean;
20
+ ariaLabel?: string;
21
+ describedby?: string;
22
+ labelledby?: string;
23
+ inputAttrs?: InputHTMLAttributes;
24
+ validateColor?: boolean;
25
+ invalidColorMessage?: string;
26
+ swatches?: string[];
27
+ swatchesPerRow?: number;
28
+ placement?: PopoverPlacement;
29
+ open?: boolean;
30
+ popoverId?: string;
31
+ pickerAriaLabel?: string;
32
+ withEyeDropper?: boolean;
33
+ eyeDropperAriaLabel?: string;
34
+ }
@@ -0,0 +1,27 @@
1
+ import { ColorPickerValue } from '../color-picker/types';
2
+ import { ColorInputProps } from './types';
3
+ interface UseColorInputEmitters {
4
+ modelValue: (value: ColorPickerValue) => void;
5
+ open: (value: boolean) => void;
6
+ }
7
+ export declare function useColorInput(props: Readonly<ColorInputProps>, emit: UseColorInputEmitters): {
8
+ onInputUpdate: (nextValue: ColorPickerValue) => void;
9
+ onPickerUpdate: (nextValue: ColorPickerValue) => void;
10
+ onOpenUpdate: (open: boolean) => void;
11
+ showEyeDropper: import('vue').ComputedRef<boolean>;
12
+ isPickingColor: import('vue').Ref<boolean, boolean>;
13
+ pickScreenColor: (closePicker: () => void) => Promise<void>;
14
+ getInputTriggerAttrs: (slotProps: unknown) => import('vue').InputHTMLAttributes;
15
+ rememberClose: (slotProps: import('../popover').PopoverSlotProps | import('../popover').PopoverContentSlotProps) => void;
16
+ onPickerKeydown: (event: KeyboardEvent, popover: import('../popover').PopoverContentSlotProps) => void;
17
+ onFocusOut: (event: FocusEvent) => void;
18
+ previewColor: import('vue').ComputedRef<string | undefined>;
19
+ hasValidSwatches: import('vue').ComputedRef<boolean>;
20
+ hasInvalidColor: import('vue').ComputedRef<boolean | undefined>;
21
+ isInvalid: import('vue').ComputedRef<boolean | undefined>;
22
+ colorValidationMessage: import('vue').ComputedRef<string | undefined>;
23
+ control: import('../../composables/useControlState').ControlState;
24
+ rootClass: import('vue').ComputedRef<string[]>;
25
+ popoverDisabled: import('vue').ComputedRef<boolean>;
26
+ };
27
+ export {};
@@ -0,0 +1,13 @@
1
+ import { ColorPickerFormat, ColorPickerValue } from '../color-picker/types';
2
+ interface UseColorInputEyeDropperOptions {
3
+ enabled: () => boolean;
4
+ disabled: () => boolean;
5
+ format: () => ColorPickerFormat;
6
+ update: (value: ColorPickerValue) => void;
7
+ }
8
+ export declare function useColorInputEyeDropper(options: UseColorInputEyeDropperOptions): {
9
+ showEyeDropper: import('vue').ComputedRef<boolean>;
10
+ isPickingColor: import('vue').Ref<boolean, boolean>;
11
+ pickScreenColor: (closePicker: () => void) => Promise<void>;
12
+ };
13
+ export {};
@@ -0,0 +1,11 @@
1
+ import { InputHTMLAttributes } from 'vue';
2
+ import { PopoverContentSlotProps, PopoverSlotProps } from '../popover/types';
3
+ import { ColorInputProps } from './types';
4
+ declare function onPickerKeydown(event: KeyboardEvent, popover: PopoverContentSlotProps): void;
5
+ export declare function useColorInputPopover(getInputAttrs: () => ColorInputProps['inputAttrs']): {
6
+ getInputTriggerAttrs: (slotProps: unknown) => InputHTMLAttributes;
7
+ rememberClose: (slotProps: PopoverSlotProps | PopoverContentSlotProps) => void;
8
+ onPickerKeydown: typeof onPickerKeydown;
9
+ onFocusOut: (event: FocusEvent) => void;
10
+ };
11
+ export {};
@@ -0,0 +1,8 @@
1
+ import { ColorInputProps } from './types';
2
+ export declare function useColorInputValue(props: Readonly<ColorInputProps>, isControlInvalid: () => boolean): {
3
+ previewColor: import('vue').ComputedRef<string | undefined>;
4
+ hasValidSwatches: import('vue').ComputedRef<boolean>;
5
+ hasInvalidColor: import('vue').ComputedRef<boolean | undefined>;
6
+ isInvalid: import('vue').ComputedRef<boolean | undefined>;
7
+ colorValidationMessage: import('vue').ComputedRef<string | undefined>;
8
+ };
@@ -0,0 +1,21 @@
1
+ import { ColorPickerSaturationProps, ColorPickerSelection } from './types';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<ColorPickerSaturationProps & {
4
+ "onUpdate:modelValue"?: ((value: ColorPickerSelection) => any) | undefined;
5
+ }> & (typeof globalThis extends {
6
+ __VLS_PROPS_FALLBACK: infer P;
7
+ } ? P : {});
8
+ expose: (exposed: {}) => void;
9
+ attrs: any;
10
+ slots: {};
11
+ emit: (evt: "update:modelValue", value: ColorPickerSelection) => void;
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,21 @@
1
+ import { ColorPickerSliderProps } from './types';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<ColorPickerSliderProps & {
4
+ "onUpdate:value"?: ((value: number) => any) | undefined;
5
+ }> & (typeof globalThis extends {
6
+ __VLS_PROPS_FALLBACK: infer P;
7
+ } ? P : {});
8
+ expose: (exposed: {}) => void;
9
+ attrs: any;
10
+ slots: {};
11
+ emit: (evt: "update:value", value: number) => void;
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,23 @@
1
+ import { ColorPickerFormat } from './types';
2
+ export declare const DEFAULT_HUE = 0;
3
+ export declare const HUE_MAX = 359;
4
+ export declare const KEYBOARD_STEP = 1;
5
+ export declare const KEYBOARD_LARGE_STEP = 10;
6
+ export declare const DEFAULT_OPACITY = 100;
7
+ export interface ColorPickerHsvColor {
8
+ hue: number;
9
+ saturation: number;
10
+ value: number;
11
+ opacity: number;
12
+ }
13
+ export declare function clamp(value: number, min: number, max: number): number;
14
+ export declare function clampPercent(value: number | undefined): number;
15
+ export declare function normalizeHue(value: number | undefined): number;
16
+ export declare function normalizeHueForColor(value: number | undefined): number;
17
+ export declare function clampHue(value: number): number;
18
+ export declare function clampOpacity(value: number | undefined): number;
19
+ export declare function roundPercent(value: number): number;
20
+ export declare function isColorPickerAlphaFormat(format: ColorPickerFormat): format is "hexa" | "rgba" | "hsla";
21
+ export declare function parseColorPickerValue(value: string): ColorPickerHsvColor | undefined;
22
+ export declare function formatColorPickerValue(color: ColorPickerHsvColor, format: ColorPickerFormat): string;
23
+ export declare function getHsvCssColor(hue: number, saturation: number, value: number): string;
@@ -0,0 +1,23 @@
1
+ import { ColorPickerProps } from './types';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<ColorPickerProps & {
4
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
5
+ }> & (typeof globalThis extends {
6
+ __VLS_PROPS_FALLBACK: infer P;
7
+ } ? P : {});
8
+ expose: (exposed: {}) => void;
9
+ attrs: any;
10
+ slots: {
11
+ default?: (props: {}) => any;
12
+ };
13
+ emit: (evt: "update:modelValue", value: string) => void;
14
+ }>) => import('vue').VNode & {
15
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
16
+ };
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
20
+ [K in keyof T]: T[K];
21
+ } : {
22
+ [K in keyof T as K]: T[K];
23
+ }) & {};
@@ -0,0 +1,3 @@
1
+ export { default as ColorPicker } from './color-picker';
2
+ export { colorPickerFormats, colorPickerSizes } from './types';
3
+ export type { ColorPickerFormat, ColorPickerProps, ColorPickerSelection, ColorPickerSize, ColorPickerValue, } from './types';
@@ -0,0 +1,3 @@
1
+ import { t as color_picker_default } from "../../color-picker.js";
2
+ import { n as colorPickerSizes, t as colorPickerFormats } from "../../color-picker2.js";
3
+ export { color_picker_default as ColorPicker, colorPickerFormats, colorPickerSizes };
@@ -0,0 +1,39 @@
1
+ export declare const colorPickerFormats: readonly ["hex", "hexa", "rgb", "rgba", "hsl", "hsla"];
2
+ export declare const colorPickerSizes: readonly ["xs", "sm", "md", "lg", "xl"];
3
+ export type ColorPickerFormat = (typeof colorPickerFormats)[number];
4
+ export type ColorPickerSize = (typeof colorPickerSizes)[number];
5
+ export interface ColorPickerSelection {
6
+ saturation: number;
7
+ value: number;
8
+ opacity?: number;
9
+ }
10
+ export type ColorPickerValue = string;
11
+ export interface ColorPickerProps {
12
+ id?: string;
13
+ modelValue: ColorPickerValue;
14
+ format?: ColorPickerFormat;
15
+ size?: ColorPickerSize;
16
+ readonly?: boolean;
17
+ withPicker?: boolean;
18
+ swatches?: string[];
19
+ swatchesPerRow?: number;
20
+ ariaLabel?: string;
21
+ describedby?: string;
22
+ labelledby?: string;
23
+ }
24
+ export interface ColorPickerSaturationProps {
25
+ id?: string;
26
+ modelValue: ColorPickerSelection;
27
+ hue?: number;
28
+ readonly?: boolean;
29
+ ariaLabel?: string;
30
+ describedby?: string;
31
+ labelledby?: string;
32
+ }
33
+ export type ColorPickerSliderVariant = 'hue' | 'opacity';
34
+ export interface ColorPickerSliderProps {
35
+ variant: ColorPickerSliderVariant;
36
+ value?: number;
37
+ color?: string;
38
+ readonly?: boolean;
39
+ }
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ interface UseColorPickerDragOptions {
3
+ target: Ref<HTMLElement | null>;
4
+ focusTarget?: Ref<HTMLElement | null>;
5
+ readonly: () => boolean;
6
+ updateFromPointer: (event: PointerEvent, target: HTMLElement) => void;
7
+ }
8
+ export declare function useColorPickerDrag({ target, focusTarget, readonly, updateFromPointer, }: UseColorPickerDragOptions): {
9
+ onPointerDown: (event: PointerEvent) => void;
10
+ };
11
+ export {};
@@ -0,0 +1,21 @@
1
+ import { CSSProperties } from 'vue';
2
+ import { ColorPickerProps } from './types';
3
+ type ColorPickerSwatchesProps = Readonly<Pick<ColorPickerProps, 'swatches' | 'swatchesPerRow'>>;
4
+ interface UseColorPickerSwatchesOptions {
5
+ isSelected: (swatch: string) => boolean;
6
+ select: (swatch: string) => void;
7
+ }
8
+ export declare function useColorPickerSwatches(props: ColorPickerSwatchesProps, options: UseColorPickerSwatchesOptions): {
9
+ swatchesRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
10
+ normalizedSwatchesPerRow: import('vue').ComputedRef<number | undefined>;
11
+ validSwatches: import('vue').ComputedRef<string[]>;
12
+ swatchesStyle: import('vue').ComputedRef<CSSProperties | undefined>;
13
+ swatchSize: import('vue').ComputedRef<"100%" | "var(--_rp-color-picker-swatch-size)">;
14
+ isSwatchSelected: (index: number) => boolean;
15
+ getSwatchTabindex: (index: number) => 0 | -1;
16
+ selectSwatch: (swatch: string) => void;
17
+ onSwatchFocus: (index: number) => void;
18
+ onSwatchesFocusout: (event: FocusEvent) => void;
19
+ onSwatchKeydown: (event: KeyboardEvent, index: number) => void;
20
+ };
21
+ export {};
@@ -0,0 +1,15 @@
1
+ import { ColorPickerHsvColor } from './color-picker-utils';
2
+ import { ColorPickerProps, ColorPickerSelection, ColorPickerValue } from './types';
3
+ type ColorPickerValueProps = Readonly<Pick<ColorPickerProps, 'modelValue' | 'format' | 'readonly'>>;
4
+ export declare function useColorPickerValue(props: ColorPickerValueProps, emitUpdate: (value: ColorPickerValue) => void): {
5
+ selectedColor: import('vue').ComputedRef<ColorPickerHsvColor>;
6
+ saturationValue: import('vue').ComputedRef<ColorPickerSelection>;
7
+ opacityColor: import('vue').ComputedRef<string>;
8
+ showAlphaControls: import('vue').ComputedRef<boolean>;
9
+ updateSelection: (value: ColorPickerSelection) => void;
10
+ updateHue: (value: number) => void;
11
+ updateOpacity: (value: number) => void;
12
+ selectColor: (value: string) => void;
13
+ isColorSelected: (value: string) => boolean;
14
+ };
15
+ export {};
@@ -0,0 +1,21 @@
1
+ import { ColorSwatchProps } from './types';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<ColorSwatchProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ emit: {};
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,2 @@
1
+ export { default as ColorSwatch } from './color-swatch';
2
+ export type { ColorSwatchProps, ColorSwatchSize } from './types';
@@ -0,0 +1,2 @@
1
+ import { t as color_swatch_default } from "../../color-swatch.js";
2
+ export { color_swatch_default as ColorSwatch };
@@ -0,0 +1,6 @@
1
+ export type ColorSwatchSize = string | number;
2
+ export interface ColorSwatchProps {
3
+ color: string;
4
+ size?: ColorSwatchSize;
5
+ ariaLabel?: string;
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare function getColorSwatchForeground(color: string): "var(--rp-color-white)" | "var(--rp-color-black)";
2
+ export declare function getColorSwatchOverlay(color: string): {
3
+ stroke: string;
4
+ shadow: string;
5
+ };
@@ -1,8 +1,8 @@
1
1
  import { DropdownMenuItem, DropdownMenuItemSlotProps, DropdownMenuProps, DropdownMenuSlotProps } from './types';
2
2
  declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuProps & {
4
- onSelect?: ((item: DropdownMenuItem) => any) | undefined;
5
4
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
5
+ onSelect?: ((item: DropdownMenuItem) => any) | undefined;
6
6
  }> & (typeof globalThis extends {
7
7
  __VLS_PROPS_FALLBACK: infer P;
8
8
  } ? P : {});
@@ -13,7 +13,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
13
13
  item?(props: DropdownMenuItemSlotProps): unknown;
14
14
  empty?(): unknown;
15
15
  };
16
- emit: ((evt: "select", item: DropdownMenuItem) => void) & ((evt: "update:open", value: boolean) => void);
16
+ emit: ((evt: "update:open", value: boolean) => void) & ((evt: "select", item: DropdownMenuItem) => void);
17
17
  }>) => import('vue').VNode & {
18
18
  __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
19
19
  };
@@ -11,7 +11,7 @@ export declare function useDropdownMenu(props: Readonly<DropdownMenuProps>, emit
11
11
  visibleItems: import('vue').ComputedRef<DropdownMenuItem[]>;
12
12
  renderedItems: import('vue').ComputedRef<import('./types').DropdownMenuRenderedItem[]>;
13
13
  focusedIndex: import('vue').ComputedRef<number>;
14
- focusedPath: import('vue').Ref<number[], import('./types').DropdownMenuItemPath | number[]>;
14
+ focusedPath: import('vue').Ref<number[], number[] | import('./types').DropdownMenuItemPath>;
15
15
  activeDescendantId: import('vue').ComputedRef<string | undefined>;
16
16
  rootClass: import('vue').ComputedRef<string[]>;
17
17
  contentClass: import('vue').ComputedRef<string[]>;
@@ -4,7 +4,7 @@ type DropdownMenuItemsSource = {
4
4
  readonly value: DropdownMenuItem[];
5
5
  };
6
6
  export declare function useDropdownMenuNavigation(items: DropdownMenuItemsSource): {
7
- focusedPath: import('vue').Ref<number[], import('./types').DropdownMenuItemPath | number[]>;
7
+ focusedPath: import('vue').Ref<number[], number[] | import('./types').DropdownMenuItemPath>;
8
8
  focusedIndex: import('vue').ComputedRef<number>;
9
9
  getItemsAtPath: (path: ItemPath) => DropdownMenuItem[];
10
10
  getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;