@transferwise/components 0.0.0-experimental-545dd0a → 0.0.0-experimental-2ea2303

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 (51) hide show
  1. package/build/flowNavigation/animatedLabel/AnimatedLabel.js +2 -2
  2. package/build/flowNavigation/animatedLabel/AnimatedLabel.js.map +1 -1
  3. package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs +2 -2
  4. package/build/flowNavigation/animatedLabel/AnimatedLabel.mjs.map +1 -1
  5. package/build/index.js +2 -2
  6. package/build/index.mjs +1 -1
  7. package/build/{listItem → legacylistItem}/List.js +2 -3
  8. package/build/legacylistItem/List.js.map +1 -0
  9. package/build/{listItem → legacylistItem}/List.mjs +2 -3
  10. package/build/legacylistItem/List.mjs.map +1 -0
  11. package/build/listItem/ListItem.js +7 -3
  12. package/build/listItem/ListItem.js.map +1 -1
  13. package/build/listItem/ListItem.mjs +7 -3
  14. package/build/listItem/ListItem.mjs.map +1 -1
  15. package/build/main.css +28 -2
  16. package/build/styles/listItem/ListItem.css +28 -2
  17. package/build/styles/main.css +28 -2
  18. package/build/types/index.d.ts +4 -4
  19. package/build/types/index.d.ts.map +1 -1
  20. package/build/types/legacylistItem/List.d.ts +6 -0
  21. package/build/types/legacylistItem/List.d.ts.map +1 -0
  22. package/build/types/legacylistItem/index.d.ts +2 -0
  23. package/build/types/legacylistItem/index.d.ts.map +1 -1
  24. package/build/types/listItem/ListItem.d.ts.map +1 -1
  25. package/build/types/listItem/index.d.ts +0 -2
  26. package/build/types/listItem/index.d.ts.map +1 -1
  27. package/package.json +2 -2
  28. package/src/flowNavigation/animatedLabel/AnimatedLabel.tsx +1 -1
  29. package/src/index.ts +4 -9
  30. package/src/legacylistItem/LegacyListItem.story.tsx +2 -2
  31. package/src/legacylistItem/LegacyListItem.tests.story.tsx +1 -2
  32. package/src/legacylistItem/List.tsx +10 -0
  33. package/src/legacylistItem/index.ts +2 -0
  34. package/src/listItem/AvatarLayout/ListItemAvatarLayout.story.tsx +4 -5
  35. package/src/listItem/AvatarView/ListItemAvatarView.story.tsx +4 -5
  36. package/src/listItem/Button/ListItemButton.story.tsx +8 -9
  37. package/src/listItem/IconButton/ListItemIconButton.story.tsx +8 -8
  38. package/src/listItem/ListItem.css +28 -2
  39. package/src/listItem/ListItem.less +26 -1
  40. package/src/listItem/ListItem.tsx +6 -0
  41. package/src/listItem/Prompt/ListItemPrompt.story.tsx +7 -7
  42. package/src/listItem/Switch/ListItemSwitch.story.tsx +2 -3
  43. package/src/listItem/_stories/ListItem.story.tsx +2 -3
  44. package/src/listItem/_stories/ListItem.variants.test.story.tsx +4 -5
  45. package/src/listItem/index.ts +0 -3
  46. package/src/main.css +28 -2
  47. package/build/listItem/List.js.map +0 -1
  48. package/build/listItem/List.mjs.map +0 -1
  49. package/build/types/listItem/List.d.ts +0 -7
  50. package/build/types/listItem/List.d.ts.map +0 -1
  51. package/src/listItem/List.tsx +0 -11
@@ -3,7 +3,7 @@ import { action } from 'storybook/actions';
3
3
  import { lorem10, lorem5 } from '../../test-utils';
4
4
  import Link from '../../link';
5
5
  import { Sentiment as Sentiments } from '../../common';
6
- import { List, ListItem } from '../..';
6
+ import { ListItem } from '../..';
7
7
  import { Prompt, ListItemPromptProps } from './ListItemPrompt';
8
8
  import {
9
9
  SB_LIST_ITEM_CONTROLS as CONTROLS,
@@ -74,7 +74,7 @@ export const Sentiment: Story = {
74
74
  knobs: { disable: true },
75
75
  },
76
76
  render: (args) => (
77
- <List as="ol">
77
+ <ol className="list-unstyled">
78
78
  <ListItem
79
79
  title={lorem5}
80
80
  subtitle={lorem10}
@@ -103,7 +103,7 @@ export const Sentiment: Story = {
103
103
  control={CONTROLS.switch}
104
104
  prompt={<Prompt sentiment={Sentiments.NEGATIVE}>This is a negative prompt.</Prompt>}
105
105
  />
106
- </List>
106
+ </ol>
107
107
  ),
108
108
  };
109
109
 
@@ -122,7 +122,7 @@ export const Interactivity: Story = {
122
122
  },
123
123
  },
124
124
  render: (args) => (
125
- <List as="ol">
125
+ <ol className="list-unstyled">
126
126
  <ListItem
127
127
  title={lorem5}
128
128
  subtitle={lorem10}
@@ -154,7 +154,7 @@ export const Interactivity: Story = {
154
154
  </Prompt>
155
155
  }
156
156
  />
157
- </List>
157
+ </ol>
158
158
  ),
159
159
  };
160
160
 
@@ -172,7 +172,7 @@ export const Sizing: Story = {
172
172
  },
173
173
  },
174
174
  render: (args) => (
175
- <List as="ol">
175
+ <ol className="list-unstyled">
176
176
  <ListItem
177
177
  title={lorem5}
178
178
  subtitle={lorem10}
@@ -196,6 +196,6 @@ export const Sizing: Story = {
196
196
  </ListItem.Prompt>
197
197
  }
198
198
  />
199
- </List>
199
+ </ol>
200
200
  ),
201
201
  };
@@ -8,7 +8,6 @@ import {
8
8
  import type { ListItemSwitchProps } from './ListItemSwitch';
9
9
  import { fn } from 'storybook/test';
10
10
  import { lorem10, lorem5 } from '../../test-utils';
11
- import { List } from '../List';
12
11
 
13
12
  const meta: Meta<ListItemSwitchProps> = {
14
13
  component: ListItem.Switch,
@@ -51,7 +50,7 @@ export const Playground: Story = {
51
50
  export const States: Story = {
52
51
  render: (args) => {
53
52
  return (
54
- <List as="ol">
53
+ <ol className="list-unstyled">
55
54
  <ListItem
56
55
  title={lorem5}
57
56
  subtitle={lorem10}
@@ -64,7 +63,7 @@ export const States: Story = {
64
63
  media={MEDIA.avatarSingle}
65
64
  control={<ListItem.Switch {...args} />}
66
65
  />
67
- </List>
66
+ </ol>
68
67
  );
69
68
  },
70
69
  };
@@ -10,7 +10,6 @@ import {
10
10
  SB_LIST_ITEM_PROMPTS as PROMPTS,
11
11
  SB_LIST_ITEM_MEDIA as MEDIA,
12
12
  } from './subcomponents';
13
- import { List } from '../List';
14
13
 
15
14
  /**
16
15
  * List Items let users review or select options from a dynamic list.<br />
@@ -243,9 +242,9 @@ export const Playground: StoryObj<PreviewStoryArgs> = {
243
242
  const [props, previewProps] = getPropsForPreview(args);
244
243
 
245
244
  return (
246
- <List key={args.disabled ? 'disabled' : 'enabled'} as="ol">
245
+ <ol key={args.disabled ? 'disabled' : 'enabled'} className="list-unstyled">
247
246
  <ListItem {...props} {...previewProps} />
248
- </List>
247
+ </ol>
249
248
  );
250
249
  },
251
250
  argTypes: previewArgTypes,
@@ -9,7 +9,6 @@ import {
9
9
  SB_LIST_ITEM_PROMPTS as PROMPTS,
10
10
  type SB_ListItem_ControlType as ControlType,
11
11
  } from './subcomponents';
12
- import { List } from '../List';
13
12
 
14
13
  export default {
15
14
  component: ListItem,
@@ -144,7 +143,7 @@ const generateVariantsForControl = (controlType: ControlType): Story => {
144
143
  return storyConfig(
145
144
  {
146
145
  render: () => (
147
- <List as="ol">
146
+ <ol className="list-unstyled">
148
147
  {variants.map((variant, variantIndex) => (
149
148
  <ListItem
150
149
  key={`${controlType}-${variantIndex}-${Math.random()}`}
@@ -152,7 +151,7 @@ const generateVariantsForControl = (controlType: ControlType): Story => {
152
151
  {...variant}
153
152
  />
154
153
  ))}
155
- </List>
154
+ </ol>
156
155
  ),
157
156
  },
158
157
  { variants: ['default', 'dark', 'bright-green', 'forest-green', 'rtl'] },
@@ -178,7 +177,7 @@ export const Switch = generateVariantsForControl('switch');
178
177
 
179
178
  export const ButtonControlLabel: Story = {
180
179
  render: () => (
181
- <List as="ol">
180
+ <ol className="list-unstyled">
182
181
  <ListItem
183
182
  title="Fully interactive button."
184
183
  subtitle="It uses default content hierarchy."
@@ -262,6 +261,6 @@ export const ButtonControlLabel: Story = {
262
261
  control={CONTROLS.buttonAsLink}
263
262
  prompt={PROMPTS.nonInteractive}
264
263
  />
265
- </List>
264
+ </ol>
266
265
  ),
267
266
  };
@@ -12,6 +12,3 @@ export type { ListItemRadioProps } from './Radio';
12
12
  export type { ListItemSwitchProps } from './Switch';
13
13
 
14
14
  export { default } from './ListItem';
15
-
16
- export { List } from './List';
17
- export type { ListProps } from './List';
package/src/main.css CHANGED
@@ -3181,8 +3181,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3181
3181
  }
3182
3182
  .wds-list-item-spotlight-inactive {
3183
3183
  background-color: rgba(134, 167, 189, 0.025);
3184
- border: 1px dashed rgba(0,0,0,0.10196);
3185
- border: 1px dashed var(--color-border-neutral);
3186
3184
  }
3187
3185
  @supports (color: color-mix(in lch, red, blue)) {
3188
3186
  .wds-list-item-spotlight-inactive {
@@ -3195,6 +3193,34 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
3195
3193
  .wds-list-item-spotlight-inactive:not(.disabled):not(:disabled):active {
3196
3194
  background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
3197
3195
  }
3196
+ .wds-list-item .wds-list-item-spotlight__border {
3197
+ position: absolute;
3198
+ inset: 0;
3199
+ width: 100%;
3200
+ height: 100%;
3201
+ }
3202
+ .wds-list-item .wds-list-item-spotlight__border rect {
3203
+ --wds-list-item-spotlight-borderWidth: 1px;
3204
+ --wds-list-item-spotlight-borderWidthOffset: 0.5px;
3205
+ --wds-list-item-spotlight-strokeDashSize: calc(var(--size-12) * 0.5);
3206
+ fill: none;
3207
+ stroke: rgba(0,0,0,0.10196);
3208
+ stroke: var(--color-border-neutral);
3209
+ width: calc(100% - 1px);
3210
+ width: calc(100% - var(--wds-list-item-spotlight-borderWidth));
3211
+ height: calc(100% - 1px);
3212
+ height: calc(100% - var(--wds-list-item-spotlight-borderWidth));
3213
+ x: 0.5px;
3214
+ x: var(--wds-list-item-spotlight-borderWidthOffset);
3215
+ y: 0.5px;
3216
+ y: var(--wds-list-item-spotlight-borderWidthOffset);
3217
+ rx: calc(16px - 0.5px);
3218
+ rx: calc(var(--radius-medium) - var(--wds-list-item-spotlight-borderWidthOffset));
3219
+ ry: calc(16px - 0.5px);
3220
+ ry: calc(var(--radius-medium) - var(--wds-list-item-spotlight-borderWidthOffset));
3221
+ stroke-dasharray: calc(12px * 0.5) calc(12px * 0.5);
3222
+ stroke-dasharray: var(--wds-list-item-spotlight-strokeDashSize) var(--wds-list-item-spotlight-strokeDashSize);
3223
+ }
3198
3224
  .wds-list-item-prompt {
3199
3225
  grid-area: prompt;
3200
3226
  display: inline-flex;
@@ -1 +0,0 @@
1
- {"version":3,"file":"List.js","sources":["../../src/listItem/List.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nexport interface ListProps {\n as?: 'ul' | 'ol';\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function List({ as: Element = 'ul', className, children }: ListProps) {\n return <Element className={clsx('wds-list', 'list-unstyled', className)}>{children}</Element>;\n}\n"],"names":["List","as","Element","className","children","_jsx","clsx"],"mappings":";;;;;AAQM,SAAUA,IAAIA,CAAC;EAAEC,EAAE,EAAEC,OAAO,GAAG,IAAI;EAAEC,SAAS;AAAEC,EAAAA;AAAQ,CAAa,EAAA;EACzE,oBAAOC,cAAA,CAACH,OAAO,EAAA;IAACC,SAAS,EAAEG,SAAI,CAAC,UAAU,EAAE,eAAe,EAAEH,SAAS,CAAE;AAAAC,IAAAA,QAAA,EAAEA;AAAQ,GAAU,CAAC;AAC/F;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"List.mjs","sources":["../../src/listItem/List.tsx"],"sourcesContent":["import { clsx } from 'clsx';\n\nexport interface ListProps {\n as?: 'ul' | 'ol';\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function List({ as: Element = 'ul', className, children }: ListProps) {\n return <Element className={clsx('wds-list', 'list-unstyled', className)}>{children}</Element>;\n}\n"],"names":["List","as","Element","className","children","_jsx","clsx"],"mappings":";;;AAQM,SAAUA,IAAIA,CAAC;EAAEC,EAAE,EAAEC,OAAO,GAAG,IAAI;EAAEC,SAAS;AAAEC,EAAAA;AAAQ,CAAa,EAAA;EACzE,oBAAOC,GAAA,CAACH,OAAO,EAAA;IAACC,SAAS,EAAEG,IAAI,CAAC,UAAU,EAAE,eAAe,EAAEH,SAAS,CAAE;AAAAC,IAAAA,QAAA,EAAEA;AAAQ,GAAU,CAAC;AAC/F;;;;"}
@@ -1,7 +0,0 @@
1
- export interface ListProps {
2
- as?: 'ul' | 'ol';
3
- className?: string;
4
- children?: React.ReactNode;
5
- }
6
- export declare function List({ as: Element, className, children }: ListProps): import("react").JSX.Element;
7
- //# sourceMappingURL=List.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/listItem/List.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,wBAAgB,IAAI,CAAC,EAAE,EAAE,EAAE,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,SAAS,+BAE1E"}
@@ -1,11 +0,0 @@
1
- import { clsx } from 'clsx';
2
-
3
- export interface ListProps {
4
- as?: 'ul' | 'ol';
5
- className?: string;
6
- children?: React.ReactNode;
7
- }
8
-
9
- export function List({ as: Element = 'ul', className, children }: ListProps) {
10
- return <Element className={clsx('wds-list', 'list-unstyled', className)}>{children}</Element>;
11
- }