@1money/component-ui 0.0.61-alpha.0 → 0.0.61-alpha.3

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 (61) hide show
  1. package/es/business/Select/Country/CountrySelect.d.ts +2 -0
  2. package/es/business/Select/Country/{SelectCountry.js → CountrySelect.js} +3 -3
  3. package/es/business/Select/Country/index.d.ts +1 -1
  4. package/es/business/Select/Country/index.js +2 -2
  5. package/es/business/Select/Country/interface.d.ts +2 -2
  6. package/es/business/Select/Network/NetworkSelect.d.ts +2 -0
  7. package/es/business/Select/Network/NetworkSelect.js +150 -0
  8. package/es/business/Select/Network/index.d.ts +2 -0
  9. package/es/business/Select/Network/index.js +3 -0
  10. package/es/business/Select/Network/interface.d.ts +66 -0
  11. package/es/business/Select/Network/interface.js +2 -0
  12. package/es/business/Select/Network/style/NetworkSelect.css +59 -0
  13. package/es/business/Select/Network/style/css.js +2 -0
  14. package/es/business/Select/Network/style/index.d.ts +1 -0
  15. package/es/business/Select/Network/style/index.js +2 -0
  16. package/es/business/Select/PaymentMethod/PaymentMethodSelect.d.ts +2 -0
  17. package/es/business/Select/PaymentMethod/PaymentMethodSelect.js +150 -0
  18. package/es/business/Select/PaymentMethod/index.d.ts +2 -0
  19. package/es/business/Select/PaymentMethod/index.js +3 -0
  20. package/es/business/Select/PaymentMethod/interface.d.ts +70 -0
  21. package/es/business/Select/PaymentMethod/interface.js +2 -0
  22. package/es/business/Select/PaymentMethod/style/PaymentMethodSelect.css +38 -0
  23. package/es/business/Select/PaymentMethod/style/css.js +2 -0
  24. package/es/business/Select/PaymentMethod/style/index.d.ts +1 -0
  25. package/es/business/Select/PaymentMethod/style/index.js +2 -0
  26. package/es/business/Select/index.d.ts +2 -0
  27. package/es/business/Select/index.js +3 -1
  28. package/es/components/Input/Input/Input.css +4 -6
  29. package/es/index.css +1 -1
  30. package/lib/business/Select/Country/CountrySelect.d.ts +2 -0
  31. package/lib/business/Select/Country/{SelectCountry.js → CountrySelect.js} +4 -4
  32. package/lib/business/Select/Country/index.d.ts +1 -1
  33. package/lib/business/Select/Country/index.js +5 -5
  34. package/lib/business/Select/Country/interface.d.ts +2 -2
  35. package/lib/business/Select/Network/NetworkSelect.d.ts +2 -0
  36. package/lib/business/Select/Network/NetworkSelect.js +157 -0
  37. package/lib/business/Select/Network/index.d.ts +2 -0
  38. package/lib/business/Select/Network/index.js +28 -0
  39. package/lib/business/Select/Network/interface.d.ts +66 -0
  40. package/lib/business/Select/Network/interface.js +6 -0
  41. package/lib/business/Select/Network/style/NetworkSelect.css +59 -0
  42. package/lib/business/Select/Network/style/css.js +4 -0
  43. package/lib/business/Select/Network/style/index.d.ts +1 -0
  44. package/lib/business/Select/Network/style/index.js +4 -0
  45. package/lib/business/Select/PaymentMethod/PaymentMethodSelect.d.ts +2 -0
  46. package/lib/business/Select/PaymentMethod/PaymentMethodSelect.js +157 -0
  47. package/lib/business/Select/PaymentMethod/index.d.ts +2 -0
  48. package/lib/business/Select/PaymentMethod/index.js +28 -0
  49. package/lib/business/Select/PaymentMethod/interface.d.ts +70 -0
  50. package/lib/business/Select/PaymentMethod/interface.js +6 -0
  51. package/lib/business/Select/PaymentMethod/style/PaymentMethodSelect.css +38 -0
  52. package/lib/business/Select/PaymentMethod/style/css.js +4 -0
  53. package/lib/business/Select/PaymentMethod/style/index.d.ts +1 -0
  54. package/lib/business/Select/PaymentMethod/style/index.js +4 -0
  55. package/lib/business/Select/index.d.ts +2 -0
  56. package/lib/business/Select/index.js +23 -1
  57. package/lib/components/Input/Input/Input.css +4 -6
  58. package/lib/index.css +1 -1
  59. package/package.json +11 -1
  60. package/es/business/Select/Country/SelectCountry.d.ts +0 -2
  61. package/lib/business/Select/Country/SelectCountry.d.ts +0 -2
@@ -0,0 +1,70 @@
1
+ import type { SelectProps } from "../../../components/Select";
2
+ /**
3
+ * Per-payment-method fee block as returned by 1money's `/private/currencies`
4
+ * fiat list. All numeric fields are strings to preserve precision across the wire.
5
+ */
6
+ export interface PaymentMethodFee {
7
+ /** Numeric transaction fee, e.g. `"10.00"`. */
8
+ transactionFee: string;
9
+ /** Asset the fee is denominated in, e.g. `"USD"`. */
10
+ transactionFeeAsset?: string;
11
+ /** Settlement time value, e.g. `"1-3"`. */
12
+ transactionTime?: string;
13
+ /** Unit paired with `transactionTime`, e.g. `"business days"`. */
14
+ transactionUnit?: string;
15
+ }
16
+ /**
17
+ * Single fiat payment method entry as returned by 1money's
18
+ * `/private/currencies` endpoint (`data.fiat[i].paymentMethods[j]`).
19
+ */
20
+ export interface PaymentMethodItem {
21
+ /** Stable identifier — bound to the Select `value`, e.g. `"ACH"` / `"WIRE"`. */
22
+ paymentMethodType: string;
23
+ /** Display description, typically `"<Name> - <SLA>"`, e.g. `"ACH Transfer - 1-3 business days"`. */
24
+ paymentMethodTypeDesc: string;
25
+ /** Public URL of the payment method icon. */
26
+ paymentMethodIconUrl?: string;
27
+ /** Optional badges rendered next to the option label in the dropdown. */
28
+ tags?: string[];
29
+ /** Minimum deposit amount, as a numeric string. */
30
+ depositAmtMin?: string;
31
+ /** Minimum withdrawal amount, as a numeric string. */
32
+ withdrawAmtMin?: string;
33
+ /** Fee + settlement info; absent for methods without a configured fee. */
34
+ fee?: PaymentMethodFee;
35
+ }
36
+ export interface PaymentMethodSelectProps extends Omit<SelectProps, 'options' | 'renderValue' | 'renderOption' | 'renderOptionContent'> {
37
+ /**
38
+ * Fiat payment methods returned by 1money's `/private/currencies` endpoint
39
+ * (`data.fiat[i].paymentMethods`). Pass through as-is — the component
40
+ * derives label / description / fee row internally.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const paymentMethods: PaymentMethodItem[] = [
45
+ * {
46
+ * paymentMethodIconUrl: 'https://static.1money.com/images/payment-methods/Icon-ACH.svg',
47
+ * paymentMethodType: 'ACH',
48
+ * paymentMethodTypeDesc: 'ACH Transfer - 1-3 business days',
49
+ * tags: [],
50
+ * depositAmtMin: '1.00',
51
+ * withdrawAmtMin: '1.00',
52
+ * fee: {
53
+ * transactionFee: '0.55',
54
+ * transactionFeeAsset: 'USD',
55
+ * transactionTime: '1-3',
56
+ * transactionUnit: 'business days',
57
+ * },
58
+ * },
59
+ * ];
60
+ *
61
+ * <PaymentMethodSelect options={paymentMethods} />
62
+ * ```
63
+ */
64
+ options: PaymentMethodItem[];
65
+ /**
66
+ * Bold the payment method name in the trigger and the dropdown options.
67
+ * @default true
68
+ */
69
+ strong?: boolean;
70
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVzaW5lc3MvU2VsZWN0L1BheW1lbnRNZXRob2QvaW50ZXJmYWNlLmpzIiwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIiwic291cmNlcyI6WyJidXNpbmVzcy9TZWxlY3QvUGF5bWVudE1ldGhvZC9pbnRlcmZhY2UuanMiXSwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHt9OyJdLCJtYXBwaW5ncyI6IkFBQUEiLCJpZ25vcmVMaXN0IjpbXX0=
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Retrieves the spacing value for a given token key.
3
+ *
4
+ * @param {string} $key - The spacing token key (e.g., '100', '200').
5
+ * @return {length|null} The computed spacing value or null if the key is invalid.
6
+ * @example
7
+ * .element {
8
+ * padding: om-spacing-token('200'); // Returns 8px if $om-sys-spacing-unit is 4px
9
+ * }
10
+ */
11
+ /**
12
+ * Computes the spacing value based on a token key or a direct length value.
13
+ *
14
+ * @param {string|length} $value - The spacing token key (e.g., '100') or a direct length value (e.g., '16px').
15
+ * @return {length} The computed spacing value.
16
+ * @example
17
+ * .element {
18
+ * margin: om-spacing-value('300'); // Returns 12px if $om-sys-spacing-unit is 4px
19
+ * padding: om-spacing-value(16px); // Returns 16px
20
+ * gap: om-spacing-value(2); // Returns 8px if $om-sys-spacing-unit is 4px
21
+ * }
22
+ */
23
+ .om-payment-method-select .om-component-ui-select-trigger-large {
24
+ height: 56px;
25
+ }
26
+ .om-payment-method-select .om-component-ui-select-trigger-small {
27
+ height: 44px;
28
+ }
29
+ .om-payment-method-select .om-component-ui-select-value {
30
+ overflow: visible;
31
+ white-space: normal;
32
+ }
33
+ .om-payment-method-select .om-component-ui-select-value-large {
34
+ height: 22px;
35
+ }
36
+ .om-payment-method-select .om-component-ui-select-value-small {
37
+ height: 18px;
38
+ }
@@ -0,0 +1,2 @@
1
+ import './PaymentMethodSelect.css';
2
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1c2luZXNzL1NlbGVjdC9QYXltZW50TWV0aG9kL3NyYy9idXNpbmVzcy9TZWxlY3QvUGF5bWVudE1ldGhvZC9zdHlsZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLDRCQUE0QiIsImZpbGUiOiJidXNpbmVzcy9TZWxlY3QvUGF5bWVudE1ldGhvZC9zdHlsZS9jc3MuanMiLCJzb3VyY2VzQ29udGVudCI6W251bGxdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
@@ -0,0 +1 @@
1
+ import './PaymentMethodSelect.css';
@@ -0,0 +1,2 @@
1
+ import './PaymentMethodSelect.css';
2
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1c2luZXNzL1NlbGVjdC9QYXltZW50TWV0aG9kL3NyYy9idXNpbmVzcy9TZWxlY3QvUGF5bWVudE1ldGhvZC9zdHlsZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLDRCQUE0QiIsImZpbGUiOiJidXNpbmVzcy9TZWxlY3QvUGF5bWVudE1ldGhvZC9zdHlsZS9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbbnVsbF0sInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMifQ==
@@ -1 +1,3 @@
1
1
  export * from './Country';
2
+ export * from './Network';
3
+ export * from './PaymentMethod';
@@ -1,2 +1,4 @@
1
1
  export * from './Country';
2
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1c2luZXNzL3NyYy9idXNpbmVzcy9TZWxlY3QvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxXQUFXIiwiZmlsZSI6ImJ1c2luZXNzL1NlbGVjdC9pbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbbnVsbF0sInNvdXJjZVJvb3QiOiIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMifQ==
2
+ export * from './Network';
3
+ export * from './PaymentMethod';
4
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJ1c2luZXNzL3NyYy9idXNpbmVzcy9TZWxlY3QvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxXQUFXO0FBQ3pCLGNBQWMsV0FBVztBQUN6QixjQUFjLGlCQUFpQiIsImZpbGUiOiJidXNpbmVzcy9TZWxlY3QvaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6W251bGxdLCJzb3VyY2VSb290IjoiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vc3JjIn0=
@@ -49,6 +49,7 @@
49
49
  line-height: var(--om-body-lg-line-height);
50
50
  letter-spacing: var(--om-body-lg-letter-spacing);
51
51
  font-weight: var(--om-body-lg-font-weight);
52
+ font-weight: 500;
52
53
  flex: 1 1 auto;
53
54
  width: 100%;
54
55
  color: var(--om-text-default, #131313);
@@ -58,15 +59,11 @@
58
59
  }
59
60
  .om-component-ui-input-field::-moz-placeholder {
60
61
  color: var(--om-text-neutral-secondary, #9fa3a3);
62
+ font-weight: 400;
61
63
  }
62
64
  .om-component-ui-input-field::placeholder {
63
65
  color: var(--om-text-neutral-secondary, #9fa3a3);
64
- }
65
- .om-component-ui-input-field:not(:-moz-placeholder) {
66
- font-weight: 500;
67
- }
68
- .om-component-ui-input-field:not(:placeholder-shown) {
69
- font-weight: 500;
66
+ font-weight: 400;
70
67
  }
71
68
  .om-component-ui-input-prefix, .om-component-ui-input-suffix {
72
69
  display: inline-flex;
@@ -100,6 +97,7 @@
100
97
  line-height: var(--om-body-md-line-height);
101
98
  letter-spacing: var(--om-body-md-letter-spacing);
102
99
  font-weight: var(--om-body-md-font-weight);
100
+ font-weight: 500;
103
101
  }
104
102
  .om-component-ui-input-error .om-component-ui-input-control, .om-component-ui-input-error .om-component-ui-input-control:hover, .om-component-ui-input-error .om-component-ui-input-control:focus-within {
105
103
  box-shadow: inset 0 0 0 1px var(--om-border-danger, #ae0000);