@getmicdrop/svelte-components 5.13.0 → 5.14.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.
@@ -26,6 +26,7 @@
26
26
  taxPercentage: 0,
27
27
  },
28
28
  onPriceUpdate,
29
+ giftCardApplied = null, // { code, giftCardAmount, giftCardBalance, stripeAmount, paymentType, requiresStripe }
29
30
  } = $props();
30
31
 
31
32
  // Helper to get effective price for a ticket (handles donation tickets)
@@ -127,7 +128,22 @@
127
128
 
128
129
  let taxRate = $derived((venueServiceCharge.taxPercentage || 0) / 100);
129
130
  let taxes = $derived(subtotal > 0 ? subtotal * taxRate : 0);
130
- let total = $derived(Math.max(0, subtotal + fees + taxes - (promoApplied && !currentPromoRule?.provideDiscount ? promoDiscount : 0)));
131
+
132
+ // Gift card derived values
133
+ let giftCardAmountDisplay = $derived(
134
+ giftCardApplied ? (giftCardApplied.giftCardAmount / 100).toFixed(2) : null
135
+ );
136
+ let giftCardRemainingBalance = $derived(
137
+ giftCardApplied ? ((giftCardApplied.giftCardBalance - giftCardApplied.giftCardAmount) / 100).toFixed(2) : null
138
+ );
139
+
140
+ // Total accounts for gift card deduction
141
+ let total = $derived(
142
+ Math.max(0, subtotal + fees + taxes
143
+ - (promoApplied && !currentPromoRule?.provideDiscount ? promoDiscount : 0)
144
+ - (giftCardApplied ? giftCardApplied.giftCardAmount / 100 : 0)
145
+ )
146
+ );
131
147
 
132
148
  $effect(() => {
133
149
  onPriceUpdate?.({ subtotal, fees, taxes, total, promoSavings });
@@ -206,11 +222,33 @@
206
222
  <div class="flex justify-between text-gray-600 dark:text-gray-300">
207
223
  <span>Taxes</span><span>${taxes.toFixed(2)}</span>
208
224
  </div>
225
+ {#if giftCardApplied}
226
+ <div class="flex justify-between text-green-600 dark:text-green-500">
227
+ <span>Gift Card Applied</span>
228
+ <span>-${giftCardAmountDisplay}</span>
229
+ </div>
230
+ {#if giftCardRemainingBalance && parseFloat(giftCardRemainingBalance) > 0}
231
+ <div class="flex justify-between text-gray-500 dark:text-gray-400 text-xs">
232
+ <span>Gift card balance after order</span>
233
+ <span>${giftCardRemainingBalance}</span>
234
+ </div>
235
+ {/if}
236
+ {/if}
209
237
  </div>
210
238
 
211
- <div class="flex justify-between {typography.h3} py-4 text-lg border-t border-gray-200 dark:border-gray-600">
212
- <span>Total</span><span>${total.toFixed(2)}</span>
213
- </div>
239
+ {#if giftCardApplied?.paymentType === 'gift_card_only'}
240
+ <div class="flex justify-between py-4 text-lg border-t border-gray-200 dark:border-gray-600">
241
+ <span class="font-semibold text-gray-900 dark:text-white">Amount Due</span>
242
+ <span class="font-bold text-green-600 dark:text-green-400">$0.00</span>
243
+ </div>
244
+ <p class="text-xs text-gray-500 dark:text-gray-400 text-center -mt-2 mb-2">
245
+ Fully covered by gift card
246
+ </p>
247
+ {:else}
248
+ <div class="flex justify-between {typography.h3} py-4 text-lg border-t border-gray-200 dark:border-gray-600">
249
+ <span>Total</span><span>${total.toFixed(2)}</span>
250
+ </div>
251
+ {/if}
214
252
  {/if}
215
253
 
216
254
  {#if totalQuantity > 0 && btnText === 'Place order'}
@@ -322,11 +360,33 @@
322
360
  <div class="flex justify-between">
323
361
  <span>Taxes</span><span>${taxes.toFixed(2)}</span>
324
362
  </div>
363
+ {#if giftCardApplied}
364
+ <div class="flex justify-between text-green-600 dark:text-green-500">
365
+ <span>Gift Card Applied</span>
366
+ <span>-${giftCardAmountDisplay}</span>
367
+ </div>
368
+ {#if giftCardRemainingBalance && parseFloat(giftCardRemainingBalance) > 0}
369
+ <div class="flex justify-between text-gray-500 dark:text-gray-400 text-xs">
370
+ <span>Gift card balance after order</span>
371
+ <span>${giftCardRemainingBalance}</span>
372
+ </div>
373
+ {/if}
374
+ {/if}
325
375
  </div>
326
376
 
327
- <div class="flex justify-between {typography.h3} py-5 border-t border-gray-200 dark:border-gray-600">
328
- <span>Total</span><span>${total.toFixed(2)}</span>
329
- </div>
377
+ {#if giftCardApplied?.paymentType === 'gift_card_only'}
378
+ <div class="flex justify-between py-5 border-t border-gray-200 dark:border-gray-600">
379
+ <span class="font-semibold text-gray-900 dark:text-white">Amount Due</span>
380
+ <span class="font-bold text-green-600 dark:text-green-400">$0.00</span>
381
+ </div>
382
+ <p class="text-xs text-gray-500 dark:text-gray-400 text-center -mt-2 mb-2">
383
+ Fully covered by gift card
384
+ </p>
385
+ {:else}
386
+ <div class="flex justify-between {typography.h3} py-5 border-t border-gray-200 dark:border-gray-600">
387
+ <span>Total</span><span>${total.toFixed(2)}</span>
388
+ </div>
389
+ {/if}
330
390
  </div>
331
391
  </div>
332
392
  {/if}
@@ -18,6 +18,7 @@ declare const OrderSummary: import("svelte").Component<{
18
18
  elements?: any;
19
19
  venueServiceCharge?: Record<string, any>;
20
20
  onPriceUpdate: any;
21
+ giftCardApplied?: any;
21
22
  }, {}, "">;
22
23
  type $$ComponentProps = {
23
24
  loading?: boolean;
@@ -34,5 +35,6 @@ type $$ComponentProps = {
34
35
  elements?: any;
35
36
  venueServiceCharge?: Record<string, any>;
36
37
  onPriceUpdate: any;
38
+ giftCardApplied?: any;
37
39
  };
38
40
  //# sourceMappingURL=OrderSummary.svelte.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrderSummary.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/calendar/OrderSummary/OrderSummary.svelte.js"],"names":[],"mappings":";;;;;AAoVA;cApU+B,OAAO;iBAAe,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;sBAAoB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;mBAAiB,GAAG,EAAE;qBAAmB,GAAG;eAAa,OAAO;cAAY,MAAM;mBAAiB,OAAO;oBAAkB,MAAM;uBAAqB,GAAG;sBAAoB,GAAG;eAAa,GAAG;yBAAuB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;mBAAiB,GAAG;WAoUnT;wBApUxC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,M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AC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,GAAG,CAAC;IAAC,eAAe,CAAC,EAAE,GAAG,CAAC;IAAC,QAAQ,CAAC,EAAE,GAAG,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,aAAa,EAAE,GAAG,CAAC;IAAC,eAAe,CAAC,EAAE,GAAG,CAAA;CAAE"}
@@ -103,54 +103,56 @@ describe('Button Sizes', () => {
103
103
  test('Full width size', () => {
104
104
  const { button } = setupTest({ size: 'full' });
105
105
  expect(button).toHaveClass('w-full');
106
+ expect(button).toHaveClass('h-11');
106
107
  expect(button).toHaveClass('px-5');
107
- expect(button).toHaveClass('py-3');
108
108
  });
109
109
 
110
110
  test('Full width on mobile, auto on desktop', () => {
111
111
  const { button } = setupTest({ size: 'full-md-auto' });
112
112
  expect(button).toHaveClass('w-full');
113
+ expect(button).toHaveClass('h-11');
113
114
  expect(button).toHaveClass('md:w-auto');
114
115
  });
115
116
 
116
117
  test('XL size', () => {
117
118
  const { button } = setupTest({ size: 'xl' });
119
+ expect(button).toHaveClass('h-12');
118
120
  expect(button).toHaveClass('px-6');
119
- expect(button).toHaveClass('py-3.5');
120
121
  expect(button).toHaveClass('text-sm');
121
122
  });
122
123
 
123
124
  test('Large size', () => {
124
125
  const { button } = setupTest({ size: 'lg' });
126
+ expect(button).toHaveClass('h-11');
125
127
  expect(button).toHaveClass('px-5');
126
- expect(button).toHaveClass('py-3');
127
128
  expect(button).toHaveClass('text-sm');
128
129
  });
129
130
 
130
131
  test('Medium size (default)', () => {
131
132
  const { button } = setupTest({ size: 'md' });
133
+ expect(button).toHaveClass('h-10');
132
134
  expect(button).toHaveClass('px-4');
133
- expect(button).toHaveClass('py-2.5');
134
135
  expect(button).toHaveClass('text-sm');
135
136
  });
136
137
 
137
138
  test('Small size', () => {
138
139
  const { button } = setupTest({ size: 'sm' });
140
+ expect(button).toHaveClass('h-9');
139
141
  expect(button).toHaveClass('px-3');
140
- expect(button).toHaveClass('py-2');
141
142
  expect(button).toHaveClass('text-sm');
142
143
  });
143
144
 
144
145
  test('Extra small size', () => {
145
146
  const { button } = setupTest({ size: 'xs' });
147
+ expect(button).toHaveClass('h-8');
146
148
  expect(button).toHaveClass('px-3');
147
- expect(button).toHaveClass('py-1.5');
148
149
  expect(button).toHaveClass('text-xs');
149
150
  });
150
151
 
151
152
  test('Half width size', () => {
152
153
  const { button } = setupTest({ size: 'half' });
153
154
  expect(button).toHaveClass('w-1/2');
155
+ expect(button).toHaveClass('h-10');
154
156
  });
155
157
  });
156
158
 
@@ -342,7 +342,7 @@
342
342
  {:else}
343
343
  <div class="relative flex items-center w-full">
344
344
  {#if leftIcon}
345
- <div class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 z-10 pointer-events-none">
345
+ <div class="absolute left-3 inset-y-0 flex items-center text-gray-400 z-10 pointer-events-none">
346
346
  {@render leftIcon()}
347
347
  </div>
348
348
  {/if}
@@ -22,9 +22,8 @@ describe('sizing tokens', () => {
22
22
  expect(formInputSizes.md).toContain('h-10');
23
23
  expect(formInputSizes.lg).toContain('h-12');
24
24
  });
25
- it('includes padding and text size classes', () => {
25
+ it('includes horizontal padding and text size classes', () => {
26
26
  for (const size of Object.values(formInputSizes)) {
27
- expect(size).toMatch(/py-\d/);
28
27
  expect(size).toMatch(/px-\d/);
29
28
  expect(size).toMatch(/text-(sm|base)/);
30
29
  }
@@ -39,14 +38,13 @@ describe('sizing tokens', () => {
39
38
  expect(formControlSizes).toHaveProperty('md');
40
39
  expect(formControlSizes).toHaveProperty('lg');
41
40
  });
42
- it('does NOT include height classes (for flexible controls)', () => {
41
+ it('includes explicit height classes for toolbar alignment', () => {
43
42
  for (const size of Object.values(formControlSizes)) {
44
- expect(size).not.toMatch(/h-\d/);
43
+ expect(size).toMatch(/h-\d+/);
45
44
  }
46
45
  });
47
46
  it('includes padding and text size classes', () => {
48
47
  for (const size of Object.values(formControlSizes)) {
49
- expect(size).toMatch(/py-\d/);
50
48
  expect(size).toMatch(/px-\d/);
51
49
  expect(size).toMatch(/text-(sm|base)/);
52
50
  }
@@ -170,11 +168,11 @@ describe('sizing tokens', () => {
170
168
  expect(buttonSizes).toHaveProperty('full-md-auto');
171
169
  expect(buttonSizes).toHaveProperty('half');
172
170
  });
173
- it('standard sizes include padding and text sizing', () => {
171
+ it('standard sizes include explicit height, padding and text sizing', () => {
174
172
  const standardSizes = ['xs', 'sm', 'md', 'lg', 'xl'];
175
173
  for (const size of standardSizes) {
174
+ expect(buttonSizes[size]).toMatch(/h-\d+/);
176
175
  expect(buttonSizes[size]).toMatch(/px-\d/);
177
- expect(buttonSizes[size]).toMatch(/py-\d/);
178
176
  expect(buttonSizes[size]).toMatch(/text-(xs|sm)/);
179
177
  }
180
178
  });
@@ -6,21 +6,21 @@
6
6
  */
7
7
  /**
8
8
  * Form input sizes - for Input component with fixed heights
9
- * Provides consistent height, padding, and text sizing for text inputs.
9
+ * Uses explicit heights for consistent toolbar alignment.
10
10
  */
11
11
  export declare const formInputSizes: {
12
- readonly sm: "py-2 px-3 text-sm h-9";
13
- readonly md: "py-2.5 px-4 text-sm h-10";
14
- readonly lg: "py-3 px-4 text-base h-12";
12
+ readonly sm: "h-9 px-3 text-sm";
13
+ readonly md: "h-10 px-4 text-sm";
14
+ readonly lg: "h-12 px-4 text-base";
15
15
  };
16
16
  /**
17
- * Form control sizes - for Select and other form controls without fixed heights
18
- * Provides consistent padding and text sizing.
17
+ * Form control sizes - for Select and other form controls
18
+ * Uses explicit heights to match buttons and inputs for toolbar alignment.
19
19
  */
20
20
  export declare const formControlSizes: {
21
- readonly sm: "py-2 px-3 text-sm";
22
- readonly md: "py-2.5 px-4 text-sm";
23
- readonly lg: "py-3 px-4 text-base";
21
+ readonly sm: "h-9 px-3 text-sm";
22
+ readonly md: "h-10 px-4 text-sm";
23
+ readonly lg: "h-12 px-4 text-base";
24
24
  };
25
25
  export type FormInputSize = keyof typeof formInputSizes;
26
26
  export type FormControlSize = keyof typeof formControlSizes;
@@ -63,18 +63,19 @@ export declare const skeletonSizes: {
63
63
  };
64
64
  export type SkeletonSize = keyof typeof skeletonSizes;
65
65
  /**
66
- * Standard button sizes - padding and text sizing.
66
+ * Standard button sizes - padding, text sizing, and explicit heights for consistency.
67
+ * All toolbar elements (buttons, inputs, selects) should align at the same height.
67
68
  */
68
69
  export declare const buttonSizes: {
69
- readonly xs: "px-3 py-1.5 text-xs";
70
- readonly sm: "px-3 py-2 text-sm";
71
- readonly md: "px-4 py-2.5 text-sm";
72
- readonly lg: "px-5 py-3 text-sm";
73
- readonly xl: "px-6 py-3.5 text-sm";
74
- readonly 'xl-medium': "w-full px-6 py-3.5 text-sm";
75
- readonly full: "w-full px-5 py-3 text-sm";
76
- readonly 'full-md-auto': "w-full px-5 py-3 text-sm md:w-auto";
77
- readonly half: "w-1/2 px-4 py-2.5 text-sm";
70
+ readonly xs: "h-8 px-3 text-xs";
71
+ readonly sm: "h-9 px-3 text-sm";
72
+ readonly md: "h-10 px-4 text-sm";
73
+ readonly lg: "h-11 px-5 text-sm";
74
+ readonly xl: "h-12 px-6 text-sm";
75
+ readonly 'xl-medium': "w-full h-12 px-6 text-sm";
76
+ readonly full: "w-full h-11 px-5 text-sm";
77
+ readonly 'full-md-auto': "w-full h-11 px-5 text-sm md:w-auto";
78
+ readonly half: "w-1/2 h-10 px-4 text-sm";
78
79
  readonly landing: "h-12 sm:h-14 px-6 sm:px-8 text-base sm:text-lg";
79
80
  };
80
81
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sizing.d.ts","sourceRoot":"","sources":["../../src/lib/tokens/sizing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;CAIj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AAgB,GAAG,MAAM,OAAO,iBAAiB,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAClE,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,eAAe,CAAC"}
@@ -9,21 +9,21 @@
9
9
  // =============================================================================
10
10
  /**
11
11
  * Form input sizes - for Input component with fixed heights
12
- * Provides consistent height, padding, and text sizing for text inputs.
12
+ * Uses explicit heights for consistent toolbar alignment.
13
13
  */
14
14
  export const formInputSizes = {
15
- sm: 'py-2 px-3 text-sm h-9',
16
- md: 'py-2.5 px-4 text-sm h-10',
17
- lg: 'py-3 px-4 text-base h-12',
15
+ sm: 'h-9 px-3 text-sm',
16
+ md: 'h-10 px-4 text-sm',
17
+ lg: 'h-12 px-4 text-base',
18
18
  };
19
19
  /**
20
- * Form control sizes - for Select and other form controls without fixed heights
21
- * Provides consistent padding and text sizing.
20
+ * Form control sizes - for Select and other form controls
21
+ * Uses explicit heights to match buttons and inputs for toolbar alignment.
22
22
  */
23
23
  export const formControlSizes = {
24
- sm: 'py-2 px-3 text-sm',
25
- md: 'py-2.5 px-4 text-sm',
26
- lg: 'py-3 px-4 text-base',
24
+ sm: 'h-9 px-3 text-sm',
25
+ md: 'h-10 px-4 text-sm',
26
+ lg: 'h-12 px-4 text-base',
27
27
  };
28
28
  // =============================================================================
29
29
  // ICON/SPINNER SIZES
@@ -76,18 +76,19 @@ export const skeletonSizes = {
76
76
  // BUTTON SIZES
77
77
  // =============================================================================
78
78
  /**
79
- * Standard button sizes - padding and text sizing.
79
+ * Standard button sizes - padding, text sizing, and explicit heights for consistency.
80
+ * All toolbar elements (buttons, inputs, selects) should align at the same height.
80
81
  */
81
82
  export const buttonSizes = {
82
- xs: 'px-3 py-1.5 text-xs',
83
- sm: 'px-3 py-2 text-sm',
84
- md: 'px-4 py-2.5 text-sm',
85
- lg: 'px-5 py-3 text-sm',
86
- xl: 'px-6 py-3.5 text-sm',
87
- 'xl-medium': 'w-full px-6 py-3.5 text-sm',
88
- full: 'w-full px-5 py-3 text-sm',
89
- 'full-md-auto': 'w-full px-5 py-3 text-sm md:w-auto',
90
- half: 'w-1/2 px-4 py-2.5 text-sm',
83
+ xs: 'h-8 px-3 text-xs',
84
+ sm: 'h-9 px-3 text-sm',
85
+ md: 'h-10 px-4 text-sm',
86
+ lg: 'h-11 px-5 text-sm',
87
+ xl: 'h-12 px-6 text-sm',
88
+ 'xl-medium': 'w-full h-12 px-6 text-sm',
89
+ full: 'w-full h-11 px-5 text-sm',
90
+ 'full-md-auto': 'w-full h-11 px-5 text-sm md:w-auto',
91
+ half: 'w-1/2 h-10 px-4 text-sm',
91
92
  // Landing page hero buttons - taller with larger text
92
93
  landing: 'h-12 sm:h-14 px-6 sm:px-8 text-base sm:text-lg',
93
94
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getmicdrop/svelte-components",
3
- "version": "5.13.0",
3
+ "version": "5.14.0",
4
4
  "description": "Shared component library for Micdrop applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",