@podoba/react 0.0.57 → 0.0.59
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podoba/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "podoba React components — React Aria Components + Tailwind primitives + layout, built with uic.",
|
|
6
6
|
"repository": {
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"typecheck": "tsc --build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@podoba/tokens": "^0.0.
|
|
36
|
-
"@podoba/tailwind": "^0.0.
|
|
35
|
+
"@podoba/tokens": "^0.0.59",
|
|
36
|
+
"@podoba/tailwind": "^0.0.59",
|
|
37
37
|
"react-aria-components": "1.20.0",
|
|
38
38
|
"class-variance-authority": "0.7.1",
|
|
39
39
|
"clsx": "2.1.1",
|
|
@@ -22,9 +22,9 @@ function Example({ variant = 'create', pending = false, error = false, wide = fa
|
|
|
22
22
|
</SettingsDialogSurface>
|
|
23
23
|
</>
|
|
24
24
|
}
|
|
25
|
-
function ProductionExample() {
|
|
25
|
+
function ProductionExample({ light = false }: { light?: boolean }) {
|
|
26
26
|
const [open, setOpen] = useState(false)
|
|
27
|
-
return <><Button onPress={() => setOpen(true)}>Open production settings</Button><ProductionSettingsDialog isOpen={open} onOpenChange={setOpen} prefix="Template settings" title="Poster" description="Configure production details." closeLabel="Close settings" preview={<span>Artwork preview</span>} footer={<><ProductionSettingsAction variant="secondary" onPress={() => setOpen(false)}>Close</ProductionSettingsAction><ProductionSettingsAction isDisabled>Save</ProductionSettingsAction></>}><SettingsDialogDisclosure title="General"><Input label="Name" appearance="filled" defaultValue="Poster" /></SettingsDialogDisclosure></ProductionSettingsDialog></>
|
|
27
|
+
return <><Button onPress={() => setOpen(true)}>Open production settings</Button><ProductionSettingsDialog isOpen={open} onOpenChange={setOpen} previewTone={light ? "light" : "dark"} prefix="Template settings" title="Poster" description="Configure production details." closeLabel="Close settings" preview={<span>Artwork preview</span>} footer={<><ProductionSettingsAction variant="secondary" onPress={() => setOpen(false)}>Close</ProductionSettingsAction><ProductionSettingsAction isDisabled>Save</ProductionSettingsAction></>}><SettingsDialogDisclosure title="General"><Input label="Name" appearance="filled" defaultValue="Poster" /></SettingsDialogDisclosure></ProductionSettingsDialog></>
|
|
28
28
|
}
|
|
29
29
|
function WizardExample({ expanded = false, pending = false }: { expanded?: boolean; pending?: boolean }) {
|
|
30
30
|
const [open, setOpen] = useState(false)
|
|
@@ -34,7 +34,7 @@ export const examples = {
|
|
|
34
34
|
wizard: () => <WizardExample />,
|
|
35
35
|
wizardSizes: () => <><WizardExample /><WizardExample expanded /></>,
|
|
36
36
|
wizardPending: () => <WizardExample pending />,
|
|
37
|
-
production: () =>
|
|
37
|
+
production: () => <><ProductionExample /><ProductionExample light /></>,
|
|
38
38
|
default: () => <Example />,
|
|
39
39
|
productionColumns: () => <SettingsDialogProductionColumns><Input label="Material" appearance="filled" /><Input label="Surface finish" appearance="filled" /></SettingsDialogProductionColumns>,
|
|
40
40
|
disclosures: () => <><SettingsDialogDisclosure title="Settings" description="Campaign templates"><Input label="Name" appearance="filled" defaultValue="Poster" /></SettingsDialogDisclosure><SettingsDialogDisclosure title="Print" description="Available for Print templates" defaultExpanded={false}><Input label="Material" appearance="filled" isDisabled /></SettingsDialogDisclosure></>,
|
|
@@ -219,7 +219,7 @@ export function SettingsDialogSurface({
|
|
|
219
219
|
) : (
|
|
220
220
|
<DisplayHeading
|
|
221
221
|
id={titleId}
|
|
222
|
-
className={`m-0 whitespace-pre-line pb-0.5 text-fg-muted ${create ? 'mb-4 max-w-5/6' : ''}`}
|
|
222
|
+
className={`m-0 whitespace-pre-line pb-0.5 text-fg-muted-large ${create ? 'mb-4 max-w-5/6' : ''}`}
|
|
223
223
|
style={{
|
|
224
224
|
letterSpacing: 0,
|
|
225
225
|
...(basic ? { maxWidth: '83.333%' } : csv && isWide ? { maxWidth: '34ch' } : {}),
|
|
@@ -349,7 +349,7 @@ export function WizardFormDialog({
|
|
|
349
349
|
<Container className="max-w-384 px-5 min-[901px]:px-6">
|
|
350
350
|
<DisplayHeading
|
|
351
351
|
id={titleId}
|
|
352
|
-
className="m-0 whitespace-pre-line pb-0.5 text-fg-muted"
|
|
352
|
+
className="m-0 whitespace-pre-line pb-0.5 text-fg-muted-large"
|
|
353
353
|
style={{ letterSpacing: 0 }}
|
|
354
354
|
>
|
|
355
355
|
{title}
|
|
@@ -477,7 +477,7 @@ const ProductionHeader = uic('header', {
|
|
|
477
477
|
})
|
|
478
478
|
const ProductionTitle = uic('h1', {
|
|
479
479
|
displayName: 'ProductionSettingsTitle',
|
|
480
|
-
baseClass: 'm-0 max-w-132 text-display-large font-medium text-fg-muted',
|
|
480
|
+
baseClass: 'm-0 max-w-132 text-display-large font-medium text-fg-muted-large',
|
|
481
481
|
style: { letterSpacing: '-0.02em' },
|
|
482
482
|
})
|
|
483
483
|
const ProductionDescription = uic('p', {
|
|
@@ -495,10 +495,6 @@ const ProductionFooter = uic('footer', {
|
|
|
495
495
|
const ProductionPreview = uic('aside', {
|
|
496
496
|
displayName: 'ProductionSettingsPreview',
|
|
497
497
|
baseClass: 'relative grid min-h-0 min-w-0 place-items-center overflow-hidden p-10',
|
|
498
|
-
style: {
|
|
499
|
-
background:
|
|
500
|
-
'radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--color-surface) 8%, transparent) 0, transparent 42%), color-mix(in srgb, var(--color-fg) 84%, var(--color-surface))',
|
|
501
|
-
},
|
|
502
498
|
})
|
|
503
499
|
const ProductionArtwork = uic('div', {
|
|
504
500
|
displayName: 'ProductionSettingsArtwork',
|
|
@@ -524,11 +520,14 @@ export function ProductionSettingsDialog({
|
|
|
524
520
|
testId = 'production-settings',
|
|
525
521
|
isPending = false,
|
|
526
522
|
previewSize = 'contained',
|
|
523
|
+
previewTone = 'dark',
|
|
527
524
|
previewLabel,
|
|
528
525
|
}: {
|
|
529
526
|
isPending?: boolean
|
|
530
527
|
previewLabel?: string
|
|
531
528
|
previewSize?: 'contained' | 'full'
|
|
529
|
+
/** Background tone of the preview pane; defaults to dark. */
|
|
530
|
+
previewTone?: 'dark' | 'light'
|
|
532
531
|
isOpen: boolean
|
|
533
532
|
onOpenChange: (open: boolean) => void
|
|
534
533
|
prefix: ReactNode
|
|
@@ -599,6 +598,7 @@ export function ProductionSettingsDialog({
|
|
|
599
598
|
<ProductionFooter>{footer}</ProductionFooter>
|
|
600
599
|
</section>
|
|
601
600
|
<ProductionPreview
|
|
601
|
+
style={{ background: previewTone === 'light' ? 'var(--color-surface-card)' : 'radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--color-surface) 8%, transparent) 0, transparent 42%), color-mix(in srgb, var(--color-fg) 84%, var(--color-surface))' }}
|
|
602
602
|
aria-label={previewLabel}
|
|
603
603
|
className={compact ? 'col-start-1 row-start-1' : undefined}
|
|
604
604
|
data-testid={`${testId}-preview`}
|
|
@@ -615,7 +615,7 @@ export function ProductionSettingsDialog({
|
|
|
615
615
|
aria-label={closeLabel}
|
|
616
616
|
isDisabled={isPending}
|
|
617
617
|
onPress={() => onOpenChange(false)}
|
|
618
|
-
className=
|
|
618
|
+
className={`absolute right-4 top-4 z-20 h-9 w-9 rounded-md p-0 hover:bg-transparent ${previewTone === 'light' ? 'text-fg-muted hover:text-fg' : 'text-white/60 hover:text-white'}`}
|
|
619
619
|
>
|
|
620
620
|
<svg
|
|
621
621
|
width="18"
|