@omni-design/components 0.11.0 → 0.12.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.
Files changed (42) hide show
  1. package/.claude/commands/ScanComponents.md +1 -1
  2. package/.claude/commands/ShareComponent.md +1 -1
  3. package/CLAUDE.md +5 -3
  4. package/dist/index.esm.js +3 -3
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.js +3 -3
  7. package/dist/index.js.map +1 -1
  8. package/dist/types/components/Button/Button.d.ts +3 -1
  9. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +3 -2
  10. package/dist/types/components/Chip/Chip.d.ts +1 -1
  11. package/dist/types/components/IconBadge/IconBadge.d.ts +1 -1
  12. package/dist/types/components/Loader/Loader.d.ts +66 -0
  13. package/dist/types/components/Loader/index.d.ts +1 -0
  14. package/dist/types/components/MiniSwatch/MiniSwatch.d.ts +7 -0
  15. package/dist/types/components/MiniSwatch/index.d.ts +1 -0
  16. package/dist/types/components/Swatch/Swatch.d.ts +14 -0
  17. package/dist/types/components/Swatch/index.d.ts +1 -0
  18. package/dist/types/components/Switch/Switch.d.ts +24 -8
  19. package/dist/types/components/Switch/index.d.ts +1 -1
  20. package/dist/types/components/index.d.ts +5 -0
  21. package/dist/types/docs/DocPanels.d.ts +39 -0
  22. package/dist/types/docs/components.d.ts +212 -0
  23. package/dist/types/docs/componentsData.d.ts +587 -0
  24. package/dist/types/docs/componentsForms.d.ts +597 -0
  25. package/dist/types/docs/componentsNav.d.ts +420 -0
  26. package/dist/types/docs/componentsOverlays.d.ts +379 -0
  27. package/dist/types/docs/componentsRest.d.ts +158 -0
  28. package/dist/types/docs/componentsSurfaces.d.ts +339 -0
  29. package/dist/types/docs/docsLink.d.ts +32 -0
  30. package/dist/types/docs/examples.d.ts +37 -0
  31. package/dist/types/docs/foundations.d.ts +28 -0
  32. package/dist/types/docs/index.d.ts +5 -0
  33. package/docs/components.md +71 -55
  34. package/package.json +1 -1
  35. package/public/styles/Dark-Mode.css +12056 -13009
  36. package/public/styles/Light-Mode.css +11240 -12370
  37. package/public/styles/base.css +364 -182
  38. package/public/styles/core.css +480 -123
  39. package/public/styles/foundation.css +124 -53
  40. package/public/styles/styles.css +5 -5
  41. package/public/styles/theme.json +2 -2
  42. package/public/styles/typography-tokens.css +686 -158
@@ -1,5 +1,5 @@
1
1
  export function normalizeButtonVariant(variant: any): string;
2
- export function Button({ variant, size, elevated, selected, fullWidth, disabled, iconOnly, letterNumber, avatar, swatch, swatchColor, startIcon, endIcon, startDecorator, endDecorator, badge, badgeContent, badgeVariant, badgeSize, badgeDot, badgeMax, badgeAnchorOrigin, children, className, sx, ...props }: {
2
+ export function Button({ variant, size, elevated, selected, fullWidth, disabled, contentType, iconOnly, letterNumber, avatar, swatch, swatchColor, startIcon, endIcon, startDecorator, endDecorator, badge, badgeContent, badgeVariant, badgeSize, badgeDot, badgeMax, badgeAnchorOrigin, children, className, sx, ...props }: {
3
3
  [x: string]: any;
4
4
  variant?: string;
5
5
  size?: string;
@@ -7,6 +7,7 @@ export function Button({ variant, size, elevated, selected, fullWidth, disabled,
7
7
  selected?: boolean;
8
8
  fullWidth?: boolean;
9
9
  disabled?: boolean;
10
+ contentType: any;
10
11
  iconOnly?: boolean;
11
12
  letterNumber?: boolean;
12
13
  avatar?: boolean;
@@ -30,6 +31,7 @@ export function Button({ variant, size, elevated, selected, fullWidth, disabled,
30
31
  className?: string;
31
32
  sx?: {};
32
33
  }): JSX.Element;
34
+ export const BUTTON_CONTENT_TYPES: string[];
33
35
  export function DefaultButton(p: any): JSX.Element;
34
36
  export function DefaultOutlineButton(p: any): JSX.Element;
35
37
  export function PrimaryButton(p: any): JSX.Element;
@@ -1,11 +1,12 @@
1
- export function ButtonGroup({ variant, color, size, disabled, orientation, spacing, fit, fullWidth, equalWidth, multiple, value: controlledValue, defaultValue, onChange, children, className, sx, "aria-label": ariaLabel, ...props }: {
1
+ export function ButtonGroup({ variant, color, size, disabled, orientation, separated, spacing, fit, fullWidth, equalWidth, multiple, value: controlledValue, defaultValue, onChange, children, className, sx, "aria-label": ariaLabel, ...props }: {
2
2
  [x: string]: any;
3
3
  variant?: string;
4
4
  color?: string;
5
5
  size?: string;
6
6
  disabled?: boolean;
7
7
  orientation?: string;
8
- spacing?: number;
8
+ separated?: boolean;
9
+ spacing: any;
9
10
  fit: any;
10
11
  fullWidth?: boolean;
11
12
  equalWidth?: boolean;
@@ -2,7 +2,7 @@ export function normalizeChipVariant(variant: any): string;
2
2
  export function Chip({ variant, size: sizeProp, label, clickable, disabled, selected, selectionMode, onDelete, onClick, startDecorator, endDecorator, children, className, sx, ...props }: {
3
3
  [x: string]: any;
4
4
  variant?: string;
5
- size?: string;
5
+ size: any;
6
6
  label: any;
7
7
  clickable?: boolean;
8
8
  disabled?: boolean;
@@ -3,7 +3,7 @@ export function IconBadge({ children, color, variant, size, className, sx, ...pr
3
3
  children: any;
4
4
  color?: string;
5
5
  variant?: string;
6
- size?: string;
6
+ size: any;
7
7
  className?: string;
8
8
  sx?: {};
9
9
  }): JSX.Element;
@@ -0,0 +1,66 @@
1
+ export function Loader({ theme, surface, size, color, message, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
2
+ [x: string]: any;
3
+ theme: any;
4
+ surface: any;
5
+ size?: string;
6
+ color?: string;
7
+ message?: string;
8
+ sx?: {};
9
+ "aria-label"?: string;
10
+ "aria-labelledby": any;
11
+ }): JSX.Element;
12
+ /**
13
+ * LinearLoader Component
14
+ * Linear progress bar
15
+ *
16
+ * @param {number} value - Progress value 0-100
17
+ * @param {string} label - Optional label
18
+ * @param {object} props - Additional props
19
+ */
20
+ export function LinearLoader({ value, label, sx, ...props }: number): JSX.Element;
21
+ /**
22
+ * SkeletonLoader Component
23
+ * Skeleton placeholder for loading content
24
+ *
25
+ * @param {number} rows - Number of skeleton rows
26
+ * @param {number} height - Height of each skeleton
27
+ * @param {object} props - Additional props
28
+ */
29
+ export function SkeletonLoader({ rows, height, spacing, sx, ...props }: number): JSX.Element;
30
+ /**
31
+ * DotsLoader Component
32
+ * Animated dots loader
33
+ *
34
+ * @param {string} message - Loading message
35
+ * @param {object} props - Additional props
36
+ */
37
+ export function DotsLoader({ message, sx, ...props }: string): JSX.Element;
38
+ /**
39
+ * PageLoader Component
40
+ * Full page loader overlay
41
+ *
42
+ * @param {string} message - Loading message
43
+ * @param {number} size - Loader size
44
+ * @param {object} props - Additional props
45
+ */
46
+ export function PageLoader({ message, size, sx, ...props }: string): JSX.Element;
47
+ /**
48
+ * SkeletonCard Component
49
+ * Skeleton loading state for cards
50
+ *
51
+ * @param {number} lines - Number of text lines
52
+ * @param {boolean} showImage - Show image skeleton
53
+ * @param {object} props - Additional props
54
+ */
55
+ export function SkeletonCard({ lines, showImage, sx, ...props }: number): JSX.Element;
56
+ /**
57
+ * OverlayLoader Component
58
+ * Loader overlay for async operations
59
+ *
60
+ * @param {boolean} isLoading - Show loader
61
+ * @param {string} message - Loading message
62
+ * @param {ReactNode} children - Content to overlay
63
+ * @param {object} props - Additional props
64
+ */
65
+ export function OverlayLoader({ isLoading, message, children, sx, ...props }: boolean): JSX.Element;
66
+ export default Loader;
@@ -0,0 +1 @@
1
+ export { Loader, LinearLoader, SkeletonLoader, DotsLoader, PageLoader, SkeletonCard, OverlayLoader, default } from "./Loader";
@@ -0,0 +1,7 @@
1
+ export function MiniSwatch({ color, className, sx, ...props }: {
2
+ [x: string]: any;
3
+ color: any;
4
+ className?: string;
5
+ sx?: {};
6
+ }): JSX.Element;
7
+ export default MiniSwatch;
@@ -0,0 +1 @@
1
+ export { MiniSwatch, default } from "./MiniSwatch";
@@ -0,0 +1,14 @@
1
+ export function Swatch({ color, label, size, selected, disabled, radio, onClick, className, sx, "aria-label": ariaLabel, ...props }: {
2
+ [x: string]: any;
3
+ color: any;
4
+ label: any;
5
+ size?: string;
6
+ selected?: boolean;
7
+ disabled?: boolean;
8
+ radio?: boolean;
9
+ onClick: any;
10
+ className?: string;
11
+ sx?: {};
12
+ "aria-label": any;
13
+ }): JSX.Element;
14
+ export default Swatch;
@@ -0,0 +1 @@
1
+ export { Swatch, default } from "./Swatch";
@@ -1,3 +1,27 @@
1
+ export function themedStyles(): {
2
+ type: string;
3
+ trackOff: string;
4
+ trackOffBorder: string;
5
+ trackOn: string;
6
+ trackOnBorder: string;
7
+ dotOff: string;
8
+ dotOn: string;
9
+ iconOff: string;
10
+ iconOn: string;
11
+ };
12
+ export function outlineStyles(color: any): {
13
+ type: string;
14
+ color: any;
15
+ trackOff: string;
16
+ trackOffBorder: string;
17
+ trackOn: string;
18
+ trackOnBorder: string;
19
+ dotOff: string;
20
+ dotOn: string;
21
+ iconOff: string;
22
+ iconOn: string;
23
+ };
24
+ export function normalizeSwitchVariant(variant: any): string;
1
25
  export function Switch({ variant, size, checked, defaultChecked, onChange, disabled, label, labelPlacement, name, value, icon, iconOn, iconOff, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
2
26
  [x: string]: any;
3
27
  variant?: string;
@@ -34,14 +58,6 @@ export function InfoOutlineSwitch(p: any): JSX.Element;
34
58
  export function SuccessOutlineSwitch(p: any): JSX.Element;
35
59
  export function WarningOutlineSwitch(p: any): JSX.Element;
36
60
  export function ErrorOutlineSwitch(p: any): JSX.Element;
37
- export function PrimaryLightSwitch(p: any): JSX.Element;
38
- export function SecondaryLightSwitch(p: any): JSX.Element;
39
- export function TertiaryLightSwitch(p: any): JSX.Element;
40
- export function NeutralLightSwitch(p: any): JSX.Element;
41
- export function InfoLightSwitch(p: any): JSX.Element;
42
- export function SuccessLightSwitch(p: any): JSX.Element;
43
- export function WarningLightSwitch(p: any): JSX.Element;
44
- export function ErrorLightSwitch(p: any): JSX.Element;
45
61
  export function SwitchInput({ variant, size, checked, defaultChecked, onChange, disabled, label, labelPlacement, name, value, icon, iconOn, iconOff, className, sx, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...props }: {
46
62
  [x: string]: any;
47
63
  variant?: string;
@@ -1,2 +1,2 @@
1
1
  export { SwitchShowcase } from "./SwitchShowcase";
2
- export { Switch, SwitchInput, PrimarySwitch, SecondarySwitch, TertiarySwitch, NeutralSwitch, InfoSwitch, SuccessSwitch, WarningSwitch, ErrorSwitch, PrimaryOutlineSwitch, SecondaryOutlineSwitch, TertiaryOutlineSwitch, NeutralOutlineSwitch, InfoOutlineSwitch, SuccessOutlineSwitch, WarningOutlineSwitch, ErrorOutlineSwitch, PrimaryLightSwitch, SecondaryLightSwitch, TertiaryLightSwitch, NeutralLightSwitch, InfoLightSwitch, SuccessLightSwitch, WarningLightSwitch, ErrorLightSwitch, default } from "./Switch";
2
+ export { Switch, SwitchInput, PrimarySwitch, SecondarySwitch, TertiarySwitch, NeutralSwitch, InfoSwitch, SuccessSwitch, WarningSwitch, ErrorSwitch, PrimaryOutlineSwitch, SecondaryOutlineSwitch, TertiaryOutlineSwitch, NeutralOutlineSwitch, InfoOutlineSwitch, SuccessOutlineSwitch, WarningOutlineSwitch, ErrorOutlineSwitch, default } from "./Switch";
@@ -1,5 +1,7 @@
1
1
  export { Colors } from "./Colors";
2
2
  export { Spacing } from "./Spacing";
3
+ export { Swatch } from "./Swatch";
4
+ export { MiniSwatch } from "./MiniSwatch";
3
5
  export { IconBadge } from "./IconBadge";
4
6
  export { IconBadgeShowcase } from "./IconBadge/IconBadgeShowcase";
5
7
  export { Button } from "./Button";
@@ -42,6 +44,7 @@ export { SwitchInput, SwitchInput as Switch } from "./Switch";
42
44
  export { SliderInput, RangeSlider, SliderInput as Slider } from "./Slider";
43
45
  export { RatingInput, RatingInput as Rating } from "./Rating";
44
46
  export { SearchField, SearchFieldShowcase } from "./SearchField";
47
+ export { Tag, TAG_COLORS, TAG_COLOR_TOKEN_MAP, PrimaryTag, SecondaryTag, TertiaryTag, NeutralTag, InfoTag, SuccessTag, WarningTag, ErrorTag, TagShowcase } from "./Tag";
45
48
  export { OmniStack, Stack, HStack, VStack, CenteredStack, SpaceBetweenStack, WrapStack, ResponsiveStack, GridStack, StackDivider, InsetStack, ScrollStack, StackShowcase } from "./Stack";
46
49
  export { Box, BoxShowcase } from "./Box";
47
50
  export { Section, SectionShowcase } from "./Section";
@@ -61,6 +64,7 @@ export { Alert, AlertShowcase } from "./Alert";
61
64
  export { Snackbar, SnackbarShowcase } from "./Snackbar";
62
65
  export { CircularProgress, CircularProgressShowcase } from "./CircularProgress";
63
66
  export { LinearProgress, LinearProgressShowcase } from "./LinearProgress";
67
+ export { Loader, LinearLoader, SkeletonLoader, DotsLoader, PageLoader, SkeletonCard, OverlayLoader } from "./Loader";
64
68
  export { Avatar, AvatarGroup, AvatarShowcase, DEFAULT_AVATAR_SRC } from "./Avatar";
65
69
  export { Badge, BadgeShowcase } from "./Badge";
66
70
  export { List, ListItem, ListItemDecorator } from "./List";
@@ -75,3 +79,4 @@ export { OmniDesignProvider, useOmniDesign, ThemedZone, Surfaced } from "../Omni
75
79
  export { CodeBlock, CopyButton } from "./CodeBlock/CodeBlock";
76
80
  export { BarChart, LineChart, PieChart, CHART_TOKENS, CHART_LABEL_TYPE } from "./Charts";
77
81
  export { Ghost, useGhost, ghostBlockSx } from "./_ghost";
82
+ export { COMPONENT_DOCS, FOUNDATIONS, renderFoundations, renderColourSystem, renderComponentDoc, COLOUR_COLLECTIONS, docsSlug, componentDocsUrl, componentDocsIndexUrl, DOCS_ORIGIN, EXAMPLES, hasExample } from "../docs";
@@ -0,0 +1,39 @@
1
+ export function docFor(component: any): {
2
+ name: any;
3
+ summary: any;
4
+ insteadUse: any;
5
+ props: any;
6
+ states: any;
7
+ theming: {
8
+ collection: string;
9
+ inCode: string;
10
+ inFigma: string;
11
+ }[];
12
+ tokens: any;
13
+ composition: any;
14
+ accessibility: any;
15
+ gotchas: any;
16
+ };
17
+ /**
18
+ * Everything written about the component, in reading order — led by ONE live
19
+ * example.
20
+ *
21
+ * The example is here because a page of prose gives no recognition: you cannot
22
+ * tell what a component IS from its prop table. It renders in the theme and
23
+ * surface currently selected, so the picture matches the pickers rather than
24
+ * showing some other configuration. It is the default instance and is not
25
+ * interactive — the Playground tab is where you change things.
26
+ *
27
+ * Components that need state or a portal to be shown honestly (Modal, Drawer,
28
+ * Snackbar) have no example, and simply lead with the summary instead of
29
+ * rendering a half-working one.
30
+ */
31
+ export function DocSummary({ component, theme, surface }: {
32
+ component: any;
33
+ theme?: any;
34
+ surface?: string;
35
+ }): JSX.Element;
36
+ /** Breaking and silent changes, newest first, plus a way to report one. */
37
+ export function DocChanges({ component }: {
38
+ component: any;
39
+ }): JSX.Element;
@@ -0,0 +1,212 @@
1
+ export namespace BUTTON_DOC {
2
+ let name: string;
3
+ let summary: string;
4
+ let insteadUse: {
5
+ when: string;
6
+ use: string;
7
+ }[];
8
+ let props: ({
9
+ name: string;
10
+ type: string;
11
+ default: string;
12
+ values: string[];
13
+ note: string;
14
+ } | {
15
+ name: string;
16
+ type: string;
17
+ values: string[];
18
+ default: string;
19
+ note?: undefined;
20
+ } | {
21
+ name: string;
22
+ type: string;
23
+ default: string;
24
+ note: string;
25
+ values?: undefined;
26
+ } | {
27
+ name: string;
28
+ type: string;
29
+ default: string;
30
+ values?: undefined;
31
+ note?: undefined;
32
+ })[];
33
+ let states: ({
34
+ state: string;
35
+ setBy: string;
36
+ note?: undefined;
37
+ } | {
38
+ state: string;
39
+ setBy: string;
40
+ note: string;
41
+ })[];
42
+ let theming: {
43
+ collection: string;
44
+ inCode: string;
45
+ inFigma: string;
46
+ }[];
47
+ let themingNotes: string[];
48
+ let tokens: {
49
+ name: string;
50
+ sets: string;
51
+ variesWith: string;
52
+ figma: string;
53
+ }[];
54
+ let composition: string[];
55
+ let accessibility: string[];
56
+ let gotchas: string[];
57
+ let changes: ({
58
+ version: string;
59
+ change: string;
60
+ migrate: string;
61
+ silent: boolean;
62
+ } | {
63
+ version: string;
64
+ change: string;
65
+ silent: boolean;
66
+ migrate?: undefined;
67
+ })[];
68
+ }
69
+ export namespace TABS_DOC {
70
+ let name_1: string;
71
+ export { name_1 as name };
72
+ let summary_1: string;
73
+ export { summary_1 as summary };
74
+ let insteadUse_1: {
75
+ when: string;
76
+ use: string;
77
+ }[];
78
+ export { insteadUse_1 as insteadUse };
79
+ let props_1: ({
80
+ name: string;
81
+ type: string;
82
+ default: string;
83
+ note: string;
84
+ values?: undefined;
85
+ } | {
86
+ name: string;
87
+ type: string;
88
+ values: string[];
89
+ default: string;
90
+ note: string;
91
+ } | {
92
+ name: string;
93
+ type: string;
94
+ values: string[];
95
+ default: string;
96
+ note?: undefined;
97
+ } | {
98
+ name: string;
99
+ type: string;
100
+ default: string;
101
+ note?: undefined;
102
+ values?: undefined;
103
+ })[];
104
+ export { props_1 as props };
105
+ let states_1: ({
106
+ state: string;
107
+ setBy: string;
108
+ note: string;
109
+ } | {
110
+ state: string;
111
+ setBy: string;
112
+ note?: undefined;
113
+ })[];
114
+ export { states_1 as states };
115
+ let theming_1: {
116
+ collection: string;
117
+ inCode: string;
118
+ inFigma: string;
119
+ }[];
120
+ export { theming_1 as theming };
121
+ let tokens_1: {
122
+ name: string;
123
+ sets: string;
124
+ variesWith: string;
125
+ figma: string;
126
+ }[];
127
+ export { tokens_1 as tokens };
128
+ let composition_1: string[];
129
+ export { composition_1 as composition };
130
+ let accessibility_1: string[];
131
+ export { accessibility_1 as accessibility };
132
+ let gotchas_1: string[];
133
+ export { gotchas_1 as gotchas };
134
+ }
135
+ export namespace CARD_DOC {
136
+ let name_2: string;
137
+ export { name_2 as name };
138
+ let summary_2: string;
139
+ export { summary_2 as summary };
140
+ let insteadUse_2: {
141
+ when: string;
142
+ use: string;
143
+ }[];
144
+ export { insteadUse_2 as insteadUse };
145
+ let props_2: ({
146
+ name: string;
147
+ type: string;
148
+ values: string[];
149
+ default: string;
150
+ note?: undefined;
151
+ } | {
152
+ name: string;
153
+ type: string;
154
+ default: string;
155
+ values?: undefined;
156
+ note?: undefined;
157
+ } | {
158
+ name: string;
159
+ type: string;
160
+ default: string;
161
+ note: string;
162
+ values?: undefined;
163
+ })[];
164
+ export { props_2 as props };
165
+ let states_2: ({
166
+ state: string;
167
+ setBy: string;
168
+ note: string;
169
+ } | {
170
+ state: string;
171
+ setBy: string;
172
+ note?: undefined;
173
+ })[];
174
+ export { states_2 as states };
175
+ let theming_2: {
176
+ collection: string;
177
+ inCode: string;
178
+ inFigma: string;
179
+ }[];
180
+ export { theming_2 as theming };
181
+ let themingNotes_1: string[];
182
+ export { themingNotes_1 as themingNotes };
183
+ let tokens_2: {
184
+ name: string;
185
+ sets: string;
186
+ variesWith: string;
187
+ figma: string;
188
+ }[];
189
+ export { tokens_2 as tokens };
190
+ let composition_2: string[];
191
+ export { composition_2 as composition };
192
+ let accessibility_2: string[];
193
+ export { accessibility_2 as accessibility };
194
+ let gotchas_2: string[];
195
+ export { gotchas_2 as gotchas };
196
+ }
197
+ export const COMPONENT_DOCS: {
198
+ name: any;
199
+ summary: any;
200
+ insteadUse: any;
201
+ props: any;
202
+ states: any;
203
+ theming: {
204
+ collection: string;
205
+ inCode: string;
206
+ inFigma: string;
207
+ }[];
208
+ tokens: any;
209
+ composition: any;
210
+ accessibility: any;
211
+ gotchas: any;
212
+ }[];