trimble-terra 1.1.30 → 1.1.32
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/README.md +169 -169
- package/dist/lib/main.js +28 -28
- package/dist/src/component/CreditsTracker/CreditsTracker.css +1 -0
- package/dist/src/component/CreditsTracker/CreditsTracker.d.ts +18 -0
- package/dist/src/component/CreditsTracker/CreditsTracker.d.ts.map +1 -0
- package/dist/src/component/CreditsTracker/CreditsTracker.js +114 -0
- package/dist/src/component/Dialog/Dialog.css +1 -1
- package/dist/src/component/Dialog/Dialog.d.ts +3 -3
- package/dist/src/component/Dialog/Dialog.d.ts.map +1 -1
- package/dist/src/component/Dialog/Dialog.js +30 -30
- package/dist/src/component/FlyoutCart/FlyoutCart.d.ts.map +1 -1
- package/dist/src/component/FlyoutCart/FlyoutCart.js +101 -95
- package/dist/src/component/FlyoutCart/FlyoutCart.stories.d.ts +68 -0
- package/dist/src/component/FlyoutCart/FlyoutCart.stories.d.ts.map +1 -1
- package/dist/src/component/FlyoutCartComponent/FlyoutCartComponent.css +1 -1
- package/dist/src/component/FlyoutCartComponent/FlyoutCartComponent.d.ts +8 -1
- package/dist/src/component/FlyoutCartComponent/FlyoutCartComponent.d.ts.map +1 -1
- package/dist/src/component/FlyoutCartComponent/FlyoutCartComponent.js +159 -98
- package/dist/src/component/ProductDetail/CustomCreditsTab/CustomCreditsTab.css +1 -0
- package/dist/src/component/ProductDetail/CustomCreditsTab/CustomCreditsTab.d.ts +30 -0
- package/dist/src/component/ProductDetail/CustomCreditsTab/CustomCreditsTab.d.ts.map +1 -0
- package/dist/src/component/ProductDetail/CustomCreditsTab/CustomCreditsTab.js +81 -0
- package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.css +1 -0
- package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.d.ts +10 -0
- package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.d.ts.map +1 -0
- package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlow.js +33 -0
- package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlowCard.d.ts +29 -0
- package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlowCard.d.ts.map +1 -0
- package/dist/src/component/ProductDetail/NonBuyerPurchaseFlow/NonBuyerPurchaseFlowCard.js +82 -0
- package/dist/src/component/ProductDetail/PricingCards/PricingCards.js +64 -64
- package/dist/src/component/ProductDetail/ProductDetail.css +1 -1
- package/dist/src/component/ProductDetail/ProductDetail.d.ts +63 -11
- package/dist/src/component/ProductDetail/ProductDetail.d.ts.map +1 -1
- package/dist/src/component/ProductDetail/ProductDetail.js +461 -286
- package/dist/src/component/ProductDetail/ProductDetail.stories.d.ts +474 -48
- package/dist/src/component/ProductDetail/ProductDetail.stories.d.ts.map +1 -1
- package/dist/src/component/ProductDetail/ProductOverview.d.ts.map +1 -1
- package/dist/src/component/ProductDetail/ProductOverview.js +18 -18
- package/dist/src/component/PurchaseSection/PurchaseSection.d.ts +2 -2
- package/dist/src/component/PurchaseSection/PurchaseSection.d.ts.map +1 -1
- package/dist/src/component/PurchaseSection/PurchaseSection.js +15 -15
- package/dist/src/component/QuantityTracker/QuantityTracker.css +1 -1
- package/dist/src/component/TerraLink/TerraLink.d.ts +1 -1
- package/dist/src/component/TerraLink/TerraLink.d.ts.map +1 -1
- package/dist/src/component/index.js +24 -24
- package/dist/src/navigation/Footer/GlobalFooter/GlobalFooter.css +1 -1
- package/dist/src/navigation/SiteNav/SiteNav.d.ts +2 -1
- package/dist/src/navigation/SiteNav/SiteNav.d.ts.map +1 -1
- package/dist/src/navigation/SiteNav/SiteNav.js +88 -84
- package/dist/src/navigation/SiteNav/SiteNavMobile.d.ts +2 -1
- package/dist/src/navigation/SiteNav/SiteNavMobile.d.ts.map +1 -1
- package/dist/src/navigation/SiteNav/SiteNavMobile.js +34 -32
- package/dist/src/navigation/SiteNav/UtilityNavComponents/CartNavMenu/CartNavMenu.d.ts +2 -1
- package/dist/src/navigation/SiteNav/UtilityNavComponents/CartNavMenu/CartNavMenu.d.ts.map +1 -1
- package/dist/src/navigation/SiteNav/UtilityNavComponents/CartNavMenu/CartNavMenu.js +37 -36
- package/dist/src/navigation/SiteNav/UtilityNavComponents/CartNavMenu/CartNavMenuMobile.d.ts +2 -1
- package/dist/src/navigation/SiteNav/UtilityNavComponents/CartNavMenu/CartNavMenuMobile.d.ts.map +1 -1
- package/dist/src/navigation/SiteNav/UtilityNavComponents/CartNavMenu/CartNavMenuMobile.js +52 -51
- package/dist/src/navigation/SiteNav/UtilityNavComponents/LanguageSelector/LanguageSelector.js +1 -1
- package/dist/src/navigation/SiteNav/UtilityNavComponents/SiteNavUtilityNav.d.ts +2 -1
- package/dist/src/navigation/SiteNav/UtilityNavComponents/SiteNavUtilityNav.d.ts.map +1 -1
- package/dist/src/navigation/SiteNav/UtilityNavComponents/SiteNavUtilityNav.js +24 -22
- package/dist/src/navigation/SiteNavigation/SiteNavigation.d.ts +2 -1
- package/dist/src/navigation/SiteNavigation/SiteNavigation.d.ts.map +1 -1
- package/dist/src/navigation/SiteNavigation/SiteNavigation.js +86 -82
- package/dist/src/navigation/SiteNavigation/SiteNavigationMobile/SiteNavigationMobile.d.ts +2 -1
- package/dist/src/navigation/SiteNavigation/SiteNavigationMobile/SiteNavigationMobile.d.ts.map +1 -1
- package/dist/src/navigation/SiteNavigation/SiteNavigationMobile/SiteNavigationMobile.js +34 -32
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/CartNavMenu/CartNavMenu.d.ts +2 -1
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/CartNavMenu/CartNavMenu.d.ts.map +1 -1
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/CartNavMenu/CartNavMenu.js +37 -36
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/CartNavMenu/CartNavMenuMobile.d.ts +2 -1
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/CartNavMenu/CartNavMenuMobile.d.ts.map +1 -1
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/CartNavMenu/CartNavMenuMobile.js +58 -57
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/SiteNavigationUtilityNav.d.ts +2 -1
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/SiteNavigationUtilityNav.d.ts.map +1 -1
- package/dist/src/navigation/SiteNavigation/UtilityNavComponents/SiteNavigationUtilityNav.js +24 -22
- package/package.json +128 -128
package/README.md
CHANGED
|
@@ -1,170 +1,170 @@
|
|
|
1
|
-
# Trimble Terra
|
|
2
|
-
|
|
3
|
-
A React component library for Trimble MXP2 web experiences. Built with React 19, TypeScript, and SCSS.
|
|
4
|
-
|
|
5
|
-
[](https://trimble-mxp-terra.netlify.app/)
|
|
6
|
-
[](https://www.npmjs.com/package/trimble-terra)
|
|
7
|
-
|
|
8
|
-
> **Branch strategy:** The `react19` branch is the active development branch (v1.x) targeting Next.js projects. The `main` branch contains the legacy Gatsby-compatible code (v0.x) and is deprecated — do not publish from `main`.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
## Storybook
|
|
13
|
-
|
|
14
|
-
Browse all components, props, and usage examples in the live Storybook:
|
|
15
|
-
|
|
16
|
-
**[https://trimble-mxp-terra.netlify.app/](https://trimble-mxp-terra.netlify.app/)**
|
|
17
|
-
|
|
18
|
-
### Associated Storybooks
|
|
19
|
-
|
|
20
|
-
#### Layouts:
|
|
21
|
-
[](https://trimble-mxp-layouts.netlify.app/)
|
|
22
|
-
|
|
23
|
-
#### Icons:
|
|
24
|
-
[](https://trimble-mxp-icons.netlify.app/)
|
|
25
|
-
|
|
26
|
-
#### Flyout:
|
|
27
|
-
[](https://trimble-mxp-flyout.netlify.app/)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## Installation
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm install trimble-terra
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Peer Dependencies
|
|
37
|
-
|
|
38
|
-
The following packages must be installed in your application:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
npm install react react-dom @trimble-creative-strategy/trimble-mxp-icons react-player image-focus
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
## Usage
|
|
45
|
-
|
|
46
|
-
Import components directly from the package:
|
|
47
|
-
|
|
48
|
-
```tsx
|
|
49
|
-
import { SiteNavigation, GlobalFooter, AlertBanner } from "trimble-terra";
|
|
50
|
-
|
|
51
|
-
function App() {
|
|
52
|
-
return (
|
|
53
|
-
<>
|
|
54
|
-
<SiteNavigation {...navProps} />
|
|
55
|
-
<AlertBanner {...bannerProps} />
|
|
56
|
-
<main>{/* your content */}</main>
|
|
57
|
-
<GlobalFooter {...footerProps} />
|
|
58
|
-
</>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Available Components
|
|
64
|
-
|
|
65
|
-
### Components
|
|
66
|
-
|
|
67
|
-
| Component | Description |
|
|
68
|
-
| --- | --- |
|
|
69
|
-
| `AlertBanner` | Dismissible alert banner for announcements |
|
|
70
|
-
| `Dialog` | Modal dialog overlay |
|
|
71
|
-
| `ImageGallery` | Responsive image gallery |
|
|
72
|
-
| `LoadingSpinner` | Loading state indicator |
|
|
73
|
-
| `ProductDetail` | Product detail view |
|
|
74
|
-
| `ProductSummary` | Product summary card |
|
|
75
|
-
| `TrialFormStart` | Trial signup form |
|
|
76
|
-
| `TrialSummary` | Trial information summary |
|
|
77
|
-
|
|
78
|
-
### Layout
|
|
79
|
-
|
|
80
|
-
| Component | Description |
|
|
81
|
-
| --- | --- |
|
|
82
|
-
| `LayoutPricingCards` | Pricing card grid layout |
|
|
83
|
-
| `Icon` | Icon component (re-exported from `@trimble-creative-strategy/trimble-mxp-icons`) |
|
|
84
|
-
|
|
85
|
-
### Navigation
|
|
86
|
-
|
|
87
|
-
| Component | Description |
|
|
88
|
-
| --- | --- |
|
|
89
|
-
| `SiteNavigation` | Main site navigation with mega menu support |
|
|
90
|
-
| `Footer` | Base footer component |
|
|
91
|
-
| `SectorFooter` | Sector-specific footer |
|
|
92
|
-
| `GlobalFooter` | Global footer |
|
|
93
|
-
|
|
94
|
-
## Development
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
# Install dependencies
|
|
98
|
-
npm install
|
|
99
|
-
|
|
100
|
-
# Run Storybook locally
|
|
101
|
-
npm run storybook
|
|
102
|
-
|
|
103
|
-
# Build the library
|
|
104
|
-
npm run build
|
|
105
|
-
|
|
106
|
-
# Lint
|
|
107
|
-
npm run lint
|
|
108
|
-
|
|
109
|
-
# Format check
|
|
110
|
-
npm run format:check
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Publishing to npm
|
|
114
|
-
|
|
115
|
-
Releases are automated via GitHub Actions. Pushing a version tag triggers the publish workflow.
|
|
116
|
-
|
|
117
|
-
### Release workflow
|
|
118
|
-
|
|
119
|
-
1. **Make sure you're on the `react19` branch** with all changes committed and pushed.
|
|
120
|
-
|
|
121
|
-
2. **Bump the version** in `package.json`:
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
# Patch release (1.0.0 → 1.0.1)
|
|
125
|
-
npm version patch
|
|
126
|
-
|
|
127
|
-
# Minor release (1.0.0 → 1.1.0)
|
|
128
|
-
npm version minor
|
|
129
|
-
|
|
130
|
-
# Major release (1.0.0 → 2.0.0)
|
|
131
|
-
npm version major
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
This updates `package.json` and creates a git tag automatically.
|
|
135
|
-
|
|
136
|
-
3. **Push the commit and tag:**
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
git push origin react19 --follow-tags
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
4. The GitHub Actions `publish.yml` workflow will:
|
|
143
|
-
- Check out the code
|
|
144
|
-
- Install dependencies
|
|
145
|
-
- Run lint and build
|
|
146
|
-
- Verify the tag matches the `package.json` version
|
|
147
|
-
- Publish to npm
|
|
148
|
-
|
|
149
|
-
### Requirements
|
|
150
|
-
|
|
151
|
-
- An `NPM_TOKEN` secret must be configured in the GitHub repository settings (Settings > Secrets and variables > Actions).
|
|
152
|
-
- The token needs publish access to the `trimble-terra` package on npm.
|
|
153
|
-
|
|
154
|
-
### CI
|
|
155
|
-
|
|
156
|
-
Every push and pull request to `react19` runs the CI workflow (lint, format check, build) on Node 20 and 22.
|
|
157
|
-
|
|
158
|
-
## Technical Audit — Known Issues
|
|
159
|
-
|
|
160
|
-
- **K-3 — CommonDescription / CleanDescription duplication** (Medium): Nearly identical logic differing only in class names. Merge into one component with a `variant` prop.
|
|
161
|
-
- **K-4 — Inline styles instead of SCSS** (Medium): `CardEcommerce`, `LayoutPricingCards`, `PricingCards`, `SiteNavigationMain`, `YoutubeVideo`, `FocusedImageMethods`, and others use `style={}` for layout, backgrounds, and sizing that should live in SCSS.
|
|
162
|
-
- **K-5 — Pervasive `any` usage** (High): `any` is used for props, event handlers, refs, and data structures across ~30+ files. Especially dense in `SiteNavigation*`, `LanguageSelector`, `ProductDetail`, `LayoutPricingCards`, `VidyardVideo`, and all `.jsx` files.
|
|
163
|
-
- **A-1 — `onClick` on non-interactive elements without keyboard support** (High): Multiple `<div>` and `<span>` elements have `onClick` handlers without `role="button"`, `tabIndex={0}`, or `onKeyDown`/`onKeyUp`. `ProductOverview.tsx` uses `<a href="" onClick>` instead of `<button>`.
|
|
164
|
-
- **A-2 — Missing `alt` text on images** (Medium): App Store / Google Play badge images in `TerraLink.tsx`, `SpecialButton.tsx`, and `SiteNavigationMobile.tsx` lack meaningful `alt` attributes.
|
|
165
|
-
- **S-1 — Unsanitized `dangerouslySetInnerHTML`** (High): CMS/prop content rendered via `dangerouslySetInnerHTML` without visible sanitization in `CommonDescription.tsx`, `functions.tsx`, `CurrencyList.tsx`, `ProductSummaryMethods.jsx`, `FlyoutCart.jsx`, `checkForDangerouslySet.jsx`. Centralize through a sanitizer (e.g., DOMPurify).
|
|
166
|
-
- **C-2 — Direct DOM manipulation** (Medium): `CardEcommerce.tsx` uses `document.querySelector` instead of a ref; `ImageGalleryMethods.jsx` sets `body.style.overflow` directly; `useElementIntersection.ts` takes a selector string instead of a ref.
|
|
167
|
-
- **C-3 — 16 `.jsx` files remain unconverted** (Medium): `Slider`, `NavSearchWrapper`, `Tooltip`, `TrialFormStart`, `ProductSummary`, `TrialSummary`, `TrialMethods`, `TrialSpecifics`, `ProductSummaryMethods`, `PricingCards`, `ImageGallery`, `ImageGalleryMethods`, `FlyoutCart`, `checkForDangerouslySet`, `CloseIcon`, `CardEcommerceMethods` — all have zero type safety.
|
|
168
|
-
- **C-4 — Blanket `eslint-disable` suppresses all warnings** (Medium): File-level `/* eslint-disable */` in `LanguageSelector.tsx`, `SiteNavigationMain.tsx`, `CartNavMenu.tsx`, `FlyoutCart.jsx`, `FlyoutCartComponent.tsx`, `QuantityTracker.stories.tsx`, `Video.tsx`.
|
|
169
|
-
- **C-6 — Console statements in production code** (Low): `YoutubeVideo.tsx` (`console.warn`) and `CardEcommerceMethods.jsx` (`console.error`) will fire in consumers' production builds.
|
|
1
|
+
# Trimble Terra
|
|
2
|
+
|
|
3
|
+
A React component library for Trimble MXP2 web experiences. Built with React 19, TypeScript, and SCSS.
|
|
4
|
+
|
|
5
|
+
[](https://trimble-mxp-terra.netlify.app/)
|
|
6
|
+
[](https://www.npmjs.com/package/trimble-terra)
|
|
7
|
+
|
|
8
|
+
> **Branch strategy:** The `react19` branch is the active development branch (v1.x) targeting Next.js projects. The `main` branch contains the legacy Gatsby-compatible code (v0.x) and is deprecated — do not publish from `main`.
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Storybook
|
|
13
|
+
|
|
14
|
+
Browse all components, props, and usage examples in the live Storybook:
|
|
15
|
+
|
|
16
|
+
**[https://trimble-mxp-terra.netlify.app/](https://trimble-mxp-terra.netlify.app/)**
|
|
17
|
+
|
|
18
|
+
### Associated Storybooks
|
|
19
|
+
|
|
20
|
+
#### Layouts:
|
|
21
|
+
[](https://trimble-mxp-layouts.netlify.app/)
|
|
22
|
+
|
|
23
|
+
#### Icons:
|
|
24
|
+
[](https://trimble-mxp-icons.netlify.app/)
|
|
25
|
+
|
|
26
|
+
#### Flyout:
|
|
27
|
+
[](https://trimble-mxp-flyout.netlify.app/)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install trimble-terra
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Peer Dependencies
|
|
37
|
+
|
|
38
|
+
The following packages must be installed in your application:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npm install react react-dom @trimble-creative-strategy/trimble-mxp-icons react-player image-focus
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Usage
|
|
45
|
+
|
|
46
|
+
Import components directly from the package:
|
|
47
|
+
|
|
48
|
+
```tsx
|
|
49
|
+
import { SiteNavigation, GlobalFooter, AlertBanner } from "trimble-terra";
|
|
50
|
+
|
|
51
|
+
function App() {
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
<SiteNavigation {...navProps} />
|
|
55
|
+
<AlertBanner {...bannerProps} />
|
|
56
|
+
<main>{/* your content */}</main>
|
|
57
|
+
<GlobalFooter {...footerProps} />
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Available Components
|
|
64
|
+
|
|
65
|
+
### Components
|
|
66
|
+
|
|
67
|
+
| Component | Description |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| `AlertBanner` | Dismissible alert banner for announcements |
|
|
70
|
+
| `Dialog` | Modal dialog overlay |
|
|
71
|
+
| `ImageGallery` | Responsive image gallery |
|
|
72
|
+
| `LoadingSpinner` | Loading state indicator |
|
|
73
|
+
| `ProductDetail` | Product detail view |
|
|
74
|
+
| `ProductSummary` | Product summary card |
|
|
75
|
+
| `TrialFormStart` | Trial signup form |
|
|
76
|
+
| `TrialSummary` | Trial information summary |
|
|
77
|
+
|
|
78
|
+
### Layout
|
|
79
|
+
|
|
80
|
+
| Component | Description |
|
|
81
|
+
| --- | --- |
|
|
82
|
+
| `LayoutPricingCards` | Pricing card grid layout |
|
|
83
|
+
| `Icon` | Icon component (re-exported from `@trimble-creative-strategy/trimble-mxp-icons`) |
|
|
84
|
+
|
|
85
|
+
### Navigation
|
|
86
|
+
|
|
87
|
+
| Component | Description |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| `SiteNavigation` | Main site navigation with mega menu support |
|
|
90
|
+
| `Footer` | Base footer component |
|
|
91
|
+
| `SectorFooter` | Sector-specific footer |
|
|
92
|
+
| `GlobalFooter` | Global footer |
|
|
93
|
+
|
|
94
|
+
## Development
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Install dependencies
|
|
98
|
+
npm install
|
|
99
|
+
|
|
100
|
+
# Run Storybook locally
|
|
101
|
+
npm run storybook
|
|
102
|
+
|
|
103
|
+
# Build the library
|
|
104
|
+
npm run build
|
|
105
|
+
|
|
106
|
+
# Lint
|
|
107
|
+
npm run lint
|
|
108
|
+
|
|
109
|
+
# Format check
|
|
110
|
+
npm run format:check
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Publishing to npm
|
|
114
|
+
|
|
115
|
+
Releases are automated via GitHub Actions. Pushing a version tag triggers the publish workflow.
|
|
116
|
+
|
|
117
|
+
### Release workflow
|
|
118
|
+
|
|
119
|
+
1. **Make sure you're on the `react19` branch** with all changes committed and pushed.
|
|
120
|
+
|
|
121
|
+
2. **Bump the version** in `package.json`:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Patch release (1.0.0 → 1.0.1)
|
|
125
|
+
npm version patch
|
|
126
|
+
|
|
127
|
+
# Minor release (1.0.0 → 1.1.0)
|
|
128
|
+
npm version minor
|
|
129
|
+
|
|
130
|
+
# Major release (1.0.0 → 2.0.0)
|
|
131
|
+
npm version major
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
This updates `package.json` and creates a git tag automatically.
|
|
135
|
+
|
|
136
|
+
3. **Push the commit and tag:**
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
git push origin react19 --follow-tags
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
4. The GitHub Actions `publish.yml` workflow will:
|
|
143
|
+
- Check out the code
|
|
144
|
+
- Install dependencies
|
|
145
|
+
- Run lint and build
|
|
146
|
+
- Verify the tag matches the `package.json` version
|
|
147
|
+
- Publish to npm
|
|
148
|
+
|
|
149
|
+
### Requirements
|
|
150
|
+
|
|
151
|
+
- An `NPM_TOKEN` secret must be configured in the GitHub repository settings (Settings > Secrets and variables > Actions).
|
|
152
|
+
- The token needs publish access to the `trimble-terra` package on npm.
|
|
153
|
+
|
|
154
|
+
### CI
|
|
155
|
+
|
|
156
|
+
Every push and pull request to `react19` runs the CI workflow (lint, format check, build) on Node 20 and 22.
|
|
157
|
+
|
|
158
|
+
## Technical Audit — Known Issues
|
|
159
|
+
|
|
160
|
+
- **K-3 — CommonDescription / CleanDescription duplication** (Medium): Nearly identical logic differing only in class names. Merge into one component with a `variant` prop.
|
|
161
|
+
- **K-4 — Inline styles instead of SCSS** (Medium): `CardEcommerce`, `LayoutPricingCards`, `PricingCards`, `SiteNavigationMain`, `YoutubeVideo`, `FocusedImageMethods`, and others use `style={}` for layout, backgrounds, and sizing that should live in SCSS.
|
|
162
|
+
- **K-5 — Pervasive `any` usage** (High): `any` is used for props, event handlers, refs, and data structures across ~30+ files. Especially dense in `SiteNavigation*`, `LanguageSelector`, `ProductDetail`, `LayoutPricingCards`, `VidyardVideo`, and all `.jsx` files.
|
|
163
|
+
- **A-1 — `onClick` on non-interactive elements without keyboard support** (High): Multiple `<div>` and `<span>` elements have `onClick` handlers without `role="button"`, `tabIndex={0}`, or `onKeyDown`/`onKeyUp`. `ProductOverview.tsx` uses `<a href="" onClick>` instead of `<button>`.
|
|
164
|
+
- **A-2 — Missing `alt` text on images** (Medium): App Store / Google Play badge images in `TerraLink.tsx`, `SpecialButton.tsx`, and `SiteNavigationMobile.tsx` lack meaningful `alt` attributes.
|
|
165
|
+
- **S-1 — Unsanitized `dangerouslySetInnerHTML`** (High): CMS/prop content rendered via `dangerouslySetInnerHTML` without visible sanitization in `CommonDescription.tsx`, `functions.tsx`, `CurrencyList.tsx`, `ProductSummaryMethods.jsx`, `FlyoutCart.jsx`, `checkForDangerouslySet.jsx`. Centralize through a sanitizer (e.g., DOMPurify).
|
|
166
|
+
- **C-2 — Direct DOM manipulation** (Medium): `CardEcommerce.tsx` uses `document.querySelector` instead of a ref; `ImageGalleryMethods.jsx` sets `body.style.overflow` directly; `useElementIntersection.ts` takes a selector string instead of a ref.
|
|
167
|
+
- **C-3 — 16 `.jsx` files remain unconverted** (Medium): `Slider`, `NavSearchWrapper`, `Tooltip`, `TrialFormStart`, `ProductSummary`, `TrialSummary`, `TrialMethods`, `TrialSpecifics`, `ProductSummaryMethods`, `PricingCards`, `ImageGallery`, `ImageGalleryMethods`, `FlyoutCart`, `checkForDangerouslySet`, `CloseIcon`, `CardEcommerceMethods` — all have zero type safety.
|
|
168
|
+
- **C-4 — Blanket `eslint-disable` suppresses all warnings** (Medium): File-level `/* eslint-disable */` in `LanguageSelector.tsx`, `SiteNavigationMain.tsx`, `CartNavMenu.tsx`, `FlyoutCart.jsx`, `FlyoutCartComponent.tsx`, `QuantityTracker.stories.tsx`, `Video.tsx`.
|
|
169
|
+
- **C-6 — Console statements in production code** (Low): `YoutubeVideo.tsx` (`console.warn`) and `CardEcommerceMethods.jsx` (`console.error`) will fire in consumers' production builds.
|
|
170
170
|
- **C-7 — Duplicate `ImageGallery` component names** (Medium): Two separate `ImageGallery` implementations exist at `src/component/ImageGallery/` and `src/component/ProductDetail/ImageGallery/`, causing confusion and potential import mistakes.
|
package/dist/lib/main.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { default as d } from "../src/component/
|
|
7
|
-
import { default as S } from "../src/component/
|
|
8
|
-
import { default as n } from "../src/component/
|
|
9
|
-
import { default as F } from "../src/component/
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
1
|
+
import { AlertBanner as e } from "../src/component/AlertBanner/AlertBanner.js";
|
|
2
|
+
import { SearchButton as a } from "../src/component/SearchButton/SearchButton.js";
|
|
3
|
+
import { CallToAction as m } from "../src/component/CallToAction/CallToAction.js";
|
|
4
|
+
import { PurchaseSection as l } from "../src/component/PurchaseSection/PurchaseSection.js";
|
|
5
|
+
import { TDHeader as i } from "../src/component/TrimbleDeveloper/TDHeader.js";
|
|
6
|
+
import { default as d } from "../src/component/TrialForm/TrialFormStart/TrialFormStart.js";
|
|
7
|
+
import { default as S } from "../src/component/TrialForm/TrialComponents/TrialSummary.js";
|
|
8
|
+
import { default as n } from "../src/component/ProductSummary/ProductSummary.js";
|
|
9
|
+
import { default as F } from "../src/component/ProductDetail/ProductDetail.js";
|
|
10
|
+
import { default as y } from "../src/component/LoadingSpinner/LoadingSpinner.js";
|
|
11
|
+
import { default as D } from "../src/component/Dialog/Dialog.js";
|
|
12
|
+
import { default as C } from "../src/component/ImageGallery/ImageGallery.js";
|
|
13
|
+
import { default as P } from "../src/component/FocusedImage/FocusedImage.js";
|
|
14
|
+
import { default as h } from "../src/component/MoreFromDeveloper/MoreFromDeveloper.js";
|
|
15
15
|
import { ProductDetailTabs as B } from "../src/component/ProductDetail/ProductDetailTabs/ProductDetailTabs.js";
|
|
16
16
|
import { FeaturedResources as I } from "../src/component/ProductDetail/FeaturedResources/FeaturedResources.js";
|
|
17
17
|
import { SectorFooter as H } from "../src/navigation/Footer/SectorFooter/SectorFooter.js";
|
|
@@ -23,28 +23,28 @@ import { SiteNavigationMobileCategory as O } from "../src/navigation/SiteNavigat
|
|
|
23
23
|
import { SiteNav as U } from "../src/navigation/SiteNav/SiteNav.js";
|
|
24
24
|
import { SiteNavMobileCategory as W } from "../src/navigation/SiteNav/SiteNavMobileCategory.js";
|
|
25
25
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
e as AlertBanner,
|
|
27
|
+
m as CallToAction,
|
|
28
|
+
D as Dialog,
|
|
29
29
|
I as FeaturedResources,
|
|
30
|
-
|
|
30
|
+
P as FocusedImage,
|
|
31
31
|
q as Footer,
|
|
32
32
|
j as GlobalFooter,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
C as ImageGallery,
|
|
34
|
+
y as LoadingSpinner,
|
|
35
|
+
h as MoreFromDeveloper,
|
|
36
|
+
F as ProductDetail,
|
|
37
37
|
B as ProductDetailTabs,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
n as ProductSummary,
|
|
39
|
+
l as PurchaseSection,
|
|
40
|
+
a as SearchButton,
|
|
41
41
|
H as SectorFooter,
|
|
42
42
|
U as SiteNav,
|
|
43
43
|
W as SiteNavMobileCategory,
|
|
44
44
|
z as SiteNavigation,
|
|
45
45
|
O as SiteNavigationMobileCategory,
|
|
46
|
-
|
|
46
|
+
i as TDHeader,
|
|
47
47
|
J as TopLevelCategory,
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
d as TrialFormStart,
|
|
49
|
+
S as TrialSummary
|
|
50
50
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.t2-credits-tracker{position:relative;display:flex;align-items:center;height:48px;max-width:240px;border:1px solid #585c65;border-radius:10px}.t2-credits-tracker--invalid{border-color:#ac151d}.t2-credits-tracker__error{font-size:12px;line-height:16px;margin:0 0 24px;color:#ac151d;max-width:240px}.t2-credits-tracker__error strong{font-weight:700!important}.t2-credits-tracker__input{flex:1;width:100%;height:100%;border:none;outline:none;text-align:center;font-size:16px;font-weight:600;color:#252a2e;background:transparent;padding:0 40px}.t2-credits-tracker__input::-webkit-outer-spin-button,.t2-credits-tracker__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.t2-credits-tracker__input:disabled{cursor:not-allowed;color:#a3a6b1}.t2-credits-tracker__button{position:absolute;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:32px;height:100%;padding:0;background:transparent;border:none;color:#252a2e;cursor:pointer}.t2-credits-tracker__button--decrease{left:8px}.t2-credits-tracker__button--increase{right:8px}.t2-credits-tracker__button[disabled]{color:#a3a6b1;cursor:not-allowed}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CreditsTrackerProps {
|
|
3
|
+
minimumQuantity: number;
|
|
4
|
+
maximumQuantity: number;
|
|
5
|
+
incrementRate: number;
|
|
6
|
+
credits?: number;
|
|
7
|
+
onCreditsChange?: (credits: number) => void;
|
|
8
|
+
locale?: string | string[];
|
|
9
|
+
inputId?: string;
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
belowMinimumLabel?: string;
|
|
14
|
+
aboveMaximumLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const CreditsTracker: ({ minimumQuantity, maximumQuantity, incrementRate, credits, onCreditsChange, locale, inputId, ariaLabel, disabled, className, belowMinimumLabel, aboveMaximumLabel, }: CreditsTrackerProps) => React.JSX.Element;
|
|
17
|
+
export default CreditsTracker;
|
|
18
|
+
//# sourceMappingURL=CreditsTracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreditsTracker.d.ts","sourceRoot":"","sources":["../../../../src/component/CreditsTracker/CreditsTracker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AACvC,OAAO,uBAAuB,CAAA;AAE9B,MAAM,WAAW,mBAAmB;IAClC,eAAe,EAAE,MAAM,CAAA;IACvB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,QAAA,MAAM,cAAc,GAAI,uKAarB,mBAAmB,sBAqKrB,CAAA;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsxs as b, Fragment as T, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import E, { useState as F } from "react";
|
|
3
|
+
import './CreditsTracker.css';/* empty css */
|
|
4
|
+
const q = ({
|
|
5
|
+
minimumQuantity: e,
|
|
6
|
+
maximumQuantity: o,
|
|
7
|
+
incrementRate: c,
|
|
8
|
+
credits: k,
|
|
9
|
+
onCreditsChange: i,
|
|
10
|
+
locale: f,
|
|
11
|
+
inputId: N,
|
|
12
|
+
ariaLabel: _,
|
|
13
|
+
disabled: u = !1,
|
|
14
|
+
className: v,
|
|
15
|
+
belowMinimumLabel: H,
|
|
16
|
+
aboveMaximumLabel: M
|
|
17
|
+
}) => {
|
|
18
|
+
const s = k ?? e, [n, C] = F(null), V = () => {
|
|
19
|
+
i?.(Math.max(e, s - c));
|
|
20
|
+
}, D = () => {
|
|
21
|
+
i?.(Math.min(o, s + c));
|
|
22
|
+
}, I = (r) => {
|
|
23
|
+
const l = r.currentTarget.value.replace(/[^0-9]/g, "");
|
|
24
|
+
C(l);
|
|
25
|
+
}, x = () => {
|
|
26
|
+
if (n === null) return;
|
|
27
|
+
const r = parseInt(n, 10), l = Number.isNaN(r) ? 0 : r, h = c > 0 ? Math.round(l / c) * c : l, a = Math.min(
|
|
28
|
+
o,
|
|
29
|
+
Math.max(e, h)
|
|
30
|
+
);
|
|
31
|
+
C(null), a !== s && i?.(a);
|
|
32
|
+
}, B = (r) => {
|
|
33
|
+
r.key === "Enter" && (r.preventDefault(), r.currentTarget.blur());
|
|
34
|
+
}, j = s.toLocaleString(f), L = n ?? j, g = (r, l) => {
|
|
35
|
+
if (!r) return null;
|
|
36
|
+
const h = l.toLocaleString(f);
|
|
37
|
+
return r.split(/(\{[^}]+\})/g).map((a, w) => /^\{[^}]+\}$/.test(a) ? /* @__PURE__ */ t("span", { children: h }, w) : /* @__PURE__ */ t(E.Fragment, { children: a }, w));
|
|
38
|
+
};
|
|
39
|
+
let p = !1, d = null;
|
|
40
|
+
if (n !== null && n !== "") {
|
|
41
|
+
const r = parseInt(n, 10);
|
|
42
|
+
Number.isNaN(r) || (r < e ? (p = !0, d = g(H, e)) : r > o && (p = !0, d = g(M, o)));
|
|
43
|
+
}
|
|
44
|
+
const S = [
|
|
45
|
+
"t2-credits-tracker",
|
|
46
|
+
p && "t2-credits-tracker--invalid",
|
|
47
|
+
v
|
|
48
|
+
].filter(Boolean).join(" ");
|
|
49
|
+
return /* @__PURE__ */ b(T, { children: [
|
|
50
|
+
/* @__PURE__ */ b("div", { className: S, children: [
|
|
51
|
+
/* @__PURE__ */ t(
|
|
52
|
+
"button",
|
|
53
|
+
{
|
|
54
|
+
type: "button",
|
|
55
|
+
className: "t2-credits-tracker__button t2-credits-tracker__button--decrease",
|
|
56
|
+
onClick: V,
|
|
57
|
+
disabled: u || s <= e,
|
|
58
|
+
"aria-label": "Decrease credits",
|
|
59
|
+
children: /* @__PURE__ */ t(
|
|
60
|
+
"svg",
|
|
61
|
+
{
|
|
62
|
+
width: "14",
|
|
63
|
+
height: "2",
|
|
64
|
+
viewBox: "0 0 14 2",
|
|
65
|
+
fill: "currentColor",
|
|
66
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
67
|
+
children: /* @__PURE__ */ t("path", { d: "M14 2H0V0H14V2Z", fill: "currentColor" })
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
/* @__PURE__ */ t(
|
|
73
|
+
"input",
|
|
74
|
+
{
|
|
75
|
+
id: N,
|
|
76
|
+
type: "text",
|
|
77
|
+
inputMode: "numeric",
|
|
78
|
+
className: "t2-credits-tracker__input",
|
|
79
|
+
value: L,
|
|
80
|
+
onChange: I,
|
|
81
|
+
onBlur: x,
|
|
82
|
+
onKeyDown: B,
|
|
83
|
+
disabled: u,
|
|
84
|
+
"aria-label": _
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ t(
|
|
88
|
+
"button",
|
|
89
|
+
{
|
|
90
|
+
type: "button",
|
|
91
|
+
className: "t2-credits-tracker__button t2-credits-tracker__button--increase",
|
|
92
|
+
onClick: D,
|
|
93
|
+
disabled: u || s >= o,
|
|
94
|
+
"aria-label": "Increase credits",
|
|
95
|
+
children: /* @__PURE__ */ t(
|
|
96
|
+
"svg",
|
|
97
|
+
{
|
|
98
|
+
width: "14",
|
|
99
|
+
height: "14",
|
|
100
|
+
viewBox: "0 0 14 14",
|
|
101
|
+
fill: "currentColor",
|
|
102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
+
children: /* @__PURE__ */ t("path", { d: "M14 8H8V14H6V8H0V6H6V0H8V6H14V8Z", fill: "currentColor" })
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] }),
|
|
109
|
+
d && /* @__PURE__ */ t("p", { className: "t2-credits-tracker__error", role: "alert", children: d })
|
|
110
|
+
] });
|
|
111
|
+
};
|
|
112
|
+
export {
|
|
113
|
+
q as default
|
|
114
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes t2-dialog-open{0%{opacity:0;transform:translate(-50%,-48%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.t2-dialog{position:fixed;z-index:5;box-sizing:border-box;background:#fff;max-width:560px;top:40%;left:50%;transform:translate(-50%,-50%);padding:24px
|
|
1
|
+
@keyframes t2-dialog-open{0%{opacity:0;transform:translate(-50%,-48%) scale(.9)}to{opacity:1;transform:translate(-50%,-50%) scale(1)}}.t2-dialog{position:fixed;z-index:5;box-sizing:border-box;background:#fff;max-width:560px;top:40%;left:50%;transform:translate(-50%,-50%);padding:24px;border-radius:10px;box-shadow:0 110px 31px #0000,0 70px 28px #00000003,0 40px 24px #0000000d,0 18px 18px #00000017,0 4px 10px #0000001a;text-transform:none}.t2-dialog p:first-of-type{margin-top:0}.t2-dialog p:last-of-type{margin-bottom:0}@media not (min-width:600px){.t2-dialog{width:90%;height:auto}}.t2-dialog__overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1000;background:#3635454d}.t2-dialog__close{all:unset;position:absolute;top:33px;right:32px;margin:0;padding:0;cursor:pointer}.t2-dialog__close:focus{outline:revert}.t2-dialog__title{font-size:20px;font-weight:700;line-height:28px;letter-spacing:.5px;margin:0 8px 8px}.t2-dialog__content,.t2-dialog__content__text,.t2-dialog__content__text-holder{font-size:16px;line-height:28px;margin-left:8px;margin-right:8px}.t2-dialog__content--link,.t2-dialog__content__text--link,.t2-dialog__content__text-holder--link{font-size:16px;line-height:28px}.t2-dialog__content ul,.t2-dialog__content__text ul,.t2-dialog__content__text-holder ul{margin:16px 0 0;padding-left:20px}.t2-dialog__content li:last-child,.t2-dialog__content__text li:last-child,.t2-dialog__content__text-holder li:last-child{margin-bottom:0}.t2-dialog__buttons{display:flex;gap:12px;flex-direction:row;justify-content:flex-end;margin-top:16px}@media not (min-width:600px){.t2-dialog__buttons{flex-direction:column-reverse}}.t2-dialog__buttons .t2-button,.t2-dialog__buttons .t2-button:hover,.t2-dialog__buttons .t2-button:focus,.t2-dialog__buttons .t2-button:visited,.t2-dialog__buttons .t2-button:active{padding-left:24px;padding-right:24px;border-width:2px;box-shadow:none}.t2-dialog--opened{animation:t2-dialog-open .2s ease-out}.t2-dialog--closed{display:none}.t2-dialog--non-buyer-new-account{width:560px}.t2-dialog--non-buyer-new-account .t2-dialog__title{margin-bottom:8px}.t2-dialog--non-buyer-new-account .t2-dialog__content p,.t2-dialog--non-buyer-new-account .t2-dialog__content__text p,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder p{margin:0;padding-bottom:16px}.t2-dialog--non-buyer-new-account .t2-dialog__content ul,.t2-dialog--non-buyer-new-account .t2-dialog__content__text ul,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder ul{margin:0 8px;padding-left:28px}.t2-dialog--non-buyer-new-account .t2-dialog__content li,.t2-dialog--non-buyer-new-account .t2-dialog__content__text li,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder li{padding-left:8px}.t2-dialog--non-buyer-new-account .t2-dialog__content li:last-child,.t2-dialog--non-buyer-new-account .t2-dialog__content__text li:last-child,.t2-dialog--non-buyer-new-account .t2-dialog__content__text-holder li:last-child{margin-bottom:0}.t2-dialog--non-buyer-new-account .t2-dialog__buttons{justify-content:flex-end;margin-top:16px;gap:12px;flex-wrap:nowrap;width:100%}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button{white-space:nowrap;padding:10px 16px;font-size:18px;font-weight:700;line-height:2.25rem;letter-spacing:.08em;text-transform:uppercase;border-radius:100px;box-shadow:none}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:hover,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:focus,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:visited,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:active{color:#252a2e;background-color:#fff;border:1px solid #252a2e;box-shadow:none}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--secondary:hover{background-color:#fff;border-color:#252a2e}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:hover,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:focus,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:visited,.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:active{color:#252a2e;background-color:#fbad26;border:2px solid #fbad26;box-shadow:none}.t2-dialog--non-buyer-new-account .t2-dialog__buttons .t2-button--primary:hover{background-color:#de9921;border-color:#de9921}.t2-dialog-loading__section{display:flex;gap:12px;flex-direction:column;align-items:center;justify-content:center;margin-bottom:24px;margin-top:12px}.t2-dialog-loading__text{color:#0063a3;font-size:16px;line-height:28px;letter-spacing:.15}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
interface DialogProps {
|
|
2
2
|
isOpen: boolean;
|
|
3
|
-
variant?: "loading";
|
|
3
|
+
variant?: "loading" | "nonBuyerNewAccount";
|
|
4
4
|
title: string;
|
|
5
5
|
content: string;
|
|
6
6
|
loadingText?: string;
|
|
7
7
|
primaryButtonText: string;
|
|
8
8
|
secondaryButtonText?: string;
|
|
9
9
|
onCloseButtonClick?: (e?: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
|
-
onPrimaryButtonClick?: () => void;
|
|
11
|
-
onSecondaryButtonClick?: () => void;
|
|
10
|
+
onPrimaryButtonClick?: (e?: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
+
onSecondaryButtonClick?: (e?: React.MouseEvent<HTMLElement>) => void;
|
|
12
12
|
contentWithLink?: string;
|
|
13
13
|
contentLink?: string;
|
|
14
14
|
contentLinkText?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/component/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../../src/component/Dialog/Dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAKvB,UAAU,WAAW;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,oBAAoB,CAAC;IAC3C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,kBAAkB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACvE,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnE,sBAAsB,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,QAAA,MAAM,MAAM,GAAI,OAAO,WAAW,gCAqGjC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|