@moises.ai/design-system 4.19.7 → 4.19.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.
- package/dist/index.js +3998 -3905
- package/package.json +1 -1
- package/src/components/Button/Button.jsx +10 -1
- package/src/components/Button/Button.module.css +29 -0
- package/src/components/Button/Button.stories.jsx +27 -0
- package/src/components/Select/Select.jsx +113 -36
- package/src/components/Select/Select.module.css +55 -5
- package/src/components/Select/Select.stories.jsx +70 -0
- package/src/components/TextField/TextField.jsx +58 -32
- package/src/components/TextField/TextField.module.css +21 -0
- package/src/components/TextField/TextField.stories.jsx +35 -0
|
@@ -66,6 +66,15 @@ const MyComponent = () => (
|
|
|
66
66
|
defaultValue: { summary: 'false' },
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
+
allowClickWhenDisabled: {
|
|
70
|
+
control: 'boolean',
|
|
71
|
+
description:
|
|
72
|
+
'When true with disabled, keeps the disabled look and blocks typing, but still allows focus (e.g. paywall via onFocus)',
|
|
73
|
+
table: {
|
|
74
|
+
type: { summary: 'boolean' },
|
|
75
|
+
defaultValue: { summary: 'false' },
|
|
76
|
+
},
|
|
77
|
+
},
|
|
69
78
|
readOnly: {
|
|
70
79
|
control: 'boolean',
|
|
71
80
|
description: 'Whether the input is read-only',
|
|
@@ -238,6 +247,32 @@ export const Disabled = {
|
|
|
238
247
|
},
|
|
239
248
|
}
|
|
240
249
|
|
|
250
|
+
export const AllowClickWhenDisabled = {
|
|
251
|
+
render: (args) => {
|
|
252
|
+
const [lastAction, setLastAction] = React.useState('none yet')
|
|
253
|
+
|
|
254
|
+
return (
|
|
255
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
256
|
+
<TextField
|
|
257
|
+
{...args}
|
|
258
|
+
disabled
|
|
259
|
+
allowClickWhenDisabled
|
|
260
|
+
value="Looks disabled, click to activate"
|
|
261
|
+
onFocus={() => {
|
|
262
|
+
setLastAction('activated (focus)')
|
|
263
|
+
action('activated (focus)')()
|
|
264
|
+
alert('paywall opened')
|
|
265
|
+
}}
|
|
266
|
+
/>
|
|
267
|
+
<div style={{ fontSize: 14, color: '#4b5563' }}>Last action: {lastAction}</div>
|
|
268
|
+
</div>
|
|
269
|
+
)
|
|
270
|
+
},
|
|
271
|
+
args: {
|
|
272
|
+
...Default.args,
|
|
273
|
+
},
|
|
274
|
+
}
|
|
275
|
+
|
|
241
276
|
export const ReadOnly = {
|
|
242
277
|
args: {
|
|
243
278
|
...Default.args,
|