Code Monkey home page Code Monkey logo

Comments (5)

paulcpederson avatar paulcpederson commented on June 1, 2024 1

updates to spec based on #24

  1. Allow optionally passing in an input. This helps bind for other frameworks:
<label>
  <calcite-checkbox checked></checkbox>
  Standard checkbox
</label> 

<label>
  <calcite-checkbox>
    <input type="checkbox"> <!-- Angular would bind to this -->
  </checkbox>
  Checkbox passed in to override default internal checkbox via a slot
</label> 
  1. Event name should now be calciteCheckboxChange I believe as we are moving towards namespacing our events to calcite and the component name.

from calcite-design-system.

paulcpederson avatar paulcpederson commented on June 1, 2024

Adding @vcolavin to this one and giving a bit more information.

In ArcGIS Online we currently use a hacky adjacent selector CSS solution which we lightly wrap in a widget. Here is the relevant bits of that implementation, plus a kind of typeScript spec of what we need features wise: https://codepen.io/paulcp/pen/yWGLYK

We're looking to have something along the lines of:

<label>
  <calcite-checkbox checked disabled large color="white"></checkbox>
  This option is checked, disabled, large, and white
</label> 

<label>
  <calcite-checkbox indeterminate color="transparent"></checkbox>
  This option is mixed and meant to exist on top of an image. 
</label> 

Previous designs for this component:

58517721-44f18300-8161-11e9-9cc4-bb2ae30a3ae0

@vcolavin Have a look at the components people have already written and take a crack at it. Pretty early days so things like CSS class name methodology aren't totally finalized, but we can back fill any important decisions we make as a team.

from calcite-design-system.

vcolavin avatar vcolavin commented on June 1, 2024

@paulcpederson do we want to support something like this use case?

<calcite-checkbox id='my-id' />

<!-- some other stuff -->

<label for='my-id>label is over here</label>

from calcite-design-system.

paulcpederson avatar paulcpederson commented on June 1, 2024

Yeah I think we won't document that, but if it's possible it would be good to support as some devs probably are used to this method of labeling form controls.

from calcite-design-system.

kumarGayu avatar kumarGayu commented on June 1, 2024

for label we might have to use calcite-label #31. However, the development of the label component should not affect check box component development I believe.

from calcite-design-system.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.