@dropins/tools 1.5.3 → 1.6.0-alpha10

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.
@@ -0,0 +1,11 @@
1
+ import { FunctionComponent, JSX } from 'preact';
2
+
3
+ type BaseProps = {
4
+ href?: string;
5
+ type?: 'button';
6
+ disabled?: boolean;
7
+ };
8
+ export type PaginationButtonProps = BaseProps & (Omit<JSX.HTMLAttributes<HTMLAnchorElement>, 'type'> | Omit<JSX.HTMLAttributes<HTMLButtonElement>, 'href'>);
9
+ export declare const PaginationButton: FunctionComponent<PaginationButtonProps>;
10
+ export {};
11
+ //# sourceMappingURL=PaginationButton.d.ts.map
@@ -1,44 +1,49 @@
1
1
  export { default as Add } from './Add.svg';
2
+ export { default as AddressBook } from './AddressBook.svg';
2
3
  export { default as Bulk } from './Bulk.svg';
3
4
  export { default as Burger } from './Burger.svg';
5
+ export { default as Business } from './Business.svg';
6
+ export { default as Card } from './Card.svg';
4
7
  export { default as Cart } from './Cart.svg';
5
8
  export { default as Check } from './Check.svg';
9
+ export { default as CheckWithCircle } from './CheckWithCircle.svg';
6
10
  export { default as ChevronDown } from './ChevronDown.svg';
7
- export { default as ChevronUp } from './ChevronUp.svg';
8
11
  export { default as ChevronRight } from './ChevronRight.svg';
12
+ export { default as ChevronUp } from './ChevronUp.svg';
9
13
  export { default as Close } from './Close.svg';
14
+ export { default as Coupon } from './Coupon.svg';
15
+ export { default as Date } from './Date.svg';
16
+ export { default as Delivery } from './Delivery.svg';
17
+ export { default as Edit } from './Edit.svg';
18
+ export { default as EmptyBox } from './EmptyBox.svg';
19
+ export { default as Eye } from './Eye.svg';
20
+ export { default as EyeClose } from './EyeClose.svg';
21
+ export { default as Gift } from './Gift.svg';
22
+ export { default as GiftCard } from './GiftCard.svg';
10
23
  export { default as Heart } from './Heart.svg';
24
+ export { default as HeartFilled } from './HeartFilled.svg';
25
+ export { default as InfoFilled } from './InfoFilled.svg';
26
+ export { default as List } from './List.svg';
27
+ export { default as Locker } from './Locker.svg';
11
28
  export { default as Minus } from './Minus.svg';
29
+ export { default as Order } from './Order.svg';
30
+ export { default as OrderError } from './OrderError.svg';
31
+ export { default as OrderSuccess } from './OrderSuccess.svg';
32
+ export { default as PaymentError } from './PaymentError.svg';
12
33
  export { default as Placeholder } from './Placeholder.svg';
13
34
  export { default as PlaceholderFilled } from './PlaceholderFilled.svg';
35
+ export { default as Quote } from './Quote.svg';
14
36
  export { default as Search } from './Search.svg';
15
37
  export { default as SearchFilled } from './SearchFilled.svg';
16
38
  export { default as Sort } from './Sort.svg';
17
39
  export { default as Star } from './Star.svg';
18
- export { default as View } from './View.svg';
40
+ export { default as Structure } from './Structure.svg';
41
+ export { default as Team } from './Team.svg';
42
+ export { default as Trash } from './Trash.svg';
19
43
  export { default as User } from './User.svg';
20
- export { default as Warning } from './Warning.svg';
21
- export { default as Locker } from './Locker.svg';
44
+ export { default as View } from './View.svg';
22
45
  export { default as Wallet } from './Wallet.svg';
23
- export { default as Card } from './Card.svg';
24
- export { default as Order } from './Order.svg';
25
- export { default as Delivery } from './Delivery.svg';
26
- export { default as OrderError } from './OrderError.svg';
27
- export { default as OrderSuccess } from './OrderSuccess.svg';
28
- export { default as PaymentError } from './PaymentError.svg';
29
- export { default as CheckWithCircle } from './CheckWithCircle.svg';
30
- export { default as WarningWithCircle } from './WarningWithCircle.svg';
46
+ export { default as Warning } from './Warning.svg';
31
47
  export { default as WarningFilled } from './WarningFilled.svg';
32
- export { default as InfoFilled } from './InfoFilled.svg';
33
- export { default as HeartFilled } from './HeartFilled.svg';
34
- export { default as Trash } from './Trash.svg';
35
- export { default as Eye } from './Eye.svg';
36
- export { default as EyeClose } from './EyeClose.svg';
37
- export { default as Date } from './Date.svg';
38
- export { default as AddressBook } from './AddressBook.svg';
39
- export { default as EmptyBox } from './EmptyBox.svg';
40
- export { default as Coupon } from './Coupon.svg';
41
- export { default as Gift } from './Gift.svg';
42
- export { default as GiftCard } from './GiftCard.svg';
43
- export { default as Edit } from './Edit.svg';
48
+ export { default as WarningWithCircle } from './WarningWithCircle.svg';
44
49
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,34 @@
1
+ /********************************************************************
2
+ * Copyright 2025 Adobe
3
+ * All Rights Reserved.
4
+ *
5
+ * NOTICE: Adobe permits you to use, modify, and distribute this
6
+ * file in accordance with the terms of the Adobe license agreement
7
+ * accompanying it.
8
+ *******************************************************************/
9
+ export interface PriceFormatterOptions {
10
+ currency?: string | null;
11
+ locale?: string;
12
+ formatOptions?: Intl.NumberFormatOptions;
13
+ }
14
+ /**
15
+ * Determines the effective locale to use for price formatting
16
+ * Priority: prop locale > global locale > browser locale > default 'en-US'
17
+ */
18
+ export declare function getEffectiveLocale(locale?: string): string;
19
+ /**
20
+ * Gets an Intl.NumberFormat instance for price formatting
21
+ * Uses getEffectiveLocale internally to determine the best locale
22
+ *
23
+ * @example
24
+ * // Single price formatting
25
+ * const formatter = getPriceFormatter({ currency: 'USD', locale: 'en-US' });
26
+ * const price = formatter.format(10.99); // "$10.99"
27
+ *
28
+ * @example
29
+ * // Bulk price formatting (more efficient)
30
+ * const formatter = getPriceFormatter({ currency: 'EUR', locale: 'fr-FR' });
31
+ * const prices = [10.99, 25.50, 99.99].map(amount => formatter.format(amount));
32
+ */
33
+ export declare function getPriceFormatter(options?: PriceFormatterOptions): Intl.NumberFormat;
34
+ //# sourceMappingURL=get-price-formatter.d.ts.map
@@ -24,4 +24,5 @@ export * from './is-number';
24
24
  export * from './deviceUtils';
25
25
  export * from './get-path-value';
26
26
  export * from './get-cookie';
27
+ export * from './get-price-formatter';
27
28
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +0,0 @@
1
- /*! Copyright 2025 Adobe
2
- All Rights Reserved. */
3
- const s=(e,o)=>{let t;return function(...n){clearTimeout(t),t=setTimeout(()=>e.apply(this,n),o)}},i=e=>typeof e=="number",c=()=>{const e=navigator.userAgent.toLowerCase(),o=/ipad|iphone|ipod/.test(e),t=e.includes("mac")&&"ontouchend"in document;return o||t};export{c as a,s as d,i};
4
- //# sourceMappingURL=deviceUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"deviceUtils.js","sources":["/@dropins/tools/src/lib/debounce.ts","/@dropins/tools/src/lib/is-number.ts","/@dropins/tools/src/lib/deviceUtils.ts"],"sourcesContent":["/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nexport const debounce = (fn: Function, ms: number) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n return function (this: any, ...args: any[]) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn.apply(this, args), ms);\n };\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nexport const isNumber = (value: number | string): value is number => {\n return typeof value === 'number';\n};\n","/********************************************************************\n * Copyright 2024 Adobe\n * All Rights Reserved.\n *\n * NOTICE: Adobe permits you to use, modify, and distribute this \n * file in accordance with the terms of the Adobe license agreement \n * accompanying it. \n *******************************************************************/\n\nexport const isIOSMobileDevice = () => {\n const userAgent = navigator.userAgent.toLowerCase();\n const isIOS = /ipad|iphone|ipod/.test(userAgent);\n const isMacWithTouch = userAgent.includes('mac') && 'ontouchend' in document;\n\n return isIOS || isMacWithTouch;\n};\n"],"names":["debounce","fn","ms","timeoutId","args","isNumber","value","isIOSMobileDevice","userAgent","isIOS","isMacWithTouch"],"mappings":"AASa,MAAAA,EAAW,CAACC,EAAcC,IAAe,CAChD,IAAAC,EACJ,OAAO,YAAwBC,EAAa,CAC1C,aAAaD,CAAS,EACtBA,EAAY,WAAW,IAAMF,EAAG,MAAM,KAAMG,CAAI,EAAGF,CAAE,CACvD,CACF,ECNaG,EAAYC,GAChB,OAAOA,GAAU,SCDbC,EAAoB,IAAM,CAC/B,MAAAC,EAAY,UAAU,UAAU,YAAY,EAC5CC,EAAQ,mBAAmB,KAAKD,CAAS,EACzCE,EAAiBF,EAAU,SAAS,KAAK,GAAK,eAAgB,SAEpE,OAAOC,GAASC,CAClB"}