tinywidgets 1.4.0 → 1.6.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 (33) hide show
  1. package/package.json +15 -11
  2. package/src/components/App/index.css.ts +35 -26
  3. package/src/components/App/index.tsx +31 -6
  4. package/src/components/Axis/index.css.ts +1 -1
  5. package/src/components/Button/index.css.ts +37 -23
  6. package/src/components/Button/index.tsx +14 -0
  7. package/src/components/Card/index.css.ts +2 -2
  8. package/src/components/Checkbox/index.css.ts +27 -8
  9. package/src/components/Checkbox/index.tsx +17 -2
  10. package/src/components/Code/index.css.ts +2 -2
  11. package/src/components/Collapsible/index.css.ts +6 -6
  12. package/src/components/Detail/index.css.ts +2 -2
  13. package/src/components/Flyout/index.css.ts +5 -5
  14. package/src/components/Hr/index.css.ts +1 -1
  15. package/src/components/Image/index.css.ts +12 -12
  16. package/src/components/Loading/index.css.ts +84 -0
  17. package/src/components/Loading/index.tsx +137 -0
  18. package/src/components/Row/index.css.ts +8 -8
  19. package/src/components/Select/index.css.ts +20 -9
  20. package/src/components/Select/index.tsx +22 -3
  21. package/src/components/Summary/index.css.ts +1 -1
  22. package/src/components/Table/index.css.ts +8 -8
  23. package/src/components/Tag/index.css.ts +8 -8
  24. package/src/components/TextInput/index.css.ts +48 -17
  25. package/src/components/TextInput/index.tsx +39 -5
  26. package/src/css/classes.css.ts +42 -0
  27. package/src/css/code.css.ts +18 -18
  28. package/src/css/colors.css.ts +17 -17
  29. package/src/css/dimensions.css.ts +2 -2
  30. package/src/css/global.css.ts +2 -2
  31. package/src/index.css.ts +1 -0
  32. package/src/index.ts +6 -1
  33. package/src/stores/RouteStore.tsx +52 -14
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tinywidgets",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "author": "jamesgpearce",
5
5
  "repository": "github:tinyplex/tinywidgets",
6
6
  "license": "MIT",
@@ -22,26 +22,30 @@
22
22
  "@eslint/js": "^9.30.1",
23
23
  "@types/react": "^19.2.14",
24
24
  "@types/react-dom": "^19.2.3",
25
- "cspell": "^9.7.0",
25
+ "cspell": "^10.0.0",
26
26
  "eslint": "^9.30.1",
27
27
  "eslint-plugin-import": "^2.32.0",
28
28
  "eslint-plugin-react": "^7.37.5",
29
29
  "eslint-plugin-react-hooks": "^5.2.0",
30
- "globals": "^17.4.0",
31
- "prettier": "^3.8.1",
30
+ "globals": "^17.5.0",
31
+ "prettier": "^3.8.3",
32
32
  "prettier-plugin-organize-imports": "^4.3.0",
33
- "typescript": "^5.9.3",
34
- "typescript-eslint": "^8.57.1"
33
+ "react": "^19.2.5",
34
+ "react-dom": "^19.2.5",
35
+ "typescript": "^6.0.3",
36
+ "typescript-eslint": "^8.58.2"
35
37
  },
36
38
  "exports": {
37
39
  ".": "./src/index.ts",
38
40
  "./css": "./src/index.css.ts"
39
41
  },
40
42
  "dependencies": {
41
- "@vanilla-extract/css": "^1.20.0",
42
- "lucide-react": "^0.577.0",
43
+ "@vanilla-extract/css": "^1.20.1",
44
+ "lucide-react": "^1.8.0",
45
+ "tinybase": "^8.2.0"
46
+ },
47
+ "peerDependencies": {
43
48
  "react": "^19.2.4",
44
- "react-dom": "^19.2.4",
45
- "tinybase": "^8.0.2"
49
+ "react-dom": "^19.2.4"
46
50
  }
47
- }
51
+ }
@@ -12,27 +12,29 @@ export const appLayout = style({
12
12
  });
13
13
 
14
14
  export const header = style({
15
- justifyContent: 'space-between',
16
- gap: dimensions.padding,
17
- padding: dimensions.padding,
18
- position: 'fixed',
19
- boxShadow: colors.shadow,
20
15
  backdropFilter: 'blur(8px)',
21
16
  backgroundColor: colors.backgroundHaze,
17
+ borderBottom: colors.border,
18
+ boxShadow: colors.shadow,
19
+ gap: dimensions.padding,
20
+ height: dimensions.topNavHeight,
21
+ justifyContent: 'space-between',
22
22
  left: 0,
23
+ padding: dimensions.padding,
24
+ position: 'fixed',
23
25
  right: 0,
24
- height: dimensions.topNavHeight,
25
- borderBottom: colors.border,
26
26
  zIndex: 2,
27
27
  });
28
28
 
29
29
  export const topNav = style({
30
- justifyContent: 'space-between',
31
- gap: dimensions.padding,
32
30
  flex: 1,
31
+ gap: dimensions.padding,
32
+ justifyContent: 'space-between',
33
33
  });
34
34
 
35
- export const sideNavButton = style(large({display: 'none!important'}));
35
+ export const sideNavButtonResponsive = style(
36
+ large({display: 'none!important'}),
37
+ );
36
38
 
37
39
  export const title = style({
38
40
  ...large({
@@ -41,26 +43,29 @@ export const title = style({
41
43
  });
42
44
 
43
45
  export const sideNav = style({
44
- position: 'fixed',
45
- padding: dimensions.padding,
46
46
  backgroundColor: colors.background2,
47
- overflow: 'auto',
48
47
  borderRight: colors.border,
49
- width: dimensions.sideNavWidth,
50
48
  bottom: 0,
51
- left: `calc(-1.2 * ${dimensions.sideNavWidth})`,
52
- top: dimensions.topNavHeight,
53
49
  height: `calc(100dvh - ${dimensions.topNavHeight})`,
50
+ left: `calc(-1.2 * ${dimensions.sideNavWidth})`,
51
+ overflow: 'auto',
54
52
  overscrollBehavior: 'contain',
53
+ padding: dimensions.padding,
54
+ position: 'fixed',
55
+ top: dimensions.topNavHeight,
55
56
  transition: 'left .2s ease-in-out',
56
- ...large({left: 0}),
57
+ width: dimensions.sideNavWidth,
57
58
  });
58
59
 
59
60
  export const sideNavOpen = style({left: 0});
60
61
 
62
+ export const sideNavResponsive = style(large({left: 0}));
63
+
64
+ export const sideNavNever = style({left: 0});
65
+
61
66
  export const main = style({
62
- flex: 1,
63
67
  backgroundColor: colors.background,
68
+ flex: 1,
64
69
  overflow: 'auto',
65
70
  padding: dimensions.padding,
66
71
  paddingTop: `calc(${dimensions.topNavHeight} + ${dimensions.padding})`,
@@ -72,22 +77,26 @@ export const mainHasSideNav = style(
72
77
  }),
73
78
  );
74
79
 
80
+ export const mainHasSideNavNever = style({
81
+ paddingLeft: `calc(${dimensions.sideNavWidth} + ${dimensions.padding})`,
82
+ });
83
+
75
84
  export const mainHasFooter = style({
76
85
  paddingBottom: `calc(${dimensions.footerHeight} + ${dimensions.padding})`,
77
86
  });
78
87
 
79
88
  export const footer = style({
80
- justifyContent: 'right',
89
+ backdropFilter: 'blur(8px)',
90
+ backgroundColor: colors.backgroundHaze,
91
+ borderTop: colors.border,
92
+ bottom: 0,
93
+ boxShadow: colors.shadow,
81
94
  gap: dimensions.padding,
95
+ height: dimensions.footerHeight,
96
+ justifyContent: 'right',
97
+ left: 0,
82
98
  paddingLeft: dimensions.padding,
83
99
  paddingRight: dimensions.padding,
84
100
  position: 'fixed',
85
- bottom: 0,
86
- left: 0,
87
101
  right: 0,
88
- height: dimensions.footerHeight,
89
- backgroundColor: colors.backgroundHaze,
90
- borderTop: colors.border,
91
- boxShadow: colors.shadow,
92
- backdropFilter: 'blur(8px)',
93
102
  });
@@ -35,9 +35,12 @@ import {
35
35
  main,
36
36
  mainHasFooter,
37
37
  mainHasSideNav,
38
+ mainHasSideNavNever,
38
39
  sideNav,
39
- sideNavButton,
40
+ sideNavButtonResponsive,
41
+ sideNavNever,
40
42
  sideNavOpen,
43
+ sideNavResponsive,
41
44
  title,
42
45
  topNav,
43
46
  } from './index.css.ts';
@@ -46,6 +49,7 @@ const {Provider} = UiReact as UiReact.WithSchemas<OptionalSchemas>;
46
49
 
47
50
  const darkIcons = [Sun, Moon, SunMoon];
48
51
  const darkChoices = ['Light always', 'Dark always', 'Auto'];
52
+ type SideNavToggle = 'never' | 'responsive' | 'always';
49
53
 
50
54
  /**
51
55
  * The `App` component is the root component of a TinyWidgets application.
@@ -83,10 +87,17 @@ export const App = (props: {
83
87
  */
84
88
  readonly topNavRight?: ComponentType | ReactNode;
85
89
  /**
86
- * An optional component, element, or string which renders the left side bar
87
- * of the application.
90
+ * An optional component, element, or string which renders the left side
91
+ * navigation of the application.
88
92
  */
89
93
  readonly sideNav?: ComponentType | ReactNode;
94
+ /**
95
+ * Whether the side navigation can toggle. One of:
96
+ * - `never`: always show the side navigation.
97
+ * - `responsive`: toggle the side navigation on narrow screens only; default.
98
+ * - `always`: toggle the side navigation at all screen widths.
99
+ */
100
+ readonly sideNavToggle?: SideNavToggle;
90
101
  /**
91
102
  * An optional component, element, or string which renders the main part of
92
103
  * the application.
@@ -122,6 +133,7 @@ const Layout = ({
122
133
  topNavLeft: topNavLeftComponentOrNode,
123
134
  topNavRight: topNavRightComponentOrNode,
124
135
  sideNav: sideNavComponentOrNode,
136
+ sideNavToggle = 'responsive',
125
137
  main: mainComponentOrNode,
126
138
  footer: footerComponentOrNode,
127
139
  className,
@@ -148,6 +160,8 @@ const Layout = ({
148
160
  ].some((componentOrNode) => componentOrNode);
149
161
  const hasSideNav = sideNavComponentOrNode != null;
150
162
  const hasFooter = footerComponentOrNode != null;
163
+ const sideNavCanToggle = hasSideNav && sideNavToggle != 'never';
164
+ const sideNavIsAlwaysVisible = hasSideNav && sideNavToggle == 'never';
151
165
 
152
166
  const ref = useRef<HTMLDivElement>(null);
153
167
 
@@ -167,12 +181,16 @@ const Layout = ({
167
181
  {sessionStoreIsReady && routeStoreIsReady && localStoreIsReady ? (
168
182
  <>
169
183
  <Axis as="header" className={header}>
170
- {hasSideNav ? (
184
+ {sideNavCanToggle ? (
171
185
  <Button
172
186
  variant="icon"
173
187
  onClick={toggleSideNavIsOpen}
174
188
  icon={sideNavIsOpen ? X : Menu}
175
- className={sideNavButton}
189
+ className={
190
+ sideNavToggle == 'responsive'
191
+ ? sideNavButtonResponsive
192
+ : undefined
193
+ }
176
194
  />
177
195
  ) : null}
178
196
  <nav className={title}>
@@ -192,6 +210,8 @@ const Layout = ({
192
210
  <nav
193
211
  className={classNames(
194
212
  sideNav,
213
+ sideNavToggle == 'responsive' && sideNavResponsive,
214
+ sideNavIsAlwaysVisible && sideNavNever,
195
215
  sideNavIsOpen && sideNavOpen,
196
216
  )}
197
217
  >
@@ -202,7 +222,12 @@ const Layout = ({
202
222
  <main
203
223
  className={classNames(
204
224
  main,
205
- hasSideNav && mainHasSideNav,
225
+ hasSideNav &&
226
+ (sideNavToggle == 'never'
227
+ ? mainHasSideNavNever
228
+ : sideNavToggle == 'responsive'
229
+ ? mainHasSideNav
230
+ : false),
206
231
  hasFooter && mainHasFooter,
207
232
  )}
208
233
  >
@@ -1,8 +1,8 @@
1
1
  import {style, styleVariants} from '@vanilla-extract/css';
2
2
 
3
3
  export const axis = style({
4
- display: 'flex',
5
4
  alignItems: 'center',
5
+ display: 'flex',
6
6
  });
7
7
 
8
8
  export const axisVariants = styleVariants({
@@ -1,45 +1,43 @@
1
- import {style, styleVariants} from '@vanilla-extract/css';
1
+ import {createVar, style, styleVariants} from '@vanilla-extract/css';
2
2
  import {colors} from '../../css/colors.css';
3
3
  import {dimensions} from '../../css/dimensions.css';
4
4
 
5
+ const titleFlex = createVar();
6
+
5
7
  export const button = style({
6
- display: 'inline-flex',
7
- justifyContent: 'space-between',
8
8
  alignItems: 'center',
9
- gap: dimensions.padding,
9
+ alignSelf: 'center',
10
+ background: 'none',
11
+ border: '1px solid transparent',
10
12
  borderRadius: dimensions.radius,
11
- textAlign: 'left',
12
- cursor: 'pointer',
13
- padding: '0.5rem 1rem',
14
- outlineOffset: '-2px',
15
13
  color: 'inherit',
16
- fontWeight: 'inherit',
14
+ cursor: 'pointer',
15
+ display: 'inline-flex',
16
+ flexShrink: 0,
17
17
  fontFamily: 'inherit',
18
+ fontWeight: 'inherit',
19
+ gap: dimensions.padding,
20
+ justifyContent: 'space-between',
21
+ outlineOffset: '-2px',
18
22
  overflow: 'hidden',
19
- whiteSpace: 'nowrap',
20
- transition: 'background-color 0.1s,border-color 0.1s',
21
- flexShrink: 0,
22
- border: '1px solid transparent',
23
- alignSelf: 'center',
24
- background: 'none',
23
+ padding: '0.5rem 1rem',
25
24
  selectors: {
26
25
  '&:hover': {
27
26
  backgroundColor: colors.backgroundHover,
28
27
  color: colors.foregroundBright,
29
28
  },
30
29
  },
30
+ textAlign: 'left',
31
+ transition: 'background-color 0.1s,border-color 0.1s',
32
+ vars: {[titleFlex]: '1 1 auto'},
33
+ whiteSpace: 'nowrap',
31
34
  });
32
35
 
33
36
  export const buttonVariants = styleVariants({
34
- default: {
35
- boxShadow: colors.shadow,
36
- border: colors.border,
37
- backgroundColor: colors.background,
38
- },
39
37
  accent: {
40
- boxShadow: colors.shadow,
41
38
  backgroundColor: colors.accent,
42
39
  border: colors.border,
40
+ boxShadow: colors.shadow,
43
41
  color: colors.accentContrast,
44
42
  selectors: {
45
43
  '&:hover': {
@@ -47,9 +45,25 @@ export const buttonVariants = styleVariants({
47
45
  },
48
46
  },
49
47
  },
48
+ default: {
49
+ backgroundColor: colors.background,
50
+ border: colors.border,
51
+ boxShadow: colors.shadow,
52
+ },
50
53
  ghost: {},
51
- item: {width: '100%'},
52
54
  icon: {padding: '0.25rem'},
55
+ item: {width: '100%'},
56
+ toolbar: {
57
+ alignItems: 'center',
58
+ backgroundColor: colors.background,
59
+ border: colors.border,
60
+ boxShadow: colors.shadow,
61
+ flexDirection: 'column',
62
+ gap: '0.25rem',
63
+ justifyContent: 'center',
64
+ textAlign: 'center',
65
+ vars: {[titleFlex]: '0 1 auto'},
66
+ },
53
67
  });
54
68
 
55
69
  export const currentStyle = style({
@@ -58,7 +72,7 @@ export const currentStyle = style({
58
72
  });
59
73
 
60
74
  export const titleStyle = style({
61
- flex: '1 1 auto',
75
+ flex: titleFlex,
62
76
  overflow: 'hidden',
63
77
  textOverflow: 'ellipsis',
64
78
  });
@@ -101,6 +101,16 @@ import {
101
101
  * ```
102
102
  * This example shows the `item` variant of the Button component, marked as
103
103
  * 'current'.
104
+ * @example
105
+ * ```tsx
106
+ * <Button
107
+ * variant="toolbar"
108
+ * icon={Lucide.Grid3x3}
109
+ * title="New Grid"
110
+ * />
111
+ * ```
112
+ * This example shows the `toolbar` variant of the Button component, with the
113
+ * icon stacked above the title.
104
114
  * @icon Lucide.RectangleHorizontal
105
115
  */
106
116
  export const Button = ({
@@ -148,6 +158,7 @@ export const Button = ({
148
158
  * - `accent`
149
159
  * - `ghost`
150
160
  * - `item`
161
+ * - `toolbar`
151
162
  */
152
163
  readonly variant?: keyof typeof buttonVariants;
153
164
  /**
@@ -172,6 +183,9 @@ export const Button = ({
172
183
  * An name for the component to be used as an anchor for other elements.
173
184
  */
174
185
  readonly anchorName?: string;
186
+ /**
187
+ * A ref to the underlying button element.
188
+ */
175
189
  ref?: React.RefObject<HTMLButtonElement | null>;
176
190
  }) => {
177
191
  const hrefClick = useCallback(
@@ -3,10 +3,10 @@ import {colors} from '../../css/colors.css';
3
3
  import {dimensions} from '../../css/dimensions.css';
4
4
 
5
5
  export const card = style({
6
- padding: dimensions.padding,
6
+ border: colors.border,
7
7
  borderRadius: dimensions.radius,
8
8
  boxShadow: colors.shadow,
9
- border: colors.border,
10
9
  height: 'fit-content',
11
10
  overflow: 'auto',
11
+ padding: dimensions.padding,
12
12
  });
@@ -1,14 +1,33 @@
1
- import {style} from '@vanilla-extract/css';
1
+ import {globalStyle, style, styleVariants} from '@vanilla-extract/css';
2
2
  import {dimensions} from '../../css/dimensions.css';
3
3
  import {colors} from '../../index.css';
4
4
 
5
5
  export const checkbox = style({
6
- display: 'inline-block',
7
- boxShadow: colors.shadow + ' inset',
8
- borderRadius: dimensions.radius,
6
+ alignItems: 'center',
9
7
  border: colors.border,
10
- padding: '0.5rem',
11
- height: '2rem',
12
- width: '2rem',
13
- margin: '5px',
8
+ borderRadius: dimensions.radius,
9
+ boxSizing: 'border-box',
10
+ boxShadow: colors.shadow + ' inset',
11
+ display: 'inline-flex',
12
+ justifyContent: 'center',
13
+ });
14
+
15
+ export const checkboxVariants = styleVariants({
16
+ default: {
17
+ height: '2.5rem',
18
+ margin: 0,
19
+ padding: '0.5rem',
20
+ width: '2.5rem',
21
+ },
22
+ small: {
23
+ height: '1.5rem',
24
+ margin: 0,
25
+ padding: '0.25rem',
26
+ width: '1.5rem',
27
+ },
28
+ });
29
+
30
+ globalStyle(`${checkboxVariants.small} svg`, {
31
+ height: '0.85rem',
32
+ width: '0.85rem',
14
33
  });
@@ -2,7 +2,7 @@ import {LucideCheck} from 'lucide-react';
2
2
  import {useCallback, useState} from 'react';
3
3
  import {classNames} from '../../common/functions.tsx';
4
4
  import {Button} from '../Button/index.tsx';
5
- import {checkbox} from './index.css.ts';
5
+ import {checkbox, checkboxVariants} from './index.css.ts';
6
6
 
7
7
  /**
8
8
  * The `Checkbox` component displays a managed checkbox with an optional default
@@ -23,6 +23,11 @@ import {checkbox} from './index.css.ts';
23
23
  * />
24
24
  * ```
25
25
  * This example shows the Checkbox component with a default checked state.
26
+ * @example
27
+ * ```tsx
28
+ * <Checkbox variant="small" />
29
+ * ```
30
+ * This example shows the `small` variant of the Checkbox component.
26
31
  * @icon Lucide.LucideCheckSquare
27
32
  */
28
33
  export const Checkbox = ({
@@ -30,6 +35,7 @@ export const Checkbox = ({
30
35
  onChange,
31
36
  alt,
32
37
  className,
38
+ variant = 'default',
33
39
  ref,
34
40
  }: {
35
41
  /**
@@ -48,6 +54,15 @@ export const Checkbox = ({
48
54
  * An extra CSS class name for the component.
49
55
  */
50
56
  readonly className?: string;
57
+ /**
58
+ * A variant of the checkbox, one of:
59
+ * - `default`
60
+ * - `small`
61
+ */
62
+ readonly variant?: keyof typeof checkboxVariants;
63
+ /**
64
+ * A ref to the underlying button element.
65
+ */
51
66
  ref?: React.RefObject<HTMLButtonElement | null>;
52
67
  }) => {
53
68
  const [checked, setChecked] = useState(initialChecked ?? false);
@@ -57,7 +72,7 @@ export const Checkbox = ({
57
72
  }, [checked, onChange]);
58
73
  return (
59
74
  <Button
60
- className={classNames(checkbox, className)}
75
+ className={classNames(checkbox, checkboxVariants[variant], className)}
61
76
  onClick={handleClick}
62
77
  alt={alt}
63
78
  ref={ref}
@@ -4,12 +4,12 @@ import {colors} from '../../css/colors.css';
4
4
  import {dimensions} from '../../css/dimensions.css';
5
5
 
6
6
  export const pre = style({
7
- padding: dimensions.padding,
8
- borderRadius: dimensions.radius,
9
7
  background: colors.background2,
10
8
  border: colors.border,
9
+ borderRadius: dimensions.radius,
11
10
  lineHeight: '1.25rem',
12
11
  overflowX: 'auto',
12
+ padding: dimensions.padding,
13
13
  });
14
14
 
15
15
  globalStyle('.token.comment, .token.prolog, .token.cdata', {
@@ -3,21 +3,21 @@ import {colors} from '../../css/colors.css';
3
3
  import {dimensions} from '../../css/dimensions.css';
4
4
 
5
5
  export const collapsible = style({
6
- width: '100%',
7
6
  alignSelf: 'start',
7
+ border: colors.border,
8
8
  borderRadius: dimensions.radius,
9
9
  boxShadow: colors.shadow,
10
- border: colors.border,
11
10
  display: 'grid',
12
11
  gridTemplateRows: 'max-content minmax(0, 0fr)',
13
- transition: '.2s grid-template-rows ease-in-out',
14
- overflow: 'hidden',
15
12
  marginBottom: dimensions.padding,
13
+ overflow: 'hidden',
16
14
  selectors: {
17
15
  '&:last-child': {
18
16
  marginBottom: 0,
19
17
  },
20
18
  },
19
+ transition: '.2s grid-template-rows ease-in-out',
20
+ width: '100%',
21
21
  });
22
22
 
23
23
  export const collapsibleOpen = style({
@@ -25,8 +25,8 @@ export const collapsibleOpen = style({
25
25
  });
26
26
 
27
27
  export const button = style({
28
- margin: '-1px',
29
28
  boxShadow: 'none',
29
+ margin: '-1px',
30
30
  });
31
31
 
32
32
  export const buttonOpen = style({
@@ -34,4 +34,4 @@ export const buttonOpen = style({
34
34
  borderBottomRightRadius: 0,
35
35
  });
36
36
 
37
- export const content = style({padding: dimensions.padding, overflow: 'hidden'});
37
+ export const content = style({overflow: 'hidden', padding: dimensions.padding});
@@ -2,9 +2,9 @@ import {style} from '@vanilla-extract/css';
2
2
  import {colors} from '../../css/colors.css';
3
3
 
4
4
  export const detailTable = style({
5
- width: '100%',
6
5
  borderCollapse: 'collapse',
7
6
  margin: '-.5rem 0',
7
+ width: '100%',
8
8
  });
9
9
 
10
10
  export const detailRow = style({
@@ -14,6 +14,6 @@ export const detailRow = style({
14
14
 
15
15
  export const detailCell = style({
16
16
  padding: '0.5rem 1rem',
17
- verticalAlign: 'top',
18
17
  selectors: {'&:is(th)': {textAlign: 'right', width: '30%'}},
18
+ verticalAlign: 'top',
19
19
  });
@@ -7,19 +7,19 @@ export const wrapper = style({
7
7
  });
8
8
 
9
9
  export const flyout = style({
10
- padding: dimensions.padding,
10
+ backgroundColor: colors.background,
11
+ border: colors.border,
11
12
  borderRadius: dimensions.radius,
12
13
  boxShadow: colors.shadow,
13
- border: colors.border,
14
14
  height: 'fit-content',
15
+ left: 0,
15
16
  overflow: 'auto',
16
- backgroundColor: colors.background,
17
+ padding: dimensions.padding,
17
18
  position: 'absolute',
18
19
  top: 'calc(2rem + 2px)',
19
- left: 0,
20
20
  });
21
21
 
22
22
  export const anchoredFlyout = style({
23
- top: 'anchor(bottom)',
24
23
  left: 'anchor(left)',
24
+ top: 'anchor(bottom)',
25
25
  });
@@ -5,7 +5,7 @@ import {dimensions} from '../../css/dimensions.css';
5
5
  export const hr = style({
6
6
  border: 'none',
7
7
  borderBottom: colors.border,
8
- margin: `${dimensions.padding} 0`,
9
8
  height: '1px',
9
+ margin: `${dimensions.padding} 0`,
10
10
  width: '100%',
11
11
  });
@@ -5,8 +5,8 @@ import {dimensions} from '../../css/dimensions.css';
5
5
  export const image = style({
6
6
  display: 'inline-block',
7
7
  flexShrink: 0,
8
- width: '100%',
9
8
  maxHeight: 'inherit',
9
+ width: '100%',
10
10
  });
11
11
 
12
12
  export const clickable = style({
@@ -19,24 +19,24 @@ export const clickable = style({
19
19
  });
20
20
 
21
21
  export const imageVariants = styleVariants({
22
- default: {
23
- borderRadius: dimensions.radius,
24
- boxShadow: colors.shadow,
25
- },
26
- logo: {
27
- width: dimensions.logo,
28
- height: dimensions.logo,
29
- },
30
22
  avatar: {
31
- borderRadius: '50%',
32
23
  border: colors.border,
33
- width: dimensions.avatar,
24
+ borderRadius: '50%',
25
+ boxShadow: colors.shadow,
34
26
  height: dimensions.avatar,
27
+ width: dimensions.avatar,
28
+ },
29
+ default: {
30
+ borderRadius: dimensions.radius,
35
31
  boxShadow: colors.shadow,
36
32
  },
37
33
  icon: {
38
34
  border: colors.border,
39
- width: dimensions.icon,
40
35
  height: dimensions.icon,
36
+ width: dimensions.icon,
37
+ },
38
+ logo: {
39
+ height: dimensions.logo,
40
+ width: dimensions.logo,
41
41
  },
42
42
  });