gatsbyjs/gatsby 48705
Build blazing fast, modern apps and websites with React
Markdown component for React
einaros/sse.js 242
Server-Sent Events made easy for node.js
rexxars/commonmark-react-renderer 126
React renderer for CommonMark (rationalized Markdown)
pwmckenna/node-travis-encrypt 46
node module to encrypt environment variables for travis-ci
movingbrands/svelte-portable-text 20
Svelte component for rendering block content
Beautiful ascii doge, as a string or an array
Create a multipart/byteranges stream based on passed ranges
Microservice that scrapes websites, extracting key information such as title, description, opengraph information etc
Readable and writable stream that spell checks your text and parses aspell output to an understandable format
push eventsanity-io/sanity-template-sapper-blog
commit sha 0ba1608df29a0a14e795742ab89609bc944bbc95
chore(deps): update sanity packages
push time in 9 minutes
push eventsanity-io/sanity
commit sha 32d8f521cd6623a8e2c229d6680d90b14954dd85
[base] Customize focus ring theming
commit sha 734dc2d0a39e1f13f0ce07342a6d843a6ba6c1ac
[base] Add new FormField components
commit sha edb2b4bac45d674a855e12105c6d5221b9031120
[form-builder] Improve typings
commit sha d5c532b98ec1737c5ad199a1505ec845af905f0d
[base] Export types from FormField
commit sha 4d1cac253fb14352ec733de56bad1aea56170d12
[form-builder] Add framer-motion as dependency
commit sha 3a20f5c4b478f40cc27189676d8e3929df988b06
[base] Use boundary element from context by default in DropDownButton
commit sha 35098d0ebfb4f24da3a18864154ddaca462f925e
[form-builder] Enable opt-in TS strict mode on a directory basis
commit sha 4c0601a5e3b45e9a201f58a689c5fe95db13c665
[form-builder] Remove unused error boundary component
commit sha 1b313ad53b2032843665a0fa5d380bb4652a07cb
[form-builder] Remove unused css file
commit sha d691b8ccd478bb23be891e06aa9ba1e198cdc81d
[form-builder] Remove unused file
commit sha 5b7be0791d7ff00064f3f69331f47d1c58a06cbb
[form-builder] Use TextInput from Sanity UI in StringInput
commit sha 636251dede4851dd4d585fb67e22a3f23ad96c87
[form-builder] Use TextInput from Sanity UI for most primitive input components
commit sha dee977727ff227e1c64daf16db2f880903ddba64
[form-builder] Migrate BooleanInput to Sanity UI Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha ba633909d432adea6db60c45700e993541d84772
[form-builder] Refactor SlugInput to use Sanity UI
commit sha ecf642346942fc4d7e782d45bb8890493a08f200
[form-builder] Refactor SelectInput to use Sanity UI
commit sha 25d87bf6e556591924c1959bfee81c8451ed9946
[form-builder] Rewrite date inputs to use date picker based on UI Co-authored-by: Benedicte Emilie Brækken <benedicte@sanity.io> Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha 5931b1efdc9a4a7404b0bb314ed4a4a42d55d509
[chore] Migrate to using Sanity UI's `Layer` and `Portal` components.
commit sha 5f5f60cf34b6bd08d114876ca59286071468e23a
[form-builder] Rewrite ArrayInput to use Sanity UI
commit sha 75b057b07b4d84fbbcfc033a8d6f7f348c925048
[form-builder] Replace icon part imports with @sanity/icons
commit sha 602f8678879d070ce6c28fdf814656fa29960483
[form-builder] Create a transitional PopoverDialog in order to track usage
push time in 15 minutes
push eventsanity-io/sanity-template-gatsby-portfolio
commit sha 624211262ee83f51e0adcfe7ab8c814a5301196a
chore(deps): update sanity packages
push time in 17 minutes
push eventsanity-io/sanity
commit sha df716cc372676f88f8cfa2f3966121b1e82adea2
[chore] Add Slack notifications on build failure
push time in 21 minutes
push eventsanity-io/sanity-template-vercel-poc
commit sha 8b49c0e07ebb58d01c11d696bdf6bce603ea4c73
Update Sanity packages
push time in 37 minutes
push eventsanity-io/sanity-template-nuxt-events
commit sha 711b56a956d215cd3bbec8f405bb474c26bafeb4
Update Sanity packages
push time in an hour
push eventsanity-io/sanity-template-sapper-blog
commit sha 67847dde82404f972200274efe1b3277c64c8e90
chore(deps): update sanity packages
push time in an hour
push eventsanity-io/sanity
commit sha 32d8f521cd6623a8e2c229d6680d90b14954dd85
[base] Customize focus ring theming
commit sha 734dc2d0a39e1f13f0ce07342a6d843a6ba6c1ac
[base] Add new FormField components
commit sha edb2b4bac45d674a855e12105c6d5221b9031120
[form-builder] Improve typings
commit sha d5c532b98ec1737c5ad199a1505ec845af905f0d
[base] Export types from FormField
commit sha 4d1cac253fb14352ec733de56bad1aea56170d12
[form-builder] Add framer-motion as dependency
commit sha 3a20f5c4b478f40cc27189676d8e3929df988b06
[base] Use boundary element from context by default in DropDownButton
commit sha 35098d0ebfb4f24da3a18864154ddaca462f925e
[form-builder] Enable opt-in TS strict mode on a directory basis
commit sha 4c0601a5e3b45e9a201f58a689c5fe95db13c665
[form-builder] Remove unused error boundary component
commit sha 1b313ad53b2032843665a0fa5d380bb4652a07cb
[form-builder] Remove unused css file
commit sha d691b8ccd478bb23be891e06aa9ba1e198cdc81d
[form-builder] Remove unused file
commit sha 5b7be0791d7ff00064f3f69331f47d1c58a06cbb
[form-builder] Use TextInput from Sanity UI in StringInput
commit sha 636251dede4851dd4d585fb67e22a3f23ad96c87
[form-builder] Use TextInput from Sanity UI for most primitive input components
commit sha dee977727ff227e1c64daf16db2f880903ddba64
[form-builder] Migrate BooleanInput to Sanity UI Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha ba633909d432adea6db60c45700e993541d84772
[form-builder] Refactor SlugInput to use Sanity UI
commit sha ecf642346942fc4d7e782d45bb8890493a08f200
[form-builder] Refactor SelectInput to use Sanity UI
commit sha 25d87bf6e556591924c1959bfee81c8451ed9946
[form-builder] Rewrite date inputs to use date picker based on UI Co-authored-by: Benedicte Emilie Brækken <benedicte@sanity.io> Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
push time in an hour
push eventsanity-io/sanity-template-vercel-poc
commit sha 91bfbb85217dcb0dcdafabe3bf5c4d9ffdd61d2c
Update Sanity packages
push time in an hour
push eventsanity-io/sanity
commit sha d44c1abecf1805e9c993d1f7e33af539949644c8
[chore] Add Slack notifications on build failure
push time in an hour
push eventsanity-io/sanity
commit sha edb2b4bac45d674a855e12105c6d5221b9031120
[form-builder] Improve typings
commit sha d5c532b98ec1737c5ad199a1505ec845af905f0d
[base] Export types from FormField
commit sha 4d1cac253fb14352ec733de56bad1aea56170d12
[form-builder] Add framer-motion as dependency
commit sha 3a20f5c4b478f40cc27189676d8e3929df988b06
[base] Use boundary element from context by default in DropDownButton
commit sha 35098d0ebfb4f24da3a18864154ddaca462f925e
[form-builder] Enable opt-in TS strict mode on a directory basis
commit sha 4c0601a5e3b45e9a201f58a689c5fe95db13c665
[form-builder] Remove unused error boundary component
commit sha 1b313ad53b2032843665a0fa5d380bb4652a07cb
[form-builder] Remove unused css file
commit sha d691b8ccd478bb23be891e06aa9ba1e198cdc81d
[form-builder] Remove unused file
commit sha 5b7be0791d7ff00064f3f69331f47d1c58a06cbb
[form-builder] Use TextInput from Sanity UI in StringInput
commit sha 636251dede4851dd4d585fb67e22a3f23ad96c87
[form-builder] Use TextInput from Sanity UI for most primitive input components
commit sha dee977727ff227e1c64daf16db2f880903ddba64
[form-builder] Migrate BooleanInput to Sanity UI Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha ba633909d432adea6db60c45700e993541d84772
[form-builder] Refactor SlugInput to use Sanity UI
commit sha ecf642346942fc4d7e782d45bb8890493a08f200
[form-builder] Refactor SelectInput to use Sanity UI
commit sha 25d87bf6e556591924c1959bfee81c8451ed9946
[form-builder] Rewrite date inputs to use date picker based on UI Co-authored-by: Benedicte Emilie Brækken <benedicte@sanity.io> Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha 5931b1efdc9a4a7404b0bb314ed4a4a42d55d509
[chore] Migrate to using Sanity UI's `Layer` and `Portal` components.
commit sha 5f5f60cf34b6bd08d114876ca59286071468e23a
[form-builder] Rewrite ArrayInput to use Sanity UI
commit sha 75b057b07b4d84fbbcfc033a8d6f7f348c925048
[form-builder] Replace icon part imports with @sanity/icons
commit sha 602f8678879d070ce6c28fdf814656fa29960483
[form-builder] Create a transitional PopoverDialog in order to track usage
commit sha 8e941864222500430c3cac319ead90bcf1558451
[form-builder] Replace parts with Sanity UI in ArrayFunctions
commit sha 4afabb6333af33a859f8b6859eb4a7e6d71b1e12
[form-builder] Rewrite to use <Button> from Sanity UI
push time in an hour
push eventsanity-io/sanity
commit sha af200ab915278716f6e51d1aa284ea313595de7b
[chore] Add Slack notifications on build failure
push time in an hour
push eventsanity-io/sanity
commit sha 32d8f521cd6623a8e2c229d6680d90b14954dd85
[base] Customize focus ring theming
commit sha 734dc2d0a39e1f13f0ce07342a6d843a6ba6c1ac
[base] Add new FormField components
commit sha 508150244990cf3131d65410194c9c89b1b39d9b
[form-builder] Export InputComponent and InputComponentProps types
commit sha 123f86062583e0e6c6599e6f48c6c0fcb8ac64ee
[examples] Update examples of custom input components
commit sha a43c972adfb351fe5c6ec46ce46b8200a065e554
[form-builder] Fix lint errors
push time in an hour
issue openedsanity-io/gatsby-source-sanity
Description
When running develop or build, I get this warning in the console:
warning [sanity] Document <document_name> has type <document_type> (Sanity<document_name>),
which is not declared in the GraphQL schema.
Make sure you run "graphql deploy". Skipping document.
Although I've removed all traces of these documents and deployed graphql in all my datasets using this command:
sanity graphql deploy --dataset production --no-playground --force
created time in an hour
push eventsanity-io/sanity
commit sha 32d8f521cd6623a8e2c229d6680d90b14954dd85
[base] Customize focus ring theming
commit sha 734dc2d0a39e1f13f0ce07342a6d843a6ba6c1ac
[base] Add new FormField components
commit sha 5f6a4a36dc5719e5a8b70f5448ae30cfb621abf3
[form-builder] Improve typings
commit sha 7f382dab7283f6f95361d0a113d55049e054e68f
[base] Export types from FormField
commit sha baaaf130e03d13e9cd059704285e7ff02b67b072
[form-builder] Add framer-motion as dependency
commit sha 8995b19ce7ed697a568442e4d2ffe1dbe77da584
[base] Use boundary element from context by default in DropDownButton
commit sha 24c7374c94e8a3d396e4ed1a30aa9e24021324ac
[form-builder] Enable opt-in TS strict mode on a directory basis
commit sha ad401531304a500912c53bb15922f6b5f4bb41a9
[base] Define focus ring theme configuration
commit sha 16aaf6e3e42f36feaa13f0166a70bc19ee3fc3bc
[form-builder] Remove unused error boundary component
commit sha 98d1b2e1ce6435435eaac57ca8a4d2b1abf3bace
[form-builder] Remove unused css file
commit sha 5500c4fed31d56f29e5b76aafe641d4d3eda2b39
[form-builder] Remove unused file
commit sha cd12659c09dbc431930bb19ab11d78b5fffe6b22
[form-builder] Use TextInput from Sanity UI in StringInput
commit sha f94c8e0b05c37cbe4b93ed6bc137cfa15c88c9a0
[form-builder] Use TextInput from Sanity UI for most primitive input components
commit sha 74c326a0b1f484c12c2ae3e5b83ba8c5bb415153
[form-builder] Migrate BooleanInput to Sanity UI Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha 85b3d0f20a89bd1741f61badad3b4ae2da9179db
[form-builder] Refactor SlugInput to use Sanity UI
commit sha 93e50eccefcbb0c82db02690032c484ba1945ca6
[form-builder] Refactor SelectInput to use Sanity UI
commit sha 272a007369eb54eecfc481180de1125d3296b811
[form-builder] Rewrite date inputs to use date picker based on UI Co-authored-by: Benedicte Emilie Brækken <benedicte@sanity.io> Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha 51d6416f2213de86a5198226e7fca1a81caeb947
[chore] Migrate to using Sanity UI's `Layer` and `Portal` components.
commit sha 8f6a541eaed07f512047974677e12851a93dc48d
[form-builder] Rewrite ArrayInput to use Sanity UI
commit sha c6c68b5b973a6a4753903330f7faa8fc5f1fc626
[form-builder] Replace icon part imports with @sanity/icons
push time in an hour
push eventsanity-io/sanity
commit sha 32d8f521cd6623a8e2c229d6680d90b14954dd85
[base] Customize focus ring theming
commit sha 734dc2d0a39e1f13f0ce07342a6d843a6ba6c1ac
[base] Add new FormField components
push time in 2 hours
delete branch sanity-io/sanity
delete branch : ui/ch1502/base-new-formfield-components
delete time in 2 hours
PR merged sanity-io/sanity
<!-- Thank you for contributing to Sanity. Please read our Code of Conduct and Contributing Guidelines before submitting a PR.
To help us review your Pull Request, please make sure you follow the steps and guidelines below.
It's OK to open a Pull Request to start a discussion/ask for help, but it should then be created as a Draft Pull Request.
Do not delete the instructional comments. -->
Type of change (check at least one)
- [x] New feature (non-breaking change which adds functionality)
Does this change require a documentation update? (Check one)
- [x] No (but it will soon)
Description
<!-- Please include a summary of the changes this PR introduces and/or which issue is fixed. Please also include relevant motivation and context of why this PR is necessary. -->
This change introduces 4 new public components for building form field components:
import {
FormField,
FormFieldHeaderText,
FormFieldSet,
FormFieldValidationStatus,
} from '@sanity/base/components'
Note for release
<!-- Please include a high level summary of the changes this PR introduce. The intended audience is both editors and developers. If it's introducing a new feature, remember to link to docs/blogpost, if it's a bugfix, please describe the bug in non-technical terms (e.g. how a user/developer may have experienced it). For inspiration, check out the release notes from an earlier release: https://github.com/sanity-io/sanity/releases/tag/v0.142.0 -->
- New building blocks for composing form fields, that will be used by
@sanity/form-builder
and to create custom input components.
pr closed time in 2 hours
push eventsanity-io/sanity
commit sha d92820994f629f6e7cfa74d60804ff24ead0133c
[base] Customize focus ring theming
commit sha 207857d5798844a21c10d2158559070203534a28
[base] Add new FormField components
commit sha 68304dfc947e6fcd4548b1efb058acf1183aed23
[form-builder] Improve typings
commit sha beeb302b1d596534e36f5ce438d934fc00f09367
[base] Export types from FormField
commit sha ae906c7703cd376eaf754d12c8f4282e6a8ae84c
[form-builder] Add framer-motion as dependency
commit sha adfea599fa85dc067816deae7350d5664c86b073
[base] Use boundary element from context by default in DropDownButton
commit sha 279286e0d41c127c19c82ae4235d9b7c431297a1
[form-builder] Enable opt-in TS strict mode on a directory basis
commit sha 897a3d4e06df8ed559d0cbe2eade643413b528c2
[base] Define focus ring theme configuration
commit sha bc707513bd7b92ea00dcd81df8042d42ef0a5a04
[form-builder] Remove unused error boundary component
commit sha d3c0e8f5010c34fbcad8a66ef1179c51e0dbe3b7
[form-builder] Remove unused css file
commit sha b24df625e8e02839b9a280eed521ab951cae7bef
[form-builder] Remove unused file
commit sha 6c4eb8a1b347c0fae353dea88c10e0006edbee90
[form-builder] Use TextInput from Sanity UI in StringInput
commit sha ce524803b713cbf4355ff7230a212546ce267668
[form-builder] Use TextInput from Sanity UI for most primitive input components
commit sha 1f52a57e27608b7569c11f7dad858be29daea4c5
[form-builder] Migrate BooleanInput to Sanity UI Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha e0b7f95c4bc36d3d5f705afe22b7ef4dab353486
[form-builder] Refactor SlugInput to use Sanity UI
commit sha 48935e09d549dd2f983eaa5ade81be0d67f8dfe7
[form-builder] Refactor SelectInput to use Sanity UI
commit sha 626bcbd554112a74ce60fe0e49356e8b28b0a7be
[form-builder] Rewrite date inputs to use date picker based on UI Co-authored-by: Benedicte Emilie Brækken <benedicte@sanity.io> Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha f25a146bd30131e9a1c7876efd2d2e6b7140cc6e
[chore] Migrate to using Sanity UI's `Layer` and `Portal` components.
commit sha 914411b798939fd8539669869b7f347452dfb950
[form-builder] Rewrite ArrayInput to use Sanity UI
commit sha 476d051a2c358de1e371f8003bcb698386ff2d30
[form-builder] Replace icon part imports with @sanity/icons
push time in 2 hours
push eventsanity-io/sanity-template-gatsby-portfolio
commit sha 94e35eb54ba36a21b431eb68674ffe29b011efdf
chore(deps): update sanity packages
push time in 2 hours
push eventsanity-io/sanity
commit sha 4a3946edb0199be2413243f0b3d08b1eb13621fa
[chore] Add a watchTS task
commit sha f4184ed3b73e7256dbaf23c1d7dd0fad513ef5a2
[base] Move connection status store to datastores folder
commit sha 7eebdd00ad078e3602faee4f209a6b3bfbecc710
[chore] Upgrade @sanity/ui to latest
commit sha f2c60f0a839957cbfb418f3886fe2ac6d1ec1915
[desk-tool] Wrap document pane with the Card component
commit sha d92820994f629f6e7cfa74d60804ff24ead0133c
[base] Customize focus ring theming
commit sha 207857d5798844a21c10d2158559070203534a28
[base] Add new FormField components
commit sha 54dec5626b7f8a37549bf2c9fbc03331b1146b89
[form-builder] Improve typings
commit sha 2e7336311b46c95746f605f3c68d5229f8dea933
[base] Export types from FormField
commit sha 7c6a72b4a7c922e55b7daa6843b34c71f46c9105
[form-builder] Add framer-motion as dependency
commit sha 1e23fe85f07fcddee9c3936e0ee7658329844aa0
[base] Use boundary element from context by default in DropDownButton
commit sha 78d3259f9a875c4a902b5f83e5f42c5fed666d3d
[form-builder] Enable opt-in TS strict mode on a directory basis
commit sha edae11384938db699efd3176ffd74e49fca2f5df
[form-builder] Remove unused error boundary component
commit sha 8c01ae825627a00b0e5a90214e055bcf723557a2
[form-builder] Remove unused css file
commit sha 9f7fa88cdc31772d999f2bb7b0d0234d9b39e138
[form-builder] Remove unused file
commit sha 30adfbec6bf7b690b8250061e32db534011503da
[form-builder] Use TextInput from Sanity UI in StringInput
commit sha bcacd627ea6121fae6079132b8ea778591b78784
[form-builder] Use TextInput from Sanity UI for most primitive input components
commit sha da0a647ea8bcc945376f76a25d73195346af326d
[form-builder] Migrate BooleanInput to Sanity UI Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha fbb070756cc19dd48231bdf87c3a9160e36db632
[form-builder] Refactor SlugInput to use Sanity UI
commit sha c99863ed517a2f78f04f345d772e5ab260a51f23
[form-builder] Refactor SelectInput to use Sanity UI
commit sha a716c4f250dd456bcfc730725a7d5dcadc41a5b0
[form-builder] Rewrite date inputs to use date picker based on UI Co-authored-by: Benedicte Emilie Brækken <benedicte@sanity.io> Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
push time in 2 hours
push eventsanity-io/sanity-template-kitchen-sink
commit sha 7f9a4837726a58130e10d49144d7b74943a17d01
chore(deps): update sanity packages
push time in 2 hours
push eventsanity-io/sanity-template-nuxt-events
commit sha fc3c85d99b84efd9ebcedd90b13ca4877911f024
Update Sanity packages
push time in 2 hours
push eventsanity-io/sanity
commit sha 0c04b3a05ba2aac8426265dcc8f635507f9710eb
[form-builder] Migrate BooleanInput to Sanity UI Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha 6c834c4f3a80eaa2851e32042139a8ffc0e6708b
[form-builder] Refactor SlugInput to use Sanity UI
commit sha 0d8ea3887bb442815c7e5e2a1245edb17c440f5f
[form-builder] Refactor SelectInput to use Sanity UI
commit sha 34496957ad82e9d95e923cda6604c8c1ce609fc5
[form-builder] Rewrite date inputs to use date picker based on UI Co-authored-by: Benedicte Emilie Brækken <benedicte@sanity.io> Co-authored-by: Marius Lundgård <studio@mariuslundgard.com>
commit sha b632384cf5e5d0007d74b2dfb5ea4f7a6d0d4bd0
[chore] Migrate to using Sanity UI's `Layer` and `Portal` components.
commit sha bdb346762893e9cefdf33121fe0cf0996f8c4c81
[form-builder] Rewrite ArrayInput to use Sanity UI
commit sha 5f416977f7abda46e755a9d5aa9fd1f78f5d4f71
[form-builder] Replace icon part imports with @sanity/icons
commit sha f415bf2bf1d38331f4526e598642cdb75bca0a21
[form-builder] Create a transitional PopoverDialog in order to track usage
commit sha 975201525407f3bb8cd6c501c0f9b83991ffe00a
[form-builder] Replace parts with Sanity UI in ArrayFunctions
commit sha fb6339562290fb02d451faeea8c6238346bae572
[form-builder] Rewrite to use <Button> from Sanity UI
commit sha cb01608f35e24b780abcfe46a24dbcdcab66fb14
[form-builder] Declare list/item component pairs in outer scope
commit sha 658d84819505d0cbd4cf1d8c6589814b2a09b387
[form-builder] Use spinner from Sanity UI in ImageInput Also fix a bug where it was not centered on the image.
commit sha 85be40ee86f158eb7b0e2f7ef70c9d87e1eafdb1
[form-builder] Make ImageInput use Spinner from Sanity UI
commit sha cd4d84b43eb2661726e1033f85837e80df9b9185
[form-builder] Remove invalid/missing class names
commit sha 0fad44be9d774a1f43b65a02d8e9ca6f406956d8
[form-builder] Refactor sortable lists and grids to Sanity UI
commit sha 9a11bc3258da555e2af16b69a506b9d2db79d537
[form-builder] Remove class names around ArrayFunctions
commit sha 6f64e54d0ffdde81fd07e7037f97a286704528b3
[form-builder] Remove ArrayInput.css and replace classes with @sanity/ui components where applicable
commit sha e8d1d40a65ca84bb39808fbe1d510a341d50f160
[form-builder] Refactor the remaining bits of ArrayInput to use @sanity/ui
commit sha eb0611812814e495a0f6c5b2cdc8a2f2f74919a6
[form-builder] Fix various typing issues with ArrayInput This makes ArrayInput pass typescript strict mode
commit sha 30740ff4fd0edbb9637a6bf6e7326adca6098a41
[form-builder] Make sure moving item is always on top
push time in 2 hours
Pull request review commentsanity-io/sanity
[base] New form field components
+import {Box, Flex, Text} from '@sanity/ui'+import React from 'react'+import {ToggleArrowRightIcon} from '@sanity/icons'+import styled from 'styled-components'++export interface FormFieldSetLegendProps {+ collapsed: boolean+ collapsible?: boolean+ onClick?: () => void+ title: React.ReactNode+}++const Root = styled.legend`+ /* See: https://thatemil.com/blog/2015/01/03/reset-your-fieldset/ */+ padding: 0;+ display: table;+`++const ToggleButton = styled(Flex).attrs({forwardedAs: 'button'})`+ appearance: none;+ border: 0;+ background: none;+ color: inherit;+ -webkit-font-smoothing: inherit;+ font: inherit;+ outline: none;++ &:not([hidden]) {+ display: flex;+ }++ &:focus {+ /* @todo: prettify */
Fixed
comment created time in 2 hours
Pull request review commentsanity-io/sanity
[base] New form field components
+/* eslint-disable camelcase */++import {Path, Marker} from '@sanity/types'+import {Box, Flex, Grid, Stack, Text, useForwardedRef} from '@sanity/ui'+import {FOCUS_TERMINATOR} from '@sanity/util/paths'+import React, {forwardRef, useState, useCallback, useEffect} from 'react'+import styled, {css} from 'styled-components'+import {ChangeIndicator, ChangeIndicatorContextProvidedProps} from '../../change-indicators'+import {FieldPresence, FormFieldPresence} from '../../presence'+import {FormFieldValidationStatus} from './FormFieldValidationStatus'+import {FormFieldSetLegend} from './FormFieldSetLegend'+import {markersToValidationList} from './helpers'++export interface FormFieldSetProps {+ /**+ * @beta+ */+ __unstable_changeIndicator?: ChangeIndicatorContextProvidedProps | boolean+ /**+ * @beta+ */+ __unstable_markers?: Marker[]+ /**+ * @beta+ */+ __unstable_presence?: FormFieldPresence[]+ children: React.ReactNode+ collapsed?: boolean+ collapsible?: boolean+ columns?: number+ description?: React.ReactNode+ /**+ * The nesting level of the form field set+ */+ level?: number+ onFocus?: (path: Path) => void+ onToggle?: (collapsed: boolean) => void+ title?: React.ReactNode+}++const FOCUS_PATH = [FOCUS_TERMINATOR]++const Root = styled(Box).attrs({forwardedAs: 'fieldset'})`+ border: none;++ /* See: https://thatemil.com/blog/2015/01/03/reset-your-fieldset/ */+ body:not(:-moz-handler-blocked) & {+ display: table-cell;+ }+`++const Content = styled(Box)<{$borderLeft: boolean}>(({$borderLeft}) => {+ return css`+ outline: none;+ border-left: ${$borderLeft ? '1px solid var(--card-border-color)' : undefined};++ &:focus {+ /* @todo: prettify */
Fixed
comment created time in 2 hours
push eventsanity-io/sanity
commit sha 207857d5798844a21c10d2158559070203534a28
[base] Add new FormField components
push time in 2 hours