@pindoba/core-accordion 0.0.0-alpha-20260426220647
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/LICENSE +12 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +4 -0
- package/dist/src/connect-accordion-item.d.ts +7 -0
- package/dist/src/connect-accordion-item.d.ts.map +1 -0
- package/dist/src/connect-accordion-item.js +54 -0
- package/dist/src/connect-accordion-item.js.map +1 -0
- package/dist/src/connect-accordion.d.ts +16 -0
- package/dist/src/connect-accordion.d.ts.map +1 -0
- package/dist/src/connect-accordion.js +41 -0
- package/dist/src/connect-accordion.js.map +1 -0
- package/dist/src/create-accordion.d.ts +7 -0
- package/dist/src/create-accordion.d.ts.map +1 -0
- package/dist/src/create-accordion.js +51 -0
- package/dist/src/create-accordion.js.map +1 -0
- package/dist/src/types.d.ts +167 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +1 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Copyright 2025 Eduardo Lopes
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
8
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
9
|
+
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
|
10
|
+
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
11
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
12
|
+
DEALINGS IN THE SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AccordionApi, AccordionBaseProps, AccordionConfig, AccordionItemApi, AccordionItemBaseProps, AccordionItemData, AccordionItemRootProps, AccordionItemSlotProps, AccordionItemValue, AccordionPassThrough, AccordionRootProps, AccordionSize, AccordionSlotPassThrough, AccordionSlots, AccordionType, ConnectAccordionItemOptions, ConnectAccordionOptions, ElementAttributes, HeadlessAccordion, PanelBackground, PanelBorder, PanelFeedback, PanelPadding, PanelRadius, PanelRadiusBottom, PanelRadiusLeft, PanelRadiusRight, PanelRadiusTop } from "./src/types.js";
|
|
2
|
+
import { createAccordion } from "./src/create-accordion.js";
|
|
3
|
+
import { accordionDefaults, connectAccordion } from "./src/connect-accordion.js";
|
|
4
|
+
import { connectAccordionItem } from "./src/connect-accordion-item.js";
|
|
5
|
+
export { type AccordionApi, type AccordionBaseProps, type AccordionConfig, type AccordionItemApi, type AccordionItemBaseProps, type AccordionItemData, type AccordionItemRootProps, type AccordionItemSlotProps, type AccordionItemValue, type AccordionPassThrough, type AccordionRootProps, type AccordionSize, type AccordionSlotPassThrough, type AccordionSlots, type AccordionType, type ConnectAccordionItemOptions, type ConnectAccordionOptions, type ElementAttributes, type HeadlessAccordion, type PanelBackground, type PanelBorder, type PanelFeedback, type PanelPadding, type PanelRadius, type PanelRadiusBottom, type PanelRadiusLeft, type PanelRadiusRight, type PanelRadiusTop, accordionDefaults, connectAccordion, connectAccordionItem, createAccordion };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createAccordion } from "./src/create-accordion.js";
|
|
2
|
+
import { accordionDefaults, connectAccordion } from "./src/connect-accordion.js";
|
|
3
|
+
import { connectAccordionItem } from "./src/connect-accordion-item.js";
|
|
4
|
+
export { accordionDefaults, connectAccordion, connectAccordionItem, createAccordion };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AccordionItemApi, ConnectAccordionItemOptions } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/connect-accordion-item.d.ts
|
|
4
|
+
declare function connectAccordionItem(options: ConnectAccordionItemOptions): AccordionItemApi;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { connectAccordionItem };
|
|
7
|
+
//# sourceMappingURL=connect-accordion-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-accordion-item.d.ts","names":[],"sources":["../../src/connect-accordion-item.ts"],"mappings":";;;iBAUgB,oBAAA,CACd,OAAA,EAAS,2BAAA,GACR,gBAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { css } from "@pindoba/styled-system/css";
|
|
2
|
+
import { accordionStyles } from "@pindoba/styles-accordion";
|
|
3
|
+
import { connectPanel } from "@pindoba/core-panel";
|
|
4
|
+
//#region src/connect-accordion-item.ts
|
|
5
|
+
function connectAccordionItem(options) {
|
|
6
|
+
const { value, disabled, open, size, passThrough, background = "surface.soft", feedback, padding = "none", radius = "md", radiusTop, radiusBottom, radiusLeft, radiusRight, border = "muted", class: className, ...rest } = options;
|
|
7
|
+
const raw = accordionStyles.raw(size != null ? { size } : {});
|
|
8
|
+
return {
|
|
9
|
+
itemProps: {
|
|
10
|
+
...connectPanel({
|
|
11
|
+
dataComponent: "accordion-item",
|
|
12
|
+
as: "details",
|
|
13
|
+
background,
|
|
14
|
+
feedback: feedback ?? "inherit",
|
|
15
|
+
padding,
|
|
16
|
+
radius,
|
|
17
|
+
radiusTop,
|
|
18
|
+
radiusBottom,
|
|
19
|
+
radiusLeft,
|
|
20
|
+
radiusRight,
|
|
21
|
+
border,
|
|
22
|
+
interactive: false,
|
|
23
|
+
passThrough: { root: {
|
|
24
|
+
style: css.raw(raw.item, passThrough?.item?.style),
|
|
25
|
+
props: { ...passThrough?.item?.props }
|
|
26
|
+
} },
|
|
27
|
+
class: className,
|
|
28
|
+
...rest
|
|
29
|
+
}).rootProps,
|
|
30
|
+
"data-component": "accordion-item",
|
|
31
|
+
"data-value": value,
|
|
32
|
+
"data-state": open ? "open" : "closed",
|
|
33
|
+
...disabled ? { "data-disabled": "" } : {}
|
|
34
|
+
},
|
|
35
|
+
triggerProps: {
|
|
36
|
+
class: css(raw.trigger, passThrough?.trigger?.style),
|
|
37
|
+
...passThrough?.trigger?.props
|
|
38
|
+
},
|
|
39
|
+
indicatorProps: {
|
|
40
|
+
class: css(raw.indicator, passThrough?.indicator?.style),
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
...passThrough?.indicator?.props
|
|
43
|
+
},
|
|
44
|
+
contentProps: {
|
|
45
|
+
class: css(raw.content, passThrough?.content?.style),
|
|
46
|
+
...passThrough?.content?.props
|
|
47
|
+
},
|
|
48
|
+
element: "details"
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { connectAccordionItem };
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=connect-accordion-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-accordion-item.js","names":[],"sources":["../../src/connect-accordion-item.ts"],"sourcesContent":["import { css } from \"@pindoba/styled-system/css\";\nimport { accordionStyles } from \"@pindoba/styles-accordion\";\nimport { connectPanel } from \"@pindoba/core-panel\";\nimport type {\n AccordionItemApi,\n AccordionItemRootProps,\n AccordionItemSlotProps,\n ConnectAccordionItemOptions,\n} from \"./types.js\";\n\nexport function connectAccordionItem(\n options: ConnectAccordionItemOptions,\n): AccordionItemApi {\n const {\n value,\n disabled,\n open,\n size,\n passThrough,\n background = \"surface.soft\",\n feedback,\n padding = \"none\",\n radius = \"md\",\n radiusTop,\n radiusBottom,\n radiusLeft,\n radiusRight,\n border = \"muted\",\n class: className,\n ...rest\n } = options;\n\n // When size is undefined the item inherits sizing via CSS variables set by\n // the accordion root — lets <Accordion size=\"sm\"> cascade without per-item props.\n const raw = accordionStyles.raw(size != null ? { size } : {});\n\n const panelApi = connectPanel({\n dataComponent: \"accordion-item\",\n as: \"details\",\n background,\n feedback: feedback ?? \"inherit\",\n padding,\n radius,\n radiusTop,\n radiusBottom,\n radiusLeft,\n radiusRight,\n border,\n interactive: false,\n passThrough: {\n root: {\n style: css.raw(raw.item, passThrough?.item?.style),\n props: {\n ...passThrough?.item?.props,\n },\n },\n },\n class: className,\n ...rest,\n });\n\n const itemProps: AccordionItemRootProps = {\n ...(panelApi.rootProps as AccordionItemRootProps),\n \"data-component\": \"accordion-item\",\n \"data-value\": value,\n \"data-state\": open ? \"open\" : \"closed\",\n ...(disabled ? { \"data-disabled\": \"\" } : {}),\n };\n\n const triggerProps: AccordionItemSlotProps = {\n class: css(raw.trigger, passThrough?.trigger?.style),\n ...passThrough?.trigger?.props,\n };\n\n const indicatorProps: AccordionItemSlotProps = {\n class: css(raw.indicator, passThrough?.indicator?.style),\n \"aria-hidden\": \"true\",\n ...passThrough?.indicator?.props,\n };\n\n const contentProps: AccordionItemSlotProps = {\n class: css(raw.content, passThrough?.content?.style),\n ...passThrough?.content?.props,\n };\n\n return {\n itemProps,\n triggerProps,\n indicatorProps,\n contentProps,\n element: \"details\",\n };\n}\n"],"mappings":";;;;AAUA,SAAgB,qBACd,SACkB;CAClB,MAAM,EACJ,OACA,UACA,MACA,MACA,aACA,aAAa,gBACb,UACA,UAAU,QACV,SAAS,MACT,WACA,cACA,YACA,aACA,SAAS,SACT,OAAO,WACP,GAAG,SACD;CAIJ,MAAM,MAAM,gBAAgB,IAAI,QAAQ,OAAO,EAAE,MAAM,GAAG,EAAE,CAAC;AAmD7D,QAAO;EACL,WAAA;GAxBA,GA1Be,aAAa;IAC5B,eAAe;IACf,IAAI;IACJ;IACA,UAAU,YAAY;IACtB;IACA;IACA;IACA;IACA;IACA;IACA;IACA,aAAa;IACb,aAAa,EACX,MAAM;KACJ,OAAO,IAAI,IAAI,IAAI,MAAM,aAAa,MAAM,MAAM;KAClD,OAAO,EACL,GAAG,aAAa,MAAM,OACvB;KACF,EACF;IACD,OAAO;IACP,GAAG;IACJ,CAGa,CAAC;GACb,kBAAkB;GAClB,cAAc;GACd,cAAc,OAAO,SAAS;GAC9B,GAAI,WAAW,EAAE,iBAAiB,IAAI,GAAG,EAAE;GAoBlC;EACT,cAAA;GAjBA,OAAO,IAAI,IAAI,SAAS,aAAa,SAAS,MAAM;GACpD,GAAG,aAAa,SAAS;GAgBb;EACZ,gBAAA;GAbA,OAAO,IAAI,IAAI,WAAW,aAAa,WAAW,MAAM;GACxD,eAAe;GACf,GAAG,aAAa,WAAW;GAWb;EACd,cAAA;GARA,OAAO,IAAI,IAAI,SAAS,aAAa,SAAS,MAAM;GACpD,GAAG,aAAa,SAAS;GAOb;EACZ,SAAS;EACV"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AccordionApi, ConnectAccordionOptions } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/connect-accordion.d.ts
|
|
4
|
+
declare const accordionDefaults: {
|
|
5
|
+
readonly type: "single";
|
|
6
|
+
readonly collapsible: true;
|
|
7
|
+
readonly size: "md";
|
|
8
|
+
readonly background: "surface.soft";
|
|
9
|
+
readonly padding: "none";
|
|
10
|
+
readonly radius: "sm";
|
|
11
|
+
readonly border: "muted";
|
|
12
|
+
};
|
|
13
|
+
declare function connectAccordion(options?: ConnectAccordionOptions): AccordionApi;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { accordionDefaults, connectAccordion };
|
|
16
|
+
//# sourceMappingURL=connect-accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-accordion.d.ts","names":[],"sources":["../../src/connect-accordion.ts"],"mappings":";;;cAUa,iBAAA;EAAA;;;;;;;;iBAUG,gBAAA,CACd,OAAA,GAAS,uBAAA,GACR,YAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { css } from "@pindoba/styled-system/css";
|
|
2
|
+
import { accordionStyles } from "@pindoba/styles-accordion";
|
|
3
|
+
//#region src/connect-accordion.ts
|
|
4
|
+
const accordionDefaults = {
|
|
5
|
+
type: "single",
|
|
6
|
+
collapsible: true,
|
|
7
|
+
size: "md",
|
|
8
|
+
background: "surface.soft",
|
|
9
|
+
padding: "none",
|
|
10
|
+
radius: "sm",
|
|
11
|
+
border: "muted"
|
|
12
|
+
};
|
|
13
|
+
function connectAccordion(options = {}) {
|
|
14
|
+
const { type = accordionDefaults.type, size = accordionDefaults.size, disabled, passThrough, class: className, feedback, collapsible: _collapsible, value: _value, defaultValue: _defaultValue, onValueChange: _onValueChange, background: _background, padding: _padding, radius: _radius, radiusTop: _radiusTop, radiusBottom: _radiusBottom, radiusLeft: _radiusLeft, radiusRight: _radiusRight, border: _border, ...rest } = options;
|
|
15
|
+
const raw = accordionStyles.raw({ size });
|
|
16
|
+
const classes = {
|
|
17
|
+
root: css(raw.root),
|
|
18
|
+
item: css(raw.item),
|
|
19
|
+
trigger: css(raw.trigger),
|
|
20
|
+
indicator: css(raw.indicator),
|
|
21
|
+
content: css(raw.content)
|
|
22
|
+
};
|
|
23
|
+
const userClass = className != null ? String(className) : void 0;
|
|
24
|
+
const generatedRoot = css(raw.root, { colorPalette: feedback ?? "neutral" }, passThrough?.root?.style);
|
|
25
|
+
return {
|
|
26
|
+
rootProps: {
|
|
27
|
+
...rest,
|
|
28
|
+
...passThrough?.root?.props,
|
|
29
|
+
"data-component": "accordion",
|
|
30
|
+
"data-type": type,
|
|
31
|
+
...disabled ? { "data-disabled": "" } : {},
|
|
32
|
+
class: userClass ? `${generatedRoot} ${userClass}` : generatedRoot
|
|
33
|
+
},
|
|
34
|
+
classes,
|
|
35
|
+
element: "div"
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { accordionDefaults, connectAccordion };
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=connect-accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect-accordion.js","names":[],"sources":["../../src/connect-accordion.ts"],"sourcesContent":["import { css } from \"@pindoba/styled-system/css\";\nimport { accordionStyles } from \"@pindoba/styles-accordion\";\nimport type {\n AccordionApi,\n AccordionBaseProps,\n AccordionRootProps,\n AccordionSlots,\n ConnectAccordionOptions,\n} from \"./types.js\";\n\nexport const accordionDefaults = {\n type: \"single\",\n collapsible: true,\n size: \"md\",\n background: \"surface.soft\",\n padding: \"none\",\n radius: \"sm\",\n border: \"muted\",\n} as const satisfies Partial<AccordionBaseProps>;\n\nexport function connectAccordion(\n options: ConnectAccordionOptions = {},\n): AccordionApi {\n const {\n type = accordionDefaults.type,\n size = accordionDefaults.size,\n disabled,\n passThrough,\n class: className,\n feedback,\n // Consumed by the framework layer / connectAccordionItem, not on root:\n collapsible: _collapsible,\n value: _value,\n defaultValue: _defaultValue,\n onValueChange: _onValueChange,\n background: _background,\n padding: _padding,\n radius: _radius,\n radiusTop: _radiusTop,\n radiusBottom: _radiusBottom,\n radiusLeft: _radiusLeft,\n radiusRight: _radiusRight,\n border: _border,\n ...rest\n } = options;\n\n const raw = accordionStyles.raw({ size });\n const classes: Record<AccordionSlots, string> = {\n root: css(raw.root),\n item: css(raw.item),\n trigger: css(raw.trigger),\n indicator: css(raw.indicator),\n content: css(raw.content),\n };\n\n const userClass = className != null ? String(className) : undefined;\n const generatedRoot = css(\n raw.root,\n { colorPalette: feedback ?? \"neutral\" },\n passThrough?.root?.style,\n );\n\n const rootProps: AccordionRootProps = {\n ...rest,\n ...passThrough?.root?.props,\n \"data-component\": \"accordion\",\n \"data-type\": type,\n ...(disabled ? { \"data-disabled\": \"\" } : {}),\n class: userClass ? `${generatedRoot} ${userClass}` : generatedRoot,\n };\n\n return {\n rootProps,\n classes,\n element: \"div\",\n };\n}\n"],"mappings":";;;AAUA,MAAa,oBAAoB;CAC/B,MAAM;CACN,aAAa;CACb,MAAM;CACN,YAAY;CACZ,SAAS;CACT,QAAQ;CACR,QAAQ;CACT;AAED,SAAgB,iBACd,UAAmC,EAAE,EACvB;CACd,MAAM,EACJ,OAAO,kBAAkB,MACzB,OAAO,kBAAkB,MACzB,UACA,aACA,OAAO,WACP,UAEA,aAAa,cACb,OAAO,QACP,cAAc,eACd,eAAe,gBACf,YAAY,aACZ,SAAS,UACT,QAAQ,SACR,WAAW,YACX,cAAc,eACd,YAAY,aACZ,aAAa,cACb,QAAQ,SACR,GAAG,SACD;CAEJ,MAAM,MAAM,gBAAgB,IAAI,EAAE,MAAM,CAAC;CACzC,MAAM,UAA0C;EAC9C,MAAM,IAAI,IAAI,KAAK;EACnB,MAAM,IAAI,IAAI,KAAK;EACnB,SAAS,IAAI,IAAI,QAAQ;EACzB,WAAW,IAAI,IAAI,UAAU;EAC7B,SAAS,IAAI,IAAI,QAAQ;EAC1B;CAED,MAAM,YAAY,aAAa,OAAO,OAAO,UAAU,GAAG,KAAA;CAC1D,MAAM,gBAAgB,IACpB,IAAI,MACJ,EAAE,cAAc,YAAY,WAAW,EACvC,aAAa,MAAM,MACpB;AAWD,QAAO;EACL,WAAA;GATA,GAAG;GACH,GAAG,aAAa,MAAM;GACtB,kBAAkB;GAClB,aAAa;GACb,GAAI,WAAW,EAAE,iBAAiB,IAAI,GAAG,EAAE;GAC3C,OAAO,YAAY,GAAG,cAAc,GAAG,cAAc;GAI5C;EACT;EACA,SAAS;EACV"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AccordionConfig, HeadlessAccordion } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/create-accordion.d.ts
|
|
4
|
+
declare function createAccordion(config?: AccordionConfig): HeadlessAccordion;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { createAccordion };
|
|
7
|
+
//# sourceMappingURL=create-accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-accordion.d.ts","names":[],"sources":["../../src/create-accordion.ts"],"mappings":";;;iBAOgB,eAAA,CACd,MAAA,GAAQ,eAAA,GACP,iBAAA"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { atom } from "nanostores";
|
|
2
|
+
//#region src/create-accordion.ts
|
|
3
|
+
function createAccordion(config = {}) {
|
|
4
|
+
function cfg(key) {
|
|
5
|
+
return config[key];
|
|
6
|
+
}
|
|
7
|
+
const $value = atom([...cfg("value") ?? cfg("defaultValue") ?? []]);
|
|
8
|
+
function setValue(next) {
|
|
9
|
+
const prev = $value.get();
|
|
10
|
+
if (prev.length === next.length && prev.every((v, i) => v === next[i])) return;
|
|
11
|
+
$value.set(next);
|
|
12
|
+
cfg("onValueChange")?.([...next]);
|
|
13
|
+
}
|
|
14
|
+
function isExpanded(value) {
|
|
15
|
+
return $value.get().includes(value);
|
|
16
|
+
}
|
|
17
|
+
function expand(value) {
|
|
18
|
+
if (cfg("disabled")) return;
|
|
19
|
+
const current = $value.get();
|
|
20
|
+
const type = cfg("type") ?? "single";
|
|
21
|
+
if (current.includes(value)) return;
|
|
22
|
+
setValue(type === "single" ? [value] : [...current, value]);
|
|
23
|
+
}
|
|
24
|
+
function collapse(value) {
|
|
25
|
+
if (cfg("disabled")) return;
|
|
26
|
+
const current = $value.get();
|
|
27
|
+
if (!current.includes(value)) return;
|
|
28
|
+
const type = cfg("type") ?? "single";
|
|
29
|
+
const collapsible = cfg("collapsible") ?? true;
|
|
30
|
+
if (type === "single" && !collapsible && current.length === 1) return;
|
|
31
|
+
setValue(current.filter((v) => v !== value));
|
|
32
|
+
}
|
|
33
|
+
function toggle(value) {
|
|
34
|
+
if (isExpanded(value)) collapse(value);
|
|
35
|
+
else expand(value);
|
|
36
|
+
}
|
|
37
|
+
function destroy() {}
|
|
38
|
+
return {
|
|
39
|
+
$value,
|
|
40
|
+
toggle,
|
|
41
|
+
expand,
|
|
42
|
+
collapse,
|
|
43
|
+
isExpanded,
|
|
44
|
+
setValue,
|
|
45
|
+
destroy
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { createAccordion };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=create-accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-accordion.js","names":[],"sources":["../../src/create-accordion.ts"],"sourcesContent":["import { atom } from \"nanostores\";\nimport type {\n AccordionConfig,\n AccordionItemValue,\n HeadlessAccordion,\n} from \"./types.js\";\n\nexport function createAccordion(\n config: AccordionConfig = {},\n): HeadlessAccordion {\n function cfg<K extends keyof AccordionConfig>(key: K): AccordionConfig[K] {\n return config[key];\n }\n\n const initial = cfg(\"value\") ?? cfg(\"defaultValue\") ?? [];\n const $value = atom<AccordionItemValue[]>([...initial]);\n\n // External controlled value changes are pushed in via setValue().\n function setValue(next: AccordionItemValue[]) {\n const prev = $value.get();\n if (prev.length === next.length && prev.every((v, i) => v === next[i])) {\n return;\n }\n $value.set(next);\n cfg(\"onValueChange\")?.([...next]);\n }\n\n function isExpanded(value: AccordionItemValue) {\n return $value.get().includes(value);\n }\n\n function expand(value: AccordionItemValue) {\n if (cfg(\"disabled\")) return;\n const current = $value.get();\n const type = cfg(\"type\") ?? \"single\";\n if (current.includes(value)) return;\n const next = type === \"single\" ? [value] : [...current, value];\n setValue(next);\n }\n\n function collapse(value: AccordionItemValue) {\n if (cfg(\"disabled\")) return;\n const current = $value.get();\n if (!current.includes(value)) return;\n const type = cfg(\"type\") ?? \"single\";\n const collapsible = cfg(\"collapsible\") ?? true;\n // In single mode with collapsible=false, prevent closing the last open item.\n if (type === \"single\" && !collapsible && current.length === 1) return;\n setValue(current.filter((v) => v !== value));\n }\n\n function toggle(value: AccordionItemValue) {\n if (isExpanded(value)) {\n collapse(value);\n } else {\n expand(value);\n }\n }\n\n function destroy() {\n // No listeners to detach; atom will be garbage collected with the host.\n }\n\n return {\n $value,\n toggle,\n expand,\n collapse,\n isExpanded,\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@@
|
|
|
1
|
+
import { WritableAtom } from "nanostores";
|
|
2
|
+
import { AccordionSlots, AccordionStyleProps } from "@pindoba/styles-accordion";
|
|
3
|
+
import { ElementAttributes, ElementAttributes as ElementAttributes$1, PanelBackground, PanelBackground as PanelBackground$1, PanelBorder, PanelBorder as PanelBorder$1, PanelFeedback, PanelFeedback as PanelFeedback$1, PanelPadding, PanelPadding as PanelPadding$1, PanelRadius, PanelRadius as PanelRadius$1, PanelRadiusBottom, PanelRadiusBottom as PanelRadiusBottom$1, PanelRadiusLeft, PanelRadiusLeft as PanelRadiusLeft$1, PanelRadiusRight, PanelRadiusRight as PanelRadiusRight$1, PanelRadiusTop, PanelRadiusTop as PanelRadiusTop$1 } from "@pindoba/core-panel";
|
|
4
|
+
import { SystemStyleObject } from "@pindoba/styled-system/types";
|
|
5
|
+
|
|
6
|
+
//#region src/types.d.ts
|
|
7
|
+
type AccordionSize = NonNullable<AccordionStyleProps["size"]>;
|
|
8
|
+
type AccordionType = "single" | "multiple";
|
|
9
|
+
type AccordionItemValue = string;
|
|
10
|
+
/**
|
|
11
|
+
* Metadata for rendering an accordion item via the `items` prop on
|
|
12
|
+
* `<Accordion>`. Body content is provided framework-idiomatically by the
|
|
13
|
+
* consumer — named slots in Astro (`<Fragment slot="<value>">`) or named
|
|
14
|
+
* snippets in Svelte (`{#snippet <value>()}...{/snippet}`). For rich
|
|
15
|
+
* *trigger* content (Stamps, badges, icons), fall back to slot composition
|
|
16
|
+
* with `<AccordionItem>` directly.
|
|
17
|
+
*/
|
|
18
|
+
interface AccordionItemData {
|
|
19
|
+
value: AccordionItemValue;
|
|
20
|
+
title?: string;
|
|
21
|
+
subtitle?: string;
|
|
22
|
+
open?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
size?: AccordionSize;
|
|
25
|
+
background?: PanelBackground$1;
|
|
26
|
+
feedback?: PanelFeedback$1;
|
|
27
|
+
padding?: PanelPadding$1;
|
|
28
|
+
radius?: PanelRadius$1;
|
|
29
|
+
radiusTop?: PanelRadiusTop$1;
|
|
30
|
+
radiusBottom?: PanelRadiusBottom$1;
|
|
31
|
+
radiusLeft?: PanelRadiusLeft$1;
|
|
32
|
+
radiusRight?: PanelRadiusRight$1;
|
|
33
|
+
border?: PanelBorder$1;
|
|
34
|
+
}
|
|
35
|
+
interface AccordionSlotPassThrough<T = ElementAttributes$1> {
|
|
36
|
+
style?: SystemStyleObject;
|
|
37
|
+
props?: T;
|
|
38
|
+
}
|
|
39
|
+
interface AccordionPassThrough<RootElementAttributes = ElementAttributes$1, ItemElementAttributes = ElementAttributes$1, TriggerElementAttributes = ElementAttributes$1, IndicatorElementAttributes = ElementAttributes$1, ContentElementAttributes = ElementAttributes$1> {
|
|
40
|
+
root?: AccordionSlotPassThrough<RootElementAttributes>;
|
|
41
|
+
item?: AccordionSlotPassThrough<ItemElementAttributes>;
|
|
42
|
+
trigger?: AccordionSlotPassThrough<TriggerElementAttributes>;
|
|
43
|
+
indicator?: AccordionSlotPassThrough<IndicatorElementAttributes>;
|
|
44
|
+
content?: AccordionSlotPassThrough<ContentElementAttributes>;
|
|
45
|
+
}
|
|
46
|
+
interface AccordionBaseProps<RootElementAttributes = ElementAttributes$1, ItemElementAttributes = ElementAttributes$1, TriggerElementAttributes = ElementAttributes$1, IndicatorElementAttributes = ElementAttributes$1, ContentElementAttributes = ElementAttributes$1> {
|
|
47
|
+
/**
|
|
48
|
+
* Expansion behavior. `single` allows one item open at a time;
|
|
49
|
+
* `multiple` allows any number.
|
|
50
|
+
* @default "single"
|
|
51
|
+
*/
|
|
52
|
+
type?: AccordionType;
|
|
53
|
+
/**
|
|
54
|
+
* In `single` mode, allow the open item to be collapsed back to nothing.
|
|
55
|
+
* @default true
|
|
56
|
+
*/
|
|
57
|
+
collapsible?: boolean;
|
|
58
|
+
/** Controlled expanded values. */
|
|
59
|
+
value?: AccordionItemValue[];
|
|
60
|
+
/** Uncontrolled initial expanded values. */
|
|
61
|
+
defaultValue?: AccordionItemValue[];
|
|
62
|
+
/** Fired when the expanded set changes. */
|
|
63
|
+
onValueChange?: (value: AccordionItemValue[]) => void;
|
|
64
|
+
/** Disable the entire accordion. */
|
|
65
|
+
disabled?: boolean;
|
|
66
|
+
size?: AccordionSize;
|
|
67
|
+
background?: PanelBackground$1;
|
|
68
|
+
feedback?: PanelFeedback$1;
|
|
69
|
+
padding?: PanelPadding$1;
|
|
70
|
+
radius?: PanelRadius$1;
|
|
71
|
+
radiusTop?: PanelRadiusTop$1;
|
|
72
|
+
radiusBottom?: PanelRadiusBottom$1;
|
|
73
|
+
radiusLeft?: PanelRadiusLeft$1;
|
|
74
|
+
radiusRight?: PanelRadiusRight$1;
|
|
75
|
+
border?: PanelBorder$1;
|
|
76
|
+
/**
|
|
77
|
+
* When provided, `<Accordion>` renders one `<AccordionItem>` per entry,
|
|
78
|
+
* applying root-level style props as defaults and letting each entry
|
|
79
|
+
* override them. Mutually exclusive with slot children (items wins,
|
|
80
|
+
* slot is ignored with a console warning in dev).
|
|
81
|
+
*/
|
|
82
|
+
items?: AccordionItemData[];
|
|
83
|
+
passThrough?: AccordionPassThrough<RootElementAttributes, ItemElementAttributes, TriggerElementAttributes, IndicatorElementAttributes, ContentElementAttributes>;
|
|
84
|
+
}
|
|
85
|
+
interface AccordionItemBaseProps<ItemElementAttributes = ElementAttributes$1, TriggerElementAttributes = ElementAttributes$1, IndicatorElementAttributes = ElementAttributes$1, ContentElementAttributes = ElementAttributes$1> {
|
|
86
|
+
/** Unique value used to track the item in the accordion. */
|
|
87
|
+
value: AccordionItemValue;
|
|
88
|
+
/** Whether this item is disabled. */
|
|
89
|
+
disabled?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the item is open. Only honored when rendering outside an accordion root
|
|
92
|
+
* (e.g. standalone <details>).
|
|
93
|
+
*/
|
|
94
|
+
open?: boolean;
|
|
95
|
+
passThrough?: {
|
|
96
|
+
item?: AccordionSlotPassThrough<ItemElementAttributes>;
|
|
97
|
+
trigger?: AccordionSlotPassThrough<TriggerElementAttributes>;
|
|
98
|
+
indicator?: AccordionSlotPassThrough<IndicatorElementAttributes>;
|
|
99
|
+
content?: AccordionSlotPassThrough<ContentElementAttributes>;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
interface ConnectAccordionOptions extends Partial<AccordionBaseProps<object, object, object, object, object>> {
|
|
103
|
+
class?: unknown;
|
|
104
|
+
}
|
|
105
|
+
interface AccordionRootProps {
|
|
106
|
+
class: string;
|
|
107
|
+
"data-component": "accordion";
|
|
108
|
+
"data-type": AccordionType;
|
|
109
|
+
[key: string]: unknown;
|
|
110
|
+
}
|
|
111
|
+
interface AccordionApi {
|
|
112
|
+
rootProps: AccordionRootProps;
|
|
113
|
+
classes: Record<AccordionSlots, string>;
|
|
114
|
+
element: "div";
|
|
115
|
+
}
|
|
116
|
+
interface ConnectAccordionItemOptions extends Partial<AccordionItemBaseProps<object, object, object, object>> {
|
|
117
|
+
size?: AccordionSize;
|
|
118
|
+
background?: PanelBackground$1;
|
|
119
|
+
feedback?: PanelFeedback$1;
|
|
120
|
+
padding?: PanelPadding$1;
|
|
121
|
+
radius?: PanelRadius$1;
|
|
122
|
+
radiusTop?: PanelRadiusTop$1;
|
|
123
|
+
radiusBottom?: PanelRadiusBottom$1;
|
|
124
|
+
radiusLeft?: PanelRadiusLeft$1;
|
|
125
|
+
radiusRight?: PanelRadiusRight$1;
|
|
126
|
+
border?: PanelBorder$1;
|
|
127
|
+
class?: unknown;
|
|
128
|
+
}
|
|
129
|
+
interface AccordionItemRootProps {
|
|
130
|
+
class: string;
|
|
131
|
+
"data-component": "accordion-item";
|
|
132
|
+
"data-value": string;
|
|
133
|
+
"data-state": "open" | "closed";
|
|
134
|
+
[key: string]: unknown;
|
|
135
|
+
}
|
|
136
|
+
interface AccordionItemSlotProps {
|
|
137
|
+
class: string;
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
}
|
|
140
|
+
interface AccordionItemApi {
|
|
141
|
+
itemProps: AccordionItemRootProps;
|
|
142
|
+
triggerProps: AccordionItemSlotProps;
|
|
143
|
+
indicatorProps: AccordionItemSlotProps;
|
|
144
|
+
contentProps: AccordionItemSlotProps;
|
|
145
|
+
/** Rendered as a native <details> element by default. */
|
|
146
|
+
element: "details";
|
|
147
|
+
}
|
|
148
|
+
interface AccordionConfig {
|
|
149
|
+
type?: AccordionType;
|
|
150
|
+
collapsible?: boolean;
|
|
151
|
+
value?: AccordionItemValue[];
|
|
152
|
+
defaultValue?: AccordionItemValue[];
|
|
153
|
+
disabled?: boolean;
|
|
154
|
+
onValueChange?: (value: AccordionItemValue[]) => void;
|
|
155
|
+
}
|
|
156
|
+
interface HeadlessAccordion {
|
|
157
|
+
$value: WritableAtom<AccordionItemValue[]>;
|
|
158
|
+
toggle: (value: AccordionItemValue) => void;
|
|
159
|
+
expand: (value: AccordionItemValue) => void;
|
|
160
|
+
collapse: (value: AccordionItemValue) => void;
|
|
161
|
+
isExpanded: (value: AccordionItemValue) => boolean;
|
|
162
|
+
setValue: (value: AccordionItemValue[]) => void;
|
|
163
|
+
destroy: () => void;
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { AccordionApi, AccordionBaseProps, AccordionConfig, AccordionItemApi, AccordionItemBaseProps, AccordionItemData, AccordionItemRootProps, AccordionItemSlotProps, AccordionItemValue, AccordionPassThrough, AccordionRootProps, AccordionSize, AccordionSlotPassThrough, type AccordionSlots, AccordionType, ConnectAccordionItemOptions, ConnectAccordionOptions, type ElementAttributes, HeadlessAccordion, type PanelBackground, type PanelBorder, type PanelFeedback, type PanelPadding, type PanelRadius, type PanelRadiusBottom, type PanelRadiusLeft, type PanelRadiusRight, type PanelRadiusTop };
|
|
167
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;;;;;KAoCY,aAAA,GAAgB,WAAA,CAAY,mBAAA;AAAA,KAC5B,aA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AW,sBAAA;EACX,YAAA,EAAc,sBAAA;EACd,cAAA,EAAgB,sBAAA;EAChB,YAAA,EAAc,sBAAA;EAvGL;EAyGT,OAAA;AAAA;AAAA,UAKe,eAAA;EACf,IAAA,GAAO,aAAA;EACP,WAAA;EACA,KAAA,GAAQ,kBAAA;EACR,YAAA,GAAe,kBAAA;EACf,QAAA;EACA,aAAA,IAAiB,KAAA,EAAO,kBAAA;AAAA;AAAA,UAGT,iBAAA;EACf,MAAA,EAAQ,YAAA,CAAa,kBAAA;EACrB,MAAA,GAAS,KAAA,EAAO,kBAAA;EAChB,MAAA,GAAS,KAAA,EAAO,kBAAA;EAChB,QAAA,GAAW,KAAA,EAAO,kBAAA;EAClB,UAAA,GAAa,KAAA,EAAO,kBAAA;EACpB,QAAA,GAAW,KAAA,EAAO,kBAAA;EAClB,OAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pindoba/core-accordion",
|
|
3
|
+
"version": "0.0.0-alpha-20260426220647",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./*": {
|
|
15
|
+
"types": "./dist/src/*.d.ts",
|
|
16
|
+
"import": "./dist/src/*.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"nanostores": "^1.3.0",
|
|
24
|
+
"@pindoba/core-panel": "0.0.0-alpha-20260426220647",
|
|
25
|
+
"@pindoba/styled-system": "0.0.0-alpha-20260426220647",
|
|
26
|
+
"@pindoba/styles-panel": "0.0.0-alpha-20260426220647",
|
|
27
|
+
"@pindoba/styles-accordion": "0.0.0-alpha-20260426220647"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"tsdown": "^0.21.10",
|
|
31
|
+
"typescript": "^6.0.3"
|
|
32
|
+
},
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsdown",
|
|
35
|
+
"dev": "tsdown --watch",
|
|
36
|
+
"clean": "rm -rf dist && rm -rf node_modules && rm -rf .turbo"
|
|
37
|
+
}
|
|
38
|
+
}
|