@estiva-app/ui 0.91.1 → 0.91.2
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/LinkParts.d.ts.map +1 -1
- package/dist/Select.d.ts +7 -1
- package/dist/Select.d.ts.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/eslint/index.js.map +2 -2
- package/dist/index.js +7 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/registry.json +26 -10
- package/src/LinkParts.tsx +3 -0
- package/src/Select.mdx +4 -0
- package/src/Select.stories.tsx +11 -1
- package/src/Select.tsx +10 -2
- package/src/eslint/no-restyled-part.ts +1 -1
package/package.json
CHANGED
package/registry.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"kind": "package",
|
|
5
5
|
"repo": "estiva-ui",
|
|
6
6
|
"package": "@estiva-app/ui",
|
|
7
|
-
"packageVersion": "0.91.
|
|
7
|
+
"packageVersion": "0.91.2",
|
|
8
8
|
"exports": 211,
|
|
9
9
|
"typeExports": 211,
|
|
10
10
|
"files": null
|
|
@@ -7968,6 +7968,12 @@
|
|
|
7968
7968
|
"required": false,
|
|
7969
7969
|
"note": null
|
|
7970
7970
|
},
|
|
7971
|
+
{
|
|
7972
|
+
"name": "fill",
|
|
7973
|
+
"takes": "field | wash",
|
|
7974
|
+
"required": false,
|
|
7975
|
+
"note": "What the trigger is filled with: a form's `field` (default), or the see-through `wash` on a see-through card, one step over it, as the card is over the message (a link card's pickers; Katerina, 30 Oct: the field's fill read as a dark hole in a card on a selected message)."
|
|
7976
|
+
},
|
|
7971
7977
|
{
|
|
7972
7978
|
"name": "ariaLabel",
|
|
7973
7979
|
"takes": "text",
|
|
@@ -8012,6 +8018,13 @@
|
|
|
8012
8018
|
"default",
|
|
8013
8019
|
"small"
|
|
8014
8020
|
]
|
|
8021
|
+
},
|
|
8022
|
+
{
|
|
8023
|
+
"prop": "fill",
|
|
8024
|
+
"values": [
|
|
8025
|
+
"field",
|
|
8026
|
+
"wash"
|
|
8027
|
+
]
|
|
8015
8028
|
}
|
|
8016
8029
|
],
|
|
8017
8030
|
"ownsBehaviours": [
|
|
@@ -8055,15 +8068,18 @@
|
|
|
8055
8068
|
"docPage": "src/Select.mdx",
|
|
8056
8069
|
"app": null,
|
|
8057
8070
|
"looks": [
|
|
8058
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8059
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8060
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8061
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8062
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8063
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8064
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8065
|
-
"rounded-lg border bg-bg-field shadow-field
|
|
8066
|
-
"rounded-lg border bg-bg-field shadow-field text-
|
|
8071
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-input-value",
|
|
8072
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-caption",
|
|
8073
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field cursor-not-allowed bg-bg-disabled text-text-disabled focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-input-value",
|
|
8074
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field cursor-not-allowed bg-bg-disabled text-text-disabled focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-caption",
|
|
8075
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted hover:border-border-strong focus-visible:hover:border-border-focus aria-expanded:hover:border-border-focus disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-input-value",
|
|
8076
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted hover:border-border-strong focus-visible:hover:border-border-focus aria-expanded:hover:border-border-focus disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-caption",
|
|
8077
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted hover:border-border-strong focus-visible:hover:border-border-focus aria-expanded:hover:border-border-focus disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field cursor-not-allowed bg-bg-disabled text-text-disabled focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-input-value",
|
|
8078
|
+
"rounded-lg border text-left bg-bg-wash leaf:bg-bg-field leaf:shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted hover:border-border-strong focus-visible:hover:border-border-focus aria-expanded:hover:border-border-focus disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field cursor-not-allowed bg-bg-disabled text-text-disabled focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-caption",
|
|
8079
|
+
"rounded-lg border text-left bg-bg-field shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-input-value",
|
|
8080
|
+
"rounded-lg border text-left bg-bg-field shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-caption",
|
|
8081
|
+
"rounded-lg border text-left bg-bg-field shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field cursor-not-allowed bg-bg-disabled text-text-disabled focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-input-value",
|
|
8082
|
+
"rounded-lg border text-left bg-bg-field shadow-field border-border-field outline-none transition-colors text-text-primary placeholder:text-text-muted disabled:pointer-events-none disabled:bg-bg-disabled disabled:text-text-disabled disabled:border-border-field cursor-not-allowed bg-bg-disabled text-text-disabled focus-visible:border-border-focus aria-expanded:border-border-focus signal:transition-shadow signal:focus-visible:shadow-focus-ring text-caption"
|
|
8067
8083
|
]
|
|
8068
8084
|
},
|
|
8069
8085
|
{
|
package/src/LinkParts.tsx
CHANGED
|
@@ -140,6 +140,7 @@ export function LinkPickers({ status, owner, ownerLabel = 'Owner', readOnly = fa
|
|
|
140
140
|
const ownerWords = owner && (readOnly || !owner.onChange)
|
|
141
141
|
return (
|
|
142
142
|
// As words, 16px apart, so the status and the person read as two things; as boxed pickers their borders already part them (Katerina, 29 Oct).
|
|
143
|
+
// Boxed, they are see-through as the card they sit in is: a field's fill was a dark hole on a selected message (Katerina, 30 Oct).
|
|
143
144
|
<span className={cn('flex h-6 min-w-0 items-center text-caption text-text-secondary', statusWords || ownerWords ? 'gap-4' : 'gap-2')}>
|
|
144
145
|
{status &&
|
|
145
146
|
(statusWords ? (
|
|
@@ -150,6 +151,7 @@ export function LinkPickers({ status, owner, ownerLabel = 'Owner', readOnly = fa
|
|
|
150
151
|
) : (
|
|
151
152
|
<Select
|
|
152
153
|
size="small"
|
|
154
|
+
fill="wash"
|
|
153
155
|
className="w-auto"
|
|
154
156
|
value={status.value ?? ''}
|
|
155
157
|
onChange={(value) => status.onChange?.(value)}
|
|
@@ -166,6 +168,7 @@ export function LinkPickers({ status, owner, ownerLabel = 'Owner', readOnly = fa
|
|
|
166
168
|
) : (
|
|
167
169
|
<Select
|
|
168
170
|
size="small"
|
|
171
|
+
fill="wash"
|
|
169
172
|
className="w-auto"
|
|
170
173
|
value={owner.value ?? ''}
|
|
171
174
|
placeholder="Unassigned"
|
package/src/Select.mdx
CHANGED
|
@@ -20,6 +20,10 @@ corners and scrolling panels.
|
|
|
20
20
|
trigger and the list alike.
|
|
21
21
|
- Two sizes; `small` for dense rows and rails (it sits well inside
|
|
22
22
|
**Property**).
|
|
23
|
+
- Two fills: a form's `field` (default), and `wash` on a see-through card
|
|
24
|
+
(`Card fill="inset"`), one step over it, as a link card's pickers are. A
|
|
25
|
+
field's own fill there reads as a hole when the message behind is selected.
|
|
26
|
+
Leaf's fields are white and stay white.
|
|
23
27
|
|
|
24
28
|
<Canvas of={SelectStories.WithLeading} />
|
|
25
29
|
|
package/src/Select.stories.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/react-vite'
|
|
2
2
|
import { useState, type ComponentProps } from 'react'
|
|
3
3
|
import { Avatar } from './Avatar'
|
|
4
|
+
import { Card } from './Card'
|
|
4
5
|
import { Field } from './Field'
|
|
5
6
|
import { Select } from './Select'
|
|
6
7
|
import { TextInput } from './TextInput'
|
|
@@ -32,7 +33,7 @@ const meta = {
|
|
|
32
33
|
],
|
|
33
34
|
ariaLabel: 'Status',
|
|
34
35
|
},
|
|
35
|
-
argTypes: { size: { control: 'inline-radio', options: ['default', 'small'] } },
|
|
36
|
+
argTypes: { size: { control: 'inline-radio', options: ['default', 'small'] }, fill: { control: 'inline-radio', options: ['field', 'wash'] } },
|
|
36
37
|
} satisfies Meta<typeof Select>
|
|
37
38
|
|
|
38
39
|
export default meta
|
|
@@ -59,6 +60,15 @@ export const Empty: Story = {
|
|
|
59
60
|
/** The dense size, matching `Button`'s small — for property rows, where a full-height field would dominate the label beside it. */
|
|
60
61
|
export const Small: Story = { render: (args) => <Demo {...args} size="small" initial="todo" /> }
|
|
61
62
|
|
|
63
|
+
/** `fill="wash"` on a see-through card, as a link card's pickers: one step over the card, so a selected message's tint shows through both. */
|
|
64
|
+
export const OnASeeThroughCard: Story = {
|
|
65
|
+
render: (args) => (
|
|
66
|
+
<Card fill="inset" className="flex gap-2 p-3">
|
|
67
|
+
<Demo {...args} size="small" fill="wash" className="w-auto" initial="in_progress" />
|
|
68
|
+
</Card>
|
|
69
|
+
),
|
|
70
|
+
}
|
|
71
|
+
|
|
62
72
|
/** An option may carry a `leading` node — a face beside a person's name — shown in the trigger and in the list. Ship's addition. */
|
|
63
73
|
export const WithLeading: Story = {
|
|
64
74
|
render: (args) => (
|
package/src/Select.tsx
CHANGED
|
@@ -47,6 +47,12 @@ export interface SelectProps {
|
|
|
47
47
|
onChange: (value: string) => void
|
|
48
48
|
options: SelectOption[]
|
|
49
49
|
size?: 'default' | 'small'
|
|
50
|
+
/**
|
|
51
|
+
* What the trigger is filled with: a form's `field` (default), or the see-through `wash` on a see-through card,
|
|
52
|
+
* one step over it, as the card is over the message (a link card's pickers; Katerina, 30 Oct: the field's fill
|
|
53
|
+
* read as a dark hole in a card on a selected message). Leaf's white fields stay white.
|
|
54
|
+
*/
|
|
55
|
+
fill?: 'field' | 'wash'
|
|
50
56
|
ariaLabel?: string
|
|
51
57
|
/** Set by a `Field` with `required`; a caller inside one owes nothing. */
|
|
52
58
|
'aria-required'?: boolean | 'true' | 'false'
|
|
@@ -68,7 +74,7 @@ export interface SelectProps {
|
|
|
68
74
|
const GAP = 4
|
|
69
75
|
const VIEWPORT_PAD = 8
|
|
70
76
|
|
|
71
|
-
export function Select({ value, onChange, options, size = 'default', ariaLabel, placeholder = 'Select…', disabled, disabledReason, className, ...aria }: SelectProps) {
|
|
77
|
+
export function Select({ value, onChange, options, size = 'default', fill = 'field', ariaLabel, placeholder = 'Select…', disabled, disabledReason, className, ...aria }: SelectProps) {
|
|
72
78
|
const selected = options.find((o) => o.value === value)
|
|
73
79
|
// With a reason it is held shut rather than disabled: a disabled trigger is
|
|
74
80
|
// a native `disabled` button, which Tab skips and a tooltip cannot open on.
|
|
@@ -88,7 +94,9 @@ export function Select({ value, onChange, options, size = 'default', ariaLabel,
|
|
|
88
94
|
* `truncate` from ever engaging; in a block container max-w-full is
|
|
89
95
|
* the cap. Full-width callers are unaffected.
|
|
90
96
|
*/
|
|
91
|
-
'flex w-full min-w-0 max-w-full items-center justify-between gap-2 rounded-lg border
|
|
97
|
+
'flex w-full min-w-0 max-w-full items-center justify-between gap-2 rounded-lg border text-left',
|
|
98
|
+
// Leaf's fields are white, raised on their shadow, and stay so on a card: they never read as a hole (Katerina, 30 Oct).
|
|
99
|
+
fill === 'wash' ? 'bg-bg-wash leaf:bg-bg-field leaf:shadow-field' : 'bg-bg-field shadow-field',
|
|
92
100
|
'border-border-field outline-none transition-colors',
|
|
93
101
|
FIELD_TEXT_CLASSES,
|
|
94
102
|
// The focused border survives a hover: hover alone strengthens the
|
|
@@ -159,7 +159,7 @@ export const PART_LOOK_PROPS: Record<string, string[]> = {
|
|
|
159
159
|
SectionHeader: ['hover', 'look'],
|
|
160
160
|
SectionLabel: ['tone', 'truncate'],
|
|
161
161
|
ShowMore: ['surface'],
|
|
162
|
-
Select: ['size'],
|
|
162
|
+
Select: ['size', 'fill'],
|
|
163
163
|
Tabs: ['size'],
|
|
164
164
|
TextInput: ['size'],
|
|
165
165
|
Toast: ['type'],
|