This adds `ProgressView` using the `<progress>` tag on the web.
* Add ProgressView implementation
* Fix native demo
* Enable Foundation.Progress in non-WASI environments
* Fix wasm build
* Update progress coc
* Improve snapshot copy error handling
* Use RenderingTests as directory name
* Fix snapshots CI script
* Make test failures fail the CI job
* Snapshot script debugging
* Copy failed snapshots in a different way
* Call `exit 1` when tests fail
* Use correct directory in the upload step
* Update test image
* Update .github/workflows/ci.yml
Co-authored-by: ezraberch <49635435+ezraberch@users.noreply.github.com>
Co-authored-by: Max Desiatov <max@desiatov.com>
It's much easier to implement stack spacing when stacks are rendered as single-row or single-column grids, and grid gaps already work in all browsers. For this we need to slightly bump browser version requirements, most notably from Safari 11 to Safari 12.
Resolves#272.
* Remove unused properties in `StackDemo`
* Implement stack spacing with grid gaps
* Fix GTK build
* Bump browser requirements in README.md
* Remove outdated FIXME
* Generalize snapshot timeouts
* Prevent excessive CSS style leaks of properties
This fixes#320 by adding a SwiftUI-compatible `DatePicker`. However, `DatePickerStyle` is not supported.
This uses the HTML inputs `date`, `time`, or `datetime-local`, depending on the given `displayedComponents`. This means that not all browsers show the picker, as Mac Safari currently does not support them. Safari on Mac will just show an ISO-format text field. If the date is in an invalid format, the binding will not receive updates until it becomes parseable by JSDate.
On supported browsers, the binding gets updated in real time, as you would expect, with a Foundation.Date, just like SwiftUI.
* Add DatePicker to TokamakCore and TokamakDOM
* Fix crash on invalid date
* Update progress.md and add credit
* Fix time zone related issues with the DatePicker
* Add DatePickerDemo to the TokamakDemo
* Fix overview for DatePicker
* Fix NativeDemo build
* Add support for shadow modifier
Closes#324
* Convert radius to match iOS shadows closer
* Use correct environment values
* Include shadow demo in XCode project
* Add `TextEditor` implementation
Resolves#173.
* Clean up and bump requirements in the demo project
* Use a single `_tokamak-formcontrol` CSS class
* Add missing CSS class to `TextEditor.swift`
Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: Jed Fox <git@jedfox.com>
* Slider MVP
* Update progress.md
* Update Slider.swift
* Update SliderDemo.swift
* Allow any BinaryFloatingPoint
* Add Mac Catalyst Tokamak demo
* Add basic onEditingChanged support
This likely has bugs if you touch down multiple fingers on the slider then lift one finger.
* Demo improvements
* Update ScrollView to match SwiftUI
This isn’t documented but it visually appears to wrap the content in a VStack
* Restyle the sliders
* Update Slider.swift
* Make convert functions private
* Fix line length
* Update progress.md and FIXMEs
* Wrap comments
This is just an empty API at the moment. I hope it can be implemented purely in the `deferredBody` of `GeometryReader` with [the ResizeObserver API](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) without requiring any tweaks in the `Renderer` protocol or the reconciler.
Seems like I need the `domRef` modifier that writes `JSObjectRef` to a given binding working first, as discussed in #231.
This based off the `buttonstyles` branch by @Outcue.
Initially it didn't work because mounted host views didn't propagate their environment on updates. This is now fixed by adding `updateEnvironment` function on `MountedElement` base class and calling it in the initializer. Manual environment updates are no longer needed in `makeMounted...` factory functions. `makeMountedApp` is no longer needed at all and `MountedApp` initializer can be used directly then.
First pass at the SidebarListStyle.
For this to be truly complete, work needs to be completed on ButtonStyles. I can look at that next. NavigationLinks in a Sidebar are Text items that draw a blue background when clicked (and perhaps when item is active.)
Co-authored-by: Gene Z. Ragan <diskzero@mac.com>
Co-authored-by: Jed Fox <git@jedfox.com>
Co-authored-by: Gene Ragan <gene@semitone.audio>
Adding this module as a dependency, Tokamak users would only need to add a single import regardless of the platform they're targeting. Thus, instead of
```swift
#if canImport(SwiftUI)
import SwiftUI
#else
import TokamakDOM
#endif
```
a single `import TokamakShim` is enough. `TokamakShim` re-exports correct modules based on a target platform.
I've also renamed the `TokamakDemo Native` directory to `NativeDemo` for brevity.
`xcodebuild` output in the `macos_demo_build` job is now passed to `xcpretty` for more readable build logs.