smartsell-ui-kit 0.0.2 → 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,183 +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-label": headerContent ? typeof title === "string" ? title : "Dialog" : void 0,
304
- "aria-labelledby": headerContent ? void 0 : title ? titleId : void 0,
305
- "aria-modal": "true",
306
- role: "dialog",
307
- onMouseDown: (event) => {
308
- if (closeOnBackdrop && event.target === event.currentTarget) {
309
- onClose();
310
- }
311
- },
312
- style: {
313
- position: "fixed",
314
- inset: 0,
315
- zIndex: 70,
316
- display: "flex",
317
- alignItems: "center",
318
- justifyContent: "center",
319
- padding: 16,
320
- backgroundColor: overlay,
321
- backdropFilter: "blur(8px)"
322
- },
323
- children: /* @__PURE__ */ jsxs3(
324
- "div",
325
- {
326
- style: {
327
- width: "min(100%, 100%)",
328
- maxWidth: normalizeWidth(maxWidth),
329
- borderRadius: 30,
330
- border: `1px solid ${borderSoft}`,
331
- background: `linear-gradient(180deg, ${surfaceRaised}, ${theme.colors.surface})`,
332
- boxShadow: `0 34px 80px ${withAlpha4("#020617", 0.28)}`,
333
- color: theme.colors.onSurface,
334
- overflow: "hidden",
335
- ...contentStyle
336
- },
337
- children: [
338
- /* @__PURE__ */ jsxs3(
339
- "div",
340
- {
341
- style: {
342
- display: "flex",
343
- alignItems: "flex-start",
344
- justifyContent: "space-between",
345
- gap: 16,
346
- padding: "24px 24px 0"
347
- },
348
- children: [
349
- /* @__PURE__ */ jsx2("div", { style: { flex: 1 }, children: header }),
350
- !hideCloseButton ? /* @__PURE__ */ jsx2(
351
- "button",
352
- {
353
- "aria-label": "Close modal",
354
- type: "button",
355
- onClick: onClose,
356
- style: {
357
- height: 42,
358
- width: 42,
359
- borderRadius: 999,
360
- border: `1px solid ${borderSoft}`,
361
- backgroundColor: "transparent",
362
- color: theme.colors.onSurface,
363
- cursor: "pointer",
364
- fontSize: 20,
365
- fontWeight: 700
366
- },
367
- children: "\xD7"
368
- }
369
- ) : null
370
- ]
371
- }
372
- ),
373
- /* @__PURE__ */ jsx2("div", { style: { padding: 24 }, children }),
374
- footer ? /* @__PURE__ */ jsx2(
375
- "div",
376
- {
377
- style: {
378
- display: "flex",
379
- justifyContent: "flex-end",
380
- gap: 12,
381
- padding: "0 24px 24px",
382
- borderTop: `1px solid ${withAlpha4(theme.colors.onSurface, 0.06)}`
383
- },
384
- children: footer
385
- }
386
- ) : null
387
- ]
388
- }
389
- )
390
- }
391
- );
392
- }
393
-
394
- // src/components/ComposableModal.tsx
395
- 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";
396
226
  var createModalSlotIds = (slotBaseId) => ({
397
227
  header: `${slotBaseId}:modal-header`,
398
228
  body: `${slotBaseId}:modal-body`,
@@ -418,8 +248,9 @@ function ComposableModal({
418
248
  footerFallback,
419
249
  children
420
250
  }) {
251
+ const theme = useUiKitTheme(sdk);
421
252
  const slotIds = createModalSlotIds(slotBaseId);
422
- const context = useMemo3(
253
+ const context = useMemo2(
423
254
  () => ({
424
255
  title,
425
256
  description,
@@ -433,12 +264,12 @@ function ComposableModal({
433
264
  }),
434
265
  [cancelLabel, confirmLabel, description, isBusy, isOpen, onClose, onConfirm, payload, title]
435
266
  );
436
- const defaultFooter = hideDefaultFooter ? void 0 : footerFallback != null ? footerFallback : /* @__PURE__ */ jsxs4(Fragment, { children: [
437
- /* @__PURE__ */ jsx3(Button, { sdk, variant: "outline", tone: "neutral", onClick: onClose, disabled: isBusy, children: cancelLabel }),
438
- 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
439
270
  ] });
440
- const defaultHeader = headerFallback != null ? headerFallback : /* @__PURE__ */ jsxs4("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
441
- /* @__PURE__ */ jsx3(
271
+ const defaultHeader = headerFallback != null ? headerFallback : /* @__PURE__ */ jsxs3("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
272
+ /* @__PURE__ */ jsx2(
442
273
  "h2",
443
274
  {
444
275
  style: {
@@ -450,7 +281,7 @@ function ComposableModal({
450
281
  children: title
451
282
  }
452
283
  ),
453
- description ? /* @__PURE__ */ jsx3(
284
+ description ? /* @__PURE__ */ jsx2(
454
285
  "p",
455
286
  {
456
287
  style: {
@@ -463,19 +294,19 @@ function ComposableModal({
463
294
  }
464
295
  ) : null
465
296
  ] });
466
- const headerContent = /* @__PURE__ */ jsx3(SlotRenderer, { id: slotIds.header, sdk, context, children: defaultHeader });
467
- const bodyContent = /* @__PURE__ */ jsx3(SlotRenderer, { id: slotIds.body, sdk, context, children });
468
- const footerContent = /* @__PURE__ */ jsx3(SlotRenderer, { id: slotIds.footer, sdk, context, children: defaultFooter });
469
- 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(
470
301
  Modal,
471
302
  {
472
- sdk,
473
303
  isOpen,
474
304
  onClose,
475
305
  title,
476
306
  description,
477
307
  headerContent,
478
308
  footer: footerContent,
309
+ theme,
479
310
  maxWidth,
480
311
  closeOnBackdrop,
481
312
  closeOnEscape,
@@ -485,7 +316,7 @@ function ComposableModal({
485
316
  }
486
317
 
487
318
  // src/components/Field.tsx
488
- import { jsx as jsx4, jsxs as jsxs5 } from "react/jsx-runtime";
319
+ import { jsx as jsx3, jsxs as jsxs4 } from "react/jsx-runtime";
489
320
  function Field({
490
321
  sdk,
491
322
  label,
@@ -497,7 +328,7 @@ function Field({
497
328
  style
498
329
  }) {
499
330
  const { theme, mutedText } = useUiKitTheme(sdk);
500
- return /* @__PURE__ */ jsxs5(
331
+ return /* @__PURE__ */ jsxs4(
501
332
  "label",
502
333
  {
503
334
  htmlFor,
@@ -509,8 +340,8 @@ function Field({
509
340
  ...style
510
341
  },
511
342
  children: [
512
- (label || hint) && /* @__PURE__ */ jsxs5("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
513
- label ? /* @__PURE__ */ jsxs5(
343
+ (label || hint) && /* @__PURE__ */ jsxs4("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
344
+ label ? /* @__PURE__ */ jsxs4(
514
345
  "span",
515
346
  {
516
347
  style: {
@@ -521,11 +352,11 @@ function Field({
521
352
  },
522
353
  children: [
523
354
  label,
524
- 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
525
356
  ]
526
357
  }
527
358
  ) : null,
528
- hint ? /* @__PURE__ */ jsx4(
359
+ hint ? /* @__PURE__ */ jsx3(
529
360
  "span",
530
361
  {
531
362
  style: {
@@ -538,7 +369,7 @@ function Field({
538
369
  ) : null
539
370
  ] }),
540
371
  children,
541
- error ? /* @__PURE__ */ jsx4(
372
+ error ? /* @__PURE__ */ jsx3(
542
373
  "span",
543
374
  {
544
375
  style: {
@@ -556,8 +387,8 @@ function Field({
556
387
  }
557
388
 
558
389
  // src/components/Input.tsx
559
- import { withAlpha as withAlpha5 } from "smartsell-sales-sdk";
560
- 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";
561
392
  var getPadding = (size) => {
562
393
  if (size === "sm") return "10px 12px";
563
394
  if (size === "lg") return "16px 18px";
@@ -583,20 +414,20 @@ function Input({
583
414
  outline: "none",
584
415
  color: theme.colors.onSurface,
585
416
  backgroundColor: disabled ? surfaceMuted : theme.colors.surface,
586
- 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}`,
587
418
  transition: "border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease",
588
419
  ...style
589
420
  };
590
- const input = /* @__PURE__ */ jsx5("input", { ...rest, id, disabled, style: inputStyle });
421
+ const input = /* @__PURE__ */ jsx4("input", { ...rest, id, disabled, style: inputStyle });
591
422
  if (!label && !hint && !error) {
592
423
  return input;
593
424
  }
594
- 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 });
595
426
  }
596
427
 
597
428
  // src/components/Select.tsx
598
- import { withAlpha as withAlpha6 } from "smartsell-sales-sdk";
599
- 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";
600
431
  var getPadding2 = (size) => {
601
432
  if (size === "sm") return "10px 12px";
602
433
  if (size === "lg") return "16px 18px";
@@ -623,20 +454,20 @@ function Select({
623
454
  outline: "none",
624
455
  color: theme.colors.onSurface,
625
456
  backgroundColor: disabled ? surfaceMuted : theme.colors.surface,
626
- 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}`,
627
458
  transition: "border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease",
628
459
  ...style
629
460
  };
630
- const select = /* @__PURE__ */ jsx6("select", { ...rest, id, disabled, style: selectStyle, children });
461
+ const select = /* @__PURE__ */ jsx5("select", { ...rest, id, disabled, style: selectStyle, children });
631
462
  if (!label && !hint && !error) {
632
463
  return select;
633
464
  }
634
- 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 });
635
466
  }
636
467
 
637
468
  // src/components/Textarea.tsx
638
- import { withAlpha as withAlpha7 } from "smartsell-sales-sdk";
639
- 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";
640
471
  var getPadding3 = (size) => {
641
472
  if (size === "sm") return "10px 12px";
642
473
  if (size === "lg") return "16px 18px";
@@ -663,16 +494,16 @@ function Textarea({
663
494
  outline: "none",
664
495
  color: theme.colors.onSurface,
665
496
  backgroundColor: disabled ? surfaceMuted : theme.colors.surface,
666
- 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}`,
667
498
  transition: "border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease",
668
499
  resize: "vertical",
669
500
  ...style
670
501
  };
671
- const textarea = /* @__PURE__ */ jsx7("textarea", { ...rest, id, disabled, rows, style: textareaStyle });
502
+ const textarea = /* @__PURE__ */ jsx6("textarea", { ...rest, id, disabled, rows, style: textareaStyle });
672
503
  if (!label && !hint && !error) {
673
504
  return textarea;
674
505
  }
675
- 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 });
676
507
  }
677
508
  export {
678
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 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 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-label={headerContent ? (typeof title === 'string' ? title : 'Dialog') : undefined}\n aria-labelledby={headerContent ? undefined : 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;;;ADwD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AAO;AAAA,EACT;AAEA,SACE,gBAAAA,KAAC,SAAM,KAAU,OAAc,MAAY,OAAc,SAAS,IAC/D,kBACH;AAEJ;;;AChEA,SAAS,aAAAG,kBAAoC;AAmDzC,gBAAAC,YAAA;AAnCJ,IAAMC,cAAa,CAAC,SAA8B;AAChD,MAAI,SAAS,KAAM,QAAO;AAC1B,MAAI,SAAS,KAAM,QAAO;AAC1B,SAAO;AACT;AAEO,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAkB;AAChB,QAAM,EAAE,OAAO,YAAY,WAAW,aAAa,IAAI,cAAc,GAAG;AAExE,QAAM,gBAA+B;AAAA,IACnC,OAAO;AAAA,IACP,cAAc;AAAA,IACd,QAAQ,aAAa,QAAQ,MAAM,OAAO,WAAW,UAAU;AAAA,IAC/D,SAASA,YAAW,WAAW;AAAA,IAC/B,SAAS;AAAA,IACT,OAAO,MAAM,OAAO;AAAA,IACpB,iBAAiB,WAAW,eAAe,MAAM,OAAO;AAAA,IACxD,WAAW,QAAQ,aAAaC,WAAU,MAAM,OAAO,UAAU,IAAI,CAAC,KAAK,WAAW,SAAS;AAAA,IAC/F,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,GAAG;AAAA,EACL;AAEA,QAAM,WACJ,gBAAAF,KAAC,cAAU,GAAG,MAAM,IAAQ,UAAoB,MAAY,OAAO,eAAe;AAGpF,MAAI,CAAC,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,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,OAAO;AAAA,EACP,GAAG;AACL,GAAgB;AACd,QAAM,EAAE,MAA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,QAAO;AAC1B,SAAO;AACT;AAEO,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAkB;AAChB,QAAM,EAAE,OAAO,YAAY,WAAW,aAAa,IAAI,cAAc,GAAG;AAExE,QAAM,gBAA+B;AAAA,IACnC,OAAO;AAAA,IACP,cAAc;AAAA,IACd,QAAQ,aAAa,QAAQ,MAAM,OAAO,WAAW,UAAU;AAAA,IAC/D,SAASA,YAAW,WAAW;AAAA,IAC/B,SAAS;AAAA,IACT,OAAO,MAAM,OAAO;AAAA,IACpB,iBAAiB,WAAW,eAAe,MAAM,OAAO;AAAA,IACxD,WAAW,QAAQ,aAAaC,WAAU,MAAM,OAAO,UAAU,IAAI,CAAC,KAAK,WAAW,SAAS;AAAA,IAC/F,YAAY;AAAA,IACZ,QAAQ;AAAA,IACR,GAAG;AAAA,EACL;AAEA,QAAM,WACJ,gBAAAF,KAAC,cAAU,GAAG,MAAM,IAAQ,UAAoB,MAAY,OAAO,eAAe;AAGpF,MAAI,CAAC,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","jsx","jsxs","useMemo","jsx","jsxs","withAlpha","jsx","withAlpha","withAlpha","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 };