smartsell-ui-kit 0.0.1 → 0.0.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.
package/dist/index.js CHANGED
@@ -1,3 +1,7 @@
1
+ import {
2
+ Modal
3
+ } from "./chunk-KZRGV5RH.js";
4
+
1
5
  // src/components/Button.tsx
2
6
  import { withAlpha as withAlpha2 } from "smartsell-sales-sdk";
3
7
 
@@ -216,182 +220,9 @@ function Card({
216
220
  }
217
221
 
218
222
  // src/components/ComposableModal.tsx
219
- import { useMemo as useMemo3 } from "react";
223
+ import { useMemo as useMemo2 } from "react";
220
224
  import { SlotRenderer } from "smartsell-sales-sdk";
221
-
222
- // src/components/Modal.tsx
223
- import { useEffect, useMemo as useMemo2 } from "react";
224
- import { withAlpha as withAlpha4 } from "smartsell-sales-sdk";
225
- import { jsx as jsx2, jsxs as jsxs3 } from "react/jsx-runtime";
226
- var normalizeWidth = (maxWidth) => {
227
- if (typeof maxWidth === "number") {
228
- return `${maxWidth}px`;
229
- }
230
- return maxWidth != null ? maxWidth : "720px";
231
- };
232
- function Modal({
233
- sdk,
234
- isOpen,
235
- onClose,
236
- children,
237
- footer,
238
- title,
239
- description,
240
- headerContent,
241
- maxWidth,
242
- closeOnBackdrop = true,
243
- closeOnEscape = true,
244
- hideCloseButton = false,
245
- contentStyle
246
- }) {
247
- const { theme, borderSoft, overlay, surfaceRaised, mutedText } = useUiKitTheme(sdk);
248
- const titleId = useMemo2(
249
- () => `smartsell-modal-${String(title != null ? title : "dialog").toLowerCase().replace(/[^a-z0-9]+/g, "-")}`,
250
- [title]
251
- );
252
- useEffect(() => {
253
- if (!isOpen || typeof window === "undefined" || typeof document === "undefined") {
254
- return;
255
- }
256
- const previousOverflow = document.body.style.overflow;
257
- document.body.style.overflow = "hidden";
258
- const handleKeyDown = (event) => {
259
- if (closeOnEscape && event.key === "Escape") {
260
- onClose();
261
- }
262
- };
263
- window.addEventListener("keydown", handleKeyDown);
264
- return () => {
265
- document.body.style.overflow = previousOverflow;
266
- window.removeEventListener("keydown", handleKeyDown);
267
- };
268
- }, [closeOnEscape, isOpen, onClose]);
269
- if (!isOpen) {
270
- return null;
271
- }
272
- const header = headerContent != null ? headerContent : /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
273
- title ? /* @__PURE__ */ jsx2(
274
- "h2",
275
- {
276
- id: titleId,
277
- style: {
278
- margin: 0,
279
- color: theme.colors.onSurface,
280
- fontSize: 30,
281
- fontWeight: 800,
282
- lineHeight: 1.1
283
- },
284
- children: title
285
- }
286
- ) : null,
287
- description ? /* @__PURE__ */ jsx2(
288
- "p",
289
- {
290
- style: {
291
- margin: 0,
292
- color: mutedText,
293
- fontSize: 15,
294
- lineHeight: 1.6
295
- },
296
- children: description
297
- }
298
- ) : null
299
- ] });
300
- return /* @__PURE__ */ jsx2(
301
- "div",
302
- {
303
- "aria-labelledby": title ? titleId : void 0,
304
- "aria-modal": "true",
305
- role: "dialog",
306
- onMouseDown: (event) => {
307
- if (closeOnBackdrop && event.target === event.currentTarget) {
308
- onClose();
309
- }
310
- },
311
- style: {
312
- position: "fixed",
313
- inset: 0,
314
- zIndex: 70,
315
- display: "flex",
316
- alignItems: "center",
317
- justifyContent: "center",
318
- padding: 16,
319
- backgroundColor: overlay,
320
- backdropFilter: "blur(8px)"
321
- },
322
- children: /* @__PURE__ */ jsxs3(
323
- "div",
324
- {
325
- style: {
326
- width: "min(100%, 100%)",
327
- maxWidth: normalizeWidth(maxWidth),
328
- borderRadius: 30,
329
- border: `1px solid ${borderSoft}`,
330
- background: `linear-gradient(180deg, ${surfaceRaised}, ${theme.colors.surface})`,
331
- boxShadow: `0 34px 80px ${withAlpha4("#020617", 0.28)}`,
332
- color: theme.colors.onSurface,
333
- overflow: "hidden",
334
- ...contentStyle
335
- },
336
- children: [
337
- /* @__PURE__ */ jsxs3(
338
- "div",
339
- {
340
- style: {
341
- display: "flex",
342
- alignItems: "flex-start",
343
- justifyContent: "space-between",
344
- gap: 16,
345
- padding: "24px 24px 0"
346
- },
347
- children: [
348
- /* @__PURE__ */ jsx2("div", { style: { flex: 1 }, children: header }),
349
- !hideCloseButton ? /* @__PURE__ */ jsx2(
350
- "button",
351
- {
352
- "aria-label": "Close modal",
353
- type: "button",
354
- onClick: onClose,
355
- style: {
356
- height: 42,
357
- width: 42,
358
- borderRadius: 999,
359
- border: `1px solid ${borderSoft}`,
360
- backgroundColor: "transparent",
361
- color: theme.colors.onSurface,
362
- cursor: "pointer",
363
- fontSize: 20,
364
- fontWeight: 700
365
- },
366
- children: "\xD7"
367
- }
368
- ) : null
369
- ]
370
- }
371
- ),
372
- /* @__PURE__ */ jsx2("div", { style: { padding: 24 }, children }),
373
- footer ? /* @__PURE__ */ jsx2(
374
- "div",
375
- {
376
- style: {
377
- display: "flex",
378
- justifyContent: "flex-end",
379
- gap: 12,
380
- padding: "0 24px 24px",
381
- borderTop: `1px solid ${withAlpha4(theme.colors.onSurface, 0.06)}`
382
- },
383
- children: footer
384
- }
385
- ) : null
386
- ]
387
- }
388
- )
389
- }
390
- );
391
- }
392
-
393
- // src/components/ComposableModal.tsx
394
- import { Fragment, jsx as jsx3, jsxs as jsxs4 } from "react/jsx-runtime";
225
+ import { Fragment, jsx as jsx2, jsxs as jsxs3 } from "react/jsx-runtime";
395
226
  var createModalSlotIds = (slotBaseId) => ({
396
227
  header: `${slotBaseId}:modal-header`,
397
228
  body: `${slotBaseId}:modal-body`,
@@ -417,8 +248,9 @@ function ComposableModal({
417
248
  footerFallback,
418
249
  children
419
250
  }) {
251
+ const theme = useUiKitTheme(sdk);
420
252
  const slotIds = createModalSlotIds(slotBaseId);
421
- const context = useMemo3(
253
+ const context = useMemo2(
422
254
  () => ({
423
255
  title,
424
256
  description,
@@ -432,23 +264,49 @@ function ComposableModal({
432
264
  }),
433
265
  [cancelLabel, confirmLabel, description, isBusy, isOpen, onClose, onConfirm, payload, title]
434
266
  );
435
- const defaultFooter = hideDefaultFooter ? void 0 : footerFallback != null ? footerFallback : /* @__PURE__ */ jsxs4(Fragment, { children: [
436
- /* @__PURE__ */ jsx3(Button, { sdk, variant: "outline", tone: "neutral", onClick: onClose, disabled: isBusy, children: cancelLabel }),
437
- onConfirm ? /* @__PURE__ */ jsx3(Button, { sdk, onClick: onConfirm, disabled: isBusy, children: confirmLabel }) : null
267
+ const defaultFooter = hideDefaultFooter ? void 0 : footerFallback != null ? footerFallback : /* @__PURE__ */ jsxs3(Fragment, { children: [
268
+ /* @__PURE__ */ jsx2(Button, { sdk, variant: "outline", tone: "neutral", onClick: onClose, disabled: isBusy, children: cancelLabel }),
269
+ onConfirm ? /* @__PURE__ */ jsx2(Button, { sdk, onClick: onConfirm, disabled: isBusy, children: confirmLabel }) : null
270
+ ] });
271
+ const defaultHeader = headerFallback != null ? headerFallback : /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
272
+ /* @__PURE__ */ jsx2(
273
+ "h2",
274
+ {
275
+ style: {
276
+ margin: 0,
277
+ fontSize: 30,
278
+ fontWeight: 800,
279
+ lineHeight: 1.1
280
+ },
281
+ children: title
282
+ }
283
+ ),
284
+ description ? /* @__PURE__ */ jsx2(
285
+ "p",
286
+ {
287
+ style: {
288
+ margin: 0,
289
+ fontSize: 15,
290
+ lineHeight: 1.6,
291
+ opacity: 0.78
292
+ },
293
+ children: description
294
+ }
295
+ ) : null
438
296
  ] });
439
- const headerContent = /* @__PURE__ */ jsx3(SlotRenderer, { id: slotIds.header, sdk, context, children: headerFallback });
440
- const bodyContent = /* @__PURE__ */ jsx3(SlotRenderer, { id: slotIds.body, sdk, context, children });
441
- const footerContent = /* @__PURE__ */ jsx3(SlotRenderer, { id: slotIds.footer, sdk, context, children: defaultFooter });
442
- return /* @__PURE__ */ jsx3(
297
+ const headerContent = /* @__PURE__ */ jsx2(SlotRenderer, { id: slotIds.header, sdk, context, children: defaultHeader });
298
+ const bodyContent = /* @__PURE__ */ jsx2(SlotRenderer, { id: slotIds.body, sdk, context, children });
299
+ const footerContent = /* @__PURE__ */ jsx2(SlotRenderer, { id: slotIds.footer, sdk, context, children: defaultFooter });
300
+ return /* @__PURE__ */ jsx2(
443
301
  Modal,
444
302
  {
445
- sdk,
446
303
  isOpen,
447
304
  onClose,
448
305
  title,
449
306
  description,
450
307
  headerContent,
451
308
  footer: footerContent,
309
+ theme,
452
310
  maxWidth,
453
311
  closeOnBackdrop,
454
312
  closeOnEscape,
@@ -458,7 +316,7 @@ function ComposableModal({
458
316
  }
459
317
 
460
318
  // src/components/Field.tsx
461
- import { jsx as jsx4, jsxs as jsxs5 } from "react/jsx-runtime";
319
+ import { jsx as jsx3, jsxs as jsxs4 } from "react/jsx-runtime";
462
320
  function Field({
463
321
  sdk,
464
322
  label,
@@ -470,7 +328,7 @@ function Field({
470
328
  style
471
329
  }) {
472
330
  const { theme, mutedText } = useUiKitTheme(sdk);
473
- return /* @__PURE__ */ jsxs5(
331
+ return /* @__PURE__ */ jsxs4(
474
332
  "label",
475
333
  {
476
334
  htmlFor,
@@ -482,8 +340,8 @@ function Field({
482
340
  ...style
483
341
  },
484
342
  children: [
485
- (label || hint) && /* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
486
- label ? /* @__PURE__ */ jsxs5(
343
+ (label || hint) && /* @__PURE__ */ jsxs4("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
344
+ label ? /* @__PURE__ */ jsxs4(
487
345
  "span",
488
346
  {
489
347
  style: {
@@ -494,11 +352,11 @@ function Field({
494
352
  },
495
353
  children: [
496
354
  label,
497
- required ? /* @__PURE__ */ jsx4("span", { style: { color: theme.colors.negative, marginLeft: 4 }, children: "*" }) : null
355
+ required ? /* @__PURE__ */ jsx3("span", { style: { color: theme.colors.negative, marginLeft: 4 }, children: "*" }) : null
498
356
  ]
499
357
  }
500
358
  ) : null,
501
- hint ? /* @__PURE__ */ jsx4(
359
+ hint ? /* @__PURE__ */ jsx3(
502
360
  "span",
503
361
  {
504
362
  style: {
@@ -511,7 +369,7 @@ function Field({
511
369
  ) : null
512
370
  ] }),
513
371
  children,
514
- error ? /* @__PURE__ */ jsx4(
372
+ error ? /* @__PURE__ */ jsx3(
515
373
  "span",
516
374
  {
517
375
  style: {
@@ -529,8 +387,8 @@ function Field({
529
387
  }
530
388
 
531
389
  // src/components/Input.tsx
532
- import { withAlpha as withAlpha5 } from "smartsell-sales-sdk";
533
- import { jsx as jsx5 } from "react/jsx-runtime";
390
+ import { withAlpha as withAlpha4 } from "smartsell-sales-sdk";
391
+ import { jsx as jsx4 } from "react/jsx-runtime";
534
392
  var getPadding = (size) => {
535
393
  if (size === "sm") return "10px 12px";
536
394
  if (size === "lg") return "16px 18px";
@@ -556,20 +414,20 @@ function Input({
556
414
  outline: "none",
557
415
  color: theme.colors.onSurface,
558
416
  backgroundColor: disabled ? surfaceMuted : theme.colors.surface,
559
- boxShadow: error ? `0 0 0 3px ${withAlpha5(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,
417
+ boxShadow: error ? `0 0 0 3px ${withAlpha4(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,
560
418
  transition: "border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease",
561
419
  ...style
562
420
  };
563
- const input = /* @__PURE__ */ jsx5("input", { ...rest, id, disabled, style: inputStyle });
421
+ const input = /* @__PURE__ */ jsx4("input", { ...rest, id, disabled, style: inputStyle });
564
422
  if (!label && !hint && !error) {
565
423
  return input;
566
424
  }
567
- return /* @__PURE__ */ jsx5(Field, { sdk, label, hint, error, htmlFor: id, children: input });
425
+ return /* @__PURE__ */ jsx4(Field, { sdk, label, hint, error, htmlFor: id, children: input });
568
426
  }
569
427
 
570
428
  // src/components/Select.tsx
571
- import { withAlpha as withAlpha6 } from "smartsell-sales-sdk";
572
- import { jsx as jsx6 } from "react/jsx-runtime";
429
+ import { withAlpha as withAlpha5 } from "smartsell-sales-sdk";
430
+ import { jsx as jsx5 } from "react/jsx-runtime";
573
431
  var getPadding2 = (size) => {
574
432
  if (size === "sm") return "10px 12px";
575
433
  if (size === "lg") return "16px 18px";
@@ -596,20 +454,20 @@ function Select({
596
454
  outline: "none",
597
455
  color: theme.colors.onSurface,
598
456
  backgroundColor: disabled ? surfaceMuted : theme.colors.surface,
599
- boxShadow: error ? `0 0 0 3px ${withAlpha6(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,
457
+ boxShadow: error ? `0 0 0 3px ${withAlpha5(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,
600
458
  transition: "border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease",
601
459
  ...style
602
460
  };
603
- const select = /* @__PURE__ */ jsx6("select", { ...rest, id, disabled, style: selectStyle, children });
461
+ const select = /* @__PURE__ */ jsx5("select", { ...rest, id, disabled, style: selectStyle, children });
604
462
  if (!label && !hint && !error) {
605
463
  return select;
606
464
  }
607
- return /* @__PURE__ */ jsx6(Field, { sdk, label, hint, error, htmlFor: id, children: select });
465
+ return /* @__PURE__ */ jsx5(Field, { sdk, label, hint, error, htmlFor: id, children: select });
608
466
  }
609
467
 
610
468
  // src/components/Textarea.tsx
611
- import { withAlpha as withAlpha7 } from "smartsell-sales-sdk";
612
- import { jsx as jsx7 } from "react/jsx-runtime";
469
+ import { withAlpha as withAlpha6 } from "smartsell-sales-sdk";
470
+ import { jsx as jsx6 } from "react/jsx-runtime";
613
471
  var getPadding3 = (size) => {
614
472
  if (size === "sm") return "10px 12px";
615
473
  if (size === "lg") return "16px 18px";
@@ -636,16 +494,16 @@ function Textarea({
636
494
  outline: "none",
637
495
  color: theme.colors.onSurface,
638
496
  backgroundColor: disabled ? surfaceMuted : theme.colors.surface,
639
- boxShadow: error ? `0 0 0 3px ${withAlpha7(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,
497
+ boxShadow: error ? `0 0 0 3px ${withAlpha6(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,
640
498
  transition: "border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease",
641
499
  resize: "vertical",
642
500
  ...style
643
501
  };
644
- const textarea = /* @__PURE__ */ jsx7("textarea", { ...rest, id, disabled, rows, style: textareaStyle });
502
+ const textarea = /* @__PURE__ */ jsx6("textarea", { ...rest, id, disabled, rows, style: textareaStyle });
645
503
  if (!label && !hint && !error) {
646
504
  return textarea;
647
505
  }
648
- return /* @__PURE__ */ jsx7(Field, { sdk, label, hint, error, htmlFor: id, children: textarea });
506
+ return /* @__PURE__ */ jsx6(Field, { sdk, label, hint, error, htmlFor: id, children: textarea });
649
507
  }
650
508
  export {
651
509
  Button,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Button.tsx","../src/theme.ts","../src/components/Card.tsx","../src/components/ComposableModal.tsx","../src/components/Modal.tsx","../src/components/Field.tsx","../src/components/Input.tsx","../src/components/Select.tsx","../src/components/Textarea.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, CSSProperties, ReactNode } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\n\ntype ButtonVariant = 'solid' | 'outline' | 'ghost';\ntype ButtonTone = 'primary' | 'secondary' | 'neutral' | 'danger';\ntype ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'dangerouslySetInnerHTML'> {\n sdk: SmartSellSDK;\n variant?: ButtonVariant;\n tone?: ButtonTone;\n size?: ButtonSize;\n fullWidth?: boolean;\n leadingIcon?: ReactNode;\n trailingIcon?: ReactNode;\n}\n\nconst getSizeStyles = (size: ButtonSize): CSSProperties => {\n if (size === 'sm') {\n return { minHeight: 38, padding: '0 14px', fontSize: 13 };\n }\n\n if (size === 'lg') {\n return { minHeight: 50, padding: '0 20px', fontSize: 15 };\n }\n\n return { minHeight: 44, padding: '0 18px', fontSize: 14 };\n};\n\nexport function Button({\n sdk,\n variant = 'solid',\n tone = 'primary',\n size = 'md',\n fullWidth = false,\n leadingIcon,\n trailingIcon,\n children,\n disabled,\n style,\n type = 'button',\n ...rest\n}: ButtonProps) {\n const { theme } = useUiKitTheme(sdk);\n\n const palette = {\n primary: {\n background: theme.colors.primary,\n foreground: theme.colors.onPrimary,\n border: withAlpha(theme.colors.primary, 0.3),\n },\n secondary: {\n background: theme.colors.secondary,\n foreground: theme.colors.onSecondary,\n border: withAlpha(theme.colors.secondary, 0.3),\n },\n neutral: {\n background: theme.colors.surface,\n foreground: theme.colors.onSurface,\n border: withAlpha(theme.colors.onSurface, 0.16),\n },\n danger: {\n background: theme.colors.negative,\n foreground: '#ffffff',\n border: withAlpha(theme.colors.negative, 0.32),\n },\n }[tone];\n\n const variantStyles: Record<ButtonVariant, CSSProperties> = {\n solid: {\n backgroundColor: palette.background,\n borderColor: palette.border,\n color: palette.foreground,\n },\n outline: {\n backgroundColor: 'transparent',\n borderColor: palette.border,\n color: tone === 'neutral' ? palette.foreground : palette.background,\n },\n ghost: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n color: tone === 'neutral' ? palette.foreground : palette.background,\n },\n };\n\n return (\n <button\n {...rest}\n type={type}\n disabled={disabled}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 10,\n width: fullWidth ? '100%' : undefined,\n borderRadius: 16,\n borderStyle: 'solid',\n borderWidth: 1,\n cursor: disabled ? 'not-allowed' : 'pointer',\n fontWeight: 700,\n letterSpacing: '0.01em',\n lineHeight: 1,\n opacity: disabled ? 0.58 : 1,\n transition: 'transform 160ms ease, opacity 160ms ease, background-color 160ms ease',\n boxShadow: variant === 'solid' ? `0 14px 28px ${withAlpha(palette.background, 0.18)}` : 'none',\n ...getSizeStyles(size),\n ...variantStyles[variant],\n ...style,\n }}\n >\n {leadingIcon}\n {children}\n {trailingIcon}\n </button>\n );\n}","import { useMemo } from 'react';\n\nimport {\n useSalesTheme,\n withAlpha,\n type SalesTheme,\n type SmartSellSDK,\n} from 'smartsell-sales-sdk';\n\nexport interface UiKitThemeTokens {\n theme: SalesTheme;\n borderSoft: string;\n borderStrong: string;\n surfaceMuted: string;\n surfaceRaised: string;\n overlay: string;\n focusRing: string;\n mutedText: string;\n}\n\nexport function useUiKitTheme(sdk: SmartSellSDK): UiKitThemeTokens {\n const { theme } = useSalesTheme(sdk);\n\n return useMemo(() => {\n return {\n theme,\n borderSoft: withAlpha(theme.colors.onSurface, 0.1),\n borderStrong: withAlpha(theme.colors.onSurface, 0.16),\n surfaceMuted: withAlpha(theme.colors.onSurface, 0.04),\n surfaceRaised: withAlpha(theme.colors.surface, 0.94),\n overlay: withAlpha('#030712', 0.62),\n focusRing: withAlpha(theme.colors.primary, 0.22),\n mutedText: withAlpha(theme.colors.onSurface, 0.72),\n };\n }, [theme]);\n}","import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\n\ntype CardTone = 'default' | 'primary' | 'secondary' | 'warning';\n\nexport interface CardProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dangerouslySetInnerHTML' | 'title'> {\n sdk: SmartSellSDK;\n children: ReactNode;\n eyebrow?: ReactNode;\n title?: ReactNode;\n action?: ReactNode;\n tone?: CardTone;\n padded?: boolean;\n}\n\nconst getToneStyles = (tone: CardTone, sdk: SmartSellSDK) => {\n const { theme } = useUiKitTheme(sdk);\n\n const accent = {\n default: theme.colors.primary,\n primary: theme.colors.primary,\n secondary: theme.colors.secondary,\n warning: theme.colors.warning,\n }[tone];\n\n return {\n accent,\n background: `linear-gradient(160deg, ${withAlpha(theme.colors.surface, 0.98)}, ${withAlpha(accent, 0.08)})`,\n border: withAlpha(accent, 0.22),\n };\n};\n\nexport function Card({\n sdk,\n children,\n eyebrow,\n title,\n action,\n tone = 'default',\n padded = true,\n style,\n ...rest\n}: CardProps) {\n const { theme, mutedText } = useUiKitTheme(sdk);\n const toneStyles = getToneStyles(tone, sdk);\n\n return (\n <div\n {...rest}\n style={{\n borderRadius: 28,\n border: `1px solid ${toneStyles.border}`,\n background: toneStyles.background,\n color: theme.colors.onSurface,\n boxShadow: `0 24px 48px ${withAlpha(theme.colors.onSurface, 0.06)}`,\n padding: padded ? 24 : undefined,\n ...style,\n }}\n >\n {(eyebrow || title || action) && (\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n gap: 16,\n marginBottom: 18,\n }}\n >\n <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>\n {eyebrow ? (\n <span\n style={{\n color: toneStyles.accent,\n fontSize: 12,\n fontWeight: 800,\n letterSpacing: '0.16em',\n textTransform: 'uppercase',\n }}\n >\n {eyebrow}\n </span>\n ) : null}\n {title ? (\n <div\n style={{\n color: theme.colors.onSurface,\n fontSize: 24,\n fontWeight: 700,\n lineHeight: 1.2,\n }}\n >\n {title}\n </div>\n ) : null}\n </div>\n {action ? <div style={{ color: mutedText }}>{action}</div> : null}\n </div>\n )}\n {children}\n </div>\n );\n}","import { useMemo } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { SlotRenderer, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { Button } from './Button';\nimport { Modal } from './Modal';\n\nexport interface ModalSlotIds {\n header: string;\n body: string;\n footer: string;\n}\n\nexport interface ModalSlotContext<TPayload = unknown> {\n title: string;\n description?: string;\n payload?: TPayload;\n close: () => void;\n confirm?: () => void;\n confirmLabel: string;\n cancelLabel: string;\n isOpen: boolean;\n isBusy: boolean;\n}\n\nexport interface ComposableModalProps<TPayload = unknown> {\n sdk: SmartSellSDK;\n isOpen: boolean;\n onClose: () => void;\n title: string;\n description?: string;\n slotBaseId: string;\n payload?: TPayload;\n onConfirm?: () => void;\n confirmLabel?: string;\n cancelLabel?: string;\n isBusy?: boolean;\n closeOnBackdrop?: boolean;\n closeOnEscape?: boolean;\n hideDefaultFooter?: boolean;\n maxWidth?: number | string;\n headerFallback?: ReactNode;\n footerFallback?: ReactNode;\n children?: ReactNode;\n}\n\nexport const createModalSlotIds = (slotBaseId: string): ModalSlotIds => ({\n header: `${slotBaseId}:modal-header`,\n body: `${slotBaseId}:modal-body`,\n footer: `${slotBaseId}:modal-footer`,\n});\n\nexport function ComposableModal<TPayload = unknown>({\n sdk,\n isOpen,\n onClose,\n title,\n description,\n slotBaseId,\n payload,\n onConfirm,\n confirmLabel = 'Confirm',\n cancelLabel = 'Cancel',\n isBusy = false,\n closeOnBackdrop = true,\n closeOnEscape = true,\n hideDefaultFooter = false,\n maxWidth,\n headerFallback,\n footerFallback,\n children,\n}: ComposableModalProps<TPayload>) {\n const slotIds = createModalSlotIds(slotBaseId);\n\n const context = useMemo<ModalSlotContext<TPayload>>(\n () => ({\n title,\n description,\n payload,\n close: onClose,\n confirm: onConfirm,\n confirmLabel,\n cancelLabel,\n isOpen,\n isBusy,\n }),\n [cancelLabel, confirmLabel, description, isBusy, isOpen, onClose, onConfirm, payload, title],\n );\n\n const defaultFooter = hideDefaultFooter ? undefined : (\n footerFallback ?? (\n <>\n <Button sdk={sdk} variant=\"outline\" tone=\"neutral\" onClick={onClose} disabled={isBusy}>\n {cancelLabel}\n </Button>\n {onConfirm ? (\n <Button sdk={sdk} onClick={onConfirm} disabled={isBusy}>\n {confirmLabel}\n </Button>\n ) : null}\n </>\n )\n );\n\n const headerContent = (\n <SlotRenderer id={slotIds.header} sdk={sdk} context={context}>\n {headerFallback}\n </SlotRenderer>\n );\n\n const bodyContent = (\n <SlotRenderer id={slotIds.body} sdk={sdk} context={context}>\n {children}\n </SlotRenderer>\n );\n\n const footerContent = (\n <SlotRenderer id={slotIds.footer} sdk={sdk} context={context}>\n {defaultFooter}\n </SlotRenderer>\n );\n\n return (\n <Modal\n sdk={sdk}\n isOpen={isOpen}\n onClose={onClose}\n title={title}\n description={description}\n headerContent={headerContent}\n footer={footerContent}\n maxWidth={maxWidth}\n closeOnBackdrop={closeOnBackdrop}\n closeOnEscape={closeOnEscape}\n >\n {bodyContent}\n </Modal>\n );\n}","import { useEffect, useMemo } from 'react';\nimport type { CSSProperties, ReactNode } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\n\nexport interface ModalProps {\n sdk: SmartSellSDK;\n isOpen: boolean;\n onClose: () => void;\n children: ReactNode;\n footer?: ReactNode;\n title?: ReactNode;\n description?: ReactNode;\n headerContent?: ReactNode;\n maxWidth?: number | string;\n closeOnBackdrop?: boolean;\n closeOnEscape?: boolean;\n hideCloseButton?: boolean;\n contentStyle?: CSSProperties;\n}\n\nconst normalizeWidth = (maxWidth?: number | string): string | number => {\n if (typeof maxWidth === 'number') {\n return `${maxWidth}px`;\n }\n\n return maxWidth ?? '720px';\n};\n\nexport function Modal({\n sdk,\n isOpen,\n onClose,\n children,\n footer,\n title,\n description,\n headerContent,\n maxWidth,\n closeOnBackdrop = true,\n closeOnEscape = true,\n hideCloseButton = false,\n contentStyle,\n}: ModalProps) {\n const { theme, borderSoft, overlay, surfaceRaised, mutedText } = useUiKitTheme(sdk);\n const titleId = useMemo(\n () => `smartsell-modal-${String(title ?? 'dialog').toLowerCase().replace(/[^a-z0-9]+/g, '-')}`,\n [title],\n );\n\n useEffect(() => {\n if (!isOpen || typeof window === 'undefined' || typeof document === 'undefined') {\n return;\n }\n\n const previousOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (closeOnEscape && event.key === 'Escape') {\n onClose();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n document.body.style.overflow = previousOverflow;\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [closeOnEscape, isOpen, onClose]);\n\n if (!isOpen) {\n return null;\n }\n\n const header = headerContent ?? (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>\n {title ? (\n <h2\n id={titleId}\n style={{\n margin: 0,\n color: theme.colors.onSurface,\n fontSize: 30,\n fontWeight: 800,\n lineHeight: 1.1,\n }}\n >\n {title}\n </h2>\n ) : null}\n {description ? (\n <p\n style={{\n margin: 0,\n color: mutedText,\n fontSize: 15,\n lineHeight: 1.6,\n }}\n >\n {description}\n </p>\n ) : null}\n </div>\n );\n\n return (\n <div\n aria-labelledby={title ? titleId : undefined}\n aria-modal=\"true\"\n role=\"dialog\"\n onMouseDown={(event) => {\n if (closeOnBackdrop && event.target === event.currentTarget) {\n onClose();\n }\n }}\n style={{\n position: 'fixed',\n inset: 0,\n zIndex: 70,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: 16,\n backgroundColor: overlay,\n backdropFilter: 'blur(8px)',\n }}\n >\n <div\n style={{\n width: 'min(100%, 100%)',\n maxWidth: normalizeWidth(maxWidth),\n borderRadius: 30,\n border: `1px solid ${borderSoft}`,\n background: `linear-gradient(180deg, ${surfaceRaised}, ${theme.colors.surface})`,\n boxShadow: `0 34px 80px ${withAlpha('#020617', 0.28)}`,\n color: theme.colors.onSurface,\n overflow: 'hidden',\n ...contentStyle,\n }}\n >\n <div\n style={{\n display: 'flex',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n gap: 16,\n padding: '24px 24px 0',\n }}\n >\n <div style={{ flex: 1 }}>{header}</div>\n {!hideCloseButton ? (\n <button\n aria-label=\"Close modal\"\n type=\"button\"\n onClick={onClose}\n style={{\n height: 42,\n width: 42,\n borderRadius: 999,\n border: `1px solid ${borderSoft}`,\n backgroundColor: 'transparent',\n color: theme.colors.onSurface,\n cursor: 'pointer',\n fontSize: 20,\n fontWeight: 700,\n }}\n >\n ×\n </button>\n ) : null}\n </div>\n\n <div style={{ padding: 24 }}>{children}</div>\n\n {footer ? (\n <div\n style={{\n display: 'flex',\n justifyContent: 'flex-end',\n gap: 12,\n padding: '0 24px 24px',\n borderTop: `1px solid ${withAlpha(theme.colors.onSurface, 0.06)}`,\n }}\n >\n {footer}\n </div>\n ) : null}\n </div>\n </div>\n );\n}","import type { CSSProperties, ReactNode } from 'react';\n\nimport type { SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\n\nexport interface FieldProps {\n sdk: SmartSellSDK;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n htmlFor?: string;\n required?: boolean;\n children: ReactNode;\n style?: CSSProperties;\n}\n\nexport function Field({\n sdk,\n label,\n hint,\n error,\n htmlFor,\n required = false,\n children,\n style,\n}: FieldProps) {\n const { theme, mutedText } = useUiKitTheme(sdk);\n\n return (\n <label\n htmlFor={htmlFor}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n width: '100%',\n ...style,\n }}\n >\n {(label || hint) && (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n {label ? (\n <span\n style={{\n color: theme.colors.onSurface,\n fontSize: 14,\n fontWeight: 700,\n letterSpacing: '0.01em',\n }}\n >\n {label}\n {required ? (\n <span style={{ color: theme.colors.negative, marginLeft: 4 }}>*</span>\n ) : null}\n </span>\n ) : null}\n {hint ? (\n <span\n style={{\n color: mutedText,\n fontSize: 13,\n lineHeight: 1.45,\n }}\n >\n {hint}\n </span>\n ) : null}\n </div>\n )}\n {children}\n {error ? (\n <span\n style={{\n color: theme.colors.negative,\n fontSize: 13,\n fontWeight: 600,\n lineHeight: 1.45,\n }}\n >\n {error}\n </span>\n ) : null}\n </label>\n );\n}","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\nimport { Field } from './Field';\n\ntype ControlSize = 'sm' | 'md' | 'lg';\n\nexport interface InputProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size'> {\n sdk: SmartSellSDK;\n label?: string;\n hint?: string;\n error?: string;\n controlSize?: ControlSize;\n}\n\nconst getPadding = (size: ControlSize): string => {\n if (size === 'sm') return '10px 12px';\n if (size === 'lg') return '16px 18px';\n return '13px 16px';\n};\n\nexport function Input({\n sdk,\n label,\n hint,\n error,\n controlSize = 'md',\n id,\n disabled,\n style,\n ...rest\n}: InputProps) {\n const { theme, borderSoft, focusRing, surfaceMuted } = useUiKitTheme(sdk);\n\n const inputStyle: CSSProperties = {\n width: '100%',\n borderRadius: 16,\n border: `1px solid ${error ? theme.colors.negative : borderSoft}`,\n padding: getPadding(controlSize),\n outline: 'none',\n color: theme.colors.onSurface,\n backgroundColor: disabled ? surfaceMuted : theme.colors.surface,\n boxShadow: error ? `0 0 0 3px ${withAlpha(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,\n transition: 'border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease',\n ...style,\n };\n\n const input = <input {...rest} id={id} disabled={disabled} style={inputStyle} />;\n\n if (!label && !hint && !error) {\n return input;\n }\n\n return (\n <Field sdk={sdk} label={label} hint={hint} error={error} htmlFor={id}>\n {input}\n </Field>\n );\n}","import type { CSSProperties, SelectHTMLAttributes } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\nimport { Field } from './Field';\n\ntype ControlSize = 'sm' | 'md' | 'lg';\n\nexport interface SelectProps\n extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'dangerouslySetInnerHTML' | 'size'> {\n sdk: SmartSellSDK;\n label?: string;\n hint?: string;\n error?: string;\n controlSize?: ControlSize;\n}\n\nconst getPadding = (size: ControlSize): string => {\n if (size === 'sm') return '10px 12px';\n if (size === 'lg') return '16px 18px';\n return '13px 16px';\n};\n\nexport function Select({\n sdk,\n label,\n hint,\n error,\n controlSize = 'md',\n id,\n disabled,\n style,\n children,\n ...rest\n}: SelectProps) {\n const { theme, borderSoft, focusRing, surfaceMuted } = useUiKitTheme(sdk);\n\n const selectStyle: CSSProperties = {\n width: '100%',\n borderRadius: 16,\n border: `1px solid ${error ? theme.colors.negative : borderSoft}`,\n padding: getPadding(controlSize),\n outline: 'none',\n color: theme.colors.onSurface,\n backgroundColor: disabled ? surfaceMuted : theme.colors.surface,\n boxShadow: error ? `0 0 0 3px ${withAlpha(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,\n transition: 'border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease',\n ...style,\n };\n\n const select = (\n <select {...rest} id={id} disabled={disabled} style={selectStyle}>\n {children}\n </select>\n );\n\n if (!label && !hint && !error) {\n return select;\n }\n\n return (\n <Field sdk={sdk} label={label} hint={hint} error={error} htmlFor={id}>\n {select}\n </Field>\n );\n}","import type { CSSProperties, TextareaHTMLAttributes } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\nimport { Field } from './Field';\n\ntype ControlSize = 'sm' | 'md' | 'lg';\n\nexport interface TextareaProps\n extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'dangerouslySetInnerHTML'> {\n sdk: SmartSellSDK;\n label?: string;\n hint?: string;\n error?: string;\n controlSize?: ControlSize;\n}\n\nconst getPadding = (size: ControlSize): string => {\n if (size === 'sm') return '10px 12px';\n if (size === 'lg') return '16px 18px';\n return '13px 16px';\n};\n\nexport function Textarea({\n sdk,\n label,\n hint,\n error,\n controlSize = 'md',\n id,\n disabled,\n style,\n rows = 5,\n ...rest\n}: TextareaProps) {\n const { theme, borderSoft, focusRing, surfaceMuted } = useUiKitTheme(sdk);\n\n const textareaStyle: CSSProperties = {\n width: '100%',\n borderRadius: 16,\n border: `1px solid ${error ? theme.colors.negative : borderSoft}`,\n padding: getPadding(controlSize),\n outline: 'none',\n color: theme.colors.onSurface,\n backgroundColor: disabled ? surfaceMuted : theme.colors.surface,\n boxShadow: error ? `0 0 0 3px ${withAlpha(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,\n transition: 'border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease',\n resize: 'vertical',\n ...style,\n };\n\n const textarea = (\n <textarea {...rest} id={id} disabled={disabled} rows={rows} style={textareaStyle} />\n );\n\n if (!label && !hint && !error) {\n return textarea;\n }\n\n return (\n <Field sdk={sdk} label={label} hint={hint} error={error} htmlFor={id}>\n {textarea}\n </Field>\n );\n}"],"mappings":";AAEA,SAAS,aAAAA,kBAAoC;;;ACF7C,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAaA,SAAS,cAAc,KAAqC;AACjE,QAAM,EAAE,MAAM,IAAI,cAAc,GAAG;AAEnC,SAAO,QAAQ,MAAM;AACnB,WAAO;AAAA,MACL;AAAA,MACA,YAAY,UAAU,MAAM,OAAO,WAAW,GAAG;AAAA,MACjD,cAAc,UAAU,MAAM,OAAO,WAAW,IAAI;AAAA,MACpD,cAAc,UAAU,MAAM,OAAO,WAAW,IAAI;AAAA,MACpD,eAAe,UAAU,MAAM,OAAO,SAAS,IAAI;AAAA,MACnD,SAAS,UAAU,WAAW,IAAI;AAAA,MAClC,WAAW,UAAU,MAAM,OAAO,SAAS,IAAI;AAAA,MAC/C,WAAW,UAAU,MAAM,OAAO,WAAW,IAAI;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AACZ;;;ADwDI;AAtEJ,IAAM,gBAAgB,CAAC,SAAoC;AACzD,MAAI,SAAS,MAAM;AACjB,WAAO,EAAE,WAAW,IAAI,SAAS,UAAU,UAAU,GAAG;AAAA,EAC1D;AAEA,MAAI,SAAS,MAAM;AACjB,WAAO,EAAE,WAAW,IAAI,SAAS,UAAU,UAAU,GAAG;AAAA,EAC1D;AAEA,SAAO,EAAE,WAAW,IAAI,SAAS,UAAU,UAAU,GAAG;AAC1D;AAEO,SAAS,OAAO;AAAA,EACrB;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,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AC,SAAS,CAAC,QAAQ,CAAC,OAAO;AAC7B,WAAO;AAAA,EACT;AAEA,SACE,gBAAAA,KAAC,SAAM,KAAU,OAAc,MAAY,OAAc,SAAS,IAC/D,oBACH;AAEJ;","names":["withAlpha","withAlpha","withAlpha","jsxs","withAlpha","useMemo","useMemo","withAlpha","jsx","jsxs","useMemo","withAlpha","jsx","jsxs","useMemo","jsx","jsxs","withAlpha","jsx","withAlpha","withAlpha","jsx","getPadding","withAlpha","withAlpha","jsx","getPadding","withAlpha"]}
1
+ {"version":3,"sources":["../src/components/Button.tsx","../src/theme.ts","../src/components/Card.tsx","../src/components/ComposableModal.tsx","../src/components/Field.tsx","../src/components/Input.tsx","../src/components/Select.tsx","../src/components/Textarea.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, CSSProperties, ReactNode } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\n\ntype ButtonVariant = 'solid' | 'outline' | 'ghost';\ntype ButtonTone = 'primary' | 'secondary' | 'neutral' | 'danger';\ntype ButtonSize = 'sm' | 'md' | 'lg';\n\nexport interface ButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'dangerouslySetInnerHTML'> {\n sdk: SmartSellSDK;\n variant?: ButtonVariant;\n tone?: ButtonTone;\n size?: ButtonSize;\n fullWidth?: boolean;\n leadingIcon?: ReactNode;\n trailingIcon?: ReactNode;\n}\n\nconst getSizeStyles = (size: ButtonSize): CSSProperties => {\n if (size === 'sm') {\n return { minHeight: 38, padding: '0 14px', fontSize: 13 };\n }\n\n if (size === 'lg') {\n return { minHeight: 50, padding: '0 20px', fontSize: 15 };\n }\n\n return { minHeight: 44, padding: '0 18px', fontSize: 14 };\n};\n\nexport function Button({\n sdk,\n variant = 'solid',\n tone = 'primary',\n size = 'md',\n fullWidth = false,\n leadingIcon,\n trailingIcon,\n children,\n disabled,\n style,\n type = 'button',\n ...rest\n}: ButtonProps) {\n const { theme } = useUiKitTheme(sdk);\n\n const palette = {\n primary: {\n background: theme.colors.primary,\n foreground: theme.colors.onPrimary,\n border: withAlpha(theme.colors.primary, 0.3),\n },\n secondary: {\n background: theme.colors.secondary,\n foreground: theme.colors.onSecondary,\n border: withAlpha(theme.colors.secondary, 0.3),\n },\n neutral: {\n background: theme.colors.surface,\n foreground: theme.colors.onSurface,\n border: withAlpha(theme.colors.onSurface, 0.16),\n },\n danger: {\n background: theme.colors.negative,\n foreground: '#ffffff',\n border: withAlpha(theme.colors.negative, 0.32),\n },\n }[tone];\n\n const variantStyles: Record<ButtonVariant, CSSProperties> = {\n solid: {\n backgroundColor: palette.background,\n borderColor: palette.border,\n color: palette.foreground,\n },\n outline: {\n backgroundColor: 'transparent',\n borderColor: palette.border,\n color: tone === 'neutral' ? palette.foreground : palette.background,\n },\n ghost: {\n backgroundColor: 'transparent',\n borderColor: 'transparent',\n color: tone === 'neutral' ? palette.foreground : palette.background,\n },\n };\n\n return (\n <button\n {...rest}\n type={type}\n disabled={disabled}\n style={{\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 10,\n width: fullWidth ? '100%' : undefined,\n borderRadius: 16,\n borderStyle: 'solid',\n borderWidth: 1,\n cursor: disabled ? 'not-allowed' : 'pointer',\n fontWeight: 700,\n letterSpacing: '0.01em',\n lineHeight: 1,\n opacity: disabled ? 0.58 : 1,\n transition: 'transform 160ms ease, opacity 160ms ease, background-color 160ms ease',\n boxShadow: variant === 'solid' ? `0 14px 28px ${withAlpha(palette.background, 0.18)}` : 'none',\n ...getSizeStyles(size),\n ...variantStyles[variant],\n ...style,\n }}\n >\n {leadingIcon}\n {children}\n {trailingIcon}\n </button>\n );\n}","import { useMemo } from 'react';\n\nimport {\n useSalesTheme,\n withAlpha,\n type SalesTheme,\n type SmartSellSDK,\n} from 'smartsell-sales-sdk';\n\nexport interface UiKitThemeTokens {\n theme: SalesTheme;\n borderSoft: string;\n borderStrong: string;\n surfaceMuted: string;\n surfaceRaised: string;\n overlay: string;\n focusRing: string;\n mutedText: string;\n}\n\nexport function useUiKitTheme(sdk: SmartSellSDK): UiKitThemeTokens {\n const { theme } = useSalesTheme(sdk);\n\n return useMemo(() => {\n return {\n theme,\n borderSoft: withAlpha(theme.colors.onSurface, 0.1),\n borderStrong: withAlpha(theme.colors.onSurface, 0.16),\n surfaceMuted: withAlpha(theme.colors.onSurface, 0.04),\n surfaceRaised: withAlpha(theme.colors.surface, 0.94),\n overlay: withAlpha('#030712', 0.62),\n focusRing: withAlpha(theme.colors.primary, 0.22),\n mutedText: withAlpha(theme.colors.onSurface, 0.72),\n };\n }, [theme]);\n}","import type { CSSProperties, HTMLAttributes, ReactNode } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\n\ntype CardTone = 'default' | 'primary' | 'secondary' | 'warning';\n\nexport interface CardProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'dangerouslySetInnerHTML' | 'title'> {\n sdk: SmartSellSDK;\n children: ReactNode;\n eyebrow?: ReactNode;\n title?: ReactNode;\n action?: ReactNode;\n tone?: CardTone;\n padded?: boolean;\n}\n\nconst getToneStyles = (tone: CardTone, sdk: SmartSellSDK) => {\n const { theme } = useUiKitTheme(sdk);\n\n const accent = {\n default: theme.colors.primary,\n primary: theme.colors.primary,\n secondary: theme.colors.secondary,\n warning: theme.colors.warning,\n }[tone];\n\n return {\n accent,\n background: `linear-gradient(160deg, ${withAlpha(theme.colors.surface, 0.98)}, ${withAlpha(accent, 0.08)})`,\n border: withAlpha(accent, 0.22),\n };\n};\n\nexport function Card({\n sdk,\n children,\n eyebrow,\n title,\n action,\n tone = 'default',\n padded = true,\n style,\n ...rest\n}: CardProps) {\n const { theme, mutedText } = useUiKitTheme(sdk);\n const toneStyles = getToneStyles(tone, sdk);\n\n return (\n <div\n {...rest}\n style={{\n borderRadius: 28,\n border: `1px solid ${toneStyles.border}`,\n background: toneStyles.background,\n color: theme.colors.onSurface,\n boxShadow: `0 24px 48px ${withAlpha(theme.colors.onSurface, 0.06)}`,\n padding: padded ? 24 : undefined,\n ...style,\n }}\n >\n {(eyebrow || title || action) && (\n <div\n style={{\n display: 'flex',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n gap: 16,\n marginBottom: 18,\n }}\n >\n <div style={{ display: 'flex', flexDirection: 'column', gap: 6 }}>\n {eyebrow ? (\n <span\n style={{\n color: toneStyles.accent,\n fontSize: 12,\n fontWeight: 800,\n letterSpacing: '0.16em',\n textTransform: 'uppercase',\n }}\n >\n {eyebrow}\n </span>\n ) : null}\n {title ? (\n <div\n style={{\n color: theme.colors.onSurface,\n fontSize: 24,\n fontWeight: 700,\n lineHeight: 1.2,\n }}\n >\n {title}\n </div>\n ) : null}\n </div>\n {action ? <div style={{ color: mutedText }}>{action}</div> : null}\n </div>\n )}\n {children}\n </div>\n );\n}","import { useMemo } from 'react';\nimport type { ReactNode } from 'react';\n\nimport { SlotRenderer, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { Button } from './Button';\nimport { Modal } from './Modal';\nimport { useUiKitTheme } from '../theme';\n\nexport interface ModalSlotIds {\n header: string;\n body: string;\n footer: string;\n}\n\nexport interface ModalSlotContext<TPayload = unknown> {\n title: string;\n description?: string;\n payload?: TPayload;\n close: () => void;\n confirm?: () => void;\n confirmLabel: string;\n cancelLabel: string;\n isOpen: boolean;\n isBusy: boolean;\n}\n\nexport interface ComposableModalProps<TPayload = unknown> {\n sdk: SmartSellSDK;\n isOpen: boolean;\n onClose: () => void;\n title: string;\n description?: string;\n slotBaseId: string;\n payload?: TPayload;\n onConfirm?: () => void;\n confirmLabel?: string;\n cancelLabel?: string;\n isBusy?: boolean;\n closeOnBackdrop?: boolean;\n closeOnEscape?: boolean;\n hideDefaultFooter?: boolean;\n maxWidth?: number | string;\n headerFallback?: ReactNode;\n footerFallback?: ReactNode;\n children?: ReactNode;\n}\n\nexport const createModalSlotIds = (slotBaseId: string): ModalSlotIds => ({\n header: `${slotBaseId}:modal-header`,\n body: `${slotBaseId}:modal-body`,\n footer: `${slotBaseId}:modal-footer`,\n});\n\nexport function ComposableModal<TPayload = unknown>({\n sdk,\n isOpen,\n onClose,\n title,\n description,\n slotBaseId,\n payload,\n onConfirm,\n confirmLabel = 'Confirm',\n cancelLabel = 'Cancel',\n isBusy = false,\n closeOnBackdrop = true,\n closeOnEscape = true,\n hideDefaultFooter = false,\n maxWidth,\n headerFallback,\n footerFallback,\n children,\n}: ComposableModalProps<TPayload>) {\n const theme = useUiKitTheme(sdk);\n const slotIds = createModalSlotIds(slotBaseId);\n\n const context = useMemo<ModalSlotContext<TPayload>>(\n () => ({\n title,\n description,\n payload,\n close: onClose,\n confirm: onConfirm,\n confirmLabel,\n cancelLabel,\n isOpen,\n isBusy,\n }),\n [cancelLabel, confirmLabel, description, isBusy, isOpen, onClose, onConfirm, payload, title],\n );\n\n const defaultFooter = hideDefaultFooter ? undefined : (\n footerFallback ?? (\n <>\n <Button sdk={sdk} variant=\"outline\" tone=\"neutral\" onClick={onClose} disabled={isBusy}>\n {cancelLabel}\n </Button>\n {onConfirm ? (\n <Button sdk={sdk} onClick={onConfirm} disabled={isBusy}>\n {confirmLabel}\n </Button>\n ) : null}\n </>\n )\n );\n\n const defaultHeader = headerFallback ?? (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>\n <h2\n style={{\n margin: 0,\n fontSize: 30,\n fontWeight: 800,\n lineHeight: 1.1,\n }}\n >\n {title}\n </h2>\n {description ? (\n <p\n style={{\n margin: 0,\n fontSize: 15,\n lineHeight: 1.6,\n opacity: 0.78,\n }}\n >\n {description}\n </p>\n ) : null}\n </div>\n );\n\n const headerContent = (\n <SlotRenderer id={slotIds.header} sdk={sdk} context={context}>\n {defaultHeader}\n </SlotRenderer>\n );\n\n const bodyContent = (\n <SlotRenderer id={slotIds.body} sdk={sdk} context={context}>\n {children}\n </SlotRenderer>\n );\n\n const footerContent = (\n <SlotRenderer id={slotIds.footer} sdk={sdk} context={context}>\n {defaultFooter}\n </SlotRenderer>\n );\n\n return (\n <Modal\n isOpen={isOpen}\n onClose={onClose}\n title={title}\n description={description}\n headerContent={headerContent}\n footer={footerContent}\n theme={theme}\n maxWidth={maxWidth}\n closeOnBackdrop={closeOnBackdrop}\n closeOnEscape={closeOnEscape}\n >\n {bodyContent}\n </Modal>\n );\n}","import type { CSSProperties, ReactNode } from 'react';\n\nimport type { SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\n\nexport interface FieldProps {\n sdk: SmartSellSDK;\n label?: ReactNode;\n hint?: ReactNode;\n error?: ReactNode;\n htmlFor?: string;\n required?: boolean;\n children: ReactNode;\n style?: CSSProperties;\n}\n\nexport function Field({\n sdk,\n label,\n hint,\n error,\n htmlFor,\n required = false,\n children,\n style,\n}: FieldProps) {\n const { theme, mutedText } = useUiKitTheme(sdk);\n\n return (\n <label\n htmlFor={htmlFor}\n style={{\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n width: '100%',\n ...style,\n }}\n >\n {(label || hint) && (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n {label ? (\n <span\n style={{\n color: theme.colors.onSurface,\n fontSize: 14,\n fontWeight: 700,\n letterSpacing: '0.01em',\n }}\n >\n {label}\n {required ? (\n <span style={{ color: theme.colors.negative, marginLeft: 4 }}>*</span>\n ) : null}\n </span>\n ) : null}\n {hint ? (\n <span\n style={{\n color: mutedText,\n fontSize: 13,\n lineHeight: 1.45,\n }}\n >\n {hint}\n </span>\n ) : null}\n </div>\n )}\n {children}\n {error ? (\n <span\n style={{\n color: theme.colors.negative,\n fontSize: 13,\n fontWeight: 600,\n lineHeight: 1.45,\n }}\n >\n {error}\n </span>\n ) : null}\n </label>\n );\n}","import type { CSSProperties, InputHTMLAttributes } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\nimport { Field } from './Field';\n\ntype ControlSize = 'sm' | 'md' | 'lg';\n\nexport interface InputProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, 'dangerouslySetInnerHTML' | 'size'> {\n sdk: SmartSellSDK;\n label?: string;\n hint?: string;\n error?: string;\n controlSize?: ControlSize;\n}\n\nconst getPadding = (size: ControlSize): string => {\n if (size === 'sm') return '10px 12px';\n if (size === 'lg') return '16px 18px';\n return '13px 16px';\n};\n\nexport function Input({\n sdk,\n label,\n hint,\n error,\n controlSize = 'md',\n id,\n disabled,\n style,\n ...rest\n}: InputProps) {\n const { theme, borderSoft, focusRing, surfaceMuted } = useUiKitTheme(sdk);\n\n const inputStyle: CSSProperties = {\n width: '100%',\n borderRadius: 16,\n border: `1px solid ${error ? theme.colors.negative : borderSoft}`,\n padding: getPadding(controlSize),\n outline: 'none',\n color: theme.colors.onSurface,\n backgroundColor: disabled ? surfaceMuted : theme.colors.surface,\n boxShadow: error ? `0 0 0 3px ${withAlpha(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,\n transition: 'border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease',\n ...style,\n };\n\n const input = <input {...rest} id={id} disabled={disabled} style={inputStyle} />;\n\n if (!label && !hint && !error) {\n return input;\n }\n\n return (\n <Field sdk={sdk} label={label} hint={hint} error={error} htmlFor={id}>\n {input}\n </Field>\n );\n}","import type { CSSProperties, SelectHTMLAttributes } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\nimport { Field } from './Field';\n\ntype ControlSize = 'sm' | 'md' | 'lg';\n\nexport interface SelectProps\n extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'dangerouslySetInnerHTML' | 'size'> {\n sdk: SmartSellSDK;\n label?: string;\n hint?: string;\n error?: string;\n controlSize?: ControlSize;\n}\n\nconst getPadding = (size: ControlSize): string => {\n if (size === 'sm') return '10px 12px';\n if (size === 'lg') return '16px 18px';\n return '13px 16px';\n};\n\nexport function Select({\n sdk,\n label,\n hint,\n error,\n controlSize = 'md',\n id,\n disabled,\n style,\n children,\n ...rest\n}: SelectProps) {\n const { theme, borderSoft, focusRing, surfaceMuted } = useUiKitTheme(sdk);\n\n const selectStyle: CSSProperties = {\n width: '100%',\n borderRadius: 16,\n border: `1px solid ${error ? theme.colors.negative : borderSoft}`,\n padding: getPadding(controlSize),\n outline: 'none',\n color: theme.colors.onSurface,\n backgroundColor: disabled ? surfaceMuted : theme.colors.surface,\n boxShadow: error ? `0 0 0 3px ${withAlpha(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,\n transition: 'border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease',\n ...style,\n };\n\n const select = (\n <select {...rest} id={id} disabled={disabled} style={selectStyle}>\n {children}\n </select>\n );\n\n if (!label && !hint && !error) {\n return select;\n }\n\n return (\n <Field sdk={sdk} label={label} hint={hint} error={error} htmlFor={id}>\n {select}\n </Field>\n );\n}","import type { CSSProperties, TextareaHTMLAttributes } from 'react';\n\nimport { withAlpha, type SmartSellSDK } from 'smartsell-sales-sdk';\n\nimport { useUiKitTheme } from '../theme';\nimport { Field } from './Field';\n\ntype ControlSize = 'sm' | 'md' | 'lg';\n\nexport interface TextareaProps\n extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'dangerouslySetInnerHTML'> {\n sdk: SmartSellSDK;\n label?: string;\n hint?: string;\n error?: string;\n controlSize?: ControlSize;\n}\n\nconst getPadding = (size: ControlSize): string => {\n if (size === 'sm') return '10px 12px';\n if (size === 'lg') return '16px 18px';\n return '13px 16px';\n};\n\nexport function Textarea({\n sdk,\n label,\n hint,\n error,\n controlSize = 'md',\n id,\n disabled,\n style,\n rows = 5,\n ...rest\n}: TextareaProps) {\n const { theme, borderSoft, focusRing, surfaceMuted } = useUiKitTheme(sdk);\n\n const textareaStyle: CSSProperties = {\n width: '100%',\n borderRadius: 16,\n border: `1px solid ${error ? theme.colors.negative : borderSoft}`,\n padding: getPadding(controlSize),\n outline: 'none',\n color: theme.colors.onSurface,\n backgroundColor: disabled ? surfaceMuted : theme.colors.surface,\n boxShadow: error ? `0 0 0 3px ${withAlpha(theme.colors.negative, 0.12)}` : `0 0 0 0 ${focusRing}`,\n transition: 'border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease',\n resize: 'vertical',\n ...style,\n };\n\n const textarea = (\n <textarea {...rest} id={id} disabled={disabled} rows={rows} style={textareaStyle} />\n );\n\n if (!label && !hint && !error) {\n return textarea;\n }\n\n return (\n <Field sdk={sdk} label={label} hint={hint} error={error} htmlFor={id}>\n {textarea}\n </Field>\n );\n}"],"mappings":";;;;;AAEA,SAAS,aAAAA,kBAAoC;;;ACF7C,SAAS,eAAe;AAExB;AAAA,EACE;AAAA,EACA;AAAA,OAGK;AAaA,SAAS,cAAc,KAAqC;AACjE,QAAM,EAAE,MAAM,IAAI,cAAc,GAAG;AAEnC,SAAO,QAAQ,MAAM;AACnB,WAAO;AAAA,MACL;AAAA,MACA,YAAY,UAAU,MAAM,OAAO,WAAW,GAAG;AAAA,MACjD,cAAc,UAAU,MAAM,OAAO,WAAW,IAAI;AAAA,MACpD,cAAc,UAAU,MAAM,OAAO,WAAW,IAAI;AAAA,MACpD,eAAe,UAAU,MAAM,OAAO,SAAS,IAAI;AAAA,MACnD,SAAS,UAAU,WAAW,IAAI;AAAA,MAClC,WAAW,UAAU,MAAM,OAAO,SAAS,IAAI;AAAA,MAC/C,WAAW,UAAU,MAAM,OAAO,WAAW,IAAI;AAAA,IACnD;AAAA,EACF,GAAG,CAAC,KAAK,CAAC;AACZ;;;ADwDI;AAtEJ,IAAM,gBAAgB,CAAC,SAAoC;AACzD,MAAI,SAAS,MAAM;AACjB,WAAO,EAAE,WAAW,IAAI,SAAS,UAAU,UAAU,GAAG;AAAA,EAC1D;AAEA,MAAI,SAAS,MAAM;AACjB,WAAO,EAAE,WAAW,IAAI,SAAS,UAAU,UAAU,GAAG;AAAA,EAC1D;AAEA,SAAO,EAAE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","jsx","getPadding","withAlpha","withAlpha","jsx","getPadding","withAlpha"]}
@@ -0,0 +1,79 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { CSSProperties, ReactNode } from 'react';
3
+ import { SalesTheme, SmartSellSDK } from 'smartsell-sales-sdk';
4
+
5
+ interface UiKitThemeTokens {
6
+ theme: SalesTheme;
7
+ borderSoft: string;
8
+ borderStrong: string;
9
+ surfaceMuted: string;
10
+ surfaceRaised: string;
11
+ overlay: string;
12
+ focusRing: string;
13
+ mutedText: string;
14
+ }
15
+ declare function useUiKitTheme(sdk: SmartSellSDK): UiKitThemeTokens;
16
+
17
+ type LegacyButtonType = 'text' | 'outlined' | 'contained' | 'link';
18
+ type ModalThemeColors = {
19
+ background: string;
20
+ surface: string;
21
+ onSurface: string;
22
+ onBackground: string;
23
+ primary: string;
24
+ onPrimary: string;
25
+ secondary: string;
26
+ onSecondary: string;
27
+ negative: string;
28
+ warning: string;
29
+ };
30
+ interface ModalTheme {
31
+ colors?: Partial<ModalThemeColors>;
32
+ }
33
+ type ModalThemeSource = ModalTheme | UiKitThemeTokens;
34
+ interface LegacyModalAction {
35
+ name: string;
36
+ onClick: () => void;
37
+ type?: LegacyButtonType;
38
+ style?: CSSProperties;
39
+ disable?: boolean;
40
+ }
41
+ interface BaseModalProps {
42
+ children?: ReactNode;
43
+ theme?: ModalThemeSource;
44
+ }
45
+ interface StandardModalProps extends BaseModalProps {
46
+ isOpen: boolean;
47
+ onClose: () => void;
48
+ children: ReactNode;
49
+ footer?: ReactNode;
50
+ title?: ReactNode;
51
+ description?: ReactNode;
52
+ headerContent?: ReactNode;
53
+ maxWidth?: number | string;
54
+ closeOnBackdrop?: boolean;
55
+ closeOnEscape?: boolean;
56
+ hideCloseButton?: boolean;
57
+ contentStyle?: CSSProperties;
58
+ }
59
+ interface LegacyModalProps extends BaseModalProps {
60
+ title: ReactNode;
61
+ showModal: boolean;
62
+ closeModal: () => void;
63
+ action?: () => void;
64
+ actionNameBtn?: string | undefined;
65
+ hideActionButton?: boolean;
66
+ cancelButton?: () => void;
67
+ disableActionBtn?: boolean;
68
+ isLoading?: boolean;
69
+ onlyCloseButton?: boolean;
70
+ hideCloseIcon?: boolean;
71
+ style?: CSSProperties;
72
+ bodyStyle?: CSSProperties;
73
+ additionalActions?: LegacyModalAction[];
74
+ maximized?: boolean;
75
+ }
76
+ type ModalProps = StandardModalProps | LegacyModalProps;
77
+ declare function Modal(props: ModalProps): react_jsx_runtime.JSX.Element;
78
+
79
+ export { type LegacyModalAction as L, Modal as M, type StandardModalProps as S, type UiKitThemeTokens as U, type LegacyModalProps as a, type ModalProps as b, type ModalTheme as c, type ModalThemeSource as d, useUiKitTheme as u };