@engineio/ui 0.4.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/LICENSE +21 -0
- package/README.md +274 -0
- package/dist/components/brand/engine-icon.svelte +75 -0
- package/dist/components/brand/engine-icon.svelte.d.ts +25 -0
- package/dist/components/brand/engine-wordmark.svelte +104 -0
- package/dist/components/brand/engine-wordmark.svelte.d.ts +16 -0
- package/dist/components/brand/index.d.ts +3 -0
- package/dist/components/brand/index.js +3 -0
- package/dist/components/ui/alert/alert-description.svelte +22 -0
- package/dist/components/ui/alert/alert-description.svelte.d.ts +5 -0
- package/dist/components/ui/alert/alert-title.svelte +31 -0
- package/dist/components/ui/alert/alert-title.svelte.d.ts +8 -0
- package/dist/components/ui/alert/alert.svelte +114 -0
- package/dist/components/ui/alert/alert.svelte.d.ts +70 -0
- package/dist/components/ui/alert/index.d.ts +5 -0
- package/dist/components/ui/alert/index.js +7 -0
- package/dist/components/ui/badge/badge.svelte +96 -0
- package/dist/components/ui/badge/badge.svelte.d.ts +88 -0
- package/dist/components/ui/badge/index.d.ts +2 -0
- package/dist/components/ui/badge/index.js +2 -0
- package/dist/components/ui/button/button.svelte +137 -0
- package/dist/components/ui/button/button.svelte.d.ts +154 -0
- package/dist/components/ui/button/index.d.ts +2 -0
- package/dist/components/ui/button/index.js +4 -0
- package/dist/components/ui/card/card-content.svelte +16 -0
- package/dist/components/ui/card/card-content.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-description.svelte +20 -0
- package/dist/components/ui/card/card-description.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-footer.svelte +20 -0
- package/dist/components/ui/card/card-footer.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-header.svelte +20 -0
- package/dist/components/ui/card/card-header.svelte.d.ts +5 -0
- package/dist/components/ui/card/card-title.svelte +25 -0
- package/dist/components/ui/card/card-title.svelte.d.ts +8 -0
- package/dist/components/ui/card/card.svelte +23 -0
- package/dist/components/ui/card/card.svelte.d.ts +5 -0
- package/dist/components/ui/card/index.d.ts +7 -0
- package/dist/components/ui/card/index.js +9 -0
- package/dist/components/ui/checkbox/checkbox.svelte +38 -0
- package/dist/components/ui/checkbox/checkbox.svelte.d.ts +4 -0
- package/dist/components/ui/checkbox/index.d.ts +2 -0
- package/dist/components/ui/checkbox/index.js +4 -0
- package/dist/components/ui/dialog/dialog-content.svelte +41 -0
- package/dist/components/ui/dialog/dialog-content.svelte.d.ts +9 -0
- package/dist/components/ui/dialog/dialog-description.svelte +16 -0
- package/dist/components/ui/dialog/dialog-description.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-footer.svelte +23 -0
- package/dist/components/ui/dialog/dialog-footer.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-header.svelte +20 -0
- package/dist/components/ui/dialog/dialog-header.svelte.d.ts +5 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte +19 -0
- package/dist/components/ui/dialog/dialog-overlay.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/dialog-title.svelte +16 -0
- package/dist/components/ui/dialog/dialog-title.svelte.d.ts +4 -0
- package/dist/components/ui/dialog/index.d.ts +12 -0
- package/dist/components/ui/dialog/index.js +14 -0
- package/dist/components/ui/input/index.d.ts +2 -0
- package/dist/components/ui/input/index.js +4 -0
- package/dist/components/ui/input/input.svelte +52 -0
- package/dist/components/ui/input/input.svelte.d.ts +13 -0
- package/dist/components/ui/label/index.d.ts +2 -0
- package/dist/components/ui/label/index.js +4 -0
- package/dist/components/ui/label/label.svelte +19 -0
- package/dist/components/ui/label/label.svelte.d.ts +4 -0
- package/dist/components/ui/popover/index.d.ts +6 -0
- package/dist/components/ui/popover/index.js +8 -0
- package/dist/components/ui/popover/popover-content.svelte +28 -0
- package/dist/components/ui/popover/popover-content.svelte.d.ts +7 -0
- package/dist/components/ui/progress/index.d.ts +2 -0
- package/dist/components/ui/progress/index.js +4 -0
- package/dist/components/ui/progress/progress.svelte +25 -0
- package/dist/components/ui/progress/progress.svelte.d.ts +4 -0
- package/dist/components/ui/radio-group/index.d.ts +3 -0
- package/dist/components/ui/radio-group/index.js +5 -0
- package/dist/components/ui/radio-group/radio-group-item.svelte +28 -0
- package/dist/components/ui/radio-group/radio-group-item.svelte.d.ts +4 -0
- package/dist/components/ui/radio-group/radio-group.svelte +13 -0
- package/dist/components/ui/radio-group/radio-group.svelte.d.ts +4 -0
- package/dist/components/ui/select/index.d.ts +11 -0
- package/dist/components/ui/select/index.js +13 -0
- package/dist/components/ui/select/select-content.svelte +39 -0
- package/dist/components/ui/select/select-content.svelte.d.ts +7 -0
- package/dist/components/ui/select/select-group-heading.svelte +16 -0
- package/dist/components/ui/select/select-group-heading.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-item.svelte +37 -0
- package/dist/components/ui/select/select-item.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-down-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte +19 -0
- package/dist/components/ui/select/select-scroll-up-button.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-separator.svelte +13 -0
- package/dist/components/ui/select/select-separator.svelte.d.ts +4 -0
- package/dist/components/ui/select/select-trigger.svelte +24 -0
- package/dist/components/ui/select/select-trigger.svelte.d.ts +4 -0
- package/dist/components/ui/separator/index.d.ts +2 -0
- package/dist/components/ui/separator/index.js +4 -0
- package/dist/components/ui/separator/separator.svelte +22 -0
- package/dist/components/ui/separator/separator.svelte.d.ts +4 -0
- package/dist/components/ui/skeleton/index.d.ts +2 -0
- package/dist/components/ui/skeleton/index.js +4 -0
- package/dist/components/ui/skeleton/skeleton.svelte +17 -0
- package/dist/components/ui/skeleton/skeleton.svelte.d.ts +5 -0
- package/dist/components/ui/switch/index.d.ts +2 -0
- package/dist/components/ui/switch/index.js +4 -0
- package/dist/components/ui/switch/switch.svelte +27 -0
- package/dist/components/ui/switch/switch.svelte.d.ts +4 -0
- package/dist/components/ui/table/index.d.ts +9 -0
- package/dist/components/ui/table/index.js +11 -0
- package/dist/components/ui/table/table-body.svelte +22 -0
- package/dist/components/ui/table/table-body.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-caption.svelte +21 -0
- package/dist/components/ui/table/table-caption.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-cell.svelte +33 -0
- package/dist/components/ui/table/table-cell.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-footer.svelte +29 -0
- package/dist/components/ui/table/table-footer.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-head.svelte +36 -0
- package/dist/components/ui/table/table-head.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-header.svelte +23 -0
- package/dist/components/ui/table/table-header.svelte.d.ts +5 -0
- package/dist/components/ui/table/table-row.svelte +32 -0
- package/dist/components/ui/table/table-row.svelte.d.ts +5 -0
- package/dist/components/ui/table/table.svelte +36 -0
- package/dist/components/ui/table/table.svelte.d.ts +5 -0
- package/dist/components/ui/tabs/index.d.ts +6 -0
- package/dist/components/ui/tabs/index.js +8 -0
- package/dist/components/ui/tabs/tabs-content.svelte +19 -0
- package/dist/components/ui/tabs/tabs-content.svelte.d.ts +4 -0
- package/dist/components/ui/tabs/tabs-list.svelte +27 -0
- package/dist/components/ui/tabs/tabs-list.svelte.d.ts +7 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte +29 -0
- package/dist/components/ui/tabs/tabs-trigger.svelte.d.ts +7 -0
- package/dist/components/ui/textarea/index.d.ts +2 -0
- package/dist/components/ui/textarea/index.js +4 -0
- package/dist/components/ui/textarea/textarea.svelte +22 -0
- package/dist/components/ui/textarea/textarea.svelte.d.ts +5 -0
- package/dist/components/ui/tooltip/index.d.ts +6 -0
- package/dist/components/ui/tooltip/index.js +8 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte +21 -0
- package/dist/components/ui/tooltip/tooltip-content.svelte.d.ts +4 -0
- package/dist/fonts/ProximaNova-ExtraCondensedThin.otf +0 -0
- package/dist/fonts/ProximaNovaBlack.otf +0 -0
- package/dist/fonts/ProximaNovaBold.otf +0 -0
- package/dist/fonts/ProximaNovaCondensedBlack.otf +0 -0
- package/dist/fonts/ProximaNovaExtraCondensedBlack.otf +0 -0
- package/dist/fonts/ProximaNovaRegular.otf +0 -0
- package/dist/fonts/ProximaNovaSemibold.otf +0 -0
- package/dist/index.d.ts +45 -0
- package/dist/index.js +44 -0
- package/dist/styles/fonts.css +116 -0
- package/dist/styles/index.css +28 -0
- package/dist/styles/tokens.css +221 -0
- package/dist/styles/utilities.css +129 -0
- package/dist/utils.d.ts +18 -0
- package/dist/utils.js +22 -0
- package/package.json +92 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const TableFooter: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableFooter = ReturnType<typeof TableFooter>;
|
|
5
|
+
export default TableFooter;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLThAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// Column headings are Bold 13px in Pure White, Title Case, tracking normal.
|
|
7
|
+
//
|
|
8
|
+
// NOT the system's 11px uppercase label spec, which is what these carried
|
|
9
|
+
// until now. Two reasons: at 11px with +0.08em on a dense grid the headings
|
|
10
|
+
// read as decoration rather than as the column names, and the brand reserves
|
|
11
|
+
// UPPERCASE for "small structural labels" — permission, not instruction.
|
|
12
|
+
// Title Case is the brand's default everywhere else, and a heading set in
|
|
13
|
+
// white Bold is unambiguous about which column it names.
|
|
14
|
+
//
|
|
15
|
+
// Left-aligned by default. Numeric columns should pass `class="text-right"`
|
|
16
|
+
// and set the cells to match, so figures align on their digits.
|
|
17
|
+
let {
|
|
18
|
+
ref = $bindable(null),
|
|
19
|
+
class: className,
|
|
20
|
+
children,
|
|
21
|
+
...restProps
|
|
22
|
+
}: WithElementRef<HTMLThAttributes> = $props()
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<th
|
|
26
|
+
bind:this={ref}
|
|
27
|
+
class={cn(
|
|
28
|
+
"h-11 px-4 text-left align-middle whitespace-nowrap",
|
|
29
|
+
"text-[13px] font-bold text-foreground",
|
|
30
|
+
"[&:has([role=checkbox])]:pr-0",
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
{...restProps}
|
|
34
|
+
>
|
|
35
|
+
{@render children?.()}
|
|
36
|
+
</th>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLThAttributes } from "svelte/elements";
|
|
3
|
+
declare const TableHead: import("svelte").Component<WithElementRef<HTMLThAttributes>, {}, "ref">;
|
|
4
|
+
type TableHead = ReturnType<typeof TableHead>;
|
|
5
|
+
export default TableHead;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// Transparent, separated from the body by a rule one step stronger than the
|
|
7
|
+
// row dividers. That single difference in weight is what makes the header
|
|
8
|
+
// read as a header without needing a fill.
|
|
9
|
+
let {
|
|
10
|
+
ref = $bindable(null),
|
|
11
|
+
class: className,
|
|
12
|
+
children,
|
|
13
|
+
...restProps
|
|
14
|
+
}: WithElementRef<HTMLAttributes<HTMLTableSectionElement>> = $props()
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<thead
|
|
18
|
+
bind:this={ref}
|
|
19
|
+
class={cn("[&_tr]:border-b [&_tr]:border-grey-600", className)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
>
|
|
22
|
+
{@render children?.()}
|
|
23
|
+
</thead>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const TableHeader: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableSectionElement>>, {}, "ref">;
|
|
4
|
+
type TableHeader = ReturnType<typeof TableHeader>;
|
|
5
|
+
export default TableHeader;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// A hairline underneath and nothing else. The row paints its own hover and
|
|
7
|
+
// selection now that the cells are transparent — no `group/row` plumbing
|
|
8
|
+
// needed, because the background it sets is the background you see.
|
|
9
|
+
//
|
|
10
|
+
// Hover is the system's 6% white wash; selection is the magenta tint, which
|
|
11
|
+
// is the one place the accent earns a place in a dense grid. Neither takes a
|
|
12
|
+
// coloured border: the brand rules those out, edge accents included.
|
|
13
|
+
let {
|
|
14
|
+
ref = $bindable(null),
|
|
15
|
+
class: className,
|
|
16
|
+
children,
|
|
17
|
+
...restProps
|
|
18
|
+
}: WithElementRef<HTMLAttributes<HTMLTableRowElement>> = $props()
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<tr
|
|
22
|
+
bind:this={ref}
|
|
23
|
+
class={cn(
|
|
24
|
+
"border-b border-border transition-colors duration-140 ease-brand",
|
|
25
|
+
"hover:bg-white/6",
|
|
26
|
+
"data-[state=selected]:bg-primary-tint-12",
|
|
27
|
+
className,
|
|
28
|
+
)}
|
|
29
|
+
{...restProps}
|
|
30
|
+
>
|
|
31
|
+
{@render children?.()}
|
|
32
|
+
</tr>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
3
|
+
declare const TableRow: import("svelte").Component<WithElementRef<HTMLAttributes<HTMLTableRowElement>>, {}, "ref">;
|
|
4
|
+
type TableRow = ReturnType<typeof TableRow>;
|
|
5
|
+
export default TableRow;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef } from "../../../utils.js"
|
|
3
|
+
import { cn } from "../../../utils.js"
|
|
4
|
+
import type { HTMLTableAttributes } from "svelte/elements"
|
|
5
|
+
|
|
6
|
+
// A ruled table: no frame, no fills, no gaps. The surface behind it shows
|
|
7
|
+
// through and the only structure is a hairline under each row — which is the
|
|
8
|
+
// system's rule that depth comes from rules and nested panels, with the
|
|
9
|
+
// rules doing all of the work.
|
|
10
|
+
//
|
|
11
|
+
// `border-collapse: collapse` (Tailwind's `border-collapse`) is deliberate
|
|
12
|
+
// and is what makes the dividers meet cleanly: under `separate` each cell
|
|
13
|
+
// paints its own bottom edge and adjacent cells double them up. It also
|
|
14
|
+
// restores the sticky-header technique, which the gapped-tile treatment this
|
|
15
|
+
// replaces had ruled out.
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
ref = $bindable(null),
|
|
19
|
+
class: className,
|
|
20
|
+
children,
|
|
21
|
+
...restProps
|
|
22
|
+
}: WithElementRef<HTMLTableAttributes> = $props()
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<div class="relative w-full overflow-x-auto">
|
|
26
|
+
<table
|
|
27
|
+
bind:this={ref}
|
|
28
|
+
class={cn(
|
|
29
|
+
"w-full caption-bottom border-collapse text-[13px]",
|
|
30
|
+
className,
|
|
31
|
+
)}
|
|
32
|
+
{...restProps}
|
|
33
|
+
>
|
|
34
|
+
{@render children?.()}
|
|
35
|
+
</table>
|
|
36
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "../../../utils.js";
|
|
2
|
+
import type { HTMLTableAttributes } from "svelte/elements";
|
|
3
|
+
declare const Table: import("svelte").Component<WithElementRef<HTMLTableAttributes>, {}, "ref">;
|
|
4
|
+
type Table = ReturnType<typeof Table>;
|
|
5
|
+
export default Table;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
|
+
import Content from "./tabs-content.svelte";
|
|
3
|
+
import List from "./tabs-list.svelte";
|
|
4
|
+
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
+
declare const Root: import("svelte").Component<TabsPrimitive.RootProps, {}, "ref" | "value">;
|
|
6
|
+
export { Root, Content, List, Trigger, Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
|
+
import Content from "./tabs-content.svelte";
|
|
3
|
+
import List from "./tabs-list.svelte";
|
|
4
|
+
import Trigger from "./tabs-trigger.svelte";
|
|
5
|
+
const Root = TabsPrimitive.Root;
|
|
6
|
+
export { Root, Content, List, Trigger,
|
|
7
|
+
//
|
|
8
|
+
Root as Tabs, Content as TabsContent, List as TabsList, Trigger as TabsTrigger, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
...restProps
|
|
9
|
+
}: TabsPrimitive.ContentProps = $props();
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<TabsPrimitive.Content
|
|
13
|
+
bind:ref
|
|
14
|
+
class={cn(
|
|
15
|
+
"ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
16
|
+
className
|
|
17
|
+
)}
|
|
18
|
+
{...restProps}
|
|
19
|
+
/>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
// The system ships tabs in two flavours. `pill` is the default because it
|
|
6
|
+
// is what every existing call site already renders; `underline` is the
|
|
7
|
+
// section-level treatment, a hairline rule with a magenta marker under the
|
|
8
|
+
// active tab. Set the same variant on TabsTrigger.
|
|
9
|
+
let {
|
|
10
|
+
ref = $bindable(null),
|
|
11
|
+
class: className,
|
|
12
|
+
variant = "pill",
|
|
13
|
+
...restProps
|
|
14
|
+
}: TabsPrimitive.ListProps & { variant?: "pill" | "underline" } = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<TabsPrimitive.List
|
|
18
|
+
bind:ref
|
|
19
|
+
class={cn(
|
|
20
|
+
"inline-flex items-center text-grey-300",
|
|
21
|
+
variant === "pill"
|
|
22
|
+
? "h-10 justify-center rounded-control bg-grey-850 p-1"
|
|
23
|
+
: "h-auto w-full justify-start gap-7 border-b border-grey-700",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...restProps}
|
|
27
|
+
/>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
|
+
type $$ComponentProps = TabsPrimitive.ListProps & {
|
|
3
|
+
variant?: "pill" | "underline";
|
|
4
|
+
};
|
|
5
|
+
declare const TabsList: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type TabsList = ReturnType<typeof TabsList>;
|
|
7
|
+
export default TabsList;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
// Must match the variant set on the enclosing TabsList.
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
class: className,
|
|
9
|
+
variant = "pill",
|
|
10
|
+
...restProps
|
|
11
|
+
}: TabsPrimitive.TriggerProps & { variant?: "pill" | "underline" } = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<TabsPrimitive.Trigger
|
|
15
|
+
bind:ref
|
|
16
|
+
class={cn(
|
|
17
|
+
"inline-flex cursor-pointer items-center justify-center whitespace-nowrap font-semibold",
|
|
18
|
+
"transition-colors duration-140 ease-brand",
|
|
19
|
+
"focus-visible:ring-ring focus-visible:ring-offset-background focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",
|
|
20
|
+
"disabled:pointer-events-none disabled:opacity-38",
|
|
21
|
+
variant === "pill"
|
|
22
|
+
? "rounded-control px-4 py-1.5 text-[13px] hover:text-foreground data-[state=active]:bg-white data-[state=active]:text-background"
|
|
23
|
+
: // The marker is a bottom border on the trigger itself, so it sits on
|
|
24
|
+
// the list's hairline rather than floating above it.
|
|
25
|
+
"-mb-px border-b-2 border-transparent px-0 pb-2.5 text-[15px] hover:text-foreground data-[state=active]:border-primary data-[state=active]:text-foreground",
|
|
26
|
+
className
|
|
27
|
+
)}
|
|
28
|
+
{...restProps}
|
|
29
|
+
/>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "bits-ui";
|
|
2
|
+
type $$ComponentProps = TabsPrimitive.TriggerProps & {
|
|
3
|
+
variant?: "pill" | "underline";
|
|
4
|
+
};
|
|
5
|
+
declare const TabsTrigger: import("svelte").Component<$$ComponentProps, {}, "ref">;
|
|
6
|
+
type TabsTrigger = ReturnType<typeof TabsTrigger>;
|
|
7
|
+
export default TabsTrigger;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { WithElementRef, WithoutChildren } from "bits-ui";
|
|
3
|
+
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
4
|
+
import { cn } from "../../../utils.js";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
ref = $bindable(null),
|
|
8
|
+
value = $bindable(),
|
|
9
|
+
class: className,
|
|
10
|
+
...restProps
|
|
11
|
+
}: WithoutChildren<WithElementRef<HTMLTextareaAttributes>> = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<textarea
|
|
15
|
+
bind:this={ref}
|
|
16
|
+
class={cn(
|
|
17
|
+
"field flex min-h-20 w-full px-3 py-2 text-[15px]",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
bind:value
|
|
21
|
+
{...restProps}
|
|
22
|
+
></textarea>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { WithElementRef } from "bits-ui";
|
|
2
|
+
import type { HTMLTextareaAttributes } from "svelte/elements";
|
|
3
|
+
declare const Textarea: import("svelte").Component<Omit<WithElementRef<HTMLTextareaAttributes>, "children">, {}, "ref" | "value">;
|
|
4
|
+
type Textarea = ReturnType<typeof Textarea>;
|
|
5
|
+
export default Textarea;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "bits-ui";
|
|
2
|
+
import Content from "./tooltip-content.svelte";
|
|
3
|
+
declare const Root: import("svelte").Component<TooltipPrimitive.RootProps, {}, "open">;
|
|
4
|
+
declare const Trigger: import("svelte").Component<TooltipPrimitive.TriggerProps, {}, "ref">;
|
|
5
|
+
declare const Provider: import("svelte").Component<TooltipPrimitive.ProviderProps, {}, "">;
|
|
6
|
+
export { Root, Trigger, Content, Provider, Root as Tooltip, Content as TooltipContent, Trigger as TooltipTrigger, Provider as TooltipProvider, };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "bits-ui";
|
|
2
|
+
import Content from "./tooltip-content.svelte";
|
|
3
|
+
const Root = TooltipPrimitive.Root;
|
|
4
|
+
const Trigger = TooltipPrimitive.Trigger;
|
|
5
|
+
const Provider = TooltipPrimitive.Provider;
|
|
6
|
+
export { Root, Trigger, Content, Provider,
|
|
7
|
+
//
|
|
8
|
+
Root as Tooltip, Content as TooltipContent, Trigger as TooltipTrigger, Provider as TooltipProvider, };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from "bits-ui";
|
|
3
|
+
import { cn } from "../../../utils.js";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
ref = $bindable(null),
|
|
7
|
+
class: className,
|
|
8
|
+
sideOffset = 4,
|
|
9
|
+
...restProps
|
|
10
|
+
}: TooltipPrimitive.ContentProps = $props();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<TooltipPrimitive.Content
|
|
14
|
+
bind:ref
|
|
15
|
+
{sideOffset}
|
|
16
|
+
class={cn(
|
|
17
|
+
"bg-grey-800 text-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 overflow-hidden rounded-field border border-grey-700 px-3 py-1.5 text-[13px] font-semibold shadow-panel",
|
|
18
|
+
className
|
|
19
|
+
)}
|
|
20
|
+
{...restProps}
|
|
21
|
+
/>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @engineio/ui — the Engine design system.
|
|
3
|
+
*
|
|
4
|
+
* import { Button, Card, CardHeader } from "@engineio/ui"
|
|
5
|
+
*
|
|
6
|
+
* Every component is also reachable by subpath, which is what you want when
|
|
7
|
+
* you only need one and would rather not pull the barrel:
|
|
8
|
+
*
|
|
9
|
+
* import { Button } from "@engineio/ui/components/ui/button"
|
|
10
|
+
*
|
|
11
|
+
* The flat prefixed names below (`CardHeader`, `DialogTitle`) are the same
|
|
12
|
+
* objects the subpath modules export as `Header` / `Title`. Both spellings
|
|
13
|
+
* work; the prefixed ones are re-exported here because `Root`, `Content` and
|
|
14
|
+
* `Title` would collide across twenty components in one namespace.
|
|
15
|
+
*
|
|
16
|
+
* Styles are NOT imported by this module — CSS in a package entry point would
|
|
17
|
+
* force it on every consumer and break tree-shaking. Import the stylesheet
|
|
18
|
+
* yourself, once, and add the `@source` line:
|
|
19
|
+
*
|
|
20
|
+
* @import "tailwindcss";
|
|
21
|
+
* @import "@engineio/ui/styles";
|
|
22
|
+
* @source "../node_modules/@engineio/ui/dist";
|
|
23
|
+
*/
|
|
24
|
+
export { cn } from "./utils.js";
|
|
25
|
+
export type { WithElementRef, WithoutChild, WithoutChildren, WithoutChildrenOrChild, } from "./utils.js";
|
|
26
|
+
export { EngineIcon, EngineWordmark, type EngineMarkVariant, } from "./components/brand/index.js";
|
|
27
|
+
export { Alert, AlertDescription, AlertTitle, alertVariants, type AlertVariant, } from "./components/ui/alert/index.js";
|
|
28
|
+
export { Badge, badgeVariants, type BadgeVariant, } from "./components/ui/badge/index.js";
|
|
29
|
+
export { Button, buttonVariants, type ButtonProps, type ButtonSize, type ButtonVariant, } from "./components/ui/button/index.js";
|
|
30
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./components/ui/card/index.js";
|
|
31
|
+
export { Checkbox } from "./components/ui/checkbox/index.js";
|
|
32
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./components/ui/dialog/index.js";
|
|
33
|
+
export { Input } from "./components/ui/input/index.js";
|
|
34
|
+
export { Label } from "./components/ui/label/index.js";
|
|
35
|
+
export { Popover, PopoverClose, PopoverContent, PopoverTrigger, } from "./components/ui/popover/index.js";
|
|
36
|
+
export { Progress } from "./components/ui/progress/index.js";
|
|
37
|
+
export { RadioGroup, RadioGroupItem, } from "./components/ui/radio-group/index.js";
|
|
38
|
+
export { Select, SelectContent, SelectGroup, SelectGroupHeading, SelectItem, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, } from "./components/ui/select/index.js";
|
|
39
|
+
export { Separator } from "./components/ui/separator/index.js";
|
|
40
|
+
export { Skeleton } from "./components/ui/skeleton/index.js";
|
|
41
|
+
export { Switch } from "./components/ui/switch/index.js";
|
|
42
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/ui/table/index.js";
|
|
43
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/ui/tabs/index.js";
|
|
44
|
+
export { Textarea } from "./components/ui/textarea/index.js";
|
|
45
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./components/ui/tooltip/index.js";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @engineio/ui — the Engine design system.
|
|
3
|
+
*
|
|
4
|
+
* import { Button, Card, CardHeader } from "@engineio/ui"
|
|
5
|
+
*
|
|
6
|
+
* Every component is also reachable by subpath, which is what you want when
|
|
7
|
+
* you only need one and would rather not pull the barrel:
|
|
8
|
+
*
|
|
9
|
+
* import { Button } from "@engineio/ui/components/ui/button"
|
|
10
|
+
*
|
|
11
|
+
* The flat prefixed names below (`CardHeader`, `DialogTitle`) are the same
|
|
12
|
+
* objects the subpath modules export as `Header` / `Title`. Both spellings
|
|
13
|
+
* work; the prefixed ones are re-exported here because `Root`, `Content` and
|
|
14
|
+
* `Title` would collide across twenty components in one namespace.
|
|
15
|
+
*
|
|
16
|
+
* Styles are NOT imported by this module — CSS in a package entry point would
|
|
17
|
+
* force it on every consumer and break tree-shaking. Import the stylesheet
|
|
18
|
+
* yourself, once, and add the `@source` line:
|
|
19
|
+
*
|
|
20
|
+
* @import "tailwindcss";
|
|
21
|
+
* @import "@engineio/ui/styles";
|
|
22
|
+
* @source "../node_modules/@engineio/ui/dist";
|
|
23
|
+
*/
|
|
24
|
+
export { cn } from "./utils.js";
|
|
25
|
+
export { EngineIcon, EngineWordmark, } from "./components/brand/index.js";
|
|
26
|
+
export { Alert, AlertDescription, AlertTitle, alertVariants, } from "./components/ui/alert/index.js";
|
|
27
|
+
export { Badge, badgeVariants, } from "./components/ui/badge/index.js";
|
|
28
|
+
export { Button, buttonVariants, } from "./components/ui/button/index.js";
|
|
29
|
+
export { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./components/ui/card/index.js";
|
|
30
|
+
export { Checkbox } from "./components/ui/checkbox/index.js";
|
|
31
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./components/ui/dialog/index.js";
|
|
32
|
+
export { Input } from "./components/ui/input/index.js";
|
|
33
|
+
export { Label } from "./components/ui/label/index.js";
|
|
34
|
+
export { Popover, PopoverClose, PopoverContent, PopoverTrigger, } from "./components/ui/popover/index.js";
|
|
35
|
+
export { Progress } from "./components/ui/progress/index.js";
|
|
36
|
+
export { RadioGroup, RadioGroupItem, } from "./components/ui/radio-group/index.js";
|
|
37
|
+
export { Select, SelectContent, SelectGroup, SelectGroupHeading, SelectItem, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, } from "./components/ui/select/index.js";
|
|
38
|
+
export { Separator } from "./components/ui/separator/index.js";
|
|
39
|
+
export { Skeleton } from "./components/ui/skeleton/index.js";
|
|
40
|
+
export { Switch } from "./components/ui/switch/index.js";
|
|
41
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, } from "./components/ui/table/index.js";
|
|
42
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger, } from "./components/ui/tabs/index.js";
|
|
43
|
+
export { Textarea } from "./components/ui/textarea/index.js";
|
|
44
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./components/ui/tooltip/index.js";
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Engine design system — the brand face.
|
|
3
|
+
|
|
4
|
+
Proxima Nova only. Regular (400) for body, Semibold (600) for subtitles and
|
|
5
|
+
UI labels, Bold (700) for display and headings, Black (900) and the
|
|
6
|
+
condensed cuts for poster-scale words and stat bands.
|
|
7
|
+
|
|
8
|
+
Paths are RELATIVE to this file, so the consumer's bundler resolves and
|
|
9
|
+
fingerprints the binaries out of `node_modules`. The engine and rgs repos
|
|
10
|
+
currently use absolute `/fonts/...` URLs, which is why both of them keep
|
|
11
|
+
their own copy of these seven files in `static/fonts/`. Importing this
|
|
12
|
+
stylesheet replaces that: delete the local copies once you have migrated.
|
|
13
|
+
|
|
14
|
+
THREE CORRECTIONS TO THE UPSTREAM STYLESHEET, all deliberate:
|
|
15
|
+
|
|
16
|
+
1. Semibold is mapped to 600, not 500. Upstream declares
|
|
17
|
+
`ProximaNovaSemibold.otf` at `font-weight: 500`, so every `font-semibold`
|
|
18
|
+
(600) label in the products — which the design system specifies for ALL
|
|
19
|
+
UI labels and subtitles — matched no @font-face at all and was either
|
|
20
|
+
synthesised by the browser or snapped to Bold.
|
|
21
|
+
|
|
22
|
+
2. `font-display: swap` on every face. Otherwise the whole UI holds at
|
|
23
|
+
invisible text for up to 3s on a cold cache, and these are .otf files
|
|
24
|
+
served uncompressed.
|
|
25
|
+
|
|
26
|
+
3. LeagueGothic is NOT here. Upstream loads three LeagueGothic faces; the
|
|
27
|
+
brand is Proxima Nova and JetBrains Mono, and "no other typefaces" is an
|
|
28
|
+
explicit rule. If a product still needs it, it is a product font — load
|
|
29
|
+
it there.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/* ── ProximaNova ──────────────────────────────────────────────────────── */
|
|
33
|
+
|
|
34
|
+
@font-face {
|
|
35
|
+
font-family: "ProximaNova";
|
|
36
|
+
src: url("../fonts/ProximaNovaRegular.otf") format("opentype");
|
|
37
|
+
font-weight: 400;
|
|
38
|
+
font-style: normal;
|
|
39
|
+
font-display: swap;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@font-face {
|
|
43
|
+
font-family: "ProximaNova";
|
|
44
|
+
src: url("../fonts/ProximaNovaSemibold.otf") format("opentype");
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
font-style: normal;
|
|
47
|
+
font-display: swap;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@font-face {
|
|
51
|
+
font-family: "ProximaNova";
|
|
52
|
+
src: url("../fonts/ProximaNovaBold.otf") format("opentype");
|
|
53
|
+
font-weight: 700;
|
|
54
|
+
font-style: normal;
|
|
55
|
+
font-display: swap;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@font-face {
|
|
59
|
+
font-family: "ProximaNova";
|
|
60
|
+
src: url("../fonts/ProximaNovaBlack.otf") format("opentype");
|
|
61
|
+
font-weight: 900;
|
|
62
|
+
font-style: normal;
|
|
63
|
+
font-display: swap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ── Condensed cuts ───────────────────────────────────────────────────── */
|
|
67
|
+
/*
|
|
68
|
+
Declared as their own families rather than as `font-stretch` variants of
|
|
69
|
+
ProximaNova. Upstream uses font-stretch, which means the condensed cuts can
|
|
70
|
+
only be reached by a `font-stretch` declaration — there is no Tailwind
|
|
71
|
+
utility for that, so in practice they were unreachable from component
|
|
72
|
+
markup. Separate families make `font-condensed` work.
|
|
73
|
+
|
|
74
|
+
Condensed Black and Extra Condensed Black are for big numbers and
|
|
75
|
+
poster-scale words only — stat bands, lanyards, single-word statements.
|
|
76
|
+
Never running text.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
@font-face {
|
|
80
|
+
font-family: "ProximaNovaCondensed";
|
|
81
|
+
src: url("../fonts/ProximaNovaCondensedBlack.otf") format("opentype");
|
|
82
|
+
font-weight: 900;
|
|
83
|
+
font-style: normal;
|
|
84
|
+
font-display: swap;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@font-face {
|
|
88
|
+
font-family: "ProximaNovaExtraCondensed";
|
|
89
|
+
src: url("../fonts/ProximaNovaExtraCondensedBlack.otf") format("opentype");
|
|
90
|
+
font-weight: 900;
|
|
91
|
+
font-style: normal;
|
|
92
|
+
font-display: swap;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@font-face {
|
|
96
|
+
font-family: "ProximaNovaExtraCondensed";
|
|
97
|
+
src: url("../fonts/ProximaNova-ExtraCondensedThin.otf") format("opentype");
|
|
98
|
+
font-weight: 100;
|
|
99
|
+
font-style: normal;
|
|
100
|
+
font-display: swap;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
── JetBrains Mono ────────────────────────────────────────────────────────
|
|
105
|
+
|
|
106
|
+
NOT LOADED. The design system specifies JetBrains Mono for all numerics,
|
|
107
|
+
keys, IDs, code samples and eyebrow labels, and neither the engine nor the
|
|
108
|
+
rgs repo has ever shipped the binary — so every monospace surface in both
|
|
109
|
+
products currently renders in the platform default. `--font-mono` falls back
|
|
110
|
+
to `ui-monospace` so nothing breaks, but the brand face is absent.
|
|
111
|
+
|
|
112
|
+
JetBrains Mono is OFL-licensed and free to redistribute, so this is a
|
|
113
|
+
five-minute fix that was deliberately left to you rather than pulling font
|
|
114
|
+
binaries off the internet unasked: drop the .woff2 files into
|
|
115
|
+
`src/lib/fonts/` and add the @font-face blocks here. See README, Known gaps.
|
|
116
|
+
*/
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Engine design system — the single stylesheet a consumer imports.
|
|
3
|
+
|
|
4
|
+
@import "tailwindcss";
|
|
5
|
+
@import "@engineio/ui/styles";
|
|
6
|
+
@source "../node_modules/@engineio/ui/dist";
|
|
7
|
+
|
|
8
|
+
That third line is not optional. Tailwind 4 does not scan `node_modules`, so
|
|
9
|
+
without an explicit `@source` pointing at this package the utility classes
|
|
10
|
+
the primitives are written against never get generated. It resolves relative
|
|
11
|
+
to the CSS file declaring it, so adjust the path to wherever your
|
|
12
|
+
`node_modules` sits.
|
|
13
|
+
|
|
14
|
+
Expect a HALF-styled page rather than an obviously broken one: the tokens
|
|
15
|
+
below still apply (they are plain declarations), and any class that also
|
|
16
|
+
appears in your own source still works. Measured on a test consumer, leaving
|
|
17
|
+
the line out took the built stylesheet from 30KB to 6KB and raised no error.
|
|
18
|
+
|
|
19
|
+
Import the parts individually if you need finer control:
|
|
20
|
+
|
|
21
|
+
@import "@engineio/ui/styles/fonts";
|
|
22
|
+
@import "@engineio/ui/styles/tokens";
|
|
23
|
+
@import "@engineio/ui/styles/utilities";
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
@import "./fonts.css";
|
|
27
|
+
@import "./tokens.css";
|
|
28
|
+
@import "./utilities.css";
|