Commit Graph

21 Commits

Author SHA1 Message Date
Max Desiatov 99581929a2
Add `TextEditor` implementation (#329)
* 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>
2020-12-07 21:13:24 +00:00
Max Desiatov 8ad964c2f9
Mark `Link` view as implemented in `progress.md` 2020-12-06 13:56:53 +00:00
Max Desiatov abceb8609f
Update progress.md 2020-12-04 11:38:01 +00:00
Jed Fox 797c0d849f
Add `Image` implementation, bump JSKit to 0.9.0 (#155)
* Add Image view

* Add image to demo

* Update progress.md

* Alt text

* Use Bundle type to load images, remove systemName

* Add `logo-header.png` resource to `TokamakDemo`

* Reduce image size in the demo

* Allow bundles passed to `Image` to be optional

* Pass `nil` as a default `bundle` to `Image`

Co-authored-by: Max Desiatov <max@desiatov.com>
2020-12-04 11:19:55 +00:00
Jed Fox 523c53f14a
Add `Slider` implementation (#228)
* 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
2020-08-26 13:33:06 -04:00
Max Desiatov 2a49b7808b
Link to the renderers guide from `README.md` (#251)
* Link to the renderers guide from `README.md`

The guide itself was merged into a single file for easier navigation.

* Update RenderersGuide.md
2020-08-07 16:01:27 +01:00
Carson Katri 4c654da456
Add Static HTML Renderer and Documentation (#204) 2020-08-01 16:27:12 -04:00
Jed Fox ac50208447
Initial `NavigationView` implementation (#130)
* Initial NavigationView implementation

* Make the _ButtonProxy type more generic

* Split Navigation.swift files

* Move this too

* Implement Navigation controls

* Update progress.md

* Make NavigationLinks links

* Break line

(wishing for Prettier for Swift)

* Update Path.swift

* n-th time’s the charm

* Update Path.swift

* Update project.pbxproj

* Fixes

* Hopefully fix build issues

* Update Navigation.swift

* Improve ColorDemo

* Fixes & reverts

* Fix crash

* Revert "Fix crash"

This reverts commit ae6f13dcc9.

* Tweak rendering of demos

* add todo for accessibility

* Apply suggestions from @MaxDesiatov

Co-authored-by: Max Desiatov <max@desiatov.com>

* Update TokamakDemo.swift

* Move things to Core.swift

* Switch default destination to EmptyView

* Fix build for macOS

* Revert "Apply suggestions from @MaxDesiatov"

This reverts commit 73c9c3f6ac.

Co-authored-by: Max Desiatov <max@desiatov.com>
Co-authored-by: Carson Katri <Carson.katri@gmail.com>
2020-07-22 17:12:15 -04:00
Jed Fox f0e2b054dc
Add Toggle implementation (#159)
* Fix Button.body

* Add support for renderers customizing default environment values

* Add ParentView conformances

* Add Toggle

* long lines

* Update Path.swift

* Update Path.swift

* Update Sources/TokamakDOM/DOMRenderer.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

* bodyBuild → bodyClosure

* Update progress.md

* Update progress.md, implement Toggle(_ configuration: ToggleStyleConfiguration)

* Fix demo on native

* Hopefully fix issue

* Hopefully fix issue for real

* maybe this will work

* Update ToggleDemo.swift

* AnyToggleStyle → _AnyToggleStyle

* Fix remaining AnyToggleStyle

* Clean up unnecessary files

* Move typealias to Core.swift

* Revert change to ListDemo, remove unused let

Co-authored-by: Max Desiatov <max@desiatov.com>
2020-07-20 18:21:32 -04:00
Max Desiatov b495a2447d
Add `Picker` and `PopUpButtonPickerStyle` as default (#149)
The rest of the styles will be implemented as separate PRs.

Additionally, `LazyHGrid` demo is wrapped in a horizontal `ScrollView` so that it can be viewed in portrait phone layout in the native demo.
2020-07-17 12:57:40 +01:00
Carson Katri 11af0f8d98
Add LazyHGrid and LazyVGrid (#179)
* Add LazyHGrid and LazyVGrid

* iOS support & progress doc
2020-07-14 13:28:23 -04:00
Carson Katri 50be7b16f7
Add List and related Views (#147)
* List and Divider

* Add DisclosureGroup and OutlineGroup

* Add aria attributes

* OutlineGroup List initializers

* Make only chevron clickable

* ListStyle

* Fix line lengths

* Fix demo

* Section

* Modify progressmd

* Remove useless comment

* Switch to hr element

* Disable Divider for last row

* Make list and outline style defaults constant

* Minor cleanup

* ListStyleDeferredToRenderer

* Fix demo
2020-07-06 15:46:59 -04:00
Max Desiatov ebcac6db70
Add Group implementation (#150) 2020-07-02 23:21:33 +01:00
Max Desiatov afba02d2cc
Update AnyView status in progress.md (#151)
IDK, is there something that SwiftUI `AnyView` can do that ours can't? ¯\_(ツ)_/¯
2020-07-02 23:21:14 +01:00
Jed Fox 17463c43ed
Add TextFieldStyle (#125)
* Add TextFieldStyle

* oops

* Comment out the Semantic UI CSS

* Move the DOM-specific stuff to TokamakDOM

* SecureFIeld is implemented!

* Remove commented-out code

Co-authored-by: Max Desiatov <max@desiatov.com>

* Remove unncessary underscore and proxy method

* Enable building on Xcode for access to IDE tools

* Add an environment variable for TextField style

* Remove mandatory init()

* Update Sources/TokamakCore/CGStubs.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

* Update Sources/TokamakCore/CGStubs.swift

Co-authored-by: Max Desiatov <max@desiatov.com>

* Remove the lock

* Move file to sources folder

Co-authored-by: Max Desiatov <max@desiatov.com>
2020-07-01 14:43:09 -04:00
Max Desiatov b1b5693b66
Add logo to README.md (#133)
* Add logo to README.md

* Fix header logo layout in README.md

* Increase header logo width to 640px

* Add Jed Fox as a maintainer to README.md

* Update README.md

Co-authored-by: Jed Fox <git@twopointzero.us>
2020-07-01 08:28:32 +01:00
Carson Katri f9f11a0113
Shape, Path, and some related modifiers (#119)
* Initial Shape support

* Border modifier

* Better demo

* Make Path conform to Shape

* Implement clipShape

* Add shapes/path/shapestyles to progress.md
2020-06-30 15:00:16 -04:00
Carson Katri 98a107f7fe
Add ScrollView (#128)
* Add ScrollView
* Root styles for ScrollView and Stack
2020-06-30 12:29:06 -04:00
Carson Katri e40a701752
Add Spacer support (#122)
1. If a Stack has a Spacer as a child, we need to fill the width or height of the parent so the Spacer's flex-grow: 1; works.
2. If a Stack has a child Stack along the cross axis (HStack with a nested VStack and vice vera) we need to fill the cross axis
3. If a Stack has a child Stack along the same axis (HStack with a nested HStack) we need to fill the axis.
2020-06-30 09:31:25 -04:00
Max Desiatov 9f5877e8ab
Update EmptyView status in progress.md 2020-06-30 14:23:39 +01:00
Jed Fox b2b5ec2ae5
Add TextField, SecureField, and a progress document (#116)
I’ve added two TextFields to the demo, which are supposed to have their values synced. Pressing enter in the second one will increment the commit counter.
2020-06-29 17:52:22 +01:00