@keboola/design 2.0.0 → 2.0.1
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/icons.cjs +8 -0
- package/dist/icons.js +1 -1
- package/dist/index.cjs +240 -38
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +230 -41
- package/dist/index.js.map +1 -1
- package/dist/markdown-editor.cjs +39 -16
- package/dist/markdown-editor.cjs.map +1 -1
- package/dist/markdown-editor.js +39 -16
- package/dist/markdown-editor.js.map +1 -1
- package/dist/mermaid.cjs +32 -9
- package/dist/mermaid.cjs.map +1 -1
- package/dist/mermaid.js +32 -9
- package/dist/mermaid.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +5 -4
- package/src/blocks/EmptyState/EmptyState.tsx +2 -2
- package/src/blocks/ErrorState/ErrorState.tsx +18 -3
- package/src/blocks/InputOtp/InputOtp.stories.tsx +214 -0
- package/src/blocks/InputOtp/InputOtp.test.tsx +162 -0
- package/src/blocks/InputOtp/InputOtp.tsx +62 -0
- package/src/blocks/InputOtp/InputOtpGroup.tsx +13 -0
- package/src/blocks/InputOtp/InputOtpSeparator.tsx +23 -0
- package/src/blocks/InputOtp/InputOtpSlot.styles.ts +52 -0
- package/src/blocks/InputOtp/InputOtpSlot.tsx +44 -0
- package/src/blocks/InputOtp/context.ts +23 -0
- package/src/blocks/InputOtp/index.ts +23 -0
- package/src/components/Alert/AlertIcon.tsx +1 -1
- package/src/components/Badge/BadgeAddon.tsx +1 -1
- package/src/components/Badge/BadgeButton.tsx +1 -1
- package/src/components/Breadcrumb/BreadcrumbLink.tsx +1 -1
- package/src/components/Breadcrumb/BreadcrumbSeparator.tsx +1 -1
- package/src/components/Button/styles.ts +33 -10
- package/src/components/Combobox/ComboboxItemIndicator.tsx +1 -1
- package/src/components/Command/CommandItem/CommandItem.tsx +1 -1
- package/src/components/DropdownMenu/DropdownMenuItemIndicator.tsx +4 -4
- package/src/components/DropdownMenu/ItemIcon.tsx +1 -1
- package/src/components/Modal/ModalIcon.tsx +1 -1
- package/src/components/Navbar/NavbarMenuItemAdornment.tsx +2 -2
- package/src/components/Pagination/PaginationEllipsis.tsx +1 -1
- package/src/components/Select/SelectContent.tsx +1 -1
- package/src/components/Sidebar/SidebarGroup/SidebarGroupAction.tsx +1 -1
- package/src/components/Sidebar/SidebarMenu/SidebarMenuAction.tsx +1 -1
- package/src/components/Sidebar/SidebarMenu/SidebarMenuIcon.tsx +1 -1
- package/src/components/Timeline/TimelineConnector.tsx +5 -1
- package/src/components/Toast/ToastDismiss.tsx +1 -1
- package/src/components/Toast/ToastRoot.tsx +1 -1
- package/src/components/Toggle/Toggle.tsx +1 -1
- package/src/icons/index.ts +2 -0
- package/src/index.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Slot, Root as Root$1, Slottable } from '@radix-ui/react-slot';
|
|
2
2
|
export { Slot } from '@radix-ui/react-slot';
|
|
3
|
-
import { ChevronLeft, Plus, ChevronDown as ChevronDown$1, X, Loader2, Calendar, Clock, Sparkles, Search, Check,
|
|
3
|
+
import { ChevronLeft, Plus, ChevronDown as ChevronDown$1, X, Minus, Loader2, Calendar, Clock, Sparkles, Search, Check, Copy, CircleCheck, AlertTriangle, ChevronUp, Send, ChevronRight, FileText, ArrowBigUpDash, EyeOff, Eye, Minimize2, Maximize2, Circle, Ellipsis, XCircle, Info, ChevronsRight, ChevronsLeft, CirclePause, Play, AlertCircle, ToggleRight } from 'lucide-react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { extendTailwindMerge } from 'tailwind-merge';
|
|
6
|
-
import { createContext, useRef, useEffect, useMemo, useState,
|
|
6
|
+
import { createContext, useRef, useEffect, useMemo, useState, use, useId, useCallback, Fragment as Fragment$1, useLayoutEffect, useReducer, Children } from 'react';
|
|
7
7
|
import { Provider, Root as Root$b, Trigger as Trigger$3, Portal, Content } from '@radix-ui/react-tooltip';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
9
9
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -64,6 +64,8 @@ import { StateEffect, StateField, RangeSet, RangeSetBuilder } from '@codemirror/
|
|
|
64
64
|
import { diff3Merge } from 'node-diff3';
|
|
65
65
|
import * as ResizablePrimitive from 'react-resizable-panels';
|
|
66
66
|
import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
|
|
67
|
+
import { OTPInput, REGEXP_ONLY_DIGITS, OTPInputContext } from 'input-otp';
|
|
68
|
+
export { REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from 'input-otp';
|
|
67
69
|
import { createFormHookContexts, createFormHook } from '@tanstack/react-form';
|
|
68
70
|
|
|
69
71
|
// src/components/Button/Button.tsx
|
|
@@ -479,15 +481,38 @@ var variants = cva(
|
|
|
479
481
|
]
|
|
480
482
|
},
|
|
481
483
|
size: {
|
|
482
|
-
medium: [
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
484
|
+
medium: [
|
|
485
|
+
"tw-max-h-10",
|
|
486
|
+
"tw-min-h-10",
|
|
487
|
+
"tw-px-4",
|
|
488
|
+
"tw-py-2.5",
|
|
489
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4'
|
|
490
|
+
],
|
|
491
|
+
small: [
|
|
492
|
+
"tw-max-h-8",
|
|
493
|
+
"tw-min-h-8",
|
|
494
|
+
"tw-px-4",
|
|
495
|
+
"tw-py-1.5",
|
|
496
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4'
|
|
497
|
+
],
|
|
498
|
+
large: [
|
|
499
|
+
"tw-max-h-12",
|
|
500
|
+
"tw-min-h-12",
|
|
501
|
+
"tw-px-4",
|
|
502
|
+
"tw-py-3.5",
|
|
503
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4'
|
|
504
|
+
],
|
|
505
|
+
"icon-lg": ["tw-size-12", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-6'],
|
|
506
|
+
icon: ["tw-size-10", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
|
|
507
|
+
"icon-sm": ["tw-size-8", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
|
|
508
|
+
"icon-xs": ["tw-size-6", "tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
|
|
509
|
+
"icon-2xs": [
|
|
510
|
+
"!tw-inline-flex",
|
|
511
|
+
"tw-size-5",
|
|
512
|
+
"tw-max-h-5",
|
|
513
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3'
|
|
514
|
+
],
|
|
515
|
+
"icon-3xs": ["tw-h-fit", "tw-w-fit", '[&_svg:not([class*="tw-size-"])]:tw-size-4']
|
|
491
516
|
}
|
|
492
517
|
}
|
|
493
518
|
}
|
|
@@ -3130,7 +3155,7 @@ var scrollButtonStyles = cn(
|
|
|
3130
3155
|
"tw-justify-center",
|
|
3131
3156
|
"tw-rounded-sm",
|
|
3132
3157
|
"tw-p-1",
|
|
3133
|
-
|
|
3158
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-5'
|
|
3134
3159
|
);
|
|
3135
3160
|
var SelectContent = ({
|
|
3136
3161
|
ref,
|
|
@@ -3626,7 +3651,7 @@ var variants4 = cva(
|
|
|
3626
3651
|
"tw-border-border",
|
|
3627
3652
|
"tw-rounded-full",
|
|
3628
3653
|
"tw-bg-white",
|
|
3629
|
-
|
|
3654
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-2',
|
|
3630
3655
|
"[&_svg]:data-[state=unchecked]:tw-hidden",
|
|
3631
3656
|
// Lucide Circle is stroke-only — force fill to match the stroke
|
|
3632
3657
|
// (currentColor) so the indicator reads as a solid dot.
|
|
@@ -3634,14 +3659,14 @@ var variants4 = cva(
|
|
|
3634
3659
|
"group-data-[variant=argo]/dropdown-menu-content:[&_svg]:tw-text-primary",
|
|
3635
3660
|
"group-data-[variant=default]/dropdown-menu-content:[&_svg]:tw-text-secondary-500"
|
|
3636
3661
|
],
|
|
3637
|
-
check: [
|
|
3662
|
+
check: ['[&_svg:not([class*="tw-size-"])]:tw-size-3.5', "[&_svg]:tw-text-primary"],
|
|
3638
3663
|
checkbox: [
|
|
3639
3664
|
"[&_svg]:tw-text-white",
|
|
3640
3665
|
"tw-border",
|
|
3641
3666
|
"tw-border-solid",
|
|
3642
3667
|
"tw-border-neutral-200",
|
|
3643
3668
|
"tw-rounded",
|
|
3644
|
-
|
|
3669
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3',
|
|
3645
3670
|
"[&_svg]:data-[state=unchecked]:tw-hidden",
|
|
3646
3671
|
"group-data-[variant=argo]/dropdown-menu-content:data-[state=checked]:tw-border-primary",
|
|
3647
3672
|
"group-data-[variant=argo]/dropdown-menu-content:data-[state=checked]:tw-bg-primary",
|
|
@@ -3652,7 +3677,7 @@ var variants4 = cva(
|
|
|
3652
3677
|
"tw-size-5",
|
|
3653
3678
|
// Lucide SVGs default to 24×24 — constrain the rendered ToggleRight
|
|
3654
3679
|
// to the indicator slot so it doesn't overflow.
|
|
3655
|
-
|
|
3680
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-5',
|
|
3656
3681
|
"tw-text-neutral-400",
|
|
3657
3682
|
"data-[state=unchecked]:tw-rotate-180",
|
|
3658
3683
|
"group-data-[variant=default]/dropdown-menu-content:data-[state=checked]:tw-text-secondary-500",
|
|
@@ -3700,7 +3725,7 @@ var ItemIcon = ({ className, children, ...props }) => /* @__PURE__ */ jsx(
|
|
|
3700
3725
|
// 20px container fits the 16px Lucide glyph plus 2px breathing room
|
|
3701
3726
|
// each side — the previous tw-size-4 + tw-p-0.5 clipped the 16px child.
|
|
3702
3727
|
"tw-size-5",
|
|
3703
|
-
|
|
3728
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
3704
3729
|
"group-data-[variant=default]/dropdown-menu-content:tw-text-neutral-400",
|
|
3705
3730
|
"group-data-[variant=argo]/dropdown-menu-content:tw-text-primary",
|
|
3706
3731
|
"group-data-[variant=argo]/dropdown-menu-content:group-aria-disabled:tw-text-muted-foreground",
|
|
@@ -4321,7 +4346,7 @@ var ModalIcon = (props) => {
|
|
|
4321
4346
|
"tw-text-white": props.color !== "violet",
|
|
4322
4347
|
"tw-text-purple-500": props.color === "violet"
|
|
4323
4348
|
},
|
|
4324
|
-
|
|
4349
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-6',
|
|
4325
4350
|
"[&_svg]:tw-aspect-square"
|
|
4326
4351
|
),
|
|
4327
4352
|
children: isFAIconValue(props.icon) ? /* @__PURE__ */ jsx(Icon, { icon: props.icon, spin: props.spin }) : props.icon
|
|
@@ -5328,7 +5353,7 @@ var SidebarGroupAction = ({
|
|
|
5328
5353
|
"tw-text-neutral-800",
|
|
5329
5354
|
"tw-rounded-full",
|
|
5330
5355
|
// svg defaults: size + colour
|
|
5331
|
-
|
|
5356
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3',
|
|
5332
5357
|
"[&_svg]:tw-text-neutral-400",
|
|
5333
5358
|
"hover:[&_svg]:tw-text-secondary-600",
|
|
5334
5359
|
"hover:tw-bg-neutral-100",
|
|
@@ -5472,7 +5497,7 @@ var SidebarMenuIcon = ({
|
|
|
5472
5497
|
"tw-shrink-0",
|
|
5473
5498
|
"tw-p-0.5",
|
|
5474
5499
|
"tw-text-sidebar-primary",
|
|
5475
|
-
|
|
5500
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
5476
5501
|
className
|
|
5477
5502
|
),
|
|
5478
5503
|
children
|
|
@@ -5601,7 +5626,7 @@ var SidebarMenuAction = ({
|
|
|
5601
5626
|
"tw-rounded",
|
|
5602
5627
|
// icon styling
|
|
5603
5628
|
"[&_svg]:tw-shrink-0",
|
|
5604
|
-
|
|
5629
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3.5',
|
|
5605
5630
|
"[&_svg]:tw-text-sidebar-accent-foreground",
|
|
5606
5631
|
// focus visible
|
|
5607
5632
|
"focus-visible:tw-outline-none",
|
|
@@ -6487,7 +6512,7 @@ var CommandItem = ({
|
|
|
6487
6512
|
),
|
|
6488
6513
|
children: [
|
|
6489
6514
|
/* @__PURE__ */ jsx(CheckIndicator, { variant }),
|
|
6490
|
-
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-text-neutral-400 [&_svg]:tw-size-4", children: icon }),
|
|
6515
|
+
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-text-neutral-400 [&_svg:not([class*='tw-size-'])]:tw-size-4", children: icon }),
|
|
6491
6516
|
children
|
|
6492
6517
|
]
|
|
6493
6518
|
}
|
|
@@ -6561,7 +6586,7 @@ var addonVariants2 = cva(
|
|
|
6561
6586
|
"tw-self-stretch",
|
|
6562
6587
|
"tw-px-1",
|
|
6563
6588
|
"has-[button]:tw-px-0",
|
|
6564
|
-
|
|
6589
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3'
|
|
6565
6590
|
],
|
|
6566
6591
|
{
|
|
6567
6592
|
defaultVariants: {
|
|
@@ -6632,7 +6657,7 @@ var BadgeButton = ({
|
|
|
6632
6657
|
// Default sizing for Lucide-icon children (which ship at 24×24); keeps
|
|
6633
6658
|
// the visual baseline aligned with the previous FA-icon API and other
|
|
6634
6659
|
// icon-wrapper components (ItemIcon, SidebarMenuIcon).
|
|
6635
|
-
|
|
6660
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3',
|
|
6636
6661
|
className
|
|
6637
6662
|
),
|
|
6638
6663
|
children
|
|
@@ -7035,7 +7060,7 @@ var ComboboxItemIndicator = ({
|
|
|
7035
7060
|
"group-data-[variant=default]/combobox-content:tw-right-4",
|
|
7036
7061
|
// Lucide SVGs default to 24×24 — constrain the rendered child so the
|
|
7037
7062
|
// 16px indicator slot owns the actual size.
|
|
7038
|
-
|
|
7063
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
7039
7064
|
"group-data-[highlighted]/combobox-item:tw-text-accent-foreground",
|
|
7040
7065
|
"group-data-[variant=default]/combobox-content:group-data-[highlighted]/combobox-item:tw-text-foreground",
|
|
7041
7066
|
className
|
|
@@ -7433,7 +7458,7 @@ var BreadcrumbLink = ({
|
|
|
7433
7458
|
"focus-visible:tw-ring-secondary-500/50",
|
|
7434
7459
|
"focus-visible:tw-rounded-sm",
|
|
7435
7460
|
// Icon
|
|
7436
|
-
|
|
7461
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3.5',
|
|
7437
7462
|
// transition
|
|
7438
7463
|
"tw-transition-colors",
|
|
7439
7464
|
className
|
|
@@ -7489,7 +7514,7 @@ var BreadcrumbSeparator = ({ children, className, ...props }) => /* @__PURE__ */
|
|
|
7489
7514
|
"tw-justify-center",
|
|
7490
7515
|
"tw-aspect-square",
|
|
7491
7516
|
"tw-size-[15px]",
|
|
7492
|
-
|
|
7517
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-2.5',
|
|
7493
7518
|
"tw-text-muted-foreground",
|
|
7494
7519
|
className
|
|
7495
7520
|
),
|
|
@@ -7593,7 +7618,7 @@ var variants6 = cva(
|
|
|
7593
7618
|
"tw-flex",
|
|
7594
7619
|
"tw-justify-center",
|
|
7595
7620
|
"tw-items-center",
|
|
7596
|
-
|
|
7621
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-3',
|
|
7597
7622
|
"[&:not(svg)]:tw-h-5",
|
|
7598
7623
|
"[&:not(svg)]:tw-min-w-5",
|
|
7599
7624
|
"tw-p-1",
|
|
@@ -7625,7 +7650,7 @@ var variants6 = cva(
|
|
|
7625
7650
|
"group-data-[accent=orange]/navbar:tw-bg-warning-500",
|
|
7626
7651
|
"group-data-[accent=green]/navbar:tw-bg-primary-500"
|
|
7627
7652
|
],
|
|
7628
|
-
"icon-button": ["tw-size-4", "tw-
|
|
7653
|
+
"icon-button": ["tw-size-4", "!tw-p-0", '[&_svg:not([class*="tw-size-"])]:tw-size-4'],
|
|
7629
7654
|
shortcut: ["tw-bg-muted", "tw-text-sidebar-foreground", "tw-ml-auto"]
|
|
7630
7655
|
}
|
|
7631
7656
|
}
|
|
@@ -7843,7 +7868,7 @@ var PaginationEllipsis = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
7843
7868
|
"tw-items-center",
|
|
7844
7869
|
"tw-justify-center",
|
|
7845
7870
|
"tw-text-foreground",
|
|
7846
|
-
|
|
7871
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
7847
7872
|
className
|
|
7848
7873
|
),
|
|
7849
7874
|
...props,
|
|
@@ -8169,7 +8194,7 @@ var Toggle = ({
|
|
|
8169
8194
|
disabled,
|
|
8170
8195
|
children: [
|
|
8171
8196
|
badge && /* @__PURE__ */ jsx("span", { className: "tw-absolute tw-right-0 tw-top-0 -tw-translate-y-1/2 tw-translate-x-1/4", children: badge }),
|
|
8172
|
-
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-align-middle [&_svg]:tw-size-4", children: renderLegacyIcon(icon) }),
|
|
8197
|
+
icon && /* @__PURE__ */ jsx("span", { className: "tw-inline-flex tw-size-4 tw-shrink-0 tw-items-center tw-justify-center tw-align-middle [&_svg:not([class*='tw-size-'])]:tw-size-4", children: renderLegacyIcon(icon) }),
|
|
8173
8198
|
isAiVariant ? /* @__PURE__ */ jsx("div", { className: "tw-bg-gradient-to-br tw-from-secondary-700 tw-to-purple-700 tw-bg-clip-text tw-text-transparent", children }) : children
|
|
8174
8199
|
]
|
|
8175
8200
|
}
|
|
@@ -8334,7 +8359,11 @@ var connector = cva(
|
|
|
8334
8359
|
"tw-text-nowrap",
|
|
8335
8360
|
"tw-text-xs"
|
|
8336
8361
|
],
|
|
8337
|
-
icon: [
|
|
8362
|
+
icon: [
|
|
8363
|
+
"tw-bg-white",
|
|
8364
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
8365
|
+
"[&_svg]:tw-text-neutral-300"
|
|
8366
|
+
],
|
|
8338
8367
|
line: [
|
|
8339
8368
|
"tw-min-w-8",
|
|
8340
8369
|
"tw-overflow-hidden",
|
|
@@ -9595,7 +9624,7 @@ var AlertIcon = ({ variant, icon, className, ...rest }) => /* @__PURE__ */ jsx(
|
|
|
9595
9624
|
"tw-justify-center",
|
|
9596
9625
|
"tw-self-start",
|
|
9597
9626
|
"tw-p-0.5",
|
|
9598
|
-
|
|
9627
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
9599
9628
|
"group-data-[variant=info]/alert:tw-text-secondary-500",
|
|
9600
9629
|
"group-data-[variant=warning]/alert:tw-text-warning-500",
|
|
9601
9630
|
"group-data-[variant=error]/alert:tw-text-error-500",
|
|
@@ -11954,7 +11983,7 @@ var ToastDismiss = ({
|
|
|
11954
11983
|
"tw-row-start-1",
|
|
11955
11984
|
"tailwindcss-preflight",
|
|
11956
11985
|
"[&_svg]:tw-aspect-square",
|
|
11957
|
-
|
|
11986
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-4',
|
|
11958
11987
|
"[&_svg]:tw-m-1",
|
|
11959
11988
|
"tw-text-white",
|
|
11960
11989
|
"group-data-[variant=default]/toast:[&_svg]:tw-text-popover-foreground",
|
|
@@ -12105,7 +12134,7 @@ var ToastRoot = ({
|
|
|
12105
12134
|
"tw-aspect-square",
|
|
12106
12135
|
"tw-size-5",
|
|
12107
12136
|
"tw-shrink-0",
|
|
12108
|
-
|
|
12137
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-5',
|
|
12109
12138
|
"tw-text-white",
|
|
12110
12139
|
"group-data-[variant=default]/toast:tw-text-popover-foreground"
|
|
12111
12140
|
),
|
|
@@ -12235,8 +12264,8 @@ var emptyStateIconClassnames = cva(
|
|
|
12235
12264
|
{
|
|
12236
12265
|
variants: {
|
|
12237
12266
|
variant: {
|
|
12238
|
-
default: ["tw-size-16", "tw-text-4xl",
|
|
12239
|
-
compact: ["tw-size-10", "tw-text-2xl",
|
|
12267
|
+
default: ["tw-size-16", "tw-text-4xl", '[&_svg:not([class*="tw-size-"])]:tw-size-10'],
|
|
12268
|
+
compact: ["tw-size-10", "tw-text-2xl", '[&_svg:not([class*="tw-size-"])]:tw-size-6']
|
|
12240
12269
|
}
|
|
12241
12270
|
},
|
|
12242
12271
|
defaultVariants: {
|
|
@@ -12307,9 +12336,24 @@ var errorStateClassnames = cva(["tw-flex", "tw-flex-col", "tw-items-center", "tw
|
|
|
12307
12336
|
var errorStateIconClassnames = cva(["tw-flex", "tw-items-center", "tw-justify-center"], {
|
|
12308
12337
|
variants: {
|
|
12309
12338
|
variant: {
|
|
12310
|
-
default: [
|
|
12311
|
-
|
|
12312
|
-
|
|
12339
|
+
default: [
|
|
12340
|
+
"tw-size-16",
|
|
12341
|
+
"tw-text-4xl",
|
|
12342
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-10',
|
|
12343
|
+
"tw-text-warning-500"
|
|
12344
|
+
],
|
|
12345
|
+
compact: [
|
|
12346
|
+
"tw-size-10",
|
|
12347
|
+
"tw-text-2xl",
|
|
12348
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-6',
|
|
12349
|
+
"tw-text-warning-500"
|
|
12350
|
+
],
|
|
12351
|
+
destructive: [
|
|
12352
|
+
"tw-size-16",
|
|
12353
|
+
"tw-text-4xl",
|
|
12354
|
+
'[&_svg:not([class*="tw-size-"])]:tw-size-10',
|
|
12355
|
+
"tw-text-error-500"
|
|
12356
|
+
]
|
|
12313
12357
|
}
|
|
12314
12358
|
},
|
|
12315
12359
|
defaultVariants: {
|
|
@@ -14282,6 +14326,151 @@ var PasswordInput = ({
|
|
|
14282
14326
|
}
|
|
14283
14327
|
);
|
|
14284
14328
|
};
|
|
14329
|
+
var InputOtpVariantContext = createContext({
|
|
14330
|
+
sizing: "md",
|
|
14331
|
+
state: "default"
|
|
14332
|
+
});
|
|
14333
|
+
var useInputOtpVariant = () => use(InputOtpVariantContext);
|
|
14334
|
+
var useInputOtpRenderContext = () => use(OTPInputContext);
|
|
14335
|
+
var InputOtpGroup = ({
|
|
14336
|
+
ref,
|
|
14337
|
+
className,
|
|
14338
|
+
...props
|
|
14339
|
+
}) => /* @__PURE__ */ jsx("div", { ref, className: cn("tw-flex tw-items-center tw-gap-2", className), ...props });
|
|
14340
|
+
var InputOtpSeparator = ({
|
|
14341
|
+
ref,
|
|
14342
|
+
children,
|
|
14343
|
+
className,
|
|
14344
|
+
...props
|
|
14345
|
+
}) => /* @__PURE__ */ jsx(
|
|
14346
|
+
"div",
|
|
14347
|
+
{
|
|
14348
|
+
ref,
|
|
14349
|
+
role: "separator",
|
|
14350
|
+
"aria-orientation": "vertical",
|
|
14351
|
+
className: cn("tw-flex tw-items-center tw-text-muted-foreground", className),
|
|
14352
|
+
...props,
|
|
14353
|
+
children: children ?? /* @__PURE__ */ jsx(Minus, { className: "tw-size-4" })
|
|
14354
|
+
}
|
|
14355
|
+
);
|
|
14356
|
+
var slotVariants = cva(
|
|
14357
|
+
[
|
|
14358
|
+
"tw-relative",
|
|
14359
|
+
"tw-flex",
|
|
14360
|
+
"tw-items-center",
|
|
14361
|
+
"tw-justify-center",
|
|
14362
|
+
"tw-border",
|
|
14363
|
+
"tw-border-input",
|
|
14364
|
+
"tw-bg-background",
|
|
14365
|
+
"tw-text-foreground",
|
|
14366
|
+
"tw-font-medium",
|
|
14367
|
+
"tw-tabular-nums",
|
|
14368
|
+
"tw-rounded-lg",
|
|
14369
|
+
"tw-transition",
|
|
14370
|
+
"tw-outline-none",
|
|
14371
|
+
// active slot sits above its neighbours so its ring isn't clipped
|
|
14372
|
+
"data-[active=true]:tw-z-10",
|
|
14373
|
+
"data-[active=true]:tw-border-primary",
|
|
14374
|
+
"data-[active=true]:tw-ring-2",
|
|
14375
|
+
"data-[active=true]:tw-ring-primary/50"
|
|
14376
|
+
],
|
|
14377
|
+
{
|
|
14378
|
+
defaultVariants: {
|
|
14379
|
+
sizing: "md",
|
|
14380
|
+
state: "default"
|
|
14381
|
+
},
|
|
14382
|
+
variants: {
|
|
14383
|
+
sizing: {
|
|
14384
|
+
sm: ["tw-h-8", "tw-w-8", "tw-text-sm"],
|
|
14385
|
+
md: ["tw-h-9", "tw-w-9", "tw-text-base"],
|
|
14386
|
+
lg: ["tw-h-10", "tw-w-10", "tw-text-lg"]
|
|
14387
|
+
},
|
|
14388
|
+
// `!` forces the border colour over the base `tw-border-input` once tailwind-merge dedupes.
|
|
14389
|
+
// Matches the pattern InputGroup uses for its argo error state.
|
|
14390
|
+
state: {
|
|
14391
|
+
default: [],
|
|
14392
|
+
error: [
|
|
14393
|
+
"!tw-border-destructive",
|
|
14394
|
+
"tw-bg-destructive/5",
|
|
14395
|
+
"data-[active=true]:!tw-border-destructive",
|
|
14396
|
+
"data-[active=true]:tw-ring-destructive/40"
|
|
14397
|
+
]
|
|
14398
|
+
}
|
|
14399
|
+
}
|
|
14400
|
+
}
|
|
14401
|
+
);
|
|
14402
|
+
var InputOtpSlot = ({
|
|
14403
|
+
ref,
|
|
14404
|
+
index,
|
|
14405
|
+
className,
|
|
14406
|
+
...props
|
|
14407
|
+
}) => {
|
|
14408
|
+
const { slots } = useInputOtpRenderContext();
|
|
14409
|
+
const { sizing, state } = useInputOtpVariant();
|
|
14410
|
+
const slot = slots[index];
|
|
14411
|
+
const char = slot?.char ?? null;
|
|
14412
|
+
const isActive = slot?.isActive ?? false;
|
|
14413
|
+
const hasFakeCaret = slot?.hasFakeCaret ?? false;
|
|
14414
|
+
return /* @__PURE__ */ jsxs(
|
|
14415
|
+
"div",
|
|
14416
|
+
{
|
|
14417
|
+
ref,
|
|
14418
|
+
"data-active": isActive || void 0,
|
|
14419
|
+
"data-slot-index": index,
|
|
14420
|
+
className: cn(slotVariants({ sizing, state }), className),
|
|
14421
|
+
...props,
|
|
14422
|
+
children: [
|
|
14423
|
+
char,
|
|
14424
|
+
hasFakeCaret && /* @__PURE__ */ jsx(
|
|
14425
|
+
"div",
|
|
14426
|
+
{
|
|
14427
|
+
"aria-hidden": "true",
|
|
14428
|
+
className: "tw-pointer-events-none tw-absolute tw-inset-0 tw-flex tw-items-center tw-justify-center",
|
|
14429
|
+
children: /* @__PURE__ */ jsx("div", { className: "tw-h-1/2 tw-w-px tw-animate-caret-blink tw-bg-foreground" })
|
|
14430
|
+
}
|
|
14431
|
+
)
|
|
14432
|
+
]
|
|
14433
|
+
}
|
|
14434
|
+
);
|
|
14435
|
+
};
|
|
14436
|
+
var Root31 = ({
|
|
14437
|
+
ref,
|
|
14438
|
+
sizing = "md",
|
|
14439
|
+
state = "default",
|
|
14440
|
+
pattern = REGEXP_ONLY_DIGITS,
|
|
14441
|
+
containerClassName,
|
|
14442
|
+
className,
|
|
14443
|
+
children,
|
|
14444
|
+
...rest
|
|
14445
|
+
}) => /* @__PURE__ */ jsx(InputOtpVariantContext, { value: { sizing, state }, children: /* @__PURE__ */ jsx(
|
|
14446
|
+
OTPInput,
|
|
14447
|
+
{
|
|
14448
|
+
...rest,
|
|
14449
|
+
ref,
|
|
14450
|
+
pattern,
|
|
14451
|
+
"aria-invalid": state === "error" || void 0,
|
|
14452
|
+
containerClassName: cn(
|
|
14453
|
+
"tw-flex tw-items-center tw-gap-2 has-[:disabled]:tw-opacity-50",
|
|
14454
|
+
containerClassName
|
|
14455
|
+
),
|
|
14456
|
+
className: cn("disabled:tw-cursor-not-allowed", className),
|
|
14457
|
+
children
|
|
14458
|
+
}
|
|
14459
|
+
) });
|
|
14460
|
+
var InputOtp = Object.assign(Root31, {
|
|
14461
|
+
Group: InputOtpGroup,
|
|
14462
|
+
Slot: InputOtpSlot,
|
|
14463
|
+
Separator: InputOtpSeparator
|
|
14464
|
+
});
|
|
14465
|
+
|
|
14466
|
+
// src/blocks/InputOtp/index.ts
|
|
14467
|
+
var useInputOtpContext = () => {
|
|
14468
|
+
const ctx = use(OTPInputContext);
|
|
14469
|
+
if (!ctx.slots) {
|
|
14470
|
+
throw new Error("useInputOtpContext must be used inside <InputOtp>.");
|
|
14471
|
+
}
|
|
14472
|
+
return ctx;
|
|
14473
|
+
};
|
|
14285
14474
|
var { fieldContext, useFieldContext, formContext, useFormContext } = createFormHookContexts();
|
|
14286
14475
|
var FormBody = ({ children, className, ...formProps }) => {
|
|
14287
14476
|
const form = useFormContext();
|
|
@@ -14748,6 +14937,6 @@ function useAutosizeInput({
|
|
|
14748
14937
|
return { inputRef, inputStyle, sizerElement };
|
|
14749
14938
|
}
|
|
14750
14939
|
|
|
14751
|
-
export { Alert, AnswerSummary, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar2 as Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, Icon, InlineStepDetail, InlineStepLabel, InputGroup, Kbd, Label, Link2 as Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search2 as Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, SuggestedPrompt, Switch, Table2 as Table, Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isIconName, isMac, kbdVariants, keys, mergeRefs, setServerFieldErrors, toast, useAppForm, useAutosizeInput, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, withForm };
|
|
14940
|
+
export { Alert, AnswerSummary, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar2 as Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, CodeEditor, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, Icon, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label, Link2 as Link, MarkedText, MergeEditor, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search2 as Search, SearchForm, SearchInput, SearchInputWithNavigation, Select, Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, SqlEditor, SuggestedPrompt, Switch, Table2 as Table, Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isIconName, isMac, kbdVariants, keys, mergeRefs, setServerFieldErrors, toast, useAppForm, useAutosizeInput, useInputOtpContext, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, withForm };
|
|
14752
14941
|
//# sourceMappingURL=index.js.map
|
|
14753
14942
|
//# sourceMappingURL=index.js.map
|