@bolio-ui/core 3.0.0-alpha.2 → 3.0.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/Alert/Alert.d.ts +20 -0
- package/dist/Alert/index.d.ts +3 -0
- package/dist/Alert/index.js +16 -0
- package/dist/BolioUIProvider/index.js +7 -6
- package/dist/Button/index.js +3 -3
- package/dist/ButtonDropdown/index.js +3 -2
- package/dist/Calendar/index.js +2 -2
- package/dist/Chip/Chip.d.ts +17 -0
- package/dist/Chip/ChipContext.d.ts +11 -0
- package/dist/Chip/ChipGroup.d.ts +16 -0
- package/dist/Chip/index.d.ts +9 -0
- package/dist/Chip/index.js +15 -0
- package/dist/ColorInput/index.js +3 -2
- package/dist/Combobox/index.js +3 -2
- package/dist/Command/index.js +9 -8
- package/dist/ContextMenu/index.js +5 -4
- package/dist/DatePicker/index.js +4 -3
- package/dist/DateRangePicker/index.js +4 -3
- package/dist/Drawer/index.js +6 -5
- package/dist/Grid/Grid.d.ts +16 -16
- package/dist/Grid/GridContainer.d.ts +16 -16
- package/dist/Mention/Mention.d.ts +25 -0
- package/dist/Mention/index.d.ts +3 -0
- package/dist/Mention/index.js +17 -0
- package/dist/Menu/index.js +4 -3
- package/dist/Modal/index.js +8 -7
- package/dist/Note/Note.d.ts +10 -0
- package/dist/Note/index.js +3 -2
- package/dist/Popover/index.js +4 -3
- package/dist/Select/index.js +7 -6
- package/dist/Table/index.js +3 -3
- package/dist/Toolbar/Toolbar.d.ts +11 -0
- package/dist/Toolbar/ToolbarSeparator.d.ts +4 -0
- package/dist/Toolbar/index.d.ts +9 -0
- package/dist/Toolbar/index.js +14 -0
- package/dist/Tooltip/index.js +3 -2
- package/dist/Tour/index.js +5 -4
- package/dist/{chunk-PGQYW6YF.js → chunk-25NFUHLR.js} +12 -8
- package/dist/{chunk-AFBCMW2I.js → chunk-26KDVRFS.js} +1 -3
- package/dist/{chunk-4ZGR7UMX.js → chunk-4DH6SOK4.js} +10 -6
- package/dist/chunk-CGS2MT3G.js +10 -0
- package/dist/{chunk-6ZBFUZSL.js → chunk-CU6SNPIM.js} +25 -22
- package/dist/chunk-CY5KTINE.js +107 -0
- package/dist/{chunk-IJGIEX5J.js → chunk-DEMQXB46.js} +6 -2
- package/dist/{chunk-3S6G7WGK.js → chunk-DYYSUJ35.js} +2 -2
- package/dist/chunk-EUYSKHRS.js +13 -0
- package/dist/{chunk-FL6J36B7.js → chunk-FLUNRVVG.js} +9 -5
- package/dist/chunk-FQWH4PDK.js +165 -0
- package/dist/chunk-FSO65ZAH.js +249 -0
- package/dist/{chunk-2EYJZXS4.js → chunk-ICACLCJR.js} +13 -8
- package/dist/{chunk-XF4TPE2W.js → chunk-IL7L3BEL.js} +7 -2
- package/dist/{chunk-MGHMAZRL.js → chunk-KRSISARC.js} +7 -3
- package/dist/{chunk-4QA7Z7VP.js → chunk-M64V32WO.js} +6 -3
- package/dist/chunk-Q3I54DUS.js +131 -0
- package/dist/{chunk-SGWX6H4Y.js → chunk-RWRFOGCU.js} +6 -2
- package/dist/{chunk-STYC6O24.js → chunk-SJVWKNGY.js} +10 -6
- package/dist/{chunk-P245HSVB.js → chunk-TLVSZCKU.js} +2 -1
- package/dist/{chunk-AG2NWQYL.js → chunk-WCTANCLG.js} +3 -1
- package/dist/{chunk-DIMJQLWY.js → chunk-XUNC7RB7.js} +9 -5
- package/dist/{chunk-GGCVPMXO.js → chunk-Y432C24Z.js} +2 -2
- package/dist/{chunk-BHQRX76X.js → chunk-YLLPYRJH.js} +12 -7
- package/dist/css/Alert.css +53 -0
- package/dist/css/Chip-ChipGroup.css +8 -0
- package/dist/css/Chip.css +65 -0
- package/dist/css/ColorInput.css +7 -1
- package/dist/css/ColorPicker.css +5 -1
- package/dist/css/Combobox.css +1 -0
- package/dist/css/DatePicker.css +1 -0
- package/dist/css/DateRangePicker.css +1 -0
- package/dist/css/Input.css +1 -0
- package/dist/css/Mention.css +93 -0
- package/dist/css/Modal-ModalAction.css +6 -1
- package/dist/css/Modal-ModalActions.css +9 -2
- package/dist/css/NumberInput.css +1 -0
- package/dist/css/PinInput.css +1 -0
- package/dist/css/TagsInput.css +1 -0
- package/dist/css/Textarea.css +1 -0
- package/dist/css/Toolbar.css +32 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +78 -60
- package/dist/styles.css +3487 -3201
- package/dist/utils/surface.d.ts +6 -0
- package/esm/Alert/Alert.d.ts +20 -0
- package/esm/Alert/index.d.ts +3 -0
- package/esm/Alert/index.js +16 -0
- package/esm/BolioUIProvider/index.js +6 -5
- package/esm/Button/index.js +2 -2
- package/esm/ButtonDropdown/index.js +2 -1
- package/esm/Calendar/index.js +1 -1
- package/esm/Chip/Chip.d.ts +17 -0
- package/esm/Chip/ChipContext.d.ts +11 -0
- package/esm/Chip/ChipGroup.d.ts +16 -0
- package/esm/Chip/index.d.ts +9 -0
- package/esm/Chip/index.js +15 -0
- package/esm/ColorInput/index.js +2 -1
- package/esm/Combobox/index.js +2 -1
- package/esm/Command/index.js +8 -7
- package/esm/ContextMenu/index.js +4 -3
- package/esm/DatePicker/index.js +3 -2
- package/esm/DateRangePicker/index.js +3 -2
- package/esm/Drawer/index.js +5 -4
- package/esm/Grid/Grid.d.ts +16 -16
- package/esm/Grid/GridContainer.d.ts +16 -16
- package/esm/Mention/Mention.d.ts +25 -0
- package/esm/Mention/index.d.ts +3 -0
- package/esm/Mention/index.js +17 -0
- package/esm/Menu/index.js +3 -2
- package/esm/Modal/index.js +7 -6
- package/esm/Note/Note.d.ts +10 -0
- package/esm/Note/index.js +2 -1
- package/esm/Popover/index.js +3 -2
- package/esm/Select/index.js +6 -5
- package/esm/Table/index.js +2 -2
- package/esm/Toolbar/Toolbar.d.ts +11 -0
- package/esm/Toolbar/ToolbarSeparator.d.ts +4 -0
- package/esm/Toolbar/index.d.ts +9 -0
- package/esm/Toolbar/index.js +14 -0
- package/esm/Tooltip/index.js +2 -1
- package/esm/Tour/index.js +4 -3
- package/esm/{chunk-PGQYW6YF.js → chunk-25NFUHLR.js} +7 -3
- package/esm/{chunk-AFBCMW2I.js → chunk-26KDVRFS.js} +2 -4
- package/esm/{chunk-4ZGR7UMX.js → chunk-4DH6SOK4.js} +10 -6
- package/esm/chunk-CGS2MT3G.js +10 -0
- package/esm/{chunk-6ZBFUZSL.js → chunk-CU6SNPIM.js} +15 -12
- package/esm/chunk-CY5KTINE.js +107 -0
- package/esm/{chunk-IJGIEX5J.js → chunk-DEMQXB46.js} +6 -2
- package/esm/{chunk-3S6G7WGK.js → chunk-DYYSUJ35.js} +1 -1
- package/esm/chunk-EUYSKHRS.js +13 -0
- package/esm/{chunk-FL6J36B7.js → chunk-FLUNRVVG.js} +8 -4
- package/esm/chunk-FQWH4PDK.js +165 -0
- package/esm/chunk-FSO65ZAH.js +249 -0
- package/esm/{chunk-2EYJZXS4.js → chunk-ICACLCJR.js} +8 -3
- package/esm/{chunk-XF4TPE2W.js → chunk-IL7L3BEL.js} +7 -2
- package/esm/{chunk-MGHMAZRL.js → chunk-KRSISARC.js} +7 -3
- package/esm/{chunk-4QA7Z7VP.js → chunk-M64V32WO.js} +5 -2
- package/esm/chunk-Q3I54DUS.js +131 -0
- package/esm/{chunk-SGWX6H4Y.js → chunk-RWRFOGCU.js} +6 -2
- package/esm/{chunk-STYC6O24.js → chunk-SJVWKNGY.js} +7 -3
- package/esm/{chunk-P245HSVB.js → chunk-TLVSZCKU.js} +2 -1
- package/esm/{chunk-AG2NWQYL.js → chunk-WCTANCLG.js} +3 -1
- package/esm/{chunk-DIMJQLWY.js → chunk-XUNC7RB7.js} +9 -5
- package/esm/{chunk-GGCVPMXO.js → chunk-Y432C24Z.js} +1 -1
- package/esm/{chunk-BHQRX76X.js → chunk-YLLPYRJH.js} +8 -3
- package/esm/css/Alert.css +53 -0
- package/esm/css/Chip-ChipGroup.css +8 -0
- package/esm/css/Chip.css +65 -0
- package/esm/css/ColorInput.css +7 -1
- package/esm/css/ColorPicker.css +5 -1
- package/esm/css/Combobox.css +1 -0
- package/esm/css/DatePicker.css +1 -0
- package/esm/css/DateRangePicker.css +1 -0
- package/esm/css/Input.css +1 -0
- package/esm/css/Mention.css +93 -0
- package/esm/css/Modal-ModalAction.css +6 -1
- package/esm/css/Modal-ModalActions.css +9 -2
- package/esm/css/NumberInput.css +1 -0
- package/esm/css/PinInput.css +1 -0
- package/esm/css/TagsInput.css +1 -0
- package/esm/css/Textarea.css +1 -0
- package/esm/css/Toolbar.css +32 -0
- package/esm/index.d.ts +8 -0
- package/esm/index.js +94 -76
- package/esm/styles.css +3482 -3196
- package/esm/utils/surface.d.ts +6 -0
- package/package.json +1 -1
- package/dist/{chunk-DXHNQANX.js → chunk-TPZUTHTQ.js} +3 -3
- package/dist/{chunk-TKIUVNKP.js → chunk-XKJDF225.js} +2 -2
- package/dist/{chunk-ZNDN2VPZ.js → chunk-Y5CFWIGV.js} +2 -2
- package/esm/{chunk-DXHNQANX.js → chunk-TPZUTHTQ.js} +3 -3
- package/esm/{chunk-TKIUVNKP.js → chunk-XKJDF225.js} +3 -3
- package/esm/{chunk-ZNDN2VPZ.js → chunk-Y5CFWIGV.js} +3 -3
package/esm/Note/Note.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { NormalTypes } from '../utils/prop-types';
|
|
3
|
+
import { BolioUIThemes } from '../Themes/Presets';
|
|
3
4
|
import type { AnyElement } from '../utils/types';
|
|
4
5
|
export type NoteTypes = NormalTypes;
|
|
5
6
|
interface Props {
|
|
@@ -12,6 +13,15 @@ interface Props {
|
|
|
12
13
|
}
|
|
13
14
|
type NativeAttrs = Omit<React.HTMLAttributes<AnyElement>, keyof Props>;
|
|
14
15
|
export type NoteProps = Props & NativeAttrs;
|
|
16
|
+
export declare const getStatusColor: (type: NoteTypes, { filled, light, subtle }: {
|
|
17
|
+
filled: boolean;
|
|
18
|
+
light: boolean;
|
|
19
|
+
subtle: boolean;
|
|
20
|
+
}, theme: BolioUIThemes) => {
|
|
21
|
+
color: string;
|
|
22
|
+
borderColor: string;
|
|
23
|
+
bgColor: string;
|
|
24
|
+
};
|
|
15
25
|
export declare const NoteComponent: React.ForwardRefExoticComponent<Props & NativeAttrs & {
|
|
16
26
|
children?: React.ReactNode | undefined;
|
|
17
27
|
} & React.RefAttributes<HTMLDivElement>>;
|
package/esm/Note/index.js
CHANGED
package/esm/Popover/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Popover_default
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-Y432C24Z.js";
|
|
5
|
+
import "../chunk-IL7L3BEL.js";
|
|
6
6
|
import "../chunk-V57PNXMD.js";
|
|
7
7
|
import "../chunk-JJFOGZ6V.js";
|
|
8
8
|
import "../chunk-LDTDMDE6.js";
|
|
@@ -12,6 +12,7 @@ import "../chunk-BSDZWWUS.js";
|
|
|
12
12
|
import "../chunk-GJZT47MP.js";
|
|
13
13
|
import "../chunk-DGXZP4VJ.js";
|
|
14
14
|
import "../chunk-3WPRUUZ6.js";
|
|
15
|
+
import "../chunk-EUYSKHRS.js";
|
|
15
16
|
import "../chunk-MAICNLTY.js";
|
|
16
17
|
import "../chunk-UX2B3G6U.js";
|
|
17
18
|
import "../chunk-V5I4ORQQ.js";
|
package/esm/Select/index.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Select_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XUNC7RB7.js";
|
|
5
5
|
import "../chunk-JFNYQSEZ.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-KBZEYKCZ.js";
|
|
7
|
+
import "../chunk-WCTANCLG.js";
|
|
7
8
|
import "../chunk-DSX6YDJM.js";
|
|
8
9
|
import "../chunk-V57PNXMD.js";
|
|
9
10
|
import "../chunk-JJFOGZ6V.js";
|
|
10
|
-
import "../chunk-KBZEYKCZ.js";
|
|
11
11
|
import "../chunk-AXYDJGTN.js";
|
|
12
|
-
import "../chunk-LDTDMDE6.js";
|
|
13
|
-
import "../chunk-BXDUHMWS.js";
|
|
14
12
|
import "../chunk-33BUV2RX.js";
|
|
15
13
|
import "../chunk-GGD4BGH2.js";
|
|
14
|
+
import "../chunk-LDTDMDE6.js";
|
|
15
|
+
import "../chunk-BXDUHMWS.js";
|
|
16
16
|
import "../chunk-ZRORQ2WH.js";
|
|
17
17
|
import "../chunk-GJZT47MP.js";
|
|
18
|
+
import "../chunk-EUYSKHRS.js";
|
|
18
19
|
import "../chunk-MAICNLTY.js";
|
|
19
20
|
import "../chunk-UX2B3G6U.js";
|
|
20
21
|
import "../chunk-V5I4ORQQ.js";
|
package/esm/Table/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Table_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-Y5CFWIGV.js";
|
|
5
5
|
import "../chunk-E5EDUOQT.js";
|
|
6
|
-
import "../chunk-JJFOGZ6V.js";
|
|
7
6
|
import "../chunk-HKOESPKZ.js";
|
|
7
|
+
import "../chunk-JJFOGZ6V.js";
|
|
8
8
|
import "../chunk-AXYDJGTN.js";
|
|
9
9
|
import "../chunk-33BUV2RX.js";
|
|
10
10
|
import "../chunk-GGD4BGH2.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
orientation?: 'horizontal' | 'vertical';
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
type NativeAttrs = Omit<React.HTMLAttributes<HTMLDivElement>, keyof Props>;
|
|
7
|
+
export type ToolbarProps = Props & NativeAttrs;
|
|
8
|
+
declare const Toolbar: import("../use-scale/with-scale").ScaleComponent<HTMLDivElement, Props & NativeAttrs & {
|
|
9
|
+
children?: React.ReactNode | undefined;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default Toolbar;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import Toolbar from './Toolbar';
|
|
2
|
+
import ToolbarSeparator from './ToolbarSeparator';
|
|
3
|
+
export type ToolbarComponentType = typeof Toolbar & {
|
|
4
|
+
Separator: typeof ToolbarSeparator;
|
|
5
|
+
};
|
|
6
|
+
export type { ToolbarProps } from './Toolbar';
|
|
7
|
+
export type { ToolbarSeparatorProps } from './ToolbarSeparator';
|
|
8
|
+
declare const _default: ToolbarComponentType;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import {
|
|
3
|
+
Toolbar_default
|
|
4
|
+
} from "../chunk-Q3I54DUS.js";
|
|
5
|
+
import "../chunk-MAICNLTY.js";
|
|
6
|
+
import "../chunk-UX2B3G6U.js";
|
|
7
|
+
import "../chunk-V5I4ORQQ.js";
|
|
8
|
+
import "../chunk-FEA5BJ35.js";
|
|
9
|
+
import "../chunk-X5PGXMVQ.js";
|
|
10
|
+
import "../chunk-SZIX7BM5.js";
|
|
11
|
+
import "../chunk-5KUROAEP.js";
|
|
12
|
+
export {
|
|
13
|
+
Toolbar_default as default
|
|
14
|
+
};
|
package/esm/Tooltip/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Tooltip_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-IL7L3BEL.js";
|
|
5
5
|
import "../chunk-V57PNXMD.js";
|
|
6
6
|
import "../chunk-JJFOGZ6V.js";
|
|
7
7
|
import "../chunk-LDTDMDE6.js";
|
|
@@ -10,6 +10,7 @@ import "../chunk-ZRORQ2WH.js";
|
|
|
10
10
|
import "../chunk-GJZT47MP.js";
|
|
11
11
|
import "../chunk-DGXZP4VJ.js";
|
|
12
12
|
import "../chunk-3WPRUUZ6.js";
|
|
13
|
+
import "../chunk-EUYSKHRS.js";
|
|
13
14
|
import "../chunk-MAICNLTY.js";
|
|
14
15
|
import "../chunk-UX2B3G6U.js";
|
|
15
16
|
import "../chunk-V5I4ORQQ.js";
|
package/esm/Tour/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import {
|
|
3
3
|
Tour_default
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-SJVWKNGY.js";
|
|
5
5
|
import "../chunk-AXYDJGTN.js";
|
|
6
6
|
import "../chunk-BXDUHMWS.js";
|
|
7
7
|
import "../chunk-ZRORQ2WH.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-TPZUTHTQ.js";
|
|
9
9
|
import "../chunk-BSDZWWUS.js";
|
|
10
|
+
import "../chunk-NDERASK2.js";
|
|
10
11
|
import "../chunk-GJZT47MP.js";
|
|
11
12
|
import "../chunk-RZBEZ26A.js";
|
|
13
|
+
import "../chunk-EUYSKHRS.js";
|
|
12
14
|
import "../chunk-LMDBE6T6.js";
|
|
13
|
-
import "../chunk-NDERASK2.js";
|
|
14
15
|
import "../chunk-MAICNLTY.js";
|
|
15
16
|
import "../chunk-UX2B3G6U.js";
|
|
16
17
|
import "../chunk-V5I4ORQQ.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
ModalTitle_default,
|
|
5
5
|
backdrop_default,
|
|
6
6
|
use_body_scroll_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XKJDF225.js";
|
|
8
8
|
import {
|
|
9
9
|
use_keyboard_default
|
|
10
10
|
} from "./chunk-F3AL4TQZ.js";
|
|
@@ -14,6 +14,9 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
use_portal_default
|
|
16
16
|
} from "./chunk-BXDUHMWS.js";
|
|
17
|
+
import {
|
|
18
|
+
getSurface
|
|
19
|
+
} from "./chunk-EUYSKHRS.js";
|
|
17
20
|
import {
|
|
18
21
|
use_scale_default,
|
|
19
22
|
with_scale_default
|
|
@@ -75,6 +78,7 @@ var placementClasses = {
|
|
|
75
78
|
};
|
|
76
79
|
var DrawerWrapper = React.forwardRef(({ className = "", children, visible = false, placement, ...props }, ref) => {
|
|
77
80
|
const theme = use_theme_default();
|
|
81
|
+
const surface = getSurface(theme, theme.expressiveness.shadowLarge);
|
|
78
82
|
const { SCALES } = use_scale_default();
|
|
79
83
|
const modalContent = useRef(null);
|
|
80
84
|
useImperativeHandle(ref, () => modalContent.current);
|
|
@@ -87,10 +91,10 @@ var DrawerWrapper = React.forwardRef(({ className = "", children, visible = fals
|
|
|
87
91
|
className
|
|
88
92
|
);
|
|
89
93
|
const wrapperStyle = {
|
|
90
|
-
backgroundColor:
|
|
94
|
+
backgroundColor: surface.bg,
|
|
91
95
|
color: theme.palette.foreground,
|
|
92
96
|
borderRadius: `calc(3 * ${theme.layout.radius})`,
|
|
93
|
-
boxShadow:
|
|
97
|
+
boxShadow: surface.shadow,
|
|
94
98
|
fontSize: SCALES.font(1),
|
|
95
99
|
"--drawer-wrapper-padding-left": SCALES.pl(1.3125),
|
|
96
100
|
"--drawer-wrapper-padding-right": SCALES.pr(1.3125),
|
|
@@ -92,9 +92,7 @@ NoteComponent.displayName = "BolioUINote";
|
|
|
92
92
|
var Note = with_scale_default(NoteComponent);
|
|
93
93
|
var Note_default = Note;
|
|
94
94
|
|
|
95
|
-
// core/Note/index.ts
|
|
96
|
-
var Note_default2 = Note_default;
|
|
97
|
-
|
|
98
95
|
export {
|
|
99
|
-
|
|
96
|
+
getStatusColor,
|
|
97
|
+
Note_default
|
|
100
98
|
};
|
|
@@ -6,21 +6,24 @@ import {
|
|
|
6
6
|
defaultToastLayout,
|
|
7
7
|
useBolioUIContext
|
|
8
8
|
} from "./chunk-A3BIV2QM.js";
|
|
9
|
+
import {
|
|
10
|
+
use_current_state_default
|
|
11
|
+
} from "./chunk-33BUV2RX.js";
|
|
9
12
|
import {
|
|
10
13
|
css_transition_default
|
|
11
14
|
} from "./chunk-LDTDMDE6.js";
|
|
12
15
|
import {
|
|
13
16
|
use_portal_default
|
|
14
17
|
} from "./chunk-BXDUHMWS.js";
|
|
15
|
-
import {
|
|
16
|
-
use_current_state_default
|
|
17
|
-
} from "./chunk-33BUV2RX.js";
|
|
18
18
|
import {
|
|
19
19
|
use_latest_default
|
|
20
20
|
} from "./chunk-ZRORQ2WH.js";
|
|
21
21
|
import {
|
|
22
22
|
Button_default
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TPZUTHTQ.js";
|
|
24
|
+
import {
|
|
25
|
+
getSurface
|
|
26
|
+
} from "./chunk-EUYSKHRS.js";
|
|
24
27
|
import {
|
|
25
28
|
use_theme_default
|
|
26
29
|
} from "./chunk-V5I4ORQQ.js";
|
|
@@ -156,12 +159,13 @@ var ToastItem = React2.memo(({ toast, layout }) => {
|
|
|
156
159
|
() => getTranslateByPlacement(placement),
|
|
157
160
|
[placement]
|
|
158
161
|
);
|
|
162
|
+
const surface = getSurface(theme, theme.expressiveness.shadowSmall);
|
|
159
163
|
const toastStyle = {
|
|
160
164
|
"--toast-item-max-height": maxHeight,
|
|
161
165
|
"--toast-item-color": color,
|
|
162
|
-
"--toast-item-bg": bgColor,
|
|
166
|
+
"--toast-item-bg": bgColor === theme.palette.background ? surface.bg : bgColor,
|
|
163
167
|
"--toast-item-radius": theme.layout.radius,
|
|
164
|
-
"--toast-item-shadow":
|
|
168
|
+
"--toast-item-shadow": surface.shadow,
|
|
165
169
|
"--toast-item-margin": margin,
|
|
166
170
|
"--toast-item-padding": padding,
|
|
167
171
|
"--toast-item-enter-transform": enter,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
backdrop_default,
|
|
7
7
|
useModalContext,
|
|
8
8
|
use_body_scroll_default
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XKJDF225.js";
|
|
10
10
|
import {
|
|
11
11
|
use_keyboard_default
|
|
12
12
|
} from "./chunk-F3AL4TQZ.js";
|
|
@@ -18,7 +18,10 @@ import {
|
|
|
18
18
|
} from "./chunk-BXDUHMWS.js";
|
|
19
19
|
import {
|
|
20
20
|
Button_default
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TPZUTHTQ.js";
|
|
22
|
+
import {
|
|
23
|
+
getSurface
|
|
24
|
+
} from "./chunk-EUYSKHRS.js";
|
|
22
25
|
import {
|
|
23
26
|
use_scale_default,
|
|
24
27
|
with_scale_default
|
|
@@ -81,11 +84,12 @@ var ModalWrapper = React.forwardRef(({ className = "", children, visible = false
|
|
|
81
84
|
}
|
|
82
85
|
}
|
|
83
86
|
};
|
|
87
|
+
const surface = getSurface(theme, theme.expressiveness.shadowLarge);
|
|
84
88
|
const wrapperStyle = {
|
|
85
|
-
backgroundColor:
|
|
89
|
+
backgroundColor: surface.bg,
|
|
86
90
|
color: theme.palette.foreground,
|
|
87
91
|
borderRadius: theme.layout.radius,
|
|
88
|
-
boxShadow:
|
|
92
|
+
boxShadow: surface.shadow,
|
|
89
93
|
fontSize: SCALES.font(1),
|
|
90
94
|
height: SCALES.height(1, "auto"),
|
|
91
95
|
"--modal-wrapper-padding-left": SCALES.pl(1.3125),
|
|
@@ -163,15 +167,14 @@ var ModalActionComponent = React2.forwardRef(function({
|
|
|
163
167
|
const color = useMemo(() => {
|
|
164
168
|
return passive ? theme.palette.accents_5 : theme.palette.foreground;
|
|
165
169
|
}, [theme.palette, passive]);
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
}, [theme.palette, disabled]);
|
|
170
|
+
const actionBg = theme.type === "dark" ? theme.palette.accents_2 : theme.palette.background;
|
|
171
|
+
const hoverBg = theme.type === "dark" ? theme.palette.accents_3 : theme.palette.accents_1;
|
|
169
172
|
const classes = use_classes_default(ModalAction_module_css_default.action, className);
|
|
170
173
|
const actionStyle = {
|
|
171
174
|
fontSize: SCALES.font(0.75),
|
|
172
175
|
border: "none",
|
|
173
176
|
color,
|
|
174
|
-
backgroundColor:
|
|
177
|
+
backgroundColor: actionBg,
|
|
175
178
|
display: "flex",
|
|
176
179
|
WebkitBoxAlign: "center",
|
|
177
180
|
alignItems: "center",
|
|
@@ -182,11 +185,10 @@ var ModalActionComponent = React2.forwardRef(function({
|
|
|
182
185
|
borderRadius: 0,
|
|
183
186
|
minWidth: 0,
|
|
184
187
|
"--modal-action-hover-color": disabled ? color : theme.palette.foreground,
|
|
185
|
-
"--modal-action-hover-bg": disabled ?
|
|
188
|
+
"--modal-action-hover-bg": disabled ? actionBg : hoverBg
|
|
186
189
|
};
|
|
187
190
|
const overrideProps = {
|
|
188
191
|
...props,
|
|
189
|
-
effect: false,
|
|
190
192
|
ref: btnRef
|
|
191
193
|
};
|
|
192
194
|
return /* @__PURE__ */ jsx2(
|
|
@@ -222,6 +224,7 @@ var ModalActionsComponent = ({
|
|
|
222
224
|
}) => {
|
|
223
225
|
const theme = use_theme_default();
|
|
224
226
|
const ref = useRef3(null);
|
|
227
|
+
const border = theme.type === "dark" ? theme.palette.accents_4 : theme.palette.border;
|
|
225
228
|
const [height, setHeight] = useState("auto");
|
|
226
229
|
useEffect2(() => {
|
|
227
230
|
if (!ref.current) return;
|
|
@@ -236,10 +239,10 @@ var ModalActionsComponent = ({
|
|
|
236
239
|
...props,
|
|
237
240
|
className: ModalActions_module_css_default.footer,
|
|
238
241
|
style: {
|
|
239
|
-
borderTop: `1px solid ${
|
|
242
|
+
borderTop: `1px solid ${border}`,
|
|
240
243
|
borderBottomLeftRadius: theme.layout.radius,
|
|
241
244
|
borderBottomRightRadius: theme.layout.radius,
|
|
242
|
-
"--modal-actions-border":
|
|
245
|
+
"--modal-actions-border": border
|
|
243
246
|
},
|
|
244
247
|
children
|
|
245
248
|
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getStatusColor
|
|
3
|
+
} from "./chunk-26KDVRFS.js";
|
|
4
|
+
import {
|
|
5
|
+
use_scale_default,
|
|
6
|
+
with_scale_default
|
|
7
|
+
} from "./chunk-MAICNLTY.js";
|
|
8
|
+
import {
|
|
9
|
+
use_theme_default
|
|
10
|
+
} from "./chunk-V5I4ORQQ.js";
|
|
11
|
+
import {
|
|
12
|
+
use_classes_default
|
|
13
|
+
} from "./chunk-5KUROAEP.js";
|
|
14
|
+
|
|
15
|
+
// core/Alert/Alert.tsx
|
|
16
|
+
import React, { useMemo } from "react";
|
|
17
|
+
|
|
18
|
+
// css-module-source:/Users/brunnoandrade/Desktop/BolioUI/bolio-ui/core/Alert/Alert.module.css.bolio-css-module-source
|
|
19
|
+
var Alert_module_css_default = { "alert": "Alert-module_alert__Ghxl7", "icon": "Alert-module_icon__hcZdu", "body": "Alert-module_body__SuUYD", "title": "Alert-module_title__8yipK", "close": "Alert-module_close__ZPg5d" };
|
|
20
|
+
|
|
21
|
+
// core/Alert/Alert.tsx
|
|
22
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
23
|
+
var AlertComponent = React.forwardRef(
|
|
24
|
+
({
|
|
25
|
+
children,
|
|
26
|
+
type = "default",
|
|
27
|
+
title,
|
|
28
|
+
icon,
|
|
29
|
+
filled = false,
|
|
30
|
+
light = false,
|
|
31
|
+
subtle = false,
|
|
32
|
+
onClose,
|
|
33
|
+
closeLabel = "Close",
|
|
34
|
+
className = "",
|
|
35
|
+
style,
|
|
36
|
+
...props
|
|
37
|
+
}, ref) => {
|
|
38
|
+
const theme = use_theme_default();
|
|
39
|
+
const { SCALES } = use_scale_default();
|
|
40
|
+
const { color, borderColor, bgColor } = useMemo(
|
|
41
|
+
() => getStatusColor(type, { filled, light, subtle }, theme),
|
|
42
|
+
[type, filled, light, subtle, theme]
|
|
43
|
+
);
|
|
44
|
+
const alertStyle = {
|
|
45
|
+
border: `1px solid ${borderColor}`,
|
|
46
|
+
color,
|
|
47
|
+
backgroundColor: bgColor,
|
|
48
|
+
borderRadius: theme.layout.radius,
|
|
49
|
+
fontSize: SCALES.font(0.875),
|
|
50
|
+
width: SCALES.width(1, "auto"),
|
|
51
|
+
height: SCALES.height(1, "auto"),
|
|
52
|
+
padding: `${SCALES.pt(0.75)} ${SCALES.pr(1)} ${SCALES.pb(0.75)} ${SCALES.pl(1)}`,
|
|
53
|
+
margin: `${SCALES.mt(0)} ${SCALES.mr(0)} ${SCALES.mb(0)} ${SCALES.ml(0)}`,
|
|
54
|
+
...style
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ jsxs(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
ref,
|
|
60
|
+
role: type === "error" || type === "warning" ? "alert" : "status",
|
|
61
|
+
className: use_classes_default(Alert_module_css_default.alert, className),
|
|
62
|
+
...props,
|
|
63
|
+
style: alertStyle,
|
|
64
|
+
children: [
|
|
65
|
+
icon && /* @__PURE__ */ jsx("span", { className: Alert_module_css_default.icon, "aria-hidden": "true", children: icon }),
|
|
66
|
+
/* @__PURE__ */ jsxs("div", { className: Alert_module_css_default.body, children: [
|
|
67
|
+
title && /* @__PURE__ */ jsx("div", { className: Alert_module_css_default.title, children: title }),
|
|
68
|
+
children
|
|
69
|
+
] }),
|
|
70
|
+
onClose && /* @__PURE__ */ jsx(
|
|
71
|
+
"button",
|
|
72
|
+
{
|
|
73
|
+
type: "button",
|
|
74
|
+
className: Alert_module_css_default.close,
|
|
75
|
+
"aria-label": closeLabel,
|
|
76
|
+
onClick: onClose,
|
|
77
|
+
children: /* @__PURE__ */ jsx(
|
|
78
|
+
"svg",
|
|
79
|
+
{
|
|
80
|
+
viewBox: "0 0 24 24",
|
|
81
|
+
width: "16",
|
|
82
|
+
height: "16",
|
|
83
|
+
fill: "none",
|
|
84
|
+
stroke: "currentColor",
|
|
85
|
+
strokeWidth: "2",
|
|
86
|
+
strokeLinecap: "round",
|
|
87
|
+
"aria-hidden": "true",
|
|
88
|
+
children: /* @__PURE__ */ jsx("path", { d: "M18 6 6 18M6 6l12 12" })
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
AlertComponent.displayName = "BolioUIAlert";
|
|
99
|
+
var Alert = with_scale_default(AlertComponent);
|
|
100
|
+
var Alert_default = Alert;
|
|
101
|
+
|
|
102
|
+
// core/Alert/index.ts
|
|
103
|
+
var Alert_default2 = Alert_default;
|
|
104
|
+
|
|
105
|
+
export {
|
|
106
|
+
Alert_default2 as Alert_default
|
|
107
|
+
};
|
|
@@ -11,6 +11,9 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
use_click_away_default
|
|
13
13
|
} from "./chunk-DGXZP4VJ.js";
|
|
14
|
+
import {
|
|
15
|
+
getSurface
|
|
16
|
+
} from "./chunk-EUYSKHRS.js";
|
|
14
17
|
import {
|
|
15
18
|
use_scale_default,
|
|
16
19
|
with_scale_default
|
|
@@ -57,6 +60,7 @@ var ColorInputComponent = React.forwardRef(
|
|
|
57
60
|
...props
|
|
58
61
|
}, ref) => {
|
|
59
62
|
const theme = use_theme_default();
|
|
63
|
+
const surface = getSurface(theme);
|
|
60
64
|
const { SCALES } = use_scale_default();
|
|
61
65
|
const generatedId = useId();
|
|
62
66
|
const inputId = props.id || generatedId;
|
|
@@ -122,9 +126,9 @@ var ColorInputComponent = React.forwardRef(
|
|
|
122
126
|
"--colorinput-focus-border": colors.focusBorder,
|
|
123
127
|
"--colorinput-placeholder": colors.placeholderColor,
|
|
124
128
|
"--colorinput-color": colors.color,
|
|
125
|
-
"--colorinput-popup-bg":
|
|
129
|
+
"--colorinput-popup-bg": surface.bg,
|
|
126
130
|
"--colorinput-popup-border": theme.palette.border,
|
|
127
|
-
"--colorinput-shadow":
|
|
131
|
+
"--colorinput-shadow": surface.shadow
|
|
128
132
|
};
|
|
129
133
|
return /* @__PURE__ */ jsxs(
|
|
130
134
|
"div",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// core/utils/surface.ts
|
|
2
|
+
var getSurface = (theme, shadow = theme.expressiveness.shadowMedium) => {
|
|
3
|
+
const dark = theme.type === "dark";
|
|
4
|
+
return {
|
|
5
|
+
bg: dark ? theme.palette.accents_3 : theme.palette.background,
|
|
6
|
+
hover: dark ? theme.palette.accents_4 : theme.palette.accents_2,
|
|
7
|
+
shadow: dark ? `0 2px 6px rgb(0 0 0 / 40%), ${shadow}` : shadow
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
getSurface
|
|
13
|
+
};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dropdown_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WCTANCLG.js";
|
|
4
4
|
import {
|
|
5
5
|
use_click_away_default
|
|
6
6
|
} from "./chunk-DGXZP4VJ.js";
|
|
7
|
+
import {
|
|
8
|
+
getSurface
|
|
9
|
+
} from "./chunk-EUYSKHRS.js";
|
|
7
10
|
import {
|
|
8
11
|
use_scale_default,
|
|
9
12
|
with_scale_default
|
|
@@ -130,13 +133,14 @@ var MenuList = ({
|
|
|
130
133
|
const isCharacter = event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey;
|
|
131
134
|
if (isCharacter) typeahead(event.key, items, index);
|
|
132
135
|
};
|
|
136
|
+
const surface = getSurface(theme);
|
|
133
137
|
const listStyle = {
|
|
134
138
|
"--menu-list-font-size": SCALES.font(0.875),
|
|
135
139
|
"--menu-list-color": theme.palette.foreground,
|
|
136
|
-
"--menu-list-bg":
|
|
140
|
+
"--menu-list-bg": surface.bg,
|
|
137
141
|
"--menu-list-border-color": theme.palette.border,
|
|
138
142
|
"--menu-list-radius": theme.layout.radius,
|
|
139
|
-
"--menu-list-shadow":
|
|
143
|
+
"--menu-list-shadow": surface.shadow
|
|
140
144
|
};
|
|
141
145
|
return /* @__PURE__ */ jsx(MenuListContext.Provider, { value: { openSub, setOpenSub }, children: /* @__PURE__ */ jsx(
|
|
142
146
|
"div",
|
|
@@ -321,7 +325,7 @@ var MenuItemBase = React4.forwardRef(
|
|
|
321
325
|
};
|
|
322
326
|
const itemStyle = {
|
|
323
327
|
"--menu-item-color": theme.palette.foreground,
|
|
324
|
-
"--menu-item-focus-bg": theme.
|
|
328
|
+
"--menu-item-focus-bg": getSurface(theme).hover,
|
|
325
329
|
"--menu-item-error-color": theme.palette.error,
|
|
326
330
|
"--menu-item-error-focus-bg": theme.palette.errorLight,
|
|
327
331
|
"--menu-item-error-focus-color": theme.palette.errorDark,
|