@dxos/react-ui 0.8.4-main.84f28bd → 0.8.4-main.b97322e

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 (46) hide show
  1. package/dist/lib/browser/{chunk-T6YPS45E.mjs → chunk-2COVUP44.mjs} +70 -73
  2. package/dist/lib/browser/chunk-2COVUP44.mjs.map +7 -0
  3. package/dist/lib/browser/index.mjs +1 -2
  4. package/dist/lib/browser/index.mjs.map +2 -2
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +2 -3
  7. package/dist/lib/browser/testing/index.mjs.map +3 -3
  8. package/dist/lib/node-esm/{chunk-TYVQJ4KW.mjs → chunk-GHXHND5V.mjs} +70 -73
  9. package/dist/lib/node-esm/chunk-GHXHND5V.mjs.map +7 -0
  10. package/dist/lib/node-esm/index.mjs +1 -2
  11. package/dist/lib/node-esm/index.mjs.map +2 -2
  12. package/dist/lib/node-esm/meta.json +1 -1
  13. package/dist/lib/node-esm/testing/index.mjs +2 -3
  14. package/dist/lib/node-esm/testing/index.mjs.map +3 -3
  15. package/dist/types/src/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  16. package/dist/types/src/components/Buttons/Button.stories.d.ts.map +1 -1
  17. package/dist/types/src/components/Buttons/Toggle.stories.d.ts.map +1 -1
  18. package/dist/types/src/components/Buttons/ToggleGroup.stories.d.ts.map +1 -1
  19. package/dist/types/src/components/Lists/List.d.ts.map +1 -1
  20. package/dist/types/src/components/Lists/List.stories.d.ts.map +1 -1
  21. package/dist/types/src/components/Select/Select.d.ts.map +1 -1
  22. package/dist/types/src/components/Toolbar/Toolbar.stories.d.ts.map +1 -1
  23. package/dist/types/src/index.d.ts +1 -1
  24. package/dist/types/src/index.d.ts.map +1 -1
  25. package/dist/types/src/playground/Controls.stories.d.ts.map +1 -1
  26. package/dist/types/src/testing/decorators/withTheme.d.ts.map +1 -1
  27. package/dist/types/src/util/index.d.ts +1 -1
  28. package/dist/types/src/util/index.d.ts.map +1 -1
  29. package/dist/types/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +14 -14
  31. package/src/components/Breadcrumb/Breadcrumb.tsx +2 -2
  32. package/src/components/Buttons/Button.stories.tsx +3 -3
  33. package/src/components/Buttons/Toggle.stories.tsx +2 -2
  34. package/src/components/Buttons/ToggleGroup.stories.tsx +3 -3
  35. package/src/components/Clipboard/CopyButton.tsx +1 -1
  36. package/src/components/Lists/List.stories.tsx +6 -6
  37. package/src/components/Lists/List.tsx +3 -8
  38. package/src/components/Select/Select.tsx +3 -4
  39. package/src/components/Toolbar/Toolbar.stories.tsx +8 -8
  40. package/src/hooks/useSafeCollisionPadding.ts +1 -1
  41. package/src/index.ts +1 -1
  42. package/src/playground/Controls.stories.tsx +8 -9
  43. package/src/testing/decorators/withTheme.ts +7 -4
  44. package/src/util/index.ts +1 -1
  45. package/dist/lib/browser/chunk-T6YPS45E.mjs.map +0 -7
  46. package/dist/lib/node-esm/chunk-TYVQJ4KW.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui",
3
- "version": "0.8.4-main.84f28bd",
3
+ "version": "0.8.4-main.b97322e",
4
4
  "description": "Low-level React components for DXOS, applying a theme to a core group of primitives",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -35,6 +35,7 @@
35
35
  "dependencies": {
36
36
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
37
37
  "@fluentui/react-tabster": "^9.24.2",
38
+ "@phosphor-icons/react": "^2.1.5",
38
39
  "@preact-signals/safe-react": "^0.9.0",
39
40
  "@radix-ui/primitive": "1.1.1",
40
41
  "@radix-ui/react-alert-dialog": "1.1.6",
@@ -72,34 +73,33 @@
72
73
  "keyborg": "^2.5.0",
73
74
  "react-i18next": "^11.18.6",
74
75
  "react-remove-scroll": "^2.6.0",
75
- "@dxos/debug": "0.8.4-main.84f28bd",
76
- "@dxos/lit-ui": "0.8.4-main.84f28bd",
77
- "@dxos/log": "0.8.4-main.84f28bd",
78
- "@dxos/react-hooks": "0.8.4-main.84f28bd",
79
- "@dxos/react-input": "0.8.4-main.84f28bd",
80
- "@dxos/react-list": "0.8.4-main.84f28bd",
81
- "@dxos/react-ui-types": "0.8.4-main.84f28bd",
82
- "@dxos/util": "0.8.4-main.84f28bd"
76
+ "@dxos/lit-ui": "0.8.4-main.b97322e",
77
+ "@dxos/debug": "0.8.4-main.b97322e",
78
+ "@dxos/log": "0.8.4-main.b97322e",
79
+ "@dxos/react-hooks": "0.8.4-main.b97322e",
80
+ "@dxos/react-list": "0.8.4-main.b97322e",
81
+ "@dxos/react-ui-types": "0.8.4-main.b97322e",
82
+ "@dxos/react-input": "0.8.4-main.b97322e",
83
+ "@dxos/util": "0.8.4-main.b97322e"
83
84
  },
84
85
  "devDependencies": {
85
86
  "@dnd-kit/core": "^6.0.5",
86
87
  "@dnd-kit/sortable": "^7.0.1",
87
88
  "@dnd-kit/utilities": "^3.2.0",
88
- "@phosphor-icons/react": "^2.1.5",
89
89
  "@types/react": "~18.2.0",
90
90
  "@types/react-dom": "~18.2.0",
91
91
  "react": "~18.2.0",
92
92
  "react-dom": "~18.2.0",
93
93
  "vite": "5.4.7",
94
- "@dxos/random": "0.8.4-main.84f28bd",
95
- "@dxos/react-ui-theme": "0.8.4-main.84f28bd",
96
- "@dxos/util": "0.8.4-main.84f28bd"
94
+ "@dxos/random": "0.8.4-main.b97322e",
95
+ "@dxos/util": "0.8.4-main.b97322e",
96
+ "@dxos/react-ui-theme": "0.8.4-main.b97322e"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "@phosphor-icons/react": "^2.1.5",
100
100
  "react": "~18.2.0",
101
101
  "react-dom": "~18.2.0",
102
- "@dxos/react-ui-theme": "0.8.4-main.84f28bd"
102
+ "@dxos/react-ui-theme": "0.8.4-main.b97322e"
103
103
  },
104
104
  "publishConfig": {
105
105
  "access": "public"
@@ -2,13 +2,13 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Dot } from '@phosphor-icons/react';
6
5
  import { Primitive } from '@radix-ui/react-primitive';
7
6
  import { Slot } from '@radix-ui/react-slot';
8
7
  import React, { type ComponentPropsWithoutRef, type ComponentPropsWithRef, forwardRef } from 'react';
9
8
 
10
9
  import { useThemeContext } from '../../hooks';
11
10
  import { type ThemedClassName } from '../../util';
11
+ import { Icon } from '../Icon';
12
12
  import { Link, type LinkProps } from '../Link';
13
13
 
14
14
  type BreadcrumbRootProps = ThemedClassName<ComponentPropsWithRef<typeof Primitive.div>> & {
@@ -100,7 +100,7 @@ const BreadcrumbSeparator = ({ children, classNames, ...props }: BreadcrumbSepar
100
100
  {...props}
101
101
  className={tx('breadcrumb.separator', 'breadcrumb__separator', {}, classNames)}
102
102
  >
103
- {children ?? <Dot weight='bold' />}
103
+ {children ?? <Icon icon='ph--dot--bold' />}
104
104
  </Primitive.span>
105
105
  );
106
106
  };
@@ -4,12 +4,12 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { CaretLeft, CaretRight } from '@phosphor-icons/react';
8
7
  import { type StoryObj, type Meta } from '@storybook/react-vite';
9
8
  import React from 'react';
10
9
 
11
10
  import { Button, ButtonGroup, type ButtonProps } from './Button';
12
11
  import { withSurfaceVariantsLayout, withTheme } from '../../testing';
12
+ import { Icon } from '../Icon';
13
13
 
14
14
  const DefaultStory = ({ children, ...args }: Omit<ButtonProps, 'ref'>) => {
15
15
  return (
@@ -21,10 +21,10 @@ const DefaultStory = ({ children, ...args }: Omit<ButtonProps, 'ref'>) => {
21
21
  {(args.variant === 'default' || args.variant === 'primary') && (
22
22
  <ButtonGroup>
23
23
  <Button {...args}>
24
- <CaretLeft />
24
+ <Icon icon='ph--caret-left--regular' />
25
25
  </Button>
26
26
  <Button {...args}>
27
- <CaretRight />
27
+ <Icon icon='ph--caret-right--regular' />
28
28
  </Button>
29
29
  </ButtonGroup>
30
30
  )}
@@ -4,18 +4,18 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { TextB } from '@phosphor-icons/react';
8
7
  import React from 'react';
9
8
 
10
9
  import { Toggle } from './Toggle';
11
10
  import { withTheme } from '../../testing';
11
+ import { Icon } from '../Icon';
12
12
 
13
13
  type StorybookToggleProps = {};
14
14
 
15
15
  const DefaultStory = (props: StorybookToggleProps) => {
16
16
  return (
17
17
  <Toggle {...props}>
18
- <TextB />
18
+ <Icon icon='ph--text-b--regular' />
19
19
  </Toggle>
20
20
  );
21
21
  };
@@ -4,21 +4,21 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { TextB, TextItalic } from '@phosphor-icons/react';
8
7
  import React from 'react';
9
8
 
10
9
  import { ToggleGroup, ToggleGroupItem, type ToggleGroupProps } from './ToggleGroup';
11
10
  import { withTheme } from '../../testing';
11
+ import { Icon } from '../Icon';
12
12
 
13
13
  // TODO(burdon): Create Radix-style Root, Item, etc?
14
14
  const DefaultStory = (props: ToggleGroupProps) => {
15
15
  return (
16
16
  <ToggleGroup {...props}>
17
17
  <ToggleGroupItem value='textb'>
18
- <TextB />
18
+ <Icon icon='ph--text-b--regular' />
19
19
  </ToggleGroupItem>
20
20
  <ToggleGroupItem value='texti'>
21
- <TextItalic />
21
+ <Icon icon='ph--text-italic--regular' />
22
22
  </ToggleGroupItem>
23
23
  </ToggleGroup>
24
24
  );
@@ -57,7 +57,7 @@ export const CopyButtonIconOnly = ({
57
57
  const { t } = useTranslation('os');
58
58
  const { textValue, setTextValue } = useClipboard();
59
59
  const isCopied = textValue === value;
60
- const label = isCopied ? t('copy success label') : props.label ?? t('copy label');
60
+ const label = isCopied ? t('copy success label') : (props.label ?? t('copy label'));
61
61
  const { onOpen } = useTooltipContext('CopyButton', __scopeTooltip);
62
62
  return (
63
63
  <IconButton
@@ -8,7 +8,6 @@ import { DndContext, type DragEndEvent, type DragStartEvent } from '@dnd-kit/cor
8
8
  import { arrayMove, SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable';
9
9
  import { CSS } from '@dnd-kit/utilities';
10
10
  import { useArrowNavigationGroup } from '@fluentui/react-tabster';
11
- import { DotsSixVertical, PushPin } from '@phosphor-icons/react';
12
11
  import React, { type ReactNode, useState } from 'react';
13
12
 
14
13
  import {
@@ -22,6 +21,7 @@ import {
22
21
 
23
22
  import { List, ListItem, type ListScopedProps } from './List';
24
23
  import { withTheme } from '../../testing';
24
+ import { Icon } from '../Icon';
25
25
 
26
26
  export default {
27
27
  title: 'ui/react-ui-core/List',
@@ -41,11 +41,11 @@ const UniformListItem = ({ id, text }: { id: string; text: string }) => {
41
41
  style={{ transform: CSS.Transform.toString(transform) }}
42
42
  >
43
43
  <ListItem.Endcap>
44
- <DotsSixVertical className={mx(getSize(5), 'mbs-2.5')} />
44
+ <Icon icon='ph--dots-six-vertical--regular' classNames={mx(getSize(5), 'mbs-2.5')} />
45
45
  </ListItem.Endcap>
46
46
  <ListItem.Heading classNames='grow pbs-2'>{text}</ListItem.Heading>
47
47
  <ListItem.Endcap>
48
- <PushPin className={mx(getSize(5), 'mbs-2.5')} />
48
+ <Icon icon='ph--push-pin--regular' classNames={mx(getSize(5), 'mbs-2.5')} />
49
49
  </ListItem.Endcap>
50
50
  </ListItem.Root>
51
51
  );
@@ -103,13 +103,13 @@ const ManySizesDraggableListItem = ({
103
103
  style={{ transform: CSS.Translate.toString(transform) }}
104
104
  >
105
105
  <ListItem.Endcap>
106
- <DotsSixVertical className={mx(getSize(5), 'mbs-2.5')} />
106
+ <Icon icon='ph--dots-six-vertical--regular' classNames={mx(getSize(5), 'mbs-2.5')} />
107
107
  </ListItem.Endcap>
108
108
  <ListItem.Heading classNames='grow pbs-2' asChild>
109
109
  {text}
110
110
  </ListItem.Heading>
111
111
  <ListItem.Endcap>
112
- <PushPin className={mx(getSize(5), 'mbs-2.5')} />
112
+ <Icon icon='ph--push-pin--regular' classNames={mx(getSize(5), 'mbs-2.5')} />
113
113
  </ListItem.Endcap>
114
114
  </ListItem.Root>
115
115
  );
@@ -181,7 +181,7 @@ export const Collapsible = {
181
181
  {index !== 2 ? <ListItem.OpenTrigger /> : <ListItem.MockOpenTrigger />}
182
182
  <ListItem.Heading classNames='grow pbs-2'>{text}</ListItem.Heading>
183
183
  <ListItem.Endcap>
184
- <PushPin className={mx(getSize(5), 'mbs-2.5')} />
184
+ <Icon icon='ph--push-pin--regular' classNames={mx(getSize(5), 'mbs-2.5')} />
185
185
  </ListItem.Endcap>
186
186
  </div>
187
187
  {index !== 2 && <ListItem.CollapsibleContent>{body}</ListItem.CollapsibleContent>}
@@ -2,7 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { CaretDown, CaretRight } from '@phosphor-icons/react';
6
5
  import { Slot } from '@radix-ui/react-slot';
7
6
  import React, { type ComponentPropsWithoutRef, type FC, forwardRef, type ForwardRefExoticComponent } from 'react';
8
7
 
@@ -30,6 +29,7 @@ import { ListDropIndicator } from './ListDropIndicator';
30
29
  import { useDensityContext, useThemeContext } from '../../hooks';
31
30
  import { type ThemedClassName } from '../../util';
32
31
  import { DensityProvider } from '../DensityProvider';
32
+ import { Icon } from '../Icon';
33
33
 
34
34
  type ListProps = ThemedClassName<ListPrimitiveProps> & { density?: Density };
35
35
 
@@ -106,7 +106,7 @@ const ListItemOpenTrigger = forwardRef<HTMLButtonElement, ListItemOpenTriggerPro
106
106
  const { tx } = useThemeContext();
107
107
  const density = useDensityContext();
108
108
  const { open } = useListItemContext(LIST_ITEM_NAME, __listItemScope);
109
- const Icon = open ? CaretDown : CaretRight;
109
+ const iconName = open ? 'ph--caret-down--bold' : 'ph--caret-right--bold';
110
110
  return (
111
111
  <ListPrimitiveItemOpenTrigger
112
112
  {...props}
@@ -114,12 +114,7 @@ const ListItemOpenTrigger = forwardRef<HTMLButtonElement, ListItemOpenTriggerPro
114
114
  ref={forwardedRef}
115
115
  >
116
116
  {children || (
117
- <Icon
118
- {...{
119
- weight: 'bold',
120
- className: tx('list.item.openTriggerIcon', 'list__listItem__openTrigger__icon', {}),
121
- }}
122
- />
117
+ <Icon icon={iconName} classNames={tx('list.item.openTriggerIcon', 'list__listItem__openTrigger__icon', {})} />
123
118
  )}
124
119
  </ListPrimitiveItemOpenTrigger>
125
120
  );
@@ -2,7 +2,6 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { CaretDown, CaretUp } from '@phosphor-icons/react';
6
5
  import * as SelectPrimitive from '@radix-ui/react-select';
7
6
  import React, { forwardRef } from 'react';
8
7
 
@@ -43,7 +42,7 @@ const SelectTriggerButton = forwardRef<HTMLButtonElement, SelectTriggerButtonPro
43
42
  <SelectPrimitive.Value placeholder={placeholder}>{children}</SelectPrimitive.Value>
44
43
  <span className='w-1 flex-1' />
45
44
  <SelectPrimitive.Icon asChild>
46
- <CaretDown className={tx('select.triggerIcon', 'select__trigger__icon', {})} weight='bold' />
45
+ <Icon icon='ph--caret-down--bold' classNames={tx('select.triggerIcon', 'select__trigger__icon', {})} />
47
46
  </SelectPrimitive.Icon>
48
47
  </Button>
49
48
  </SelectPrimitive.Trigger>
@@ -83,7 +82,7 @@ const SelectScrollUpButton = forwardRef<HTMLDivElement, SelectScrollUpButtonProp
83
82
  className={tx('select.scrollButton', 'select__scroll-button--up', {}, classNames)}
84
83
  ref={forwardedRef}
85
84
  >
86
- {children ?? <CaretUp weight='bold' />}
85
+ {children ?? <Icon icon='ph--caret-up--bold' />}
87
86
  </SelectPrimitive.SelectScrollUpButton>
88
87
  );
89
88
  },
@@ -100,7 +99,7 @@ const SelectScrollDownButton = forwardRef<HTMLDivElement, SelectScrollDownButton
100
99
  className={tx('select.scrollButton', 'select__scroll-button--down', {}, classNames)}
101
100
  ref={forwardedRef}
102
101
  >
103
- {children ?? <CaretDown weight='bold' />}
102
+ {children ?? <Icon icon='ph--caret-down--bold' />}
104
103
  </SelectPrimitive.SelectScrollDownButton>
105
104
  );
106
105
  },
@@ -4,12 +4,12 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { ArrowClockwise, Bug, FileJs, FileTs, TextB, TextItalic, TextUnderline } from '@phosphor-icons/react';
8
7
  import React from 'react';
9
8
 
10
9
  import { Toolbar } from './Toolbar';
11
10
  import { withTheme } from '../../testing';
12
11
  import { Toggle } from '../Buttons';
12
+ import { Icon } from '../Icon';
13
13
  import { Select } from '../Select';
14
14
 
15
15
  type StorybookToolbarProps = {};
@@ -37,33 +37,33 @@ const DefaultStory = (props: StorybookToolbarProps) => {
37
37
  {/* TODO(burdon): Icon sizes should adapt to density. */}
38
38
  <Toolbar.ToggleGroup type='multiple'>
39
39
  <Toolbar.ToggleGroupItem value='a'>
40
- <TextB />
40
+ <Icon icon='ph--text-b--regular' />
41
41
  </Toolbar.ToggleGroupItem>
42
42
  <Toolbar.ToggleGroupItem value='b'>
43
- <TextItalic />
43
+ <Icon icon='ph--text-italic--regular' />
44
44
  </Toolbar.ToggleGroupItem>
45
45
  <Toolbar.ToggleGroupItem value='c'>
46
- <TextUnderline />
46
+ <Icon icon='ph--text-underline--regular' />
47
47
  </Toolbar.ToggleGroupItem>
48
48
  </Toolbar.ToggleGroup>
49
49
  {/* TODO(burdon): Highlight isn't shown. */}
50
50
  <Toolbar.ToggleGroup type='single' defaultValue='a'>
51
51
  <Toolbar.ToggleGroupItem value='a'>
52
- <FileTs />
52
+ <Icon icon='ph--file-ts--regular' />
53
53
  </Toolbar.ToggleGroupItem>
54
54
  <Toolbar.ToggleGroupItem value='b'>
55
- <FileJs />
55
+ <Icon icon='ph--file-js--regular' />
56
56
  </Toolbar.ToggleGroupItem>
57
57
  </Toolbar.ToggleGroup>
58
58
  <Toolbar.Button asChild>
59
59
  <Toggle>
60
- <Bug />
60
+ <Icon icon='ph--bug--regular' />
61
61
  </Toggle>
62
62
  </Toolbar.Button>
63
63
  <Toolbar.Separator />
64
64
  <Toolbar.Button>Test</Toolbar.Button>
65
65
  <Toolbar.Button>
66
- <ArrowClockwise />
66
+ <Icon icon='ph--arrow-clockwise--regular' />
67
67
  </Toolbar.Button>
68
68
  </Toolbar.Root>
69
69
  );
@@ -21,7 +21,7 @@ const safePadding = (
21
21
  ) => {
22
22
  return (
23
23
  (propIsNumber(safePadding[side]) ? safePadding[side] : 0) +
24
- (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? propsPadding[side] ?? 0 : 0)
24
+ (propIsNumber(propsPadding) ? propsPadding : propsIsRecord(propsPadding) ? (propsPadding[side] ?? 0) : 0)
25
25
  );
26
26
  };
27
27
 
package/src/index.ts CHANGED
@@ -6,7 +6,7 @@ export { type Resource, type TFunction } from 'i18next';
6
6
  export { Trans } from 'react-i18next';
7
7
 
8
8
  export * from '@dxos/react-hooks';
9
- export * from '@dxos/react-ui-types';
9
+ export type * from '@dxos/react-ui-types';
10
10
 
11
11
  export * from './components';
12
12
  export * from './hooks';
@@ -4,10 +4,9 @@
4
4
 
5
5
  import '@dxos-theme';
6
6
 
7
- import { FileTs, FileJs, ArrowClockwise, Bug, TextUnderline, TextB, TextItalic } from '@phosphor-icons/react';
8
7
  import React, { useState } from 'react';
9
8
 
10
- import { Input, Select, Toggle, Toolbar } from '../components';
9
+ import { Icon, Input, Select, Toggle, Toolbar } from '../components';
11
10
  import { withTheme, withSurfaceVariantsLayout } from '../testing';
12
11
 
13
12
  const DefaultStory = () => {
@@ -37,27 +36,27 @@ const DefaultStory = () => {
37
36
  {/* TODO(burdon): Icon sizes should adapt to density. */}
38
37
  <Toolbar.ToggleGroup type='multiple'>
39
38
  <Toolbar.ToggleGroupItem value='a'>
40
- <TextB />
39
+ <Icon icon='ph--text-b--regular' />
41
40
  </Toolbar.ToggleGroupItem>
42
41
  <Toolbar.ToggleGroupItem value='b'>
43
- <TextItalic />
42
+ <Icon icon='ph--text-italic--regular' />
44
43
  </Toolbar.ToggleGroupItem>
45
44
  <Toolbar.ToggleGroupItem value='c'>
46
- <TextUnderline />
45
+ <Icon icon='ph--text-underline--regular' />
47
46
  </Toolbar.ToggleGroupItem>
48
47
  </Toolbar.ToggleGroup>
49
48
  {/* TODO(burdon): Highlight isn't shown. */}
50
49
  <Toolbar.ToggleGroup type='single' defaultValue='a'>
51
50
  <Toolbar.ToggleGroupItem value='a'>
52
- <FileTs />
51
+ <Icon icon='ph--file-ts--regular' />
53
52
  </Toolbar.ToggleGroupItem>
54
53
  <Toolbar.ToggleGroupItem value='b'>
55
- <FileJs />
54
+ <Icon icon='ph--file-js--regular' />
56
55
  </Toolbar.ToggleGroupItem>
57
56
  </Toolbar.ToggleGroup>
58
57
  <Toolbar.Button asChild>
59
58
  <Toggle>
60
- <Bug />
59
+ <Icon icon='ph--bug--regular' />
61
60
  </Toggle>
62
61
  </Toolbar.Button>
63
62
  {/* TODO(burdon): Should not be 'is-full' by default. */}
@@ -71,7 +70,7 @@ const DefaultStory = () => {
71
70
  </Input.Root>
72
71
  <Toolbar.Button>Test</Toolbar.Button>
73
72
  <Toolbar.Button>
74
- <ArrowClockwise />
73
+ <Icon icon='ph--arrow-clockwise--regular' />
75
74
  </Toolbar.Button>
76
75
  </Toolbar.Root>
77
76
  <Input.Root>
@@ -15,8 +15,11 @@ export const withTheme: Decorator = (Story: StoryFn, context: StoryContext) => {
15
15
  document.documentElement.classList[theme === 'dark' ? 'add' : 'remove']('dark');
16
16
  }, [theme]);
17
17
 
18
- return createElement(ThemeProvider, {
19
- children: createElement(Story),
20
- tx: defaultTx,
21
- });
18
+ return createElement(
19
+ ThemeProvider,
20
+ {
21
+ tx: defaultTx,
22
+ },
23
+ createElement(Story),
24
+ );
22
25
  };
package/src/util/index.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  //
4
4
 
5
5
  export * from './hasIosKeyboard';
6
- export * from './ThemedClassName';
6
+ export type * from './ThemedClassName';