@peektravel/app-utilities 0.5.3 → 0.5.4
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/dist/ui/index.cjs +9 -0
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +10 -1
- package/dist/ui/index.d.ts +10 -1
- package/dist/ui/index.js +9 -0
- package/dist/ui/index.js.map +1 -1
- package/docs/ui.md +4 -4
- package/package.json +1 -1
package/dist/ui/index.d.cts
CHANGED
|
@@ -858,7 +858,9 @@ interface OdyCheckboxOption {
|
|
|
858
858
|
* indeterminate when some are, and toggling it selects/clears every child.
|
|
859
859
|
*
|
|
860
860
|
* Attributes:
|
|
861
|
-
* - `options` — JSON array, e.g. `options='[{"label":"A","value":"a"}]'`.
|
|
861
|
+
* - `options` — JSON array, e.g. `options='[{"label":"A","value":"a"}]'`. Also
|
|
862
|
+
* a settable JS property ({@link options}): `el.options = [...]` mirrors
|
|
863
|
+
* `<ody-dropdown-*>` and writes the JSON attribute.
|
|
862
864
|
* - `value` — comma-separated selected values (also a JS array property,
|
|
863
865
|
* {@link value}).
|
|
864
866
|
* - `select-all-label` — when present, renders the parent select-all row.
|
|
@@ -875,6 +877,13 @@ declare class OdyCheckboxGroup extends OdyElement {
|
|
|
875
877
|
set value(next: string[]);
|
|
876
878
|
/** Parsed `options`; malformed JSON yields an empty list. */
|
|
877
879
|
get options(): OdyCheckboxOption[];
|
|
880
|
+
/**
|
|
881
|
+
* Accepts an array of `{ label, value }` and stores it as the JSON `options`
|
|
882
|
+
* attribute. Mirrors `<ody-dropdown-*>` so `el.options = [...]` works across
|
|
883
|
+
* the data-driven elements. `options` is observed, so this triggers a
|
|
884
|
+
* re-render via `attributeChangedCallback`.
|
|
885
|
+
*/
|
|
886
|
+
set options(next: OdyCheckboxOption[]);
|
|
878
887
|
protected render(): void;
|
|
879
888
|
}
|
|
880
889
|
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -858,7 +858,9 @@ interface OdyCheckboxOption {
|
|
|
858
858
|
* indeterminate when some are, and toggling it selects/clears every child.
|
|
859
859
|
*
|
|
860
860
|
* Attributes:
|
|
861
|
-
* - `options` — JSON array, e.g. `options='[{"label":"A","value":"a"}]'`.
|
|
861
|
+
* - `options` — JSON array, e.g. `options='[{"label":"A","value":"a"}]'`. Also
|
|
862
|
+
* a settable JS property ({@link options}): `el.options = [...]` mirrors
|
|
863
|
+
* `<ody-dropdown-*>` and writes the JSON attribute.
|
|
862
864
|
* - `value` — comma-separated selected values (also a JS array property,
|
|
863
865
|
* {@link value}).
|
|
864
866
|
* - `select-all-label` — when present, renders the parent select-all row.
|
|
@@ -875,6 +877,13 @@ declare class OdyCheckboxGroup extends OdyElement {
|
|
|
875
877
|
set value(next: string[]);
|
|
876
878
|
/** Parsed `options`; malformed JSON yields an empty list. */
|
|
877
879
|
get options(): OdyCheckboxOption[];
|
|
880
|
+
/**
|
|
881
|
+
* Accepts an array of `{ label, value }` and stores it as the JSON `options`
|
|
882
|
+
* attribute. Mirrors `<ody-dropdown-*>` so `el.options = [...]` works across
|
|
883
|
+
* the data-driven elements. `options` is observed, so this triggers a
|
|
884
|
+
* re-render via `attributeChangedCallback`.
|
|
885
|
+
*/
|
|
886
|
+
set options(next: OdyCheckboxOption[]);
|
|
878
887
|
protected render(): void;
|
|
879
888
|
}
|
|
880
889
|
|
package/dist/ui/index.js
CHANGED
|
@@ -1992,6 +1992,15 @@ var OdyCheckboxGroup = class extends OdyElement {
|
|
|
1992
1992
|
get options() {
|
|
1993
1993
|
return parseOptions2(this.attr("options"));
|
|
1994
1994
|
}
|
|
1995
|
+
/**
|
|
1996
|
+
* Accepts an array of `{ label, value }` and stores it as the JSON `options`
|
|
1997
|
+
* attribute. Mirrors `<ody-dropdown-*>` so `el.options = [...]` works across
|
|
1998
|
+
* the data-driven elements. `options` is observed, so this triggers a
|
|
1999
|
+
* re-render via `attributeChangedCallback`.
|
|
2000
|
+
*/
|
|
2001
|
+
set options(next) {
|
|
2002
|
+
this.setAttribute("options", JSON.stringify(Array.isArray(next) ? next : []));
|
|
2003
|
+
}
|
|
1995
2004
|
render() {
|
|
1996
2005
|
const size = this.attr("size", "small");
|
|
1997
2006
|
const isDisabled = this.flag("disabled");
|