@boyernick/standard-ui-react 0.1.1-canary.9 → 0.2.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/package.json +5 -3
- package/src/accordion.tsx +5 -2
- package/src/alert-dialog.tsx +1 -1
- package/src/attachment.tsx +5 -2
- package/src/autocomplete.tsx +4 -3
- package/src/block-editor.tsx +1747 -0
- package/src/brand.tsx +2 -2
- package/src/breadcrumb.tsx +14 -7
- package/src/button.tsx +22 -11
- package/src/calendar.tsx +6 -3
- package/src/carousel.tsx +220 -53
- package/src/checkbox.tsx +3 -2
- package/src/code-block.tsx +66 -5
- package/src/collapsible.tsx +4 -2
- package/src/combobox.tsx +4 -3
- package/src/command.tsx +27 -12
- package/src/dialog.tsx +33 -10
- package/src/empty.tsx +4 -4
- package/src/field.tsx +4 -3
- package/src/filter-group.tsx +143 -0
- package/src/icons.tsx +28 -1
- package/src/illustrations.tsx +219 -141
- package/src/index.ts +238 -18
- package/src/input.tsx +8 -5
- package/src/kbd.tsx +10 -4
- package/src/lib/focus.ts +41 -0
- package/src/lib/popup.ts +1 -1
- package/src/lifeline/company-icon.tsx +71 -0
- package/src/lifeline/index.ts +42 -0
- package/src/lifeline/lifeline-data.ts +97 -0
- package/src/lifeline/lifeline-desktop.tsx +204 -0
- package/src/lifeline/lifeline-event.tsx +108 -0
- package/src/lifeline/lifeline-fireworks.tsx +302 -0
- package/src/lifeline/lifeline-hover-image.tsx +269 -0
- package/src/lifeline/lifeline-icons.tsx +39 -0
- package/src/lifeline/lifeline-intro-timing.ts +105 -0
- package/src/lifeline/lifeline-labels.tsx +24 -0
- package/src/lifeline/lifeline-layout.ts +1 -0
- package/src/lifeline/lifeline-legend.tsx +31 -0
- package/src/lifeline/lifeline-lightbox.tsx +309 -0
- package/src/lifeline/lifeline-marker.tsx +183 -0
- package/src/lifeline/lifeline-people.tsx +99 -0
- package/src/lifeline/lifeline-photos.tsx +366 -0
- package/src/lifeline/lifeline-shell.tsx +135 -0
- package/src/lifeline/lifeline-utils.ts +83 -0
- package/src/lifeline/lifeline-vertical.tsx +482 -0
- package/src/lifeline/lifeline.tsx +69 -0
- package/src/lifeline/types.ts +112 -0
- package/src/lifeline/use-lifeline-intro.ts +130 -0
- package/src/lifeline/use-lifeline-scroll.ts +1011 -0
- package/src/lifeline/use-lifeline-vertical-scroll.ts +271 -0
- package/src/menubar.tsx +9 -2
- package/src/minimap.tsx +296 -0
- package/src/modal.tsx +608 -0
- package/src/navigation-menu.tsx +338 -67
- package/src/number-field.tsx +336 -61
- package/src/otp-field.tsx +4 -3
- package/src/pagination.tsx +262 -42
- package/src/password-protection.tsx +345 -0
- package/src/popover.tsx +1 -1
- package/src/progress.tsx +5 -0
- package/src/questionnaire.tsx +284 -0
- package/src/radio.tsx +4 -2
- package/src/scroll-area.tsx +4 -1
- package/src/select.tsx +5 -2
- package/src/sidebar.tsx +113 -28
- package/src/slider.tsx +66 -6
- package/src/sounds.tsx +6 -10
- package/src/spinner.tsx +105 -32
- package/src/switch.tsx +4 -1
- package/src/table.tsx +82 -15
- package/src/tabs.tsx +189 -38
- package/src/text-animate.tsx +71 -28
- package/src/textarea.tsx +6 -1
- package/src/timeline.tsx +378 -0
- package/src/toast.tsx +214 -35
- package/src/toggle.tsx +4 -2
- package/src/toolbar.tsx +12 -7
- package/src/tooltip.tsx +43 -3
- package/src/video-player.tsx +396 -127
- package/src/image-modal.tsx +0 -110
- package/src/markdown-editor.tsx +0 -302
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boyernick/standard-ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "React components for StandardUI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
"test": "node --test --experimental-strip-types \"src/**/*.test.ts\""
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"react": "^
|
|
25
|
-
"react-dom": "^
|
|
24
|
+
"react": "^19.0.0",
|
|
25
|
+
"react-dom": "^19.0.0"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@base-ui/react": "^1.7.0",
|
|
29
|
+
"@central-icons-react/round-filled-radius-2-stroke-2": "^1.1.315",
|
|
29
30
|
"@central-icons-react/round-outlined-radius-2-stroke-2": "^1.1.312",
|
|
31
|
+
"@shadcn/react": "^0.3.0",
|
|
30
32
|
"class-variance-authority": "^0.7.1",
|
|
31
33
|
"clsx": "^2.1.1",
|
|
32
34
|
"date-fns": "^4.4.0",
|
package/src/accordion.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Accordion as BaseAccordion } from "@base-ui/react/accordion"
|
|
|
4
4
|
import type { ComponentProps } from "react"
|
|
5
5
|
import { IconChevronBottom } from "./icons"
|
|
6
6
|
import { cn } from "./lib/cn"
|
|
7
|
+
import { focusRing, focusRingBorder } from "./lib/focus"
|
|
7
8
|
import { motion } from "./lib/motion"
|
|
8
9
|
|
|
9
10
|
export type AccordionProps = ComponentProps<typeof BaseAccordion.Root>
|
|
@@ -46,9 +47,11 @@ export const AccordionTrigger = ({
|
|
|
46
47
|
}: AccordionTriggerProps) => (
|
|
47
48
|
<BaseAccordion.Trigger
|
|
48
49
|
className={cn(
|
|
49
|
-
"group flex w-full cursor-pointer items-center justify-between gap-3 px-4 py-3.5 text-left text-sm text-fg-primary
|
|
50
|
+
"group flex w-full cursor-pointer items-center justify-between gap-3 px-4 py-3.5 text-left text-sm text-fg-primary",
|
|
51
|
+
focusRingBorder,
|
|
50
52
|
motion.colors,
|
|
51
|
-
|
|
53
|
+
focusRing,
|
|
54
|
+
"hover:bg-background-tertiary focus-visible:relative focus-visible:z-10 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
52
55
|
className,
|
|
53
56
|
)}
|
|
54
57
|
{...props}
|
package/src/alert-dialog.tsx
CHANGED
|
@@ -58,7 +58,7 @@ export const AlertDialogPopup = ({
|
|
|
58
58
|
}: AlertDialogPopupProps) => (
|
|
59
59
|
<BaseAlertDialog.Popup
|
|
60
60
|
className={cn(
|
|
61
|
-
"fixed top-1/2 left-1/2 z-50 flex w-full max-w-md -translate-x-1/2 -translate-y-1/2 flex-col gap-6 rounded-xl border border-border-primary bg-surface p-5 shadow-md outline-none max-sm:max-w-[calc(100vw-2rem)]",
|
|
61
|
+
"fixed top-1/2 left-1/2 z-50 flex w-full max-w-md -translate-x-1/2 -translate-y-1/2 flex-col gap-6 rounded-xl border border-border-primary bg-surface p-5 shadow-md outline-none max-h-[calc(100dvh-2rem)] overflow-y-auto max-sm:max-w-[calc(100vw-2rem)]",
|
|
62
62
|
motion.popupCenter,
|
|
63
63
|
className,
|
|
64
64
|
)}
|
package/src/attachment.tsx
CHANGED
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
} from "react";
|
|
9
9
|
import { IconCrossSmall } from "./icons";
|
|
10
10
|
import { cn } from "./lib/cn";
|
|
11
|
+
import { focusRing, focusRingWithin } from "./lib/focus";
|
|
11
12
|
import { motion } from "./lib/motion";
|
|
12
13
|
|
|
13
14
|
export type AttachmentProps = Omit<ComponentProps<"label">, "onDrop"> & {
|
|
@@ -53,7 +54,8 @@ export const Attachment = ({
|
|
|
53
54
|
<label
|
|
54
55
|
data-disabled={disabled || undefined}
|
|
55
56
|
className={cn(
|
|
56
|
-
"flex min-h-32 cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border-primary bg-surface p-6 text-center text-sm text-fg-secondary
|
|
57
|
+
"flex min-h-32 cursor-pointer flex-col items-center justify-center gap-2 rounded-xl border border-dashed border-border-primary bg-surface p-6 text-center text-sm text-fg-secondary hover:bg-background-secondary data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
58
|
+
focusRingWithin,
|
|
57
59
|
motion.colors,
|
|
58
60
|
className,
|
|
59
61
|
)}
|
|
@@ -127,7 +129,8 @@ export const AttachmentRemove = ({
|
|
|
127
129
|
type={type}
|
|
128
130
|
aria-label="Remove attachment"
|
|
129
131
|
className={cn(
|
|
130
|
-
"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent text-fg-tertiary
|
|
132
|
+
"flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-md border border-transparent text-fg-tertiary hover:bg-background-tertiary hover:text-fg-primary disabled:cursor-not-allowed disabled:opacity-50",
|
|
133
|
+
focusRing,
|
|
131
134
|
motion.colors,
|
|
132
135
|
className,
|
|
133
136
|
)}
|
package/src/autocomplete.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { Autocomplete as BaseAutocomplete } from "@base-ui/react/autocomplete"
|
|
|
4
4
|
import type { ComponentProps, ReactElement } from "react"
|
|
5
5
|
import { IconChevronDownSmall, IconCrossSmall } from "./icons"
|
|
6
6
|
import { cn } from "./lib/cn"
|
|
7
|
+
import { focusRingWithin, focusRingInvalidWithin } from "./lib/focus"
|
|
7
8
|
import { motion } from "./lib/motion"
|
|
8
9
|
import { popupInset, popupItem, popupLabel, popupMessage, popupSurface } from "./lib/popup"
|
|
9
10
|
|
|
@@ -67,9 +68,9 @@ export const AutocompleteInputGroup = ({
|
|
|
67
68
|
}: AutocompleteInputGroupProps) => (
|
|
68
69
|
<BaseAutocomplete.InputGroup
|
|
69
70
|
className={cn(
|
|
70
|
-
"relative flex min-h-9 w-full items-center rounded-xl border border-border-secondary bg-surface inset-shadow-outline-top
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
"relative flex min-h-9 w-full items-center rounded-xl border border-border-secondary bg-surface inset-shadow-outline-top transition-[color,box-shadow]",
|
|
72
|
+
focusRingWithin,
|
|
73
|
+
focusRingInvalidWithin,
|
|
73
74
|
"has-[[aria-invalid=true]]:border-destructive has-[[aria-invalid=true]]:focus-within:border-destructive has-[[aria-invalid=true]]:focus-within:ring-destructive/20",
|
|
74
75
|
"has-[:disabled]:opacity-50",
|
|
75
76
|
className,
|