@apify/ui-library 1.171.1-uilibraryversion2candida-85b55e.71 → 1.171.1

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 (114) hide show
  1. package/README.md +1 -1
  2. package/dist/components/banner/banner.d.ts +11 -0
  3. package/dist/components/banner/banner.d.ts.map +1 -0
  4. package/dist/components/banner/banner.js +76 -0
  5. package/dist/components/banner/index.d.ts +2 -0
  6. package/dist/components/banner/index.d.ts.map +1 -0
  7. package/dist/components/chip/chip.d.ts +55 -0
  8. package/dist/components/chip/chip.d.ts.map +1 -0
  9. package/dist/components/chip/chip.js +144 -0
  10. package/dist/components/chip/index.d.ts +2 -0
  11. package/dist/components/chip/index.d.ts.map +1 -0
  12. package/dist/components/code/code_block/code_block.d.ts +3 -1
  13. package/dist/components/code/code_block/code_block.d.ts.map +1 -1
  14. package/dist/components/code/code_block/code_block.js +7 -1
  15. package/dist/components/code/code_block/code_block.styled.d.ts +1 -0
  16. package/dist/components/code/code_block/code_block.styled.d.ts.map +1 -1
  17. package/dist/components/code/code_block/code_block.styled.js +10 -0
  18. package/dist/components/code/inline_code/inline_code.d.ts.map +1 -1
  19. package/dist/components/color_wheel_gradient/color_wheel_gradient.d.ts +9 -0
  20. package/dist/components/color_wheel_gradient/color_wheel_gradient.d.ts.map +1 -0
  21. package/dist/components/color_wheel_gradient/color_wheel_gradient.js +27 -0
  22. package/dist/components/color_wheel_gradient/index.d.ts +2 -0
  23. package/dist/components/color_wheel_gradient/index.d.ts.map +1 -0
  24. package/dist/components/index.d.ts +3 -0
  25. package/dist/components/index.d.ts.map +1 -1
  26. package/dist/components/simple_markdown/simple_markdown.d.ts.map +1 -1
  27. package/dist/components/simple_markdown/simple_markdown.js +1 -1
  28. package/dist/components/simple_markdown/simple_markdown_components.d.ts +2 -5
  29. package/dist/components/simple_markdown/simple_markdown_components.d.ts.map +1 -1
  30. package/dist/components/simple_markdown/simple_markdown_components.js +3 -2
  31. package/dist/components/tag/tag.d.ts +1 -1
  32. package/dist/components/tag/tag.d.ts.map +1 -1
  33. package/dist/components/text/index.d.ts +1 -0
  34. package/dist/components/text/index.d.ts.map +1 -1
  35. package/dist/components/text/text_content.d.ts +1 -1
  36. package/dist/components/text/text_content.js +1 -1
  37. package/dist/files_hash_at_build.txt +1 -1
  38. package/dist/index.js +5 -1
  39. package/dist/src/components/banner/banner.d.ts +11 -0
  40. package/dist/src/components/banner/banner.d.ts.map +1 -0
  41. package/dist/src/components/banner/banner.js +70 -0
  42. package/dist/src/components/banner/banner.js.map +1 -0
  43. package/dist/src/components/banner/index.d.ts +2 -0
  44. package/dist/src/components/banner/index.d.ts.map +1 -0
  45. package/dist/src/components/banner/index.js +2 -0
  46. package/dist/src/components/banner/index.js.map +1 -0
  47. package/dist/src/components/chip/chip.d.ts +56 -0
  48. package/dist/src/components/chip/chip.d.ts.map +1 -0
  49. package/dist/src/components/chip/chip.js +123 -0
  50. package/dist/src/components/chip/chip.js.map +1 -0
  51. package/dist/src/components/chip/index.d.ts +2 -0
  52. package/dist/src/components/chip/index.d.ts.map +1 -0
  53. package/dist/src/components/chip/index.js +2 -0
  54. package/dist/src/components/chip/index.js.map +1 -0
  55. package/dist/src/components/code/code_block/code_block.d.ts +3 -1
  56. package/dist/src/components/code/code_block/code_block.d.ts.map +1 -1
  57. package/dist/src/components/code/code_block/code_block.js +3 -2
  58. package/dist/src/components/code/code_block/code_block.js.map +1 -1
  59. package/dist/src/components/code/code_block/code_block.styled.d.ts +1 -0
  60. package/dist/src/components/code/code_block/code_block.styled.d.ts.map +1 -1
  61. package/dist/src/components/code/code_block/code_block.styled.js +10 -0
  62. package/dist/src/components/code/code_block/code_block.styled.js.map +1 -1
  63. package/dist/src/components/code/inline_code/inline_code.d.ts.map +1 -1
  64. package/dist/src/components/code/inline_code/inline_code.js +1 -0
  65. package/dist/src/components/code/inline_code/inline_code.js.map +1 -1
  66. package/dist/src/components/color_wheel_gradient/color_wheel_gradient.d.ts +9 -0
  67. package/dist/src/components/color_wheel_gradient/color_wheel_gradient.d.ts.map +1 -0
  68. package/dist/src/components/color_wheel_gradient/color_wheel_gradient.js +25 -0
  69. package/dist/src/components/color_wheel_gradient/color_wheel_gradient.js.map +1 -0
  70. package/dist/src/components/color_wheel_gradient/index.d.ts +2 -0
  71. package/dist/src/components/color_wheel_gradient/index.d.ts.map +1 -0
  72. package/dist/src/components/color_wheel_gradient/index.js +2 -0
  73. package/dist/src/components/color_wheel_gradient/index.js.map +1 -0
  74. package/dist/src/components/index.d.ts +3 -0
  75. package/dist/src/components/index.d.ts.map +1 -1
  76. package/dist/src/components/index.js +3 -0
  77. package/dist/src/components/index.js.map +1 -1
  78. package/dist/src/components/simple_markdown/simple_markdown.d.ts.map +1 -1
  79. package/dist/src/components/simple_markdown/simple_markdown.js +1 -2
  80. package/dist/src/components/simple_markdown/simple_markdown.js.map +1 -1
  81. package/dist/src/components/simple_markdown/simple_markdown_components.d.ts +4 -5
  82. package/dist/src/components/simple_markdown/simple_markdown_components.d.ts.map +1 -1
  83. package/dist/src/components/simple_markdown/simple_markdown_components.js +4 -4
  84. package/dist/src/components/simple_markdown/simple_markdown_components.js.map +1 -1
  85. package/dist/src/components/tag/tag.d.ts +1 -1
  86. package/dist/src/components/tag/tag.d.ts.map +1 -1
  87. package/dist/src/components/text/index.d.ts +1 -0
  88. package/dist/src/components/text/index.d.ts.map +1 -1
  89. package/dist/src/components/text/index.js +1 -0
  90. package/dist/src/components/text/index.js.map +1 -1
  91. package/dist/src/components/text/text_content.d.ts +1 -1
  92. package/dist/src/components/text/text_content.js +1 -1
  93. package/dist/tsconfig.build.tsbuildinfo +1 -1
  94. package/package.json +2 -2
  95. package/src/components/banner/banner.stories.tsx +238 -0
  96. package/src/components/banner/banner.tsx +91 -0
  97. package/src/components/banner/index.ts +1 -0
  98. package/src/components/chip/chip.stories.tsx +311 -0
  99. package/src/components/chip/chip.tsx +167 -0
  100. package/src/components/chip/index.ts +1 -0
  101. package/src/components/code/code_block/code_block.stories.jsx +13 -6
  102. package/src/components/code/code_block/code_block.styled.tsx +11 -0
  103. package/src/components/code/code_block/code_block.tsx +8 -0
  104. package/src/components/code/inline_code/inline_code.tsx +1 -0
  105. package/src/components/color_wheel_gradient/color_wheel_gradient.stories.tsx +152 -0
  106. package/src/components/color_wheel_gradient/color_wheel_gradient.tsx +33 -0
  107. package/src/components/color_wheel_gradient/index.ts +1 -0
  108. package/src/components/index.ts +3 -0
  109. package/src/components/simple_markdown/simple_markdown.tsx +1 -2
  110. package/src/components/simple_markdown/simple_markdown_components.tsx +14 -8
  111. package/src/components/tag/tag.tsx +1 -1
  112. package/src/components/text/index.ts +1 -0
  113. package/src/components/text/text_content.stories.tsx +194 -0
  114. package/src/components/text/text_content.tsx +1 -1
@@ -0,0 +1,194 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-vite';
2
+ import styled from 'styled-components';
3
+
4
+ import { type ContentTextProps, TextContent } from './text_content';
5
+
6
+ export default {
7
+ title: 'Design Tokens/Typography/TextContent',
8
+ component: TextContent,
9
+ tags: ['deprecated'],
10
+ parameters: {
11
+ docs: {
12
+ description: {
13
+ component:
14
+ '⚠️ **Internal Component**: This component is specifically designed for use within the SimpleMarkdown component.' +
15
+ ' It provides content-specific text styles for markdown rendering (paragraphs and code snippets).' +
16
+ ' For general text usage, use TextShared or TextMarketing instead.',
17
+ },
18
+ },
19
+ },
20
+ argTypes: {
21
+ type: {
22
+ control: { type: 'select' },
23
+ options: ['paragraph', 'snippet'],
24
+ description: 'Text type: paragraph for regular markdown text, snippet for inline code',
25
+ },
26
+ weight: {
27
+ control: { type: 'select' },
28
+ options: ['normal', 'bold'],
29
+ description: 'Font weight',
30
+ },
31
+ as: {
32
+ control: 'text',
33
+ description: 'The HTML element to render as (default: p)',
34
+ },
35
+ children: {
36
+ control: 'text',
37
+ description: 'The text content',
38
+ },
39
+ color: {
40
+ control: 'color',
41
+ description: 'Custom color for the text',
42
+ },
43
+ align: {
44
+ control: { type: 'select' },
45
+ options: ['left', 'center', 'right'],
46
+ description: 'Text alignment',
47
+ },
48
+ italic: {
49
+ control: 'boolean',
50
+ description: 'Apply italic style',
51
+ },
52
+ uppercase: {
53
+ control: 'boolean',
54
+ description: 'Transform text to uppercase',
55
+ },
56
+ },
57
+ } as Meta<ContentTextProps>;
58
+
59
+ type Story = StoryObj<ContentTextProps>;
60
+
61
+ const StoryWrapper = styled.div`
62
+ display: flex;
63
+ flex-direction: column;
64
+ gap: 1.5rem;
65
+ padding: 2rem;
66
+ max-width: 800px;
67
+ `;
68
+
69
+ const TextShowcase = styled.div`
70
+ padding: 1rem;
71
+ background: #f5f5f5;
72
+ border-radius: 4px;
73
+
74
+ small {
75
+ display: block;
76
+ color: #666;
77
+ font-size: 0.75rem;
78
+ margin-bottom: 0.5rem;
79
+ font-family: monospace;
80
+ }
81
+ `;
82
+
83
+ const WarningBanner = styled.div`
84
+ background: #fff3cd;
85
+ border: 1px solid #ffc107;
86
+ border-radius: 4px;
87
+ padding: 1rem;
88
+ margin-bottom: 1.5rem;
89
+
90
+ strong {
91
+ color: #856404;
92
+ display: block;
93
+ margin-bottom: 0.5rem;
94
+ }
95
+
96
+ p {
97
+ color: #856404;
98
+ margin: 0;
99
+ font-size: 0.875rem;
100
+ }
101
+ `;
102
+
103
+ /**
104
+ * Default content text (used by SimpleMarkdown)
105
+ *
106
+ * ⚠️ This component is for internal use by SimpleMarkdown only
107
+ */
108
+ export const Default: Story = {
109
+ args: {
110
+ type: 'paragraph',
111
+ weight: 'normal',
112
+ children: 'Content text for markdown rendering.',
113
+ },
114
+ };
115
+
116
+ /**
117
+ * All content text variants as used in SimpleMarkdown component
118
+ *
119
+ * ⚠️ These text styles are specifically designed for markdown content rendering.
120
+ * For general application text, use TextShared or TextMarketing.
121
+ */
122
+ export const AllVariants: Story = {
123
+ render: () => (
124
+ <StoryWrapper>
125
+ <WarningBanner>
126
+ <strong>⚠️ Internal Component</strong>
127
+ <p>
128
+ TextContent is used exclusively by the SimpleMarkdown component for rendering markdown paragraphs
129
+ and inline code snippets. For general text usage in your application, use TextShared or
130
+ TextMarketing components instead.
131
+ </p>
132
+ </WarningBanner>
133
+
134
+ <div>
135
+ <h3 style={{ marginTop: 0, marginBottom: '1rem' }}>Paragraph Type</h3>
136
+ <p style={{ fontSize: '0.875rem', color: '#666', marginBottom: '1rem' }}>
137
+ Used for regular text content in markdown documents
138
+ </p>
139
+
140
+ <TextShowcase>
141
+ <small>type=paragraph, weight=normal</small>
142
+ <TextContent type="paragraph" weight="normal">
143
+ This is a paragraph with normal weight, used for standard markdown text content. It provides
144
+ optimal readability for documentation and readme files.
145
+ </TextContent>
146
+ </TextShowcase>
147
+
148
+ <TextShowcase>
149
+ <small>type=paragraph, weight=bold</small>
150
+ <TextContent type="paragraph" weight="bold">
151
+ This is a paragraph with bold weight, used for **strong text** in markdown. It creates emphasis
152
+ for important information within the content.
153
+ </TextContent>
154
+ </TextShowcase>
155
+ </div>
156
+
157
+ <div>
158
+ <h3 style={{ marginBottom: '1rem' }}>Snippet Type</h3>
159
+ <p style={{ fontSize: '0.875rem', color: '#666', marginBottom: '1rem' }}>
160
+ Used for inline code within markdown text (e.g., `code`)
161
+ </p>
162
+
163
+ <TextShowcase>
164
+ <small>type=snippet, weight=normal</small>
165
+ <TextContent type="snippet" weight="normal">
166
+ const inlineCode = &quot;monospace text for code snippets&quot;;
167
+ </TextContent>
168
+ </TextShowcase>
169
+
170
+ <TextShowcase>
171
+ <small>type=snippet, weight=bold</small>
172
+ <TextContent type="snippet" weight="bold">
173
+ function boldCodeSnippet() &#123; return &quot;emphasized code&quot;; &#125;
174
+ </TextContent>
175
+ </TextShowcase>
176
+ </div>
177
+
178
+ <div style={{ marginTop: '2rem', padding: '1.5rem', border: '1px solid #e0e0e0', borderRadius: '4px' }}>
179
+ <h4 style={{ marginTop: 0 }}>Example in Markdown Context</h4>
180
+ <TextContent type="paragraph" weight="normal" mb="space8">
181
+ The SimpleMarkdown component uses these styles to render markdown. For example, when you write code
182
+ like{' '}
183
+ <TextContent type="snippet" weight="normal" as="span">
184
+ npm install
185
+ </TextContent>{' '}
186
+ inline, it uses the snippet type.
187
+ </TextContent>
188
+ <TextContent type="paragraph" weight="bold">
189
+ Bold text in markdown is rendered using paragraph with bold weight.
190
+ </TextContent>
191
+ </div>
192
+ </StoryWrapper>
193
+ ),
194
+ };
@@ -80,7 +80,7 @@ const StyledTextContent = styled(TextBaseComponent)<StyledContentTextProps>`
80
80
  `;
81
81
 
82
82
  /**
83
- * Internal to SimpleMarkdown, not exported from the package. Use Text elsewhere.
83
+ * @deprecated Use Text or TextMarketing from ui-library
84
84
  */
85
85
  export const TextContent = forwardRef<HTMLElement | undefined, ContentTextProps>(
86
86
  ({ type, weight, as, ...rest }, ref) => {