@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.
- package/LICENSE +1 -1
- package/dist/{types/src/index.d.ts → index.d.ts} +136 -68
- package/dist/{sanity-ui.esm.js → index.esm.js} +698 -1525
- package/dist/index.esm.js.map +1 -0
- package/dist/{sanity-ui.js → index.js} +697 -1539
- package/dist/index.js.map +1 -0
- package/package.json +113 -23
- package/src/components/autocomplete/__workshop__/example.tsx +1 -1
- package/src/components/autocomplete/__workshop__/index.ts +36 -32
- package/src/components/autocomplete/autocomplete.tsx +1 -2
- package/src/components/autocomplete/constants.ts +3 -8
- package/src/components/breadcrumbs/__workshop__/index.ts +11 -7
- package/src/components/dialog/__workshop__/index.ts +13 -9
- package/src/components/hotkeys/__workshop__/index.ts +11 -3
- package/src/components/menu/__workshop__/index.ts +71 -67
- package/src/components/menu/menuButton.tsx +16 -14
- package/src/components/skeleton/__workshop__/index.ts +8 -4
- package/src/components/tab/__workshop__/index.ts +11 -3
- package/src/components/toast/__workshop__/index.ts +16 -4
- package/src/components/tree/__workshop__/basic.perf.ts +1 -14
- package/src/components/tree/__workshop__/basic.tsx +1 -1
- package/src/components/tree/__workshop__/index.ts +12 -8
- package/src/hooks/useElementRect/__workshop__/index.ts +11 -3
- package/src/hooks/useMediaIndex/__workshop__/index.ts +11 -3
- package/src/primitives/avatar/__workshop__/index.ts +16 -12
- package/src/primitives/badge/__workshop__/index.ts +16 -12
- package/src/primitives/badge/__workshop__/tones.tsx +1 -1
- package/src/primitives/box/__workshop__/index.ts +16 -4
- package/src/primitives/button/__workshop__/index.ts +51 -47
- package/src/primitives/card/__workshop__/index.ts +15 -11
- package/src/primitives/checkbox/__workshop__/index.ts +10 -6
- package/src/primitives/code/__workshop__/index.ts +16 -12
- package/src/primitives/container/__workshop__/index.ts +5 -3
- package/src/primitives/flex/__workshop__/index.ts +8 -4
- package/src/primitives/grid/__workshop__/index.ts +7 -3
- package/src/primitives/heading/__workshop__/index.ts +16 -12
- package/src/primitives/inline/__workshop__/index.ts +5 -3
- package/src/primitives/kbd/__workshop__/index.ts +5 -3
- package/src/primitives/label/__workshop__/index.ts +16 -12
- package/src/primitives/popover/__workshop__/PlainStory.tsx +0 -1
- package/src/primitives/popover/__workshop__/TestStory.tsx +0 -1
- package/src/primitives/popover/__workshop__/index.ts +36 -32
- package/src/primitives/popover/constants.ts +0 -3
- package/src/primitives/popover/floating-ui/size.ts +40 -25
- package/src/primitives/popover/popover.tsx +54 -41
- package/src/primitives/popover/popoverCard.tsx +9 -16
- package/src/primitives/radio/__workshop__/index.ts +8 -4
- package/src/primitives/select/__workshop__/index.ts +8 -4
- package/src/primitives/spinner/__workshop__/index.ts +11 -7
- package/src/primitives/stack/__workshop__/index.ts +11 -7
- package/src/primitives/switch/__workshop__/index.ts +8 -4
- package/src/primitives/text/__workshop__/index.ts +21 -17
- package/src/primitives/textArea/__workshop__/index.ts +11 -7
- package/src/primitives/textInput/__workshop__/index.ts +46 -42
- package/src/primitives/textInput/__workshop__/plain.tsx +2 -1
- package/src/primitives/tooltip/__workshop__/index.ts +11 -7
- package/src/theme/__workshop__/index.ts +26 -22
- package/src/theme/{ThemeContext.ts → themeContext.ts} +0 -0
- package/src/utils/boundaryElement/__workshop__/index.ts +11 -7
- package/src/utils/elementQuery/__workshop__/index.ts +11 -7
- package/src/utils/layer/__workshop__/index.ts +21 -17
- package/src/utils/portal/__workshop__/index.ts +11 -7
- package/src/utils/virtualList/__workshop__/index.ts +26 -22
- package/dist/sanity-ui.esm.js.map +0 -1
- package/dist/sanity-ui.js.map +0 -1
- package/src/__workshop__/color/overview.tsx +0 -101
- package/src/__workshop__/index.ts +0 -10
- package/src/icons/__workshop__/.eslintrc +0 -5
- package/src/icons/__workshop__/index.tsx +0 -6
- package/src/icons/__workshop__/overview.tsx +0 -76
- 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(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
+
})
|