@scality/core-ui 0.181.0 → 0.183.0

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 (28) hide show
  1. package/dist/components/barchartv2/Barchart.component.js +2 -2
  2. package/dist/components/barchartv2/utils.d.ts +3 -0
  3. package/dist/components/barchartv2/utils.d.ts.map +1 -1
  4. package/dist/components/barchartv2/utils.js +21 -42
  5. package/dist/components/buttonv2/CopyButton.component.d.ts +3 -2
  6. package/dist/components/buttonv2/CopyButton.component.d.ts.map +1 -1
  7. package/dist/components/buttonv2/CopyButton.component.js +26 -5
  8. package/dist/components/linetimeseriechart/linetimeseriechart.component.d.ts.map +1 -1
  9. package/dist/components/linetimeseriechart/linetimeseriechart.component.js +11 -14
  10. package/dist/components/textarea/TextArea.component.d.ts +5 -0
  11. package/dist/components/textarea/TextArea.component.d.ts.map +1 -1
  12. package/dist/components/textarea/TextArea.component.js +35 -4
  13. package/dist/icons/branding-logo.d.ts.map +1 -1
  14. package/dist/icons/branding-logo.js +1 -1
  15. package/dist/icons/branding.d.ts.map +1 -1
  16. package/dist/icons/branding.js +1 -1
  17. package/dist/index.css +4 -2
  18. package/package.json +1 -1
  19. package/src/lib/components/barchartv2/Barchart.component.tsx +2 -2
  20. package/src/lib/components/barchartv2/utils.test.ts +26 -26
  21. package/src/lib/components/barchartv2/utils.ts +28 -35
  22. package/src/lib/components/buttonv2/CopyButton.component.tsx +28 -4
  23. package/src/lib/components/linetimeseriechart/linetimeseriechart.component.tsx +11 -16
  24. package/src/lib/components/textarea/TextArea.component.tsx +73 -3
  25. package/src/lib/icons/branding-logo.tsx +15 -41
  26. package/src/lib/icons/branding.tsx +25 -49
  27. package/src/lib/index.css +4 -2
  28. package/stories/textarea.stories.tsx +56 -2
@@ -32,14 +32,14 @@ export const Playground = {};
32
32
 
33
33
  export const DefaultTextArea = {
34
34
  args: {
35
- value: 'Some text',
35
+ defaultValue: 'Some text',
36
36
  },
37
37
  };
38
38
 
39
39
  export const TextVariantTextArea = {
40
40
  args: {
41
41
  variant: 'text',
42
- value: 'Text area with "text" variant',
42
+ defaultValue: 'Text area with "text" variant',
43
43
  },
44
44
  };
45
45
 
@@ -67,3 +67,57 @@ export const RowsAndColsSet = {
67
67
  placeholder: 'With rows = 20 and cols = 40',
68
68
  },
69
69
  };
70
+
71
+ /**
72
+ * Auto-growing textarea adjusts its height based on content
73
+ * Perfect for displaying commands or long text where you want the entire content visible
74
+ * Simply set autoGrow={true} and the textarea will grow to show all content
75
+ */
76
+ export const AutoGrowTextArea = {
77
+ args: {
78
+ autoGrow: true,
79
+ placeholder:
80
+ 'Type or paste content here...\nThe textarea will automatically grow to fit all the content.',
81
+ defaultValue: `docker run -d \\
82
+ --name my-container \\
83
+ -p 8080:80 \\
84
+ -v /host/path:/container/path \\
85
+ -e ENV_VAR=value \\
86
+ my-image:latest`,
87
+ width: '500px',
88
+ },
89
+ };
90
+
91
+ /**
92
+ * Auto-growing textarea with long command example
93
+ * The entire command is visible without scrolling
94
+ */
95
+ export const AutoGrowWithLongCommand = {
96
+ args: {
97
+ autoGrow: true,
98
+ variant: 'code',
99
+ defaultValue: `kubectl apply -f - <<EOF
100
+ apiVersion: v1
101
+ kind: Pod
102
+ metadata:
103
+ name: my-pod
104
+ labels:
105
+ app: myapp
106
+ spec:
107
+ containers:
108
+ - name: nginx
109
+ image: nginx:1.14.2
110
+ ports:
111
+ - containerPort: 80
112
+ env:
113
+ - name: DATABASE_URL
114
+ value: "postgresql://user:password@localhost:5432/db"
115
+ - name: API_KEY
116
+ valueFrom:
117
+ secretKeyRef:
118
+ name: api-secret
119
+ key: api-key
120
+ EOF`,
121
+ width: '600px',
122
+ },
123
+ };