@bunnyapp/components 1.8.0-beta.28 → 1.8.0-beta.29

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.
Files changed (39) hide show
  1. package/README.md +51 -0
  2. package/dist/cjs/index.js +100 -31009
  3. package/dist/cjs/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
  4. package/dist/cjs/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
  5. package/dist/cjs/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
  6. package/dist/cjs/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
  7. package/dist/cjs/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
  8. package/dist/cjs/types/src/components/Quote/Quote.stories.d.ts +1 -1
  9. package/dist/cjs/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
  10. package/dist/cjs/types/src/components/Signup/Signup.stories.d.ts +1 -2
  11. package/dist/cjs/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +1 -1
  12. package/dist/cjs/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
  13. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
  14. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
  15. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
  16. package/dist/cjs/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
  17. package/dist/cjs/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
  18. package/dist/cjs/types/src/hooks/useAllErrorFormats.d.ts +2 -1
  19. package/dist/esm/index.js +100 -30996
  20. package/dist/esm/types/src/components/BillingDetails/BillingDetails.d.ts +2 -5
  21. package/dist/esm/types/src/components/BillingDetails/BillingDetails.stories.d.ts +2 -4
  22. package/dist/esm/types/src/components/BunnyProvider/BunnyProvider.d.ts +2 -1
  23. package/dist/esm/types/src/components/BunnyProvider/contexts/BunnyProviderCallbacksProvider.d.ts +2 -0
  24. package/dist/esm/types/src/components/Invoice/Invoice.stories.d.ts +1 -1
  25. package/dist/esm/types/src/components/Quote/Quote.stories.d.ts +1 -1
  26. package/dist/esm/types/src/components/Quotes/Quotes.stories.d.ts +1 -1
  27. package/dist/esm/types/src/components/Signup/Signup.stories.d.ts +1 -2
  28. package/dist/esm/types/src/components/Signup/hooks/useSignupQuoteQueryData.d.ts +1 -1
  29. package/dist/esm/types/src/components/Subscriptions/Subscriptions.stories.d.ts +1 -1
  30. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/GridTemplateColumnsWrapper.d.ts +2 -1
  31. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureGroup.d.ts +9 -0
  32. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/PlanFeatures/components/FeatureTitle.d.ts +6 -0
  33. package/dist/esm/types/src/components/Subscriptions/Upgrade/Upgrade.stories.d.ts +12 -0
  34. package/dist/esm/types/src/components/Transactions/Transactions.stories.d.ts +1 -1
  35. package/dist/esm/types/src/hooks/useAllErrorFormats.d.ts +2 -1
  36. package/dist/index.d.ts +4 -5
  37. package/package.json +16 -13
  38. package/dist/cjs/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/{PlanFeatures.d.ts → PlanFeatures/PlanFeatures.d.ts} +1 -1
  39. package/dist/esm/types/src/components/Subscriptions/Upgrade/PlanPicker/planPickerDesktop/{PlanFeatures.d.ts → PlanFeatures/PlanFeatures.d.ts} +1 -1
@@ -1,16 +1,13 @@
1
1
  import '../../styles/index.less';
2
- import { ShadowType } from '../../types/shadowType';
3
- declare const BillingDetails: ({ className, countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isCardEnabled, isUpgradeFromTrial, shadow, onSavePaymentMethod, onPaymentMethodRemoved, }: {
4
- className?: string;
2
+ declare const BillingDetails: ({ countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isUpgradeFromTrial, style, onSavePaymentMethod, onPaymentMethodRemoved, }: {
5
3
  countryListFilter?: (country: {
6
4
  value: string;
7
5
  label: string;
8
6
  }) => boolean;
9
7
  hideBillingDetailsForm?: boolean;
10
8
  hidePaymentMethodForm?: boolean;
11
- isCardEnabled?: boolean;
12
9
  isUpgradeFromTrial?: boolean;
13
- shadow?: ShadowType;
10
+ style?: React.CSSProperties;
14
11
  onSavePaymentMethod?: (paymentMethodId: string) => void;
15
12
  onPaymentMethodRemoved?: (paymentMethodId: string) => void;
16
13
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,12 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
2
  import BillingDetails from "./BillingDetails";
3
3
  declare const meta: Meta<typeof BillingDetails>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
- export declare const NoShadow: Story;
8
- export declare const CustomClassName: Story;
9
- export declare const NoCard: Story;
10
7
  export declare const Mobile: Story;
11
8
  export declare const DarkMode: Story;
12
9
  export declare const HidePaymentMethodForm: Story;
13
10
  export declare const HideBillingDetailsForm: Story;
14
11
  export declare const HideBothForms: Story;
12
+ export declare const PrideTheme: Story;
@@ -7,7 +7,7 @@ export type BunnyContextValues = {
7
7
  onTokenExpired?: () => void;
8
8
  };
9
9
  export declare const BunnyContext: import("react").Context<BunnyContextValues>;
10
- declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
10
+ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications, configProviderProps, }: {
11
11
  children: React.ReactNode;
12
12
  darkMode?: boolean;
13
13
  queryClient?: QueryClient;
@@ -17,6 +17,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
17
17
  onUserUnavailable?: () => void;
18
18
  onInvalidOrMissingAuthorization?: () => void;
19
19
  suppressUserUnavailableErrorNotification?: boolean;
20
+ disableErrorNotifications?: boolean;
20
21
  configProviderProps?: ThemeConfig | undefined;
21
22
  }): import("react/jsx-runtime").JSX.Element;
22
23
  export default BunnyProvider;
@@ -3,11 +3,13 @@ declare const BunnyProviderCallbacksProvider: ({ value, children }: {
3
3
  onUserUnavailable?: () => void;
4
4
  onInvalidOrMissingAuthorization?: () => void;
5
5
  suppressUserUnavailableErrorNotification?: boolean;
6
+ disableErrorNotifications?: boolean;
6
7
  };
7
8
  children?: import("react").ReactNode;
8
9
  }) => import("react/jsx-runtime").JSX.Element, useBunnyProviderCallbacks: () => {
9
10
  onUserUnavailable?: () => void;
10
11
  onInvalidOrMissingAuthorization?: () => void;
11
12
  suppressUserUnavailableErrorNotification?: boolean;
13
+ disableErrorNotifications?: boolean;
12
14
  };
13
15
  export { BunnyProviderCallbacksProvider, useBunnyProviderCallbacks };
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Invoice from './Invoice';
3
3
  declare const meta: Meta<typeof Invoice>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Quote from './Quote';
3
3
  declare const meta: Meta<typeof Quote>;
4
4
  export default meta;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Quotes from './Quotes';
3
3
  declare const meta: Meta<typeof Quotes>;
4
4
  export default meta;
@@ -1,9 +1,8 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Signup from './Signup';
3
3
  declare const meta: Meta<typeof Signup>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Default: Story;
7
7
  export declare const Mobile: Story;
8
- export declare const CustomClassName: Story;
9
8
  export declare const DarkMode: Story;
@@ -4,7 +4,7 @@ export declare const useSignupQuoteQueryData: ({ tokenOverride, }: {
4
4
  tokenOverride?: string;
5
5
  }) => {
6
6
  data: ResultOf<typeof Signup_QuoteFragment> | undefined;
7
- refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
7
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<{
8
8
  [$tada.fragmentRefs]: {
9
9
  Signup_QuoteFragment: "Quote";
10
10
  };
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
2
  import Subscriptions from './Subscriptions';
3
3
  declare const meta: Meta<typeof Subscriptions>;
4
4
  export default meta;
@@ -1,7 +1,8 @@
1
- export declare function GridTemplateColumnsWrapper({ children, className, everythingInPlus, plansToDisplay, }: {
1
+ export declare function GridTemplateColumnsWrapper({ children, className, everythingInPlus, plansToDisplay, style, }: {
2
2
  children: React.ReactNode;
3
3
  className?: string;
4
4
  everythingInPlus: boolean;
5
5
  plansToDisplay: number;
6
+ style?: React.CSSProperties;
6
7
  }): import("react/jsx-runtime").JSX.Element;
7
8
  export default GridTemplateColumnsWrapper;
@@ -0,0 +1,9 @@
1
+ import Feature from '@/types/Feature';
2
+ import PriceList from '@/types/PriceList';
3
+ declare const FeatureGroup: ({ features, displayPriceLists, plansToDisplay, groupIndex, }: {
4
+ features: Feature[];
5
+ displayPriceLists: PriceList[];
6
+ plansToDisplay: number;
7
+ groupIndex: number;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export default FeatureGroup;
@@ -0,0 +1,6 @@
1
+ import Feature from '@/types/Feature';
2
+ declare const FeatureTitle: ({ isFeatureGroup, feature, }: {
3
+ isFeatureGroup: boolean;
4
+ feature: Feature;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export default FeatureTitle;
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import Upgrade from './Upgrade';
3
+ declare const meta: Meta<typeof Upgrade>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Mobile: Story;
8
+ export declare const DarkMode: Story;
9
+ export declare const NoShadow: Story;
10
+ export declare const CustomClassName: Story;
11
+ export declare const DefaultBillingPeriodAnnual: Story;
12
+ export declare const PrideTheme: Story;
@@ -1,4 +1,4 @@
1
- import type { Meta, StoryObj } from "@storybook/react";
1
+ import type { Meta, StoryObj } from "@storybook/react-vite";
2
2
  import Transactions from "./Transactions";
3
3
  declare const meta: Meta<typeof Transactions>;
4
4
  export default meta;
@@ -1,5 +1,6 @@
1
- export declare const useAllErrorFormats: ({ onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification }?: {
1
+ export declare const useAllErrorFormats: ({ onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications }?: {
2
2
  onUserUnavailable?: () => void;
3
3
  onInvalidOrMissingAuthorization?: () => void;
4
4
  suppressUserUnavailableErrorNotification?: boolean;
5
+ disableErrorNotifications?: boolean;
5
6
  }) => (error: any, mutationName?: string) => any;
package/dist/index.d.ts CHANGED
@@ -251,7 +251,7 @@ type SignupProps = {
251
251
  };
252
252
  declare function Signup({ priceListCode, enableTrial, style, defaultFormValues, paymentRequiredToAcceptQuote, documentTemplateId, requiredBillingDetails, defaultCouponCode, }: SignupProps): react_jsx_runtime.JSX.Element;
253
253
 
254
- declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, configProviderProps, }: {
254
+ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token, onTokenExpired, onUserUnavailable, onInvalidOrMissingAuthorization, suppressUserUnavailableErrorNotification, disableErrorNotifications, configProviderProps, }: {
255
255
  children: React.ReactNode;
256
256
  darkMode?: boolean;
257
257
  queryClient?: QueryClient;
@@ -261,6 +261,7 @@ declare function BunnyProvider({ children, darkMode, queryClient, apiHost, token
261
261
  onUserUnavailable?: () => void;
262
262
  onInvalidOrMissingAuthorization?: () => void;
263
263
  suppressUserUnavailableErrorNotification?: boolean;
264
+ disableErrorNotifications?: boolean;
264
265
  configProviderProps?: ThemeConfig | undefined;
265
266
  }): react_jsx_runtime.JSX.Element;
266
267
 
@@ -347,17 +348,15 @@ declare const UpgradeWrapper: ({ onChangePlanCancel, handlePortalErrors, onPayme
347
348
  defaultBillingPeriod?: "ONCE" | "MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | "ANNUAL";
348
349
  }) => react_jsx_runtime.JSX.Element | null;
349
350
 
350
- declare const BillingDetails: ({ className, countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isCardEnabled, isUpgradeFromTrial, shadow, onSavePaymentMethod, onPaymentMethodRemoved, }: {
351
- className?: string;
351
+ declare const BillingDetails: ({ countryListFilter, hideBillingDetailsForm, hidePaymentMethodForm, isUpgradeFromTrial, style, onSavePaymentMethod, onPaymentMethodRemoved, }: {
352
352
  countryListFilter?: (country: {
353
353
  value: string;
354
354
  label: string;
355
355
  }) => boolean;
356
356
  hideBillingDetailsForm?: boolean;
357
357
  hidePaymentMethodForm?: boolean;
358
- isCardEnabled?: boolean;
359
358
  isUpgradeFromTrial?: boolean;
360
- shadow?: ShadowType;
359
+ style?: React.CSSProperties;
361
360
  onSavePaymentMethod?: (paymentMethodId: string) => void;
362
361
  onPaymentMethodRemoved?: (paymentMethodId: string) => void;
363
362
  }) => react_jsx_runtime.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunnyapp/components",
3
- "version": "1.8.0-beta.28",
3
+ "version": "1.8.0-beta.29",
4
4
  "description": "Components from the Bunny portal to embed Bunny UI functionality into your application.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -10,8 +10,10 @@
10
10
  "type": "module",
11
11
  "types": "dist/index.d.ts",
12
12
  "scripts": {
13
- "build": "npm run clean && rollup -c",
13
+ "build": "npm run clean && NODE_ENV=production rollup -c",
14
14
  "build-dev": "npm run clean && rollup -c -w",
15
+ "analyze": "npm run clean && NODE_ENV=production ANALYZE=true rollup -c",
16
+ "analyze-storybook": "ANALYZE=true storybook build",
15
17
  "build-storybook": "storybook build",
16
18
  "clean": "rimraf dist",
17
19
  "storybook": "storybook dev -p 6006",
@@ -27,7 +29,7 @@
27
29
  "author": "Bunny",
28
30
  "license": "ISC",
29
31
  "devDependencies": {
30
- "@chromatic-com/storybook": "^3.2.7",
32
+ "@chromatic-com/storybook": "^5.2.1",
31
33
  "@fontsource-variable/inter": "^5.2.8",
32
34
  "@parcel/watcher": "^2.5.1",
33
35
  "@rollup/plugin-commonjs": "^28.0.8",
@@ -36,13 +38,10 @@
36
38
  "@rollup/plugin-replace": "^6.0.2",
37
39
  "@rollup/plugin-terser": "^1.0.0",
38
40
  "@rollup/plugin-typescript": "^11.1.6",
39
- "@storybook/addon-essentials": "^8.6.14",
40
- "@storybook/addon-interactions": "^8.6.14",
41
- "@storybook/addon-onboarding": "^8.6.14",
42
- "@storybook/blocks": "^8.6.14",
43
- "@storybook/react": "^8.6.14",
44
- "@storybook/react-vite": "^8.6.14",
45
- "@storybook/test": "^8.6.14",
41
+ "@storybook/addon-docs": "^10.4.0",
42
+ "@storybook/addon-onboarding": "^10.4.0",
43
+ "@storybook/react": "^10.4.0",
44
+ "@storybook/react-vite": "^10.4.0",
46
45
  "@tanstack/eslint-plugin-query": "^5.91.2",
47
46
  "@tanstack/react-query-devtools": "^5.90.2",
48
47
  "@types/lodash": "^4.17.20",
@@ -54,7 +53,7 @@
54
53
  "@vitejs/plugin-react": "^4.7.0",
55
54
  "autoprefixer": "^10.4.21",
56
55
  "dependency-cruiser": "^16.10.4",
57
- "eslint-plugin-storybook": "^0.11.6",
56
+ "eslint-plugin-storybook": "^10.4.0",
58
57
  "glob": "^11.0.3",
59
58
  "gql.tada": "^1.9.0",
60
59
  "less": "^4.4.2",
@@ -62,13 +61,14 @@
62
61
  "patch-package": "^8.0.1",
63
62
  "postcss-import": "^16.1.1",
64
63
  "postcss-less": "^6.0.0",
65
- "postcss-url": "^8.0.0",
64
+ "postcss-url": "^10.1.3",
66
65
  "rimraf": "^6.1.2",
67
66
  "rollup": "^3.29.5",
68
67
  "rollup-plugin-dts": "^6.2.3",
69
68
  "rollup-plugin-peer-deps-external": "^2.2.4",
70
69
  "rollup-plugin-postcss": "^4.0.2",
71
- "storybook": "^8.6.14",
70
+ "rollup-plugin-visualizer": "^7.0.1",
71
+ "storybook": "^10.4.0",
72
72
  "tailwindcss": "^3.4.18",
73
73
  "typescript": "^5.9.3",
74
74
  "vite": "^6.4.1"
@@ -104,5 +104,8 @@
104
104
  },
105
105
  "dependencies": {
106
106
  "msw-storybook-addon": "^2.0.6"
107
+ },
108
+ "overrides": {
109
+ "minimatch": "^9.0.0"
107
110
  }
108
111
  }
@@ -1,5 +1,5 @@
1
- import PriceList from '@/types/PriceList';
2
1
  import Feature from '@/types/Feature';
2
+ import PriceList from '@/types/PriceList';
3
3
  export declare const PlanFeatures: ({ displayPriceLists, features, plansToDisplay, }: {
4
4
  displayPriceLists: PriceList[];
5
5
  plansToDisplay: number;
@@ -1,5 +1,5 @@
1
- import PriceList from '@/types/PriceList';
2
1
  import Feature from '@/types/Feature';
2
+ import PriceList from '@/types/PriceList';
3
3
  export declare const PlanFeatures: ({ displayPriceLists, features, plansToDisplay, }: {
4
4
  displayPriceLists: PriceList[];
5
5
  plansToDisplay: number;