luna-one 3.1.596 → 3.1.598
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2315 -2315
- package/dist/global-styles/content/typography.scss +140 -140
- package/dist/global-styles/fonts/benton.scss +113 -113
- package/dist/global-styles/global-terra.scss +10 -10
- package/dist/global-styles/global-vars.scss +599 -599
- package/dist/global-styles/layout/_css-grid.scss +20 -20
- package/dist/global-styles/layout/_media-queries.scss +35 -35
- package/dist/global-styles/layout/_normalize.scss +340 -340
- package/dist/global-styles/layout/_reset.scss +13 -13
- package/dist/global-styles/mixins/_box-shadow.scss +6 -6
- package/dist/global-styles/mixins/_mixins.scss +5 -5
- package/dist/global-styles/mixins/_organism-padding-hack.scss +7 -7
- package/dist/global-styles/mixins/_typography.scss +102 -102
- package/dist/global-styles/mixins/_yiq.scss +50 -50
- package/dist/global-styles/mixins/_z-index.scss +3 -3
- package/dist/global-styles/terra.scss +15 -15
- package/dist/global-styles/utilities/_box-shadow.scss +8 -8
- package/dist/global-styles/utilities/_display.scss +48 -48
- package/dist/global-styles/utilities/_font-family.scss +15 -15
- package/dist/global-styles/utilities/_parallax.scss +23 -23
- package/dist/global-styles/utilities/_text-align.scss +24 -24
- package/dist/luna/components/2x2/2x2.scss +915 -915
- package/dist/luna/components/2x2/2x2Documentation.mdx +77 -77
- package/dist/luna/components/Accordion/Accordion.scss +154 -154
- package/dist/luna/components/Accordion/AccordionDocumentation.mdx +45 -45
- package/dist/luna/components/AdminCategoryData/AdminCategoryData.scss +81 -81
- package/dist/luna/components/AdminProductData/AdminProductData.scss +75 -75
- package/dist/luna/components/BlockListItems/BlockListItems.scss +285 -285
- package/dist/luna/components/BlockListItems/BlockListItemsDocumentation.mdx +339 -339
- package/dist/luna/components/BrowserSupportBanner/BrowserSupportBanner.scss +6 -6
- package/dist/luna/components/CTAButtons/CTAButtons.scss +19 -19
- package/dist/luna/components/CTAButtons/CTAButtonsDocumentation.mdx +33 -33
- package/dist/luna/components/Carousel/Carousel.scss +155 -155
- package/dist/luna/components/Carousel/CarouselDocumentation.mdx +161 -161
- package/dist/luna/components/ComparisonTable/ComparisonTable.scss +331 -331
- package/dist/luna/components/ComparisonTable/ComparisonTableDocumentation.mdx +159 -159
- package/dist/luna/components/CtaWithHeader/CTAHeaderTextDocumentation.mdx +45 -45
- package/dist/luna/components/CtaWithHeader/CtaWithHeader.scss +324 -324
- package/dist/luna/components/DataPoint/DataPoint.scss +170 -170
- package/dist/luna/components/DataPoint/DataPointDocumentation.mdx +40 -40
- package/dist/luna/components/EventCard/EventCard.scss +134 -134
- package/dist/luna/components/EventCard/EventCardDocumentation.mdx +46 -46
- package/dist/luna/components/FilterHero/FilterHero.scss +80 -80
- package/dist/luna/components/FilterSection/FilterSection.scss +175 -175
- package/dist/luna/components/Flyout/Flyout.scss +367 -367
- package/dist/luna/components/Flyout/FlyoutDocumentation.mdx +60 -60
- package/dist/luna/components/Footer/Footer.scss +484 -484
- package/dist/luna/components/Footer/FooterDocumentation.mdx +133 -133
- package/dist/luna/components/FullBackgroundHero/FullBackgroundHero.scss +722 -722
- package/dist/luna/components/FullBackgroundHero/FullBackgroundHeroDocumentation.mdx +93 -93
- package/dist/luna/components/HTMLEmbed/HTMLEmbed.scss +51 -51
- package/dist/luna/components/HTMLEmbed/HTMLEmbedDocumentation.mdx +31 -31
- package/dist/luna/components/Header/Header.scss +36 -36
- package/dist/luna/components/Header/HeaderDocumentation.mdx +24 -24
- package/dist/luna/components/IconTextList/IconTextList.scss +124 -124
- package/dist/luna/components/IconTextList/IconTextListDocumentation.mdx +45 -45
- package/dist/luna/components/ImageGallery/ImageGallery.scss +442 -442
- package/dist/luna/components/ImageGallery/ImageGalleryDocumentation.mdx +90 -90
- package/dist/luna/components/InPageJumpNav/InPageJumpNav.scss +122 -122
- package/dist/luna/components/InPageJumpNav/InPageJumpNavDocumentation.mdx +22 -22
- package/dist/luna/components/JobPosting/JobPosting.scss +171 -171
- package/dist/luna/components/JobPosting/JobPostingDocumentation.mdx +69 -69
- package/dist/luna/components/LanguageSelector/LanguageSelector.scss +318 -318
- package/dist/luna/components/LanguageSelector/LanguageSelectorDocumentation.mdx +119 -119
- package/dist/luna/components/LinkList/LinkList.scss +59 -59
- package/dist/luna/components/LinkList/LinkListDocumentation.mdx +54 -54
- package/dist/luna/components/LoadingSpinner/LoadingSpinner.scss +34 -34
- package/dist/luna/components/Login/Login.scss +180 -180
- package/dist/luna/components/MarketoForm/MarketoForm.scss +56 -56
- package/dist/luna/components/MarketoForm/MarketoFormDocumentation.mdx +1 -1
- package/dist/luna/components/MegaMenu/MegaMenu.js +3 -3
- package/dist/luna/components/MegaMenu/MegaMenu.scss +570 -570
- package/dist/luna/components/MobileLogin/MobileLogin.scss +38 -38
- package/dist/luna/components/MobileMegaMenu/MobileMegaMenu.scss +289 -289
- package/dist/luna/components/MobileMenu/MobileMenu.scss +70 -70
- package/dist/luna/components/MobileNav/MobileNav.scss +286 -286
- package/dist/luna/components/NavBar/NavBar.scss +628 -628
- package/dist/luna/components/NavBar/NavigationBarDocumentation.mdx +245 -245
- package/dist/luna/components/NavBarTop/NavBarTop.scss +403 -403
- package/dist/luna/components/NavSearch/NavSearch.scss +130 -130
- package/dist/luna/components/NonTimeBasedListEntries/NonTimeBasedListEntries.scss +339 -339
- package/dist/luna/components/NonTimeBasedListEntries/NonTimeBasedListEntriesDocumentation.mdx +89 -89
- package/dist/luna/components/OverlayNotice/OverlayNotice.scss +247 -247
- package/dist/luna/components/OverlayNotice/OverlayNoticeDocumentation.mdx +45 -45
- package/dist/luna/components/Pagination/Pagination.scss +27 -27
- package/dist/luna/components/ProductSummary/ProductSummary.scss +273 -273
- package/dist/luna/components/ProductsPackage/ProductsPackage.scss +194 -194
- package/dist/luna/components/ProseLayout/ProseLayout.js +7 -5
- package/dist/luna/components/ProseLayout/ProseLayout.scss +394 -384
- package/dist/luna/components/ProseLayout/ProseLayoutDocumentation.mdx +93 -93
- package/dist/luna/components/PullQuote/PullQuote.scss +400 -400
- package/dist/luna/components/PullQuote/PullQuoteDocumentation.mdx +60 -60
- package/dist/luna/components/PullQuote/ico-quote-white.svg +3 -3
- package/dist/luna/components/PullQuote/ico-quote.svg +3 -3
- package/dist/luna/components/RegionCard/RegionCard.scss +86 -86
- package/dist/luna/components/ResourceGrid/ResourceGrid.scss +34 -34
- package/dist/luna/components/ResourceGrid/ResourceGridDocumentation.mdx +102 -102
- package/dist/luna/components/ScrollInPlace/ScrollInPlace.scss +219 -219
- package/dist/luna/components/ScrollInPlace/ScrollInPlaceDocumentation.mdx +123 -123
- package/dist/luna/components/SketchUpPricingCard/SketchUpPricingCard.scss +142 -142
- package/dist/luna/components/SlideOutFeat/SlideOutFeat.scss +124 -124
- package/dist/luna/components/StoreFrontCard/StoreFrontCard.scss +434 -434
- package/dist/luna/components/SubNav/SubNav.scss +274 -274
- package/dist/luna/components/SuperHero/SuperHero.scss +804 -804
- package/dist/luna/components/SuperHero/SuperHeroDocumentation.mdx +57 -57
- package/dist/luna/components/SupportCard/SupportCard.scss +134 -134
- package/dist/luna/components/Tabs/Tabs.scss +871 -871
- package/dist/luna/components/Tabs/TabsDocumentation.mdx +94 -94
- package/dist/luna/components/TimeBasedList/TimeBasedList.scss +394 -394
- package/dist/luna/components/TimeBasedList/TimeBasedListDocumentation.mdx +123 -123
- package/dist/luna/components/TrainerCard/TrainerCard.scss +51 -51
- package/dist/luna/components/TrialForm/TrialComponents/TrialSpecifics.scss +44 -44
- package/dist/luna/components/TrialForm/TrialComponents/TrialSummary.scss +57 -57
- package/dist/luna/components/TrialForm/TrialFormStart/TrialFormStart.scss +28 -28
- package/dist/luna/components/TrialForm/images/check.svg +3 -3
- package/dist/luna/components/TrialForm/images/form-border-bottom-dark.svg +4 -4
- package/dist/luna/components/TrialForm/images/form-border-bottom-light.svg +4 -4
- package/dist/luna/components/TrialForm/images/form-border-top-dark.svg +4 -4
- package/dist/luna/components/TrialForm/images/form-border-top-light.svg +4 -4
- package/dist/luna/components/UnboundedCard/UnboundedCard.scss +108 -108
- package/dist/luna/components/UnboundedCard/playIcon.svg +17 -17
- package/dist/luna/components/VariableContentCard/VariableContentCard.scss +253 -253
- package/dist/luna/components/Video/Video.scss +209 -209
- package/dist/luna/components/Video/VideoDocumentation.mdx +56 -56
- package/dist/luna/components/VidyardModal/VidyardModal.scss +34 -34
- package/dist/luna/components/WaffleMenu/WaffleMenu.scss +73 -73
- package/dist/luna/images/arrow-diagonal-black.svg +13 -13
- package/dist/luna/images/arrow-diagonal-blue.svg +13 -13
- package/dist/luna/images/arrow-diagonal-white.svg +13 -13
- package/dist/luna/images/bulletpoint.svg +3 -3
- package/dist/luna/images/callout-icon.svg +3 -3
- package/dist/luna/images/carat-down.svg +3 -3
- package/dist/luna/images/carat-up.svg +3 -3
- package/dist/luna/images/check-blue.svg +4 -4
- package/dist/luna/images/circle-arrow-right-black.svg +3 -3
- package/dist/luna/images/circle-arrow-right-white.svg +3 -3
- package/dist/luna/images/circle-arrow.svg +3 -3
- package/dist/luna/images/close-blue.svg +4 -4
- package/dist/luna/images/close-button.svg +42 -42
- package/dist/luna/images/close-dark-navy.svg +3 -3
- package/dist/luna/images/close-icon.svg +3 -3
- package/dist/luna/images/close.svg +3 -3
- package/dist/luna/images/collapse-close-blue.svg +5 -5
- package/dist/luna/images/collapse-close-gold.svg +5 -5
- package/dist/luna/images/collapse-open-blue.svg +4 -4
- package/dist/luna/images/collapse-open-gold.svg +4 -4
- package/dist/luna/images/cross-medium-blue.svg +4 -4
- package/dist/luna/images/cross-medium-white.svg +5 -5
- package/dist/luna/images/down-caret-dark-blue.svg +4 -4
- package/dist/luna/images/down-caret-dark-gray.svg +4 -4
- package/dist/luna/images/down-caret-light-gray.svg +4 -4
- package/dist/luna/images/downArrow.svg +36 -36
- package/dist/luna/images/ellipses.svg +6 -6
- package/dist/luna/images/external-arrow-blue.svg +11 -11
- package/dist/luna/images/external-arrow-white-theme.svg +12 -12
- package/dist/luna/images/external-arrow.svg +12 -12
- package/dist/luna/images/facebook.svg +13 -13
- package/dist/luna/images/form-border-top-light.svg +4 -4
- package/dist/luna/images/frame-intersection.svg +3 -3
- package/dist/luna/images/gallery-image-corner-border.svg +3 -3
- package/dist/luna/images/green-tick.svg +3 -3
- package/dist/luna/images/instagram.svg +19 -19
- package/dist/luna/images/internal-arrow-blue.svg +15 -15
- package/dist/luna/images/internal-arrow-white-theme.svg +15 -15
- package/dist/luna/images/internal-arrow.svg +15 -15
- package/dist/luna/images/linkedin.svg +15 -15
- package/dist/luna/images/logo-icon.svg +17 -17
- package/dist/luna/images/pdf-doc.svg +9 -9
- package/dist/luna/images/play.svg +17 -17
- package/dist/luna/images/right-caret-dark-blue.svg +3 -3
- package/dist/luna/images/right-caret-light-gray.svg +4 -4
- package/dist/luna/images/right-caret-light-yellow-stroke.svg +9 -9
- package/dist/luna/images/right-caret-light-yellow.svg +4 -4
- package/dist/luna/images/right-caret-medium-gray.svg +4 -4
- package/dist/luna/images/search.svg +9 -9
- package/dist/luna/images/skipicon.svg +154 -154
- package/dist/luna/images/text-doc.svg +9 -9
- package/dist/luna/images/text-lines.svg +22 -22
- package/dist/luna/images/tooltip-close-icon.svg +3 -3
- package/dist/luna/images/tooltip-icon.svg +3 -3
- package/dist/luna/images/twitter.svg +17 -17
- package/dist/luna/images/up-arrow.svg +36 -36
- package/dist/luna/images/up-right-arrow.svg +9 -9
- package/dist/luna/images/user-profile.svg +37 -37
- package/dist/luna/images/user.svg +4 -4
- package/dist/luna/images/waffle.svg +11 -11
- package/dist/luna/images/worldwide.svg +19 -19
- package/dist/luna/images/youtube.svg +14 -14
- package/package.json +91 -91
@@ -1,245 +1,245 @@
|
|
1
|
-
#### NavBar
|
2
|
-
|
3
|
-
###### Notes -
|
4
|
-
|
5
|
-
This component uses the `react-slidedown` library for the innerpage navigation links in the `utilityNav`. The `link.url` string should be a reference to the name of the `<Element>` that wraps the corresponding organism that the window should scroll to.
|
6
|
-
|
7
|
-
This parent component consists of the `<NavBarTop />`, `<UtilityNav />`, `<NavSearch />`, `<Flyout />`, `<LanguageSelector />`, `<Login />`, and various menu components. All props are listed below.
|
8
|
-
|
9
|
-
###### Props -
|
10
|
-
|
11
|
-
- `rightLinks` - array of objects used for generating links to the right of the search icon. Each object requires `url` and `text` strings.
|
12
|
-
- `logo` **(required)** - object consisting of `url` and `altText` strings (for generating the logo image) in addition to a link object with a `url` string for generating the `href` property.
|
13
|
-
- `divisionName` **(required)** - string used for generating the name of the Trimble division that is to the right of the logo.
|
14
|
-
- `featuredLink` - object consisting of `url` and `text`. This will display on the far right of the main (middle) section.
|
15
|
-
- `isExpanded` - boolean that determines if navigation menus are displayed as collapsed hierarchies or expanded lists. If `isExpanded` is set to true, only one level of menu will be displayed (tertiary navigation items will be ignored). Additionally, if `isExpanded` is set to true, Luna will check for `imageUrl` and `description` keys on each link object. If seen, the image and description will display instead of text.
|
16
|
-
- `disableSectorFlyout` - boolean that determines if the sector fly-out menu is displayed.
|
17
|
-
- `disableSearch` - boolean that determines if the search input is displayed.
|
18
|
-
- `disableLanguageRegion` - boolean that determines if the language/region selector item is displayed.
|
19
|
-
- `disableLogin` - boolean that determines if the login item is displayed.
|
20
|
-
- `navOptions` - array of objects used for generating the main (middle) section of the nav. All objects will have a type indicating whether to render a `<MegaMenu />` (type = 'category'), a simple drop down of links `<MiniMenu />` (type = 'links'), or a single link `singleLink` (type = 'link'). See examples below on how to load up these objects. The `MegaMenu` can render a child both with and without subcategories. `MegaMenu` can also hold an array of `featuredLinks` with a corresponding `featuredLinksTitle`.
|
21
|
-
- `utilityNav` - object consisting of a `pageTitle` string as well as a `links` array of objects consisting of `text` and `url` strings. See example below.
|
22
|
-
- `currentLanguage` - object with `region` and `language` strings that indicate the current region and language selected.
|
23
|
-
- `languageSelectorData` - object consisting of data needed to populate the `LanguageSelector` component. See example below.
|
24
|
-
- `setLanguage` - method used to set the region and language, which it takes as string key/values in an object as an argument
|
25
|
-
- `location` - prop used to close the mobile menu when a user clicks on one of the rightLinks. In your project, pass in `location={this.props.location}`
|
26
|
-
- `searchComponent` - react component used to render the search input and results.
|
27
|
-
- `searchDeployed` - boolean that determines if the search modal is displayed on initial render.
|
28
|
-
- `setSearchDeployed` **(required)** - method used to set the search modal state.
|
29
|
-
|
30
|
-
###### Example -
|
31
|
-
|
32
|
-
```
|
33
|
-
const rightLinks = [
|
34
|
-
{
|
35
|
-
url: "/link",
|
36
|
-
text: "Contact Us",
|
37
|
-
}
|
38
|
-
];
|
39
|
-
|
40
|
-
const logo = {
|
41
|
-
url: Logo (should be imported in the application),
|
42
|
-
altText: 'Trimble Logo',
|
43
|
-
link: {
|
44
|
-
url: 'www.trimble.com'
|
45
|
-
}
|
46
|
-
};
|
47
|
-
|
48
|
-
const divisionName = 'Geospatial';
|
49
|
-
const location = 'N. America';
|
50
|
-
|
51
|
-
const location = this.props.location
|
52
|
-
|
53
|
-
const utilityNav = {
|
54
|
-
pageTitle: "Trimble Accubid Enterprise",
|
55
|
-
links: [
|
56
|
-
{
|
57
|
-
text: "Product Anchor One",
|
58
|
-
url: "/#"
|
59
|
-
},
|
60
|
-
{
|
61
|
-
text: "Product Anchor Two",
|
62
|
-
url: "/#"
|
63
|
-
}
|
64
|
-
]
|
65
|
-
};
|
66
|
-
|
67
|
-
const megaMenu = {
|
68
|
-
type: "category",
|
69
|
-
text: "Products",
|
70
|
-
featuredLinksTitle: "Featured Links",
|
71
|
-
featuredLinks: [
|
72
|
-
{
|
73
|
-
url: "/#products",
|
74
|
-
text: "All Products",
|
75
|
-
},
|
76
|
-
{
|
77
|
-
url: "/1",
|
78
|
-
text: "What's New",
|
79
|
-
},
|
80
|
-
],
|
81
|
-
links: [
|
82
|
-
{
|
83
|
-
text: "Mechanical",
|
84
|
-
links: [
|
85
|
-
{
|
86
|
-
url: "/#",
|
87
|
-
text: "BIM Collaboration"
|
88
|
-
},
|
89
|
-
{
|
90
|
-
url: "/#",
|
91
|
-
text: "MEP Content"
|
92
|
-
}
|
93
|
-
]
|
94
|
-
},
|
95
|
-
{
|
96
|
-
text: "Electrical",
|
97
|
-
links: [
|
98
|
-
{
|
99
|
-
url: "/#",
|
100
|
-
text: "Design/Detailing"
|
101
|
-
},
|
102
|
-
{
|
103
|
-
url: "/#",
|
104
|
-
text: "Project Management"
|
105
|
-
}
|
106
|
-
]
|
107
|
-
},
|
108
|
-
{
|
109
|
-
text: "Plumbing",
|
110
|
-
link: {url: "/#"}
|
111
|
-
},
|
112
|
-
]
|
113
|
-
};
|
114
|
-
|
115
|
-
const miniMenus = [
|
116
|
-
{
|
117
|
-
type: "links",
|
118
|
-
text: "Services",
|
119
|
-
links: [
|
120
|
-
{
|
121
|
-
url: "/#",
|
122
|
-
text: "Link One"
|
123
|
-
},
|
124
|
-
{
|
125
|
-
url: "/#",
|
126
|
-
text: "Link Two"
|
127
|
-
}
|
128
|
-
]
|
129
|
-
},
|
130
|
-
{
|
131
|
-
type: "links",
|
132
|
-
text: "Resources",
|
133
|
-
links: [
|
134
|
-
{
|
135
|
-
url: "/#",
|
136
|
-
text: "Link One"
|
137
|
-
},
|
138
|
-
{
|
139
|
-
url: "/#",
|
140
|
-
text: "Link Two"
|
141
|
-
}
|
142
|
-
]
|
143
|
-
}
|
144
|
-
];
|
145
|
-
|
146
|
-
const singleLink = {
|
147
|
-
type: "link",
|
148
|
-
url: "/#",
|
149
|
-
text: "Process"
|
150
|
-
};
|
151
|
-
|
152
|
-
const languageSelectorData = {
|
153
|
-
labels: {
|
154
|
-
currentRegion: "Current Region",
|
155
|
-
cancel: "Cancel",
|
156
|
-
save: "Save"
|
157
|
-
},
|
158
|
-
regions: [
|
159
|
-
{
|
160
|
-
region: "North America",
|
161
|
-
languages: [
|
162
|
-
"EN: English (US)",
|
163
|
-
"EN-UK: English (UK)",
|
164
|
-
"FR: French",
|
165
|
-
"DE: German",
|
166
|
-
"NL: Dutch"
|
167
|
-
]
|
168
|
-
},
|
169
|
-
{
|
170
|
-
region: "UK and Middle East",
|
171
|
-
languages: [
|
172
|
-
"EN: English (US)",
|
173
|
-
"EN-UK: English (UK)",
|
174
|
-
"FR: French",
|
175
|
-
"DE: German",
|
176
|
-
"NL: Dutch"
|
177
|
-
]
|
178
|
-
},
|
179
|
-
{
|
180
|
-
region: "France",
|
181
|
-
languages: [
|
182
|
-
"EN: English (US)",
|
183
|
-
"EN-UK: English (UK)",
|
184
|
-
"FR: French",
|
185
|
-
"DE: German",
|
186
|
-
"NL: Dutch"
|
187
|
-
]
|
188
|
-
},
|
189
|
-
{
|
190
|
-
region: "Germany and Austria",
|
191
|
-
languages: [
|
192
|
-
"EN: English (US)",
|
193
|
-
"EN-UK: English (UK)",
|
194
|
-
"FR: French",
|
195
|
-
"DE: German",
|
196
|
-
"NL: Dutch"
|
197
|
-
]
|
198
|
-
},
|
199
|
-
{
|
200
|
-
region: "Switzerland",
|
201
|
-
languages: [
|
202
|
-
"EN: English (US)",
|
203
|
-
"EN-UK: English (UK)",
|
204
|
-
"FR: French",
|
205
|
-
"DE: German",
|
206
|
-
"NL: Dutch"
|
207
|
-
]
|
208
|
-
}
|
209
|
-
],
|
210
|
-
currentRegionLanguage: {
|
211
|
-
region: "UK and Middle East",
|
212
|
-
language: "EN-UK"
|
213
|
-
},
|
214
|
-
|
215
|
-
activeRegion: {
|
216
|
-
region: "UK and Middle East",
|
217
|
-
language: "EN: English"
|
218
|
-
},
|
219
|
-
|
220
|
-
companyDivision: "MEP"
|
221
|
-
|
222
|
-
};
|
223
|
-
|
224
|
-
|
225
|
-
return (
|
226
|
-
<NavBar
|
227
|
-
location={location}
|
228
|
-
rightLinks={rightLinks}
|
229
|
-
currentLanguage={{ region: "N. America", language: "EN: English" }}
|
230
|
-
logo={logo}
|
231
|
-
divisionName="MEP"
|
232
|
-
navCTA={navCTA}
|
233
|
-
navOptions={[megaMenu, ...miniMenus, singleLink]}
|
234
|
-
utilityNav={utilityNav}
|
235
|
-
languageSelectorData={languageSelectorData}
|
236
|
-
isExpanded={false}
|
237
|
-
disableSectorFlyOut={false}
|
238
|
-
disableSearch={false}
|
239
|
-
disableLanguageRegion={false}
|
240
|
-
disableSectorFlyOut={true}
|
241
|
-
disableLogin={true}
|
242
|
-
/>
|
243
|
-
)
|
244
|
-
|
245
|
-
```
|
1
|
+
#### NavBar
|
2
|
+
|
3
|
+
###### Notes -
|
4
|
+
|
5
|
+
This component uses the `react-slidedown` library for the innerpage navigation links in the `utilityNav`. The `link.url` string should be a reference to the name of the `<Element>` that wraps the corresponding organism that the window should scroll to.
|
6
|
+
|
7
|
+
This parent component consists of the `<NavBarTop />`, `<UtilityNav />`, `<NavSearch />`, `<Flyout />`, `<LanguageSelector />`, `<Login />`, and various menu components. All props are listed below.
|
8
|
+
|
9
|
+
###### Props -
|
10
|
+
|
11
|
+
- `rightLinks` - array of objects used for generating links to the right of the search icon. Each object requires `url` and `text` strings.
|
12
|
+
- `logo` **(required)** - object consisting of `url` and `altText` strings (for generating the logo image) in addition to a link object with a `url` string for generating the `href` property.
|
13
|
+
- `divisionName` **(required)** - string used for generating the name of the Trimble division that is to the right of the logo.
|
14
|
+
- `featuredLink` - object consisting of `url` and `text`. This will display on the far right of the main (middle) section.
|
15
|
+
- `isExpanded` - boolean that determines if navigation menus are displayed as collapsed hierarchies or expanded lists. If `isExpanded` is set to true, only one level of menu will be displayed (tertiary navigation items will be ignored). Additionally, if `isExpanded` is set to true, Luna will check for `imageUrl` and `description` keys on each link object. If seen, the image and description will display instead of text.
|
16
|
+
- `disableSectorFlyout` - boolean that determines if the sector fly-out menu is displayed.
|
17
|
+
- `disableSearch` - boolean that determines if the search input is displayed.
|
18
|
+
- `disableLanguageRegion` - boolean that determines if the language/region selector item is displayed.
|
19
|
+
- `disableLogin` - boolean that determines if the login item is displayed.
|
20
|
+
- `navOptions` - array of objects used for generating the main (middle) section of the nav. All objects will have a type indicating whether to render a `<MegaMenu />` (type = 'category'), a simple drop down of links `<MiniMenu />` (type = 'links'), or a single link `singleLink` (type = 'link'). See examples below on how to load up these objects. The `MegaMenu` can render a child both with and without subcategories. `MegaMenu` can also hold an array of `featuredLinks` with a corresponding `featuredLinksTitle`.
|
21
|
+
- `utilityNav` - object consisting of a `pageTitle` string as well as a `links` array of objects consisting of `text` and `url` strings. See example below.
|
22
|
+
- `currentLanguage` - object with `region` and `language` strings that indicate the current region and language selected.
|
23
|
+
- `languageSelectorData` - object consisting of data needed to populate the `LanguageSelector` component. See example below.
|
24
|
+
- `setLanguage` - method used to set the region and language, which it takes as string key/values in an object as an argument
|
25
|
+
- `location` - prop used to close the mobile menu when a user clicks on one of the rightLinks. In your project, pass in `location={this.props.location}`
|
26
|
+
- `searchComponent` - react component used to render the search input and results.
|
27
|
+
- `searchDeployed` - boolean that determines if the search modal is displayed on initial render.
|
28
|
+
- `setSearchDeployed` **(required)** - method used to set the search modal state.
|
29
|
+
|
30
|
+
###### Example -
|
31
|
+
|
32
|
+
```
|
33
|
+
const rightLinks = [
|
34
|
+
{
|
35
|
+
url: "/link",
|
36
|
+
text: "Contact Us",
|
37
|
+
}
|
38
|
+
];
|
39
|
+
|
40
|
+
const logo = {
|
41
|
+
url: Logo (should be imported in the application),
|
42
|
+
altText: 'Trimble Logo',
|
43
|
+
link: {
|
44
|
+
url: 'www.trimble.com'
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
const divisionName = 'Geospatial';
|
49
|
+
const location = 'N. America';
|
50
|
+
|
51
|
+
const location = this.props.location
|
52
|
+
|
53
|
+
const utilityNav = {
|
54
|
+
pageTitle: "Trimble Accubid Enterprise",
|
55
|
+
links: [
|
56
|
+
{
|
57
|
+
text: "Product Anchor One",
|
58
|
+
url: "/#"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
text: "Product Anchor Two",
|
62
|
+
url: "/#"
|
63
|
+
}
|
64
|
+
]
|
65
|
+
};
|
66
|
+
|
67
|
+
const megaMenu = {
|
68
|
+
type: "category",
|
69
|
+
text: "Products",
|
70
|
+
featuredLinksTitle: "Featured Links",
|
71
|
+
featuredLinks: [
|
72
|
+
{
|
73
|
+
url: "/#products",
|
74
|
+
text: "All Products",
|
75
|
+
},
|
76
|
+
{
|
77
|
+
url: "/1",
|
78
|
+
text: "What's New",
|
79
|
+
},
|
80
|
+
],
|
81
|
+
links: [
|
82
|
+
{
|
83
|
+
text: "Mechanical",
|
84
|
+
links: [
|
85
|
+
{
|
86
|
+
url: "/#",
|
87
|
+
text: "BIM Collaboration"
|
88
|
+
},
|
89
|
+
{
|
90
|
+
url: "/#",
|
91
|
+
text: "MEP Content"
|
92
|
+
}
|
93
|
+
]
|
94
|
+
},
|
95
|
+
{
|
96
|
+
text: "Electrical",
|
97
|
+
links: [
|
98
|
+
{
|
99
|
+
url: "/#",
|
100
|
+
text: "Design/Detailing"
|
101
|
+
},
|
102
|
+
{
|
103
|
+
url: "/#",
|
104
|
+
text: "Project Management"
|
105
|
+
}
|
106
|
+
]
|
107
|
+
},
|
108
|
+
{
|
109
|
+
text: "Plumbing",
|
110
|
+
link: {url: "/#"}
|
111
|
+
},
|
112
|
+
]
|
113
|
+
};
|
114
|
+
|
115
|
+
const miniMenus = [
|
116
|
+
{
|
117
|
+
type: "links",
|
118
|
+
text: "Services",
|
119
|
+
links: [
|
120
|
+
{
|
121
|
+
url: "/#",
|
122
|
+
text: "Link One"
|
123
|
+
},
|
124
|
+
{
|
125
|
+
url: "/#",
|
126
|
+
text: "Link Two"
|
127
|
+
}
|
128
|
+
]
|
129
|
+
},
|
130
|
+
{
|
131
|
+
type: "links",
|
132
|
+
text: "Resources",
|
133
|
+
links: [
|
134
|
+
{
|
135
|
+
url: "/#",
|
136
|
+
text: "Link One"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
url: "/#",
|
140
|
+
text: "Link Two"
|
141
|
+
}
|
142
|
+
]
|
143
|
+
}
|
144
|
+
];
|
145
|
+
|
146
|
+
const singleLink = {
|
147
|
+
type: "link",
|
148
|
+
url: "/#",
|
149
|
+
text: "Process"
|
150
|
+
};
|
151
|
+
|
152
|
+
const languageSelectorData = {
|
153
|
+
labels: {
|
154
|
+
currentRegion: "Current Region",
|
155
|
+
cancel: "Cancel",
|
156
|
+
save: "Save"
|
157
|
+
},
|
158
|
+
regions: [
|
159
|
+
{
|
160
|
+
region: "North America",
|
161
|
+
languages: [
|
162
|
+
"EN: English (US)",
|
163
|
+
"EN-UK: English (UK)",
|
164
|
+
"FR: French",
|
165
|
+
"DE: German",
|
166
|
+
"NL: Dutch"
|
167
|
+
]
|
168
|
+
},
|
169
|
+
{
|
170
|
+
region: "UK and Middle East",
|
171
|
+
languages: [
|
172
|
+
"EN: English (US)",
|
173
|
+
"EN-UK: English (UK)",
|
174
|
+
"FR: French",
|
175
|
+
"DE: German",
|
176
|
+
"NL: Dutch"
|
177
|
+
]
|
178
|
+
},
|
179
|
+
{
|
180
|
+
region: "France",
|
181
|
+
languages: [
|
182
|
+
"EN: English (US)",
|
183
|
+
"EN-UK: English (UK)",
|
184
|
+
"FR: French",
|
185
|
+
"DE: German",
|
186
|
+
"NL: Dutch"
|
187
|
+
]
|
188
|
+
},
|
189
|
+
{
|
190
|
+
region: "Germany and Austria",
|
191
|
+
languages: [
|
192
|
+
"EN: English (US)",
|
193
|
+
"EN-UK: English (UK)",
|
194
|
+
"FR: French",
|
195
|
+
"DE: German",
|
196
|
+
"NL: Dutch"
|
197
|
+
]
|
198
|
+
},
|
199
|
+
{
|
200
|
+
region: "Switzerland",
|
201
|
+
languages: [
|
202
|
+
"EN: English (US)",
|
203
|
+
"EN-UK: English (UK)",
|
204
|
+
"FR: French",
|
205
|
+
"DE: German",
|
206
|
+
"NL: Dutch"
|
207
|
+
]
|
208
|
+
}
|
209
|
+
],
|
210
|
+
currentRegionLanguage: {
|
211
|
+
region: "UK and Middle East",
|
212
|
+
language: "EN-UK"
|
213
|
+
},
|
214
|
+
|
215
|
+
activeRegion: {
|
216
|
+
region: "UK and Middle East",
|
217
|
+
language: "EN: English"
|
218
|
+
},
|
219
|
+
|
220
|
+
companyDivision: "MEP"
|
221
|
+
|
222
|
+
};
|
223
|
+
|
224
|
+
|
225
|
+
return (
|
226
|
+
<NavBar
|
227
|
+
location={location}
|
228
|
+
rightLinks={rightLinks}
|
229
|
+
currentLanguage={{ region: "N. America", language: "EN: English" }}
|
230
|
+
logo={logo}
|
231
|
+
divisionName="MEP"
|
232
|
+
navCTA={navCTA}
|
233
|
+
navOptions={[megaMenu, ...miniMenus, singleLink]}
|
234
|
+
utilityNav={utilityNav}
|
235
|
+
languageSelectorData={languageSelectorData}
|
236
|
+
isExpanded={false}
|
237
|
+
disableSectorFlyOut={false}
|
238
|
+
disableSearch={false}
|
239
|
+
disableLanguageRegion={false}
|
240
|
+
disableSectorFlyOut={true}
|
241
|
+
disableLogin={true}
|
242
|
+
/>
|
243
|
+
)
|
244
|
+
|
245
|
+
```
|