Skip to content

Commit ab33eb0

Browse files
authored
Merge pull request #31 from once-ui-system/1.5.3
Features - Bulge + WeatherFx custom triggers - Zoom cursor on Media enlarge and mproved image rendering - MegaMenu transition refined - Chart axis reverse positions - ShineFx inverse prop for inverting effect - "sharp" shape added to StylePanel - custom icon in Avatar New - CelebrationFx: for confetti and fireworks - RadialGauge and LinearGauge components for meters Fixes - add default minHeight to charts instead of height
2 parents 1dd6db0 + e6a6529 commit ab33eb0

40 files changed

+3414
-328
lines changed

apps/docs/src/app/page.tsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ import {
1313
Meta,
1414
Schema,
1515
MatrixFx,
16-
Background
16+
Background,
17+
Pulse,
18+
ShineFx
1719
} from "@once-ui-system/core";
1820
import { baseURL, meta, schema, changelog, roadmap, layout } from "@/resources";
1921
import { formatDate } from "./utils/formatDate";
@@ -89,7 +91,7 @@ export default function Home() {
8991
top="0"
9092
left="0"
9193
flicker
92-
colors={["brand-solid-strong"]}
94+
colors={["brand-solid-strong"]}
9395
bulge={{
9496
type: "wave",
9597
duration: 3,
@@ -101,20 +103,27 @@ export default function Home() {
101103
<Column fillWidth gap="16" padding="48">
102104
<Badge
103105
background="overlay"
106+
style={{backdropFilter: "blue(0.25rem)"}}
104107
paddingLeft="8"
105-
paddingRight="20"
106-
paddingY="8"
107-
effect={false}
108-
border="neutral-alpha-weak"
109-
shadow={undefined}
108+
paddingRight="4"
109+
border="brand-alpha-weak"
110+
arrow={false}
111+
paddingY="4"
110112
href="/changelog"
111-
vertical="center"
112-
radius="l"
113113
>
114-
<Tag marginRight="12" variant="brand">NEW</Tag>
115-
<Text variant="label-default-s">
116-
Once UI 1.5 — Curiosity in code
117-
</Text>
114+
<Row vertical="center">
115+
<Pulse size="s"/>
116+
<Row
117+
marginLeft="12"
118+
textVariant="label-default-s"
119+
onBackground="brand-medium"
120+
gap="8"
121+
vertical="center"
122+
>
123+
<Text weight="strong" onBackground="brand-strong">Once UI 1.5</Text> Curiosity in code
124+
<Tag variant="brand" data-border="rounded"><ShineFx speed={2} baseOpacity={0.8}>New</ShineFx></Tag>
125+
</Row>
126+
</Row>
118127
</Badge>
119128
<Heading variant="display-strong-m" marginTop="12">
120129
Once UI Docs

apps/docs/src/content/once-ui/components/avatar.mdx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ docs: "once-ui/components/avatar.mdx"
66
github: "components/Avatar.tsx"
77
navLabel: "Avatar"
88
navIcon: "components"
9+
navTag: "Update"
10+
navTagVariant: "indigo"
911
---
1012

1113
A versatile component for displaying user profile images, initials, or fallback icons in a circular container. Commonly used in user interfaces to represent people.
@@ -34,6 +36,50 @@ A versatile component for displaying user profile images, initials, or fallback
3436
]}
3537
/>
3638

39+
## Empty
40+
41+
Use the `empty` prop to render an empty avatar.
42+
43+
<CodeBlock
44+
marginTop="16"
45+
marginBottom="24"
46+
preview={
47+
<Row gap="16" horizontal="center">
48+
<Avatar size="l" empty />
49+
</Row>
50+
}
51+
codes={[
52+
{
53+
code:
54+
`<Avatar size="l" empty />`,
55+
language: "tsx",
56+
label: "Empty"
57+
}
58+
]}
59+
/>
60+
61+
## Icon
62+
63+
Use the `icon` prop to render an icon in the avatar.
64+
65+
<CodeBlock
66+
marginTop="16"
67+
marginBottom="24"
68+
preview={
69+
<Row gap="16" horizontal="center">
70+
<Avatar size="l" icon="sparkle" />
71+
</Row>
72+
}
73+
codes={[
74+
{
75+
code:
76+
`<Avatar size="l" icon="sparkle" />`,
77+
language: "tsx",
78+
label: "Icon"
79+
}
80+
]}
81+
/>
82+
3783
## Sizes
3884

3985
Use the T-shirt size model or set sizes with numbers (REM).
@@ -143,6 +189,7 @@ Use the T-shirt size model or set sizes with numbers (REM).
143189
["size", ["xs", "s", "m", "l", "xl", "number"], "m"],
144190
["value", "string"],
145191
["src", "string"],
192+
["icon", "string"],
146193
["loading", "boolean", "false"],
147194
["empty", "boolean", "false"],
148195
["statusIndicator", "object"],

apps/docs/src/content/once-ui/components/media.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ navIcon: "components"
1616
preview={
1717
<Media
1818
priority
19+
sizes="(max-width: 768px) 100vw, 768px"
1920
src="/images/docs/once-ui/vibe-coding-light.jpg"
2021
alt="Preview"
2122
radius="xl"
@@ -28,6 +29,7 @@ navIcon: "components"
2829
`<Media
2930
src="/image.jpg"
3031
alt="Preview"
32+
sizes="(max-width: 768px) 100vw, 768px"
3133
radius="xl"
3234
border="neutral-alpha-medium"
3335
/>`,
@@ -49,6 +51,7 @@ Show a skeleton block while content is loading. Only works when `aspectRatio` is
4951
loading
5052
radius="l"
5153
aspectRatio="16/9"
54+
sizes="(max-width: 768px) 100vw, 768px"
5255
src="/images/docs/once-ui/vibe-coding-light.jpg"
5356
/>
5457
}
@@ -79,6 +82,7 @@ The `caption` prop renders a `ReactNode` below the image, making it easy to prov
7982
<Media
8083
caption="Vibe code with Quasar! The time is now."
8184
src="/images/docs/once-ui/vibe-coding-light.jpg"
85+
sizes="(max-width: 768px) 100vw, 768px"
8286
alt="Preview"
8387
radius="xl"
8488
border="neutral-alpha-medium"
@@ -109,6 +113,7 @@ Enable full-screen zooming for images and videos.
109113
enlarge
110114
radius="l"
111115
marginTop="16"
116+
sizes="(max-width: 768px) 100vw, 768px"
112117
src="/images/docs/once-ui/vibe-coding-light.jpg"
113118
/>
114119

apps/docs/src/content/once-ui/components/segmentedControl.mdx

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ docs: "once-ui/components/segmentedControl.mdx"
66
github: "components/SegmentedControl.tsx"
77
navLabel: "Segmented Control"
88
navIcon: "components"
9+
navTag: "Update"
10+
navTagVariant: "indigo"
911
---
1012

1113
Use this component for toggle-style selection between discrete options. It supports keyboard interaction, styling, and controlled or uncontrolled usage.
@@ -41,9 +43,48 @@ Use this component for toggle-style selection between discrete options. It suppo
4143
]}
4244
/>
4345

44-
## Default selected
46+
## External state
4547

46-
Use `defaultSelected` to define an initial active button in uncontrolled mode.
48+
Use `selected` to manage the selected state from the parent.
49+
50+
<CodeBlock
51+
marginTop="16"
52+
marginBottom="24"
53+
preview={
54+
<Row fillWidth horizontal="center">
55+
<SegmentedControl
56+
fillWidth={false}
57+
selected="month"
58+
buttons={[
59+
{ value: "day", label: "Day" },
60+
{ value: "week", label: "Week" },
61+
{ value: "month", label: "Month" },
62+
]}
63+
/>
64+
</Row>
65+
}
66+
codes={[
67+
{
68+
code:
69+
`<SegmentedControl
70+
fillWidth={false}
71+
selected="month"
72+
buttons={[
73+
{ value: "day", label: "Day" },
74+
{ value: "week", label: "Week" },
75+
{ value: "month", label: "Month" },
76+
]}
77+
onToggle={(value) => console.log(value)}
78+
/>`,
79+
language: "tsx",
80+
label: "External state"
81+
}
82+
]}
83+
/>
84+
85+
## Internal state
86+
87+
Use `defaultSelected` to define an initial active button in uncontrolled mode. Don't use it along with the `selected` prop.
4788

4889
<CodeBlock
4990
marginTop="16"
@@ -75,7 +116,46 @@ Use `defaultSelected` to define an initial active button in uncontrolled mode.
75116
onToggle={(value) => console.log(value)}
76117
/>`,
77118
language: "tsx",
78-
label: "Default selected"
119+
label: "Internal state"
120+
}
121+
]}
122+
/>
123+
124+
## Compact
125+
126+
Use `compact` to create a compact variant.
127+
128+
<CodeBlock
129+
marginTop="16"
130+
marginBottom="24"
131+
preview={
132+
<Row fillWidth horizontal="center">
133+
<SegmentedControl
134+
compact
135+
defaultSelected="week"
136+
buttons={[
137+
{ value: "day", label: "Day" },
138+
{ value: "week", label: "Week" },
139+
{ value: "month", label: "Month" },
140+
]}
141+
/>
142+
</Row>
143+
}
144+
codes={[
145+
{
146+
code:
147+
`<SegmentedControl
148+
compact
149+
defaultSelected="week"
150+
buttons={[
151+
{ value: "day", label: "Day" },
152+
{ value: "week", label: "Week" },
153+
{ value: "month", label: "Month" },
154+
]}
155+
onToggle={(value) => console.log(value)}
156+
/>`,
157+
language: "tsx",
158+
label: "Compact"
79159
}
80160
]}
81161
/>

0 commit comments

Comments
 (0)