@semcore/accordion 5.48.2 → 5.49.0-prerelease.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.
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=index.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { BoxProps, FlexProps, Flex } from '@semcore/flex-box';\nimport { PropGetterFn, Intergalactic, UnknownProperties } from '@semcore/core';\nimport { CollapseProps } from '@semcore/animation';\nimport { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { Text } from '@semcore/typography';\n\nexport type AccordionValue = null | number | string | Array<number | string | null>;\n\nexport type AccordionProps<T extends AccordionValue = AccordionValue> = FlexProps & {\n /** Value for the active tab. Can be set as stroke, number, null or as array.\n * @type AccordionValue\n * */\n value?: T;\n /**\n * Value of the active tabs selected by default\n * @type AccordionValue\n * @default []\n */\n defaultValue?: T;\n /** Called when the selection is changed\n * @type (value: AccordionValue, event?: React.SyntheticEvent) => void\n * */\n onChange?:\n | ((value: T, event?: React.SyntheticEvent) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Animation duration of each Accordion.Item inside\n * @default 350 */\n duration?: number;\n\n /**\n * Changes the visual appearance of the component\n * @default secondary\n */\n use?: 'primary' | 'secondary';\n};\n\nexport interface IAccordionProps<T extends AccordionValue = AccordionValue>\n extends AccordionProps<T> {}\n\n/** @deprecated */\nexport interface IAccordionContext extends AccordionContext, UnknownProperties {}\nexport type AccordionContext = {\n getItemProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAccordionHandlers extends AccordionHandlers, UnknownProperties {}\nexport type AccordionHandlers = {\n value: (value: AccordionValue) => void;\n};\n\n/** @deprecated */\nexport interface IAccordionItemProps extends AccordionItemProps, UnknownProperties {}\nexport type AccordionItemProps = {\n /** Tab value */\n value: string | number;\n /** Disabling selection changes */\n disabled?: boolean;\n /** Animation duration\n * @default 350 */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IAccordionItemContext extends AccordionItemContext, UnknownProperties {}\nexport type AccordionItemContext = {\n getToggleProps?: PropGetterFn;\n getCollapseProps?: PropGetterFn;\n getChevronProps?: PropGetterFn;\n selected?: boolean;\n};\n\nexport type AccordionItemToggleProps = BoxProps &\n KeyboardFocusProps & {\n tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n };\nexport type ChevronItemProps = BoxProps & {\n /**\n * Chevron size\n * @default m\n */\n size?: 'm' | 'l';\n};\n\ntype IntergalacticAccordionComponent<PropsExtending = {}> = (<\n Value extends AccordionValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n AccordionProps<Value>,\n AccordionContext & { value: Value },\n [handlers: AccordionHandlers]\n > &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', AccordionProps>;\n\ndeclare const Accordion: IntergalacticAccordionComponent & {\n Item: Intergalactic.Component<\n 'div',\n AccordionItemProps,\n AccordionItemContext,\n [handlers: AccordionHandlers]\n > & {\n Toggle: Intergalactic.Component<typeof Text, AccordionItemToggleProps>;\n ToggleButton: Intergalactic.Component<typeof Flex, {}>;\n Chevron: Intergalactic.Component<'div', ChevronItemProps>;\n Collapse: Intergalactic.Component<'div', CollapseProps>;\n };\n};\n\ndeclare const wrapAccordion: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticAccordionComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticAccordionComponent<PropsExtending>;\nexport { wrapAccordion };\n\nexport default Accordion;\n"],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=index.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { BoxProps, FlexProps, Flex } from '@semcore/flex-box';\nimport { PropGetterFn, Intergalactic, UnknownProperties } from '@semcore/core';\nimport { CollapseProps } from '@semcore/animation';\nimport { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { Text } from '@semcore/typography';\n\nexport type AccordionValue = null | number | string | Array<number | string | null>;\n\nexport type AccordionProps<T extends AccordionValue = AccordionValue> = FlexProps & {\n /** Value for the active tab. Can be set as stroke, number, null or as array.\n * @type AccordionValue\n * */\n value?: T;\n /**\n * Value of the active tabs selected by default\n * @type AccordionValue\n * @default []\n */\n defaultValue?: T;\n /** Called when the selection is changed\n * @type (value: AccordionValue, event?: React.SyntheticEvent) => void\n * */\n onChange?:\n | ((value: T, event?: React.SyntheticEvent) => void)\n | React.Dispatch<React.SetStateAction<T>>;\n /** Animation duration of each Accordion.Item inside\n * @default 350 */\n duration?: number;\n\n /**\n * Changes the visual appearance of the component\n * @default secondary\n */\n use?: 'primary' | 'secondary';\n};\n\nexport interface IAccordionProps<T extends AccordionValue = AccordionValue>\n extends AccordionProps<T> {}\n\n/** @deprecated */\nexport interface IAccordionContext extends AccordionContext, UnknownProperties {}\nexport type AccordionContext = {\n getItemProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IAccordionHandlers extends AccordionHandlers, UnknownProperties {}\nexport type AccordionHandlers = {\n value: (value: AccordionValue) => void;\n};\n\n/** @deprecated */\nexport interface IAccordionItemProps extends AccordionItemProps, UnknownProperties {}\nexport type AccordionItemProps = {\n /** Tab value */\n value: string | number;\n /** Disabling selection changes */\n disabled?: boolean;\n /** Animation duration\n * @default 350 */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IAccordionItemContext extends AccordionItemContext, UnknownProperties {}\nexport type AccordionItemContext = {\n getToggleProps?: PropGetterFn;\n getCollapseProps?: PropGetterFn;\n getChevronProps?: PropGetterFn;\n selected?: boolean;\n};\n\nexport type AccordionItemToggleProps = BoxProps &\n KeyboardFocusProps & {\n tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n };\nexport type ChevronItemProps = BoxProps & {\n /**\n * Chevron size\n * @default m\n */\n size?: 'm' | 'l';\n};\n\ntype IntergalacticAccordionComponent<PropsExtending = {}> = (<\n Value extends AccordionValue,\n Tag extends Intergalactic.Tag = 'div',\n>(\n props: Intergalactic.InternalTypings.ComponentProps<\n Tag,\n 'div',\n AccordionProps<Value>,\n AccordionContext & { value: Value },\n [handlers: AccordionHandlers]\n > &\n PropsExtending,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\n Intergalactic.InternalTypings.ComponentAdditive<'div', 'div', AccordionProps>;\n\ndeclare const Accordion: IntergalacticAccordionComponent & {\n Item: Intergalactic.Component<\n 'div',\n AccordionItemProps,\n AccordionItemContext,\n [handlers: AccordionHandlers]\n > & {\n Toggle: Intergalactic.Component<typeof Text, AccordionItemToggleProps>;\n ToggleButton: Intergalactic.Component<typeof Flex, {}>;\n Chevron: Intergalactic.Component<'div', ChevronItemProps>;\n Collapse: Intergalactic.Component<'div', CollapseProps>;\n };\n};\n\ndeclare const wrapAccordion: <PropsExtending extends {}>(\n wrapper: (\n props: Intergalactic.InternalTypings.UntypeRefAndTag<\n Intergalactic.InternalTypings.ComponentPropsNesting<IntergalacticAccordionComponent>\n > &\n PropsExtending,\n ) => React.ReactNode,\n) => IntergalacticAccordionComponent<PropsExtending>;\nexport { wrapAccordion };\n\nexport default Accordion;\n"],"mappings":""}