tyrell-react 1.0.0-TC45 → 1.0.0-TC46
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.
- package/dist/components/TyCalendar.d.ts.map +1 -1
- package/dist/components/TyCalendar.js +0 -8
- package/dist/components/TyCalendar.js.map +1 -1
- package/dist/components/TyCalendarMonth.d.ts.map +1 -1
- package/dist/components/TyCalendarMonth.js +0 -5
- package/dist/components/TyCalendarMonth.js.map +1 -1
- package/dist/components/TyCalendarNavigation.d.ts.map +1 -1
- package/dist/components/TyCalendarNavigation.js +0 -5
- package/dist/components/TyCalendarNavigation.js.map +1 -1
- package/dist/components/TyCheckbox.d.ts.map +1 -1
- package/dist/components/TyCheckbox.js +0 -8
- package/dist/components/TyCheckbox.js.map +1 -1
- package/dist/components/TyCopy.d.ts.map +1 -1
- package/dist/components/TyCopy.js +0 -6
- package/dist/components/TyCopy.js.map +1 -1
- package/dist/components/TyDatePicker.d.ts.map +1 -1
- package/dist/components/TyDatePicker.js +0 -7
- package/dist/components/TyDatePicker.js.map +1 -1
- package/dist/components/TyFileUpload.d.ts.map +1 -1
- package/dist/components/TyFileUpload.js +0 -1
- package/dist/components/TyFileUpload.js.map +1 -1
- package/dist/components/TyIcon.d.ts.map +1 -1
- package/dist/components/TyIcon.js +0 -4
- package/dist/components/TyIcon.js.map +1 -1
- package/dist/components/TyInput.d.ts.map +1 -1
- package/dist/components/TyInput.js +0 -10
- package/dist/components/TyInput.js.map +1 -1
- package/dist/components/TyModal.d.ts.map +1 -1
- package/dist/components/TyModal.js +0 -6
- package/dist/components/TyModal.js.map +1 -1
- package/dist/components/TyOption.d.ts.map +1 -1
- package/dist/components/TyOption.js +0 -2
- package/dist/components/TyOption.js.map +1 -1
- package/dist/components/TyPopup.d.ts.map +1 -1
- package/dist/components/TyPopup.js +0 -4
- package/dist/components/TyPopup.js.map +1 -1
- package/dist/components/TyResizeObserver.d.ts.map +1 -1
- package/dist/components/TyResizeObserver.js +0 -4
- package/dist/components/TyResizeObserver.js.map +1 -1
- package/dist/components/TyScrollContainer.d.ts.map +1 -1
- package/dist/components/TyScrollContainer.js +0 -6
- package/dist/components/TyScrollContainer.js.map +1 -1
- package/dist/components/TySelect.d.ts.map +1 -1
- package/dist/components/TySelect.js +0 -6
- package/dist/components/TySelect.js.map +1 -1
- package/dist/components/TyStep.d.ts.map +1 -1
- package/dist/components/TyStep.js +0 -5
- package/dist/components/TyStep.js.map +1 -1
- package/dist/components/TyTab.d.ts.map +1 -1
- package/dist/components/TyTab.js +0 -6
- package/dist/components/TyTab.js.map +1 -1
- package/dist/components/TyTabs.d.ts.map +1 -1
- package/dist/components/TyTabs.js +0 -5
- package/dist/components/TyTabs.js.map +1 -1
- package/dist/components/TyTag.d.ts.map +1 -1
- package/dist/components/TyTag.js +0 -2
- package/dist/components/TyTag.js.map +1 -1
- package/dist/components/TyTextarea.d.ts.map +1 -1
- package/dist/components/TyTextarea.js +0 -6
- package/dist/components/TyTextarea.js.map +1 -1
- package/dist/components/TyTooltip.d.ts.map +1 -1
- package/dist/components/TyTooltip.js +0 -4
- package/dist/components/TyTooltip.js.map +1 -1
- package/dist/components/TyWizard.d.ts.map +1 -1
- package/dist/components/TyWizard.js +0 -5
- package/dist/components/TyWizard.js.map +1 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -62
- package/dist/components/index.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/src/components/TyCalendar.tsx +0 -9
- package/src/components/TyCalendarMonth.tsx +0 -6
- package/src/components/TyCalendarNavigation.tsx +0 -6
- package/src/components/TyCheckbox.tsx +0 -9
- package/src/components/TyCopy.tsx +0 -7
- package/src/components/TyDatePicker.tsx +0 -8
- package/src/components/TyFileUpload.tsx +0 -2
- package/src/components/TyIcon.tsx +0 -5
- package/src/components/TyInput.tsx +0 -12
- package/src/components/TyModal.tsx +0 -9
- package/src/components/TyOption.tsx +0 -3
- package/src/components/TyPopup.tsx +0 -6
- package/src/components/TyResizeObserver.tsx +0 -5
- package/src/components/TyScrollContainer.tsx +0 -8
- package/src/components/TySelect.tsx +0 -9
- package/src/components/TyStep.tsx +0 -6
- package/src/components/TyTab.tsx +0 -7
- package/src/components/TyTabs.tsx +0 -6
- package/src/components/TyTag.tsx +0 -3
- package/src/components/TyTextarea.tsx +0 -8
- package/src/components/TyTooltip.tsx +0 -5
- package/src/components/TyWizard.tsx +0 -6
- package/src/components/index.ts +2 -97
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TyTooltip.js","sourceRoot":"","sources":["../../src/components/TyTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"TyTooltip.js","sourceRoot":"","sources":["../../src/components/TyTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAyB/D,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,UAAU,CACvC,CAAC,EACC,SAAS,EACT,MAAM,EACN,KAAK,EACL,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,GAAG,EAAE,EAAE;IACR,MAAM,UAAU,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE7C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,GAAG,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;YAC9B,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE,CAAC;gBAC9B,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YAC1B,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC;YACnC,CAAC;QACH,CAAC;IACH,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,MAAM,iBAAiB,GAAwB;QAC7C,GAAG,SAAS,CAAC,KAAK,CAAC;QACnB,GAAG,EAAE,UAAU;KAChB,CAAC;IAEF,IAAI,SAAS,EAAE,CAAC;QACd,iBAAiB,CAAC,SAAS,GAAG,SAAS,CAAC;IAC1C,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC/C,CAAC;IAED,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,iBAAiB,CAAC,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC7C,CAAC;IAED,MAAM,UAAU,GAAG,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACxE,IAAI,UAAU;QAAE,iBAAiB,CAAC,QAAQ,GAAG,EAAE,CAAC;IAEhD,IAAI,MAAM,EAAE,CAAC;QACX,iBAAiB,CAAC,MAAM,GAAG,MAAM,CAAC;IACpC,CAAC;IAED,OAAO,KAAK,CAAC,aAAa,CACxB,YAAY,EACZ,iBAAiB,EACjB,QAAQ,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TyWizard.d.ts","sourceRoot":"","sources":["../../src/components/TyWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TyWizard.d.ts","sourceRoot":"","sources":["../../src/components/TyWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACxF,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4BAA4B;IAC5B,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAExC,gCAAgC;IAChC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAEpE,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,CAAC;CAC5C;AAED,eAAO,MAAM,QAAQ,mFAyDpB,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { hostProps } from '../utils/host-props';
|
|
3
|
-
// React wrapper for ty-wizard web component
|
|
4
3
|
export const TyWizard = React.forwardRef(({ children, width, height, active, completed, orientation, onStepChange, ...props }, ref) => {
|
|
5
4
|
const elementRef = useRef(null);
|
|
6
|
-
// Handle step change events
|
|
7
5
|
useEffect(() => {
|
|
8
6
|
const element = elementRef.current;
|
|
9
7
|
if (!element)
|
|
@@ -18,7 +16,6 @@ export const TyWizard = React.forwardRef(({ children, width, height, active, com
|
|
|
18
16
|
element.removeEventListener('ty-wizard-step-change', handleStepChange);
|
|
19
17
|
};
|
|
20
18
|
}, [onStepChange]);
|
|
21
|
-
// Combine refs if needed
|
|
22
19
|
useEffect(() => {
|
|
23
20
|
if (ref && elementRef.current) {
|
|
24
21
|
if (typeof ref === 'function') {
|
|
@@ -29,12 +26,10 @@ export const TyWizard = React.forwardRef(({ children, width, height, active, com
|
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
}, [ref]);
|
|
32
|
-
// Convert React props to web component attributes
|
|
33
29
|
const webComponentProps = {
|
|
34
30
|
...hostProps(props),
|
|
35
31
|
ref: elementRef,
|
|
36
32
|
};
|
|
37
|
-
// Add string attributes
|
|
38
33
|
if (width)
|
|
39
34
|
webComponentProps.width = width;
|
|
40
35
|
if (height)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TyWizard.js","sourceRoot":"","sources":["../../src/components/TyWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"TyWizard.js","sourceRoot":"","sources":["../../src/components/TyWizard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAiChD,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,EACC,QAAQ,EACR,KAAK,EACL,MAAM,EACN,MAAM,EACN,SAAS,EACT,WAAW,EACX,YAAY,EACZ,GAAG,KAAK,EACT,EAAE,GAAG,EAAE,EAAE;IACR,MAAM,UAAU,GAAG,MAAM,CAAc,IAAI,CAAC,CAAC;IAE7C,SAAS,CAAC,GAAG,EAAE;QACb,MA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,CACxB,WAAW,EACX,iBAAiB,EACjB,QAAQ,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,gFAAgF;AAChF,OAAO,EAAE,OAAO,EAAE,CAAC;AAiBnB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE9D,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE9E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,WAAW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AAE,MAAM,cAAc,CAAC;AAEnH,YAAY,EAAE,aAAa,IAAI,WAAW,EAAE,mBAAmB,IAAI,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEzG,YAAY,EAAE,YAAY,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5D,YAAY,EAAE,iBAAiB,IAAI,eAAe,EAAE,uBAAuB,IAAI,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE7H,YAAY,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,YAAY,EAAE,iBAAiB,IAAI,eAAe,EAAE,uBAAuB,IAAI,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE7H,YAAY,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,YAAY,EAAE,UAAU,IAAI,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEtD,YAAY,EAAE,oBAAoB,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEpF,YAAY,EAAE,yBAAyB,IAAI,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAEnG,YAAY,EAAE,aAAa,IAAI,WAAW,EAAE,sBAAsB,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE3G,YAAY,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AAEzD,YAAY,EAAE,qBAAqB,IAAI,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEvF,YAAY,EAAE,sBAAsB,IAAI,oBAAoB,EAAE,oBAAoB,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// ===================================================================
|
|
2
|
-
// VERSION
|
|
3
|
-
// ===================================================================
|
|
4
1
|
import { VERSION } from '../version';
|
|
5
2
|
/** Current version of tyrell-react (auto-synced with package.json on build). */
|
|
6
3
|
export { VERSION };
|
|
@@ -11,17 +8,8 @@ if (typeof window !== 'undefined') {
|
|
|
11
8
|
window.tyReactVersion = VERSION;
|
|
12
9
|
console.log(`%c[tyrell-react]%c v${VERSION}`, 'color:#a78bfa;font-weight:600', 'color:inherit;font-weight:400');
|
|
13
10
|
}
|
|
14
|
-
//
|
|
15
|
-
//
|
|
16
|
-
// ===================================================================
|
|
17
|
-
// This file provides two export styles for maximum developer flexibility:
|
|
18
|
-
// 1. Ty-prefixed exports (TyButton, TyInput) - explicit and backward compatible
|
|
19
|
-
// 2. Short name exports (Button, Input) - clean and familiar to React developers
|
|
20
|
-
//
|
|
21
|
-
// Choose the style that fits your team's preferences!
|
|
22
|
-
// ===================================================================
|
|
23
|
-
// TY-PREFIXED EXPORTS (Explicit Style - Backward Compatible)
|
|
24
|
-
// ===================================================================
|
|
11
|
+
// Every component is exported twice: Ty-prefixed (TyButton) and short
|
|
12
|
+
// (Button). Both names point at the same wrapper — pick one per project.
|
|
25
13
|
export { TyButton } from './TyButton';
|
|
26
14
|
export { TyTag } from './TyTag';
|
|
27
15
|
export { TyInput } from './TyInput';
|
|
@@ -52,9 +40,6 @@ export { TyWizard } from './TyWizard';
|
|
|
52
40
|
export { TyStep } from './TyStep';
|
|
53
41
|
export { TyResizeObserver } from './TyResizeObserver';
|
|
54
42
|
export { TyScrollContainer } from './TyScrollContainer';
|
|
55
|
-
// ===================================================================
|
|
56
|
-
// SHORT NAME EXPORTS (Clean Style - Developer Choice)
|
|
57
|
-
// ===================================================================
|
|
58
43
|
export { TyButton as Button } from './TyButton';
|
|
59
44
|
export { TyTag as Tag } from './TyTag';
|
|
60
45
|
export { TyInput as Input } from './TyInput';
|
|
@@ -80,49 +65,4 @@ export { TyWizard as Wizard } from './TyWizard';
|
|
|
80
65
|
export { TyStep as Step } from './TyStep';
|
|
81
66
|
export { TyResizeObserver as ResizeObserver } from './TyResizeObserver';
|
|
82
67
|
export { TyScrollContainer as ScrollContainer } from './TyScrollContainer';
|
|
83
|
-
// ===================================================================
|
|
84
|
-
// USAGE EXAMPLES
|
|
85
|
-
// ===================================================================
|
|
86
|
-
/*
|
|
87
|
-
|
|
88
|
-
// STYLE 1: Ty-prefixed (Explicit and backward compatible)
|
|
89
|
-
import { TyButton, TyInput, TyModal } from 'tyrell-react';
|
|
90
|
-
import type { TyButtonProps, TyInputProps } from 'tyrell-react';
|
|
91
|
-
|
|
92
|
-
function MyComponent() {
|
|
93
|
-
return (
|
|
94
|
-
<TyModal>
|
|
95
|
-
<TyInput placeholder="Enter text..." />
|
|
96
|
-
<TyButton>Submit</TyButton>
|
|
97
|
-
</TyModal>
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// STYLE 2: Short names (Clean and familiar)
|
|
102
|
-
import { Button, Input, Modal } from 'tyrell-react';
|
|
103
|
-
import type { ButtonProps, InputProps } from 'tyrell-react';
|
|
104
|
-
|
|
105
|
-
function MyComponent() {
|
|
106
|
-
return (
|
|
107
|
-
<Modal>
|
|
108
|
-
<Input placeholder="Enter text..." />
|
|
109
|
-
<Button>Submit</Button>
|
|
110
|
-
</Modal>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// STYLE 3: Mixed (Team preferences)
|
|
115
|
-
import { TyModal, Input, Button } from 'tyrell-react';
|
|
116
|
-
import type { TyModalProps, InputProps } from 'tyrell-react';
|
|
117
|
-
|
|
118
|
-
function MyComponent() {
|
|
119
|
-
return (
|
|
120
|
-
<TyModal>
|
|
121
|
-
<Input placeholder="Enter text..." />
|
|
122
|
-
<Button>Submit</Button>
|
|
123
|
-
</TyModal>
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
*/
|
|
128
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"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AAgB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,YAAY,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,YAAY,IAAI,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,KAAK,IAAI,GAAG,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,eAAe,IAAI,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,oBAAoB,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,EAAE,QAAQ,IAAI,MAAM,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,gBAAgB,IAAI,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,EAAE,iBAAiB,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
// Generated from package.json by scripts/generate-version.js
|
|
3
3
|
// Run 'npm run generate:version' to regenerate.
|
|
4
4
|
/** Current version of tyrell-react. Synced with package.json on build. */
|
|
5
|
-
export const VERSION = '1.0.0-
|
|
5
|
+
export const VERSION = '1.0.0-TC46';
|
|
6
6
|
//# sourceMappingURL=version.js.map
|
package/package.json
CHANGED
|
@@ -6,7 +6,6 @@ import { useBooleanProperty } from '../utils/use-boolean-prop';
|
|
|
6
6
|
type BuiltinFlavor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
|
|
7
7
|
type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`;
|
|
8
8
|
|
|
9
|
-
// Type definitions for Ty Calendar component
|
|
10
9
|
export interface TyCalendarChangeEventDetail {
|
|
11
10
|
/** Selected month (1-12) */
|
|
12
11
|
month: number;
|
|
@@ -98,7 +97,6 @@ export interface TyCalendarProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
98
97
|
onDayClick?: (event: CustomEvent) => void;
|
|
99
98
|
}
|
|
100
99
|
|
|
101
|
-
// React wrapper for ty-calendar web component
|
|
102
100
|
export const TyCalendar = React.forwardRef<HTMLElement, TyCalendarProps>(
|
|
103
101
|
({
|
|
104
102
|
year,
|
|
@@ -126,7 +124,6 @@ export const TyCalendar = React.forwardRef<HTMLElement, TyCalendarProps>(
|
|
|
126
124
|
}, ref) => {
|
|
127
125
|
const elementRef = useRef<HTMLElement>(null);
|
|
128
126
|
|
|
129
|
-
// Handle ref forwarding
|
|
130
127
|
useEffect(() => {
|
|
131
128
|
if (ref && elementRef.current) {
|
|
132
129
|
if (typeof ref === 'function') {
|
|
@@ -137,7 +134,6 @@ export const TyCalendar = React.forwardRef<HTMLElement, TyCalendarProps>(
|
|
|
137
134
|
}
|
|
138
135
|
}, [ref]);
|
|
139
136
|
|
|
140
|
-
// Handle change events (date selection)
|
|
141
137
|
const handleChange = useCallback((event: Event) => {
|
|
142
138
|
const customEvent = event as CustomEvent<TyCalendarChangeEventDetail>;
|
|
143
139
|
if (onChange) {
|
|
@@ -145,7 +141,6 @@ export const TyCalendar = React.forwardRef<HTMLElement, TyCalendarProps>(
|
|
|
145
141
|
}
|
|
146
142
|
}, [onChange]);
|
|
147
143
|
|
|
148
|
-
// Handle navigate events (month/year navigation)
|
|
149
144
|
const handleNavigate = useCallback((event: Event) => {
|
|
150
145
|
const customEvent = event as CustomEvent<TyCalendarNavigateEventDetail>;
|
|
151
146
|
if (onNavigate) {
|
|
@@ -157,7 +152,6 @@ export const TyCalendar = React.forwardRef<HTMLElement, TyCalendarProps>(
|
|
|
157
152
|
if (onDayClick) onDayClick(event as CustomEvent);
|
|
158
153
|
}, [onDayClick]);
|
|
159
154
|
|
|
160
|
-
// Set up event listeners
|
|
161
155
|
useEffect(() => {
|
|
162
156
|
const element = elementRef.current;
|
|
163
157
|
if (!element) return;
|
|
@@ -208,7 +202,6 @@ export const TyCalendar = React.forwardRef<HTMLElement, TyCalendarProps>(
|
|
|
208
202
|
(element as any).dayClassesFn = null;
|
|
209
203
|
}
|
|
210
204
|
|
|
211
|
-
// Custom CSS property
|
|
212
205
|
if (customCSS) {
|
|
213
206
|
(element as any).customCSS = customCSS;
|
|
214
207
|
} else {
|
|
@@ -216,13 +209,11 @@ export const TyCalendar = React.forwardRef<HTMLElement, TyCalendarProps>(
|
|
|
216
209
|
}
|
|
217
210
|
}, [dayContentFn, dayClassesFn, customCSS]);
|
|
218
211
|
|
|
219
|
-
// Convert React props to web component attributes
|
|
220
212
|
const webComponentProps: Record<string, any> = {
|
|
221
213
|
...hostProps(props),
|
|
222
214
|
ref: elementRef,
|
|
223
215
|
};
|
|
224
216
|
|
|
225
|
-
// Add optional attributes only if they have values
|
|
226
217
|
if (year !== undefined) {
|
|
227
218
|
webComponentProps.year = year.toString();
|
|
228
219
|
}
|
|
@@ -4,7 +4,6 @@ import { hostProps } from '../utils/host-props';
|
|
|
4
4
|
type BuiltinFlavor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
|
|
5
5
|
type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`;
|
|
6
6
|
|
|
7
|
-
// Type definitions for Ty Calendar Month component
|
|
8
7
|
export interface TyCalendarMonthProps extends React.HTMLAttributes<HTMLElement> {
|
|
9
8
|
/** Display year */
|
|
10
9
|
displayYear?: number;
|
|
@@ -52,7 +51,6 @@ export interface DayClickDetail {
|
|
|
52
51
|
isOtherMonth: boolean;
|
|
53
52
|
}
|
|
54
53
|
|
|
55
|
-
// React wrapper for ty-calendar-month web component
|
|
56
54
|
export const TyCalendarMonth = React.forwardRef<HTMLElement, TyCalendarMonthProps>(
|
|
57
55
|
({
|
|
58
56
|
displayYear,
|
|
@@ -70,7 +68,6 @@ export const TyCalendarMonth = React.forwardRef<HTMLElement, TyCalendarMonthProp
|
|
|
70
68
|
}, ref) => {
|
|
71
69
|
const elementRef = useRef<HTMLElement>(null);
|
|
72
70
|
|
|
73
|
-
// Handle day click events
|
|
74
71
|
useEffect(() => {
|
|
75
72
|
const element = elementRef.current;
|
|
76
73
|
if (!element) return;
|
|
@@ -88,7 +85,6 @@ export const TyCalendarMonth = React.forwardRef<HTMLElement, TyCalendarMonthProp
|
|
|
88
85
|
};
|
|
89
86
|
}, [onDayClick]);
|
|
90
87
|
|
|
91
|
-
// Combine refs if needed
|
|
92
88
|
useEffect(() => {
|
|
93
89
|
if (ref && elementRef.current) {
|
|
94
90
|
if (typeof ref === 'function') {
|
|
@@ -99,13 +95,11 @@ export const TyCalendarMonth = React.forwardRef<HTMLElement, TyCalendarMonthProp
|
|
|
99
95
|
}
|
|
100
96
|
}, [ref]);
|
|
101
97
|
|
|
102
|
-
// Convert React props to web component attributes
|
|
103
98
|
const webComponentProps: Record<string, any> = {
|
|
104
99
|
...hostProps(props),
|
|
105
100
|
ref: elementRef,
|
|
106
101
|
};
|
|
107
102
|
|
|
108
|
-
// Add attributes
|
|
109
103
|
if (displayYear !== undefined) webComponentProps['display-year'] = displayYear;
|
|
110
104
|
if (displayMonth !== undefined) webComponentProps['display-month'] = displayMonth;
|
|
111
105
|
if (locale) webComponentProps.locale = locale;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { hostProps } from '../utils/host-props';
|
|
3
3
|
|
|
4
|
-
// Type definitions for Ty Calendar Navigation component
|
|
5
4
|
export interface TyCalendarNavigationProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
6
5
|
/** Display month (1-12) */
|
|
7
6
|
displayMonth?: number;
|
|
@@ -33,7 +32,6 @@ export interface NavigationChangeDetail {
|
|
|
33
32
|
year: number; // e.g., 2025
|
|
34
33
|
}
|
|
35
34
|
|
|
36
|
-
// React wrapper for ty-calendar-navigation web component
|
|
37
35
|
export const TyCalendarNavigation = React.forwardRef<HTMLElement, TyCalendarNavigationProps>(
|
|
38
36
|
({
|
|
39
37
|
displayMonth,
|
|
@@ -48,7 +46,6 @@ export const TyCalendarNavigation = React.forwardRef<HTMLElement, TyCalendarNavi
|
|
|
48
46
|
}, ref) => {
|
|
49
47
|
const elementRef = useRef<HTMLElement>(null);
|
|
50
48
|
|
|
51
|
-
// Handle change events
|
|
52
49
|
useEffect(() => {
|
|
53
50
|
const element = elementRef.current;
|
|
54
51
|
if (!element) return;
|
|
@@ -66,7 +63,6 @@ export const TyCalendarNavigation = React.forwardRef<HTMLElement, TyCalendarNavi
|
|
|
66
63
|
};
|
|
67
64
|
}, [onChange]);
|
|
68
65
|
|
|
69
|
-
// Combine refs if needed
|
|
70
66
|
useEffect(() => {
|
|
71
67
|
if (ref && elementRef.current) {
|
|
72
68
|
if (typeof ref === 'function') {
|
|
@@ -77,13 +73,11 @@ export const TyCalendarNavigation = React.forwardRef<HTMLElement, TyCalendarNavi
|
|
|
77
73
|
}
|
|
78
74
|
}, [ref]);
|
|
79
75
|
|
|
80
|
-
// Convert React props to web component attributes
|
|
81
76
|
const webComponentProps: Record<string, any> = {
|
|
82
77
|
...hostProps(props),
|
|
83
78
|
ref: elementRef,
|
|
84
79
|
};
|
|
85
80
|
|
|
86
|
-
// Add attributes
|
|
87
81
|
if (displayMonth !== undefined) webComponentProps['display-month'] = displayMonth;
|
|
88
82
|
if (displayYear !== undefined) webComponentProps['display-year'] = displayYear;
|
|
89
83
|
if (locale) webComponentProps.locale = locale;
|
|
@@ -5,7 +5,6 @@ import { useBooleanProperty } from '../utils/use-boolean-prop';
|
|
|
5
5
|
type BuiltinFlavor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
|
|
6
6
|
type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`;
|
|
7
7
|
|
|
8
|
-
// Type definitions for Ty Checkbox component
|
|
9
8
|
export interface TyCheckboxProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange' | 'onInput'> {
|
|
10
9
|
/** Checked state */
|
|
11
10
|
checked?: boolean;
|
|
@@ -57,7 +56,6 @@ export interface TyCheckboxEventDetail {
|
|
|
57
56
|
originalEvent: Event;
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
// React wrapper for ty-checkbox web component
|
|
61
59
|
export const TyCheckbox = React.forwardRef<HTMLElement, TyCheckboxProps>(
|
|
62
60
|
({
|
|
63
61
|
children,
|
|
@@ -76,7 +74,6 @@ export const TyCheckbox = React.forwardRef<HTMLElement, TyCheckboxProps>(
|
|
|
76
74
|
}, ref) => {
|
|
77
75
|
const elementRef = useRef<HTMLElement>(null);
|
|
78
76
|
|
|
79
|
-
// Handle change events
|
|
80
77
|
useEffect(() => {
|
|
81
78
|
const element = elementRef.current;
|
|
82
79
|
if (!element) return;
|
|
@@ -95,10 +92,8 @@ export const TyCheckbox = React.forwardRef<HTMLElement, TyCheckboxProps>(
|
|
|
95
92
|
}
|
|
96
93
|
};
|
|
97
94
|
|
|
98
|
-
// Map onChange → input event (React convention)
|
|
99
95
|
element.addEventListener('input', handleInput);
|
|
100
96
|
|
|
101
|
-
// Map onChangeCommit → change event (blur behavior)
|
|
102
97
|
element.addEventListener('change', handleChangeCommit);
|
|
103
98
|
|
|
104
99
|
return () => {
|
|
@@ -107,7 +102,6 @@ export const TyCheckbox = React.forwardRef<HTMLElement, TyCheckboxProps>(
|
|
|
107
102
|
};
|
|
108
103
|
}, [onChange, onChangeCommit]);
|
|
109
104
|
|
|
110
|
-
// Combine refs if needed
|
|
111
105
|
useEffect(() => {
|
|
112
106
|
if (ref && elementRef.current) {
|
|
113
107
|
if (typeof ref === 'function') {
|
|
@@ -127,19 +121,16 @@ export const TyCheckbox = React.forwardRef<HTMLElement, TyCheckboxProps>(
|
|
|
127
121
|
const isDisabled = useBooleanProperty(elementRef, 'disabled', disabled);
|
|
128
122
|
const isRequired = useBooleanProperty(elementRef, 'required', required);
|
|
129
123
|
|
|
130
|
-
// Convert React props to web component attributes
|
|
131
124
|
const webComponentProps: Record<string, any> = {
|
|
132
125
|
...hostProps(props),
|
|
133
126
|
ref: elementRef,
|
|
134
127
|
};
|
|
135
128
|
|
|
136
|
-
// Add boolean attributes
|
|
137
129
|
if (isChecked) webComponentProps.checked = '';
|
|
138
130
|
if (isIndeterminate) webComponentProps.indeterminate = '';
|
|
139
131
|
if (isDisabled) webComponentProps.disabled = '';
|
|
140
132
|
if (isRequired) webComponentProps.required = '';
|
|
141
133
|
|
|
142
|
-
// Add string attributes
|
|
143
134
|
if (value) webComponentProps.value = value;
|
|
144
135
|
if (name) webComponentProps.name = name;
|
|
145
136
|
if (error) webComponentProps.error = error;
|
|
@@ -5,7 +5,6 @@ import { useBooleanProperty } from '../utils/use-boolean-prop';
|
|
|
5
5
|
type BuiltinFlavor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
|
|
6
6
|
type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`;
|
|
7
7
|
|
|
8
|
-
// Type definitions for Ty Copy component
|
|
9
8
|
export interface TyCopyProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
10
9
|
/** Text to copy */
|
|
11
10
|
value?: string;
|
|
@@ -38,7 +37,6 @@ export interface TyCopyProps extends Omit<React.HTMLAttributes<HTMLElement>, 'on
|
|
|
38
37
|
onCopyError?: (event: CustomEvent) => void;
|
|
39
38
|
}
|
|
40
39
|
|
|
41
|
-
// React wrapper for ty-copy web component
|
|
42
40
|
export const TyCopy = React.forwardRef<HTMLElement, TyCopyProps>(
|
|
43
41
|
({
|
|
44
42
|
value,
|
|
@@ -55,7 +53,6 @@ export const TyCopy = React.forwardRef<HTMLElement, TyCopyProps>(
|
|
|
55
53
|
}, ref) => {
|
|
56
54
|
const elementRef = useRef<HTMLElement>(null);
|
|
57
55
|
|
|
58
|
-
// Handle ref forwarding
|
|
59
56
|
useEffect(() => {
|
|
60
57
|
if (ref && elementRef.current) {
|
|
61
58
|
if (typeof ref === 'function') {
|
|
@@ -66,7 +63,6 @@ export const TyCopy = React.forwardRef<HTMLElement, TyCopyProps>(
|
|
|
66
63
|
}
|
|
67
64
|
}, [ref]);
|
|
68
65
|
|
|
69
|
-
// Custom events → React callbacks
|
|
70
66
|
useEffect(() => {
|
|
71
67
|
const el = elementRef.current;
|
|
72
68
|
if (!el) return;
|
|
@@ -86,20 +82,17 @@ export const TyCopy = React.forwardRef<HTMLElement, TyCopyProps>(
|
|
|
86
82
|
const isDisabled = useBooleanProperty(elementRef, 'disabled', disabled);
|
|
87
83
|
const isRequired = useBooleanProperty(elementRef, 'required', required);
|
|
88
84
|
|
|
89
|
-
// Convert React props to web component attributes
|
|
90
85
|
const webComponentProps: Record<string, any> = {
|
|
91
86
|
...hostProps(props),
|
|
92
87
|
ref: elementRef,
|
|
93
88
|
};
|
|
94
89
|
|
|
95
|
-
// Add string attributes
|
|
96
90
|
if (value) webComponentProps.value = value;
|
|
97
91
|
if (label) webComponentProps.label = label;
|
|
98
92
|
if (size) webComponentProps.size = size;
|
|
99
93
|
if (flavor) webComponentProps.flavor = flavor;
|
|
100
94
|
if (format) webComponentProps.format = format;
|
|
101
95
|
|
|
102
|
-
// Add boolean attributes
|
|
103
96
|
if (isMultiline) webComponentProps.multiline = '';
|
|
104
97
|
if (isDisabled) webComponentProps.disabled = '';
|
|
105
98
|
if (isRequired) webComponentProps.required = '';
|
|
@@ -6,7 +6,6 @@ import { useBooleanProperty } from '../utils/use-boolean-prop';
|
|
|
6
6
|
type BuiltinFlavor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'neutral';
|
|
7
7
|
type ShadedFlavor = BuiltinFlavor | `${BuiltinFlavor}+` | `${BuiltinFlavor}-`;
|
|
8
8
|
|
|
9
|
-
// Type definitions for Ty DatePicker component
|
|
10
9
|
export interface TyDatePickerEventDetail {
|
|
11
10
|
/** The selected date value (ISO string or formatted string based on format) */
|
|
12
11
|
value: string | null;
|
|
@@ -76,7 +75,6 @@ export interface TyDatePickerElement extends HTMLElement {
|
|
|
76
75
|
clear(): void;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
// React wrapper for ty-date-picker web component
|
|
80
78
|
export const TyDatePicker = React.forwardRef<TyDatePickerElement, TyDatePickerProps>(
|
|
81
79
|
({
|
|
82
80
|
value,
|
|
@@ -100,7 +98,6 @@ export const TyDatePicker = React.forwardRef<TyDatePickerElement, TyDatePickerPr
|
|
|
100
98
|
}, ref) => {
|
|
101
99
|
const elementRef = useRef<TyDatePickerElement>(null);
|
|
102
100
|
|
|
103
|
-
// Handle ref forwarding
|
|
104
101
|
useEffect(() => {
|
|
105
102
|
if (ref && elementRef.current) {
|
|
106
103
|
if (typeof ref === 'function') {
|
|
@@ -118,12 +115,10 @@ export const TyDatePicker = React.forwardRef<TyDatePickerElement, TyDatePickerPr
|
|
|
118
115
|
if (!needsPropertyBridge) return;
|
|
119
116
|
const element = elementRef.current;
|
|
120
117
|
if (element && value !== undefined) {
|
|
121
|
-
// Set the value property directly on the element
|
|
122
118
|
(element as any).value = value || '';
|
|
123
119
|
}
|
|
124
120
|
}, [value]);
|
|
125
121
|
|
|
126
|
-
// Handle change events
|
|
127
122
|
const handleChange = useCallback((event: Event) => {
|
|
128
123
|
const customEvent = event as CustomEvent<TyDatePickerEventDetail>;
|
|
129
124
|
if (onChange) {
|
|
@@ -145,7 +140,6 @@ export const TyDatePicker = React.forwardRef<TyDatePickerElement, TyDatePickerPr
|
|
|
145
140
|
if (onClose) onClose(event as CustomEvent<{}>);
|
|
146
141
|
}, [onClose]);
|
|
147
142
|
|
|
148
|
-
// Set up event listeners
|
|
149
143
|
useEffect(() => {
|
|
150
144
|
const element = elementRef.current;
|
|
151
145
|
if (!element) return;
|
|
@@ -174,13 +168,11 @@ export const TyDatePicker = React.forwardRef<TyDatePickerElement, TyDatePickerPr
|
|
|
174
168
|
};
|
|
175
169
|
}, [handleChange, handleOpen, handleClose, onChange, onOpen, onClose]);
|
|
176
170
|
|
|
177
|
-
// Convert React props to web component attributes
|
|
178
171
|
const webComponentProps: Record<string, any> = {
|
|
179
172
|
...hostProps(props),
|
|
180
173
|
ref: elementRef,
|
|
181
174
|
};
|
|
182
175
|
|
|
183
|
-
// Add optional attributes only if they have values
|
|
184
176
|
if (value !== undefined) {
|
|
185
177
|
webComponentProps.value = value;
|
|
186
178
|
}
|
|
@@ -2,7 +2,6 @@ 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 definitions for Ty File Upload component
|
|
6
5
|
export interface TyFileUploadProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onChange'> {
|
|
7
6
|
/** Form field name — used as the FormData key */
|
|
8
7
|
name?: string;
|
|
@@ -41,7 +40,6 @@ export interface TyFileUploadEventDetail {
|
|
|
41
40
|
names: string[];
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
// React wrapper for ty-file-upload web component
|
|
45
43
|
export const TyFileUpload = React.forwardRef<HTMLElement, TyFileUploadProps>(
|
|
46
44
|
({
|
|
47
45
|
name,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import { useBooleanProperty } from '../utils/use-boolean-prop';
|
|
3
3
|
|
|
4
|
-
// Type definitions for Ty Icon component
|
|
5
4
|
export interface TyIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
6
5
|
/** Icon name from the icon registry (e.g., 'home', 'star', 'settings') */
|
|
7
6
|
name: string;
|
|
@@ -22,12 +21,10 @@ export interface TyIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
22
21
|
className?: string;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
// React wrapper for ty-icon web component
|
|
26
24
|
export const TyIcon = React.forwardRef<HTMLElement, TyIconProps>(
|
|
27
25
|
({ name, size, spin, pulse, tempo, className, ...props }, ref) => {
|
|
28
26
|
const elementRef = useRef<HTMLElement>(null);
|
|
29
27
|
|
|
30
|
-
// Handle ref forwarding
|
|
31
28
|
useEffect(() => {
|
|
32
29
|
if (ref && elementRef.current) {
|
|
33
30
|
if (typeof ref === 'function') {
|
|
@@ -41,14 +38,12 @@ export const TyIcon = React.forwardRef<HTMLElement, TyIconProps>(
|
|
|
41
38
|
const isSpin = useBooleanProperty(elementRef, 'spin', spin);
|
|
42
39
|
const isPulse = useBooleanProperty(elementRef, 'pulse', pulse);
|
|
43
40
|
|
|
44
|
-
// Convert React props to web component attributes
|
|
45
41
|
const webComponentProps: Record<string, any> = {
|
|
46
42
|
...props,
|
|
47
43
|
name,
|
|
48
44
|
ref: elementRef,
|
|
49
45
|
};
|
|
50
46
|
|
|
51
|
-
// Add optional attributes only if they have values
|
|
52
47
|
if (size) {
|
|
53
48
|
webComponentProps.size = size;
|
|
54
49
|
}
|