tyrell-react 1.0.0-TC30 → 1.0.0-TC31

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 (60) hide show
  1. package/dist/components/TyCalendar.d.ts +5 -0
  2. package/dist/components/TyCalendar.d.ts.map +1 -1
  3. package/dist/components/TyCalendar.js +4 -1
  4. package/dist/components/TyCalendar.js.map +1 -1
  5. package/dist/components/TyCalendarMonth.d.ts +5 -0
  6. package/dist/components/TyCalendarMonth.d.ts.map +1 -1
  7. package/dist/components/TyCalendarMonth.js +3 -1
  8. package/dist/components/TyCalendarMonth.js.map +1 -1
  9. package/dist/components/TyCheckbox.d.ts +4 -1
  10. package/dist/components/TyCheckbox.d.ts.map +1 -1
  11. package/dist/components/TyCheckbox.js.map +1 -1
  12. package/dist/components/TyCopy.d.ts +4 -1
  13. package/dist/components/TyCopy.d.ts.map +1 -1
  14. package/dist/components/TyCopy.js.map +1 -1
  15. package/dist/components/TyDatePicker.d.ts +6 -3
  16. package/dist/components/TyDatePicker.d.ts.map +1 -1
  17. package/dist/components/TyDatePicker.js.map +1 -1
  18. package/dist/components/TyInput.d.ts +6 -2
  19. package/dist/components/TyInput.d.ts.map +1 -1
  20. package/dist/components/TyInput.js.map +1 -1
  21. package/dist/components/TyModal.d.ts +5 -0
  22. package/dist/components/TyModal.d.ts.map +1 -1
  23. package/dist/components/TyModal.js +3 -1
  24. package/dist/components/TyModal.js.map +1 -1
  25. package/dist/components/TyRadio.d.ts +4 -1
  26. package/dist/components/TyRadio.d.ts.map +1 -1
  27. package/dist/components/TyRadio.js.map +1 -1
  28. package/dist/components/TyRadioGroup.d.ts +4 -1
  29. package/dist/components/TyRadioGroup.d.ts.map +1 -1
  30. package/dist/components/TyRadioGroup.js.map +1 -1
  31. package/dist/components/TySelect.d.ts +28 -0
  32. package/dist/components/TySelect.d.ts.map +1 -1
  33. package/dist/components/TySelect.js +17 -2
  34. package/dist/components/TySelect.js.map +1 -1
  35. package/dist/components/TySwitch.d.ts +4 -1
  36. package/dist/components/TySwitch.d.ts.map +1 -1
  37. package/dist/components/TySwitch.js.map +1 -1
  38. package/dist/components/TyTag.d.ts +4 -1
  39. package/dist/components/TyTag.d.ts.map +1 -1
  40. package/dist/components/TyTag.js.map +1 -1
  41. package/dist/components/TyTooltip.d.ts +4 -1
  42. package/dist/components/TyTooltip.d.ts.map +1 -1
  43. package/dist/components/TyTooltip.js.map +1 -1
  44. package/dist/version.d.ts +1 -1
  45. package/dist/version.js +1 -1
  46. package/package.json +1 -1
  47. package/src/components/TyCalendar.tsx +12 -1
  48. package/src/components/TyCalendarMonth.tsx +9 -1
  49. package/src/components/TyCheckbox.tsx +4 -1
  50. package/src/components/TyCopy.tsx +4 -1
  51. package/src/components/TyDatePicker.tsx +6 -3
  52. package/src/components/TyInput.tsx +6 -2
  53. package/src/components/TyModal.tsx +8 -0
  54. package/src/components/TyRadio.tsx +4 -1
  55. package/src/components/TyRadioGroup.tsx +4 -1
  56. package/src/components/TySelect.tsx +43 -1
  57. package/src/components/TySwitch.tsx +4 -1
  58. package/src/components/TyTag.tsx +4 -1
  59. package/src/components/TyTooltip.tsx +4 -1
  60. package/src/version.ts +1 -1
@@ -2,6 +2,9 @@ import React, { useEffect, useRef, useCallback } from 'react';
2
2
  import { hostProps } from '../utils/host-props';
3
3
  import { useBooleanProperty } from '../utils/use-boolean-prop';
4
4
 
5
+ type BuiltinFlavor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
6
+ type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`;
7
+
5
8
  // CSS custom properties that cascade into the shadow DOM for full color control
6
9
  export interface TyTagCSSProperties extends React.CSSProperties {
7
10
  '--tag-bg'?: string;
@@ -11,7 +14,7 @@ export interface TyTagCSSProperties extends React.CSSProperties {
11
14
 
12
15
  // Type definitions for Ty Tag component
13
16
  export interface TyTagProps extends Omit<React.HTMLAttributes<HTMLElement>, 'style' | 'onClick'> {
14
- flavor?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
17
+ flavor?: ShadedFlavor | (string & {});
15
18
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
16
19
  notPill?: boolean;
17
20
  clickable?: boolean;
@@ -2,6 +2,9 @@ import React, { useEffect, useRef } from 'react';
2
2
  import { hostProps } from '../utils/host-props';
3
3
  import { useBooleanProperty } from '../utils/use-boolean-prop';
4
4
 
5
+ type BuiltinFlavor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
6
+ type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`;
7
+
5
8
  // Type definitions for Ty Tooltip component
6
9
  export interface TyTooltipProps extends React.HTMLAttributes<HTMLElement> {
7
10
  /** Tooltip positioning relative to the parent element */
@@ -17,7 +20,7 @@ export interface TyTooltipProps extends React.HTMLAttributes<HTMLElement> {
17
20
  disabled?: boolean;
18
21
 
19
22
  /** Semantic styling variant */
20
- flavor?: 'dark' | 'light' | 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'neutral';
23
+ flavor?: 'dark' | 'light' | 'info' | ShadedFlavor | (string & {});
21
24
 
22
25
  /** Tooltip content */
23
26
  children?: React.ReactNode;
package/src/version.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  // Run 'npm run generate:version' to regenerate.
4
4
 
5
5
  /** Current version of tyrell-react. Synced with package.json on build. */
6
- export const VERSION = '1.0.0-TC30'
6
+ export const VERSION = '1.0.0-TC31'