@graphcommerce/next-ui 6.0.1-canary.0 → 6.0.1-canary.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.0.1-canary.1
4
+
3
5
  ## 6.0.1-canary.0
4
6
 
5
7
  ### Patch Changes
@@ -1,5 +1,4 @@
1
1
  import {
2
- alpha,
3
2
  lighten,
4
3
  Badge,
5
4
  Chip,
@@ -35,22 +34,7 @@ export function ChipOverlayOrPopper(props: ChipOverlayOrPopperProps) {
35
34
  const { onApply, onClose, onReset } = panelProps
36
35
  const [activeEl, setActiveEl] = useState<HTMLElement | null>(null)
37
36
 
38
- const chevronIcon = isMulti(selectedLabel) ? (
39
- <Badge
40
- color='primary'
41
- badgeContent={selectedLabel.length}
42
- sx={{
43
- alignItems: 'center',
44
- '.MuiBadge-badge': {
45
- position: 'relative',
46
- transform: 'none',
47
- ml: { xs: '2px', md: '6px' },
48
- typography: 'caption',
49
- fontWeight: 'bold',
50
- },
51
- }}
52
- />
53
- ) : (
37
+ let chevronIcon = (
54
38
  <IconSvg
55
39
  src={activeEl ? iconChevronUp : iconChevronDown}
56
40
  size='medium'
@@ -58,7 +42,26 @@ export function ChipOverlayOrPopper(props: ChipOverlayOrPopperProps) {
58
42
  />
59
43
  )
60
44
 
61
- selectedLabel = Array.isArray(selectedLabel) ? selectedLabel[0] : selectedLabel
45
+ if (selected) {
46
+ chevronIcon = (
47
+ <Badge
48
+ color='primary'
49
+ badgeContent={isMulti(selectedLabel) ? selectedLabel.length : 1}
50
+ sx={{
51
+ alignItems: 'center',
52
+ '.MuiBadge-badge': {
53
+ position: 'relative',
54
+ transform: 'none',
55
+ ml: { xs: '2px', md: '6px' },
56
+ typography: 'caption',
57
+ fontWeight: 'bold',
58
+ },
59
+ }}
60
+ />
61
+ )
62
+ }
63
+
64
+ selectedLabel = Array.isArray(selectedLabel) ? selectedLabel[0] : selectedLabel ?? '·'
62
65
 
63
66
  const chipSx = chipProps?.sx ?? []
64
67
  return (
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "6.0.1-canary.0",
5
+ "version": "6.0.1-canary.1",
6
6
  "author": "",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
@@ -18,18 +18,18 @@
18
18
  "@emotion/react": "^11.10.6",
19
19
  "@emotion/server": "^11.4.0",
20
20
  "@emotion/styled": "^11.10.6",
21
- "@graphcommerce/framer-next-pages": "6.0.1-canary.0",
22
- "@graphcommerce/framer-scroller": "6.0.1-canary.0",
23
- "@graphcommerce/framer-utils": "6.0.1-canary.0",
24
- "@graphcommerce/image": "6.0.1-canary.0",
21
+ "@graphcommerce/framer-next-pages": "6.0.1-canary.1",
22
+ "@graphcommerce/framer-scroller": "6.0.1-canary.1",
23
+ "@graphcommerce/framer-utils": "6.0.1-canary.1",
24
+ "@graphcommerce/image": "6.0.1-canary.1",
25
25
  "cookie": "^0.5.0",
26
26
  "react-is": "^18.2.0",
27
27
  "schema-dts": "^1.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@graphcommerce/eslint-config-pwa": "6.0.1-canary.0",
31
- "@graphcommerce/prettier-config-pwa": "6.0.1-canary.0",
32
- "@graphcommerce/typescript-config-pwa": "6.0.1-canary.0",
30
+ "@graphcommerce/eslint-config-pwa": "6.0.1-canary.1",
31
+ "@graphcommerce/prettier-config-pwa": "6.0.1-canary.1",
32
+ "@graphcommerce/typescript-config-pwa": "6.0.1-canary.1",
33
33
  "@types/cookie": "^0.5.1",
34
34
  "@types/react-is": "^17.0.3",
35
35
  "typescript": "4.9.5"