@defra/interactive-map 0.0.42-alpha → 0.0.42-fmp-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/css/index.css +1 -1
  2. package/package.json +4 -2
  3. package/plugins/beta/draw-ol/dist/css/index.css +1 -13
  4. package/plugins/beta/frame/dist/css/index.css +1 -11
  5. package/plugins/beta/map-styles/dist/css/index.css +1 -1
  6. package/plugins/beta/scale-bar/dist/css/index.css +1 -31
  7. package/plugins/datasets/dist/css/5648.index.css +1 -5
  8. package/plugins/datasets/dist/css/index.css +1 -1
  9. package/plugins/datasets/dist/esm/im-datasets-plugin.js +1 -1
  10. package/plugins/datasets/dist/umd/im-datasets-plugin.js +1 -1
  11. package/plugins/datasets/src/registry/dataset.js +12 -0
  12. package/plugins/datasets/src/registry/datasetRegistry.js +4 -2
  13. package/plugins/map-key/dist/css/index.css +1 -68
  14. package/plugins/map-key/dist/esm/im-map-key-plugin.js +1 -1
  15. package/plugins/map-key/dist/umd/im-map-key-plugin.js +1 -1
  16. package/plugins/map-key/dist/umd/index.js +1 -1
  17. package/plugins/map-key/src/components/Key/Key.jsx +1 -0
  18. package/plugins/map-key/src/components/Key/Key.module.scss +60 -13
  19. package/plugins/map-key/src/components/Key/KeyGroupItem.jsx +12 -8
  20. package/plugins/map-key/src/components/Key/KeyGroupItem.test.jsx +10 -0
  21. package/plugins/map-key/src/components/Key/KeyItem.jsx +4 -4
  22. package/plugins/map-key/src/components/Key/KeyItem.test.jsx +3 -3
  23. package/plugins/map-key/src/components/Key/KeySvg.jsx +7 -1
  24. package/plugins/map-key/src/components/Key/KeySvg.test.jsx +9 -0
  25. package/plugins/map-key/src/components/Key/KeySvgRamp.jsx +13 -0
  26. package/plugins/map-key/src/components/Key/KeySvgRamp.test.jsx +43 -0
  27. package/plugins/map-key/src/components/Key/svgProperties.js +2 -2
  28. package/plugins/map-key/src/components/Key/svgProperties.test.js +2 -2
  29. package/plugins/menu/dist/css/index.css +1 -80
  30. package/plugins/search/dist/css/index.css +1 -1
  31. package/providers/beta/esri/dist/css/index.css +1 -34
  32. package/rollup.esm.mjs +2 -1
  33. package/scripts/publish-package.sh +8 -0
  34. package/webpack.umd.mjs +6 -1
@@ -21,6 +21,10 @@ jest.mock('./KeySvgRect.jsx', () => ({
21
21
  KeySvgRect: () => <svg data-testid='key-svg-rect' />
22
22
  }))
23
23
 
24
+ jest.mock('./KeySvgRamp.jsx', () => ({
25
+ KeySvgRamp: () => <svg data-testid='key-svg-ramp' />
26
+ }))
27
+
24
28
  const baseKeyDefinition = {
25
29
  hasSymbol: false,
26
30
  hasPattern: false,
@@ -86,4 +90,9 @@ describe('KeySvg', () => {
86
90
  const { container } = render(<KeySvg {...baseProps} keyDefinition={null} />)
87
91
  expect(container.firstChild).toBeNull()
88
92
  })
93
+
94
+ it('renders KeySvgRamp when hasRampStyleKey is true', () => {
95
+ const { getByTestId } = render(<KeySvg {...baseProps} keyDefinition={{ ...baseKeyDefinition, hasRampStyleKey: true }} />)
96
+ expect(getByTestId('key-svg-ramp')).toBeTruthy()
97
+ })
89
98
  })
@@ -0,0 +1,13 @@
1
+ import { getValueForStyle } from '../../../../../src/utils/getValueForStyle.js'
2
+
3
+ export const KeySvgRamp = ({ mapStyle, keyDefinition }) => {
4
+ const { style } = keyDefinition
5
+ const fill = getValueForStyle(style.fill, mapStyle.id)
6
+ const stroke = getValueForStyle(style.fill, mapStyle.id)
7
+
8
+ return (
9
+ <svg viewBox='0 0 5 5' preserveAspectRatio='none' fill={fill} stroke={stroke} strokeWidth='1'>
10
+ <path d='M0 0h5v5H0z' />
11
+ </svg>
12
+ )
13
+ }
@@ -0,0 +1,43 @@
1
+ import { render } from '@testing-library/react'
2
+ import { KeySvgRamp } from './KeySvgRamp'
3
+ import { getValueForStyle } from '../../../../../src/utils/getValueForStyle.js'
4
+
5
+ jest.mock('../../../../../src/utils/getValueForStyle.js', () => ({
6
+ getValueForStyle: jest.fn()
7
+ }))
8
+
9
+ const mapStyle = { id: 'outdoor' }
10
+ const keyDefinition = { style: { fill: { outdoor: '#3d9', dark: '#1a5' } } }
11
+
12
+ beforeEach(() => {
13
+ getValueForStyle.mockImplementation((value) =>
14
+ typeof value === 'object' ? value.outdoor : value
15
+ )
16
+ })
17
+
18
+ describe('KeySvgRamp', () => {
19
+ it('renders an svg element', () => {
20
+ const { container } = render(<KeySvgRamp mapStyle={mapStyle} keyDefinition={keyDefinition} />)
21
+ expect(container.querySelector('svg')).toBeTruthy()
22
+ })
23
+
24
+ it('passes the resolved fill to the svg', () => {
25
+ const { container } = render(<KeySvgRamp mapStyle={mapStyle} keyDefinition={keyDefinition} />)
26
+ expect(container.querySelector('svg').getAttribute('fill')).toBe('#3d9')
27
+ })
28
+
29
+ it('passes the resolved stroke to the svg', () => {
30
+ const { container } = render(<KeySvgRamp mapStyle={mapStyle} keyDefinition={keyDefinition} />)
31
+ expect(container.querySelector('svg').getAttribute('stroke')).toBe('#3d9')
32
+ })
33
+
34
+ it('uses preserveAspectRatio none', () => {
35
+ const { container } = render(<KeySvgRamp mapStyle={mapStyle} keyDefinition={keyDefinition} />)
36
+ expect(container.querySelector('svg').getAttribute('preserveAspectRatio')).toBe('none')
37
+ })
38
+
39
+ it('renders a path child', () => {
40
+ const { container } = render(<KeySvgRamp mapStyle={mapStyle} keyDefinition={keyDefinition} />)
41
+ expect(container.querySelector('path')).toBeTruthy()
42
+ })
43
+ })
@@ -7,7 +7,7 @@ export const svgProps = {
7
7
  width: SVG_SIZE,
8
8
  height: SVG_SIZE,
9
9
  viewBox: `0 0 ${SVG_SIZE} ${SVG_SIZE}`,
10
- className: 'am-c-map-key-symbol',
10
+ className: 'im-c-map-key-symbol',
11
11
  'aria-hidden': 'true',
12
12
  focusable: 'false'
13
13
  }
@@ -16,5 +16,5 @@ export const svgSymbolProps = {
16
16
  ...svgProps,
17
17
  width: SVG_SYMBOL_SIZE,
18
18
  height: SVG_SYMBOL_SIZE,
19
- className: 'am-c-map-key-symbol am-c-map-key-symbol--point'
19
+ className: 'im-c-map-key-symbol im-c-map-key-symbol--point'
20
20
  }
@@ -25,7 +25,7 @@ describe('svgProps', () => {
25
25
  })
26
26
 
27
27
  it('has the correct className', () => {
28
- expect(svgProps.className).toBe('am-c-map-key-symbol')
28
+ expect(svgProps.className).toBe('im-c-map-key-symbol')
29
29
  })
30
30
 
31
31
  it('is aria-hidden', () => {
@@ -55,7 +55,7 @@ describe('svgSymbolProps', () => {
55
55
  })
56
56
 
57
57
  it('className includes the base class and a modifier', () => {
58
- expect(svgSymbolProps.className).toContain('am-c-map-key-symbol')
58
+ expect(svgSymbolProps.className).toContain('im-c-map-key-symbol')
59
59
  expect(svgSymbolProps.className).toContain('--point')
60
60
  })
61
61
  })
@@ -1,80 +1 @@
1
- .im-c-menu--has-groups > *:not(:first-child) {
2
- border-top: 1px solid var(--button-hover-color);
3
- }
4
-
5
- .im-c-menu > *:first-child {
6
- padding-top: 5px;
7
- }
8
-
9
- .im-c-menu > *:last-child {
10
- margin-bottom: -5px;
11
- }
12
-
13
- .im-c-menu-group:not(:last-child) {
14
- padding-bottom: 5px;
15
- }
16
-
17
- .im-c-menu__item {
18
- padding-bottom: 5px;
19
- }
20
- .im-c-menu__item:first-child {
21
- padding-top: 0;
22
- }
23
- .im-c-menu--has-groups > .im-c-menu__item:not(:first-child) {
24
- padding-top: 5px;
25
- }
26
- .im-c-menu-group .im-c-menu__item {
27
- padding-top: 0;
28
- padding-bottom: 0;
29
- }
30
- .im-c-menu-group .im-c-menu__item:not(:last-child) {
31
- margin-bottom: 0;
32
- }
33
- .im-c-menu__item .im-c-menu__item-label {
34
- width: 100%;
35
- max-width: none;
36
- align-items: start;
37
- padding-top: 12px;
38
- padding-bottom: 10px;
39
- align-self: auto;
40
- font-size: 1rem;
41
- line-height: 1.2;
42
- color: var(--foreground-color);
43
- }
44
-
45
- .im-c-menu__item .govuk-checkboxes__item,
46
- .im-c-menu__item .govuk-radios__item {
47
- flex-wrap: nowrap;
48
- }
49
- .im-c-menu__item .govuk-checkboxes__item .govuk-checkboxes__input, .im-c-menu__item .govuk-checkboxes__item .govuk-radios__input,
50
- .im-c-menu__item .govuk-radios__item .govuk-checkboxes__input,
51
- .im-c-menu__item .govuk-radios__item .govuk-radios__input {
52
- margin-left: -3px;
53
- }
54
-
55
- .im-c-menu-group__fieldset {
56
- border: none;
57
- padding: 0;
58
- margin: 0;
59
- min-width: 0;
60
- }
61
-
62
- .im-c-menu-group__legend {
63
- padding-top: 15px;
64
- padding-bottom: 10px;
65
- padding-inline: 0;
66
- font-size: 1rem;
67
- font-weight: bold;
68
- color: var(--foreground-color);
69
- }
70
- .im-c-menu-group__legend h3 {
71
- font-size: inherit;
72
- }
73
-
74
- .im-c-menu-group:first-child .im-c-menu-group__legend {
75
- padding-top: 0;
76
- }
77
-
78
- .im-c-menu .govuk-checkboxes__input[aria-disabled=true] + .govuk-checkboxes__label {
79
- opacity: 0.5;
80
- }
1
+ .im-c-menu--has-groups>:not(:first-child){border-top:1px solid var(--button-hover-color)}.im-c-menu>:first-child{padding-top:5px}.im-c-menu>:last-child{margin-bottom:-5px}.im-c-menu-group:not(:last-child),.im-c-menu__item{padding-bottom:5px}.im-c-menu__item:first-child{padding-top:0}.im-c-menu--has-groups>.im-c-menu__item:not(:first-child){padding-top:5px}.im-c-menu-group .im-c-menu__item{padding-bottom:0;padding-top:0}.im-c-menu-group .im-c-menu__item:not(:last-child){margin-bottom:0}.im-c-menu__item .im-c-menu__item-label{align-items:start;align-self:auto;color:var(--foreground-color);font-size:1rem;line-height:1.2;max-width:none;padding-bottom:10px;padding-top:12px;width:100%}.im-c-menu__item .govuk-checkboxes__item,.im-c-menu__item .govuk-radios__item{flex-wrap:nowrap}.im-c-menu__item .govuk-checkboxes__item .govuk-checkboxes__input,.im-c-menu__item .govuk-checkboxes__item .govuk-radios__input,.im-c-menu__item .govuk-radios__item .govuk-checkboxes__input,.im-c-menu__item .govuk-radios__item .govuk-radios__input{margin-left:-3px}.im-c-menu-group__fieldset{border:none;margin:0;min-width:0;padding:0}.im-c-menu-group__legend{color:var(--foreground-color);font-size:1rem;font-weight:700;padding-bottom:10px;padding-top:15px;padding-inline:0}.im-c-menu-group__legend h3{font-size:inherit}.im-c-menu-group:first-child .im-c-menu-group__legend{padding-top:0}.im-c-menu .govuk-checkboxes__input[aria-disabled=true]+.govuk-checkboxes__label{opacity:.5}
@@ -1 +1 @@
1
- .im-c-search-form{display:none;padding:0;min-height:auto;border-radius:0;filter:var(--search-drop-shadow)}.im-c-search-form:before{border-radius:0;box-shadow:none}.im-o-app--mobile .im-c-search-form{position:relative;margin:calc(-1*var(--primary-gap)) calc(-1*var(--primary-gap)) 0;overflow:visible}.im-o-app--tablet .im-c-search-form,.im-o-app--desktop .im-c-search-form{position:relative;overflow:visible;border-radius:var(--button-border-radius);box-shadow:none}.im-o-app--tablet .im-c-search-form:before,.im-o-app--desktop .im-c-search-form:before{border-radius:var(--button-border-radius)}.im-o-app--tablet .im-c-search-form .im-c-search-suggestions,.im-o-app--desktop .im-c-search-form .im-c-search-suggestions{position:absolute;top:calc(100% + 2px);left:0;right:0;z-index:1}.im-c-search__status{position:absolute;top:100%;left:0;right:0;padding:var(--divider-gap) calc(var(--divider-gap) + 2px);background-color:var(--background-color);border-top:1px solid var(--button-hover-color);border-bottom-left-radius:var(--button-border-radius);border-bottom-right-radius:var(--button-border-radius)}.im-o-app--mobile .im-c-search-form--default-expanded .im-c-search-suggestions{position:absolute;top:100%;width:100%;left:0}.im-c-search-close-button{position:relative}.im-c-search-close-button:before{box-shadow:none}.im-c-search-close-button[data-focus-visible=true]{z-index:1}.im-c-search-close-button:hover{z-index:1}.im-c-search-submit-button{position:relative}.im-c-search-submit-button:before{box-shadow:none}.im-c-search-submit-button[data-focus-visible=true]{z-index:1}.im-c-search-suggestions{max-height:calc(100vh - 66px);overflow-y:auto;scroll-padding:0;margin:0;padding:0;background-color:var(--background-color);list-style:none}.im-c-search-suggestions__item{margin:0;padding:calc(var(--divider-gap) + 2px) var(--primary-gap);position:relative;color:var(--secondary-text-color);border-top:1px solid var(--button-hover-color);cursor:pointer;user-select:none}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search-suggestions__item{color:Highlight}}.im-c-search-suggestions__item mark{font-weight:bold;color:var(--foreground-color);background-color:rgba(0,0,0,0);pointer-events:none}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search-suggestions__item mark{color:Highlight}}@media(hover: hover)and (pointer: fine){.im-c-search-suggestions__item:hover:not([aria-selected=true]){background-color:var(--button-hover-color)}}.im-c-search-suggestions__item[aria-selected=true]{background-color:var(--button-hover-color)}.im-c-search-suggestions__item[aria-selected=true] mark{color:var(--fixed-foreground-color)}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search-suggestions__item[aria-selected=true] mark{color:Highlight}}.im-c-search-suggestions__item:hover:not([aria-selected=true]) .im-c-search-suggestions__label{text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:2px;text-decoration-color:var(--foreground-color);text-decoration-skip-ink:none}.im-c-search-suggestions__item[aria-selected=true] .im-c-search-suggestions__label{outline:3px solid rgba(0,0,0,0);color:var(--focus-border-color);background-color:var(--focus-outline-color);box-shadow:0 -2px var(--focus-outline-color),0 4px var(--focus-border-color);text-decoration:none}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search-suggestions__item[aria-selected=true] .im-c-search-suggestions__label{outline-color:Highlight;color:Highlight}}.im-c-search-suggestions__label{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.im-o-app--mobile .im-c-search-form--default-expanded .im-c-search-suggestions{box-shadow:var(--panel-box-shadow);clip-path:inset(0px 0px -20px 0px)}.im-o-app--tablet .im-c-search-suggestions,.im-o-app--desktop .im-c-search-suggestions{border-bottom-left-radius:var(--button-border-radius);border-bottom-right-radius:var(--button-border-radius)}.im-o-app--tablet .im-c-search-suggestions__item,.im-o-app--desktop .im-c-search-suggestions__item{padding:var(--divider-gap) calc(var(--divider-gap) + 2px)}:root{--search-drop-shadow: drop-shadow(0 -2px 20px rgba(0,0,0,.1)) drop-shadow(0 0 12px rgba(0,0,0,.1))}.im-c-search{display:flow-root}.im-c-search--collapsed{display:none}.im-o-app__header:has(>.im-c-search--collapsed:only-child){margin-bottom:0}.im-c-search__input-container{display:flex;position:relative;flex:1 1 auto;min-height:auto;height:var(--button-size)}.im-c-search__input-container:before{content:"";z-index:1;position:absolute;top:-2px;right:-2px;bottom:-2px;left:-2px;border-radius:var(--button-border-radius);border:2px solid var(--foreground-color);pointer-events:none}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search__input-container:before{border-color:ButtonText}}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search__input-container:hover:not(:has(.im-c-search-close-button:hover)):before{border-color:Highlight}}.im-c-search__input-container:after{position:absolute;content:"";pointer-events:none;z-index:99;top:-1px;right:-1px;bottom:-1px;left:-1px;border:var(--focus-border-width) solid var(--focus-border-color);outline:var(--focus-box-shadow-width) solid var(--focus-outline-color);border-radius:calc(var(--button-border-radius) - 2px);opacity:0}@media(prefers-reduced-motion: no-preference){.im-c-search__input-container:after{transition:opacity var(--duration) ease}}.im-o-app .im-c-search__input{width:100%;color:var(--foreground-color);background-color:rgba(0,0,0,0);font-size:1rem;border:0;padding:var(--divider-gap) calc(var(--divider-gap) + 2px);outline:0}.im-o-app .im-c-search__input:focus{outline:3px solid rgba(0,0,0,0);box-shadow:none}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-o-app .im-c-search__input:focus{outline:none}}.im-o-app .im-c-search__input::placeholder{color:var(--foreground-color)}.im-o-app .im-c-search__input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}.im-o-app .im-c-search__input::-moz-search-clear{display:none}.im-c-search__hint{display:none}.im-o-app--exclusive-control .im-o-app__top .im-c-button-wrapper,.im-o-app--exclusive-control .im-o-app__right .im-c-button-wrapper{opacity:0;z-index:-1}.im-o-app--exclusive-control .im-c-button-wrapper--search{position:absolute;pointer-events:none}.im-o-app--exclusive-control .im-o-app__left-top .im-c-panel,.im-o-app--exclusive-control .im-o-app__left-bottom .im-c-panel,.im-o-app--exclusive-control .im-o-app__right-top .im-c-panel,.im-o-app--exclusive-control .im-o-app__right-bottom .im-c-panel{opacity:0;z-index:-1}.im-o-app--exclusive-control .im-o-app__banner{opacity:0;z-index:-1}.im-o-app--mobile .im-c-search__input-container{margin:var(--primary-gap)}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search__input-container--keyboard-focus-within:before{border-color:Highlight}}.im-c-search__input-container--keyboard-focus-within:after{opacity:1}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search__input-container--keyboard-focus-within:after{opacity:0}}@media(-ms-high-contrast: active),screen and (forced-colors: active){.im-c-search__input-container--keyboard-focus-within{outline:var(--focus-highlight-width) solid Highlight}}
1
+ .im-c-search-form{border-radius:0;display:none;filter:var(--search-drop-shadow);min-height:auto;padding:0}.im-c-search-form:before{border-radius:0;box-shadow:none}.im-o-app--mobile .im-c-search-form{margin:calc(var(--primary-gap)*-1) calc(var(--primary-gap)*-1) 0;overflow:visible;position:relative}.im-o-app--desktop .im-c-search-form,.im-o-app--tablet .im-c-search-form{border-radius:var(--button-border-radius);box-shadow:none;overflow:visible;position:relative}.im-o-app--desktop .im-c-search-form:before,.im-o-app--tablet .im-c-search-form:before{border-radius:var(--button-border-radius)}.im-o-app--desktop .im-c-search-form .im-c-search-suggestions,.im-o-app--tablet .im-c-search-form .im-c-search-suggestions{left:0;position:absolute;right:0;top:calc(100% + 2px);z-index:1}.im-c-search__status{background-color:var(--background-color);border-bottom-left-radius:var(--button-border-radius);border-bottom-right-radius:var(--button-border-radius);border-top:1px solid var(--button-hover-color);left:0;padding:var(--divider-gap) calc(var(--divider-gap) + 2px);position:absolute;right:0;top:100%}.im-o-app--mobile .im-c-search-form--default-expanded .im-c-search-suggestions{left:0;position:absolute;top:100%;width:100%}.im-c-search-close-button{position:relative}.im-c-search-close-button:before{box-shadow:none}.im-c-search-close-button:hover,.im-c-search-close-button[data-focus-visible=true]{z-index:1}.im-c-search-submit-button{position:relative}.im-c-search-submit-button:before{box-shadow:none}.im-c-search-submit-button[data-focus-visible=true]{z-index:1}.im-c-search-suggestions{background-color:var(--background-color);list-style:none;margin:0;max-height:calc(100vh - 66px);overflow-y:auto;padding:0;scroll-padding:0}.im-c-search-suggestions__item{border-top:1px solid var(--button-hover-color);color:var(--secondary-text-color);cursor:pointer;margin:0;padding:calc(var(--divider-gap) + 2px) var(--primary-gap);position:relative;user-select:none}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search-suggestions__item{color:Highlight}}.im-c-search-suggestions__item mark{background-color:transparent;color:var(--foreground-color);font-weight:700;pointer-events:none}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search-suggestions__item mark{color:Highlight}}@media (hover:hover) and (pointer:fine){.im-c-search-suggestions__item:hover:not([aria-selected=true]){background-color:var(--button-hover-color)}}.im-c-search-suggestions__item[aria-selected=true]{background-color:var(--button-hover-color)}.im-c-search-suggestions__item[aria-selected=true] mark{color:var(--fixed-foreground-color)}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search-suggestions__item[aria-selected=true] mark{color:Highlight}}.im-c-search-suggestions__item:hover:not([aria-selected=true]) .im-c-search-suggestions__label{text-decoration:underline;text-decoration-color:var(--foreground-color);text-decoration-skip-ink:none;text-decoration-thickness:2px;text-underline-offset:2px}.im-c-search-suggestions__item[aria-selected=true] .im-c-search-suggestions__label{background-color:var(--focus-outline-color);box-shadow:0 -2px var(--focus-outline-color),0 4px var(--focus-border-color);color:var(--focus-border-color);outline:3px solid transparent;text-decoration:none}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search-suggestions__item[aria-selected=true] .im-c-search-suggestions__label{color:Highlight;outline-color:Highlight}}.im-c-search-suggestions__label{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.im-o-app--mobile .im-c-search-form--default-expanded .im-c-search-suggestions{box-shadow:var(--panel-box-shadow);clip-path:inset(0 0 -20px 0)}.im-o-app--desktop .im-c-search-suggestions,.im-o-app--tablet .im-c-search-suggestions{border-bottom-left-radius:var(--button-border-radius);border-bottom-right-radius:var(--button-border-radius)}.im-o-app--desktop .im-c-search-suggestions__item,.im-o-app--tablet .im-c-search-suggestions__item{padding:var(--divider-gap) calc(var(--divider-gap) + 2px)}:root{--search-drop-shadow:drop-shadow(0 -2px 20px rgba(0,0,0,.1)) drop-shadow(0 0 12px rgba(0,0,0,.1))}.im-c-search{display:flow-root}.im-c-search--collapsed{display:none}.im-o-app__header:has(>.im-c-search--collapsed:only-child){margin-bottom:0}.im-c-search__input-container{display:flex;flex:1 1 auto;height:var(--button-size);min-height:auto;position:relative}.im-c-search__input-container:before{border:2px solid var(--foreground-color);border-radius:var(--button-border-radius);bottom:-2px;content:"";left:-2px;pointer-events:none;position:absolute;right:-2px;top:-2px;z-index:1}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search__input-container:before{border-color:ButtonText}}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search__input-container:hover:not(:has(.im-c-search-close-button:hover)):before{border-color:Highlight}}.im-c-search__input-container:after{border:var(--focus-border-width) solid var(--focus-border-color);border-radius:calc(var(--button-border-radius) - 2px);bottom:-1px;content:"";left:-1px;opacity:0;outline:var(--focus-box-shadow-width) solid var(--focus-outline-color);pointer-events:none;position:absolute;right:-1px;top:-1px;z-index:99}@media (prefers-reduced-motion:no-preference){.im-c-search__input-container:after{transition:opacity var(--duration) ease}}.im-o-app .im-c-search__input{background-color:transparent;border:0;color:var(--foreground-color);font-size:1rem;outline:0;padding:var(--divider-gap) calc(var(--divider-gap) + 2px);width:100%}.im-o-app .im-c-search__input:focus{box-shadow:none;outline:3px solid transparent}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-o-app .im-c-search__input:focus{outline:none}}.im-o-app .im-c-search__input::placeholder{color:var(--foreground-color)}.im-o-app .im-c-search__input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;display:none}.im-o-app .im-c-search__input::-moz-search-clear{display:none}.im-c-search__hint{display:none}.im-o-app--exclusive-control .im-o-app__right .im-c-button-wrapper,.im-o-app--exclusive-control .im-o-app__top .im-c-button-wrapper{opacity:0;z-index:-1}.im-o-app--exclusive-control .im-c-button-wrapper--search{pointer-events:none;position:absolute}.im-o-app--exclusive-control .im-o-app__left-bottom .im-c-panel,.im-o-app--exclusive-control .im-o-app__left-top .im-c-panel,.im-o-app--exclusive-control .im-o-app__right-bottom .im-c-panel,.im-o-app--exclusive-control .im-o-app__right-top .im-c-panel{opacity:0;z-index:-1}.im-o-app--exclusive-control .im-o-app__banner{opacity:0;z-index:-1}.im-o-app--mobile .im-c-search__input-container{margin:var(--primary-gap)}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search__input-container--keyboard-focus-within:before{border-color:Highlight}}.im-c-search__input-container--keyboard-focus-within:after{opacity:1}@media (-ms-high-contrast:active),screen and (forced-colors:active){.im-c-search__input-container--keyboard-focus-within:after{opacity:0}.im-c-search__input-container--keyboard-focus-within{outline:var(--focus-highlight-width) solid Highlight}}
@@ -1,34 +1 @@
1
- :root {
2
- font-family: inherit !important;
3
- text-rendering: auto !important;
4
- -webkit-font-smoothing: auto !important;
5
- -moz-osx-font-smoothing: auto !important;
6
- }
7
-
8
- :root:not(.esri-ui):not([class*=calcite]):not([class*=esri]) {
9
- --calcite-font-family: inherit !important;
10
- --calcite-sans-family: inherit !important;
11
- }
12
-
13
- body, html {
14
- font-family: inherit !important;
15
- text-rendering: auto !important;
16
- -webkit-font-smoothing: auto !important;
17
- -moz-osx-font-smoothing: auto !important;
18
- }
19
-
20
- .your-map-container {
21
- font-family: var(--calcite-font-family);
22
- }
23
-
24
- :not(.esri-view):not(.esri-ui):not([class*=calcite]):not([class*=esri]).calcite-typography, :not(.esri-view):not(.esri-ui):not([class*=calcite]):not([class*=esri]) .calcite-typography {
25
- font-family: inherit !important;
26
- font-size: inherit !important;
27
- font-weight: inherit !important;
28
- letter-spacing: inherit !important;
29
- line-height: inherit !important;
30
- }
31
-
32
- .esri-view-attribution {
33
- display: none;
34
- }
1
+ :root{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;font-family:inherit!important;text-rendering:auto!important}:root:not(.esri-ui):not([class*=calcite]):not([class*=esri]){--calcite-font-family:inherit!important;--calcite-sans-family:inherit!important}body,html{-webkit-font-smoothing:auto!important;-moz-osx-font-smoothing:auto!important;font-family:inherit!important;text-rendering:auto!important}.your-map-container{font-family:var(--calcite-font-family)}:not(.esri-view):not(.esri-ui):not([class*=calcite]):not([class*=esri]) .calcite-typography,:not(.esri-view):not(.esri-ui):not([class*=calcite]):not([class*=esri]).calcite-typography{font-family:inherit!important;font-size:inherit!important;font-weight:inherit!important;letter-spacing:inherit!important;line-height:inherit!important}.esri-view-attribution{display:none}
package/rollup.esm.mjs CHANGED
@@ -166,7 +166,8 @@ const createESMConfig = (entryPath, outDir, isCore = false, manualChunks = null,
166
166
  // (rootDir) → "css/index.css" — no ".." in the emitted fileName.
167
167
  postcss({
168
168
  extract: path.resolve(cssDir, 'index.css'),
169
- use: ['sass']
169
+ use: ['sass'],
170
+ minimize: true
170
171
  }),
171
172
 
172
173
  terser(),
@@ -53,6 +53,14 @@ validate_version_bump() {
53
53
  }
54
54
 
55
55
  determine_release_tag() {
56
+ if [[ "$TAG_NAME" =~ -([a-zA-Z0-9-]+)\. ]]; then
57
+ local label="${BASH_REMATCH[1]}"
58
+ if [[ "$label" != "alpha" && "$label" != "beta" ]]; then
59
+ echo "$label"
60
+ return
61
+ fi
62
+ fi
63
+
56
64
  if [[ "$IS_PRE_RELEASE" == "true" ]] || [[ "$TAG_NAME" =~ $PRE_RELEASE_PATTERN ]]; then
57
65
  echo "pre-release"
58
66
  else
package/webpack.umd.mjs CHANGED
@@ -3,6 +3,7 @@ import { fileURLToPath } from 'url'
3
3
  import fs from 'fs'
4
4
 
5
5
  import MiniCssExtractPlugin from 'mini-css-extract-plugin'
6
+ import CssMinimizerPlugin from 'css-minimizer-webpack-plugin'
6
7
  import RemoveEmptyScriptsPlugin from 'webpack-remove-empty-scripts'
7
8
  import RemoveFilesPlugin from 'remove-files-webpack-plugin'
8
9
 
@@ -124,7 +125,11 @@ const createUMDConfig = (entryName, entryPath, libraryPath, outDir, isCore = fal
124
125
 
125
126
  optimization: {
126
127
  splitChunks: { chunks: () => false },
127
- removeEmptyChunks: true
128
+ removeEmptyChunks: true,
129
+ // '...' keeps webpack's default JS minimizer (Terser); CssMinimizerPlugin
130
+ // is added alongside it since setting `minimizer` explicitly replaces the
131
+ // defaults otherwise.
132
+ minimizer: ['...', new CssMinimizerPlugin()]
128
133
  }
129
134
  }
130
135
  }