@c2n/cascader 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 +5 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"src/cascader.ts","declarations":[{"kind":"class","description":"Hierarchical single-value picker that opens every active level in one floating panel. Supply nested `options`, then\nread the selected value path from `value`. Branches open another column; choosing a leaf commits the path.","name":"Cascader","cssProperties":[{"type":{"text":"pixel"},"name":"--c2-cascader__trigger--min-height","default":"36px"},{"type":{"text":"pixel"},"name":"--c2-cascader__trigger--width","default":"220px"},{"type":{"text":"padding"},"name":"--c2-cascader__trigger--padding","default":"6px 10px 6px 12px"},{"type":{"text":"pixel"},"name":"--c2-cascader__trigger--gap","default":"8px"},{"type":{"text":"color"},"name":"--c2-cascader__trigger--background","default":"#ffffff"},{"type":{"text":"color"},"name":"--c2-cascader__trigger--color","default":"#18181b"},{"type":{"text":"font-size"},"name":"--c2-cascader__trigger--font-size","default":"14px"},{"type":{"text":"border"},"name":"--c2-cascader__trigger--border","default":"1px solid #bcbcc6"},{"type":{"text":"border-radius"},"name":"--c2-cascader__trigger--border-radius","default":"6px"},{"type":{"text":"border"},"name":"--c2-cascader__trigger__hover--border","default":"1px solid #a1a1aa"},{"type":{"text":"color"},"name":"--c2-cascader__trigger__hover--background","default":"#fafafa"},{"type":{"text":"border"},"name":"--c2-cascader__trigger__open--border","default":"1px solid rgb(2, 101, 220)"},{"type":{"text":"outline"},"name":"--c2-cascader__trigger__focus--outline","default":"2px solid rgba(2, 101, 220, 0.4)"},{"type":{"text":"pixel"},"name":"--c2-cascader__trigger__focus--outline-offset","default":"0px"},{"type":{"text":"opacity"},"name":"--c2-cascader__trigger__disabled--opacity","default":"0.38"},{"type":{"text":"color"},"name":"--c2-cascader__placeholder--color","default":"#71717a"},{"type":{"text":"pixel"},"name":"--c2-cascader__icon--size","default":"16px"},{"type":{"text":"color"},"name":"--c2-cascader__icon--color","default":"#71717a"},{"type":{"text":"color"},"name":"--c2-cascader__panel--background","default":"#ffffff"},{"type":{"text":"border"},"name":"--c2-cascader__panel--border","default":"1px solid #e4e4e7"},{"type":{"text":"border-radius"},"name":"--c2-cascader__panel--border-radius","default":"8px"},{"type":{"text":"box-shadow"},"name":"--c2-cascader__panel--box-shadow","default":"0 12px 32px rgba(24, 24, 27, 0.14)"},{"type":{"text":"pixel"},"name":"--c2-cascader__panel--max-width","default":"720px"},{"type":{"text":"pixel"},"name":"--c2-cascader__column--min-width","default":"150px"},{"type":{"text":"pixel"},"name":"--c2-cascader__column--max-width","default":"240px"},{"type":{"text":"pixel"},"name":"--c2-cascader__column--max-height","default":"280px"},{"type":{"text":"padding"},"name":"--c2-cascader__column--padding","default":"4px"},{"type":{"text":"border"},"name":"--c2-cascader__column--border","default":"1px solid #e4e4e7"},{"type":{"text":"pixel"},"name":"--c2-cascader__option--min-height","default":"36px"},{"type":{"text":"padding"},"name":"--c2-cascader__option--padding","default":"8px 10px"},{"type":{"text":"pixel"},"name":"--c2-cascader__option--gap","default":"8px"},{"type":{"text":"border-radius"},"name":"--c2-cascader__option--border-radius","default":"6px"},{"type":{"text":"color"},"name":"--c2-cascader__option--color","default":"#18181b"},{"type":{"text":"font-size"},"name":"--c2-cascader__option--font-size","default":"14px"},{"type":{"text":"color"},"name":"--c2-cascader__option__hover--background","default":"#f4f4f5"},{"type":{"text":"color"},"name":"--c2-cascader__option__active--background","default":"#e8f2ff"},{"type":{"text":"color"},"name":"--c2-cascader__option__active--color","default":"#18181b"},{"type":{"text":"color"},"name":"--c2-cascader__option__selected--color","default":"rgb(2, 101, 220)"},{"type":{"text":"opacity"},"name":"--c2-cascader__option__disabled--opacity","default":"0.38"},{"type":{"text":"padding"},"name":"--c2-cascader__empty--padding","default":"18px"},{"type":{"text":"color"},"name":"--c2-cascader__empty--color","default":"#71717a"}],"slots":[{"description":"Icon shown before the selected path or placeholder.","name":"prefix-icon"},{"description":"Replaces the trigger chevron.","name":"suffix-icon"},{"description":"Replaces the message shown when `options` is empty.","name":"empty"}],"members":[{"kind":"field","name":"formAssociated","type":{"text":"boolean"},"static":true,"default":"true"},{"kind":"field","name":"shadowRootOptions","type":{"text":"object"},"static":true,"default":"{ ...LitElement.shadowRootOptions, delegatesFocus: true }"},{"kind":"field","name":"internals","privacy":"private","readonly":true},{"kind":"field","name":"defaultValue","type":{"text":"string[]"},"privacy":"private","default":"[]"},{"kind":"field","name":"defaultValueCaptured","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"customValidityMessage","type":{"text":"string"},"privacy":"private","default":"''"},{"kind":"field","name":"disabledByForm","type":{"text":"boolean"},"privacy":"private","default":"false"},{"kind":"field","name":"activePath","type":{"text":"CascaderOption[]"},"privacy":"private","default":"[]"},{"kind":"field","name":"options","type":{"text":"CascaderOption[]"},"default":"[]","description":"Nested hierarchy shown in the floating panel. In markup this is a JSON array.","attribute":"options"},{"kind":"field","name":"value","type":{"text":"string[]"},"default":"[]","description":"Selected value path. In markup, separate levels with semicolons.","attribute":"value","reflects":true},{"kind":"field","name":"name","type":{"text":"string"},"default":"''","description":"Name used when the cascader participates in a form.","attribute":"name"},{"kind":"field","name":"placeholder","type":{"text":"string"},"default":"'Please select'","description":"Text shown before a path is selected.","attribute":"placeholder"},{"kind":"field","name":"separator","type":{"text":"string"},"default":"' / '","description":"String placed between selected labels in the trigger.","attribute":"separator"},{"kind":"field","name":"ariaLabel","type":{"text":"string | null"},"default":"null","description":"Accessible name forwarded to the trigger and option tree.","attribute":"aria-label"},{"kind":"field","name":"open","type":{"text":"boolean"},"default":"false","description":"Whether the floating panel is open.","attribute":"open","reflects":true},{"kind":"field","name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables opening, selection and form submission.","attribute":"disabled","reflects":true},{"kind":"field","name":"readonly","type":{"text":"boolean"},"default":"false","description":"Displays the selected path without allowing changes.","attribute":"readonly","reflects":true},{"kind":"field","name":"required","type":{"text":"boolean"},"default":"false","description":"Requires a committed path for native form validation.","attribute":"required","reflects":true},{"kind":"field","name":"changeOnSelect","type":{"text":"boolean"},"default":"false","description":"Commit branch values as they are chosen instead of waiting for a leaf.","attribute":"change-on-select"},{"kind":"field","name":"expandTrigger","type":{"text":"'click' | 'hover'"},"default":"'click'","description":"Open child columns on pointer hover instead of click.","attribute":"expand-trigger","reflects":true},{"kind":"field","name":"itemRenderer","type":{"text":"CascaderItemRenderer | undefined"},"description":"Replaces an option row's content while interaction and hierarchy controls remain owned by the cascader."},{"kind":"field","name":"trigger","type":{"text":"HTMLButtonElement"},"privacy":"public"},{"kind":"field","name":"panel","type":{"text":"Overlay"},"privacy":"public"},{"kind":"field","name":"selectedOptions","type":{"text":"CascaderOption[]"},"description":"The resolved option path for the current `value`. Invalid trailing values are omitted.","readonly":true},{"kind":"field","name":"displayValue","type":{"text":"string"},"description":"Human-readable selected path.","readonly":true},{"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":"method","name":"formResetCallback","return":{"type":{"text":"void"}}},{"kind":"method","name":"formDisabledCallback","return":{"type":{"text":"void"}},"parameters":[{"name":"disabled","type":{"text":"boolean"}}]},{"kind":"method","name":"formStateRestoreCallback","return":{"type":{"text":"void"}},"parameters":[{"name":"state","type":{"text":"string | File | FormData | null"}}]},{"kind":"method","name":"checkValidity","return":{"type":{"text":"boolean"}}},{"kind":"method","name":"reportValidity","return":{"type":{"text":"boolean"}}},{"kind":"method","name":"setCustomValidity","return":{"type":{"text":"void"}},"parameters":[{"name":"message","type":{"text":"string"}}]},{"kind":"method","name":"toggle","return":{"type":{"text":"void"}},"parameters":[{"name":"force","optional":true,"type":{"text":"boolean"}}],"description":"Opens, closes or toggles the floating panel."},{"kind":"field","name":"effectiveDisabled","type":{"text":"boolean"},"privacy":"private","readonly":true},{"kind":"method","name":"resolvePath","privacy":"private","return":{"type":{"text":"CascaderOption[]"}},"parameters":[{"name":"values","type":{"text":"string[]"}}]},{"kind":"field","name":"columns","type":{"text":"CascaderOption[][]"},"privacy":"private","readonly":true},{"kind":"method","name":"handleOverlayToggle","privacy":"private","return":{"type":{"text":"void"}},"parameters":[{"name":"event","type":{"text":"Event"}}]},{"kind":"method","name":"handleTriggerKeydown","privacy":"private","return":{"type":{"text":"void"}},"parameters":[{"name":"event","type":{"text":"KeyboardEvent"}}]},{"kind":"method","name":"optionPath","privacy":"private","return":{"type":{"text":"CascaderOption[]"}},"parameters":[{"name":"level","type":{"text":"number"}},{"name":"option","type":{"text":"CascaderOption"}}]},{"kind":"method","name":"activateOption","privacy":"private","return":{"type":{"text":"void"}},"parameters":[{"name":"level","type":{"text":"number"}},{"name":"option","type":{"text":"CascaderOption"}},{"name":"commitBranch","type":{"text":"boolean"}}]},{"kind":"method","name":"handleOptionClick","privacy":"private","return":{"type":{"text":"void"}},"parameters":[{"name":"level","type":{"text":"number"}},{"name":"option","type":{"text":"CascaderOption"}}]},{"kind":"method","name":"handleOptionPointerEnter","privacy":"private","return":{"type":{"text":"void"}},"parameters":[{"name":"level","type":{"text":"number"}},{"name":"option","type":{"text":"CascaderOption"}}]},{"kind":"method","name":"commit","privacy":"private","return":{"type":{"text":"void"}},"parameters":[{"name":"path","type":{"text":"CascaderOption[]"}},{"name":"complete","type":{"text":"boolean"}}]},{"kind":"method","name":"focusOption","privacy":"private","return":{"type":{"text":"Promise<void>"}},"parameters":[{"name":"level","type":{"text":"number"}},{"name":"index","type":{"text":"number"}}]},{"kind":"method","name":"handleOptionKeydown","privacy":"private","return":{"type":{"text":"void"}},"parameters":[{"name":"event","type":{"text":"KeyboardEvent"}},{"name":"level","type":{"text":"number"}},{"name":"option","type":{"text":"CascaderOption"}}]},{"kind":"method","name":"syncFormState","privacy":"private","return":{"type":{"text":"void"}}},{"kind":"method","name":"renderChevron","privacy":"private","return":{"type":{"text":"unknown"}}},{"kind":"method","name":"renderOption","privacy":"private","return":{"type":{"text":"unknown"}},"parameters":[{"name":"option","type":{"text":"CascaderOption"}},{"name":"level","type":{"text":"number"}}]}],"events":[{"name":"open-change","type":{"text":"CustomEvent<{ open: boolean }>"},"description":"Fired when the floating panel opens or closes."},{"name":"cascader-change","type":{"text":"CustomEvent<CascaderChangeEventDetail>"},"description":"Fired when a leaf, or a branch with `change-on-select`, is committed. Detail contains value, label and option paths plus whether the last option is a leaf."},{"name":"input","type":{"text":"Event"},"description":"Fired after `value` changes through user interaction."},{"name":"change","type":{"text":"Event"},"description":"Fired after `value` changes through user interaction."}],"attributes":[{"name":"options","type":{"text":"CascaderOption[]"},"default":"[]","description":"Nested hierarchy shown in the floating panel. In markup this is a JSON array.","fieldName":"options"},{"name":"value","type":{"text":"string[]"},"default":"[]","description":"Selected value path. In markup, separate levels with semicolons.","fieldName":"value"},{"name":"name","type":{"text":"string"},"default":"''","description":"Name used when the cascader participates in a form.","fieldName":"name"},{"name":"placeholder","type":{"text":"string"},"default":"'Please select'","description":"Text shown before a path is selected.","fieldName":"placeholder"},{"name":"separator","type":{"text":"string"},"default":"' / '","description":"String placed between selected labels in the trigger.","fieldName":"separator"},{"name":"aria-label","type":{"text":"string | null"},"default":"null","description":"Accessible name forwarded to the trigger and option tree.","fieldName":"ariaLabel"},{"name":"open","type":{"text":"boolean"},"default":"false","description":"Whether the floating panel is open.","fieldName":"open"},{"name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables opening, selection and form submission.","fieldName":"disabled"},{"name":"readonly","type":{"text":"boolean"},"default":"false","description":"Displays the selected path without allowing changes.","fieldName":"readonly"},{"name":"required","type":{"text":"boolean"},"default":"false","description":"Requires a committed path for native form validation.","fieldName":"required"},{"name":"change-on-select","type":{"text":"boolean"},"default":"false","description":"Commit branch values as they are chosen instead of waiting for a leaf.","fieldName":"changeOnSelect"},{"name":"expand-trigger","type":{"text":"'click' | 'hover'"},"default":"'click'","description":"Open child columns on pointer hover instead of click.","fieldName":"expandTrigger"}],"superclass":{"name":"LitElement","package":"lit"},"tagName":"c2-cascader","customElement":true,"internalComponents":["c2-overlay"]},{"kind":"variable","name":"complete","type":{"text":"boolean"},"default":"!option.children?.length"}],"exports":[{"kind":"js","name":"Cascader","declaration":{"name":"Cascader","module":"src/cascader.ts"}},{"kind":"custom-element-definition","name":"c2-cascader","declaration":{"name":"Cascader","module":"src/cascader.ts"}}]}]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c2n/cascader",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/cascader.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",
|
|
@@ -63,13 +64,13 @@
|
|
|
63
64
|
}
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
66
|
-
"@c2n/core": "0.0.
|
|
67
|
-
"@c2n/overlay": "0.0.
|
|
67
|
+
"@c2n/core": "0.0.13",
|
|
68
|
+
"@c2n/overlay": "0.0.13",
|
|
68
69
|
"lit": "3.3.3"
|
|
69
70
|
},
|
|
70
71
|
"devDependencies": {
|
|
71
72
|
"@c2n/config": "*"
|
|
72
73
|
},
|
|
73
74
|
"customElements": "custom-elements.json",
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "aa19b641f64fbc54c36b7649a8171d7a686abbdd"
|
|
75
76
|
}
|