3.0.10 • Published 5 years ago

@fooloomanzoo/input-picker-pattern v3.0.10

Weekly downloads
781
License
MIT
Repository
github
Last release
5 years ago

Published on NPM Published on webcomponents.org

API & Demo

The repository includes various helper components and standard styles used in elements like number-input, text-input, color-input, datetime-input, datetime-picker and color-picker.

It includes the following component-pattern:

  • input-pattern
  • input-picker-pattern

and component-mixins:

  • overlay-picker-mixin
  • form-element-mixin
  • switch-container-mixin

and style-mixins:

  • dropdown-style
  • dropdown-tip-style
  • input-shared-style
  • input-picker-shared-style

and components:

  • overlay-element
    • A simple element, that creates an overlay using iron-overlay-behavior.

default style-properties and -mixins

input-shared-style

Custom propertyDescriptionDefault
--input-colortext-color of the inputinherit
--input-backgroundbackground of the inputtransparent
--input-border-widthborder-width of the inputthin
--input-border-styleborder-style of the inputdotted
--input-border-colorborder-color of the inputrgba(0, 0, 0, 0.25)
--input-paddingpadding of the input0.25em
--input-border-radiusborder-radius of the input0.25em
--input-transition-durationtransition-duration of the input250ms
--input-transition-propertytransition-property of the inputbackground
--input-transition-timing-functiontransition-timing-function of the inputcubic-bezier(0.6, 1, 0.2, 1)
--input-aligntext-align of the input inputcenter
--input-cursorcursor of the input inputinitial
--input-focus-colortext-color of the focused and hovered inputinherit
--input-focus-backgroundbackground of the focused and hovered inputrgba(0, 0, 0, 0.1)
--input-focus-border-styleborder-style of the focused and hovered inputdotted
--input-focus-border-colorborder-color of the focused and hovered inputrgba(0,0,0,0.5)
--input-invalid-colortext-color of the invalid inputinherit
--input-invalid-backgroundbackground of the invalid inputrgba(255, 0, 0, 0.25)
--input-invalid-border-styleborder-style of the invalid inputdotted
--input-invalid-border-colorborder-color of the invalid inputrgba(255, 0, 0, 0.5)
--input-disabled-colortext-color of the disabled inputinherit
--input-disabled-backgroundbackground of the disabled inputtransparent
--input-disabled-font-stylefont-style of the disabled elementsoblique
--input-disabled-opacityopacity of the disabled input0.75
--input-placeholder-opacityopacity of the placeholder0.75
--input-placeholder-aligntext-align of the placeholdercenter
--input-selection-colortext-color of the selected textinherit
--input-selection-backgroundbackground of the selected textrgba(255, 255, 255, 0.5)
--input-stylemixin applied to the input{}
--input-focusmixin applied to the focused and hovered input{}
--input-invalidmixin applied to the invalid input{}
--input-disabledmixin applied to the disabled input{}
--input-placeholdermixin applied to the placeholder{}

For custom-inputs like number-input, integer-input and text-input, that are used inside the element, you can additionally use:

Custom propertyDescriptionDefault
--inner-input-colortext-color of the inner input elementinherit
--inner-input-backgroundbackground of the inner input elementtransparent
--inner-input-border-widthborder-width of the inner input elementthin
--inner-input-border-styleborder-style of the inner input elementdotted
--inner-input-border-colorborder-color of the inner input elementtransparent
--inner-input-paddingpadding of the inner input element0.15em
--inner-input-border-radiusborder-radius of the inner input element0.2em
--inner-input-focus-colortext-color of the focused and hovered inner input elementcurrentColor
--inner-input-focus-backgroundbackground of the focused and hovered inner input elementrgba(0, 0, 0, 0.1)
--inner-input-focus-border-styleborder-style of the focused and hovered inner input elementdotted
--inner-input-focus-border-colorborder-color of the focused and hovered inner input elementrgba(0,0,0,0.1)
--inner-input-invalid-colortext-color of the invalid inner input elementinherit
--inner-input-invalid-backgroundbackground of the invalid inner input elementrgba(255,255,255,0.5)
--inner-input-invalid-border-styleborder-style of the invalid inner input elementdotted
--inner-input-invalid-border-colorborder-color of the invalid inner input elementrgba(255,0,0,0.25)

input-picker-shared-style

Custom propertyDescriptionDefault
--input-picker-colortext-color of the picker#dfdfdf
--input-picker-backgroundbackground of the picker#222
--input-picker-paddingpadding of the picker0.3em
--input-picker-border-radiusborder-radius0.5em
--input-picker-box-shadowbox-shadow0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4)
--input-icon-border-radiusborder-radius of the icons0.3em
--input-icon-paddingpadding of the icons and buttons0.5em
--input-icon-heightheight of the icons and buttons1em
--input-icon-widthwidth of the icons and buttons1em
--input-icon-backgroundbackground of the icons and buttonstransparent
--input-iconmixin applied to the icons and buttons{}
--input-pickermixin applied to the picker{}

The icons will apply all --input-focus-*-properties when hovered or focused. The native inputs, select-boxes and buttons apply the related style properties. Some --input-properties are set by default:

Custom propertyDefault
--input-cursorpointer
--inner-input-padding1px
--inner-input-border-radius3px
--inner-input-focus-color#f1f1f1
--inner-input-focus-background--primary-color, #394FE8
--input-disabled{ font-weight: lighter; }

dropdown-style

Custom propertyDescriptionDefault
--dropdown-transition-durationtransition duration for changing opacity when opening or closing250ms
--dropdown-transition-timing-functiondimensions of the tip of the dropdowncubic-bezier(0.6, 1, 0.2, 1)
--dropdown-backgroundbackground of the dropdown--input-picker-background, transparent

dropdown-tip-style

Custom propertyDescriptionDefault
--dropdown-tip-sizedimensions of the tip of the dropdown6px
--dropdown-tip-gapgap to the outside of the tip12px
--dropdown-backgroundbackground of the of the dropdown and the tip--input-picker-background, transparent

overlays

Have a look at iron-overlay-behavior's repository to find out more about its style-properties.

3.0.10

5 years ago

3.0.9

5 years ago

3.0.8

5 years ago

3.0.7

5 years ago

3.0.6

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.3.9

5 years ago

2.3.7

6 years ago

2.3.6

6 years ago

2.3.5

6 years ago

2.3.4

6 years ago

2.3.3

6 years ago

2.3.2

6 years ago

2.3.1

6 years ago

2.3.0

6 years ago

2.2.10

6 years ago

2.2.9

6 years ago

2.2.8

6 years ago

2.2.7

6 years ago

2.2.6

6 years ago

2.2.5

6 years ago

2.2.4

6 years ago

2.2.3

6 years ago

2.2.2

6 years ago

2.2.1

6 years ago

2.1.9

6 years ago

2.1.8

6 years ago