@reactzero/combo 0.1.0
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/CHANGELOG.md +31 -0
- package/LICENSE +21 -0
- package/README.md +188 -0
- package/dist/Combo-Cx3kSkop.cjs +2 -0
- package/dist/Combo-Cx3kSkop.cjs.map +1 -0
- package/dist/Combo-qs6_L512.js +439 -0
- package/dist/Combo-qs6_L512.js.map +1 -0
- package/dist/components/Combo.d.ts +71 -0
- package/dist/components/Combo.d.ts.map +1 -0
- package/dist/components/LiveRegion.d.ts +7 -0
- package/dist/components/LiveRegion.d.ts.map +1 -0
- package/dist/components/Portal.d.ts +8 -0
- package/dist/components/Portal.d.ts.map +1 -0
- package/dist/components/slots/CheckboxItem.d.ts +38 -0
- package/dist/components/slots/CheckboxItem.d.ts.map +1 -0
- package/dist/components/slots/CustomItem.d.ts +35 -0
- package/dist/components/slots/CustomItem.d.ts.map +1 -0
- package/dist/components/slots/FooterActions.d.ts +42 -0
- package/dist/components/slots/FooterActions.d.ts.map +1 -0
- package/dist/components/slots/GroupSeparator.d.ts +30 -0
- package/dist/components/slots/GroupSeparator.d.ts.map +1 -0
- package/dist/components/slots/index.d.ts +9 -0
- package/dist/components/slots/index.d.ts.map +1 -0
- package/dist/components/tabs/TabbedCombo.d.ts +45 -0
- package/dist/components/tabs/TabbedCombo.d.ts.map +1 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/core/announce.d.ts +10 -0
- package/dist/core/announce.d.ts.map +1 -0
- package/dist/core/ids.d.ts +13 -0
- package/dist/core/ids.d.ts.map +1 -0
- package/dist/core/keyboard.d.ts +13 -0
- package/dist/core/keyboard.d.ts.map +1 -0
- package/dist/core/scroll.d.ts +5 -0
- package/dist/core/scroll.d.ts.map +1 -0
- package/dist/core/stateMachine.d.ts +32 -0
- package/dist/core/stateMachine.d.ts.map +1 -0
- package/dist/core/utils.d.ts +26 -0
- package/dist/core/utils.d.ts.map +1 -0
- package/dist/defaults-iFGq2Q-7.cjs +2 -0
- package/dist/defaults-iFGq2Q-7.cjs.map +1 -0
- package/dist/defaults-rhC5DFTg.js +53 -0
- package/dist/defaults-rhC5DFTg.js.map +1 -0
- package/dist/entries/hook-bare.d.ts +4 -0
- package/dist/entries/hook-bare.d.ts.map +1 -0
- package/dist/entries/hook.d.ts +4 -0
- package/dist/entries/hook.d.ts.map +1 -0
- package/dist/entries/icons.d.ts +4 -0
- package/dist/entries/icons.d.ts.map +1 -0
- package/dist/entries/index.d.ts +9 -0
- package/dist/entries/index.d.ts.map +1 -0
- package/dist/entries/position.d.ts +3 -0
- package/dist/entries/position.d.ts.map +1 -0
- package/dist/entries/slots.d.ts +9 -0
- package/dist/entries/slots.d.ts.map +1 -0
- package/dist/entries/tabs.d.ts +4 -0
- package/dist/entries/tabs.d.ts.map +1 -0
- package/dist/hook-bare.cjs +2 -0
- package/dist/hook-bare.cjs.map +1 -0
- package/dist/hook-bare.js +9 -0
- package/dist/hook-bare.js.map +1 -0
- package/dist/hook.cjs +2 -0
- package/dist/hook.cjs.map +1 -0
- package/dist/hook.js +11 -0
- package/dist/hook.js.map +1 -0
- package/dist/hooks/useCombo.d.ts +3 -0
- package/dist/hooks/useCombo.d.ts.map +1 -0
- package/dist/hooks/usePosition.d.ts +16 -0
- package/dist/hooks/usePosition.d.ts.map +1 -0
- package/dist/icons/defaults.d.ts +16 -0
- package/dist/icons/defaults.d.ts.map +1 -0
- package/dist/icons/icons.d.ts +30 -0
- package/dist/icons/icons.d.ts.map +1 -0
- package/dist/icons-Ch1Q5AhF.js +40 -0
- package/dist/icons-Ch1Q5AhF.js.map +1 -0
- package/dist/icons-vzkEacAb.cjs +2 -0
- package/dist/icons-vzkEacAb.cjs.map +1 -0
- package/dist/icons.cjs +2 -0
- package/dist/icons.cjs.map +1 -0
- package/dist/icons.js +20 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/position.cjs +2 -0
- package/dist/position.cjs.map +1 -0
- package/dist/position.js +5 -0
- package/dist/position.js.map +1 -0
- package/dist/slots.cjs +2 -0
- package/dist/slots.cjs.map +1 -0
- package/dist/slots.js +92 -0
- package/dist/slots.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/styles/base.css +205 -0
- package/dist/styles/checkbox.css +36 -0
- package/dist/styles/chips.css +71 -0
- package/dist/styles/custom-item.css +64 -0
- package/dist/styles/footer.css +73 -0
- package/dist/styles/groups.css +23 -0
- package/dist/styles/meta.css +30 -0
- package/dist/styles/radio.css +36 -0
- package/dist/styles/select.css +35 -0
- package/dist/styles/states.css +22 -0
- package/dist/tabs.cjs +2 -0
- package/dist/tabs.cjs.map +1 -0
- package/dist/tabs.js +132 -0
- package/dist/tabs.js.map +1 -0
- package/dist/themes/dark.css +96 -0
- package/dist/themes/default.css +126 -0
- package/dist/themes/high-contrast.css +98 -0
- package/dist/types.d.ts +168 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/useCombo-D_vriwVz.cjs +2 -0
- package/dist/useCombo-D_vriwVz.cjs.map +1 -0
- package/dist/useCombo-gPeBdkRf.js +887 -0
- package/dist/useCombo-gPeBdkRf.js.map +1 -0
- package/dist/usePosition-6GfutqGX.cjs +2 -0
- package/dist/usePosition-6GfutqGX.cjs.map +1 -0
- package/dist/usePosition-DVw8IlwA.js +36 -0
- package/dist/usePosition-DVw8IlwA.js.map +1 -0
- package/package.json +219 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface CustomItemProps {
|
|
3
|
+
/** Primary label / title */
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
/** Secondary description text */
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
/** Leading icon or avatar element */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Trailing meta text (e.g. date, status) */
|
|
10
|
+
meta?: ReactNode;
|
|
11
|
+
/** Trailing badge (e.g. count, tag) */
|
|
12
|
+
badge?: ReactNode;
|
|
13
|
+
/** Arbitrary children rendered after title/description */
|
|
14
|
+
children?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Multi-line item layout with icon, title, description, meta, and badge slots.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Combo
|
|
22
|
+
* items={users}
|
|
23
|
+
* renderItem={({ item }) => (
|
|
24
|
+
* <CustomItem
|
|
25
|
+
* icon={<img src={item.avatar} alt="" />}
|
|
26
|
+
* title={item.name}
|
|
27
|
+
* description={item.role}
|
|
28
|
+
* meta={item.department}
|
|
29
|
+
* />
|
|
30
|
+
* )}
|
|
31
|
+
* />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function CustomItem({ title, description, icon, meta, badge, children, }: CustomItemProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
//# sourceMappingURL=CustomItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomItem.d.ts","sourceRoot":"","sources":["../../../src/components/slots/CustomItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,eAAe;IAC9B,4BAA4B;IAC5B,KAAK,EAAE,SAAS,CAAC;IACjB,iCAAiC;IACjC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,qCAAqC;IACrC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,uCAAuC;IACvC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,IAAI,EACJ,KAAK,EACL,QAAQ,GACT,EAAE,eAAe,2CAyBjB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface FooterAction {
|
|
2
|
+
/** Button label */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Click handler */
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
/** Visual variant */
|
|
7
|
+
variant?: 'primary' | 'secondary' | 'ghost';
|
|
8
|
+
/** Disable this action */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface FooterActionsProps {
|
|
12
|
+
/** Action buttons to render */
|
|
13
|
+
actions: FooterAction[];
|
|
14
|
+
/** Optional note/help text displayed below or beside actions */
|
|
15
|
+
note?: string;
|
|
16
|
+
/** Number of currently selected items (for summary display) */
|
|
17
|
+
selectedCount?: number;
|
|
18
|
+
/** Total number of items (for summary display) */
|
|
19
|
+
totalCount?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Pre-built footer with action buttons and optional selection summary.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Combo
|
|
27
|
+
* items={items}
|
|
28
|
+
* renderFooter={({ clearSelection, closeMenu }) => (
|
|
29
|
+
* <FooterActions
|
|
30
|
+
* selectedCount={3}
|
|
31
|
+
* totalCount={10}
|
|
32
|
+
* actions={[
|
|
33
|
+
* { label: 'Clear', onClick: clearSelection, variant: 'ghost' },
|
|
34
|
+
* { label: 'Done', onClick: closeMenu, variant: 'primary' },
|
|
35
|
+
* ]}
|
|
36
|
+
* />
|
|
37
|
+
* )}
|
|
38
|
+
* />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export declare function FooterActions({ actions, note, selectedCount, totalCount, }: FooterActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
//# sourceMappingURL=FooterActions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FooterActions.d.ts","sourceRoot":"","sources":["../../../src/components/slots/FooterActions.tsx"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,mBAAmB;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB;IACrB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;IAC5C,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,+BAA+B;IAC/B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,IAAI,EACJ,aAAa,EACb,UAAU,GACX,EAAE,kBAAkB,2CAgCpB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface GroupSeparatorProps {
|
|
3
|
+
/** Group heading label */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional item count badge */
|
|
6
|
+
count?: number;
|
|
7
|
+
/** Optional leading icon */
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
/** Enable sticky positioning for scrollable lists */
|
|
10
|
+
sticky?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Enhanced group header with optional count badge and sticky positioning.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Combo
|
|
18
|
+
* groups={groups}
|
|
19
|
+
* renderGroupHeader={({ group }) => (
|
|
20
|
+
* <GroupSeparator
|
|
21
|
+
* label={group.label}
|
|
22
|
+
* count={group.items.length}
|
|
23
|
+
* sticky
|
|
24
|
+
* />
|
|
25
|
+
* )}
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare function GroupSeparator({ label, count, icon, sticky, }: GroupSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=GroupSeparator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupSeparator.d.ts","sourceRoot":"","sources":["../../../src/components/slots/GroupSeparator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,mBAAmB;IAClC,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qDAAqD;IACrD,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,KAAK,EACL,IAAI,EACJ,MAAM,GACP,EAAE,mBAAmB,2CAiBrB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { CheckboxItem } from './CheckboxItem';
|
|
2
|
+
export type { CheckboxItemProps } from './CheckboxItem';
|
|
3
|
+
export { CustomItem } from './CustomItem';
|
|
4
|
+
export type { CustomItemProps } from './CustomItem';
|
|
5
|
+
export { FooterActions } from './FooterActions';
|
|
6
|
+
export type { FooterActionsProps, FooterAction } from './FooterActions';
|
|
7
|
+
export { GroupSeparator } from './GroupSeparator';
|
|
8
|
+
export type { GroupSeparatorProps } from './GroupSeparator';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/slots/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { ComboProps } from '../Combo';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export interface TabConfig<T> {
|
|
4
|
+
/** Unique tab identifier */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Tab display label */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Items belonging to this tab */
|
|
9
|
+
items: T[];
|
|
10
|
+
/** Optional icon for the tab */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Optional badge (e.g. count) */
|
|
13
|
+
badge?: ReactNode;
|
|
14
|
+
/** Disable this tab */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface TabbedComboProps<T> extends Omit<ComboProps<T>, 'items' | 'groups'> {
|
|
18
|
+
/** Tab configuration with per-tab items */
|
|
19
|
+
tabs: TabConfig<T>[];
|
|
20
|
+
/** Default active tab ID (uncontrolled) */
|
|
21
|
+
defaultActiveTab?: string;
|
|
22
|
+
/** Active tab ID (controlled) */
|
|
23
|
+
activeTab?: string;
|
|
24
|
+
/** Callback when active tab changes */
|
|
25
|
+
onTabChange?: (tabId: string) => void;
|
|
26
|
+
/** Custom tab label renderer */
|
|
27
|
+
renderTabLabel?: (tab: TabConfig<T>, isActive: boolean) => ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Combo with a tab strip inside the popover for categorized content.
|
|
31
|
+
* Each tab filters to its own set of items.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <TabbedCombo
|
|
36
|
+
* tabs={[
|
|
37
|
+
* { id: 'fruits', label: 'Fruits', items: fruits },
|
|
38
|
+
* { id: 'vegetables', label: 'Vegetables', items: vegetables },
|
|
39
|
+
* ]}
|
|
40
|
+
* placeholder="Search food..."
|
|
41
|
+
* />
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
export declare function TabbedCombo<T>(props: TabbedComboProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
//# sourceMappingURL=TabbedCombo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TabbedCombo.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/TabbedCombo.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,KAAK,EAAE,SAAS,EAA4B,MAAM,OAAO,CAAC;AAEjE,MAAM,WAAW,SAAS,CAAC,CAAC;IAC1B,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,gCAAgC;IAChC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kCAAkC;IAClC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB,CAAC,CAAC,CACjC,SAAQ,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC/C,2CAA2C;IAC3C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACrB,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,gCAAgC;IAChC,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC;CACtE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAkHxD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Announce a message to screen readers via a live region.
|
|
3
|
+
* Clear-then-set pattern forces screen readers to re-read.
|
|
4
|
+
*/
|
|
5
|
+
export declare function announce(message: string, clearAfterMs?: number): void;
|
|
6
|
+
/**
|
|
7
|
+
* Cleanup for tests.
|
|
8
|
+
*/
|
|
9
|
+
export declare function destroyAnnouncer(): void;
|
|
10
|
+
//# sourceMappingURL=announce.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"announce.d.ts","sourceRoot":"","sources":["../../src/core/announce.ts"],"names":[],"mappings":"AA4BA;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,SAAO,GAAG,IAAI,CAYnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAOvC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ComboIds {
|
|
2
|
+
base: string;
|
|
3
|
+
input: string;
|
|
4
|
+
label: string;
|
|
5
|
+
listbox: string;
|
|
6
|
+
toggleButton: string;
|
|
7
|
+
clearButton: string;
|
|
8
|
+
liveRegion: string;
|
|
9
|
+
item: (index: number) => string;
|
|
10
|
+
group: (index: number) => string;
|
|
11
|
+
}
|
|
12
|
+
export declare function useComboIds(userProvidedId?: string): ComboIds;
|
|
13
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/core/ids.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;CAClC;AAgBD,wBAAgB,WAAW,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,QAAQ,CAS7D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComboAction, ComboState } from '../types';
|
|
2
|
+
interface KeyboardOptions {
|
|
3
|
+
variant: 'input' | 'select';
|
|
4
|
+
commitOnBlur: boolean;
|
|
5
|
+
mode: 'single' | 'multi';
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Creates a keydown handler that dispatches combo actions.
|
|
9
|
+
* The handler is a pure mapping from keyboard events to dispatch calls.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createKeyboardHandler<T>(dispatch: (action: ComboAction<T>) => void, state: ComboState<T>, options: KeyboardOptions): (event: React.KeyboardEvent) => void;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=keyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../src/core/keyboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGxD,UAAU,eAAe;IACvB,OAAO,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5B,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,EACrC,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,EAC1C,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACpB,OAAO,EAAE,eAAe,GACvB,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CA8HtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.d.ts","sourceRoot":"","sources":["../../src/core/scroll.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAgB,cAAc,CAC5B,cAAc,EAAE,WAAW,GAAG,IAAI,EAClC,gBAAgB,EAAE,MAAM,GACvB,IAAI,CAQN"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ComboState, ComboAction, UseComboOptions } from '../types';
|
|
2
|
+
export interface ReducerContext<T> {
|
|
3
|
+
items: T[];
|
|
4
|
+
itemToString: (item: T | null) => string;
|
|
5
|
+
itemToValue: (item: T) => string | number;
|
|
6
|
+
filterFunction?: (items: T[], inputValue: string) => T[];
|
|
7
|
+
closeOnSelect: boolean;
|
|
8
|
+
commitOnBlur: boolean;
|
|
9
|
+
deselectionAllowed: boolean;
|
|
10
|
+
isItemDisabled: (item: T) => boolean;
|
|
11
|
+
disabledItemBehavior: 'skip' | 'focus';
|
|
12
|
+
hideDisabled: boolean;
|
|
13
|
+
variant: 'input' | 'select';
|
|
14
|
+
mode: 'single' | 'multi';
|
|
15
|
+
maxSelected?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Find the next enabled index in a given direction, wrapping around.
|
|
19
|
+
* Returns -1 if no enabled items exist.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getNextEnabledIndex<T>(filteredItems: T[], currentIndex: number, direction: 1 | -1, isItemDisabled: (item: T) => boolean, behavior: 'skip' | 'focus'): number;
|
|
22
|
+
/**
|
|
23
|
+
* Find the first enabled index from a given starting position.
|
|
24
|
+
*/
|
|
25
|
+
export declare function getFirstEnabledIndex<T>(filteredItems: T[], isItemDisabled: (item: T) => boolean, behavior: 'skip' | 'focus'): number;
|
|
26
|
+
/**
|
|
27
|
+
* Find the last enabled index.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getLastEnabledIndex<T>(filteredItems: T[], isItemDisabled: (item: T) => boolean, behavior: 'skip' | 'focus'): number;
|
|
30
|
+
export declare function getInitialState<T>(options: UseComboOptions<T>): ComboState<T>;
|
|
31
|
+
export declare function comboReducer<T>(state: ComboState<T>, action: ComboAction<T>, ctx: ReducerContext<T>): ComboState<T>;
|
|
32
|
+
//# sourceMappingURL=stateMachine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stateMachine.d.ts","sourceRoot":"","sources":["../../src/core/stateMachine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EAEX,eAAe,EAChB,MAAM,UAAU,CAAC;AAOlB,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK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CAAC,CAAC,CAAC,GAC1B,UAAU,CAAC,CAAC,CAAC,CAsBf;AAMD,wBAAgB,YAAY,CAAC,CAAC,EAC5B,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,EACpB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,EACtB,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,GACrB,UAAU,CAAC,CAAC,CAAC,CA+Yf"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { MutableRefObject, RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Compose multiple event handlers — user's handler runs first, then ours.
|
|
4
|
+
*/
|
|
5
|
+
export declare const callAll: <E extends (...args: never[]) => void>(...fns: (E | undefined)[]) => (...args: Parameters<E>) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Default itemToString — handles strings, objects with `.label`, null.
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultItemToString: <T>(item: T | null) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Default itemToValue — handles objects with `.value`, primitives.
|
|
12
|
+
*/
|
|
13
|
+
export declare const defaultItemToValue: <T>(item: T) => string | number;
|
|
14
|
+
/**
|
|
15
|
+
* Default case-insensitive substring filter.
|
|
16
|
+
*/
|
|
17
|
+
export declare const defaultFilter: <T>(items: T[], inputValue: string, itemToString: (item: T) => string) => T[];
|
|
18
|
+
/**
|
|
19
|
+
* Clamp a number to a range.
|
|
20
|
+
*/
|
|
21
|
+
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
22
|
+
/**
|
|
23
|
+
* Merge multiple refs (callback refs, RefObjects, or null).
|
|
24
|
+
*/
|
|
25
|
+
export declare function mergeRefs<T>(...refs: (MutableRefObject<T | null> | RefObject<T | null> | ((instance: T | null) => void) | null | undefined)[]): (instance: T | null) => void;
|
|
26
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/core/utils.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.jsx("path",{d:"M4 6l4 4 4-4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),r=()=>o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M8 3v10m0 0l-3-3m3 3l3-3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),n=()=>o.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M5 7l3 3 3-3",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"})}),t=({isOpen:l})=>o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("path",{d:"M4 8h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}),!l&&o.jsx("path",{d:"M8 4v8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),i=()=>o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"4",cy:"8",r:"1",fill:"currentColor"}),o.jsx("circle",{cx:"8",cy:"8",r:"1",fill:"currentColor"}),o.jsx("circle",{cx:"12",cy:"8",r:"1",fill:"currentColor"})]}),s=()=>o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M11.5 3.5l-6 6L2.5 6.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),c=()=>o.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:o.jsx("path",{d:"M10.5 3.5l-7 7M3.5 3.5l7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),h=()=>o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[o.jsx("circle",{cx:"6.5",cy:"6.5",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),o.jsx("path",{d:"M9.5 9.5L13 13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),d=()=>o.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",style:{animation:"rzero-spin 0.8s linear infinite"},children:[o.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.25"}),o.jsx("path",{d:"M14 8a6 6 0 00-6-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),a={chevronDown:o.jsx(e,{}),check:o.jsx(s,{}),clear:o.jsx(c,{}),search:o.jsx(h,{}),loading:o.jsx(d,{})},u={caret:o.jsx(e,{}),arrow:o.jsx(r,{}),angle:o.jsx(n,{}),plusminus:o.jsx(t,{}),dots:o.jsx(i,{}),none:null};exports.AngleDownIcon=n;exports.ArrowDownIcon=r;exports.CheckIcon=s;exports.ChevronDownIcon=e;exports.ClearIcon=c;exports.DotsIcon=i;exports.LoadingIcon=d;exports.PlusMinusIcon=t;exports.SearchIcon=h;exports.chevronPresets=u;exports.defaultIcons=a;
|
|
2
|
+
//# sourceMappingURL=defaults-iFGq2Q-7.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults-iFGq2Q-7.cjs","sources":["../src/icons/defaults.tsx"],"sourcesContent":["import React from 'react';\nimport type { IconSlots, ChevronStyle } from '../types';\n\n// ---------------------------------------------------------------------------\n// Minimal inline SVG components (tree-shakable named exports)\n// ---------------------------------------------------------------------------\n\nexport const ChevronDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M4 6l4 4 4-4\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const ArrowDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M8 3v10m0 0l-3-3m3 3l3-3\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const AngleDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M5 7l3 3 3-3\" stroke=\"currentColor\" strokeWidth=\"1\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const PlusMinusIcon = ({ isOpen }: { isOpen?: boolean }) => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M4 8h8\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n {!isOpen && <path d=\"M8 4v8\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>}\n </svg>\n);\n\nexport const DotsIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <circle cx=\"4\" cy=\"8\" r=\"1\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"8\" r=\"1\" fill=\"currentColor\"/>\n <circle cx=\"12\" cy=\"8\" r=\"1\" fill=\"currentColor\"/>\n </svg>\n);\n\nexport const CheckIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M11.5 3.5l-6 6L2.5 6.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const ClearIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M10.5 3.5l-7 7M3.5 3.5l7 7\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n </svg>\n);\n\nexport const SearchIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <circle cx=\"6.5\" cy=\"6.5\" r=\"4\" stroke=\"currentColor\" strokeWidth=\"1.5\"/>\n <path d=\"M9.5 9.5L13 13\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n </svg>\n);\n\nexport const LoadingIcon = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden=\"true\"\n style={{ animation: 'rzero-spin 0.8s linear infinite' }}\n >\n <circle cx=\"8\" cy=\"8\" r=\"6\" stroke=\"currentColor\" strokeWidth=\"1.5\" opacity=\"0.25\"/>\n <path d=\"M14 8a6 6 0 00-6-6\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n </svg>\n);\n\n// ---------------------------------------------------------------------------\n// Built-in defaults\n// ---------------------------------------------------------------------------\n\nexport const defaultIcons: IconSlots = {\n chevronDown: <ChevronDownIcon />,\n check: <CheckIcon />,\n clear: <ClearIcon />,\n search: <SearchIcon />,\n loading: <LoadingIcon />,\n};\n\n// ---------------------------------------------------------------------------\n// Chevron presets\n// ---------------------------------------------------------------------------\n\nexport const chevronPresets: Record<\n Exclude<ChevronStyle, 'custom'>,\n React.ReactNode\n> = {\n caret: <ChevronDownIcon />,\n arrow: <ArrowDownIcon />,\n angle: <AngleDownIcon />,\n plusminus: <PlusMinusIcon />,\n dots: <DotsIcon />,\n none: null,\n};\n"],"names":["ChevronDownIcon","jsx","ArrowDownIcon","AngleDownIcon","PlusMinusIcon","isOpen","DotsIcon","jsxs","CheckIcon","ClearIcon","SearchIcon","LoadingIcon","defaultIcons","chevronPresets"],"mappings":"kDAOaA,EAAkB,IAC7BC,EAAAA,IAAC,MAAA,CAAI,MAAM,KAAK,OAAO,KAAK,QAAQ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EAAU,EAClB,YAAQC,EAAA,EAAU,EAClB,aAASC,EAAA,EAAW,EACpB,cAAUC,EAAA,CAAA,CAAY,CACxB,EAMaE,EAGT,CACF,YAAQb,EAAA,EAAgB,EACxB,YAAQE,EAAA,EAAc,EACtB,YAAQC,EAAA,EAAc,EACtB,gBAAYC,EAAA,EAAc,EAC1B,WAAOE,EAAA,EAAS,EAChB,KAAM,IACR"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as r, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
const o = () => /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M4 6l4 4 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), t = () => /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M8 3v10m0 0l-3-3m3 3l3-3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), i = () => /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M5 7l3 3 3-3", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round", strokeLinejoin: "round" }) }), c = ({ isOpen: n }) => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
3
|
+
/* @__PURE__ */ r("path", { d: "M4 8h8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
|
|
4
|
+
!n && /* @__PURE__ */ r("path", { d: "M8 4v8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
5
|
+
] }), s = () => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
6
|
+
/* @__PURE__ */ r("circle", { cx: "4", cy: "8", r: "1", fill: "currentColor" }),
|
|
7
|
+
/* @__PURE__ */ r("circle", { cx: "8", cy: "8", r: "1", fill: "currentColor" }),
|
|
8
|
+
/* @__PURE__ */ r("circle", { cx: "12", cy: "8", r: "1", fill: "currentColor" })
|
|
9
|
+
] }), d = () => /* @__PURE__ */ r("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M11.5 3.5l-6 6L2.5 6.5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }), h = () => /* @__PURE__ */ r("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M10.5 3.5l-7 7M3.5 3.5l7 7", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }) }), l = () => /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: [
|
|
10
|
+
/* @__PURE__ */ r("circle", { cx: "6.5", cy: "6.5", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
11
|
+
/* @__PURE__ */ r("path", { d: "M9.5 9.5L13 13", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
12
|
+
] }), a = () => /* @__PURE__ */ e(
|
|
13
|
+
"svg",
|
|
14
|
+
{
|
|
15
|
+
width: "16",
|
|
16
|
+
height: "16",
|
|
17
|
+
viewBox: "0 0 16 16",
|
|
18
|
+
fill: "none",
|
|
19
|
+
"aria-hidden": "true",
|
|
20
|
+
style: { animation: "rzero-spin 0.8s linear infinite" },
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ r("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.5", opacity: "0.25" }),
|
|
23
|
+
/* @__PURE__ */ r("path", { d: "M14 8a6 6 0 00-6-6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
), k = {
|
|
27
|
+
chevronDown: /* @__PURE__ */ r(o, {}),
|
|
28
|
+
check: /* @__PURE__ */ r(d, {}),
|
|
29
|
+
clear: /* @__PURE__ */ r(h, {}),
|
|
30
|
+
search: /* @__PURE__ */ r(l, {}),
|
|
31
|
+
loading: /* @__PURE__ */ r(a, {})
|
|
32
|
+
}, w = {
|
|
33
|
+
caret: /* @__PURE__ */ r(o, {}),
|
|
34
|
+
arrow: /* @__PURE__ */ r(t, {}),
|
|
35
|
+
angle: /* @__PURE__ */ r(i, {}),
|
|
36
|
+
plusminus: /* @__PURE__ */ r(c, {}),
|
|
37
|
+
dots: /* @__PURE__ */ r(s, {}),
|
|
38
|
+
none: null
|
|
39
|
+
};
|
|
40
|
+
export {
|
|
41
|
+
i as A,
|
|
42
|
+
d as C,
|
|
43
|
+
s as D,
|
|
44
|
+
a as L,
|
|
45
|
+
c as P,
|
|
46
|
+
l as S,
|
|
47
|
+
t as a,
|
|
48
|
+
o as b,
|
|
49
|
+
h as c,
|
|
50
|
+
w as d,
|
|
51
|
+
k as e
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=defaults-rhC5DFTg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults-rhC5DFTg.js","sources":["../src/icons/defaults.tsx"],"sourcesContent":["import React from 'react';\nimport type { IconSlots, ChevronStyle } from '../types';\n\n// ---------------------------------------------------------------------------\n// Minimal inline SVG components (tree-shakable named exports)\n// ---------------------------------------------------------------------------\n\nexport const ChevronDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M4 6l4 4 4-4\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const ArrowDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M8 3v10m0 0l-3-3m3 3l3-3\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const AngleDownIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M5 7l3 3 3-3\" stroke=\"currentColor\" strokeWidth=\"1\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const PlusMinusIcon = ({ isOpen }: { isOpen?: boolean }) => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M4 8h8\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n {!isOpen && <path d=\"M8 4v8\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>}\n </svg>\n);\n\nexport const DotsIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <circle cx=\"4\" cy=\"8\" r=\"1\" fill=\"currentColor\"/>\n <circle cx=\"8\" cy=\"8\" r=\"1\" fill=\"currentColor\"/>\n <circle cx=\"12\" cy=\"8\" r=\"1\" fill=\"currentColor\"/>\n </svg>\n);\n\nexport const CheckIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M11.5 3.5l-6 6L2.5 6.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\"/>\n </svg>\n);\n\nexport const ClearIcon = () => (\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M10.5 3.5l-7 7M3.5 3.5l7 7\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n </svg>\n);\n\nexport const SearchIcon = () => (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n <circle cx=\"6.5\" cy=\"6.5\" r=\"4\" stroke=\"currentColor\" strokeWidth=\"1.5\"/>\n <path d=\"M9.5 9.5L13 13\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n </svg>\n);\n\nexport const LoadingIcon = () => (\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n aria-hidden=\"true\"\n style={{ animation: 'rzero-spin 0.8s linear infinite' }}\n >\n <circle cx=\"8\" cy=\"8\" r=\"6\" stroke=\"currentColor\" strokeWidth=\"1.5\" opacity=\"0.25\"/>\n <path d=\"M14 8a6 6 0 00-6-6\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\"/>\n </svg>\n);\n\n// ---------------------------------------------------------------------------\n// Built-in defaults\n// ---------------------------------------------------------------------------\n\nexport const defaultIcons: IconSlots = {\n chevronDown: <ChevronDownIcon />,\n check: <CheckIcon />,\n clear: <ClearIcon />,\n search: <SearchIcon />,\n loading: <LoadingIcon />,\n};\n\n// ---------------------------------------------------------------------------\n// Chevron presets\n// ---------------------------------------------------------------------------\n\nexport const chevronPresets: Record<\n Exclude<ChevronStyle, 'custom'>,\n React.ReactNode\n> = {\n caret: <ChevronDownIcon />,\n arrow: <ArrowDownIcon />,\n angle: <AngleDownIcon />,\n plusminus: <PlusMinusIcon />,\n dots: <DotsIcon />,\n none: null,\n};\n"],"names":["ChevronDownIcon","jsx","ArrowDownIcon","AngleDownIcon","PlusMinusIcon","isOpen","DotsIcon","jsxs","CheckIcon","ClearIcon","SearchIcon","LoadingIcon","defaultIcons","chevronPresets"],"mappings":";AAOO,MAAMA,IAAkB,MAC7B,gBAAAC,EAAC,OAAA,EAAI,OAAM,MAAK,QAAO,MAAK,S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BAAqB,QAAO,gBAAe,aAAY,OAAM,eAAc,QAAA,CAAO;AAAA,IAAA;AAAA,EAAA;AAC5F,GAOWW,IAA0B;AAAA,EACrC,+BAAcZ,GAAA,EAAgB;AAAA,EAC9B,yBAAQQ,GAAA,EAAU;AAAA,EAClB,yBAAQC,GAAA,EAAU;AAAA,EAClB,0BAASC,GAAA,EAAW;AAAA,EACpB,2BAAUC,GAAA,CAAA,CAAY;AACxB,GAMaE,IAGT;AAAA,EACF,yBAAQb,GAAA,EAAgB;AAAA,EACxB,yBAAQE,GAAA,EAAc;AAAA,EACtB,yBAAQC,GAAA,EAAc;AAAA,EACtB,6BAAYC,GAAA,EAAc;AAAA,EAC1B,wBAAOE,GAAA,EAAS;AAAA,EAChB,MAAM;AACR;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useCombo } from '../hooks/useCombo';
|
|
2
|
+
export { setDefaultIcons, registerDefaultIcons, registerChevronPresets } from '../icons/icons';
|
|
3
|
+
export type { UseComboOptions, UseComboReturn, ComboState, ComboAction, ComboStatus, IconSlots, ChevronStyle, PropGetter, ComboGroup, } from '../types';
|
|
4
|
+
//# sourceMappingURL=hook-bare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-bare.d.ts","sourceRoot":"","sources":["../../src/entries/hook-bare.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC/F,YAAY,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,GACX,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useCombo } from '../hooks/useCombo';
|
|
2
|
+
export { setDefaultIcons } from '../icons/icons';
|
|
3
|
+
export type { UseComboOptions, UseComboReturn, ComboState, ComboAction, ComboStatus, IconSlots, ChevronStyle, PropGetter, ComboGroup, } from '../types';
|
|
4
|
+
//# sourceMappingURL=hook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/entries/hook.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EACV,eAAe,EACf,cAAc,EACd,UAAU,EACV,WAAW,EACX,WAAW,EACX,SAAS,EACT,YAAY,EACZ,UAAU,EACV,UAAU,GACX,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { ChevronDownIcon, ArrowDownIcon, AngleDownIcon, PlusMinusIcon, DotsIcon, CheckIcon, ClearIcon, SearchIcon, LoadingIcon, defaultIcons, chevronPresets, } from '../icons/defaults';
|
|
2
|
+
export { setDefaultIcons, registerDefaultIcons, registerChevronPresets, resetDefaultIcons, } from '../icons/icons';
|
|
3
|
+
export type { IconSlots, ChevronStyle } from '../types';
|
|
4
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/entries/icons.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,QAAQ,EACR,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './hook';
|
|
2
|
+
import '../styles/combo.css';
|
|
3
|
+
export { Combo } from '../components/Combo';
|
|
4
|
+
export type { ComboProps, ComboClassNames, ItemVariant } from '../components/Combo';
|
|
5
|
+
export { Portal } from '../components/Portal';
|
|
6
|
+
export type { PortalProps } from '../components/Portal';
|
|
7
|
+
export { LiveRegion } from '../components/LiveRegion';
|
|
8
|
+
export type { LiveRegionProps } from '../components/LiveRegion';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/entries/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../src/entries/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { CheckboxItem } from '../components/slots/CheckboxItem';
|
|
2
|
+
export type { CheckboxItemProps } from '../components/slots/CheckboxItem';
|
|
3
|
+
export { CustomItem } from '../components/slots/CustomItem';
|
|
4
|
+
export type { CustomItemProps } from '../components/slots/CustomItem';
|
|
5
|
+
export { FooterActions } from '../components/slots/FooterActions';
|
|
6
|
+
export type { FooterActionsProps, FooterAction } from '../components/slots/FooterActions';
|
|
7
|
+
export { GroupSeparator } from '../components/slots/GroupSeparator';
|
|
8
|
+
export type { GroupSeparatorProps } from '../components/slots/GroupSeparator';
|
|
9
|
+
//# sourceMappingURL=slots.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slots.d.ts","sourceRoot":"","sources":["../../src/entries/slots.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,YAAY,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,YAAY,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/entries/tabs.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./useCombo-D_vriwVz.cjs"),e=require("./icons-vzkEacAb.cjs");exports.useCombo=s.useCombo;exports.registerChevronPresets=e.registerChevronPresets;exports.registerDefaultIcons=e.registerDefaultIcons;exports.setDefaultIcons=e.setDefaultIcons;
|
|
2
|
+
//# sourceMappingURL=hook-bare.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-bare.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-bare.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/hook.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./icons-vzkEacAb.cjs"),s=require("./defaults-iFGq2Q-7.cjs"),o=require("./useCombo-D_vriwVz.cjs");e.registerDefaultIcons(()=>s.defaultIcons);e.registerChevronPresets(()=>s.chevronPresets);exports.setDefaultIcons=e.setDefaultIcons;exports.useCombo=o.useCombo;
|
|
2
|
+
//# sourceMappingURL=hook.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook.cjs","sources":["../src/entries/hook.ts"],"sourcesContent":["import { registerDefaultIcons, registerChevronPresets } from '../icons/icons';\nimport { defaultIcons, chevronPresets } from '../icons/defaults';\n\nregisterDefaultIcons(() => defaultIcons);\nregisterChevronPresets(() => chevronPresets);\n\nexport { useCombo } from '../hooks/useCombo';\nexport { setDefaultIcons } from '../icons/icons';\nexport type {\n UseComboOptions,\n UseComboReturn,\n ComboState,\n ComboAction,\n ComboStatus,\n IconSlots,\n ChevronStyle,\n PropGetter,\n ComboGroup,\n} from '../types';\n"],"names":["registerDefaultIcons","defaultIcons","registerChevronPresets","chevronPresets"],"mappings":"kMAGAA,EAAAA,qBAAqB,IAAMC,EAAAA,YAAY,EACvCC,EAAAA,uBAAuB,IAAMC,EAAAA,cAAc"}
|
package/dist/hook.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { a as e, r as s } from "./icons-Ch1Q5AhF.js";
|
|
2
|
+
import { s as n } from "./icons-Ch1Q5AhF.js";
|
|
3
|
+
import { e as r, d as o } from "./defaults-rhC5DFTg.js";
|
|
4
|
+
import { u as c } from "./useCombo-gPeBdkRf.js";
|
|
5
|
+
e(() => r);
|
|
6
|
+
s(() => o);
|
|
7
|
+
export {
|
|
8
|
+
n as setDefaultIcons,
|
|
9
|
+
c as useCombo
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=hook.js.map
|
package/dist/hook.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook.js","sources":["../src/entries/hook.ts"],"sourcesContent":["import { registerDefaultIcons, registerChevronPresets } from '../icons/icons';\nimport { defaultIcons, chevronPresets } from '../icons/defaults';\n\nregisterDefaultIcons(() => defaultIcons);\nregisterChevronPresets(() => chevronPresets);\n\nexport { useCombo } from '../hooks/useCombo';\nexport { setDefaultIcons } from '../icons/icons';\nexport type {\n UseComboOptions,\n UseComboReturn,\n ComboState,\n ComboAction,\n ComboStatus,\n IconSlots,\n ChevronStyle,\n PropGetter,\n ComboGroup,\n} from '../types';\n"],"names":["registerDefaultIcons","defaultIcons","registerChevronPresets","chevronPresets"],"mappings":";;;;AAGAA,EAAqB,MAAMC,CAAY;AACvCC,EAAuB,MAAMC,CAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCombo.d.ts","sourceRoot":"","sources":["../../src/hooks/useCombo.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EAIf,MAAM,UAAU,CAAC;AAkBlB,wBAAgB,QAAQ,CAAC,CAAC,EACxB,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,GAC1B,cAAc,CAAC,CAAC,CAAC,CA4jBnB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
export interface Position {
|
|
3
|
+
top: number;
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
placement: 'bottom-start' | 'top-start';
|
|
7
|
+
maxHeight: number;
|
|
8
|
+
}
|
|
9
|
+
export interface UsePositionOptions {
|
|
10
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
11
|
+
listboxRef: RefObject<HTMLElement | null>;
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
matchTriggerWidth?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function usePosition(options: UsePositionOptions): Position;
|
|
16
|
+
//# sourceMappingURL=usePosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePosition.d.ts","sourceRoot":"","sources":["../../src/hooks/usePosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/E,MAAM,WAAW,QAAQ;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,cAAc,GAAG,WAAW,CAAC;IACxC,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,UAAU,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAC1C,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAaD,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,QAAQ,CA8EjE"}
|