@keboola/design 4.2.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1412,9 +1412,9 @@ var variants = cva(
1412
1412
  "focus-visible:tw-outline",
1413
1413
  "focus-visible:tw-outline-1",
1414
1414
  "focus-visible:-tw-outline-offset-1",
1415
- "focus-visible:tw-outline-secondary-500",
1415
+ "focus-visible:tw-outline-ring",
1416
1416
  "focus-visible:tw-ring-4",
1417
- "focus-visible:tw-ring-secondary-200",
1417
+ "focus-visible:tw-ring-ring/30",
1418
1418
  // disabled
1419
1419
  "disabled:tw-opacity-40",
1420
1420
  "disabled:tw-cursor-not-allowed",
@@ -2458,9 +2458,10 @@ var toggleVariants = cva(
2458
2458
  // focus-visible
2459
2459
  "[&:not(:active)]:not-disabled:focus-visible:tw-outline",
2460
2460
  "!tw-outline-offset-0",
2461
- "[&:not(:active)]:not-disabled:focus-visible:tw-outline-secondary-500",
2461
+ "[&:not(:active)]:not-disabled:focus-visible:tw-outline-ring",
2462
2462
  "[&:not(:active)]:not-disabled:focus-visible:tw-outline-1",
2463
- "[&:not(:active)]:not-disabled:focus-visible:tw-shadow-[0_0_0_4px_rgba(31,143,255,0.2)]"
2463
+ "[&:not(:active)]:not-disabled:focus-visible:tw-ring-4",
2464
+ "[&:not(:active)]:not-disabled:focus-visible:tw-ring-ring/20"
2464
2465
  ],
2465
2466
  {
2466
2467
  variants: {
@@ -8801,7 +8802,7 @@ var inputGroupVariants = cva(
8801
8802
  variants: {
8802
8803
  focusVariant: {
8803
8804
  default: [],
8804
- on: ["!tw-border-secondary-500", "!tw-ring-secondary-200", "!tw-ring-4"],
8805
+ on: ["!tw-border-ring", "!tw-ring-ring/30", "!tw-ring-4"],
8805
8806
  off: ["has-[:is(input,textarea):focus]:!tw-ring-0"]
8806
8807
  },
8807
8808
  variant: {
@@ -8841,8 +8842,8 @@ var inputGroupVariants = cva(
8841
8842
  },
8842
8843
  state: {
8843
8844
  default: [
8844
- "has-[:is(input,textarea):focus]:tw-border-secondary-500",
8845
- "has-[:is(input,textarea):focus]:tw-ring-secondary-200"
8845
+ "has-[:is(input,textarea):focus]:tw-border-ring",
8846
+ "has-[:is(input,textarea):focus]:tw-ring-ring/30"
8846
8847
  ],
8847
8848
  error: [
8848
8849
  "tw-border-error-500",
@@ -9922,9 +9923,9 @@ var switchVariants = cva(
9922
9923
  "focus-visible:tw-outline-none",
9923
9924
  "before:focus-visible:tw-outline",
9924
9925
  "before:focus-visible:tw-outline-1",
9925
- "before:focus-visible:tw-outline-secondary-500",
9926
+ "before:focus-visible:tw-outline-ring",
9926
9927
  "before:focus-visible:tw-ring-4",
9927
- "before:focus-visible:tw-ring-secondary-200"
9928
+ "before:focus-visible:tw-ring-ring/30"
9928
9929
  ],
9929
9930
  argo: [
9930
9931
  "tw-peer",
@@ -10108,7 +10109,7 @@ var radioVariants = cva(
10108
10109
  "data-[state=unchecked]:hover:tw-border-primary",
10109
10110
  "data-[state=unchecked]:disabled:hover:tw-border-neutral-200",
10110
10111
  "focus-visible:tw-ring-2",
10111
- "focus-visible:tw-ring-secondary-200"
10112
+ "focus-visible:tw-ring-ring/30"
10112
10113
  ],
10113
10114
  argo: [
10114
10115
  "disabled:tw-opacity-50",
@@ -10188,9 +10189,9 @@ var radioItemButtonVariants = cva(
10188
10189
  "data-[state=checked]:tw-text-white",
10189
10190
  "data-[state=checked]:tw-cursor-default",
10190
10191
  "focus-visible:tw-outline",
10191
- "focus-visible:tw-outline-secondary-500",
10192
+ "focus-visible:tw-outline-ring",
10192
10193
  "focus-visible:tw-ring-4",
10193
- "focus-visible:tw-ring-secondary-200"
10194
+ "focus-visible:tw-ring-ring/30"
10194
10195
  ],
10195
10196
  argo: [
10196
10197
  "disabled:tw-opacity-50",
@@ -10659,8 +10660,8 @@ var searchWrapperVariants = cva(
10659
10660
  // focus
10660
10661
  "has-[input:focus]:tw-outline-1",
10661
10662
  "has-[input:focus]:tw-ring-4",
10662
- "has-[input:focus]:tw-outline-secondary-500",
10663
- "has-[input:focus]:tw-ring-secondary-200"
10663
+ "has-[input:focus]:tw-outline-ring",
10664
+ "has-[input:focus]:tw-ring-ring/30"
10664
10665
  ],
10665
10666
  ai: [
10666
10667
  "tailwindcss-preflight",
@@ -10677,7 +10678,7 @@ var searchWrapperVariants = cva(
10677
10678
  "tw-shadow-[inset_0_100vw_white]",
10678
10679
  // focus
10679
10680
  "has-[input:focus]:tw-ring-4",
10680
- "has-[input:focus]:tw-ring-secondary-200"
10681
+ "has-[input:focus]:tw-ring-ring/30"
10681
10682
  ]
10682
10683
  }
10683
10684
  }
@@ -11099,10 +11100,10 @@ var variants4 = cva(
11099
11100
  },
11100
11101
  state: {
11101
11102
  default: [
11102
- "focus:tw-border-secondary-500",
11103
- "focus:tw-ring-secondary-200",
11104
- "data-[state=open]:tw-border-secondary-500",
11105
- "data-[state=open]:tw-ring-secondary-200"
11103
+ "focus:tw-border-ring",
11104
+ "focus:tw-ring-ring/30",
11105
+ "data-[state=open]:tw-border-ring",
11106
+ "data-[state=open]:tw-ring-ring/30"
11106
11107
  ],
11107
11108
  error: [
11108
11109
  "tw-border-error-500",
@@ -11481,7 +11482,7 @@ var badgeRootVariants = cva(
11481
11482
  "focus-visible:tw-outline-none",
11482
11483
  "focus-visible:tw-ring-2",
11483
11484
  "focus-visible:tw-ring-inset",
11484
- "focus-visible:tw-ring-secondary-500"
11485
+ "focus-visible:tw-ring-ring"
11485
11486
  ],
11486
11487
  {
11487
11488
  defaultVariants: {
@@ -12605,6 +12606,43 @@ var ColorInput = ({
12605
12606
  }
12606
12607
  );
12607
12608
  };
12609
+ var OPTIONS = [
12610
+ { value: "light", label: "Light", icon: icons_exports.Sun },
12611
+ { value: "dark", label: "Dark", icon: icons_exports.Moon },
12612
+ { value: "system", label: "System", icon: icons_exports.Monitor }
12613
+ ];
12614
+ var triggerSizeMap = { small: "icon-sm", medium: "icon" };
12615
+ var ColorModeSwitch = ({ value, onValueChange, size = "small", className }) => {
12616
+ const active = OPTIONS.find((option) => option.value === value);
12617
+ const ActiveIcon = active?.icon ?? icons_exports.Monitor;
12618
+ const activeLabel = active?.label ?? "System";
12619
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
12620
+ /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx(
12621
+ Button,
12622
+ {
12623
+ type: "button",
12624
+ variant: "outline",
12625
+ size: triggerSizeMap[size],
12626
+ "aria-label": `Color mode: ${activeLabel}`,
12627
+ title: `Color mode: ${activeLabel}`,
12628
+ className,
12629
+ children: /* @__PURE__ */ jsx(ActiveIcon, { className: "tw-size-4" })
12630
+ }
12631
+ ) }),
12632
+ /* @__PURE__ */ jsx(DropdownMenu.Content, { align: "end", children: /* @__PURE__ */ jsx(DropdownMenu.RadioGroup, { value, onValueChange, children: OPTIONS.map(({ value: option, label, icon: Icon2 }) => /* @__PURE__ */ jsx(
12633
+ DropdownMenu.RadioItem,
12634
+ {
12635
+ value: option,
12636
+ icon: /* @__PURE__ */ jsx(Icon2, {}),
12637
+ indicator: "check",
12638
+ indicatorAlign: "end",
12639
+ closeOnSelect: true,
12640
+ children: label
12641
+ },
12642
+ option
12643
+ )) }) })
12644
+ ] });
12645
+ };
12608
12646
  var toNumberOrNull = (event) => Number.isNaN(event.target.valueAsNumber) ? null : event.target.valueAsNumber;
12609
12647
  var NumberInput = ({
12610
12648
  ref,
@@ -14947,9 +14985,9 @@ FormGroup.NumberInput = FormGroupNumberInput;
14947
14985
  FormGroup.ColorInput = FormGroupColorInput;
14948
14986
  FormGroup.Textarea = FormGroupTextarea;
14949
14987
  var variantClasses = {
14950
- success: "tw-text-secondary-500 focus-visible:tw-outline-secondary-500 not-disabled:hover:tw-text-secondary-600",
14988
+ success: "tw-text-secondary-500 focus-visible:tw-outline-ring not-disabled:hover:tw-text-secondary-600",
14951
14989
  error: "tw-text-error-500 focus-visible:tw-outline-error-500 not-disabled:hover:tw-text-error-600",
14952
- processing: "tw-text-secondary-500 focus-visible:tw-outline-secondary-500 not-disabled:hover:tw-text-secondary-600",
14990
+ processing: "tw-text-secondary-500 focus-visible:tw-outline-ring not-disabled:hover:tw-text-secondary-600",
14953
14991
  dismissed: "tw-text-neutral-700 focus-visible:tw-outline-neutral-500 not-disabled:hover:tw-text-neutral-800"
14954
14992
  };
14955
14993
  var renderVariantIcon = (variant) => {
@@ -15082,8 +15120,8 @@ var Avatar = ({
15082
15120
  "tw-border",
15083
15121
  "tw-border-transparent",
15084
15122
  "focus-visible:tw-ring-4",
15085
- "focus-visible:tw-ring-secondary-200",
15086
- "focus-visible:tw-border-secondary-500",
15123
+ "focus-visible:tw-ring-ring/30",
15124
+ "focus-visible:tw-border-ring",
15087
15125
  className
15088
15126
  ),
15089
15127
  children: [
@@ -15194,7 +15232,7 @@ var ExpandToggle = ({
15194
15232
  type: "button",
15195
15233
  onClick: onToggle,
15196
15234
  "aria-expanded": isExpanded,
15197
- className: "tailwindcss-preflight tw-inline-flex tw-cursor-pointer tw-items-center tw-gap-1 tw-bg-transparent tw-p-0 tw-text-sm tw-font-medium tw-text-secondary-500 hover:tw-text-secondary-600 focus-visible:tw-outline focus-visible:tw-outline-2 focus-visible:tw-outline-offset-2 focus-visible:tw-outline-secondary-500",
15235
+ className: "tailwindcss-preflight tw-inline-flex tw-cursor-pointer tw-items-center tw-gap-1 tw-bg-transparent tw-p-0 tw-text-sm tw-font-medium tw-text-secondary-500 hover:tw-text-secondary-600 focus-visible:tw-outline focus-visible:tw-outline-2 focus-visible:tw-outline-offset-2 focus-visible:tw-outline-ring",
15198
15236
  children: [
15199
15237
  /* @__PURE__ */ jsx("span", { children: isExpanded ? showLessLabel : showMoreLabel }),
15200
15238
  /* @__PURE__ */ jsx(
@@ -15554,7 +15592,7 @@ var promptInputVariants = cva(
15554
15592
  "tw-shadow-[inset_0_100vw_white]",
15555
15593
  // focus
15556
15594
  "has-[textarea:focus]:tw-ring-4",
15557
- "has-[textarea:focus]:tw-ring-secondary-200",
15595
+ "has-[textarea:focus]:tw-ring-ring/30",
15558
15596
  "tw-cursor-text",
15559
15597
  "tw-px-2"
15560
15598
  ],
@@ -16424,7 +16462,7 @@ var Alert = ({
16424
16462
  "tw-rounded-sm",
16425
16463
  "focus-visible:tw-outline",
16426
16464
  "focus-visible:tw-outline-2",
16427
- "focus-visible:tw-outline-secondary-500"
16465
+ "focus-visible:tw-outline-ring"
16428
16466
  ),
16429
16467
  children: [
16430
16468
  !hideIcon && /* @__PURE__ */ jsx(AlertIcon, { variant, icon }),
@@ -18497,10 +18535,10 @@ var SidebarGroupAction = ({
18497
18535
  "hover:[&_svg]:tw-text-secondary-600",
18498
18536
  "hover:tw-bg-neutral-100",
18499
18537
  "focus-visible:tw-ring-4",
18500
- "focus-visible:tw-ring-secondary-200",
18538
+ "focus-visible:tw-ring-ring/30",
18501
18539
  "focus-visible:tw-outline",
18502
18540
  "focus-visible:tw-outline-1",
18503
- "focus-visible:tw-outline-secondary-500",
18541
+ "focus-visible:tw-outline-ring",
18504
18542
  className
18505
18543
  ),
18506
18544
  children
@@ -19777,7 +19815,7 @@ var BreadcrumbEllipsis = ({
19777
19815
  // focus
19778
19816
  "focus-visible:tw-outline-none",
19779
19817
  "focus-visible:tw-ring-2",
19780
- "focus-visible:tw-ring-secondary-500/50",
19818
+ "focus-visible:tw-ring-ring/50",
19781
19819
  "tw-p-1",
19782
19820
  className
19783
19821
  ),
@@ -19813,7 +19851,7 @@ var BreadcrumbLink = ({
19813
19851
  // focus
19814
19852
  "focus-visible:tw-outline-none",
19815
19853
  "focus-visible:tw-ring-2",
19816
- "focus-visible:tw-ring-secondary-500/50",
19854
+ "focus-visible:tw-ring-ring/50",
19817
19855
  "focus-visible:tw-rounded-sm",
19818
19856
  // Icon
19819
19857
  '[&_svg:not([class*="tw-size-"])]:tw-size-3.5',
@@ -22096,6 +22134,6 @@ object-assign/index.js:
22096
22134
  *)
22097
22135
  */
22098
22136
 
22099
- export { Alert, AlertModal, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select2 as Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, UsageStats, UsageStatsRing, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useColorScheme, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
22137
+ export { Alert, AlertModal, AnswerSummary, AppShell, AutoSaveTextarea, Avatar, Badge, Breadcrumb, Button, ButtonGroup, ButtonInline, Calendar, Card, Checkbox, Clipboard, ClipboardButton, ClipboardInline, Collapse, Collapsible, CollapsiblePanel, CollapsibleStepHeader, ColorInput, ColorModeSwitch, Combobox, Command, CommandGroup, CommandInput, CommandItem, CommandList, ConflictStatusIndicator, DateInput, DatePicker, DateRangeInput, DateRangePicker, DiffType, DiffView, DotsLoader, DropdownMenu, EmptyConfigurationActionCard, EmptySearchContent, EmptyState, ErrorState, FileUpload, FormGroup, FullScreenModal, FullScreenModalBody, FullScreenModalHeader, HelpBlock, HoverCard, InlineStepDetail, InlineStepLabel, InputGroup, InputOtp, Kbd, Label2 as Label, Link, MarkedText, MessageBubble, Modal, MultiActionButtonGroup, MultiCombobox, Navbar, NumberInput, PageHeader, PageLayout, PageToolbar, Pagination, PaneHeader, PanelWithDetails, PasswordInput, PlanApproval, PlanRewritingIndicator, Popconfirm, Popover, Progress, PromptInput, Question, QuestionBlock, RadioGroup2 as RadioGroup, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Search, SearchForm, SearchInput, SearchInputWithNavigation, Select2 as Select, Separator2 as Separator, Sheet, Sidebar, SidebarProvider, Skeleton, SkeletonList, Slider, SplitButton, Stepper, SuggestedPrompt, Switch, Table, Tabs2 as Tabs, TabsContent, Tagger, TextInput, Textarea, ThemeDecorator, ThemeProvider, ThinkingIndicator, TimeInput, TimePicker, Timeline, Toaster, Toggle, ToggleGroup, Tooltip, TooltipProvider, Truncated, UsageStats, UsageStatsRing, ZoomableSvg, argoVariants, cn, computeDiffRows, computeLineInformation, copyToClipboard, isMac, kbdVariants, keys, mergeRefs, resolveStorybookBrand, setServerFieldErrors, themeToolbarBrands, toast, useAppForm, useAutosizeInput, useColorScheme, useInputOtpContext, useIsLegacyBrand, useMergeDiff, useNotification, useScrollbarPosition, useSidebar, useTheme, withForm };
22100
22138
  //# sourceMappingURL=index.js.map
22101
22139
  //# sourceMappingURL=index.js.map