@edvisor/product-language 0.11.111 → 0.11.113

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 (198) hide show
  1. package/index.cjs +1 -1
  2. package/index.d.ts +2 -2
  3. package/index.js +1 -1
  4. package/lib/components/alert-banner/alert-banner.d.ts +18 -18
  5. package/lib/components/alert-banner/alert-level-flags.d.ts +18 -18
  6. package/lib/components/alert-banner/index.d.ts +1 -1
  7. package/lib/components/autocomplete-input/autocomplete-input.d.ts +39 -39
  8. package/lib/components/autocomplete-input/index.d.ts +1 -1
  9. package/lib/components/badge/badge-type-flags.d.ts +18 -18
  10. package/lib/components/badge/badge.d.ts +7 -7
  11. package/lib/components/badge/index.d.ts +1 -1
  12. package/lib/components/card/atoms/card-frame.d.ts +7 -7
  13. package/lib/components/card/atoms/index.d.ts +1 -1
  14. package/lib/components/card/card.d.ts +14 -14
  15. package/lib/components/card/components/card-alert-banner-slot.d.ts +5 -6
  16. package/lib/components/card/components/card-controls-slot.d.ts +4 -5
  17. package/lib/components/card/components/card-section-slot.d.ts +11 -11
  18. package/lib/components/card/components/index.d.ts +3 -3
  19. package/lib/components/card/index.d.ts +3 -3
  20. package/lib/components/card/molecules/index.d.ts +1 -1
  21. package/lib/components/card/molecules/left-right-card.d.ts +16 -16
  22. package/lib/components/checkbox/checkbox.d.ts +11 -11
  23. package/lib/components/checkbox/helpers.d.ts +12 -12
  24. package/lib/components/checkbox/index.d.ts +1 -1
  25. package/lib/components/date-picker/components/custom-calendar.d.ts +6 -6
  26. package/lib/components/date-picker/components/index.d.ts +1 -1
  27. package/lib/components/date-picker/date-picker-utc.d.ts +9 -9
  28. package/lib/components/date-picker/date-picker.d.ts +19 -19
  29. package/lib/components/date-picker/helpers/date-picker-factory.d.ts +38 -38
  30. package/lib/components/date-picker/index.d.ts +2 -2
  31. package/lib/components/divider/divider-type-flags.d.ts +9 -9
  32. package/lib/components/divider/divider.d.ts +7 -7
  33. package/lib/components/divider/index.d.ts +1 -1
  34. package/lib/components/flag/flag-size-flags.d.ts +22 -22
  35. package/lib/components/flag/flag.d.ts +4 -4
  36. package/lib/components/flag/helpers/flag-sprite-sheet.d.ts +5 -5
  37. package/lib/components/flag/helpers/index.d.ts +1 -1
  38. package/lib/components/flag/index.d.ts +1 -1
  39. package/lib/components/flag/types.d.ts +5 -5
  40. package/lib/components/icon/icon-list.d.ts +149 -150
  41. package/lib/components/icon/icon.d.ts +149 -149
  42. package/lib/components/icon/index.d.ts +1 -1
  43. package/lib/components/index.d.ts +39 -39
  44. package/lib/components/inline-error/index.d.ts +1 -1
  45. package/lib/components/inline-error/inline-error.d.ts +7 -7
  46. package/lib/components/input-field/components/index.d.ts +2 -2
  47. package/lib/components/input-field/components/labeled-input.d.ts +11 -11
  48. package/lib/components/input-field/components/stepper.d.ts +7 -7
  49. package/lib/components/input-field/index.d.ts +4 -4
  50. package/lib/components/input-field/input-currency.d.ts +23 -22
  51. package/lib/components/input-field/input-currency.helpers.d.ts +32 -0
  52. package/lib/components/input-field/input-field.d.ts +27 -27
  53. package/lib/components/input-field/input-number.d.ts +19 -19
  54. package/lib/components/input-field/input-text.d.ts +14 -14
  55. package/lib/components/layout/flex.d.ts +16 -16
  56. package/lib/components/layout/grid-layout.d.ts +11 -11
  57. package/lib/components/layout/index.d.ts +3 -3
  58. package/lib/components/layout/left-right-layout.d.ts +33 -34
  59. package/lib/components/link/index.d.ts +1 -1
  60. package/lib/components/link/link.d.ts +14 -14
  61. package/lib/components/markdown/index.d.ts +1 -1
  62. package/lib/components/markdown/markdown.d.ts +7 -7
  63. package/lib/components/menu/index.d.ts +1 -1
  64. package/lib/components/menu/menu.d.ts +18 -18
  65. package/lib/components/modal/index.d.ts +3 -3
  66. package/lib/components/modal/modal-base.d.ts +32 -32
  67. package/lib/components/modal/modal-destructive.d.ts +16 -16
  68. package/lib/components/modal/modal.d.ts +16 -16
  69. package/lib/components/molecules/avatar/avatar-size-flags.d.ts +11 -12
  70. package/lib/components/molecules/avatar/avatar.d.ts +12 -12
  71. package/lib/components/molecules/avatar/index.d.ts +1 -1
  72. package/lib/components/molecules/button/button-flags.d.ts +44 -44
  73. package/lib/components/molecules/button/button.d.ts +12 -12
  74. package/lib/components/molecules/button/index.d.ts +1 -1
  75. package/lib/components/molecules/index.d.ts +4 -4
  76. package/lib/components/molecules/input-checkbox/index.d.ts +1 -1
  77. package/lib/components/molecules/input-checkbox/input-checkbox.d.ts +8 -8
  78. package/lib/components/molecules/simple-menu/SimpleMenu.d.ts +14 -15
  79. package/lib/components/molecules/simple-menu/index.d.ts +1 -1
  80. package/lib/components/organisms/choice-list/choice-list.d.ts +9 -9
  81. package/lib/components/organisms/choice-list/index.d.ts +1 -1
  82. package/lib/components/organisms/index.d.ts +2 -2
  83. package/lib/components/organisms/multi-choice-list/index.d.ts +1 -1
  84. package/lib/components/organisms/multi-choice-list/multi-choice-list.d.ts +11 -11
  85. package/lib/components/page-header/index.d.ts +1 -1
  86. package/lib/components/page-header/page-header.d.ts +25 -26
  87. package/lib/components/pagination/index.d.ts +1 -1
  88. package/lib/components/pagination/pagination.d.ts +10 -10
  89. package/lib/components/progress-bar/index.d.ts +1 -1
  90. package/lib/components/progress-bar/progress-bar-size-flags.d.ts +10 -10
  91. package/lib/components/progress-bar/progress-bar.d.ts +8 -8
  92. package/lib/components/radio-button/index.d.ts +1 -1
  93. package/lib/components/radio-button/radio-button.d.ts +11 -11
  94. package/lib/components/range-slider/components/bar-chart.d.ts +8 -8
  95. package/lib/components/range-slider/components/handle.d.ts +12 -12
  96. package/lib/components/range-slider/components/rail.d.ts +9 -9
  97. package/lib/components/range-slider/components/slider-component.d.ts +12 -12
  98. package/lib/components/range-slider/components/slider-inputs.d.ts +15 -16
  99. package/lib/components/range-slider/components/tick.d.ts +10 -10
  100. package/lib/components/range-slider/components/track.d.ts +11 -11
  101. package/lib/components/range-slider/index.d.ts +2 -2
  102. package/lib/components/range-slider/range-slider.d.ts +16 -16
  103. package/lib/components/range-slider/slider.d.ts +12 -12
  104. package/lib/components/range-slider/types.d.ts +11 -11
  105. package/lib/components/react-select/index.d.ts +1 -1
  106. package/lib/components/react-select/react-select.d.ts +14 -15
  107. package/lib/components/select/components/helpers.d.ts +17 -17
  108. package/lib/components/select/components/menu-container.d.ts +3 -3
  109. package/lib/components/select/components/menu-list-expanded.d.ts +6 -6
  110. package/lib/components/select/components/menu-list.d.ts +3 -3
  111. package/lib/components/select/components/menu-row.d.ts +11 -11
  112. package/lib/components/select/components/menu.d.ts +2 -3
  113. package/lib/components/select/components/option.d.ts +2 -3
  114. package/lib/components/select/components/optionMultiLevel.d.ts +2 -3
  115. package/lib/components/select/components/optionMultilevelExpanded.d.ts +5 -5
  116. package/lib/components/select/components/select-label.d.ts +1 -1
  117. package/lib/components/select/components/value-component-multi.d.ts +4 -4
  118. package/lib/components/select/components/value-component-single.d.ts +5 -4
  119. package/lib/components/select/components/value.d.ts +5 -4
  120. package/lib/components/select/index.d.ts +4 -4
  121. package/lib/components/select/select.d.ts +7 -10
  122. package/lib/components/select/types.d.ts +300 -300
  123. package/lib/components/select/utils.d.ts +16 -16
  124. package/lib/components/select-with-groups/index.d.ts +2 -2
  125. package/lib/components/select-with-groups/select-with-groups.d.ts +35 -35
  126. package/lib/components/spinner/index.d.ts +1 -1
  127. package/lib/components/spinner/spinner-size-flags.d.ts +10 -10
  128. package/lib/components/spinner/spinner.d.ts +9 -9
  129. package/lib/components/stepper/index.d.ts +1 -1
  130. package/lib/components/stepper/stepper.d.ts +9 -9
  131. package/lib/components/switch/index.d.ts +1 -1
  132. package/lib/components/switch/switch.d.ts +13 -13
  133. package/lib/components/table/hooks/index.d.ts +4 -4
  134. package/lib/components/table/hooks/useFilteredRows.d.ts +5 -5
  135. package/lib/components/table/hooks/usePaginatedRows.d.ts +12 -12
  136. package/lib/components/table/hooks/useSortedRows.d.ts +6 -6
  137. package/lib/components/table/hooks/useTable.d.ts +47 -47
  138. package/lib/components/table/index.d.ts +2 -2
  139. package/lib/components/table/table.d.ts +28 -28
  140. package/lib/components/tabs/components/index.d.ts +1 -1
  141. package/lib/components/tabs/components/tab.d.ts +10 -10
  142. package/lib/components/tabs/index.d.ts +1 -1
  143. package/lib/components/tabs/tabs.d.ts +18 -18
  144. package/lib/components/tag/components/close-button.d.ts +8 -8
  145. package/lib/components/tag/components/index.d.ts +2 -2
  146. package/lib/components/tag/components/tag-label.d.ts +8 -8
  147. package/lib/components/tag/index.d.ts +1 -1
  148. package/lib/components/tag/tag.d.ts +10 -10
  149. package/lib/components/text-area/index.d.ts +1 -1
  150. package/lib/components/text-area/text-area.d.ts +11 -11
  151. package/lib/components/text-toggle/index.d.ts +1 -1
  152. package/lib/components/text-toggle/text-toggle.d.ts +10 -10
  153. package/lib/components/thumbnail/index.d.ts +1 -1
  154. package/lib/components/thumbnail/thumbnail-size-flags.d.ts +10 -10
  155. package/lib/components/thumbnail/thumbnail.d.ts +10 -10
  156. package/lib/components/toast/index.d.ts +1 -1
  157. package/lib/components/toast/toast.d.ts +17 -17
  158. package/lib/components/tooltip/index.d.ts +1 -1
  159. package/lib/components/tooltip/tooltip.d.ts +30 -30
  160. package/lib/components/tree-view/components/tree-node.d.ts +3 -3
  161. package/lib/components/tree-view/helper.d.ts +12 -12
  162. package/lib/components/tree-view/index.d.ts +2 -2
  163. package/lib/components/tree-view/tree-view.d.ts +3 -3
  164. package/lib/components/tree-view/types.d.ts +63 -63
  165. package/lib/components/typography/index.d.ts +1 -1
  166. package/lib/components/typography/typography.d.ts +27 -27
  167. package/lib/foundations/color-system/base-palette/base-palette.d.ts +76 -76
  168. package/lib/foundations/color-system/base-palette/index.d.ts +1 -1
  169. package/lib/foundations/color-system/color-guidelines/color-guidelines.d.ts +133 -133
  170. package/lib/foundations/color-system/color-guidelines/index.d.ts +1 -1
  171. package/lib/foundations/color-system/components/color-sample.d.ts +17 -17
  172. package/lib/foundations/color-system/components/index.d.ts +1 -1
  173. package/lib/foundations/color-system/index.d.ts +2 -2
  174. package/lib/foundations/index.d.ts +4 -4
  175. package/lib/foundations/shadows/components.d.ts +8 -8
  176. package/lib/foundations/shadows/index.d.ts +1 -1
  177. package/lib/foundations/shadows/shadows.d.ts +8 -8
  178. package/lib/foundations/spacing/index.d.ts +1 -1
  179. package/lib/foundations/spacing/spacing-guidelines.d.ts +37 -37
  180. package/lib/foundations/spacing/spacing.d.ts +19 -19
  181. package/lib/foundations/typography/constants.d.ts +39 -39
  182. package/lib/foundations/typography/fonts.d.ts +1 -1
  183. package/lib/foundations/typography/index.d.ts +2 -2
  184. package/lib/foundations/typography/text-aspect-flags.d.ts +30 -30
  185. package/lib/foundations/typography/typography.d.ts +24 -24
  186. package/lib/helpers/generic-types.d.ts +21 -21
  187. package/lib/helpers/index.d.ts +10 -10
  188. package/lib/helpers/isReactElementOfType.d.ts +6 -8
  189. package/lib/helpers/nothing.d.ts +9 -10
  190. package/lib/helpers/numbers.d.ts +51 -51
  191. package/lib/helpers/safe-navigation.d.ts +26 -26
  192. package/lib/helpers/slots.d.ts +17 -17
  193. package/lib/helpers/strings.d.ts +1 -1
  194. package/lib/helpers/useClickOutside.d.ts +2 -2
  195. package/lib/helpers/useInputElementState.d.ts +30 -30
  196. package/lib/helpers/useIsMobile.d.ts +1 -1
  197. package/lib/helpers/useKeyDown.d.ts +1 -1
  198. package/package.json +5 -5
@@ -1,30 +1,30 @@
1
- import { MappedEnum, PropsWithChildren, RequireOnlyOne } from '@helpers';
2
- export declare const enum TextAspects {
3
- default = 1,
4
- subdued = 2,
5
- light = 4,
6
- critical = 8,
7
- success = 16,
8
- onPrimary = 32,
9
- onCritical = 64
10
- }
11
- declare type TextOptions<T> = MappedEnum<typeof TextAspects, T>;
12
- export declare const TextAspectColors: {
13
- 1: "#1F2937";
14
- 2: "#6B7280";
15
- 4: "#9CA3AF";
16
- 32: "#FFFFFF";
17
- 64: "#FFFFFF";
18
- 16: "#059669";
19
- 8: "#DC2626";
20
- };
21
- export declare type ITextAspectProps = Partial<RequireOnlyOne<TextOptions<boolean>>> & PropsWithChildren;
22
- export declare type TransientTextOptions = Omit<TextOptions<boolean>, 'onCritical' | 'onPrimary'> & {
23
- $onCritical?: boolean;
24
- $onPrimary?: boolean;
25
- };
26
- export declare type ITransientTextAspectProps = Partial<RequireOnlyOne<TransientTextOptions>> & {
27
- $underlined?: boolean;
28
- } & PropsWithChildren;
29
- export declare function getTextAspect(props: ITextAspectProps & ITransientTextAspectProps): "#9CA3AF" | "#6B7280" | "#1F2937" | "#DC2626" | "#059669" | "#FFFFFF";
30
- export {};
1
+ import { MappedEnum, PropsWithChildren, RequireOnlyOne } from '@helpers';
2
+ export declare const enum TextAspects {
3
+ default = 1,
4
+ subdued = 2,
5
+ light = 4,
6
+ critical = 8,
7
+ success = 16,
8
+ onPrimary = 32,
9
+ onCritical = 64
10
+ }
11
+ type TextOptions<T> = MappedEnum<typeof TextAspects, T>;
12
+ export declare const TextAspectColors: {
13
+ 1: "#1F2937";
14
+ 2: "#6B7280";
15
+ 4: "#9CA3AF";
16
+ 32: "#FFFFFF";
17
+ 64: "#FFFFFF";
18
+ 16: "#059669";
19
+ 8: "#DC2626";
20
+ };
21
+ export type ITextAspectProps = Partial<RequireOnlyOne<TextOptions<boolean>>> & PropsWithChildren;
22
+ export type TransientTextOptions = Omit<TextOptions<boolean>, 'onCritical' | 'onPrimary'> & {
23
+ $onCritical?: boolean;
24
+ $onPrimary?: boolean;
25
+ };
26
+ export type ITransientTextAspectProps = Partial<RequireOnlyOne<TransientTextOptions>> & {
27
+ $underlined?: boolean;
28
+ } & PropsWithChildren;
29
+ export declare function getTextAspect(props: ITextAspectProps & ITransientTextAspectProps): "#9CA3AF" | "#6B7280" | "#1F2937" | "#DC2626" | "#059669" | "#FFFFFF";
30
+ export {};
@@ -1,24 +1,24 @@
1
- import { ITransientTextAspectProps } from './text-aspect-flags';
2
- export declare type ILabelProps = ITransientTextAspectProps & {
3
- default?: boolean;
4
- subtle?: boolean;
5
- strong?: boolean;
6
- };
7
- export declare type IBodyProps = ITransientTextAspectProps & {
8
- default?: boolean;
9
- strong?: boolean;
10
- };
11
- export declare const Typography: {
12
- Display: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
13
- Heading1: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
14
- Heading2: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
15
- Heading3: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
16
- Heading4: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
17
- Body: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<IBodyProps, any>>;
18
- BodyLarge: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<IBodyProps, any>>;
19
- Caption: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
20
- Label: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ILabelProps, any>>;
21
- };
22
- export declare const _Typography: {
23
- LightText: import("styled-components").FlattenSimpleInterpolation;
24
- };
1
+ import { ITransientTextAspectProps } from './text-aspect-flags';
2
+ export type ILabelProps = ITransientTextAspectProps & {
3
+ default?: boolean;
4
+ subtle?: boolean;
5
+ strong?: boolean;
6
+ };
7
+ export type IBodyProps = ITransientTextAspectProps & {
8
+ default?: boolean;
9
+ strong?: boolean;
10
+ };
11
+ export declare const Typography: {
12
+ Display: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
13
+ Heading1: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
14
+ Heading2: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
15
+ Heading3: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
16
+ Heading4: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
17
+ Body: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<IBodyProps, any>>;
18
+ BodyLarge: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<IBodyProps, any>>;
19
+ Caption: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ITransientTextAspectProps, any>>;
20
+ Label: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<ILabelProps, any>>;
21
+ };
22
+ export declare const _Typography: {
23
+ LightText: import("styled-components").FlattenSimpleInterpolation;
24
+ };
@@ -1,21 +1,21 @@
1
- import { FC as FunctionComponent, ForwardRefExoticComponent, ForwardRefRenderFunction, PropsWithChildren as PWC, PropsWithoutRef, RefAttributes } from 'react';
2
- import { Slot } from './slots';
3
- /** @see https://stackoverflow.com/a/49725198/29182 */
4
- export declare type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
5
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
6
- }[Keys];
7
- export declare type MappedEnum<E, T> = {
8
- [key in keyof E]: T;
9
- };
10
- export declare type Values<T> = T[keyof T];
11
- export declare type PropsWithChildren<T = unknown> = PWC<T>;
12
- export declare type FC<P = {}, E extends {
13
- [x: symbol]: FunctionComponent<PropsWithChildren> | typeof Slot;
14
- } = {}> = FunctionComponent<P> & {
15
- [key in keyof E]: E[key];
16
- };
17
- declare type ExtensibleForwardRef<T, P = {}, E = {}> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> & {
18
- [key in keyof E]: E[key];
19
- };
20
- export declare function forwardRef<T, P = {}, E = {}>(render: ForwardRefRenderFunction<T, P>): ExtensibleForwardRef<T, P, E>;
21
- export {};
1
+ import { FC as FunctionComponent, ForwardRefExoticComponent, ForwardRefRenderFunction, PropsWithChildren as PWC, PropsWithoutRef, RefAttributes } from 'react';
2
+ import { Slot } from './slots';
3
+ /** @see https://stackoverflow.com/a/49725198/29182 */
4
+ export type RequireOnlyOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
5
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Record<Exclude<Keys, K>, undefined>>;
6
+ }[Keys];
7
+ export type MappedEnum<E, T> = {
8
+ [key in keyof E]: T;
9
+ };
10
+ export type Values<T> = T[keyof T];
11
+ export type PropsWithChildren<T = unknown> = PWC<T>;
12
+ export type FC<P = {}, E extends {
13
+ [x: symbol]: FunctionComponent<PropsWithChildren> | typeof Slot;
14
+ } = {}> = FunctionComponent<P> & {
15
+ [key in keyof E]: E[key];
16
+ };
17
+ type ExtensibleForwardRef<T, P = {}, E = {}> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>> & {
18
+ [key in keyof E]: E[key];
19
+ };
20
+ export declare function forwardRef<T, P = {}, E = {}>(render: ForwardRefRenderFunction<T, P>): ExtensibleForwardRef<T, P, E>;
21
+ export {};
@@ -1,10 +1,10 @@
1
- export * from './safe-navigation';
2
- export * from './slots';
3
- export * from './generic-types';
4
- export * from './numbers';
5
- export * from './nothing';
6
- export * from './strings';
7
- export * from './isReactElementOfType';
8
- export * from './useInputElementState';
9
- export * from './useIsMobile';
10
- export * from './useClickOutside';
1
+ export * from './safe-navigation';
2
+ export * from './slots';
3
+ export * from './generic-types';
4
+ export * from './numbers';
5
+ export * from './nothing';
6
+ export * from './strings';
7
+ export * from './isReactElementOfType';
8
+ export * from './useInputElementState';
9
+ export * from './useIsMobile';
10
+ export * from './useClickOutside';
@@ -1,8 +1,6 @@
1
- import { PureComponent, ReactElement } from 'react';
2
- import { StyledComponent } from 'styled-components';
3
- import { FC } from './generic-types';
4
- export declare const isReactElementOfType: <P extends {
5
- children?: import("react").ReactNode;
6
- }>(component: (FC<P, {}> | typeof PureComponent | StyledComponent<FC<P, {}>, any, {}, never>) & {
7
- target?: any;
8
- }) => (element?: any) => element is ReactElement<P, string | import("react").JSXElementConstructor<any>>;
1
+ import { PureComponent, ReactElement } from 'react';
2
+ import { StyledComponent } from 'styled-components';
3
+ import { FC, PropsWithChildren } from './generic-types';
4
+ export declare const isReactElementOfType: <P extends PropsWithChildren>(component: (StyledComponent<FC<P>, any> | FC<P> | typeof PureComponent) & {
5
+ target?: any;
6
+ }) => (element?: any) => element is ReactElement<P>;
@@ -1,10 +1,9 @@
1
- /// <reference types="react" />
2
- import { FC, PropsWithChildren } from './generic-types';
3
- export declare const Nothing: FC;
4
- export declare const isNothing: (element?: any) => element is import("react").ReactElement<{}, string | import("react").JSXElementConstructor<any>>;
5
- export declare function maybeRender<T>(prop: T, JSX: JSX.Element): JSX.Element;
6
- interface IIfProps {
7
- is: unknown;
8
- }
9
- export declare const If: FC<PropsWithChildren<IIfProps>>;
10
- export {};
1
+ import { FC, PropsWithChildren } from './generic-types';
2
+ export declare const Nothing: FC;
3
+ export declare const isNothing: (element?: any) => element is import("react").ReactElement<{}, string | import("react").JSXElementConstructor<any>>;
4
+ export declare function maybeRender<T>(prop: T, JSX: JSX.Element): JSX.Element;
5
+ interface IIfProps {
6
+ is: unknown;
7
+ }
8
+ export declare const If: FC<PropsWithChildren<IIfProps>>;
9
+ export {};
@@ -1,51 +1,51 @@
1
- export declare type Hex = `#${string}`;
2
- export declare function clamp(a: number, b: number, c: number): number;
3
- export declare function toHex(n: number, length: number): Hex;
4
- export declare function concatHex(a: Hex, b: Hex): Hex;
5
- /** given an array of boolean flags, bitwiseOr interprets them as an unsigned integer
6
- *
7
- * ```ts
8
- * bitwiseOr([false, true, false, true]) => 5 // 0b0101
9
- * ```
10
- *
11
- * This is useful for indexing into an enum:
12
- *
13
- * ```ts
14
- * const enum Level {
15
- * default = 0,
16
- * info = 0,
17
- * danger = 1,
18
- * warning = 2
19
- * }
20
- *
21
- * interface IProps {
22
- * info?: boolean
23
- * danger?: boolean
24
- * warning?: boolean
25
- * }
26
- *
27
- * function toLevel(n: number): Level {
28
- * switch (n) {
29
- * case Level.info: return Level.info
30
- * case Level.danger: return Level.danger
31
- * case Level.warning: return Level.warning
32
- * default: return Level.default
33
- * }
34
- * }
35
- *
36
- * const level = bitwiseOr([props.info, props.danger, props.warning])
37
- *
38
- * const levelEnum = toLevel(level)
39
- * ```
40
- */
41
- export declare function bitwiseOr(flags: unknown[]): number;
42
- /** given a number, it returns the number formed by the rightmost set bit as 1 and the 0s that comes after it
43
- *
44
- * ```ts
45
- * getRightmostSetBitNumber(12) => 4 // 12(1100) => 4(100)
46
- * getRightmostSetBitNumber(40) => 8 // 40(101000) => 8(1000)
47
- * ```
48
- *
49
- * */
50
- export declare function getRightmostSetBitNumber(n: number): number;
51
- export declare function getNumberBetweenMinMax(input: number, min: number, max: number): number;
1
+ export type Hex = `#${string}`;
2
+ export declare function clamp(a: number, b: number, c: number): number;
3
+ export declare function toHex(n: number, length: number): Hex;
4
+ export declare function concatHex(a: Hex, b: Hex): Hex;
5
+ /** given an array of boolean flags, bitwiseOr interprets them as an unsigned integer
6
+ *
7
+ * ```ts
8
+ * bitwiseOr([false, true, false, true]) => 5 // 0b0101
9
+ * ```
10
+ *
11
+ * This is useful for indexing into an enum:
12
+ *
13
+ * ```ts
14
+ * const enum Level {
15
+ * default = 0,
16
+ * info = 0,
17
+ * danger = 1,
18
+ * warning = 2
19
+ * }
20
+ *
21
+ * interface IProps {
22
+ * info?: boolean
23
+ * danger?: boolean
24
+ * warning?: boolean
25
+ * }
26
+ *
27
+ * function toLevel(n: number): Level {
28
+ * switch (n) {
29
+ * case Level.info: return Level.info
30
+ * case Level.danger: return Level.danger
31
+ * case Level.warning: return Level.warning
32
+ * default: return Level.default
33
+ * }
34
+ * }
35
+ *
36
+ * const level = bitwiseOr([props.info, props.danger, props.warning])
37
+ *
38
+ * const levelEnum = toLevel(level)
39
+ * ```
40
+ */
41
+ export declare function bitwiseOr(flags: unknown[]): number;
42
+ /** given a number, it returns the number formed by the rightmost set bit as 1 and the 0s that comes after it
43
+ *
44
+ * ```ts
45
+ * getRightmostSetBitNumber(12) => 4 // 12(1100) => 4(100)
46
+ * getRightmostSetBitNumber(40) => 8 // 40(101000) => 8(1000)
47
+ * ```
48
+ *
49
+ * */
50
+ export declare function getRightmostSetBitNumber(n: number): number;
51
+ export declare function getNumberBetweenMinMax(input: number, min: number, max: number): number;
@@ -1,26 +1,26 @@
1
- import first from 'lodash/first.js';
2
- import isString from 'lodash/isString.js';
3
- import isFunction from 'lodash/isFunction.js';
4
- import uniqueId from 'lodash/uniqueId.js';
5
- import debounce from 'lodash/debounce.js';
6
- import isObject from 'lodash/isObject';
7
- export { first, isString, isFunction, uniqueId, debounce, isObject };
8
- /** even though we have null disabled in the repo,
9
- * I still would not want isNil to skip checking null
10
- * it is for juuuuust in case a third party sends us a null
11
- * or something, and the types are not correct
12
- */
13
- export declare function isNil<T>(value: T | undefined | null): value is undefined | null;
14
- export declare function isDefined<T>(value: T | undefined | null): value is T;
15
- export declare function defaultTo<T>(value: T | undefined | null, fallback: T): T;
16
- export declare function isEmpty<T extends {
17
- length: number;
18
- }>(obj: T): boolean;
19
- export declare function isNilOrEmpty<T extends {
20
- length: number;
21
- }>(obj?: T): boolean;
22
- /** used for evaluating tri-state logic (true | false | undefined) */
23
- export declare function is(pred?: boolean): boolean;
24
- export declare function toArray<T>(obj: T | T[] | undefined | null): T[];
25
- export declare function safeArray<T>(arr: T[] | undefined | null): T[];
26
- export declare function safeCallback<T>(f?: (e: T) => void, e?: T): void;
1
+ import first from 'lodash/first.js';
2
+ import isString from 'lodash/isString.js';
3
+ import isFunction from 'lodash/isFunction.js';
4
+ import uniqueId from 'lodash/uniqueId.js';
5
+ import debounce from 'lodash/debounce.js';
6
+ import isObject from 'lodash/isObject';
7
+ export { first, isString, isFunction, uniqueId, debounce, isObject };
8
+ /** even though we have null disabled in the repo,
9
+ * I still would not want isNil to skip checking null
10
+ * it is for juuuuust in case a third party sends us a null
11
+ * or something, and the types are not correct
12
+ */
13
+ export declare function isNil<T>(value: T | undefined | null): value is undefined | null;
14
+ export declare function isDefined<T>(value: T | undefined | null): value is T;
15
+ export declare function defaultTo<T>(value: T | undefined | null, fallback: T): T;
16
+ export declare function isEmpty<T extends {
17
+ length: number;
18
+ }>(obj: T): boolean;
19
+ export declare function isNilOrEmpty<T extends {
20
+ length: number;
21
+ }>(obj?: T): boolean;
22
+ /** used for evaluating tri-state logic (true | false | undefined) */
23
+ export declare function is(pred?: boolean): boolean;
24
+ export declare function toArray<T>(obj: T | T[] | undefined | null): T[];
25
+ export declare function safeArray<T>(arr: T[] | undefined | null): T[];
26
+ export declare function safeCallback<T>(f?: (e: T) => void, e?: T): void;
@@ -1,17 +1,17 @@
1
- import { CSSProperties, PureComponent, ReactElement, ReactNode } from 'react';
2
- import { FC, PropsWithChildren } from './generic-types';
3
- export declare const isSlotOfType: <T extends typeof Slot>(type: T | FC<{}, {}>) => (obj?: any) => obj is T;
4
- export declare class Slot<T = unknown> extends PureComponent<PropsWithChildren<T>> {
5
- render(): PropsWithChildren<T>["children"] | undefined;
6
- }
7
- export declare class StylableSlot extends Slot {
8
- render(): JSX.Element;
9
- }
10
- /** gets children that are _not_ slots */
11
- export declare function getOtherChildren(children?: ReactNode): ReactNode[];
12
- export declare function getSlots<T extends typeof Slot>(slot: T, children?: ReactNode): ReactElement[];
13
- export declare function getSlot<T extends typeof Slot>(slot: T, children?: ReactNode): ReactElement;
14
- /** given a ReactElement, like a child, apply the given props to it */
15
- export declare function applyProps<T>(element: ReactElement<T>, props: Partial<T>): ReactElement;
16
- /** given a ReactElement, like a child, apply the given styles to it, merging with the existing styles */
17
- export declare function applyStyle(element: ReactElement, style: CSSProperties): ReactElement;
1
+ import { CSSProperties, PureComponent, ReactElement, ReactNode } from 'react';
2
+ import { FC, PropsWithChildren } from './generic-types';
3
+ export declare const isSlotOfType: <T extends typeof Slot>(type: T | FC) => (obj?: any) => obj is T;
4
+ export declare class Slot<T = unknown> extends PureComponent<PropsWithChildren<T>> {
5
+ render(): PropsWithChildren<T>["children"] | undefined;
6
+ }
7
+ export declare class StylableSlot extends Slot {
8
+ render(): import("react/jsx-runtime").JSX.Element;
9
+ }
10
+ /** gets children that are _not_ slots */
11
+ export declare function getOtherChildren(children?: ReactNode): ReactNode[];
12
+ export declare function getSlots<T extends typeof Slot>(slot: T, children?: ReactNode): ReactElement[];
13
+ export declare function getSlot<T extends typeof Slot>(slot: T, children?: ReactNode): ReactElement;
14
+ /** given a ReactElement, like a child, apply the given props to it */
15
+ export declare function applyProps<T>(element: ReactElement<T>, props: Partial<T>): ReactElement;
16
+ /** given a ReactElement, like a child, apply the given styles to it, merging with the existing styles */
17
+ export declare function applyStyle(element: ReactElement, style: CSSProperties): ReactElement;
@@ -1 +1 @@
1
- export declare const toKebabCase: (str: string) => string;
1
+ export declare const toKebabCase: (str: string) => string;
@@ -1,2 +1,2 @@
1
- import * as React from 'react';
2
- export declare function useOnClickOutside(handler: (event: Event) => void): React.RefObject<HTMLDivElement>;
1
+ import * as React from 'react';
2
+ export declare function useOnClickOutside(handler: (event: Event) => void): React.RefObject<HTMLDivElement>;
@@ -1,30 +1,30 @@
1
- declare type IInputElementState<T> = [
2
- T | undefined,
3
- (change: T) => void
4
- ];
5
- /**
6
- *
7
- * This hook is to help implement a common pattern:
8
- *
9
- * <input onChange={doSomething} /> // uncontrolled
10
- * <input value={1} /> // should be marked read only
11
- * <input value={state} onChange={setState} /> // controlled
12
- *
13
- * I've reimplemented this logic a few times, but now I have a nice helper :D
14
- *
15
- * const [state, setState] = useInputElementState({
16
- * value: props.value,
17
- * defaultValue: props.defaultValue, // the value to use if value is undefined
18
- * onChange: props.onChange,
19
- * })
20
- *
21
- * if you give it nothing, you get state, setState for internal state management (uncontrolled input)
22
- * if you give it value only, you get a warning
23
- * if you give it value and onChange, state management if deferred to the parent (controlled input)
24
- */
25
- export declare function useInputElementState<T>(props: {
26
- value?: T;
27
- defaultValue?: T;
28
- onChange?: (change: T) => void;
29
- }): IInputElementState<T>;
30
- export {};
1
+ type IInputElementState<T> = [
2
+ T | undefined,
3
+ (change: T) => void
4
+ ];
5
+ /**
6
+ *
7
+ * This hook is to help implement a common pattern:
8
+ *
9
+ * <input onChange={doSomething} /> // uncontrolled
10
+ * <input value={1} /> // should be marked read only
11
+ * <input value={state} onChange={setState} /> // controlled
12
+ *
13
+ * I've reimplemented this logic a few times, but now I have a nice helper :D
14
+ *
15
+ * const [state, setState] = useInputElementState({
16
+ * value: props.value,
17
+ * defaultValue: props.defaultValue, // the value to use if value is undefined
18
+ * onChange: props.onChange,
19
+ * })
20
+ *
21
+ * if you give it nothing, you get state, setState for internal state management (uncontrolled input)
22
+ * if you give it value only, you get a warning
23
+ * if you give it value and onChange, state management if deferred to the parent (controlled input)
24
+ */
25
+ export declare function useInputElementState<T>(props: {
26
+ value?: T;
27
+ defaultValue?: T;
28
+ onChange?: (change: T) => void;
29
+ }): IInputElementState<T>;
30
+ export {};
@@ -1 +1 @@
1
- export declare const useIsMobile: () => boolean;
1
+ export declare const useIsMobile: () => boolean;
@@ -1 +1 @@
1
- export declare function useKeyDown(targetKey: string, handler: () => void): void;
1
+ export declare function useKeyDown(targetKey: string, handler: () => void): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edvisor/product-language",
3
- "version": "0.11.111",
3
+ "version": "0.11.113",
4
4
  "license": "MIT",
5
5
  "description": "Edvisor.io product-language components",
6
6
  "repository": "https://github.com/edvisor-io/front-end/",
@@ -41,13 +41,13 @@
41
41
  },
42
42
  "release-it": {
43
43
  "git": {
44
+ "changelog": "git log --pretty=format:'* %s (%h)' ${latestTag}...HEAD -- .",
44
45
  "requireCleanWorkingDir": false,
45
- "commitMessage": "chore: release ${version} [skip ci]",
46
- "tagName": "v${version}"
46
+ "commitMessage": "chore: release frontend-v${version} [skip ci]",
47
+ "tagName": "frontend-v${version}"
47
48
  },
48
49
  "github": {
49
- "release": true,
50
- "tokenRef": "BOB"
50
+ "release": true
51
51
  },
52
52
  "npm": {
53
53
  "publish": false,