@c2n/number-input 0.0.12 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"src/number-input.ts","declarations":[{"kind":"class","description":"A form-associated number field backed by a native `<input type=\"number\">`. It keeps native decimal parsing,\nvalidation and Arrow Up/Down behavior, replaces browser-specific spinners with themeable decrement/increment\ncontrols, and supports prefix/suffix adornments, helper text and an error state.","name":"NumberInput","cssProperties":[{"type":{"text":"pixel"},"name":"--c2-number-input--min-height","default":"36px"},{"type":{"text":"border"},"name":"--c2-number-input--border","default":"1px solid #bcbcc6"},{"type":{"text":"border-radius"},"name":"--c2-number-input--border-radius","default":"6px"},{"type":{"text":"color"},"name":"--c2-number-input--color","default":"#18181b"},{"type":{"text":"color"},"name":"--c2-number-input--background","default":"#ffffff"},{"type":{"text":"font-size"},"name":"--c2-number-input--font-size","default":"14px"},{"type":{"text":"font-family"},"name":"--c2-number-input--font-family","default":"inherit"},{"type":{"text":"pixel"},"name":"--c2-number-input--line-height","default":"20px"},{"type":{"text":"padding"},"name":"--c2-number-input__value--padding","default":"6px 10px 6px 12px"},{"type":{"text":"pixel"},"name":"--c2-number-input__value--gap","default":"8px"},{"type":{"text":"color"},"name":"--c2-number-input__placeholder--color","default":"#71717a"},{"type":{"text":"border"},"name":"--c2-number-input__hover--border","default":"1px solid #a1a1aa"},{"type":{"text":"border"},"name":"--c2-number-input__focus--border","default":"1px solid #0265dc"},{"type":{"text":"outline"},"name":"--c2-number-input__focus--outline","default":"2px solid rgba(2, 101, 220, 0.4)"},{"type":{"text":"pixel"},"name":"--c2-number-input__focus--outline-offset","default":"0px"},{"type":{"text":"border"},"name":"--c2-number-input__error--border","default":"1px solid #dc2626"},{"type":{"text":"outline"},"name":"--c2-number-input__error__focus--outline","default":"2px solid rgba(220, 38, 38, 0.25)"},{"type":{"text":"color"},"name":"--c2-number-input__read-only--background","default":"#fafafa"},{"type":{"text":"opacity"},"name":"--c2-number-input__disabled--opacity","default":"0.38"},{"type":{"text":"pixel"},"name":"--c2-number-input__stepper--width","default":"28px"},{"type":{"text":"border"},"name":"--c2-number-input__stepper--border-left","default":"1px solid #e4e4e7"},{"type":{"text":"color"},"name":"--c2-number-input__stepper--color","default":"#71717a"},{"type":{"text":"color"},"name":"--c2-number-input__stepper__hover--color","default":"#18181b"},{"type":{"text":"color"},"name":"--c2-number-input__stepper__hover--background","default":"#f4f4f5"},{"type":{"text":"pixel"},"name":"--c2-number-input__stepper-icon--size","default":"14px"},{"type":{"text":"color"},"name":"--c2-number-input__adornment--color","default":"#71717a"},{"type":{"text":"font-size"},"name":"--c2-number-input__adornment--font-size","default":"14px"},{"type":{"text":"pixel"},"name":"--c2-number-input__supporting-text--gap","default":"4px"},{"type":{"text":"font-size"},"name":"--c2-number-input__supporting-text--font-size","default":"12px"},{"type":{"text":"pixel"},"name":"--c2-number-input__supporting-text--line-height","default":"16px"},{"type":{"text":"color"},"name":"--c2-number-input__supporting-text--color","default":"#71717a"},{"type":{"text":"color"},"name":"--c2-number-input__supporting-text__error--color","default":"#dc2626"}],"slots":[{"description":"Currency symbol or other adornment before the value.","name":"prefix"},{"description":"Unit or other adornment after the value.","name":"suffix"},{"description":"Replaces the minus icon in the decrement control.","name":"decrement-icon"},{"description":"Replaces the plus icon in the increment control.","name":"increment-icon"},{"description":"Rich helper content below the field. `help` and `error-text` are plain-text shortcuts.","name":"supporting-text"}],"members":[{"kind":"field","name":"formAssociated","type":{"text":"boolean"},"static":true,"default":"true"},{"kind":"field","name":"internals","privacy":"private","readonly":true},{"kind":"field","name":"customValidityMessage","type":{"text":"string"},"privacy":"private","default":"''"},{"kind":"field","name":"defaultValue","type":{"text":"string"},"privacy":"private","default":"''"},{"kind":"field","name":"defaultCaptured","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"disabledByForm","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"focused","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"hasSupportingSlot","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"input","type":{"text":"HTMLInputElement | undefined"},"privacy":"private","readonly":true},{"kind":"field","name":"value","type":{"text":"string"},"default":"''","description":"Current numeric text, or an empty string. Use `valueAsNumber` for a parsed value.","attribute":"value","reflects":true},{"kind":"field","name":"min","type":{"text":"number | undefined"},"description":"Minimum valid value.","attribute":"min"},{"kind":"field","name":"max","type":{"text":"number | undefined"},"description":"Maximum valid value.","attribute":"max"},{"kind":"field","name":"step","type":{"text":"string"},"default":"'1'","description":"Increment used by Arrow keys and the step controls, or `any` to disable step controls.","attribute":"step"},{"kind":"field","name":"name","type":{"text":"string"},"default":"''","description":"Form field name.","attribute":"name"},{"kind":"field","name":"autocomplete","type":{"text":"string"},"default":"''","description":"Browser autocomplete hint.","attribute":"autocomplete"},{"kind":"field","name":"placeholder","type":{"text":"string"},"default":"''","description":"Text shown while the field is empty.","attribute":"placeholder"},{"kind":"field","name":"required","type":{"text":"boolean"},"default":"false","description":"Requires a number before the form can be submitted.","attribute":"required","reflects":true},{"kind":"field","name":"readOnly","type":{"text":"boolean"},"default":"false","description":"Prevents editing while keeping the value in form submission.","attribute":"readOnly","reflects":true},{"kind":"field","name":"disabled","type":{"text":"boolean"},"default":"false","description":"Prevents interaction and excludes the value from form submission.","attribute":"disabled","reflects":true},{"kind":"field","name":"hideSteppers","type":{"text":"boolean"},"default":"false","description":"Hides the decrement and increment controls.","attribute":"hide-steppers","reflects":true},{"kind":"field","name":"error","type":{"text":"boolean"},"default":"false","description":"Applies the visual error state and sets `aria-invalid`.","attribute":"error","reflects":true},{"kind":"field","name":"help","type":{"text":"string"},"default":"''","description":"Helper text shown below the field.","attribute":"help"},{"kind":"field","name":"errorText","type":{"text":"string"},"default":"''","description":"Message shown below the field while `error` is set.","attribute":"error-text"},{"kind":"field","name":"ariaLabel","type":{"text":"string | null"},"default":"null","description":"Accessible name forwarded to the native number input.","attribute":"aria-label"},{"kind":"field","name":"form","readonly":true},{"kind":"field","name":"labels","readonly":true},{"kind":"field","name":"validity","readonly":true},{"kind":"field","name":"validationMessage","readonly":true},{"kind":"field","name":"willValidate","readonly":true},{"kind":"field","name":"valueAsNumber","description":"Parsed value, or `NaN` when empty.","readonly":true},{"kind":"method","name":"focus","parameters":[{"name":"options","optional":true,"type":{"text":"FocusOptions"}}]},{"kind":"method","name":"select","description":"Selects the numeric text."},{"kind":"method","name":"stepUp","parameters":[{"name":"amount","default":"1"}],"description":"Increases the value by `step` a given number of times."},{"kind":"method","name":"stepDown","parameters":[{"name":"amount","default":"1"}],"description":"Decreases the value by `step` a given number of times."},{"kind":"method","name":"checkValidity"},{"kind":"method","name":"reportValidity"},{"kind":"method","name":"setCustomValidity","parameters":[{"name":"message","type":{"text":"string"}}]},{"kind":"method","name":"formResetCallback"},{"kind":"method","name":"formDisabledCallback","parameters":[{"name":"disabled","type":{"text":"boolean"}}]},{"kind":"method","name":"formStateRestoreCallback","parameters":[{"name":"state","type":{"text":"string | File | FormData | null"}}]},{"kind":"field","name":"effectiveDisabled","privacy":"private","readonly":true},{"kind":"field","name":"steppersDisabled","privacy":"private","readonly":true},{"kind":"field","name":"atMinimum","privacy":"private","readonly":true},{"kind":"field","name":"atMaximum","privacy":"private","readonly":true},{"kind":"method","name":"handleInput","privacy":"private","parameters":[{"name":"event","type":{"text":"InputEvent"}}]},{"kind":"method","name":"handleChange","privacy":"private","parameters":[{"name":"event","type":{"text":"Event"}}]},{"kind":"method","name":"handleFocusIn","privacy":"private","parameters":[{"name":"event","type":{"text":"FocusEvent"}}]},{"kind":"method","name":"handleFocusOut","privacy":"private","parameters":[{"name":"event","type":{"text":"FocusEvent"}}]},{"kind":"method","name":"handleSlotChange","privacy":"private","parameters":[{"name":"event","type":{"text":"Event"}}]},{"kind":"method","name":"keepInputFocus","privacy":"private","parameters":[{"name":"event","type":{"text":"Event"}}]},{"kind":"method","name":"forwardFocus","privacy":"private","parameters":[{"name":"event","type":{"text":"Event"}}]},{"kind":"method","name":"stepBy","privacy":"private","parameters":[{"name":"amount","type":{"text":"number"}}]},{"kind":"method","name":"syncFormState","privacy":"private"},{"kind":"method","name":"renderStepper","privacy":"private","parameters":[{"name":"direction","type":{"text":"'down' | 'up'"}}]}],"events":[{"name":"input","type":{"text":"InputEvent"},"description":"Re-dispatched when typing or stepping changes the value."},{"name":"change","type":{"text":"Event"},"description":"Re-dispatched when a typed value is committed or a step control changes the value."}],"attributes":[{"name":"value","type":{"text":"string"},"default":"''","description":"Current numeric text, or an empty string. Use `valueAsNumber` for a parsed value.","fieldName":"value"},{"name":"min","type":{"text":"number | undefined"},"description":"Minimum valid value.","fieldName":"min"},{"name":"max","type":{"text":"number | undefined"},"description":"Maximum valid value.","fieldName":"max"},{"name":"step","type":{"text":"string"},"default":"'1'","description":"Increment used by Arrow keys and the step controls, or `any` to disable step controls.","fieldName":"step"},{"name":"name","type":{"text":"string"},"default":"''","description":"Form field name.","fieldName":"name"},{"name":"autocomplete","type":{"text":"string"},"default":"''","description":"Browser autocomplete hint.","fieldName":"autocomplete"},{"name":"placeholder","type":{"text":"string"},"default":"''","description":"Text shown while the field is empty.","fieldName":"placeholder"},{"name":"required","type":{"text":"boolean"},"default":"false","description":"Requires a number before the form can be submitted.","fieldName":"required"},{"name":"readOnly","type":{"text":"boolean"},"default":"false","description":"Prevents editing while keeping the value in form submission.","fieldName":"readOnly"},{"name":"disabled","type":{"text":"boolean"},"default":"false","description":"Prevents interaction and excludes the value from form submission.","fieldName":"disabled"},{"name":"hide-steppers","type":{"text":"boolean"},"default":"false","description":"Hides the decrement and increment controls.","fieldName":"hideSteppers"},{"name":"error","type":{"text":"boolean"},"default":"false","description":"Applies the visual error state and sets `aria-invalid`.","fieldName":"error"},{"name":"help","type":{"text":"string"},"default":"''","description":"Helper text shown below the field.","fieldName":"help"},{"name":"error-text","type":{"text":"string"},"default":"''","description":"Message shown below the field while `error` is set.","fieldName":"errorText"},{"name":"aria-label","type":{"text":"string | null"},"default":"null","description":"Accessible name forwarded to the native number input.","fieldName":"ariaLabel"}],"superclass":{"name":"LitElement","package":"lit"},"tagName":"c2-number-input","customElement":true}],"exports":[{"kind":"js","name":"NumberInput","declaration":{"name":"NumberInput","module":"src/number-input.ts"}},{"kind":"custom-element-definition","name":"c2-number-input","declaration":{"name":"NumberInput","module":"src/number-input.ts"}}]}]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c2n/number-input",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/number-input.js",
|
|
6
6
|
"exports": {
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"files": [
|
|
22
22
|
"dist",
|
|
23
23
|
"types",
|
|
24
|
+
"custom-elements.json",
|
|
24
25
|
"react.d.ts",
|
|
25
26
|
"react.js",
|
|
26
27
|
"vue.d.ts",
|
|
@@ -62,12 +63,12 @@
|
|
|
62
63
|
}
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
65
|
-
"@c2n/core": "0.0.
|
|
66
|
+
"@c2n/core": "0.0.13",
|
|
66
67
|
"lit": "3.3.3"
|
|
67
68
|
},
|
|
68
69
|
"devDependencies": {
|
|
69
70
|
"@c2n/config": "*"
|
|
70
71
|
},
|
|
71
72
|
"customElements": "custom-elements.json",
|
|
72
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "aa19b641f64fbc54c36b7649a8171d7a686abbdd"
|
|
73
74
|
}
|