blue-react 9.7.2 → 9.9.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/dist/components/ActionMenu.js +12 -2
- package/dist/components/ActionMenuItem.js +73 -0
- package/dist/components/Caret.js +1 -0
- package/dist/components/Chevron.js +46 -0
- package/dist/components/Layout.js +1 -1
- package/dist/components/MenuItem.js +4 -4
- package/dist/style.css +3568 -3
- package/dist/style.min.css +3 -3
- package/dist/style.scss +25 -1
- package/dist/styles/_action-menu.scss +1 -1
- package/dist/types/components/ActionMenu.d.ts +5 -2
- package/dist/types/components/ActionMenuItem.d.ts +35 -0
- package/dist/types/components/Caret.d.ts +1 -0
- package/dist/types/components/Chevron.d.ts +17 -0
- package/index.d.ts +6 -0
- package/index.js +2 -0
- package/package.json +2 -2
package/dist/style.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Blue React v9.
|
|
2
|
+
* Blue React v9.9.0 (https://bruegmann.github.io/blue-react)
|
|
3
3
|
* Licensed under GNU General Public License v3.0 (https://github.com/bruegmann/blue-react/blob/master/LICENSE).
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -14,6 +14,30 @@
|
|
|
14
14
|
// @import "./styles/_bootstrap";
|
|
15
15
|
@import "node_modules/bootstrap/scss/bootstrap";
|
|
16
16
|
|
|
17
|
+
@import "node_modules/bootstrap/scss/functions";
|
|
18
|
+
@import "node_modules/bootstrap/scss/variables";
|
|
19
|
+
@import "node_modules/bootstrap/scss/variables-dark";
|
|
20
|
+
@import "node_modules/bootstrap/scss/maps";
|
|
21
|
+
@import "node_modules/bootstrap/scss/mixins";
|
|
22
|
+
@import "node_modules/bootstrap/scss/utilities";
|
|
23
|
+
|
|
24
|
+
// Extended Bootstrap utilities with responsive position as mentioned on
|
|
25
|
+
// https://getbootstrap.com/docs/5.3/utilities/api/#enable-responsive
|
|
26
|
+
$utilities: map-merge(
|
|
27
|
+
$utilities,
|
|
28
|
+
(
|
|
29
|
+
"position":
|
|
30
|
+
map-merge(
|
|
31
|
+
map-get($utilities, "position"),
|
|
32
|
+
(
|
|
33
|
+
responsive: true
|
|
34
|
+
)
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
@import "node_modules/bootstrap/scss/utilities/api";
|
|
40
|
+
|
|
17
41
|
// Per CSS-Variablen überschreibbar machen, da es von Bootstrap aus noch nicht möglich ist.
|
|
18
42
|
// Bei neuer Bootstrap-Version prüfen, ob es noch nötig ist.
|
|
19
43
|
.form-check-input:checked {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { breakOption } from "./shared";
|
|
3
|
+
export declare const ActionMenuContext: React.Context<{
|
|
4
|
+
breakOption: breakOption | "none";
|
|
5
|
+
}>;
|
|
3
6
|
export interface ActionMenuProps {
|
|
4
7
|
/**
|
|
5
8
|
* Hides the toggle button in mobile view. Can be useful when using multiple ActionMenus and not show the toggle button for each menu.
|
|
@@ -12,7 +15,7 @@ export interface ActionMenuProps {
|
|
|
12
15
|
toggleIcon?: any;
|
|
13
16
|
className?: string;
|
|
14
17
|
/**
|
|
15
|
-
* "sm" | "md" | "lg" | "xl" | "none"
|
|
18
|
+
* "sm" | "md" | "lg" | "xl" | "none". Default is "lg". The responsive breakpoint at which the menu will be shown as a dropdown.
|
|
16
19
|
*/
|
|
17
20
|
break?: breakOption | "none";
|
|
18
21
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuItemProps } from "./MenuItem";
|
|
3
|
+
export interface ActionMenuItemProps extends MenuItemProps {
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Use this instead of `MenuItem` when you want to use it inside an `ActionMenu` to make it appear as a dropdown.
|
|
7
|
+
*
|
|
8
|
+
* It basically is a shortcut. Instead of writing:
|
|
9
|
+
*
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <ActionMenu>
|
|
12
|
+
* <div className="position-relative z-1">
|
|
13
|
+
* <MenuItem
|
|
14
|
+
* label="Parent"
|
|
15
|
+
* supportOutside
|
|
16
|
+
* dropdownClassName={`position-md-absolute end-0 d-flex flex-column`}
|
|
17
|
+
* >
|
|
18
|
+
* <MenuItem label="Item 1" />
|
|
19
|
+
* </MenuItem>
|
|
20
|
+
* </div>
|
|
21
|
+
* </ActionMenu>
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* you can write:
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <ActionMenu>
|
|
27
|
+
* <ActionMenuItem label="Parent">
|
|
28
|
+
* <MenuItem label="Item 1" />
|
|
29
|
+
* </MenuItem>
|
|
30
|
+
* </ActionMenu>
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* The responsive utility class for absolute position (`position-md-absolute` in this example) is automatically added based on the `break` param of the parent `ActionMenu`.
|
|
34
|
+
*/
|
|
35
|
+
export default function ActionMenuItem({ children, ...props }: ActionMenuItemProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
export interface ChevronProps {
|
|
3
|
+
/**
|
|
4
|
+
* Indicates if open or not.
|
|
5
|
+
*/
|
|
6
|
+
open?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* By default the chevron points to the right when closed. Set mirrored and it will point to the left.
|
|
9
|
+
*/
|
|
10
|
+
mirrored?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
style?: CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Chevron icon component with open state.
|
|
16
|
+
*/
|
|
17
|
+
export default function Chevron({ open, mirrored, className, style }: ChevronProps): JSX.Element;
|
package/index.d.ts
CHANGED
|
@@ -15,12 +15,18 @@ export { ActionMenuProps } from "./dist/types/components/ActionMenu"
|
|
|
15
15
|
export { default as ActionMenuSwitch } from "./dist/types/components/ActionMenuSwitch"
|
|
16
16
|
export { ActionMenuSwitchProps } from "./dist/types/components/ActionMenuSwitch"
|
|
17
17
|
|
|
18
|
+
export { default as ActionMenuItem } from "./dist/types/components/ActionMenuItem"
|
|
19
|
+
export { ActionMenuItemProps } from "./dist/types/components/ActionMenuItem"
|
|
20
|
+
|
|
18
21
|
export { default as Body } from "./dist/types/components/Body"
|
|
19
22
|
export { BodyProps } from "./dist/types/components/Body"
|
|
20
23
|
|
|
21
24
|
export { default as Caret } from "./dist/types/components/Caret"
|
|
22
25
|
export { CaretProps } from "./dist/types/components/Caret"
|
|
23
26
|
|
|
27
|
+
export { default as Chevron } from "./dist/types/components/Chevron"
|
|
28
|
+
export { ChevronProps } from "./dist/types/components/Chevron"
|
|
29
|
+
|
|
24
30
|
export { default as Header } from "./dist/types/components/Header"
|
|
25
31
|
export { HeaderProps } from "./dist/types/components/Header"
|
|
26
32
|
|
package/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
exports.ActionMenu = require("./dist/components/ActionMenu.js")["default"]
|
|
2
2
|
exports.ActionMenuSwitch = require("./dist/components/ActionMenuSwitch.js")["default"]
|
|
3
|
+
exports.ActionMenuItem = require("./dist/components/ActionMenuItem.js")["default"]
|
|
3
4
|
exports.Body = require("./dist/components/Body.js")["default"]
|
|
4
5
|
exports.Caret = require("./dist/components/Caret.js")["default"]
|
|
6
|
+
exports.Chevron = require("./dist/components/Chevron.js")["default"]
|
|
5
7
|
exports.Layout = require("./dist/components/Layout.js")["default"]
|
|
6
8
|
exports.Header = require("./dist/components/Header.js")["default"]
|
|
7
9
|
exports.HeaderTitle = require("./dist/components/HeaderTitle.js")["default"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blue-react",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.9.0",
|
|
4
4
|
"description": "Blue React Components",
|
|
5
5
|
"license": "LGPL-3.0-or-later",
|
|
6
6
|
"main": "index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"start": "react-scripts start",
|
|
18
|
-
"build-docs": "react-scripts build && npm run docgen",
|
|
18
|
+
"build-docs": "react-scripts build && npm run docgen && node indexCssSections.js",
|
|
19
19
|
"build-types": "tsc --declaration --emitDeclarationOnly --declarationDir ./dist/types --noEmit false",
|
|
20
20
|
"build": "babel ./src/components --out-dir ./dist/components --extensions \".tsx,.js,.ts\"",
|
|
21
21
|
"build-css": "node ./setVersionToStyleScss.js && node-sass ./dist/style.scss ./dist/style.css && npx postcss ./dist/style.css --use autoprefixer -r && npx postcss ./dist/style.css --use postcss-minify -o ./dist/style.min.css",
|