@dxos/react-ui 0.3.9-main.3fcc0fa → 0.3.9-main.4e39f3a

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.
@@ -1,7 +1,7 @@
1
1
  import '@dxosTheme';
2
2
  import { type MessageValence } from '@dxos/react-ui-types';
3
3
  declare const _default: {
4
- component: ({ type, label, description, labelVisuallyHidden, descriptionVisuallyHidden, validationValence, validationMessage, ...props }: Partial<{
4
+ component: (props: Partial<{
5
5
  label: string;
6
6
  placeholder: string;
7
7
  disabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAIpB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+C3D,wBAgBE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYnB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAavB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAanB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;CAMpB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;CAMhC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;CAQxC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;CAQ7C,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAC"}
1
+ {"version":3,"file":"Input.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Input/Input.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,YAAY,CAAC;AAKpB,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+D3D,wBAgBE;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;CAYnB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAavB,CAAC;AAEF,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAanB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;CAMpB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;;;;CAM/B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;CAMhC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;CAQxC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;CAQ7C,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;CAOpB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/react-ui",
3
- "version": "0.3.9-main.3fcc0fa",
3
+ "version": "0.3.9-main.4e39f3a",
4
4
  "description": "Opinionated, styled, low-level React components for DXOS.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -39,10 +39,10 @@
39
39
  "jdenticon": "^3.2.0",
40
40
  "keyborg": "^2.0.0",
41
41
  "react-i18next": "^11.18.6",
42
- "@dxos/react-hooks": "0.3.9-main.3fcc0fa",
43
- "@dxos/react-list": "0.3.9-main.3fcc0fa",
44
- "@dxos/react-input": "0.3.9-main.3fcc0fa",
45
- "@dxos/react-ui-types": "0.3.9-main.3fcc0fa"
42
+ "@dxos/react-input": "0.3.9-main.4e39f3a",
43
+ "@dxos/react-hooks": "0.3.9-main.4e39f3a",
44
+ "@dxos/react-list": "0.3.9-main.4e39f3a",
45
+ "@dxos/react-ui-types": "0.3.9-main.4e39f3a"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@dnd-kit/core": "^6.0.5",
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^18.2.0",
58
58
  "vite": "^4.3.9",
59
59
  "vite-plugin-turbosnap": "^1.0.2",
60
- "@dxos/react-ui-theme": "0.3.9-main.3fcc0fa"
60
+ "@dxos/react-ui-theme": "0.3.9-main.4e39f3a"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "@phosphor-icons/react": "^2.0.5",
@@ -6,6 +6,7 @@ import '@dxosTheme';
6
6
 
7
7
  import React from 'react';
8
8
 
9
+ import { baseSurface, chromeSurface, groupSurface, mx, surfaceElevation } from '@dxos/react-ui-theme';
9
10
  import { type MessageValence } from '@dxos/react-ui-types';
10
11
 
11
12
  import { Input } from './Input';
@@ -22,7 +23,7 @@ type StoryInputProps = Partial<{
22
23
  validationValence: MessageValence;
23
24
  }>;
24
25
 
25
- const StoryInput = ({
26
+ const StoryInputContent = ({
26
27
  type = 'default',
27
28
  label,
28
29
  description,
@@ -32,7 +33,6 @@ const StoryInput = ({
32
33
  validationMessage,
33
34
  ...props
34
35
  }: StoryInputProps) => {
35
- // TODO(thure): Implement
36
36
  return (
37
37
  <Input.Root {...{ validationValence }}>
38
38
  <Input.Label srOnly={labelVisuallyHidden}>{label}</Input.Label>
@@ -53,6 +53,23 @@ const StoryInput = ({
53
53
  );
54
54
  };
55
55
 
56
+ const StoryInput = (props: StoryInputProps) => {
57
+ // TODO(thure): Implement
58
+ return (
59
+ <div className='space-b-4'>
60
+ <div className={mx(baseSurface, 'p-4')}>
61
+ <StoryInputContent {...props} />
62
+ </div>
63
+ <div className={mx(groupSurface, 'p-4 rounded-lg', surfaceElevation({ elevation: 'group' }))}>
64
+ <StoryInputContent {...props} />
65
+ </div>
66
+ <div className={mx(chromeSurface, 'p-4 rounded-lg', surfaceElevation({ elevation: 'chrome' }))}>
67
+ <StoryInputContent {...props} />
68
+ </div>
69
+ </div>
70
+ );
71
+ };
72
+
56
73
  export default {
57
74
  component: StoryInput,
58
75
  // TODO(thure): Refactor