@woosmap/ui 3.64.0 → 3.67.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "3.64.0",
3
+ "version": "3.67.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -31,12 +31,30 @@
31
31
  background-color $light// rgba($logo2, .82)
32
32
  padding-bottom 2.6rem
33
33
  mbib(1.6)
34
+ .demo--localities--uk &
35
+ .demo--localities--fr &
36
+ border 0
37
+ width auto
38
+ flex-grow 1
34
39
  &__data
35
40
  max-height 45rem
36
41
  border-top .1rem solid rgba($secondary, .1)
42
+ .demo--localities--uk &
43
+ .demo--localities--fr &
44
+ max-height unset
45
+ .demo--localities--uk &
46
+ height 54rem
47
+ .demo--localities--fr &
48
+ height 38rem
37
49
  &__showcase
38
50
  min-height 50rem
39
51
  max-height 71rem
52
+ .demo--localities--uk &
53
+ .demo--localities--fr &
54
+ position relative
55
+ z-index 100
56
+ min-height unset
57
+ max-height unset
40
58
  &__map
41
59
  display flex
42
60
  align-items center
@@ -74,6 +92,9 @@
74
92
  width 100%
75
93
  &__input-container
76
94
  mbib(.6)
95
+ &--inline
96
+ .demo--localities--uk &
97
+ mbib(1.6)
77
98
  &__label
78
99
  inputFont()
79
100
  font-size $inputFontSizeDemo
@@ -215,6 +236,10 @@
215
236
  padding $demoPadding
216
237
  overflow auto
217
238
  max-height 40rem
239
+ .demo--localities--uk &
240
+ max-height 49rem
241
+ .demo--localities--fr &
242
+ max-height 33rem
218
243
  &--address
219
244
  &__formcontainer
220
245
  .input
@@ -222,6 +247,21 @@
222
247
  margin-bottom .4rem
223
248
  &__line
224
249
  margin-bottom 1rem
250
+ &--localities--uk
251
+ &--localities--fr
252
+ &__formcontainer
253
+ mbib(1.6)
254
+ position relative
255
+ .input__label
256
+ font-weight 600
257
+ .overlay
258
+ position absolute
259
+ top 0
260
+ left 0
261
+ z-index 10
262
+ width 100%
263
+ height 100%
264
+ background-color $light70
225
265
  @media screen and (max-width 769px)
226
266
  .demo__showcase
227
267
  max-height 100%
@@ -153,12 +153,12 @@ import { ReactComponent as SocialFacebook } from '../../icons/social-facebook.sv
153
153
  import { ReactComponent as SocialLinkedin } from '../../icons/social-linkedin.svg';
154
154
  import { ReactComponent as SocialTwitter } from '../../icons/social-twitter.svg';
155
155
 
156
- const Icons = {
156
+ const WebsiteIcons = {
157
157
  autocomplete: Autocomplete,
158
158
  battery: Battery,
159
159
  buildings: Buildings,
160
- cars: Cars,
161
160
  care: Care,
161
+ cars: Cars,
162
162
  elephant: Elephant,
163
163
  github: Github,
164
164
  green: Green,
@@ -177,26 +177,28 @@ const Icons = {
177
177
  speed: Speed,
178
178
  world: World,
179
179
  zoom: Zoom,
180
+ };
180
181
 
182
+ const ConsoleIcons = {
181
183
  access: Access,
182
- add: Add,
183
184
  'add-circle': AddCircle,
184
- administration: Administration,
185
- 'administration-tool': AdministrationTool,
185
+ add: Add,
186
186
  'admin-key': AdminKey,
187
187
  'admin-tool': AdminTool,
188
+ 'administration-tool': AdministrationTool,
189
+ administration: Administration,
188
190
  agenda: Agenda,
189
- 'alphabetical-order': AlphabeticalOrder,
190
191
  'alphabetical-order-reversed': AlphabeticalOrderReversed,
192
+ 'alphabetical-order': AlphabeticalOrder,
191
193
  archive: Archive,
192
194
  'arrow-bottom': ArrowBotton,
193
195
  'arrow-left': ArrowLeft,
196
+ 'arrow-link': ArrowLink,
194
197
  'arrow-right': ArrowRight,
195
198
  'arrow-top': ArrowTop,
196
- 'arrow-link': ArrowLink,
197
- asset: Asset,
198
199
  'asset-add-file': AssetAddFile,
199
200
  'asset-add': AssetAdd,
201
+ asset: Asset,
200
202
  bank: Bank,
201
203
  beaker: Beaker,
202
204
  bell: Bell,
@@ -208,14 +210,14 @@ const Icons = {
208
210
  'caret-top': CaretTop,
209
211
  charts: Charts,
210
212
  chat: Chat,
211
- check: Check,
212
- checked: Checked,
213
213
  'check-circle': CheckCircle,
214
214
  'check-square': CheckSquare,
215
- clock: Clock,
215
+ check: Check,
216
+ checked: Checked,
216
217
  'clock-reversed': ClockReversed,
217
- close: Close,
218
+ clock: Clock,
218
219
  'close-thick': CloseThick,
220
+ close: Close,
219
221
  company: Company,
220
222
  copy: Copy,
221
223
  'credit-card': CreditCard,
@@ -224,21 +226,21 @@ const Icons = {
224
226
  delete: Delete,
225
227
  details: Details,
226
228
  documentation: Documentation,
227
- dot: Dot,
228
229
  'dot-fill': DotFill,
230
+ dot: Dot,
229
231
  download: Download,
230
232
  edit: Edit,
231
233
  email: Email,
232
234
  enter: Enter,
233
- eye: Eye,
234
- 'eye-crossed-out': EyeCrossedOut,
235
235
  exchange: Exchange,
236
236
  expand: Expand,
237
237
  export: Export,
238
+ 'eye-crossed-out': EyeCrossedOut,
239
+ eye: Eye,
238
240
  flag: Flag,
239
241
  globe: Globe,
240
- home: Home,
241
242
  'home-user': HomeUser,
243
+ home: Home,
242
244
  import: Import,
243
245
  info: Info,
244
246
  label: Label,
@@ -249,14 +251,14 @@ const Icons = {
249
251
  longitude: Longitude,
250
252
  manage: Manage,
251
253
  marker: Marker,
252
- members: Members,
253
254
  member: Member,
254
- metrics: Metrics,
255
- more: More,
256
- 'menu-vertical': MenuVertical,
255
+ members: Members,
256
+ 'menu-circle-horizontal': MenuCircleHorizontal,
257
257
  'menu-circle-vertical': MenuCircleVertical,
258
258
  'menu-horizontal': MenuHorizontal,
259
- 'menu-circle-horizontal': MenuCircleHorizontal,
259
+ 'menu-vertical': MenuVertical,
260
+ metrics: Metrics,
261
+ more: More,
260
262
  organization: Organization,
261
263
  organizations: Organizations,
262
264
  phone: Phone,
@@ -273,9 +275,12 @@ const Icons = {
273
275
  'see-page': SeePage,
274
276
  settings: Settings,
275
277
  shield: Shield,
276
- star: Star,
278
+ showcases: Showcases,
279
+ 'social-facebook': SocialFacebook,
280
+ 'social-linkedin': SocialLinkedin,
281
+ 'social-twitter': SocialTwitter,
277
282
  'star-filled': StarFilled,
278
- stores: Stores,
283
+ star: Star,
279
284
  support: Support,
280
285
  switch: Switch,
281
286
  team: Team,
@@ -287,23 +292,29 @@ const Icons = {
287
292
  'view-mini-card': ViewMiniCard,
288
293
  warning: Warning,
289
294
  woosmap: Woosmap,
295
+ };
296
+
297
+ const ProductsIcons = {
290
298
  address: Address,
299
+ connectors: Connectors,
291
300
  distance: Distance,
301
+ geofencing: Geofencing,
292
302
  geolocation: Geolocation,
293
- storelocator: StoreLocator,
303
+ indoor: Indoor,
294
304
  localities: Localities,
305
+ mapping: Mapping,
295
306
  maps: Map,
296
307
  merchant: Merchant,
297
- traffic: Traffic,
298
- geofencing: Geofencing,
299
308
  multisearch: MultiSearch,
300
- mapping: Mapping,
301
- connectors: Connectors,
302
- showcases: Showcases,
303
- indoor: Indoor,
304
- 'social-facebook': SocialFacebook,
305
- 'social-linkedin': SocialLinkedin,
306
- 'social-twitter': SocialTwitter,
309
+ storelocator: StoreLocator,
310
+ stores: Stores,
311
+ traffic: Traffic,
312
+ };
313
+
314
+ const Icons = {
315
+ ...WebsiteIcons,
316
+ ...ConsoleIcons,
317
+ ...ProductsIcons,
307
318
  };
308
319
 
309
320
  class Icon extends Component {
@@ -313,7 +324,7 @@ class Icon extends Component {
313
324
  return (
314
325
  <IconComponent
315
326
  className={cl('icon', className)}
316
- data-testid={testId}
327
+ data-testid={`${testId}-${icon}`}
317
328
  width={size}
318
329
  height={size}
319
330
  title={title}
@@ -336,6 +347,10 @@ Icon.propTypes = {
336
347
  title: PropTypes.string,
337
348
  testId: PropTypes.string,
338
349
  };
350
+
339
351
  export default Object.assign(Icon, {
340
352
  Icons,
353
+ WebsiteIcons,
354
+ ConsoleIcons,
355
+ ProductsIcons,
341
356
  });
@@ -13,17 +13,22 @@ const Template = () => (
13
13
  <Icon size={64} icon="home" />
14
14
  </div>
15
15
  );
16
+
16
17
  export const Default = Template.bind({});
17
18
  Default.args = {};
18
- const { Icons } = Icon;
19
- const allIcons = Object.keys(Icons).map((icon) => (
19
+
20
+ const { Icons, WebsiteIcons, ConsoleIcons, ProductsIcons } = Icon;
21
+
22
+ const drawIcon = (icon) => (
20
23
  <div key={icon} className="icon-story">
21
24
  <div className="icon-story__container">
22
25
  <Icon size={48} icon={icon} />
23
26
  <div className="icon-story__name">{icon}</div>
24
27
  </div>
25
28
  </div>
26
- ));
27
- const TemplateCatalog = () => <div className="flex-wrap">{allIcons}</div>;
29
+ );
28
30
 
29
- export const Catalog = TemplateCatalog.bind({});
31
+ export const All = () => <div className="flex-wrap">{Object.keys(Icons).map(drawIcon)}</div>;
32
+ export const Website = () => <div className="flex-wrap">{Object.keys(WebsiteIcons).map(drawIcon)}</div>;
33
+ export const Console = () => <div className="flex-wrap">{Object.keys(ConsoleIcons).map(drawIcon)}</div>;
34
+ export const Products = () => <div className="flex-wrap">{Object.keys(ProductsIcons).map(drawIcon)}</div>;
@@ -6,16 +6,37 @@ import Icon from './Icon';
6
6
 
7
7
  it('renders an icon component', () => {
8
8
  const { getByTestId } = render(<Icon icon="home" size={64} />);
9
- expect(getByTestId('icon')).toHaveClass('icon');
10
- expect(getByTestId('icon')).toHaveAttribute('width', '64');
11
- expect(getByTestId('icon')).toHaveTextContent('home');
9
+
10
+ const result = getByTestId('icon-home');
11
+
12
+ expect(result).toHaveClass('icon');
13
+ expect(result).toHaveAttribute('width', '64');
14
+ expect(result).toHaveTextContent('home');
15
+ });
16
+
17
+ const isIconRendered = (icon) => {
18
+ const { getByTestId } = render(<Icon icon={icon} />);
19
+ const result = getByTestId(`icon-${icon}`);
20
+
21
+ expect(result).toHaveClass('icon');
22
+ };
23
+
24
+ it('renders all website icons components', () => {
25
+ const { WebsiteIcons } = Icon;
26
+ Object.keys(WebsiteIcons).forEach(isIconRendered);
12
27
  });
13
- /*
28
+
29
+ it('renders all console icons components', () => {
30
+ const { ConsoleIcons } = Icon;
31
+ Object.keys(ConsoleIcons).forEach(isIconRendered);
32
+ });
33
+
34
+ it('renders all products icons components', () => {
35
+ const { ProductsIcons } = Icon;
36
+ Object.keys(ProductsIcons).forEach(isIconRendered);
37
+ });
38
+
14
39
  it('renders all icon components', () => {
15
40
  const { Icons } = Icon;
16
- Object.keys(Icons).forEach((icon) => {
17
- const { container } = render(<Icon icon={icon} />);
18
- expect(container.firstChild).toHaveTextContent(icon);
19
- });
41
+ Object.keys(Icons).forEach(isIconRendered);
20
42
  });
21
- */
@@ -204,6 +204,9 @@
204
204
  &__author-name
205
205
  font-weight 700
206
206
  margin-bottom .6rem
207
+ text-align center
208
+ &__author-position
209
+ text-align center
207
210
  &--small
208
211
  max-width 28rem
209
212
  flex-shrink 1