@digigov/react-experimental 2.0.0-113e6661 → 2.0.0-36b707c1

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Digigov v2.0.0-113e6661
1
+ /** @license Digigov v2.0.0-36b707c1
2
2
  *
3
3
  * This source code is licensed under the BSD-2-Clause license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -4,6 +4,6 @@ export * from '@digigov/react-core/ModalContent';
4
4
  export * from '@digigov/react-core/ModalAction';
5
5
  export * from '@digigov/ui/app/Modal/hooks';
6
6
  export * from '@digigov/ui/app/Modal/hooks';
7
- export * from '@digigov/ui/app/Modal/Modal';
8
- import Modal from '@digigov/ui/app/Modal/Modal';
7
+ export * from '@digigov/ui/app/Modal/index.web';
8
+ import Modal from '@digigov/ui/app/Modal/index.web';
9
9
  export default Modal;
@@ -8,6 +8,4 @@ declare namespace _default {
8
8
  export default _default;
9
9
  export { Default } from "@digigov/ui/navigation/Breadcrumbs/__stories__/Default";
10
10
  export { WithoutCurrentPage } from "@digigov/ui/navigation/Breadcrumbs/__stories__/WithoutCurrentPage";
11
- export { WithHook } from "@digigov/ui/navigation/Breadcrumbs/__stories__/WithHook";
12
- export { Auto } from "@digigov/ui/navigation/Breadcrumbs/__stories__/Auto";
13
11
  import Breadcrumbs from '@digigov/ui/navigation/Breadcrumbs';
@@ -2,5 +2,4 @@ export * from '@digigov/react-core/Breadcrumbs';
2
2
  export * from '@digigov/react-core/BreadcrumbsList';
3
3
  export * from '@digigov/react-core/BreadcrumbsListItem';
4
4
  import Breadcrumbs from '@digigov/react-core/Breadcrumbs';
5
- export * from '@digigov/ui/navigation/Breadcrumbs/utils';
6
5
  export default Breadcrumbs;
@@ -32,7 +32,7 @@ declare const _default: {
32
32
  '@digigov/ui/app/Modal/auto': {};
33
33
  '@digigov/ui/app/Modal/hooks': {};
34
34
  '@digigov/ui/app/Modal': {};
35
- '@digigov/ui/app/Modal/Modal': {};
35
+ '@digigov/ui/app/Modal/index.web': {};
36
36
  '@digigov/ui/app/NotFound': {};
37
37
  '@digigov/ui/app/OutdatedBrowserBanner/hooks/evaluateBrowserVersion': {};
38
38
  '@digigov/ui/app/OutdatedBrowserBanner/hooks/useOutdatedBrowserCheck': {};
@@ -140,11 +140,7 @@ declare const _default: {
140
140
  '@digigov/ui/layouts/Stack': {};
141
141
  '@digigov/ui/navigation/BackLink': {};
142
142
  '@digigov/ui/navigation/BackToTopLink': {};
143
- '@digigov/ui/navigation/Breadcrumbs/auto': {};
144
- '@digigov/ui/navigation/Breadcrumbs/hooks': {};
145
143
  '@digigov/ui/navigation/Breadcrumbs': {};
146
- '@digigov/ui/navigation/Breadcrumbs/slug': {};
147
- '@digigov/ui/navigation/Breadcrumbs/utils': {};
148
144
  '@digigov/ui/navigation/Drawer/auto': {};
149
145
  '@digigov/ui/navigation/Drawer/hooks': {};
150
146
  '@digigov/ui/navigation/Drawer': {};
@@ -12,53 +12,53 @@ type PolymorphicComponentPropWithRef<C extends React.ElementType, Props = Record
12
12
  */
13
13
  export type BaseProps<C extends React.ElementType> = PolymorphicComponentPropWithRef<C, {
14
14
  /** margin is optional. It has not a default value. */
15
- margin?: spacingValues;
15
+ margin?: SpacingValues | SpacingMediaValues;
16
16
  /** marginTop is optional. It has not a default value. */
17
- marginTop?: spacingValues;
17
+ marginTop?: SpacingValues | SpacingMediaValues;
18
18
  /** marginBottom is optional. It has not a default value. */
19
- marginBottom?: spacingValues;
19
+ marginBottom?: SpacingValues | SpacingMediaValues;
20
20
  /** marginLeft is optional. It has not a default value. */
21
- marginLeft?: spacingValues;
21
+ marginLeft?: SpacingValues | SpacingMediaValues;
22
22
  /** marginRight is optional. It has not a default value. */
23
- marginRight?: spacingValues;
23
+ marginRight?: SpacingValues | SpacingMediaValues;
24
24
  /** Alternative for margin. Margin is optional. It has not a default value. */
25
- m?: spacingValues;
25
+ m?: SpacingValues | SpacingMediaValues;
26
26
  /** Alternative for marginTop. MarginTop is optional. It has not a default value. */
27
- mt?: spacingValues;
27
+ mt?: SpacingValues | SpacingMediaValues;
28
28
  /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */
29
- mb?: spacingValues;
29
+ mb?: SpacingValues | SpacingMediaValues;
30
30
  /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */
31
- ml?: spacingValues;
31
+ ml?: SpacingValues | SpacingMediaValues;
32
32
  /** Alternative for marginRight. MarginRight is optional. It has not a default value. */
33
- mr?: spacingValues;
33
+ mr?: SpacingValues | SpacingMediaValues;
34
34
  /** Alternative for marginX. MarginX is optional. It has not a default value. */
35
- mx?: spacingValues;
35
+ mx?: SpacingValues | SpacingMediaValues;
36
36
  /** Alternative for marginY. MarginY is optional. It has not a default value. */
37
- my?: spacingValues;
37
+ my?: SpacingValues | SpacingMediaValues;
38
38
  /** padding is optional. It has not a default value. */
39
- padding?: spacingValues;
39
+ padding?: SpacingValues | SpacingMediaValues;
40
40
  /** paddingTop is optional. It has not a default value. */
41
- paddingTop?: spacingValues;
41
+ paddingTop?: SpacingValues | SpacingMediaValues;
42
42
  /** paddingBottom is optional. It has not a default value. */
43
- paddingBottom?: spacingValues;
43
+ paddingBottom?: SpacingValues | SpacingMediaValues;
44
44
  /** paddingLeft is optional. It has not a default value. */
45
- paddingLeft?: spacingValues;
45
+ paddingLeft?: SpacingValues | SpacingMediaValues;
46
46
  /** paddingRight is optional. It has not a default value. */
47
- paddingRight?: spacingValues;
47
+ paddingRight?: SpacingValues | SpacingMediaValues;
48
48
  /** Alternative for padding. Padding is optional. It has not a default value. */
49
- p?: spacingValues;
49
+ p?: SpacingValues | SpacingMediaValues;
50
50
  /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */
51
- pt?: spacingValues;
51
+ pt?: SpacingValues | SpacingMediaValues;
52
52
  /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */
53
- pb?: spacingValues;
53
+ pb?: SpacingValues | SpacingMediaValues;
54
54
  /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */
55
- pl?: spacingValues;
55
+ pl?: SpacingValues | SpacingMediaValues;
56
56
  /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */
57
- pr?: spacingValues;
57
+ pr?: SpacingValues | SpacingMediaValues;
58
58
  /** Alternative for paddingX. PaddingX is optional. It has not a default value. */
59
- px?: spacingValues;
59
+ px?: SpacingValues | SpacingMediaValues;
60
60
  /** Alternative for paddingY. PaddingY is optional. It has not a default value. */
61
- py?: spacingValues;
61
+ py?: SpacingValues | SpacingMediaValues;
62
62
  /** printHidden is optional. Default value is false. When true, the component is hidden at print. */
63
63
  printHidden?: boolean;
64
64
  /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/
@@ -88,7 +88,14 @@ export type BaseProps<C extends React.ElementType> = PolymorphicComponentPropWit
88
88
  /** display is optional. It has not a default value. */
89
89
  display?: 'flex' | 'block' | 'none';
90
90
  }>;
91
- type spacingValues = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
91
+ export type SpacingValues = 0 | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
92
+ export type SpacingMediaValues = {
93
+ xs?: SpacingValues;
94
+ sm?: SpacingValues;
95
+ md?: SpacingValues;
96
+ lg?: SpacingValues;
97
+ xl?: SpacingValues;
98
+ };
92
99
  /**
93
100
  * This is the type used in the type annotation for the component
94
101
  */
@@ -20,12 +20,20 @@ export interface StackProps extends BaseProps<'div'> {
20
20
  /**
21
21
  * spacing is optional. Set to the number you want the space to be.
22
22
  */
23
- spacing?: 1 | 2 | 4 | 6 | 8 | 10 | 12;
23
+ spacing?: SpacingValues | SpacingMediaValues;
24
24
  /**
25
25
  * flexWrap is optional. The default value is 'wrap'.
26
26
  */
27
27
  flexWrap?: 'wrap' | 'nowrap';
28
28
  }
29
+ type SpacingValues = 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 11 | 12;
30
+ type SpacingMediaValues = {
31
+ xs?: SpacingValues;
32
+ sm?: SpacingValues;
33
+ md?: SpacingValues;
34
+ lg?: SpacingValues;
35
+ xl?: SpacingValues;
36
+ };
29
37
  /**
30
38
  * ...
31
39
  */
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@digigov/react-experimental",
3
- "version": "2.0.0-113e6661",
3
+ "version": "2.0.0-36b707c1",
4
4
  "description": "@digigov react experimental components",
5
5
  "author": "GRNET Developers <devs@lists.grnet.gr>",
6
6
  "license": "BSD-2-Clause",
7
7
  "main": "./cjs/index.js",
8
8
  "module": "./index.js",
9
9
  "peerDependencies": {
10
- "@digigov/css": "2.0.0-113e6661",
11
- "@digigov/react-icons": "2.0.0-113e6661",
12
- "@digigov/ui": "2.0.0-113e6661",
13
- "@digigov/react-core": "2.0.0-113e6661",
10
+ "@digigov/css": "2.0.0-36b707c1",
11
+ "@digigov/react-icons": "2.0.0-36b707c1",
12
+ "@digigov/ui": "2.0.0-36b707c1",
13
+ "@digigov/react-core": "2.0.0-36b707c1",
14
14
  "clsx": "1.1.1",
15
15
  "react": ">=16.8.0 <19.0.0",
16
16
  "react-dom": ">=16.8.0 <19.0.0"
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const Auto: () => React.JSX.Element;
3
- export default Auto;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const WithHook: () => React.JSX.Element;
3
- export default WithHook;
@@ -1,16 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- import { BreadcrumbsProps } from '@digigov/ui/navigation/Breadcrumbs';
3
- import { UseBreadcrumbsReturn, ConfigData, ChildrenData } from '@digigov/ui/navigation/Breadcrumbs/hooks';
4
- export interface BreadcrumbsListAutoProps extends BreadcrumbsProps {
5
- }
6
- export interface BreadcrumbsAutoProps extends BreadcrumbsProps {
7
- }
8
- export interface BreadcrumbsAutoProps {
9
- items: ConfigData[];
10
- hrefGenerator: (value: ChildrenData) => string;
11
- children: ReactNode;
12
- }
13
- export declare const BreadcrumbsContext: React.Context<UseBreadcrumbsReturn | null>;
14
- export declare const BreadcrumbsAuto: ({ items, hrefGenerator, children }: BreadcrumbsAutoProps) => React.JSX.Element;
15
- export declare const useBreadcrumbsContext: () => UseBreadcrumbsReturn;
16
- export declare const BreadcrumbsListAuto: React.ForwardRefExoticComponent<Omit<BreadcrumbsListAutoProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1,26 +0,0 @@
1
- export interface ChildrenData {
2
- title: string;
3
- href?: string;
4
- pdf?: string;
5
- children?: ChildrenData[];
6
- }
7
- export interface ConfigData {
8
- title: string;
9
- children?: ChildrenData[];
10
- }
11
- export interface BreadcrumbItem {
12
- title: string;
13
- href?: string;
14
- active?: boolean;
15
- }
16
- export interface CurrentItem {
17
- title: string;
18
- children: CurrentItem[];
19
- parents: string[];
20
- }
21
- export interface UseBreadcrumbsReturn {
22
- breadcrumbs: Array<BreadcrumbItem>;
23
- active: CurrentItem;
24
- setActive: (item: string) => void;
25
- }
26
- export declare const useBreadcrumbs: (items: ConfigData[], hrefGenerator: (value: ChildrenData) => string) => UseBreadcrumbsReturn;
@@ -1 +0,0 @@
1
- export declare function slug(text: string, maxWidth?: number): string;
@@ -1 +0,0 @@
1
- export declare const flattenRoutes: (items: any, maxLength?: number, prepend?: string, parents?: string[]) => {};