@beydesign/storybook 0.2.8 → 0.2.9

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.
@@ -24,9 +24,9 @@ export const TextInput = ({ label, value, onChange, placeholder, type = 'text',
24
24
  const iconColor = disabled
25
25
  ? 'var(--color-text-text-disabled)'
26
26
  : 'var(--color-foreground-fg-secondary)';
27
- return (_jsx(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', width: fullWidth ? '100%' : undefined, minWidth: fullWidth ? 0 : undefined, sx: style, children: _jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', width: fullWidth ? '100%' : undefined, minWidth: fullWidth ? 0 : '260px', children: [label && (_jsxs(Box, { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', sx: labelContainerStyle, children: [_jsx(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.SemiBold, required: required, children: label }), labelTrailingElement] })), hintBubbleText && (_jsx(HintBubble, { text: hintBubbleText, size: HintBubbleSize.sm, ...hintBubbleProps })), _jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', bgcolor: 'var(--color-background-bg-component)', border: errorText
27
+ return (_jsx(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', width: fullWidth ? '100%' : undefined, minWidth: fullWidth ? 0 : undefined, sx: style, children: _jsxs(Box, { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', width: fullWidth ? '100%' : undefined, minWidth: fullWidth ? 0 : '260px', children: [label && (_jsxs(Box, { display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', sx: labelContainerStyle, children: [_jsx(Typography, { size: TypographySize.HeadingXS, weight: TypographyWeight.SemiBold, required: required, children: label }), labelTrailingElement] })), hintBubbleText && (_jsx(HintBubble, { text: hintBubbleText, size: HintBubbleSize.sm, ...hintBubbleProps })), _jsxs(Box, { display: 'flex', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', height: '40px', bgcolor: 'var(--color-background-bg-component)', border: errorText
28
28
  ? 'none'
29
- : '1px solid var(--color-border-border-component)', overflow: 'hidden', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', children: [_jsxs(Box, { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', padding: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', width: '100%', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs) 0 0 var(--spacing-tokens-size-in-px-spacing-spacing-xs)', border: `${errorText
29
+ : '1px solid var(--color-border-border-component)', overflow: 'hidden', borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs)', sx: { boxSizing: 'border-box' }, children: [_jsxs(Box, { display: 'flex', flexDirection: 'row', alignItems: 'center', gap: 'var(--spacing-tokens-size-in-px-spacing-spacing-sm)', padding: '0 var(--spacing-tokens-size-in-px-spacing-spacing-lg)', height: '100%', width: '100%', sx: { boxSizing: 'border-box' }, borderRadius: 'var(--spacing-tokens-size-in-px-spacing-spacing-xs) 0 0 var(--spacing-tokens-size-in-px-spacing-spacing-xs)', border: `${errorText
30
30
  ? '1px solid var(--color-border-border-error)'
31
31
  : focused
32
32
  ? '1px solid var(--color-border-border-component-active)'
@@ -59,5 +59,5 @@ export const TextInput = ({ label, value, onChange, placeholder, type = 'text',
59
59
  height: '20px',
60
60
  color: iconColor,
61
61
  'aria-hidden': 'true',
62
- }) }))] }), trailingText && (_jsx(Box, { display: 'flex', alignItems: 'center', height: '100%', padding: 'var(--spacing-tokens-size-in-px-spacing-spacing-lg)', borderLeft: '1px solid var(--color-border-border-component)', children: _jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-paragraph)', children: trailingText }) }))] }), errorText && (_jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-error)', children: errorText })), hintText && !errorText && (_jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-subtle)', children: hintText }))] }) }));
62
+ }) }))] }), trailingText && (_jsx(Box, { display: 'flex', alignItems: 'center', height: '100%', padding: '0 var(--spacing-tokens-size-in-px-spacing-spacing-lg)', borderLeft: '1px solid var(--color-border-border-component)', sx: { boxSizing: 'border-box' }, children: _jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-paragraph)', children: trailingText }) }))] }), errorText && (_jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-error)', children: errorText })), hintText && !errorText && (_jsx(Typography, { size: TypographySize.TextS, weight: TypographyWeight.Regular, color: 'var(--color-text-text-subtle)', children: hintText }))] }) }));
63
63
  };
@@ -175,4 +175,9 @@ export declare const WithLeadingIcon: Story;
175
175
  export declare const Password: Story;
176
176
  export declare const PasswordWithoutToggle: Story;
177
177
  export declare const Email: Story;
178
+ /**
179
+ * Search field next to a `MainButton` (size `md`), mirroring the API keys
180
+ * search row. Both controls are 40px tall, so their tops and bottoms align.
181
+ */
182
+ export declare const SearchWithButton: Story;
178
183
  export declare const SideBySideFullWidth: Story;
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { TextInput } from './TextInput';
3
+ import { ButtonHierarchy, ButtonSize, ButtonType, MainButton, } from '../Buttons';
3
4
  const meta = {
4
5
  title: 'Design System/Components/Form/TextInput',
5
6
  component: TextInput,
@@ -177,6 +178,25 @@ export const Email = {
177
178
  hintBubbleText: 'This is a hint bubble',
178
179
  },
179
180
  };
181
+ /**
182
+ * Search field next to a `MainButton` (size `md`), mirroring the API keys
183
+ * search row. Both controls are 40px tall, so their tops and bottoms align.
184
+ */
185
+ export const SearchWithButton = {
186
+ args: {
187
+ value: '',
188
+ placeholder: 'Search your API Keys',
189
+ leadingIcon: 'MagnifyingGlass',
190
+ fullWidth: true,
191
+ onChange: () => { },
192
+ },
193
+ render: (args) => (_jsxs("div", { style: {
194
+ display: 'flex',
195
+ alignItems: 'center',
196
+ gap: '12px',
197
+ width: '560px',
198
+ }, children: [_jsx("div", { style: { minWidth: 0, flex: 1 }, children: _jsx(TextInput, { ...args }) }), _jsx(MainButton, { text: "Create API Key", type: ButtonType.Button, hierarchy: ButtonHierarchy.PrimaryLemon, size: ButtonSize.md, onClick: () => { } })] })),
199
+ };
180
200
  export const SideBySideFullWidth = {
181
201
  args: {
182
202
  label: 'First name',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beydesign/storybook",
3
3
  "private": false,
4
- "version": "0.2.8",
4
+ "version": "0.2.9",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",