@box/blueprint-web 13.5.12 → 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.
@@ -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
- }), [typography]);
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 };
@@ -1,4 +1,4 @@
1
1
  import '../index.css';
2
- var styles = {"card":"bp_content_card_module_card--edc60","ghostCard":"bp_content_card_module_ghostCard--edc60","cardContent":"bp_content_card_module_cardContent--edc60","cardTitle":"bp_content_card_module_cardTitle--edc60","cardTitleText":"bp_content_card_module_cardTitleText--edc60","cardBody":"bp_content_card_module_cardBody--edc60","cardBodyText":"bp_content_card_module_cardBodyText--edc60","cardIcon":"bp_content_card_module_cardIcon--edc60","cardBackground":"bp_content_card_module_cardBackground--edc60","image":"bp_content_card_module_image--edc60","iconGhost":"bp_content_card_module_iconGhost--edc60","titleGhost":"bp_content_card_module_titleGhost--edc60","bodyGhost":"bp_content_card_module_bodyGhost--edc60","pillGhostContainer":"bp_content_card_module_pillGhostContainer--edc60","pillGhost":"bp_content_card_module_pillGhost--edc60"};
2
+ var styles = {"card":"bp_content_card_module_card--902ef","ghostCard":"bp_content_card_module_ghostCard--902ef","cardContent":"bp_content_card_module_cardContent--902ef","cardTitle":"bp_content_card_module_cardTitle--902ef","cardTitleText":"bp_content_card_module_cardTitleText--902ef","cardBody":"bp_content_card_module_cardBody--902ef","cardBodyText":"bp_content_card_module_cardBodyText--902ef","cardIcon":"bp_content_card_module_cardIcon--902ef","cardBackground":"bp_content_card_module_cardBackground--902ef","image":"bp_content_card_module_image--902ef","iconGhost":"bp_content_card_module_iconGhost--902ef","titleGhost":"bp_content_card_module_titleGhost--902ef","bodyGhost":"bp_content_card_module_bodyGhost--902ef","pillGhostContainer":"bp_content_card_module_pillGhostContainer--902ef","pillGhost":"bp_content_card_module_pillGhost--902ef"};
3
3
 
4
4
  export { styles as default };
@@ -4739,12 +4739,14 @@
4739
4739
  margin-block:var(--select-content-viewport-option-separator-margin-block);
4740
4740
  }
4741
4741
 
4742
- .bp_content_card_module_card--edc60[data-modern=false],.bp_content_card_module_ghostCard--edc60[data-modern=false]{
4742
+ .bp_content_card_module_card--902ef[data-modern=false],.bp_content_card_module_ghostCard--902ef[data-modern=false]{
4743
+ --content-card-body-display:block;
4743
4744
  --content-card-background-color:var(--surface-surface);
4744
4745
  --content-card-background-height:var(--size-15);
4745
4746
  --content-card-border-radius:var(--size-3);
4746
4747
  --content-card-border-size:var(--border-1);
4747
4748
  --content-card-content-gap:var(--size-2);
4749
+ --content-card-card-content-gap:var(--size-2);
4748
4750
  --content-card-dropshadow:var(--dropshadow-3);
4749
4751
  --content-card-focused-border-color:var(--outline-focus-on-light);
4750
4752
  --content-card-focused-border-size:var(--border-2);
@@ -4766,12 +4768,14 @@
4766
4768
  --content-card-pressed-border:var(--border-1) solid var(--border-card-border);
4767
4769
  }
4768
4770
 
4769
- .bp_content_card_module_card--edc60[data-modern=true],.bp_content_card_module_ghostCard--edc60[data-modern=true]{
4771
+ .bp_content_card_module_card--902ef[data-modern=true],.bp_content_card_module_ghostCard--902ef[data-modern=true]{
4772
+ --content-card-body-display:flex;
4770
4773
  --content-card-background-color:var(--bp-surface-card-surface);
4771
4774
  --content-card-background-height:var(--bp-size-150);
4772
4775
  --content-card-border-radius:var(--bp-radius-08);
4773
4776
  --content-card-border-size:var(--bp-border-01);
4774
4777
  --content-card-content-gap:var(--bp-space-020);
4778
+ --content-card-card-content-gap:unset;
4775
4779
  --content-card-dropshadow:var(--dropshadow-3);
4776
4780
  --content-card-focused-border-color:var(--bp-outline-focus-on-light);
4777
4781
  --content-card-focused-border-size:var(--bp-border-02);
@@ -4793,7 +4797,7 @@
4793
4797
  --content-card-pressed-border:var(--bp-border-01) solid var(--bp-border-card-border);
4794
4798
  }
4795
4799
 
4796
- .bp_content_card_module_card--edc60{
4800
+ .bp_content_card_module_card--902ef{
4797
4801
  background-color:var(--content-card-background-color);
4798
4802
  border:var(--content-card-border);
4799
4803
  border-radius:var(--content-card-border-radius);
@@ -4804,30 +4808,30 @@
4804
4808
  padding:var(--content-card-padding);
4805
4809
  position:relative;
4806
4810
  }
4807
- .bp_content_card_module_card--edc60:hover{
4811
+ .bp_content_card_module_card--902ef:hover{
4808
4812
  box-shadow:var(--content-card-dropshadow);
4809
4813
  }
4810
- .bp_content_card_module_card--edc60:focus-visible{
4814
+ .bp_content_card_module_card--902ef:focus-visible{
4811
4815
  border:var(--content-card-focused-border);
4812
4816
  box-shadow:var(--content-card-dropshadow);
4813
4817
  outline:none;
4814
4818
  }
4815
- .bp_content_card_module_card--edc60:active{
4819
+ .bp_content_card_module_card--902ef:active{
4816
4820
  background-color:var(--content-card-pressed-background-color);
4817
4821
  border:var(--content-card-pressed-border);
4818
4822
  box-shadow:none;
4819
4823
  }
4820
4824
 
4821
- .bp_content_card_module_cardContent--edc60{
4825
+ .bp_content_card_module_cardContent--902ef{
4822
4826
  display:flex;
4823
4827
  flex-direction:column;
4824
- gap:var(--content-card-content-gap);
4828
+ gap:var(--content-card-card-content-gap);
4825
4829
  height:100%;
4826
4830
  justify-content:space-between;
4827
4831
  padding-block-start:calc(var(--content-card-icon-size) + var(--content-card-content-gap) + var(--content-card-icon-border-size));
4828
4832
  }
4829
4833
 
4830
- .bp_content_card_module_cardTitle--edc60{
4834
+ .bp_content_card_module_cardTitle--902ef{
4831
4835
  align-items:var(--content-card-title-align-items);
4832
4836
  display:flex;
4833
4837
  height:var(--content-card-text-height);
@@ -4835,26 +4839,27 @@
4835
4839
  min-height:var(--content-card-text-height-min);
4836
4840
  }
4837
4841
 
4838
- .bp_content_card_module_cardTitleText--edc60{
4842
+ .bp_content_card_module_cardTitleText--902ef{
4839
4843
  -webkit-box-orient:vertical;
4840
4844
  -webkit-line-clamp:2;
4841
4845
  display:-webkit-inline-box;
4842
4846
  overflow:hidden;
4843
4847
  }
4844
4848
 
4845
- .bp_content_card_module_cardBody--edc60{
4849
+ .bp_content_card_module_cardBody--902ef{
4850
+ display:var(--content-card-body-display);
4846
4851
  height:var(--content-card-text-height);
4847
4852
  margin-block-end:var(--content-card-content-gap);
4848
4853
  }
4849
4854
 
4850
- .bp_content_card_module_cardBodyText--edc60{
4855
+ .bp_content_card_module_cardBodyText--902ef{
4851
4856
  -webkit-box-orient:vertical;
4852
4857
  -webkit-line-clamp:2;
4853
4858
  display:-webkit-inline-box;
4854
4859
  overflow:hidden;
4855
4860
  }
4856
4861
 
4857
- .bp_content_card_module_cardIcon--edc60{
4862
+ .bp_content_card_module_cardIcon--902ef{
4858
4863
  background-color:var(--content-card-background-color);
4859
4864
  border:var(--content-card-icon-border-size) solid var(--content-card-icon-border-color);
4860
4865
  border-radius:var(--content-card-icon-border-radius);
@@ -4867,7 +4872,7 @@
4867
4872
  z-index:1;
4868
4873
  }
4869
4874
 
4870
- .bp_content_card_module_cardBackground--edc60{
4875
+ .bp_content_card_module_cardBackground--902ef{
4871
4876
  height:var(--content-card-background-height);
4872
4877
  left:0;
4873
4878
  overflow:hidden;
@@ -4876,12 +4881,12 @@
4876
4881
  width:100%;
4877
4882
  }
4878
4883
 
4879
- .bp_content_card_module_image--edc60{
4884
+ .bp_content_card_module_image--902ef{
4880
4885
  height:100%;
4881
4886
  width:100%;
4882
4887
  }
4883
4888
 
4884
- .bp_content_card_module_ghostCard--edc60{
4889
+ .bp_content_card_module_ghostCard--902ef{
4885
4890
  display:flex;
4886
4891
  flex-direction:column;
4887
4892
  max-width:calc(var(--content-card-max-width) - var(--content-card-padding));
@@ -4890,20 +4895,20 @@
4890
4895
  position:relative;
4891
4896
  }
4892
4897
 
4893
- .bp_content_card_module_iconGhost--edc60,.bp_content_card_module_titleGhost--edc60{
4898
+ .bp_content_card_module_iconGhost--902ef,.bp_content_card_module_titleGhost--902ef{
4894
4899
  margin-block-end:var(--content-card-padding);
4895
4900
  }
4896
4901
 
4897
- .bp_content_card_module_bodyGhost--edc60{
4902
+ .bp_content_card_module_bodyGhost--902ef{
4898
4903
  margin-block-end:var(--content-card-content-gap);
4899
4904
  }
4900
4905
 
4901
- .bp_content_card_module_pillGhostContainer--edc60{
4906
+ .bp_content_card_module_pillGhostContainer--902ef{
4902
4907
  display:flex;
4903
4908
  margin-block:var(--content-card-content-gap) var(--content-card-padding);
4904
4909
  }
4905
4910
 
4906
- .bp_content_card_module_pillGhost--edc60{
4911
+ .bp_content_card_module_pillGhost--902ef{
4907
4912
  margin-inline-end:var(--content-card-content-gap);
4908
4913
  }
4909
4914
  .bp_content_field_module_contentFieldWrapper--67a59{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/blueprint-web",
3
- "version": "13.5.12",
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.7",
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.68",
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",