https://github.com/flarebyte/bubblegum-ui-preview-tag
Preview tag widget for the Bubblegum UI toolkit.
https://github.com/flarebyte/bubblegum-ui-preview-tag
wip-do-not-use
Last synced: over 1 year ago
JSON representation
Preview tag widget for the Bubblegum UI toolkit.
- Host: GitHub
- URL: https://github.com/flarebyte/bubblegum-ui-preview-tag
- Owner: flarebyte
- License: bsd-3-clause
- Created: 2018-07-01T09:43:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-08T19:34:23.000Z (almost 8 years ago)
- Last Synced: 2025-01-04T10:24:20.607Z (over 1 year ago)
- Topics: wip-do-not-use
- Language: Elm
- Size: 139 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Preview Tag Widget
> Preview Tag widget for the Bubblegum UI toolkit
[](https://semaphoreci.com/olih/bubblegum-ui-preview-tag)
Please check the [demo](https://flarebyte.github.io/bubblegum-ui-preview-tag/)
### Installing Elm packages
There is no dependency.
```
elm-package install flarebyte/bubblegum-ui-preview-tag
```
## Configuring the widget
```
type TestMsg
= OnMouseOver String
attr: String -> String -> Attribute.Model
attr key value =
{ id = Nothing
, key = key
, facets = []
, values = [value]
}
adapter : Adapter.Model TestMsg
adapter = =
{ onMouseOver = OnMouseOver
}
userSettings: SettingsEntity.Model
userSettings = {
attributes = [
attr "ui:user-language" "en-GB"
]
}
settings: SettingsEntity.Model
settings = {
attributes = [
attr "ui:selected-appearance" "ui:selected-appearance/bulleted-list"
++ getExampleAttributes
]
}
state: StateEntity.Model
state = {
attributes = [
attr ui_selected "id:suggestion:1"
]
}
Widget.view adapter userSettings settings state
```
## Widget configuration
### User Settings
* **ui:user-language** : Language used by the user (String)
* **ui:user-right-to-left** : Whether the user is using right to left (Bool)
### Settings
* **ui:selected-appearance** : The appearance of the selected field (String)
And for each suggestion, you need to describe further:
* **ui:constituent-label** : Label of the constituent (String)
* **ui:constituent-description** : Description of the constituent (String)
### State
* **ui:selected** : The selected tags for the field (List String)
* **ui:content-id** : The unique id of the content (String)
## Technical design
See [Technical design](TECHNICAL_DESIGN.md)
## Contributing
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning
Managed automatically by [Elm version rules](https://github.com/elm-lang/elm-package#version-rules).
## Authors
* **Olivier Huin** - *Initial work* - [olih](https://github.com/olih)
See also the list of [contributors](https://github.com/flarebyte/bubblegum-ui-preview-tag/graphs/contributors) who participated in this project.
## License
This project is licensed under the BSD 3-Clause License - see the [LICENSE.md](LICENSE) file for details