@box/blueprint-web 13.5.13 → 13.6.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/lib-esm/blueprint-configuration-context/blueprint-configuration-context.d.ts +5 -1
- package/dist/lib-esm/blueprint-configuration-context/blueprint-configuration-context.js +10 -4
- package/dist/lib-esm/blueprint-configuration-context/consts.d.ts +11 -0
- package/dist/lib-esm/blueprint-configuration-context/consts.js +13 -0
- package/package.json +3 -3
|
@@ -12,11 +12,15 @@ export declare const BlueprintConfigurationOptions: {
|
|
|
12
12
|
};
|
|
13
13
|
export interface BlueprintConfiguration {
|
|
14
14
|
typography: TypographyOption;
|
|
15
|
+
componentsWithAnimationEnabled: string[];
|
|
15
16
|
}
|
|
16
17
|
export declare const BlueprintConfigurationContext: import("react").Context<BlueprintConfiguration>;
|
|
17
18
|
export interface BlueprintConfigurationProviderProps {
|
|
18
19
|
children: ReactNode;
|
|
19
20
|
typography?: TypographyOption;
|
|
21
|
+
animationsPhase1Enabled?: boolean;
|
|
22
|
+
animationsPhase2Enabled?: boolean;
|
|
23
|
+
animationsPhase3Enabled?: boolean;
|
|
20
24
|
}
|
|
21
|
-
export declare const BlueprintConfigurationProvider: ({ children, typography, }: BlueprintConfigurationProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const BlueprintConfigurationProvider: ({ children, typography, animationsPhase1Enabled, animationsPhase2Enabled, animationsPhase3Enabled, }: BlueprintConfigurationProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
26
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { createContext, useMemo } from 'react';
|
|
3
|
+
import { ANIMATED_COMPONENTS_BY_PHASE } from './consts.js';
|
|
3
4
|
|
|
4
5
|
var TypographyOption;
|
|
5
6
|
(function (TypographyOption) {
|
|
@@ -14,15 +15,20 @@ const BlueprintConfigurationOptions = {
|
|
|
14
15
|
typography: TypographyOption
|
|
15
16
|
};
|
|
16
17
|
const BlueprintConfigurationContext = /*#__PURE__*/createContext({
|
|
17
|
-
typography: BlueprintConfigurationOptions.typography.lato
|
|
18
|
+
typography: BlueprintConfigurationOptions.typography.lato,
|
|
19
|
+
componentsWithAnimationEnabled: []
|
|
18
20
|
});
|
|
19
21
|
const BlueprintConfigurationProvider = ({
|
|
20
22
|
children,
|
|
21
|
-
typography = BlueprintConfigurationOptions.typography.lato
|
|
23
|
+
typography = BlueprintConfigurationOptions.typography.lato,
|
|
24
|
+
animationsPhase1Enabled = false,
|
|
25
|
+
animationsPhase2Enabled = false,
|
|
26
|
+
animationsPhase3Enabled = false
|
|
22
27
|
}) => {
|
|
23
28
|
const value = useMemo(() => ({
|
|
24
|
-
typography
|
|
25
|
-
|
|
29
|
+
typography,
|
|
30
|
+
componentsWithAnimationEnabled: [...(animationsPhase1Enabled ? ANIMATED_COMPONENTS_BY_PHASE.phase1 : []), ...(animationsPhase2Enabled ? ANIMATED_COMPONENTS_BY_PHASE.phase2 : []), ...(animationsPhase3Enabled ? ANIMATED_COMPONENTS_BY_PHASE.phase3 : [])]
|
|
31
|
+
}), [typography, animationsPhase1Enabled, animationsPhase2Enabled, animationsPhase3Enabled]);
|
|
26
32
|
return jsx(BlueprintConfigurationContext.Provider, {
|
|
27
33
|
value: value,
|
|
28
34
|
children: children
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of components by animations phase:
|
|
3
|
+
* phase1: defined in LXP-104
|
|
4
|
+
* phase2: defined in LXP-1118
|
|
5
|
+
* phase3: defined in LXP-1196 (pending)
|
|
6
|
+
*/
|
|
7
|
+
export declare const ANIMATED_COMPONENTS_BY_PHASE: {
|
|
8
|
+
readonly phase1: readonly ["Button", "IconButton", "DropdownMenu", "Tooltip", "Popover", "SplitButton", "CardTooltip", "NavigationMenu", "Modal", "TextButton", "ContextMenu"];
|
|
9
|
+
readonly phase2: readonly ["DropdownTrigger", "Switch", "Checkbox", "TextInput", "Select", "Datepicker", "TextArea", "Combobox", "PasswordInput", "ComboboxGroup"];
|
|
10
|
+
readonly phase3: readonly [];
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of components by animations phase:
|
|
3
|
+
* phase1: defined in LXP-104
|
|
4
|
+
* phase2: defined in LXP-1118
|
|
5
|
+
* phase3: defined in LXP-1196 (pending)
|
|
6
|
+
*/
|
|
7
|
+
const ANIMATED_COMPONENTS_BY_PHASE = {
|
|
8
|
+
phase1: ['Button', 'IconButton', 'DropdownMenu', 'Tooltip', 'Popover', 'SplitButton', 'CardTooltip', 'NavigationMenu', 'Modal', 'TextButton', 'ContextMenu'],
|
|
9
|
+
phase2: ['DropdownTrigger', 'Switch', 'Checkbox', 'TextInput', 'Select', 'Datepicker', 'TextArea', 'Combobox', 'PasswordInput', 'ComboboxGroup'],
|
|
10
|
+
phase3: []
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export { ANIMATED_COMPONENTS_BY_PHASE };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/blueprint-web",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"publishConfig": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@ariakit/react": "0.4.15",
|
|
49
49
|
"@ariakit/react-core": "0.4.15",
|
|
50
|
-
"@box/blueprint-web-assets": "^4.104.
|
|
50
|
+
"@box/blueprint-web-assets": "^4.104.9",
|
|
51
51
|
"@internationalized/date": "^3.7.0",
|
|
52
52
|
"@radix-ui/react-accordion": "1.1.2",
|
|
53
53
|
"@radix-ui/react-checkbox": "1.0.4",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"type-fest": "^3.2.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@box/storybook-utils": "^0.16.
|
|
80
|
+
"@box/storybook-utils": "^0.16.70",
|
|
81
81
|
"@figma/code-connect": "1.3.12",
|
|
82
82
|
"@types/react": "^18.0.0",
|
|
83
83
|
"@types/react-dom": "^18.0.0",
|