@sanity/ui 1.0.0-beta.32 → 1.0.0-beta.33

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 (71) hide show
  1. package/LICENSE +1 -1
  2. package/dist/{types/src/index.d.ts → index.d.ts} +136 -68
  3. package/dist/{sanity-ui.esm.js → index.esm.js} +698 -1525
  4. package/dist/index.esm.js.map +1 -0
  5. package/dist/{sanity-ui.js → index.js} +697 -1539
  6. package/dist/index.js.map +1 -0
  7. package/package.json +113 -23
  8. package/src/components/autocomplete/__workshop__/example.tsx +1 -1
  9. package/src/components/autocomplete/__workshop__/index.ts +36 -32
  10. package/src/components/autocomplete/autocomplete.tsx +1 -2
  11. package/src/components/autocomplete/constants.ts +3 -8
  12. package/src/components/breadcrumbs/__workshop__/index.ts +11 -7
  13. package/src/components/dialog/__workshop__/index.ts +13 -9
  14. package/src/components/hotkeys/__workshop__/index.ts +11 -3
  15. package/src/components/menu/__workshop__/index.ts +71 -67
  16. package/src/components/menu/menuButton.tsx +16 -14
  17. package/src/components/skeleton/__workshop__/index.ts +8 -4
  18. package/src/components/tab/__workshop__/index.ts +11 -3
  19. package/src/components/toast/__workshop__/index.ts +16 -4
  20. package/src/components/tree/__workshop__/basic.perf.ts +1 -14
  21. package/src/components/tree/__workshop__/basic.tsx +1 -1
  22. package/src/components/tree/__workshop__/index.ts +12 -8
  23. package/src/hooks/useElementRect/__workshop__/index.ts +11 -3
  24. package/src/hooks/useMediaIndex/__workshop__/index.ts +11 -3
  25. package/src/primitives/avatar/__workshop__/index.ts +16 -12
  26. package/src/primitives/badge/__workshop__/index.ts +16 -12
  27. package/src/primitives/badge/__workshop__/tones.tsx +1 -1
  28. package/src/primitives/box/__workshop__/index.ts +16 -4
  29. package/src/primitives/button/__workshop__/index.ts +51 -47
  30. package/src/primitives/card/__workshop__/index.ts +15 -11
  31. package/src/primitives/checkbox/__workshop__/index.ts +10 -6
  32. package/src/primitives/code/__workshop__/index.ts +16 -12
  33. package/src/primitives/container/__workshop__/index.ts +5 -3
  34. package/src/primitives/flex/__workshop__/index.ts +8 -4
  35. package/src/primitives/grid/__workshop__/index.ts +7 -3
  36. package/src/primitives/heading/__workshop__/index.ts +16 -12
  37. package/src/primitives/inline/__workshop__/index.ts +5 -3
  38. package/src/primitives/kbd/__workshop__/index.ts +5 -3
  39. package/src/primitives/label/__workshop__/index.ts +16 -12
  40. package/src/primitives/popover/__workshop__/PlainStory.tsx +0 -1
  41. package/src/primitives/popover/__workshop__/TestStory.tsx +0 -1
  42. package/src/primitives/popover/__workshop__/index.ts +36 -32
  43. package/src/primitives/popover/constants.ts +0 -3
  44. package/src/primitives/popover/floating-ui/size.ts +40 -25
  45. package/src/primitives/popover/popover.tsx +54 -41
  46. package/src/primitives/popover/popoverCard.tsx +9 -16
  47. package/src/primitives/radio/__workshop__/index.ts +8 -4
  48. package/src/primitives/select/__workshop__/index.ts +8 -4
  49. package/src/primitives/spinner/__workshop__/index.ts +11 -7
  50. package/src/primitives/stack/__workshop__/index.ts +11 -7
  51. package/src/primitives/switch/__workshop__/index.ts +8 -4
  52. package/src/primitives/text/__workshop__/index.ts +21 -17
  53. package/src/primitives/textArea/__workshop__/index.ts +11 -7
  54. package/src/primitives/textInput/__workshop__/index.ts +46 -42
  55. package/src/primitives/textInput/__workshop__/plain.tsx +2 -1
  56. package/src/primitives/tooltip/__workshop__/index.ts +11 -7
  57. package/src/theme/__workshop__/index.ts +26 -22
  58. package/src/theme/{ThemeContext.ts → themeContext.ts} +0 -0
  59. package/src/utils/boundaryElement/__workshop__/index.ts +11 -7
  60. package/src/utils/elementQuery/__workshop__/index.ts +11 -7
  61. package/src/utils/layer/__workshop__/index.ts +21 -17
  62. package/src/utils/portal/__workshop__/index.ts +11 -7
  63. package/src/utils/virtualList/__workshop__/index.ts +26 -22
  64. package/dist/sanity-ui.esm.js.map +0 -1
  65. package/dist/sanity-ui.js.map +0 -1
  66. package/src/__workshop__/color/overview.tsx +0 -101
  67. package/src/__workshop__/index.ts +0 -10
  68. package/src/icons/__workshop__/.eslintrc +0 -5
  69. package/src/icons/__workshop__/index.tsx +0 -6
  70. package/src/icons/__workshop__/overview.tsx +0 -76
  71. package/src/utils/srOnly/__workshop__/.eslintrc +0 -5
@@ -1,25 +1,29 @@
1
1
  import {defineScope} from '@sanity/ui-workshop'
2
2
  import {lazy} from 'react'
3
3
 
4
- export default defineScope('theme', 'Theme', [
5
- {
6
- name: 'canvas',
7
- title: 'Canvas',
8
- component: lazy(() => import('./canvas')),
9
- },
10
- {
11
- name: 'nested-provider',
12
- title: 'Nested provider',
13
- component: lazy(() => import('./nestedProvider')),
14
- },
15
- {
16
- name: 'layer',
17
- title: 'Layer',
18
- component: lazy(() => import('./layer')),
19
- },
20
- {
21
- name: 'color',
22
- title: 'Color',
23
- component: lazy(() => import('./color')),
24
- },
25
- ])
4
+ export default defineScope({
5
+ name: 'theme',
6
+ title: 'Theme',
7
+ stories: [
8
+ {
9
+ name: 'canvas',
10
+ title: 'Canvas',
11
+ component: lazy(() => import('./canvas')),
12
+ },
13
+ {
14
+ name: 'nested-provider',
15
+ title: 'Nested provider',
16
+ component: lazy(() => import('./nestedProvider')),
17
+ },
18
+ {
19
+ name: 'layer',
20
+ title: 'Layer',
21
+ component: lazy(() => import('./layer')),
22
+ },
23
+ {
24
+ name: 'color',
25
+ title: 'Color',
26
+ component: lazy(() => import('./color')),
27
+ },
28
+ ],
29
+ })
File without changes
@@ -1,10 +1,14 @@
1
1
  import {defineScope} from '@sanity/ui-workshop'
2
2
  import {lazy} from 'react'
3
3
 
4
- export default defineScope('utils/boundaryElement', 'BoundaryElement', [
5
- {
6
- name: 'plain',
7
- title: 'Plain',
8
- component: lazy(() => import('./plain')),
9
- },
10
- ])
4
+ export default defineScope({
5
+ name: 'utils/boundaryElement',
6
+ title: 'BoundaryElement',
7
+ stories: [
8
+ {
9
+ name: 'plain',
10
+ title: 'Plain',
11
+ component: lazy(() => import('./plain')),
12
+ },
13
+ ],
14
+ })
@@ -1,10 +1,14 @@
1
1
  import {defineScope} from '@sanity/ui-workshop'
2
2
  import {lazy} from 'react'
3
3
 
4
- export default defineScope('utils/elementQuery', 'ElementQuery', [
5
- {
6
- name: 'custom-media',
7
- title: 'Custom media',
8
- component: lazy(() => import('./customMedia')),
9
- },
10
- ])
4
+ export default defineScope({
5
+ name: 'utils/elementQuery',
6
+ title: 'ElementQuery',
7
+ stories: [
8
+ {
9
+ name: 'custom-media',
10
+ title: 'Custom media',
11
+ component: lazy(() => import('./customMedia')),
12
+ },
13
+ ],
14
+ })
@@ -1,20 +1,24 @@
1
1
  import {defineScope} from '@sanity/ui-workshop'
2
2
  import {lazy} from 'react'
3
3
 
4
- export default defineScope('utils/layer', 'Layer', [
5
- {
6
- name: 'plain',
7
- title: 'Plain',
8
- component: lazy(() => import('./plain')),
9
- },
10
- {
11
- name: 'multiple-roots',
12
- title: 'Multiple roots',
13
- component: lazy(() => import('./multipleRoots')),
14
- },
15
- {
16
- name: 'responsive-z-offset',
17
- title: 'Responsive z-offset',
18
- component: lazy(() => import('./responsiveZOffset')),
19
- },
20
- ])
4
+ export default defineScope({
5
+ name: 'utils/layer',
6
+ title: 'Layer',
7
+ stories: [
8
+ {
9
+ name: 'plain',
10
+ title: 'Plain',
11
+ component: lazy(() => import('./plain')),
12
+ },
13
+ {
14
+ name: 'multiple-roots',
15
+ title: 'Multiple roots',
16
+ component: lazy(() => import('./multipleRoots')),
17
+ },
18
+ {
19
+ name: 'responsive-z-offset',
20
+ title: 'Responsive z-offset',
21
+ component: lazy(() => import('./responsiveZOffset')),
22
+ },
23
+ ],
24
+ })
@@ -1,10 +1,14 @@
1
1
  import {defineScope} from '@sanity/ui-workshop'
2
2
  import {lazy} from 'react'
3
3
 
4
- export default defineScope('utils/portal', 'Portal', [
5
- {
6
- name: 'named',
7
- title: 'Named portals',
8
- component: lazy(() => import('./named')),
9
- },
10
- ])
4
+ export default defineScope({
5
+ name: 'utils/portal',
6
+ title: 'Portal',
7
+ stories: [
8
+ {
9
+ name: 'named',
10
+ title: 'Named portals',
11
+ component: lazy(() => import('./named')),
12
+ },
13
+ ],
14
+ })
@@ -1,25 +1,29 @@
1
1
  import {defineScope} from '@sanity/ui-workshop'
2
2
  import {lazy} from 'react'
3
3
 
4
- export default defineScope('utils/virtual-list', 'VirtualList', [
5
- {
6
- name: 'window-scroll',
7
- title: 'Window scroll',
8
- component: lazy(() => import('./windowScrolll')),
9
- },
10
- {
11
- name: 'element-scroll',
12
- title: 'Element scroll',
13
- component: lazy(() => import('./elementScroll')),
14
- },
15
- {
16
- name: 'infinite-list',
17
- title: 'Infinite list',
18
- component: lazy(() => import('./infiniteList')),
19
- },
20
- {
21
- name: 'changing-props',
22
- title: 'Changing props',
23
- component: lazy(() => import('./changingProps')),
24
- },
25
- ])
4
+ export default defineScope({
5
+ name: 'utils/virtual-list',
6
+ title: 'VirtualList',
7
+ stories: [
8
+ {
9
+ name: 'window-scroll',
10
+ title: 'Window scroll',
11
+ component: lazy(() => import('./windowScrolll')),
12
+ },
13
+ {
14
+ name: 'element-scroll',
15
+ title: 'Element scroll',
16
+ component: lazy(() => import('./elementScroll')),
17
+ },
18
+ {
19
+ name: 'infinite-list',
20
+ title: 'Infinite list',
21
+ component: lazy(() => import('./infiniteList')),
22
+ },
23
+ {
24
+ name: 'changing-props',
25
+ title: 'Changing props',
26
+ component: lazy(() => import('./changingProps')),
27
+ },
28
+ ],
29
+ })