@proteos/ui 0.56.0 → 0.57.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/{chunk-IKAX76MB.js → chunk-NSE4VW3Z.js} +45 -21
- package/dist/chunk-NSE4VW3Z.js.map +1 -0
- package/dist/{chunk-MWAXK66H.cjs → chunk-NWGG5WFL.cjs} +45 -21
- package/dist/chunk-NWGG5WFL.cjs.map +1 -0
- package/dist/index.cjs +336 -351
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -12
- package/dist/index.d.ts +41 -12
- package/dist/index.js +83 -98
- package/dist/index.js.map +1 -1
- package/dist/{pdf-view-MH75RVQP.js → pdf-view-RQ2OZYHJ.js} +3 -3
- package/dist/{pdf-view-MH75RVQP.js.map → pdf-view-RQ2OZYHJ.js.map} +1 -1
- package/dist/{pdf-view-K4MMVHVY.cjs → pdf-view-RRMAUK3L.cjs} +7 -7
- package/dist/{pdf-view-K4MMVHVY.cjs.map → pdf-view-RRMAUK3L.cjs.map} +1 -1
- package/package.json +2 -2
- package/src/components/avatar/avatar.stories.tsx +13 -0
- package/src/components/avatar/avatar.tsx +16 -9
- package/src/components/badge-multi-select/badge-multi-select.tsx +2 -2
- package/src/components/button/button.stories.tsx +202 -97
- package/src/components/button/button.test.tsx +40 -7
- package/src/components/button/button.tsx +71 -18
- package/src/components/combobox/combobox.tsx +2 -2
- package/src/components/currency-input/currency-input.tsx +2 -2
- package/src/components/date-picker/calendar-internals.tsx +1 -1
- package/src/components/date-picker/date-picker.tsx +3 -3
- package/src/components/date-time-picker/date-time-picker.tsx +3 -3
- package/src/components/icon-picker/icon-picker.tsx +2 -2
- package/src/components/image-lightbox/image-lightbox.tsx +2 -2
- package/src/components/menu/menu.tsx +2 -2
- package/src/components/modal/modal.tsx +4 -4
- package/src/components/multi-select/multi-select.tsx +2 -2
- package/src/components/popover/popover.tsx +2 -2
- package/src/components/record-filter/nested-group.tsx +2 -2
- package/src/components/record-filter/record-filter-builder-panel.tsx +11 -23
- package/src/components/record-filter/record-filter-chips.tsx +3 -10
- package/src/components/segmented-control/segmented-control.stories.tsx +134 -8
- package/src/components/segmented-control/segmented-control.test.tsx +81 -8
- package/src/components/segmented-control/segmented-control.tsx +38 -19
- package/src/components/select/select.tsx +2 -2
- package/src/components/time-field/time-field.tsx +1 -1
- package/src/components/toast/toast.tsx +2 -2
- package/src/components/tooltip/tooltip.tsx +2 -2
- package/src/styles.css +58 -0
- package/dist/chunk-IKAX76MB.js.map +0 -1
- package/dist/chunk-MWAXK66H.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn, Button, Skeleton } from './chunk-
|
|
2
|
-
export { Button, Skeleton, buttonStyles, cn, skeletonStyles } from './chunk-
|
|
1
|
+
import { cn, Button, Skeleton } from './chunk-NSE4VW3Z.js';
|
|
2
|
+
export { Button, Skeleton, buttonStyles, cn, skeletonStyles } from './chunk-NSE4VW3Z.js';
|
|
3
3
|
import { icons, Contact, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, Phone, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, Pencil, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
|
|
4
4
|
import { tv } from 'tailwind-variants';
|
|
5
5
|
import { Tabs as Tabs$1, TabPanel, Tab, TabList, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, DialogTrigger, Popover as Popover$1, Dialog, DropZone, Text, FileTrigger, Heading, Label, Input as Input$1, ListBox, ListBoxItem, TooltipTrigger as TooltipTrigger$1, Tooltip as Tooltip$1, Button as Button$1, Breadcrumbs as Breadcrumbs$1, Breadcrumb, Link, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, FieldError, TextField, ComboBox, ComboBoxStateContext, Select as Select$1, SelectValue, ModalOverlay, Modal as Modal$1, DatePicker as DatePicker$1, Group, DateInput, DateSegment, Menu as Menu$1, MenuItem as MenuItem$1, Disclosure, DisclosurePanel, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Separator as Separator$1, Switch as Switch$1, TextArea, TimeField as TimeField$1, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, UNSTABLE_Toast, UNSTABLE_ToastContent, Calendar as Calendar$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, DatePickerStateContext } from 'react-aria-components';
|
|
@@ -35,8 +35,8 @@ function PopoverContent({
|
|
|
35
35
|
className: (renderProps) => cn(
|
|
36
36
|
"rounded-md border border-rule bg-surface",
|
|
37
37
|
"shadow-[var(--shadow-float)]",
|
|
38
|
-
"entering:animate-
|
|
39
|
-
"exiting:animate-
|
|
38
|
+
"entering:animate-enter-slide-down",
|
|
39
|
+
"exiting:animate-exit-slide-up",
|
|
40
40
|
panelClassName,
|
|
41
41
|
typeof className === "function" ? className(renderProps) : className
|
|
42
42
|
),
|
|
@@ -403,7 +403,7 @@ function AttributeTypeIcon({
|
|
|
403
403
|
var avatarStyles = tv({
|
|
404
404
|
base: [
|
|
405
405
|
"inline-grid place-items-center shrink-0 select-none overflow-hidden",
|
|
406
|
-
"
|
|
406
|
+
"border",
|
|
407
407
|
"font-mono font-medium tracking-[-0.005em]"
|
|
408
408
|
],
|
|
409
409
|
variants: {
|
|
@@ -415,17 +415,22 @@ var avatarStyles = tv({
|
|
|
415
415
|
},
|
|
416
416
|
tone: {
|
|
417
417
|
paper: "bg-surface-3 text-ink border-rule",
|
|
418
|
-
indigo: "bg-
|
|
419
|
-
moss: "bg-
|
|
420
|
-
terra: "bg-
|
|
421
|
-
slate: "bg-
|
|
418
|
+
indigo: "bg-tile-indigo text-tile-fg border-transparent",
|
|
419
|
+
moss: "bg-tile-moss text-tile-fg border-transparent",
|
|
420
|
+
terra: "bg-tile-terra text-tile-fg border-transparent",
|
|
421
|
+
slate: "bg-tile-slate text-tile-fg border-transparent"
|
|
422
|
+
},
|
|
423
|
+
shape: {
|
|
424
|
+
circle: "rounded-full",
|
|
425
|
+
square: "rounded-md"
|
|
422
426
|
}
|
|
423
427
|
},
|
|
424
|
-
defaultVariants: { size: "md", tone: "paper" }
|
|
428
|
+
defaultVariants: { size: "md", tone: "paper", shape: "circle" }
|
|
425
429
|
});
|
|
426
430
|
function Avatar({
|
|
427
431
|
size,
|
|
428
432
|
tone,
|
|
433
|
+
shape,
|
|
429
434
|
initials,
|
|
430
435
|
src,
|
|
431
436
|
alt = "",
|
|
@@ -435,7 +440,7 @@ function Avatar({
|
|
|
435
440
|
}) {
|
|
436
441
|
const [failedSrc, setFailedSrc] = useState(null);
|
|
437
442
|
const showsImage = Boolean(src) && failedSrc !== src;
|
|
438
|
-
return /* @__PURE__ */ jsx("span", { ...props, className: cn(avatarStyles({ size, tone }), className), children: showsImage ? /* @__PURE__ */ jsx(
|
|
443
|
+
return /* @__PURE__ */ jsx("span", { ...props, className: cn(avatarStyles({ size, tone, shape }), className), children: showsImage ? /* @__PURE__ */ jsx(
|
|
439
444
|
"img",
|
|
440
445
|
{
|
|
441
446
|
src: src ?? void 0,
|
|
@@ -702,8 +707,8 @@ function IconPicker({
|
|
|
702
707
|
className: cn(
|
|
703
708
|
"w-[316px] rounded-md border border-rule bg-surface p-2",
|
|
704
709
|
"shadow-[var(--shadow-raised)]",
|
|
705
|
-
"entering:animate-
|
|
706
|
-
"exiting:animate-
|
|
710
|
+
"entering:animate-enter-slide-down",
|
|
711
|
+
"exiting:animate-exit-slide-up"
|
|
707
712
|
),
|
|
708
713
|
children: [
|
|
709
714
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 pb-2", children: [
|
|
@@ -953,8 +958,8 @@ function Tooltip({ className, offset = 6, ...props }) {
|
|
|
953
958
|
"rounded-md border border-rule bg-surface shadow-[var(--shadow-raised)]",
|
|
954
959
|
"px-2.5 py-1.5",
|
|
955
960
|
"font-mono text-[11.5px] text-ink-2",
|
|
956
|
-
"entering:animate-
|
|
957
|
-
"exiting:animate-
|
|
961
|
+
"entering:animate-enter-slide-down",
|
|
962
|
+
"exiting:animate-exit-fade",
|
|
958
963
|
typeof className === "function" ? className(renderProps) : className
|
|
959
964
|
)
|
|
960
965
|
}
|
|
@@ -1310,8 +1315,8 @@ function BadgeMultiSelect({
|
|
|
1310
1315
|
// (defaultOpen) — no browser outline around the whole panel.
|
|
1311
1316
|
"outline-none rounded-md border border-rule bg-surface p-1",
|
|
1312
1317
|
"shadow-[var(--shadow-raised)]",
|
|
1313
|
-
"entering:animate-
|
|
1314
|
-
"exiting:animate-
|
|
1318
|
+
"entering:animate-enter-slide-down",
|
|
1319
|
+
"exiting:animate-exit-slide-up"
|
|
1315
1320
|
),
|
|
1316
1321
|
children: /* @__PURE__ */ jsx("div", { ref: popoverRef, children: /* @__PURE__ */ jsx(
|
|
1317
1322
|
ListBox,
|
|
@@ -1857,8 +1862,8 @@ function Combobox({
|
|
|
1857
1862
|
"min-w-[var(--trigger-width)]",
|
|
1858
1863
|
"rounded-md border border-rule bg-surface p-1",
|
|
1859
1864
|
"shadow-[var(--shadow-raised)]",
|
|
1860
|
-
"entering:animate-
|
|
1861
|
-
"exiting:animate-
|
|
1865
|
+
"entering:animate-enter-slide-down",
|
|
1866
|
+
"exiting:animate-exit-slide-up"
|
|
1862
1867
|
),
|
|
1863
1868
|
children: /* @__PURE__ */ jsx(
|
|
1864
1869
|
ListBox,
|
|
@@ -2350,8 +2355,8 @@ function Select({
|
|
|
2350
2355
|
"z-[1300]",
|
|
2351
2356
|
"rounded-md border border-rule bg-surface p-1",
|
|
2352
2357
|
"shadow-[var(--shadow-raised)]",
|
|
2353
|
-
"entering:animate-
|
|
2354
|
-
"exiting:animate-
|
|
2358
|
+
"entering:animate-enter-slide-down",
|
|
2359
|
+
"exiting:animate-exit-slide-up",
|
|
2355
2360
|
popoverClassName
|
|
2356
2361
|
),
|
|
2357
2362
|
children: [
|
|
@@ -2531,8 +2536,8 @@ function ModalContent({
|
|
|
2531
2536
|
"fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
2532
2537
|
// Warm ink scrim — stays in the Proteos palette (no pure black).
|
|
2533
2538
|
"bg-[color-mix(in_oklab,var(--color-ink)_40%,transparent)]",
|
|
2534
|
-
"entering:animate-
|
|
2535
|
-
"exiting:animate-
|
|
2539
|
+
"entering:animate-enter-fade",
|
|
2540
|
+
"exiting:animate-exit-fade",
|
|
2536
2541
|
typeof className === "function" ? className(renderProps) : className
|
|
2537
2542
|
),
|
|
2538
2543
|
children: /* @__PURE__ */ jsx(
|
|
@@ -2546,8 +2551,8 @@ function ModalContent({
|
|
|
2546
2551
|
"flex flex-col max-h-[calc(100dvh-2rem)]",
|
|
2547
2552
|
"bg-surface border border-rule rounded-lg",
|
|
2548
2553
|
"shadow-[var(--shadow-float)]",
|
|
2549
|
-
"entering:animate-
|
|
2550
|
-
"exiting:animate-
|
|
2554
|
+
"entering:animate-enter-zoom",
|
|
2555
|
+
"exiting:animate-exit-zoom",
|
|
2551
2556
|
modalClassName
|
|
2552
2557
|
),
|
|
2553
2558
|
children: /* @__PURE__ */ jsx(Dialog, { className: "outline-none flex flex-col min-h-0 overflow-hidden", children })
|
|
@@ -2821,8 +2826,8 @@ function CurrencyInput({
|
|
|
2821
2826
|
className: cn(
|
|
2822
2827
|
"min-w-[9rem] rounded-md border border-rule bg-surface p-1",
|
|
2823
2828
|
"shadow-[var(--shadow-raised)]",
|
|
2824
|
-
"entering:animate-
|
|
2825
|
-
"exiting:animate-
|
|
2829
|
+
"entering:animate-enter-slide-down",
|
|
2830
|
+
"exiting:animate-exit-slide-up"
|
|
2826
2831
|
),
|
|
2827
2832
|
children: /* @__PURE__ */ jsx(ListBox, { className: "max-h-72 overflow-auto outline-none", children: currencyOptions.map((option) => /* @__PURE__ */ jsxs(
|
|
2828
2833
|
ListBoxItem,
|
|
@@ -4061,7 +4066,7 @@ function CalendarSurface() {
|
|
|
4061
4066
|
"data-[outside-month]:text-ink-4",
|
|
4062
4067
|
"data-[hovered]:bg-surface-2 data-[hovered]:text-ink",
|
|
4063
4068
|
"data-[focus-visible]:shadow-[var(--shadow-focus)]",
|
|
4064
|
-
"data-[selected]:bg-accent data-[selected]:text-
|
|
4069
|
+
"data-[selected]:bg-accent data-[selected]:text-tile-fg",
|
|
4065
4070
|
"data-[selected]:data-[hovered]:bg-accent-2",
|
|
4066
4071
|
"data-[disabled]:opacity-30 data-[disabled]:cursor-not-allowed",
|
|
4067
4072
|
"data-[unavailable]:line-through data-[unavailable]:text-ink-4"
|
|
@@ -4122,7 +4127,7 @@ function DatePicker({
|
|
|
4122
4127
|
"data-[placeholder]:text-ink-4",
|
|
4123
4128
|
"data-[type=literal]:text-ink-4",
|
|
4124
4129
|
// segment focus treatment: indigo fill, paper text
|
|
4125
|
-
"data-[focused]:bg-accent data-[focused]:text-
|
|
4130
|
+
"data-[focused]:bg-accent data-[focused]:text-tile-fg data-[focused]:rounded-[3px]",
|
|
4126
4131
|
"data-[disabled]:cursor-not-allowed"
|
|
4127
4132
|
)
|
|
4128
4133
|
}
|
|
@@ -4161,8 +4166,8 @@ function DatePicker({
|
|
|
4161
4166
|
"w-[var(--trigger-width)] min-w-[18rem] max-w-[500px]",
|
|
4162
4167
|
"rounded-md border border-rule bg-surface p-4",
|
|
4163
4168
|
"shadow-[var(--shadow-raised)]",
|
|
4164
|
-
"entering:animate-
|
|
4165
|
-
"exiting:animate-
|
|
4169
|
+
"entering:animate-enter-slide-down",
|
|
4170
|
+
"exiting:animate-exit-slide-up"
|
|
4166
4171
|
),
|
|
4167
4172
|
children: /* @__PURE__ */ jsx(Dialog, { className: "outline-none", children: /* @__PURE__ */ jsx(CalendarSurface, {}) })
|
|
4168
4173
|
}
|
|
@@ -4176,7 +4181,7 @@ var segmentStyles = cn(
|
|
|
4176
4181
|
"data-[placeholder]:text-ink-4",
|
|
4177
4182
|
"data-[type=literal]:text-ink-4",
|
|
4178
4183
|
// segment focus treatment: indigo fill, paper text
|
|
4179
|
-
"data-[focused]:bg-accent data-[focused]:text-
|
|
4184
|
+
"data-[focused]:bg-accent data-[focused]:text-tile-fg data-[focused]:rounded-[3px]",
|
|
4180
4185
|
"data-[disabled]:cursor-not-allowed"
|
|
4181
4186
|
);
|
|
4182
4187
|
function PopoverTimeField({
|
|
@@ -4303,8 +4308,8 @@ function DateTimePicker({
|
|
|
4303
4308
|
"w-[var(--trigger-width)] min-w-[18rem] max-w-[500px]",
|
|
4304
4309
|
"rounded-md border border-rule bg-surface p-4",
|
|
4305
4310
|
"shadow-[var(--shadow-raised)]",
|
|
4306
|
-
"entering:animate-
|
|
4307
|
-
"exiting:animate-
|
|
4311
|
+
"entering:animate-enter-slide-down",
|
|
4312
|
+
"exiting:animate-exit-slide-up"
|
|
4308
4313
|
),
|
|
4309
4314
|
children: /* @__PURE__ */ jsxs(Dialog, { className: "outline-none", children: [
|
|
4310
4315
|
/* @__PURE__ */ jsx(CalendarSurface, {}),
|
|
@@ -4538,8 +4543,8 @@ function MultiSelect({
|
|
|
4538
4543
|
// (defaultOpen) — no browser outline around the whole panel.
|
|
4539
4544
|
"outline-none rounded-md border border-rule bg-surface p-1",
|
|
4540
4545
|
"shadow-[var(--shadow-raised)]",
|
|
4541
|
-
"entering:animate-
|
|
4542
|
-
"exiting:animate-
|
|
4546
|
+
"entering:animate-enter-slide-down",
|
|
4547
|
+
"exiting:animate-exit-slide-up"
|
|
4543
4548
|
),
|
|
4544
4549
|
children: [
|
|
4545
4550
|
isSearchable ? /* @__PURE__ */ jsx("div", { className: "border-b border-rule-2 px-1 pb-1 mb-1", children: /* @__PURE__ */ jsx(
|
|
@@ -5576,8 +5581,8 @@ var imageLightboxStyles = tv({
|
|
|
5576
5581
|
"fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
5577
5582
|
// Deeper scrim than Modal's 40% — the image needs the page fully dimmed.
|
|
5578
5583
|
"bg-[color-mix(in_oklab,var(--color-ink)_72%,transparent)]",
|
|
5579
|
-
"entering:animate-
|
|
5580
|
-
"exiting:animate-
|
|
5584
|
+
"entering:animate-enter-fade",
|
|
5585
|
+
"exiting:animate-exit-fade"
|
|
5581
5586
|
]
|
|
5582
5587
|
});
|
|
5583
5588
|
function ImageLightbox({ isOpen, onOpenChange, src, name, onDownload }) {
|
|
@@ -5662,7 +5667,7 @@ function VideoView({ name, src }) {
|
|
|
5662
5667
|
/* @__PURE__ */ jsx("video", { controls: true, src, "aria-label": name, className: "h-full w-full object-contain" })
|
|
5663
5668
|
);
|
|
5664
5669
|
}
|
|
5665
|
-
var PdfView = lazy(() => import('./pdf-view-
|
|
5670
|
+
var PdfView = lazy(() => import('./pdf-view-RQ2OZYHJ.js'));
|
|
5666
5671
|
var fileViewerStyles = tv({
|
|
5667
5672
|
base: [
|
|
5668
5673
|
"relative flex w-full flex-col overflow-hidden",
|
|
@@ -5809,8 +5814,8 @@ function MenuPopover({ className, offset = 4, placement = "bottom start", ...pro
|
|
|
5809
5814
|
className: (renderProps) => cn(
|
|
5810
5815
|
"min-w-[200px] p-1 bg-surface border border-rule rounded-md",
|
|
5811
5816
|
"shadow-[var(--shadow-float)] outline-none z-[1200]",
|
|
5812
|
-
"entering:animate-
|
|
5813
|
-
"exiting:animate-
|
|
5817
|
+
"entering:animate-enter-zoom",
|
|
5818
|
+
"exiting:animate-exit-zoom",
|
|
5814
5819
|
typeof className === "function" ? className(renderProps) : className
|
|
5815
5820
|
)
|
|
5816
5821
|
}
|
|
@@ -6458,46 +6463,54 @@ var segmentedControlStyles = tv({
|
|
|
6458
6463
|
// stretching parent (e.g. a `flex flex-col` card body, whose default
|
|
6459
6464
|
// align-items:stretch would otherwise pull it to full width). Consumers
|
|
6460
6465
|
// can still opt into full width by passing `w-full` via className.
|
|
6461
|
-
group: "inline-flex w-fit
|
|
6466
|
+
group: "inline-flex w-fit gap-px p-0.5 rounded-chip bg-surface-2 border border-rule",
|
|
6462
6467
|
segment: [
|
|
6463
|
-
"inline-flex items-center justify-center cursor-pointer",
|
|
6464
|
-
"font-
|
|
6465
|
-
"transition-[background-color,color] duration-150",
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
+
"inline-flex items-center justify-center gap-1 cursor-pointer select-none",
|
|
6469
|
+
"font-sans font-medium tracking-[-0.005em] rounded-sm outline-none text-ink-3",
|
|
6470
|
+
"transition-[background-color,color,box-shadow] duration-150",
|
|
6471
|
+
// Unselected: hover/press tint into the track colour. `selected` is
|
|
6472
|
+
// declared after `hovered` in styles.css, so the pill wins over these.
|
|
6473
|
+
"hovered:text-ink hovered:bg-[color-mix(in_oklab,var(--color-ink)_6%,var(--color-surface-2))]",
|
|
6474
|
+
"pressed:bg-[color-mix(in_oklab,var(--color-ink)_10%,var(--color-surface-2))]",
|
|
6475
|
+
// Selected: lifted white pill, static.
|
|
6476
|
+
"selected:bg-surface selected:text-ink selected:shadow-[var(--shadow-rest)]",
|
|
6468
6477
|
"data-[focus-visible]:shadow-[var(--shadow-focus)]",
|
|
6478
|
+
"selected:data-[focus-visible]:shadow-[var(--shadow-focus),var(--shadow-rest)]",
|
|
6469
6479
|
"data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed"
|
|
6470
6480
|
]
|
|
6471
6481
|
},
|
|
6472
6482
|
variants: {
|
|
6473
6483
|
size: {
|
|
6474
|
-
sm: { segment: "px-2 py-0.5 text-[
|
|
6475
|
-
md: { segment: "px-2.5 py-1 text-[
|
|
6484
|
+
sm: { segment: "px-2 py-0.5 text-[11.5px] min-h-[22px]" },
|
|
6485
|
+
md: { segment: "px-2.5 py-1 text-[12.5px] min-h-[26px]" }
|
|
6476
6486
|
},
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6487
|
+
// Dense flow-wrapping register (designer inspector): the group becomes a
|
|
6488
|
+
// wrapping flex row and every segment grows to share the line.
|
|
6489
|
+
wrap: {
|
|
6490
|
+
true: { group: "flex flex-wrap w-auto", segment: "flex-1 min-w-7 px-1.5" },
|
|
6491
|
+
false: {}
|
|
6480
6492
|
}
|
|
6481
6493
|
},
|
|
6482
|
-
defaultVariants: { size: "sm",
|
|
6494
|
+
defaultVariants: { size: "sm", wrap: false }
|
|
6483
6495
|
});
|
|
6484
6496
|
function SegmentedControl({
|
|
6485
6497
|
options,
|
|
6486
6498
|
value,
|
|
6487
6499
|
onChange,
|
|
6488
6500
|
size,
|
|
6501
|
+
wrap = false,
|
|
6489
6502
|
autoFocus = false,
|
|
6490
6503
|
className,
|
|
6491
6504
|
orientation = "horizontal",
|
|
6492
6505
|
...props
|
|
6493
6506
|
}) {
|
|
6494
|
-
const styles4 = segmentedControlStyles({ size });
|
|
6507
|
+
const styles4 = segmentedControlStyles({ size, wrap });
|
|
6495
6508
|
return /* @__PURE__ */ jsx(
|
|
6496
6509
|
RadioGroup$1,
|
|
6497
6510
|
{
|
|
6498
6511
|
...props,
|
|
6499
6512
|
orientation,
|
|
6500
|
-
value: String(value),
|
|
6513
|
+
value: value === null ? null : String(value),
|
|
6501
6514
|
onChange: (next) => onChange(next),
|
|
6502
6515
|
className: cn(styles4.group(), className),
|
|
6503
6516
|
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -6505,6 +6518,7 @@ function SegmentedControl({
|
|
|
6505
6518
|
{
|
|
6506
6519
|
value: String(option.id),
|
|
6507
6520
|
...option.isDisabled ? { isDisabled: true } : {},
|
|
6521
|
+
...option["aria-label"] !== void 0 ? { "aria-label": option["aria-label"] } : {},
|
|
6508
6522
|
...autoFocus && option.id === value ? { autoFocus: true } : {},
|
|
6509
6523
|
className: styles4.segment(),
|
|
6510
6524
|
children: option.label
|
|
@@ -7269,8 +7283,8 @@ function NestedGroup({
|
|
|
7269
7283
|
{
|
|
7270
7284
|
"aria-label": "Group joiner",
|
|
7271
7285
|
options: [
|
|
7272
|
-
{ id: "and", label: "
|
|
7273
|
-
{ id: "or", label: "
|
|
7286
|
+
{ id: "and", label: "and" },
|
|
7287
|
+
{ id: "or", label: "or" }
|
|
7274
7288
|
],
|
|
7275
7289
|
value: group.logicalOperator,
|
|
7276
7290
|
onChange: (next) => onChange({ ...group, logicalOperator: next })
|
|
@@ -7506,8 +7520,8 @@ function RecordFilterBuilderPanel({
|
|
|
7506
7520
|
{
|
|
7507
7521
|
"aria-label": "Joiner",
|
|
7508
7522
|
options: [
|
|
7509
|
-
{ id: "and", label: "
|
|
7510
|
-
{ id: "or", label: "
|
|
7523
|
+
{ id: "and", label: "and" },
|
|
7524
|
+
{ id: "or", label: "or" }
|
|
7511
7525
|
],
|
|
7512
7526
|
value: filter.logicalOperator,
|
|
7513
7527
|
onChange: setJoiner2
|
|
@@ -7612,17 +7626,12 @@ function RecordFilterBuilderPanel({
|
|
|
7612
7626
|
),
|
|
7613
7627
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
7614
7628
|
onSaveView ? /* @__PURE__ */ jsxs(
|
|
7615
|
-
|
|
7629
|
+
Button,
|
|
7616
7630
|
{
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-sm",
|
|
7622
|
-
"font-sans text-[13px] text-ink-2 hover:bg-surface-2 hover:text-ink",
|
|
7623
|
-
"disabled:opacity-40 disabled:pointer-events-none",
|
|
7624
|
-
"outline-none cursor-pointer"
|
|
7625
|
-
),
|
|
7631
|
+
variant: "ghost",
|
|
7632
|
+
size: "sm",
|
|
7633
|
+
onPress: onSaveView,
|
|
7634
|
+
isDisabled: totalChildren === 0,
|
|
7626
7635
|
children: [
|
|
7627
7636
|
/* @__PURE__ */ jsxs(
|
|
7628
7637
|
"svg",
|
|
@@ -7645,19 +7654,7 @@ function RecordFilterBuilderPanel({
|
|
|
7645
7654
|
]
|
|
7646
7655
|
}
|
|
7647
7656
|
) : null,
|
|
7648
|
-
/* @__PURE__ */ jsx(
|
|
7649
|
-
"button",
|
|
7650
|
-
{
|
|
7651
|
-
type: "button",
|
|
7652
|
-
onClick: onClose,
|
|
7653
|
-
className: cn(
|
|
7654
|
-
"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-sm",
|
|
7655
|
-
"bg-ink text-surface font-mono text-[12px]",
|
|
7656
|
-
"hover:bg-accent-ink outline-none cursor-pointer"
|
|
7657
|
-
),
|
|
7658
|
-
children: "Done"
|
|
7659
|
-
}
|
|
7660
|
-
)
|
|
7657
|
+
/* @__PURE__ */ jsx(Button, { variant: "cta", size: "sm", onPress: onClose, children: "Done" })
|
|
7661
7658
|
] })
|
|
7662
7659
|
]
|
|
7663
7660
|
}
|
|
@@ -8164,19 +8161,7 @@ function ChipMiniEditor({
|
|
|
8164
8161
|
onChange: onChangeValue
|
|
8165
8162
|
}
|
|
8166
8163
|
) }),
|
|
8167
|
-
/* @__PURE__ */ jsx(
|
|
8168
|
-
"button",
|
|
8169
|
-
{
|
|
8170
|
-
type: "submit",
|
|
8171
|
-
className: cn(
|
|
8172
|
-
"shrink-0 inline-flex items-center px-2.5 py-1.5 rounded-md",
|
|
8173
|
-
"bg-ink text-surface font-mono text-[12px]",
|
|
8174
|
-
"hover:bg-accent-ink cursor-pointer outline-none",
|
|
8175
|
-
"focus-visible:shadow-[var(--shadow-focus)]"
|
|
8176
|
-
),
|
|
8177
|
-
children: "Save"
|
|
8178
|
-
}
|
|
8179
|
-
)
|
|
8164
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", variant: "cta", size: "sm", className: "shrink-0", children: "Save" })
|
|
8180
8165
|
]
|
|
8181
8166
|
}
|
|
8182
8167
|
);
|
|
@@ -8467,7 +8452,7 @@ function TimeField({
|
|
|
8467
8452
|
"data-[placeholder]:text-ink-4",
|
|
8468
8453
|
"data-[type=literal]:text-ink-4",
|
|
8469
8454
|
// segment focus treatment: indigo fill, paper text
|
|
8470
|
-
"data-[focused]:bg-accent data-[focused]:text-
|
|
8455
|
+
"data-[focused]:bg-accent data-[focused]:text-tile-fg data-[focused]:rounded-[3px]",
|
|
8471
8456
|
"data-[disabled]:cursor-not-allowed"
|
|
8472
8457
|
)
|
|
8473
8458
|
}
|
|
@@ -8490,8 +8475,8 @@ var toastStyles = tv({
|
|
|
8490
8475
|
"rounded-lg border border-rule bg-surface shadow-float",
|
|
8491
8476
|
"px-3.5 py-3 outline-none",
|
|
8492
8477
|
"focus-visible:shadow-focus",
|
|
8493
|
-
"entering:animate-
|
|
8494
|
-
"exiting:animate-
|
|
8478
|
+
"entering:animate-enter-slide-up",
|
|
8479
|
+
"exiting:animate-exit-fade"
|
|
8495
8480
|
],
|
|
8496
8481
|
icon: "size-4 shrink-0 mt-0.5",
|
|
8497
8482
|
title: "font-sans text-[13px] font-medium leading-[1.4] text-ink",
|