@hyphen/hyphen-components 7.3.2 → 7.3.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.
Files changed (221) hide show
  1. package/dist/css/utilities.css +1 -1
  2. package/dist/css/variables.css +18 -28
  3. package/dist/hyphen-components.cjs.development.js +5873 -5019
  4. package/dist/hyphen-components.cjs.development.js.map +1 -1
  5. package/dist/hyphen-components.cjs.production.min.js +18 -2
  6. package/dist/hyphen-components.cjs.production.min.js.map +1 -1
  7. package/dist/hyphen-components.esm.js +5731 -4844
  8. package/dist/hyphen-components.esm.js.map +1 -1
  9. package/dist/index.d.ts +2799 -57
  10. package/dist/index.js +0 -1
  11. package/package.json +18 -19
  12. package/src/components/Badge/Badge.module.scss +6 -0
  13. package/src/components/Badge/Badge.stories.tsx +1 -0
  14. package/src/components/Badge/Badge.test.tsx +3 -2
  15. package/src/components/Badge/Badge.tsx +5 -3
  16. package/src/components/Box/Box.tsx +5 -2
  17. package/src/components/Button/Button.module.scss +1 -1
  18. package/src/components/Button/Button.test.tsx +2 -2
  19. package/src/components/Calendar/Calendar.test.tsx +262 -0
  20. package/src/components/Card/Card.tsx +2 -0
  21. package/src/components/CheckboxInput/components/Checkbox.module.scss +1 -1
  22. package/src/components/CheckboxInput/components/Checkbox.tsx +2 -0
  23. package/src/components/Details/Details.module.scss +2 -2
  24. package/src/components/Details/Details.tsx +2 -0
  25. package/src/components/Drawer/Drawer.stories.tsx +1 -1
  26. package/src/components/Drawer/Drawer.test.tsx +494 -56
  27. package/src/components/Drawer/Drawer.tsx +7 -1
  28. package/src/components/DropdownMenu/DropdownMenu.test.tsx +532 -12
  29. package/src/components/FormControl/FormControl.tsx +2 -0
  30. package/src/components/Formik/Formik.stories.tsx +30 -7
  31. package/src/components/Formik/FormikSelectInput/FormikSelectInput.tsx +6 -5
  32. package/src/components/Formik/FormikToggleGroup/FormikToggleGroup.tsx +1 -1
  33. package/src/components/HelpText/HelpText.tsx +2 -0
  34. package/src/components/Icon/Icon.stories.tsx +1 -1
  35. package/src/components/Icon/Icon.tsx +2 -0
  36. package/src/components/Modal/Modal.test.tsx +630 -81
  37. package/src/components/Modal/Modal.tsx +2 -0
  38. package/src/components/Modal/components/ModalFooter/ModalFooter.test.tsx +2 -2
  39. package/src/components/Popover/Popover.tsx +2 -0
  40. package/src/components/RadioGroup/RadioInput/RadioInput.tsx +2 -0
  41. package/src/components/SelectInput/SelectInput.stories.tsx +22 -22
  42. package/src/components/SelectInput/SelectInput.tsx +13 -9
  43. package/src/components/SelectInputInset/SelectInputInset.tsx +2 -0
  44. package/src/components/Sidebar/Sidebar.module.scss +4 -0
  45. package/src/components/Sidebar/Sidebar.stories.tsx +8 -4
  46. package/src/components/Sidebar/Sidebar.test.tsx +7 -4
  47. package/src/components/Sidebar/Sidebar.tsx +7 -4
  48. package/src/components/Table/Table.stories.tsx +102 -52
  49. package/src/components/TextInput/TextInput.tsx +2 -0
  50. package/src/components/TextInputInset/TextInputInset.tsx +2 -0
  51. package/src/components/TextareaInputInset/TextareaInputInset.tsx +2 -0
  52. package/src/components/TimePickerNative/TimePickerNative.stories.tsx +0 -1
  53. package/src/components/Toast/Toast.store.ts +1 -1
  54. package/src/components/Toast/Toast.stories.tsx +3 -2
  55. package/src/components/Toast/Toast.test.tsx +8 -6
  56. package/src/components/Toggle/Toggle.tsx +2 -0
  57. package/src/components/ToggleGroup/ToggleGroup.tsx +2 -0
  58. package/src/docs/Colors.mdx +0 -13
  59. package/src/index.ts +2 -0
  60. package/src/lib/getColumnKeys.ts +3 -3
  61. package/src/lib/mergeRefs.ts +1 -1
  62. package/src/lib/tokens.ts +4 -4
  63. package/dist/components/Alert/Alert.constants.d.ts +0 -8
  64. package/dist/components/Alert/Alert.d.ts +0 -42
  65. package/dist/components/Alert/Alert.stories.d.ts +0 -12
  66. package/dist/components/Alert/Alert.types.d.ts +0 -7
  67. package/dist/components/AspectRatio/AspectRatio.d.ts +0 -3
  68. package/dist/components/AspectRatio/AspectRatio.stories.d.ts +0 -6
  69. package/dist/components/Badge/Badge.d.ts +0 -24
  70. package/dist/components/Badge/Badge.stories.d.ts +0 -8
  71. package/dist/components/Box/Box.d.ts +0 -247
  72. package/dist/components/Box/Box.stories.d.ts +0 -46
  73. package/dist/components/Button/Button.constants.d.ts +0 -3
  74. package/dist/components/Button/Button.d.ts +0 -53
  75. package/dist/components/Button/Button.stories.d.ts +0 -16
  76. package/dist/components/Calendar/Calendar.d.ts +0 -7
  77. package/dist/components/Calendar/Calendar.stories.d.ts +0 -12
  78. package/dist/components/Card/Card.d.ts +0 -17
  79. package/dist/components/Card/Card.stories.d.ts +0 -8
  80. package/dist/components/Card/components/CardFooter/CardFooter.d.ts +0 -13
  81. package/dist/components/Card/components/CardHeader/CardHeader.d.ts +0 -13
  82. package/dist/components/Card/components/CardSection/CardSection.d.ts +0 -46
  83. package/dist/components/Card/components/index.d.ts +0 -3
  84. package/dist/components/CheckboxInput/CheckboxInput.d.ts +0 -72
  85. package/dist/components/CheckboxInput/CheckboxInput.stories.d.ts +0 -18
  86. package/dist/components/CheckboxInput/components/Checkbox.d.ts +0 -71
  87. package/dist/components/CheckboxInput/components/CheckboxIcon.d.ts +0 -27
  88. package/dist/components/Collapsible/Collapsible.d.ts +0 -5
  89. package/dist/components/Collapsible/Collapsible.stories.d.ts +0 -9
  90. package/dist/components/Details/Details.d.ts +0 -15
  91. package/dist/components/Details/Details.stories.d.ts +0 -6
  92. package/dist/components/Details/DetailsSummary.d.ts +0 -7
  93. package/dist/components/Drawer/Drawer.d.ts +0 -105
  94. package/dist/components/Drawer/Drawer.stories.d.ts +0 -62
  95. package/dist/components/DropdownMenu/DropdownMenu.d.ts +0 -25
  96. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +0 -9
  97. package/dist/components/FormControl/FormControl.d.ts +0 -38
  98. package/dist/components/FormLabel/FormLabel.d.ts +0 -41
  99. package/dist/components/FormLabel/FormLabel.stories.d.ts +0 -6
  100. package/dist/components/Formik/Formik.stories.d.ts +0 -18
  101. package/dist/components/Formik/FormikCheckboxInput/FormikCheckboxInput.d.ts +0 -12
  102. package/dist/components/Formik/FormikRadioGroup/FormikRadioGroup.d.ts +0 -12
  103. package/dist/components/Formik/FormikSelectInput/FormikSelectInput.d.ts +0 -13
  104. package/dist/components/Formik/FormikSelectInputInset/FormikSelectInputInset.d.ts +0 -12
  105. package/dist/components/Formik/FormikSelectInputNative/FormikSelectInputNative.d.ts +0 -12
  106. package/dist/components/Formik/FormikSwitch/FormikSwitch.d.ts +0 -12
  107. package/dist/components/Formik/FormikTextInput/FormikTextInput.d.ts +0 -12
  108. package/dist/components/Formik/FormikTextInputInset/FormikTextInputInset.d.ts +0 -12
  109. package/dist/components/Formik/FormikTextareaInput/FormikTextareaInput.d.ts +0 -12
  110. package/dist/components/Formik/FormikTextareaInputInset/FormikTextareaInputInset.d.ts +0 -12
  111. package/dist/components/Formik/FormikTimePicker/FormikTimePicker.d.ts +0 -12
  112. package/dist/components/Formik/FormikTimePickerNative/FormikTimePickerNative.d.ts +0 -12
  113. package/dist/components/Formik/FormikToggleGroup/FormikToggleGroup.d.ts +0 -20
  114. package/dist/components/Formik/FormikToggleGroupMulti/FormikToggleGroupMulti.d.ts +0 -18
  115. package/dist/components/Heading/Heading.constants.d.ts +0 -10
  116. package/dist/components/Heading/Heading.d.ts +0 -35
  117. package/dist/components/Heading/Heading.stories.d.ts +0 -9
  118. package/dist/components/HelpText/HelpText.d.ts +0 -12
  119. package/dist/components/Icon/Icon.d.ts +0 -22
  120. package/dist/components/Icon/Icon.stories.d.ts +0 -10
  121. package/dist/components/InputValidationMessage/InputValidationMessage.d.ts +0 -9
  122. package/dist/components/Modal/Modal.d.ts +0 -83
  123. package/dist/components/Modal/Modal.stories.d.ts +0 -13
  124. package/dist/components/Modal/components/ModalBody/ModalBody.d.ts +0 -4
  125. package/dist/components/Modal/components/ModalFooter/ModalFooter.d.ts +0 -4
  126. package/dist/components/Modal/components/ModalHeader/ModalHeader.d.ts +0 -21
  127. package/dist/components/Modal/components/index.d.ts +0 -4
  128. package/dist/components/Pagination/Pagination.d.ts +0 -51
  129. package/dist/components/Pagination/Pagination.stories.d.ts +0 -8
  130. package/dist/components/Pagination/Pagination.utilities.d.ts +0 -10
  131. package/dist/components/Popover/Popover.d.ts +0 -8
  132. package/dist/components/Popover/Popover.stories.d.ts +0 -7
  133. package/dist/components/RadioGroup/RadioGroup.d.ts +0 -75
  134. package/dist/components/RadioGroup/RadioGroup.stories.d.ts +0 -16
  135. package/dist/components/RadioGroup/RadioInput/RadioInput.d.ts +0 -57
  136. package/dist/components/RadioGroup/RadioInput/RadioInputIcon.d.ts +0 -27
  137. package/dist/components/RangeInput/RangeInput.d.ts +0 -29
  138. package/dist/components/RangeInput/RangeInput.stories.d.ts +0 -7
  139. package/dist/components/ResponsiveProvider/ResponsiveProvider.d.ts +0 -17
  140. package/dist/components/ResponsiveProvider/ResponsiveProvider.stories.d.ts +0 -7
  141. package/dist/components/SelectInput/SelectInput.d.ts +0 -148
  142. package/dist/components/SelectInput/SelectInput.stories.d.ts +0 -24
  143. package/dist/components/SelectInputInset/SelectInputInset.d.ts +0 -92
  144. package/dist/components/SelectInputInset/SelectInputInset.stories.d.ts +0 -12
  145. package/dist/components/SelectInputNative/SelectInputNative.d.ts +0 -45
  146. package/dist/components/SelectInputNative/SelectInputNative.stories.d.ts +0 -19
  147. package/dist/components/Sidebar/Sidebar.d.ts +0 -57
  148. package/dist/components/Sidebar/Sidebar.stories.d.ts +0 -9
  149. package/dist/components/Spinner/Spinner.d.ts +0 -12
  150. package/dist/components/Spinner/Spinner.stories.d.ts +0 -8
  151. package/dist/components/Switch/Switch.d.ts +0 -64
  152. package/dist/components/Switch/Switch.stories.d.ts +0 -12
  153. package/dist/components/Table/Table.d.ts +0 -86
  154. package/dist/components/Table/Table.stories.d.ts +0 -31
  155. package/dist/components/Table/TableBody/TableBody.d.ts +0 -52
  156. package/dist/components/Table/TableBody/TableBodyCell/TableBodyCell.d.ts +0 -45
  157. package/dist/components/Table/TableHead/TableHead.d.ts +0 -46
  158. package/dist/components/Table/TableHead/TableHeaderCell/TableHeaderCell.d.ts +0 -65
  159. package/dist/components/Table/common/TableRow/TableRow.d.ts +0 -67
  160. package/dist/components/TextInput/TextInput.d.ts +0 -106
  161. package/dist/components/TextInput/TextInput.stories.d.ts +0 -19
  162. package/dist/components/TextInputInset/TextInputInset.d.ts +0 -102
  163. package/dist/components/TextInputInset/TextInputInset.stories.d.ts +0 -13
  164. package/dist/components/TextareaInput/TextareaInput.d.ts +0 -97
  165. package/dist/components/TextareaInput/TextareaInput.stories.d.ts +0 -23
  166. package/dist/components/TextareaInputInset/TextareaInputInset.d.ts +0 -105
  167. package/dist/components/TextareaInputInset/TextareaInputInset.stories.d.ts +0 -12
  168. package/dist/components/ThemeProvider/ThemeProvider.d.ts +0 -15
  169. package/dist/components/ThemeProvider/ThemeProvider.stories.d.ts +0 -6
  170. package/dist/components/TimePicker/TimePicker.d.ts +0 -35
  171. package/dist/components/TimePicker/TimePicker.stories.d.ts +0 -12
  172. package/dist/components/TimePickerNative/TimePickerNative.d.ts +0 -39
  173. package/dist/components/TimePickerNative/TimePickerNative.stories.d.ts +0 -11
  174. package/dist/components/Toast/Toast.store.d.ts +0 -36
  175. package/dist/components/Toast/Toast.stories.d.ts +0 -14
  176. package/dist/components/Toast/Toast.types.d.ts +0 -75
  177. package/dist/components/Toast/ToastContainer.d.ts +0 -43
  178. package/dist/components/Toast/ToastNotification.d.ts +0 -28
  179. package/dist/components/Toast/index.d.ts +0 -4
  180. package/dist/components/Toast/toast.d.ts +0 -20
  181. package/dist/components/Toast/useToasts.d.ts +0 -14
  182. package/dist/components/Toggle/Toggle.d.ts +0 -7
  183. package/dist/components/Toggle/Toggle.stories.d.ts +0 -11
  184. package/dist/components/ToggleGroup/ToggleGroup.d.ts +0 -19
  185. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +0 -12
  186. package/dist/components/Tooltip/Tooltip.d.ts +0 -8
  187. package/dist/components/Tooltip/Tooltip.stories.d.ts +0 -8
  188. package/dist/constants/keyCodes.d.ts +0 -2
  189. package/dist/css/index.css +0 -36
  190. package/dist/hooks/index.d.ts +0 -6
  191. package/dist/hooks/useBreakpoint/useBreakpoint.d.ts +0 -9
  192. package/dist/hooks/useBreakpoint/useBreakpoint.stories.d.ts +0 -6
  193. package/dist/hooks/useIsMobile/useIsMobile.d.ts +0 -1
  194. package/dist/hooks/useIsMobile/useIsMobile.stories.d.ts +0 -6
  195. package/dist/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +0 -2
  196. package/dist/hooks/useOpenClose/useOpenClose.d.ts +0 -39
  197. package/dist/hooks/useOpenClose/useOpenClose.stories.d.ts +0 -6
  198. package/dist/hooks/useTheme/useTheme.d.ts +0 -5
  199. package/dist/hooks/useTheme/useTheme.stories.d.ts +0 -6
  200. package/dist/hooks/useWindowSize/useWindowSize.d.ts +0 -7
  201. package/dist/hooks/useWindowSize/useWindowSize.stories.d.ts +0 -6
  202. package/dist/lib/cssShorthandToClasses.d.ts +0 -4
  203. package/dist/lib/doesStringIncludeCssUnit.d.ts +0 -1
  204. package/dist/lib/generateResponsiveClasses.d.ts +0 -2
  205. package/dist/lib/getAutoCompleteValue.d.ts +0 -1
  206. package/dist/lib/getColumnKeys.d.ts +0 -3
  207. package/dist/lib/getDimensionCss.d.ts +0 -12
  208. package/dist/lib/getElementType.d.ts +0 -14
  209. package/dist/lib/getFlexCss.d.ts +0 -9
  210. package/dist/lib/index.d.ts +0 -15
  211. package/dist/lib/isFunction.d.ts +0 -3
  212. package/dist/lib/mergeRefs.d.ts +0 -2
  213. package/dist/lib/prefersReducedMotion.d.ts +0 -1
  214. package/dist/lib/react-children-utilities/filter.d.ts +0 -3
  215. package/dist/lib/react-children-utilities/index.d.ts +0 -1
  216. package/dist/lib/reactRouterClickHandler.d.ts +0 -12
  217. package/dist/lib/resolveValue.d.ts +0 -3
  218. package/dist/lib/tokens.d.ts +0 -22
  219. package/dist/modes.d.ts +0 -8
  220. package/dist/types/index.d.ts +0 -103
  221. package/dist/types/lib.types.d.ts +0 -3
@@ -1,2 +0,0 @@
1
- import { ResponsiveProp } from '../types';
2
- export declare function generateResponsiveClasses(classRoot: string, value: ResponsiveProp<any> | string | undefined): string[];
@@ -1 +0,0 @@
1
- export declare function getAutoCompleteValue(value: string | boolean): string;
@@ -1,3 +0,0 @@
1
- import { Key } from 'react';
2
- import { Column } from '../types';
3
- export declare const getColumnKeys: (columns: Column[]) => Key[];
@@ -1,12 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- import { StylesAndClasses, CssDimensionAbbreviation, ResponsiveProp, DimensionSize } from '../types';
3
- export declare function getDimensionStyles(dimension: CssDimensionAbbreviation, value?: DimensionSize | ResponsiveProp<DimensionSize> | string): {
4
- [key: string]: string;
5
- } | undefined;
6
- export declare function getDimensionClasses(dimension: CssDimensionAbbreviation, value?: DimensionSize | ResponsiveProp<DimensionSize> | string): string[] | undefined;
7
- /**
8
- * Returns an object of styles and class names that correspond with the given value
9
- * @param {CssDimensionAbbreviation} dimension width or height
10
- * @param {string} [value] value of the dimension
11
- */
12
- export declare function getDimensionCss(dimension: CssDimensionAbbreviation, value?: DimensionSize | ResponsiveProp<DimensionSize> | string): StylesAndClasses<CSSProperties>;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Returns a createElement() type based on the props of the Component.
4
- * Useful for calculating what type a component should render as.
5
- *
6
- * @param {function} Component A function or ReactClass.
7
- * @param {object} props A ReactElement props object
8
- * @param {function} [getDefault] A function that returns a default element type.
9
- * @returns {string} A ReactElement type
10
- */
11
- export declare function getElementType(// eslint-disable-line import/prefer-default-export
12
- Component: React.Component | React.FC, props: {
13
- [key: string]: unknown;
14
- }, getDefault?: () => string): string;
@@ -1,9 +0,0 @@
1
- import { StylesAndClasses, FlexProperty, ResponsiveProp } from '../types';
2
- export declare function parsePropertyValue(value: string): string | number;
3
- export declare function getFlexStyles(value?: string): FlexProperty | undefined;
4
- export declare function getFlexClasses(value?: string): string[] | undefined;
5
- /**
6
- * Returns an object of styles and class names that correspond with the given flex value
7
- * @param {string} [value] spacing token value
8
- */
9
- export declare function getFlexCss(value?: ResponsiveProp<FlexProperty> | string): StylesAndClasses<FlexProperty>;
@@ -1,15 +0,0 @@
1
- export * from './cssShorthandToClasses';
2
- export * from './doesStringIncludeCssUnit';
3
- export * from './generateResponsiveClasses';
4
- export * from './getAutoCompleteValue';
5
- export * from './getColumnKeys';
6
- export * from './getDimensionCss';
7
- export * from './getElementType';
8
- export * from './getFlexCss';
9
- export * from './isFunction';
10
- export * from './mergeRefs';
11
- export * from './prefersReducedMotion';
12
- export * from './reactRouterClickHandler';
13
- export * from './resolveValue';
14
- export * from './react-children-utilities';
15
- export * from './tokens';
@@ -1,3 +0,0 @@
1
- import { ValueOrFunction, ValueFunction } from '../types';
2
- export declare const isFunction: <TValue, TArg>(// eslint-disable-line import/prefer-default-export
3
- valOrFunction: ValueOrFunction<TValue, TArg>) => valOrFunction is ValueFunction<TValue, TArg>;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export declare function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T> | undefined | null>): React.RefCallback<T>;
@@ -1 +0,0 @@
1
- export declare const prefersReducedMotion: () => boolean;
@@ -1,3 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type FilterFunction = (child: ReactNode, index?: number, children?: ReactNode[]) => boolean;
3
- export declare const filter: (children: ReactNode, filterFn: FilterFunction) => ReactNode[];
@@ -1 +0,0 @@
1
- export * from './filter';
@@ -1,12 +0,0 @@
1
- import { MouseEvent, AnchorHTMLAttributes } from 'react';
2
- export declare const isModifiedEvent: (e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => boolean;
3
- /**
4
- * Due to react-router's handling of custom components used in RR <Link>
5
- * we must add this validation that ensures the router will execute the passed `navigate`
6
- * prop, thus navigating the user without triggering a refresh.
7
- *
8
- * SOURCES:
9
- * https://github.com/ReactTraining/react-router/issues/7727
10
- * https://github.com/ReactTraining/react-router/issues/7761
11
- * */
12
- export declare const handleReactRouterClick: (event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>, onClick: ((e: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void) | undefined, target: AnchorHTMLAttributes<HTMLAnchorElement>["target"] | undefined, navigate: (() => void) | undefined) => void;
@@ -1,3 +0,0 @@
1
- import { ValueOrFunction } from '../types';
2
- export declare const resolveValue: <TValue, TArg>(// eslint-disable-line import/prefer-default-export
3
- valOrFunction: ValueOrFunction<TValue, TArg>, arg: TArg) => TValue;
@@ -1,22 +0,0 @@
1
- import { BaseColor, BackgroundColor, BorderColor, BorderRadiusSize, BorderSize, Breakpoint, BreakpointSizeWithBase, BoxShadowSize, ColorName, FontColor, FontSize, FontFamily, FontWeight, HeadingSize, HeightSize, IconName, LineHeightSize, SpacingSize, WidthSize, ZIndexSize } from '../types';
2
- export declare const ICON_NAMES: IconName[];
3
- export declare const BORDER_RADIUS_OPTIONS: BorderRadiusSize[];
4
- export declare const BORDER_SIZE_OPTIONS: BorderSize[];
5
- export declare const BREAKPOINT_OPTIONS: BreakpointSizeWithBase[];
6
- export declare const BREAKPOINTS: Breakpoint[];
7
- export declare const BASE_COLOR_OPTIONS: BaseColor[];
8
- export declare const BASE_COLOR_NAMES: ColorName[];
9
- export declare const FONT_COLOR_OPTIONS: FontColor[];
10
- export declare const BACKGROUND_COLOR_OPTIONS: BackgroundColor[];
11
- export declare const BORDER_COLOR_OPTIONS: BorderColor[];
12
- export declare const FONT_SIZE_OPTIONS: FontSize[];
13
- export declare const FONT_FAMILY_OPTIONS: FontFamily[];
14
- export declare const FONT_WEIGHT_OPTIONS: FontWeight[];
15
- export declare const HEADING_SIZE_OPTIONS: HeadingSize[];
16
- export declare const HEIGHT_OPTIONS: HeightSize[];
17
- export declare const LINE_HEIGHT_OPTIONS: LineHeightSize[];
18
- export declare const SPACING_OPTIONS: SpacingSize[];
19
- export declare const WIDTH_OPTIONS: WidthSize[];
20
- export declare const Z_INDEX_OPTIONS: ZIndexSize[];
21
- export declare const Z_INDEX_VALUES: any;
22
- export declare const BOX_SHADOW_OPTIONS: BoxShadowSize[];
package/dist/modes.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export declare const allModes: {
2
- light: {
3
- theme: string;
4
- };
5
- dark: {
6
- theme: string;
7
- };
8
- };
@@ -1,103 +0,0 @@
1
- import { Key, KeyboardEvent, MouseEvent, ReactNode } from 'react';
2
- import { BorderRadiusSize as BorderRadius, SpacingSize, BreakpointSize, HeightSize, WidthSize } from '@hyphen/hyphen-design-tokens/build/types';
3
- export type { IconName, BackgroundColor, BaseColor, BorderColor, BorderSize, BoxShadowSize, BreakpointSize, ColorName, FontColor, FontFamily, FontSize, FontWeight, HeadingSize, HeightSize, LineHeightSize, SpacingSize, TextDecorationLine, TextDecorationStyle, TextTransform, TextWrap, WidthSize, WhiteSpace, WordBreak, ZIndexSize, } from '@hyphen/hyphen-design-tokens/build/types';
4
- export type BreakpointSizeWithBase = BreakpointSize | 'base';
5
- export type Breakpoint = {
6
- name: BreakpointSizeWithBase;
7
- minWidth: number;
8
- };
9
- export type DimensionSize = WidthSize | HeightSize;
10
- export type UnknownPropertiesObjType = {
11
- [key: string]: any;
12
- };
13
- export interface FlexProperty {
14
- flexGrow?: number | string;
15
- flexShrink?: number | string;
16
- flexBasis?: number | string;
17
- flex?: number | string;
18
- }
19
- export type StylesAndClasses<T> = {
20
- styles?: T;
21
- classes?: string[];
22
- };
23
- export type CssDimensionAbbreviation = 'h' | 'w' | 'mw' | 'mh' | 'minw' | 'minh';
24
- export type CssDimensionUnit = 'px' | 'rem' | 'em' | '%';
25
- export type CssDimensionValue = `${number}${CssDimensionUnit}`;
26
- export type CssSpacingAbbreviation = 'm' | 'p';
27
- export type CssJustifyContentValue = 'space-around' | 'space-between' | 'center' | 'flex-end' | 'space-evenly' | 'flex-start' | 'stretch';
28
- export type CssAlignContentValue = 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'space-between' | 'space-around';
29
- export type CssFlexDirectionValue = 'column' | 'column-reverse' | 'row' | 'row-reverse' | undefined;
30
- export type CssAlignItemsValue = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch';
31
- export type CssFlexValue = 'auto' | 'initial' | 'none' | 'inherit' | 'unset';
32
- export type CssOverflowValue = 'visible' | 'hidden' | 'clip' | 'auto' | 'scroll' | 'inherit' | 'initial' | 'unset';
33
- export type CssDisplayValue = 'none' | 'flex' | 'inline-flex' | 'block' | 'inline-block' | 'inline' | 'inherit' | 'grid' | 'table-cell' | 'contents';
34
- export type CssWhiteSpaceValue = 'normal' | 'nowrap' | 'pre' | 'pre-wrap' | 'pre-line';
35
- export type CssWordBreakValue = 'normal' | 'all' | 'keep';
36
- export type CssTextAlignValue = 'left' | 'center' | 'right';
37
- export type BaseSpacing = SpacingSize | string | undefined;
38
- export type BorderRadiusSize = BorderRadius | string | undefined;
39
- export declare type ResponsiveProp<T> = {
40
- [breakpoint in BreakpointSizeWithBase]?: T;
41
- };
42
- export type Row = UnknownPropertiesObjType;
43
- export type Cell = string | number | {
44
- [key: string]: unknown;
45
- } | unknown[];
46
- export declare type Column = {
47
- /**
48
- * Text alignment for column cells (including header alignment). Cells will default to left if not defined.
49
- */
50
- align?: 'left' | 'right' | 'center';
51
- /**
52
- * CSS Class to be applied uniformly to all individual cells in a column.
53
- */
54
- cellClassName?: string | ((cell?: Cell, row?: Row, rowIndex?: number) => string);
55
- /**
56
- * The key value to be rendered based on the table `rows`.
57
- */
58
- dataKey?: string;
59
- /**
60
- * Placeholder for empty cells Applies only to the cells of the particular column with this prop.
61
- */
62
- emptyCellPlaceholder?: string | number | undefined;
63
- /**
64
- * The heading/title of a column.
65
- */
66
- heading?: ReactNode;
67
- /**
68
- * CSS Class to be applied to the column header cell.
69
- */
70
- headerClassName?: string;
71
- /**
72
- * A custom key to be used when rendering the column array.
73
- * Not required as our table auto-generates static, but unique column keys if not passed in.
74
- */
75
- key?: Key;
76
- /**
77
- * Whether the column data is sortable. Controls whether sorting controls should be displayed.
78
- */
79
- isSortable?: boolean;
80
- /**
81
- * Render method for column cell data. Provides ability to render any aspect of the cell/row with custom
82
- * markup.
83
- */
84
- render?: (cell?: Cell, row?: Row, rowIndex?: number) => ReactNode;
85
- /**
86
- * Whether the column is stuck to the left or right.
87
- */
88
- sticky?: 'left' | 'right';
89
- /**
90
- * Whether long text should be truncated based on column width. Use in tandem with column width as well as
91
- * `useFixedWidthColumns` prop in the parent table.
92
- */
93
- truncateOverflow?: boolean;
94
- /**
95
- * Specific width of the column. Use in tandem with `useFixedWidthColumns` in the parent table.
96
- */
97
- width?: number;
98
- };
99
- export type EventWithColumnKey = (MouseEvent<HTMLTableHeaderCellElement> | KeyboardEvent<HTMLTableHeaderCellElement>) & {
100
- sortedKey: Key | undefined;
101
- };
102
- export type ValueFunction<TValue, TArg> = (arg: TArg) => TValue;
103
- export type ValueOrFunction<TValue, TArg> = TValue | ValueFunction<TValue, TArg>;
@@ -1,3 +0,0 @@
1
- export type KnownKeys<T> = keyof {
2
- [K in keyof T as string extends K ? never : K]: K;
3
- };