@sanity/ui 2.6.7 → 2.6.8-canary.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.
Files changed (34) hide show
  1. package/dist/index.d.mts +9 -9
  2. package/dist/index.d.ts +9 -9
  3. package/dist/index.esm.js +36 -31
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +35 -31
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +36 -31
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/theme.d.mts +14 -14
  10. package/dist/theme.d.ts +14 -14
  11. package/dist/theme.esm.js.map +1 -1
  12. package/dist/theme.js.map +1 -1
  13. package/dist/theme.mjs.map +1 -1
  14. package/package.json +46 -53
  15. package/src/core/__workshop__/constants.ts +36 -36
  16. package/src/core/components/autocomplete/autocomplete.tsx +1 -1
  17. package/src/core/components/dialog/styles.ts +8 -8
  18. package/src/core/components/menu/menuButton.tsx +10 -10
  19. package/src/core/components/tab/tab.tsx +8 -8
  20. package/src/core/components/tab/tabPanel.tsx +1 -1
  21. package/src/core/primitives/avatar/styles.ts +42 -42
  22. package/src/core/primitives/badge/styles.ts +2 -2
  23. package/src/core/primitives/button/styles.ts +4 -4
  24. package/src/core/primitives/inline/styles.ts +2 -2
  25. package/src/core/primitives/popover/constants.ts +4 -4
  26. package/src/core/primitives/stack/styles.ts +2 -2
  27. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +1 -1
  28. package/src/core/primitives/tooltip/constants.ts +4 -4
  29. package/src/core/primitives/tooltip/tooltip.tsx +68 -49
  30. package/src/core/styles/font/responsiveFont.ts +8 -8
  31. package/src/core/theme/__workshop__/debug/story.tsx +11 -11
  32. package/src/theme/build/buildColorTheme.test.ts +13 -13
  33. package/src/theme/config/tokens/color/types.ts +14 -14
  34. package/src/theme/defaults/colorTokens.ts +36 -36
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/ui",
3
- "version": "2.6.7",
3
+ "version": "2.6.8-canary.0",
4
4
  "keywords": [
5
5
  "sanity",
6
6
  "ui",
@@ -51,32 +51,6 @@
51
51
  "src",
52
52
  "theme.js"
53
53
  ],
54
- "scripts": {
55
- "build": "run-s clean pkg:build pkg:check figma:pkg:build",
56
- "clean": "rimraf .workshop dist",
57
- "commit": "cz",
58
- "cypress:dev": "run-p dev cypress:open",
59
- "cypress:open": "cypress open",
60
- "cypress:run": "cypress run",
61
- "dev": "run-p storybook:dev workshop:dev",
62
- "figma:pkg:build": "cd figma && pnpm build",
63
- "format": "prettier --write --cache --ignore-unknown .",
64
- "lint": "eslint . --ext .cjs,.js,.jsx,.mjs,.ts,.tsx",
65
- "pkg:build": "pkg build --strict",
66
- "pkg:check": "pkg --strict",
67
- "prepare": "husky install",
68
- "prepublishOnly": "pnpm build",
69
- "release": "semantic-release",
70
- "storybook:build": "storybook build",
71
- "storybook:dev": "storybook dev -p 6006",
72
- "test": "jest",
73
- "test:browser": "start-server-and-test 'run-s workshop:build workshop:start' http://localhost:1337 'run-s cypress:run'",
74
- "ts:check": "tsc",
75
- "watch": "pkg watch --strict",
76
- "workshop:build": "workshop build",
77
- "workshop:dev": "workshop dev",
78
- "workshop:start": "http-server -a localhost -c-0 -p 1337 -s -P http://localhost:1337/index.html? dist"
79
- },
80
54
  "commitlint": {
81
55
  "extends": [
82
56
  "@commitlint/config-conventional"
@@ -87,6 +61,7 @@
87
61
  "prettier --write --cache --ignore-unknown"
88
62
  ]
89
63
  },
64
+ "prettier": "@sanity/prettier-config",
90
65
  "release": {
91
66
  "branches": [
92
67
  "+([0-9])?(.{+([0-9]),x}).x",
@@ -109,7 +84,8 @@
109
84
  "@sanity/icons": "^3.3.0",
110
85
  "csstype": "^3.1.3",
111
86
  "framer-motion": "11.0.8",
112
- "react-refractor": "^2.2.0"
87
+ "react-refractor": "^2.2.0",
88
+ "use-effect-event": "^1.0.2"
113
89
  },
114
90
  "devDependencies": {
115
91
  "@babel/core": "^7.24.7",
@@ -120,24 +96,25 @@
120
96
  "@commitlint/config-conventional": "^19.2.2",
121
97
  "@juggle/resize-observer": "^3.4.0",
122
98
  "@sanity/pkg-utils": "^6.10.3",
123
- "@sanity/semantic-release-preset": "^4.1.8",
99
+ "@sanity/prettier-config": "^1.0.2",
100
+ "@sanity/semantic-release-preset": "^5.0.0",
124
101
  "@sanity/ui-workshop": "^2.0.15",
125
- "@storybook/addon-a11y": "^8.0.8",
126
- "@storybook/addon-docs": "^8.0.8",
127
- "@storybook/addon-essentials": "^8.0.8",
128
- "@storybook/addon-interactions": "^8.0.8",
129
- "@storybook/addon-links": "^8.0.8",
130
- "@storybook/addon-storysource": "^8.0.8",
131
- "@storybook/addon-themes": "^8.0.8",
132
- "@storybook/blocks": "^8.0.8",
133
- "@storybook/jest": "^0.2.3",
134
- "@storybook/manager-api": "^8.0.8",
135
- "@storybook/react": "^8.0.8",
136
- "@storybook/react-vite": "^8.0.8",
137
- "@storybook/testing-library": "^0.2.2",
138
- "@storybook/theming": "^8.0.8",
102
+ "@storybook/addon-a11y": "^8.2.1",
103
+ "@storybook/addon-docs": "^8.2.1",
104
+ "@storybook/addon-essentials": "^8.2.1",
105
+ "@storybook/addon-interactions": "^8.2.1",
106
+ "@storybook/addon-links": "^8.2.1",
107
+ "@storybook/addon-mdx-gfm": "^8.2.1",
108
+ "@storybook/addon-storysource": "^8.2.1",
109
+ "@storybook/addon-themes": "^8.2.1",
110
+ "@storybook/blocks": "^8.2.1",
111
+ "@storybook/manager-api": "^8.2.1",
112
+ "@storybook/react": "^8.2.1",
113
+ "@storybook/react-vite": "^8.2.1",
114
+ "@storybook/test": "^8.2.1",
115
+ "@storybook/theming": "^8.2.1",
139
116
  "@testing-library/dom": "^10.3.1",
140
- "@testing-library/jest-dom": "^5.17.0",
117
+ "@testing-library/jest-dom": "^6.4.6",
141
118
  "@testing-library/react": "^16.0.0",
142
119
  "@types/jest": "^29.5.12",
143
120
  "@types/jest-axe": "^3.5.9",
@@ -146,7 +123,6 @@
146
123
  "@types/react-dom": "^18.3.0",
147
124
  "@types/react-is": "^18.3.0",
148
125
  "@types/refractor": "^3.4.1",
149
- "@types/testing-library__jest-dom": "^5.14.9",
150
126
  "@typescript-eslint/eslint-plugin": "^7.16.0",
151
127
  "@typescript-eslint/parser": "^7.16.0",
152
128
  "commitizen": "^4.3.0",
@@ -172,7 +148,6 @@
172
148
  "module-alias": "^2.2.3",
173
149
  "npm-run-all2": "^5.0.2",
174
150
  "prettier": "^3.3.2",
175
- "prettier-plugin-packagejson": "^2.5.0",
176
151
  "react": "^18.3.1",
177
152
  "react-dom": "^18.3.1",
178
153
  "react-is": "^18.3.1",
@@ -180,7 +155,7 @@
180
155
  "rimraf": "^5.0.5",
181
156
  "semantic-release": "^24.0.0",
182
157
  "start-server-and-test": "^2.0.4",
183
- "storybook": "^8.0.8",
158
+ "storybook": "^8.2.1",
184
159
  "styled-components": "^6.1.11",
185
160
  "tsconfig-paths": "^4.2.0",
186
161
  "typescript": "5.5.3",
@@ -193,7 +168,6 @@
193
168
  "react-is": "^18",
194
169
  "styled-components": "^5.2 || ^6"
195
170
  },
196
- "packageManager": "pnpm@9.5.0",
197
171
  "engines": {
198
172
  "node": ">=14.0.0"
199
173
  },
@@ -203,9 +177,28 @@
203
177
  "esm.sh": {
204
178
  "bundle": false
205
179
  },
206
- "pnpm": {
207
- "overrides": {
208
- "conventional-changelog-conventionalcommits": ">= 8.0.0"
209
- }
180
+ "scripts": {
181
+ "build": "run-s clean pkg:build pkg:check figma:pkg:build",
182
+ "clean": "rimraf .workshop dist",
183
+ "commit": "cz",
184
+ "cypress:dev": "run-p dev cypress:open",
185
+ "cypress:open": "cypress open",
186
+ "cypress:run": "cypress run",
187
+ "dev": "run-p storybook:dev workshop:dev",
188
+ "figma:pkg:build": "cd figma && pnpm build",
189
+ "format": "prettier --write --cache --ignore-unknown .",
190
+ "lint": "eslint . --ext .cjs,.js,.jsx,.mjs,.ts,.tsx",
191
+ "pkg:build": "pkg build --strict",
192
+ "pkg:check": "pkg --strict",
193
+ "release": "semantic-release",
194
+ "storybook:build": "storybook build",
195
+ "storybook:dev": "storybook dev -p 6006",
196
+ "test": "jest",
197
+ "test:browser": "start-server-and-test 'run-s workshop:build workshop:start' http://localhost:1337 'run-s cypress:run'",
198
+ "ts:check": "tsc",
199
+ "watch": "pkg watch --strict",
200
+ "workshop:build": "workshop build",
201
+ "workshop:dev": "workshop dev",
202
+ "workshop:start": "http-server -a localhost -c-0 -p 1337 -s -P http://localhost:1337/index.html? dist"
210
203
  }
211
- }
204
+ }
@@ -44,9 +44,9 @@ export const WORKSHOP_BUTTON_MODE_OPTIONS: {[key: string]: ButtonMode} = {
44
44
 
45
45
  export const WORKSHOP_BUTTON_TEXT_ALIGN_OPTIONS: {[key: string]: ButtonTextAlign | ''} = {
46
46
  '(none)': '',
47
- Left: 'left',
48
- Right: 'right',
49
- Center: 'center',
47
+ 'Left': 'left',
48
+ 'Right': 'right',
49
+ 'Center': 'center',
50
50
  }
51
51
 
52
52
  export const WORKSHOP_BUTTON_TONE_OPTIONS: {[key: string]: ButtonTone} = {
@@ -61,11 +61,11 @@ export const WORKSHOP_CARD_AS_OPTIONS: {
61
61
  [key: string]: 'div' | 'button' | 'span' | 'ol' | 'pre' | 'ul'
62
62
  } = {
63
63
  'DIV (default)': 'div',
64
- BUTTON: 'button',
65
- SPAN: 'span',
66
- OL: 'ol',
67
- PRE: 'pre',
68
- UL: 'ul',
64
+ 'BUTTON': 'button',
65
+ 'SPAN': 'span',
66
+ 'OL': 'ol',
67
+ 'PRE': 'pre',
68
+ 'UL': 'ul',
69
69
  }
70
70
 
71
71
  export const WORKSHOP_CARD_TONE_OPTIONS: {[key: string]: CardTone} = {
@@ -92,7 +92,7 @@ export const WORKSHOP_CONTAINER_WIDTH_OPTIONS: {[key: string]: number | 'auto'}
92
92
  '3': 3,
93
93
  '4': 4,
94
94
  '5': 5,
95
- auto: 'auto',
95
+ 'auto': 'auto',
96
96
  }
97
97
 
98
98
  export const WORKSHOP_DIALOG_POSITION_OPTIONS: {[key: string]: DialogPosition} = {
@@ -106,15 +106,15 @@ export const WORKSHOP_FLEX_DIRECTION_OPTIONS: {[key: string]: 'row' | 'column'}
106
106
  }
107
107
 
108
108
  export const WORKSHOP_FLEX_ALIGN_OPTIONS: Record<FlexAlign, FlexAlign> = {
109
- baseline: 'baseline',
110
- center: 'center',
109
+ 'baseline': 'baseline',
110
+ 'center': 'center',
111
111
  'flex-end': 'flex-end',
112
112
  'flex-start': 'flex-start',
113
- stretch: 'stretch',
113
+ 'stretch': 'stretch',
114
114
  }
115
115
 
116
116
  export const WORKSHOP_FLEX_JUSTIFY_OPTIONS: Record<FlexJustify, FlexJustify> = {
117
- center: 'center',
117
+ 'center': 'center',
118
118
  'flex-end': 'flex-end',
119
119
  'flex-start': 'flex-start',
120
120
  'space-around': 'space-around',
@@ -157,16 +157,16 @@ export const WORKSHOP_LABEL_FONT_SIZE_OPTIONS = {
157
157
  }
158
158
 
159
159
  export const WORKSHOP_PLACEMENT_OPTIONS: Record<Placement, Placement> = {
160
- top: 'top',
160
+ 'top': 'top',
161
161
  'top-start': 'top-start',
162
162
  'top-end': 'top-end',
163
- right: 'right',
163
+ 'right': 'right',
164
164
  'right-start': 'right-start',
165
165
  'right-end': 'right-end',
166
- left: 'left',
166
+ 'left': 'left',
167
167
  'left-start': 'left-start',
168
168
  'left-end': 'left-end',
169
- bottom: 'bottom',
169
+ 'bottom': 'bottom',
170
170
  'bottom-start': 'bottom-start',
171
171
  'bottom-end': 'bottom-end',
172
172
  }
@@ -217,11 +217,11 @@ export const WORKSHOP_SPOT_COLOR_OPTIONS: {[key: string]: ThemeColorSpotKey} = {
217
217
 
218
218
  export const WORKSHOP_TEXT_ALIGN_OPTIONS: {[key: string]: TextAlign | ''} = {
219
219
  '(none)': '',
220
- Initial: 'initial',
221
- Left: 'left',
222
- Right: 'right',
223
- Center: 'center',
224
- Justify: 'justify',
220
+ 'Initial': 'initial',
221
+ 'Left': 'left',
222
+ 'Right': 'right',
223
+ 'Center': 'center',
224
+ 'Justify': 'justify',
225
225
  }
226
226
 
227
227
  export const WORKSHOP_TEXT_FONT_SIZE_OPTIONS = {
@@ -233,17 +233,17 @@ export const WORKSHOP_TEXT_FONT_SIZE_OPTIONS = {
233
233
  }
234
234
 
235
235
  export const WORKSHOP_TEXT_INPUT_TYPE_OPTIONS: {[key: string]: TextInputType} = {
236
- date: 'date',
236
+ 'date': 'date',
237
237
  'datetime-local': 'datetime-local',
238
- email: 'email',
239
- month: 'month',
240
- number: 'number',
241
- password: 'password',
242
- tel: 'tel',
243
- time: 'time',
244
- text: 'text',
245
- week: 'week',
246
- color: 'color',
238
+ 'email': 'email',
239
+ 'month': 'month',
240
+ 'number': 'number',
241
+ 'password': 'password',
242
+ 'tel': 'tel',
243
+ 'time': 'time',
244
+ 'text': 'text',
245
+ 'week': 'week',
246
+ 'color': 'color',
247
247
  }
248
248
 
249
249
  export const WORKSHOP_TEXT_OVERFLOW_OPTIONS: {[key: string]: 'ellipsis' | ''} = {
@@ -261,9 +261,9 @@ export const WORKSHOP_TEXT_SIZE_OPTIONS = {
261
261
 
262
262
  export const WORKSHOP_TEXT_WEIGHT_OPTIONS: {[key: string]: ThemeFontWeightKey | ''} = {
263
263
  'Regular (default)': '',
264
- Medium: 'medium',
265
- Semibold: 'semibold',
266
- Bold: 'bold',
264
+ 'Medium': 'medium',
265
+ 'Semibold': 'semibold',
266
+ 'Bold': 'bold',
267
267
  }
268
268
 
269
269
  export const WORKSHOP_THEME_COLOR_TONE_OPTIONS: {[key: string]: ThemeColorToneKey} = {
@@ -286,7 +286,7 @@ export const WORKSHOP_TOAST_STATUS_OPTIONS: {
286
286
  }
287
287
 
288
288
  export const WORKSHOP_WIDTH_OPTIONS: {[key: string]: number | 'auto'} = {
289
- Auto: 'auto',
289
+ 'Auto': 'auto',
290
290
  '0': 0,
291
291
  '1': 1,
292
292
  '2': 2,
@@ -452,7 +452,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete<
452
452
  if (!loading && !disabled && value) {
453
453
  return {
454
454
  'aria-label': 'Clear',
455
- onFocus: handleClearButtonFocus,
455
+ 'onFocus': handleClearButtonFocus,
456
456
  }
457
457
  }
458
458
 
@@ -18,14 +18,14 @@ export function dialogStyle({theme}: ThemeProps): CSSObject {
18
18
  display: 'flex',
19
19
  },
20
20
 
21
- top: 0,
22
- left: 0,
23
- right: 0,
24
- bottom: 0,
25
- alignItems: 'center',
26
- justifyContent: 'center',
27
- outline: 'none',
28
- background: color.backdrop,
21
+ 'top': 0,
22
+ 'left': 0,
23
+ 'right': 0,
24
+ 'bottom': 0,
25
+ 'alignItems': 'center',
26
+ 'justifyContent': 'center',
27
+ 'outline': 'none',
28
+ 'background': color.backdrop,
29
29
  }
30
30
  }
31
31
 
@@ -206,11 +206,11 @@ export const MenuButton = forwardRef(function MenuButton(
206
206
  const menuProps: MenuProps = useMemo(
207
207
  () => ({
208
208
  'aria-labelledby': id,
209
- onBlurCapture: handleBlur,
210
- onClickOutside: handleMenuClickOutside,
211
- onEscape: handleMenuEscape,
212
- onItemClick: handleItemClick,
213
- originElement: buttonElement,
209
+ 'onBlurCapture': handleBlur,
210
+ 'onClickOutside': handleMenuClickOutside,
211
+ 'onEscape': handleMenuEscape,
212
+ 'onItemClick': handleItemClick,
213
+ 'originElement': buttonElement,
214
214
  registerElement,
215
215
  shouldFocus,
216
216
  }),
@@ -235,13 +235,13 @@ export const MenuButton = forwardRef(function MenuButton(
235
235
  cloneElement(buttonProp, {
236
236
  'data-ui': 'MenuButton',
237
237
  id,
238
- onClick: handleButtonClick,
239
- onKeyDown: handleButtonKeyDown,
240
- onMouseDown: handleMouseDown,
238
+ 'onClick': handleButtonClick,
239
+ 'onKeyDown': handleButtonKeyDown,
240
+ 'onMouseDown': handleMouseDown,
241
241
  'aria-haspopup': true,
242
242
  'aria-expanded': open,
243
- ref: ref,
244
- selected: buttonProp.props.selected ?? open,
243
+ 'ref': ref,
244
+ 'selected': buttonProp.props.selected ?? open,
245
245
  }),
246
246
  [buttonProp, handleButtonClick, handleButtonKeyDown, handleMouseDown, id, open],
247
247
  )
@@ -11,14 +11,14 @@ export interface TabProps {
11
11
  * The `id` of the correlating `TabPanel` component.
12
12
  */
13
13
  'aria-controls': string
14
- id: string
15
- icon?: React.ElementType | React.ReactNode
16
- focused?: boolean
17
- fontSize?: number | number[]
18
- label?: React.ReactNode
19
- padding?: number | number[]
20
- selected?: boolean
21
- tone?: ButtonTone
14
+ 'id': string
15
+ 'icon'?: React.ElementType | React.ReactNode
16
+ 'focused'?: boolean
17
+ 'fontSize'?: number | number[]
18
+ 'label'?: React.ReactNode
19
+ 'padding'?: number | number[]
20
+ 'selected'?: boolean
21
+ 'tone'?: ButtonTone
22
22
  }
23
23
 
24
24
  const CustomButton = styled(Button)`
@@ -9,7 +9,7 @@ export interface TabPanelProps extends BoxProps {
9
9
  * The `id` of the correlating `Tab` component.
10
10
  */
11
11
  'aria-labelledby': string
12
- id: string
12
+ 'id': string
13
13
  }
14
14
 
15
15
  /**
@@ -14,24 +14,24 @@ export const avatarStyle = {
14
14
 
15
15
  function avatarArrowStyle(): CSSObject {
16
16
  return {
17
- position: 'absolute',
18
- boxSizing: 'border-box',
19
- zIndex: 0,
20
- opacity: 0,
21
- transition: 'all 0.2s linear',
22
- transform: 'rotate(-90deg) translate3d(0, 6px, 0)',
23
- left: 0,
24
- right: 0,
25
- top: 0,
26
- bottom: 0,
17
+ 'position': 'absolute',
18
+ 'boxSizing': 'border-box',
19
+ 'zIndex': 0,
20
+ 'opacity': 0,
21
+ 'transition': 'all 0.2s linear',
22
+ 'transform': 'rotate(-90deg) translate3d(0, 6px, 0)',
23
+ 'left': 0,
24
+ 'right': 0,
25
+ 'top': 0,
26
+ 'bottom': 0,
27
27
 
28
28
  '& > svg': {
29
- width: '11px',
30
- height: '7px',
31
- position: 'absolute',
32
- top: '-5px',
33
- left: '50%',
34
- transform: 'translateX(-6px)',
29
+ 'width': '11px',
30
+ 'height': '7px',
31
+ 'position': 'absolute',
32
+ 'top': '-5px',
33
+ 'left': '50%',
34
+ 'transform': 'translateX(-6px)',
35
35
 
36
36
  '&:not([hidden])': {
37
37
  display: 'block',
@@ -63,11 +63,11 @@ export function avatarRootStyle(props: AvatarRootStyleProps & ThemeProps): CSSOb
63
63
  '--avatar-bg-color': `var(--card-avatar-${$color}-bg-color)`,
64
64
  '--avatar-fg-color': `var(--card-avatar-${$color}-fg-color)`,
65
65
 
66
- backgroundColor: 'var(--avatar-bg-color)',
67
- position: 'relative',
68
- boxSizing: 'border-box',
69
- userSelect: 'none',
70
- boxShadow: '0 0 0 1px var(--card-bg-color)',
66
+ 'backgroundColor': 'var(--avatar-bg-color)',
67
+ 'position': 'relative',
68
+ 'boxSizing': 'border-box',
69
+ 'userSelect': 'none',
70
+ 'boxShadow': '0 0 0 1px var(--card-bg-color)',
71
71
 
72
72
  '&[data-status="inactive"]': {
73
73
  opacity: 0.5,
@@ -81,14 +81,14 @@ export function avatarRootStyle(props: AvatarRootStyleProps & ThemeProps): CSSOb
81
81
 
82
82
  /* &:is(button) */
83
83
  '&[data-as="button"]': {
84
- WebkitFontSmoothing: 'inherit',
85
- appearance: 'none',
86
- margin: 0,
87
- padding: 0,
88
- border: 0,
89
- font: 'inherit',
90
- color: 'inherit',
91
- outline: 'none',
84
+ 'WebkitFontSmoothing': 'inherit',
85
+ 'appearance': 'none',
86
+ 'margin': 0,
87
+ 'padding': 0,
88
+ 'border': 0,
89
+ 'font': 'inherit',
90
+ 'color': 'inherit',
91
+ 'outline': 'none',
92
92
 
93
93
  '&:focus': {
94
94
  boxShadow: focusRingStyle({focusRing: avatar.focusRing}),
@@ -110,9 +110,9 @@ export function responsiveAvatarSizeStyle(
110
110
  const avatarSize = avatar.sizes[size] || avatar.sizes[0]
111
111
 
112
112
  return {
113
- width: rem(avatarSize.size),
114
- height: rem(avatarSize.size),
115
- borderRadius: rem(avatarSize.size / 2),
113
+ 'width': rem(avatarSize.size),
114
+ 'height': rem(avatarSize.size),
115
+ 'borderRadius': rem(avatarSize.size / 2),
116
116
 
117
117
  '&>svg': {
118
118
  width: rem(avatarSize.size),
@@ -131,14 +131,14 @@ export function avatarImageStyle(): CSSObject {
131
131
 
132
132
  export function avatarInitialsStyle(): CSSObject {
133
133
  return {
134
- width: '100%',
135
- height: '100%',
136
- color: 'var(--avatar-fg-color)',
137
- alignItems: 'center',
138
- justifyContent: 'center',
139
- textTransform: 'uppercase',
140
- textAlign: 'center',
141
- borderRadius: '50%',
134
+ 'width': '100%',
135
+ 'height': '100%',
136
+ 'color': 'var(--avatar-fg-color)',
137
+ 'alignItems': 'center',
138
+ 'justifyContent': 'center',
139
+ 'textTransform': 'uppercase',
140
+ 'textAlign': 'center',
141
+ 'borderRadius': '50%',
142
142
 
143
143
  '&:not([hidden])': {
144
144
  display: 'flex',
@@ -155,8 +155,8 @@ function avatarBgStrokeStyle(): CSSObject {
155
155
 
156
156
  function avatarStrokeStyle(): CSSObject {
157
157
  return {
158
- strokeWidth: '2px',
159
- stroke: 'var(--avatar-bg-color)',
158
+ 'strokeWidth': '2px',
159
+ 'stroke': 'var(--avatar-bg-color)',
160
160
 
161
161
  '[data-status="editing"] &': {
162
162
  strokeDasharray: '2 4',
@@ -8,8 +8,8 @@ export function badgeStyle(props: BadgeStyleProps): CSSObject {
8
8
  '--card-bg-color': `var(--card-badge-${$tone}-bg-color)`,
9
9
  '--card-fg-color': `var(--card-badge-${$tone}-fg-color)`,
10
10
 
11
- backgroundColor: 'var(--card-bg-color)',
12
- cursor: 'default',
11
+ 'backgroundColor': 'var(--card-bg-color)',
12
+ 'cursor': 'default',
13
13
 
14
14
  '&:not([hidden])': {
15
15
  display: 'inline-block',
@@ -81,12 +81,12 @@ export function buttonColorStyles(
81
81
  return [
82
82
  _cardColorStyle(baseColor, color.enabled),
83
83
  {
84
- backgroundColor: 'var(--card-bg-color)',
85
- color: 'var(--card-fg-color)',
86
- boxShadow: focusRingBorderStyle(border),
84
+ 'backgroundColor': 'var(--card-bg-color)',
85
+ 'color': 'var(--card-fg-color)',
86
+ 'boxShadow': focusRingBorderStyle(border),
87
87
  '&:disabled, &[data-disabled="true"]': _cardColorStyle(baseColor, color.disabled),
88
88
  "&:not([data-disabled='true'])": {
89
- boxShadow: combineBoxShadow(
89
+ 'boxShadow': combineBoxShadow(
90
90
  focusRingBorderStyle(border),
91
91
  shadow ? defaultBoxShadow : undefined,
92
92
  ),
@@ -4,7 +4,7 @@ import {ResponsiveInlineSpaceStyleProps} from './types'
4
4
 
5
5
  export function inlineBaseStyle(): CSSObject {
6
6
  return {
7
- lineHeight: 0,
7
+ 'lineHeight': 0,
8
8
 
9
9
  '&&:not([hidden])': {
10
10
  display: 'block',
@@ -24,7 +24,7 @@ export function inlineSpaceStyle(props: ResponsiveInlineSpaceStyleProps & ThemeP
24
24
  const _space = rem(spaceIndex === 0.5 ? space[1] / 2 : space[spaceIndex])
25
25
 
26
26
  return {
27
- margin: `-${_space} 0 0 -${_space}`,
27
+ 'margin': `-${_space} 0 0 -${_space}`,
28
28
  '& > div': {padding: `${_space} 0 0 ${_space}`},
29
29
  }
30
30
  })
@@ -7,16 +7,16 @@ export const DEFAULT_POPOVER_ARROW_HEIGHT = 8
7
7
  export const DEFAULT_POPOVER_ARROW_RADIUS = 2
8
8
  export const DEFAULT_POPOVER_MARGINS: PopoverMargins = [0, 0, 0, 0]
9
9
  export const DEFAULT_FALLBACK_PLACEMENTS: Record<Placement, Placement[]> = {
10
- top: ['bottom', 'left', 'right'],
10
+ 'top': ['bottom', 'left', 'right'],
11
11
  'top-start': ['bottom-start', 'left-start', 'right-start'],
12
12
  'top-end': ['bottom-end', 'left-end', 'right-end'],
13
- bottom: ['top', 'left', 'right'],
13
+ 'bottom': ['top', 'left', 'right'],
14
14
  'bottom-start': ['top-start', 'left-start', 'right-start'],
15
15
  'bottom-end': ['top-end', 'left-end', 'right-end'],
16
- left: ['right', 'top', 'bottom'],
16
+ 'left': ['right', 'top', 'bottom'],
17
17
  'left-start': ['right-start', 'top-start', 'bottom-start'],
18
18
  'left-end': ['right-end', 'top-end', 'bottom-end'],
19
- right: ['left', 'top', 'bottom'],
19
+ 'right': ['left', 'top', 'bottom'],
20
20
  'right-start': ['left-start', 'top-start', 'bottom-start'],
21
21
  'right-end': ['left-end', 'top-end', 'bottom-end'],
22
22
  }
@@ -12,8 +12,8 @@ const BASE_STYLE: CSSObject = {
12
12
  '&[data-as="ul"],&[data-as="ol"]': {
13
13
  listStyle: 'none',
14
14
  },
15
- gridTemplateColumns: 'minmax(0, 1fr)',
16
- gridAutoRows: 'min-content',
15
+ 'gridTemplateColumns': 'minmax(0, 1fr)',
16
+ 'gridAutoRows': 'min-content',
17
17
  }
18
18
 
19
19
  export function stackBaseStyle(): CSSObject {
@@ -16,7 +16,7 @@ import {WORKSHOP_PLACEMENT_OPTIONS} from '../../../__workshop__/constants'
16
16
  const PORTAL_OPTIONS = {
17
17
  '(true)': true,
18
18
  '(false)': false,
19
- portal1: 'portal1',
19
+ 'portal1': 'portal1',
20
20
  }
21
21
 
22
22
  export default function CustomPortalStory() {