@tempoxyz/ds 0.3.5 → 0.3.6
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/README.md +2 -2
- package/dist/web/components/AppShell.css +1 -1
- package/dist/web/components/AppShell.d.ts +6 -24
- package/dist/web/components/AppShell.d.ts.map +1 -1
- package/dist/web/components/AppShell.js +17 -21
- package/dist/web/components/AppShell.js.map +1 -1
- package/dist/web/components/AppShell.js.zyzz.json +1 -1
- package/dist/web/icons/central/Central.d.ts +27 -0
- package/dist/web/icons/central/Central.d.ts.map +1 -0
- package/dist/web/icons/central/Central.js +30 -0
- package/dist/web/icons/central/Central.js.map +1 -0
- package/dist/web/icons/central/icons/A.d.ts +407 -0
- package/dist/web/icons/central/icons/A.d.ts.map +1 -0
- package/dist/web/icons/central/icons/A.js +407 -0
- package/dist/web/icons/central/icons/A.js.map +1 -0
- package/dist/web/icons/central/icons/B.d.ts +359 -0
- package/dist/web/icons/central/icons/B.d.ts.map +1 -0
- package/dist/web/icons/central/icons/B.js +359 -0
- package/dist/web/icons/central/icons/B.js.map +1 -0
- package/dist/web/icons/central/icons/C.d.ts +629 -0
- package/dist/web/icons/central/icons/C.d.ts.map +1 -0
- package/dist/web/icons/central/icons/C.js +629 -0
- package/dist/web/icons/central/icons/C.js.map +1 -0
- package/dist/web/icons/central/icons/D.d.ts +167 -0
- package/dist/web/icons/central/icons/D.d.ts.map +1 -0
- package/dist/web/icons/central/icons/D.js +167 -0
- package/dist/web/icons/central/icons/D.js.map +1 -0
- package/dist/web/icons/central/icons/E.d.ts +145 -0
- package/dist/web/icons/central/icons/E.d.ts.map +1 -0
- package/dist/web/icons/central/icons/E.js +145 -0
- package/dist/web/icons/central/icons/E.js.map +1 -0
- package/dist/web/icons/central/icons/F.d.ts +271 -0
- package/dist/web/icons/central/icons/F.d.ts.map +1 -0
- package/dist/web/icons/central/icons/F.js +271 -0
- package/dist/web/icons/central/icons/F.js.map +1 -0
- package/dist/web/icons/central/icons/G.d.ts +143 -0
- package/dist/web/icons/central/icons/G.d.ts.map +1 -0
- package/dist/web/icons/central/icons/G.js +143 -0
- package/dist/web/icons/central/icons/G.js.map +1 -0
- package/dist/web/icons/central/icons/H.d.ts +119 -0
- package/dist/web/icons/central/icons/H.d.ts.map +1 -0
- package/dist/web/icons/central/icons/H.js +119 -0
- package/dist/web/icons/central/icons/H.js.map +1 -0
- package/dist/web/icons/central/icons/I.d.ts +103 -0
- package/dist/web/icons/central/icons/I.d.ts.map +1 -0
- package/dist/web/icons/central/icons/I.js +103 -0
- package/dist/web/icons/central/icons/I.js.map +1 -0
- package/dist/web/icons/central/icons/J.d.ts +23 -0
- package/dist/web/icons/central/icons/J.d.ts.map +1 -0
- package/dist/web/icons/central/icons/J.js +23 -0
- package/dist/web/icons/central/icons/J.js.map +1 -0
- package/dist/web/icons/central/icons/K.d.ts +39 -0
- package/dist/web/icons/central/icons/K.d.ts.map +1 -0
- package/dist/web/icons/central/icons/K.js +39 -0
- package/dist/web/icons/central/icons/K.js.map +1 -0
- package/dist/web/icons/central/icons/L.d.ts +165 -0
- package/dist/web/icons/central/icons/L.d.ts.map +1 -0
- package/dist/web/icons/central/icons/L.js +165 -0
- package/dist/web/icons/central/icons/L.js.map +1 -0
- package/dist/web/icons/central/icons/M.d.ts +199 -0
- package/dist/web/icons/central/icons/M.d.ts.map +1 -0
- package/dist/web/icons/central/icons/M.js +199 -0
- package/dist/web/icons/central/icons/M.js.map +1 -0
- package/dist/web/icons/central/icons/N.d.ts +103 -0
- package/dist/web/icons/central/icons/N.d.ts.map +1 -0
- package/dist/web/icons/central/icons/N.js +103 -0
- package/dist/web/icons/central/icons/N.js.map +1 -0
- package/dist/web/icons/central/icons/O.d.ts +55 -0
- package/dist/web/icons/central/icons/O.d.ts.map +1 -0
- package/dist/web/icons/central/icons/O.js +55 -0
- package/dist/web/icons/central/icons/O.js.map +1 -0
- package/dist/web/icons/central/icons/P.d.ts +353 -0
- package/dist/web/icons/central/icons/P.d.ts.map +1 -0
- package/dist/web/icons/central/icons/P.js +353 -0
- package/dist/web/icons/central/icons/P.js.map +1 -0
- package/dist/web/icons/central/icons/Q.d.ts +29 -0
- package/dist/web/icons/central/icons/Q.d.ts.map +1 -0
- package/dist/web/icons/central/icons/Q.js +29 -0
- package/dist/web/icons/central/icons/Q.js.map +1 -0
- package/dist/web/icons/central/icons/R.d.ts +165 -0
- package/dist/web/icons/central/icons/R.d.ts.map +1 -0
- package/dist/web/icons/central/icons/R.js +165 -0
- package/dist/web/icons/central/icons/R.js.map +1 -0
- package/dist/web/icons/central/icons/S.d.ts +533 -0
- package/dist/web/icons/central/icons/S.d.ts.map +1 -0
- package/dist/web/icons/central/icons/S.js +533 -0
- package/dist/web/icons/central/icons/S.js.map +1 -0
- package/dist/web/icons/central/icons/T.d.ts +205 -0
- package/dist/web/icons/central/icons/T.d.ts.map +1 -0
- package/dist/web/icons/central/icons/T.js +205 -0
- package/dist/web/icons/central/icons/T.js.map +1 -0
- package/dist/web/icons/central/icons/U.d.ts +63 -0
- package/dist/web/icons/central/icons/U.d.ts.map +1 -0
- package/dist/web/icons/central/icons/U.js +63 -0
- package/dist/web/icons/central/icons/U.js.map +1 -0
- package/dist/web/icons/central/icons/V.d.ts +125 -0
- package/dist/web/icons/central/icons/V.d.ts.map +1 -0
- package/dist/web/icons/central/icons/V.js +125 -0
- package/dist/web/icons/central/icons/V.js.map +1 -0
- package/dist/web/icons/central/icons/W.d.ts +119 -0
- package/dist/web/icons/central/icons/W.d.ts.map +1 -0
- package/dist/web/icons/central/icons/W.js +119 -0
- package/dist/web/icons/central/icons/W.js.map +1 -0
- package/dist/web/icons/central/icons/X.d.ts +13 -0
- package/dist/web/icons/central/icons/X.d.ts.map +1 -0
- package/dist/web/icons/central/icons/X.js +13 -0
- package/dist/web/icons/central/icons/X.js.map +1 -0
- package/dist/web/icons/central/icons/Y.d.ts +13 -0
- package/dist/web/icons/central/icons/Y.d.ts.map +1 -0
- package/dist/web/icons/central/icons/Y.js +13 -0
- package/dist/web/icons/central/icons/Y.js.map +1 -0
- package/dist/web/icons/central/icons/Z.d.ts +19 -0
- package/dist/web/icons/central/icons/Z.d.ts.map +1 -0
- package/dist/web/icons/central/icons/Z.js +19 -0
- package/dist/web/icons/central/icons/Z.js.map +1 -0
- package/dist/web/icons/central/index.d.ts +34 -0
- package/dist/web/icons/central/index.d.ts.map +1 -0
- package/dist/web/icons/central/index.js +34 -0
- package/dist/web/icons/central/index.js.map +1 -0
- package/dist/web/icons/index.d.ts +1 -0
- package/dist/web/icons/index.d.ts.map +1 -1
- package/dist/web/icons/index.js +1 -0
- package/dist/web/icons/index.js.map +1 -1
- package/dist/web/index.js.zyzz.json +1 -1
- package/package.json +1 -1
- package/src/web/components/AppShell.tsx +7 -30
- package/src/web/icons/README.md +2 -0
- package/src/web/icons/central/Central.tsx +66 -0
- package/src/web/icons/central/README.md +29 -0
- package/src/web/icons/central/icons/A.ts +605 -0
- package/src/web/icons/central/icons/B.ts +533 -0
- package/src/web/icons/central/icons/C.ts +938 -0
- package/src/web/icons/central/icons/D.ts +245 -0
- package/src/web/icons/central/icons/E.ts +212 -0
- package/src/web/icons/central/icons/F.ts +401 -0
- package/src/web/icons/central/icons/G.ts +209 -0
- package/src/web/icons/central/icons/H.ts +173 -0
- package/src/web/icons/central/icons/I.ts +149 -0
- package/src/web/icons/central/icons/J.ts +29 -0
- package/src/web/icons/central/icons/K.ts +53 -0
- package/src/web/icons/central/icons/L.ts +242 -0
- package/src/web/icons/central/icons/M.ts +293 -0
- package/src/web/icons/central/icons/N.ts +149 -0
- package/src/web/icons/central/icons/O.ts +77 -0
- package/src/web/icons/central/icons/P.ts +524 -0
- package/src/web/icons/central/icons/Q.ts +38 -0
- package/src/web/icons/central/icons/R.ts +242 -0
- package/src/web/icons/central/icons/S.ts +794 -0
- package/src/web/icons/central/icons/T.ts +302 -0
- package/src/web/icons/central/icons/U.ts +89 -0
- package/src/web/icons/central/icons/V.ts +182 -0
- package/src/web/icons/central/icons/W.ts +173 -0
- package/src/web/icons/central/icons/X.ts +14 -0
- package/src/web/icons/central/icons/Y.ts +14 -0
- package/src/web/icons/central/icons/Z.ts +23 -0
- package/src/web/icons/central/index.ts +33 -0
- package/src/web/icons/index.ts +1 -0
package/package.json
CHANGED
|
@@ -81,11 +81,8 @@ function useShell() {
|
|
|
81
81
|
*/
|
|
82
82
|
export namespace AppShell {
|
|
83
83
|
/**
|
|
84
|
-
* Renders the 56px page header
|
|
85
|
-
*
|
|
86
|
-
* of `Main`. With `align="center"` on wide viewports, its fill and border continue to the end
|
|
87
|
-
* edge. A `Main` that scrolls itself clips them at its own edge, so scroll the root instead when
|
|
88
|
-
* the shell fills a fixed-height region.
|
|
84
|
+
* Renders the transparent 56px page header at the top of `Main`, holding the title, actions and
|
|
85
|
+
* the compact-viewport `Trigger`. It spans the full width of `Main`.
|
|
89
86
|
*/
|
|
90
87
|
export function Header(props: Header.Props) {
|
|
91
88
|
const { className, vars, ...attributes } = props
|
|
@@ -623,16 +620,11 @@ namespace styles {
|
|
|
623
620
|
{ id: 'tds/web/app-shell/drawer' },
|
|
624
621
|
)
|
|
625
622
|
|
|
626
|
-
// The
|
|
627
|
-
// The header takes the fill of the sidebar, so the two frame the page.
|
|
623
|
+
// The header bleeds into the padding of `Main`, so it spans the column at its top edge.
|
|
628
624
|
export const header = variants(
|
|
629
625
|
{
|
|
630
626
|
base: {
|
|
631
627
|
alignItems: 'center',
|
|
632
|
-
backgroundColor: 'background.sidebar',
|
|
633
|
-
borderBottomColor: 'line.secondary',
|
|
634
|
-
borderBottomStyle: 'solid',
|
|
635
|
-
borderBottomWidth: '1px !custom',
|
|
636
628
|
boxSizing: 'border-box',
|
|
637
629
|
columnGap: '8',
|
|
638
630
|
display: 'flex',
|
|
@@ -643,7 +635,8 @@ namespace styles {
|
|
|
643
635
|
minHeight: '56',
|
|
644
636
|
minWidth: '0',
|
|
645
637
|
paddingInline: '16',
|
|
646
|
-
|
|
638
|
+
// The title starts on the 28px edge of the content below it, as the Page Header pads it.
|
|
639
|
+
'@media (min-width: 640px)': { marginInline: '-1.75rem !custom', paddingInline: '28' },
|
|
647
640
|
// Below 1024px the fixed trigger covers the end of the bar, so header actions end 8px
|
|
648
641
|
// before it: its 40px plus its 16px inset. A collapsed sidebar hides it from 768px.
|
|
649
642
|
'@media (max-width: 1023px)': { paddingInlineEnd: '64' },
|
|
@@ -667,7 +660,7 @@ namespace styles {
|
|
|
667
660
|
paddingInline: '16',
|
|
668
661
|
paddingTop: '20',
|
|
669
662
|
width: '100% !custom',
|
|
670
|
-
'@media (min-width: 640px)': { paddingInline: '
|
|
663
|
+
'@media (min-width: 640px)': { paddingInline: '28' },
|
|
671
664
|
},
|
|
672
665
|
},
|
|
673
666
|
{ id: 'tds/web/app-shell/main' },
|
|
@@ -704,23 +697,7 @@ namespace styles {
|
|
|
704
697
|
defaultVariants: { align: 'center' },
|
|
705
698
|
variants: {
|
|
706
699
|
align: {
|
|
707
|
-
|
|
708
|
-
// is ink overflow. It adds no scroll and changes no layout, and a scrolling `Main` clips
|
|
709
|
-
// it at its own edge. The image draws the fill and the 1px bottom border of the header.
|
|
710
|
-
// The outset takes the gutter from the viewport width, since the root of an application
|
|
711
|
-
// frame spans the viewport.
|
|
712
|
-
center: {
|
|
713
|
-
'@media (min-width: 1024px)': {
|
|
714
|
-
selectors: {
|
|
715
|
-
'& > main > [data-app-shell-header]': {
|
|
716
|
-
borderImageOutset: `0 max(0px, calc((100vw - var(--sidebar-width, 16rem) - ${vars.container['1024']}) / 2)) 0 0 !custom`,
|
|
717
|
-
borderImageSlice: '0 fill !custom',
|
|
718
|
-
borderImageSource: `linear-gradient(${vars.color.background.sidebar} calc(100% - 1px), ${vars.color.line.secondary} 0) !custom`,
|
|
719
|
-
borderImageWidth: '0 !custom',
|
|
720
|
-
},
|
|
721
|
-
},
|
|
722
|
-
},
|
|
723
|
-
},
|
|
700
|
+
center: {},
|
|
724
701
|
start: {
|
|
725
702
|
selectors: {
|
|
726
703
|
'&::after, &::before': { display: 'none !custom' },
|
package/src/web/icons/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Web Icons
|
|
2
2
|
|
|
3
|
+
`@tempoxyz/ds/icons` exports the 303 Platform icons that the components render and every icon of [Central Icons](central/README.md). A Central icon whose name a Platform icon uses takes a `2` suffix, such as `ArrowDown2`.
|
|
4
|
+
|
|
3
5
|
## Usage
|
|
4
6
|
|
|
5
7
|
Import individual SVG components. Icons inherit CSS `color`, default to `1em × 1em` based on inherited font size, and accept native SVG attributes and refs. Decorative icons are hidden from assistive technology. Give meaningful icons an accessible name.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** Renders generated Central icon data with the Platform icon contract. @module */
|
|
2
|
+
import { createElement, useId } from 'react'
|
|
3
|
+
import type { ComponentPropsWithRef, ReactElement, ReactNode } from 'react'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Returns an icon component that draws a generated Central icon. The icon renders at `1em`, inherits
|
|
7
|
+
* `currentColor`, hides itself from assistive technology unless it has an accessible name, and accepts
|
|
8
|
+
* native SVG props and refs. Paths at the set's 1.5 stroke follow the root `strokeWidth`, which
|
|
9
|
+
* defaults to `1.5`. Paths with another authored width keep it. Clipping and mask IDs are scoped per
|
|
10
|
+
* instance.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* export const Zap = icon([['path', { d: 'M19.79 8.75H13.75', stroke: 'currentColor' }]])
|
|
14
|
+
*/
|
|
15
|
+
export function icon(nodes: icon.Nodes): icon.ReturnType {
|
|
16
|
+
return function CentralIcon(props) {
|
|
17
|
+
const id = useId()
|
|
18
|
+
const labelled = Boolean(props['aria-label'] || props['aria-labelledby'])
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<svg
|
|
22
|
+
width="1em"
|
|
23
|
+
height="1em"
|
|
24
|
+
viewBox="0 0 24 24"
|
|
25
|
+
fill="none"
|
|
26
|
+
strokeWidth={1.5}
|
|
27
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
28
|
+
aria-hidden={labelled ? undefined : true}
|
|
29
|
+
role={labelled ? 'img' : undefined}
|
|
30
|
+
{...props}
|
|
31
|
+
>
|
|
32
|
+
{render(nodes, id)}
|
|
33
|
+
</svg>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export declare namespace icon {
|
|
39
|
+
/** An SVG element: its tag, its React props, and its children. `{id}` in a value marks the instance ID. */
|
|
40
|
+
type Node = readonly [
|
|
41
|
+
tag: string,
|
|
42
|
+
props: Readonly<Record<string, number | string>>,
|
|
43
|
+
children?: Nodes,
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
/** The SVG elements of an icon, in paint order. */
|
|
47
|
+
type Nodes = readonly Node[]
|
|
48
|
+
|
|
49
|
+
/** Native SVG props. */
|
|
50
|
+
type Props = Omit<ComponentPropsWithRef<'svg'>, 'children' | 'dangerouslySetInnerHTML'>
|
|
51
|
+
|
|
52
|
+
/** An icon component with the Platform icon contract. */
|
|
53
|
+
type ReturnType = (props: Props) => ReactElement
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function render(nodes: icon.Nodes, id: string): ReactNode {
|
|
57
|
+
return nodes.map((node, index) => {
|
|
58
|
+
const [tag, attributes, children] = node
|
|
59
|
+
const props: Record<string, number | string> = { key: index }
|
|
60
|
+
|
|
61
|
+
for (const [name, value] of Object.entries(attributes))
|
|
62
|
+
props[name] = typeof value === 'string' ? value.replaceAll('{id}', id) : value
|
|
63
|
+
|
|
64
|
+
return createElement(tag, props, children ? render(children, id) : undefined)
|
|
65
|
+
})
|
|
66
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Central Icons
|
|
2
|
+
|
|
3
|
+
`@tempoxyz/ds/icons` re-exports every icon of the [Central Icons](https://centralicons.com) package `@central-icons-react/round-outlined-radius-1-stroke-1.5`, the default style of the [Central Icon System](https://www.figma.com/design/GGiLAoCosR3YvokjJ18W9f/central-icon-system-v1.28?node-id=7-118), as generated icon data.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { SettingsGear2 } from '@tempoxyz/ds/icons'
|
|
7
|
+
|
|
8
|
+
;<SettingsGear2 aria-label="Settings" strokeWidth={2.25} />
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Contract
|
|
12
|
+
|
|
13
|
+
Each icon follows the Platform icon contract. It renders at `1em`, inherits `currentColor`, hides itself from assistive technology unless it has an accessible name, and accepts native SVG props and refs.
|
|
14
|
+
|
|
15
|
+
Icons draw on a 24 by 24 grid with a 1.5 stroke, so the stroke scales with the icon: 1px at 16px and 1.5px at 24px. Paths at the 1.5 stroke follow the root `strokeWidth`. Paths with another authored width keep it.
|
|
16
|
+
|
|
17
|
+
## Updates
|
|
18
|
+
|
|
19
|
+
`index.ts` and `icons/` are generated. To take a new Central release:
|
|
20
|
+
|
|
21
|
+
1. Bump the package version in the `pnpm-workspace.yaml` catalog and run `pnpm install`.
|
|
22
|
+
2. Run `pnpm icons:central` to rewrite the icon modules from the installed package.
|
|
23
|
+
3. Run the `Central.test.tsx` browser suite, which fails when an export is missing or extra.
|
|
24
|
+
|
|
25
|
+
The package is a development dependency. Its install script checks a Central license key, which pnpm skips through `ignoredBuiltDependencies`. The published library ships the generated icons, so consumers install neither the package nor a key.
|
|
26
|
+
|
|
27
|
+
## Source
|
|
28
|
+
|
|
29
|
+
Names follow Central's package names without the `Icon` prefix, such as `SettingsGear2`. A name that a Platform icon uses takes a `2` suffix, such as `ArrowDown2`, or the next free number when Central already uses it, such as `Bank3`. Names that start with a digit keep the prefix, such as `Icon3d`, and `Infinity` becomes `InfinityIcon2`. The package ships no SVG files. Central Icons are licensed from iconists under the redistribution rights Tempo confirmed on October 1, 2026, and keep their original licensing terms.
|