@tcn/ui 0.3.3 → 0.5.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 (131) hide show
  1. package/dist/Color-6BZIO3FS-CWWwv-fq.js +1004 -0
  2. package/dist/Color-6BZIO3FS-CWWwv-fq.js.map +1 -0
  3. package/dist/{WithTooltip-IO6J4KBT-B1oq93K5.js → WithTooltip-65CFNBJE-DvcUZizH.js} +4 -4
  4. package/dist/WithTooltip-65CFNBJE-DvcUZizH.js.map +1 -0
  5. package/dist/actions/__docs__/components/showcase.d.ts.map +1 -1
  6. package/dist/actions/__docs__/components/showcase.js +1 -1
  7. package/dist/actions/button/base_button/base_button.d.ts +2 -4
  8. package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
  9. package/dist/actions/button/base_button/base_button.js +35 -35
  10. package/dist/actions/button/base_button/base_button.js.map +1 -1
  11. package/dist/actions/button/button/button.d.ts +7 -1
  12. package/dist/actions/button/button/button.d.ts.map +1 -1
  13. package/dist/actions/button/button/button.js +9 -7
  14. package/dist/actions/button/button/button.js.map +1 -1
  15. package/dist/actions/button/slim_button/slim_button.d.ts +6 -1
  16. package/dist/actions/button/slim_button/slim_button.d.ts.map +1 -1
  17. package/dist/actions/button/slim_button/slim_button.js +13 -14
  18. package/dist/actions/button/slim_button/slim_button.js.map +1 -1
  19. package/dist/actions/toggle/toggle.d.ts +9 -0
  20. package/dist/actions/toggle/toggle.d.ts.map +1 -0
  21. package/dist/actions/toggle/toggle.js +21 -0
  22. package/dist/actions/toggle/toggle.js.map +1 -0
  23. package/dist/feedback/lazy/lazy.js +3 -3
  24. package/dist/formatter-EIJCOSYU-D6nmx63h.js +6 -0
  25. package/dist/formatter-EIJCOSYU-D6nmx63h.js.map +1 -0
  26. package/dist/inputs/mask_input/mask.d.ts.map +1 -1
  27. package/dist/inputs/mask_input/mask.js.map +1 -1
  28. package/dist/inputs/multiselect/multiselect_inline_values.js +3 -2
  29. package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
  30. package/dist/inputs/multiselect/multiselect_values.js +3 -2
  31. package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
  32. package/dist/layouts/index.d.ts +3 -1
  33. package/dist/layouts/index.d.ts.map +1 -1
  34. package/dist/layouts/index.js +22 -18
  35. package/dist/layouts/index.js.map +1 -1
  36. package/dist/layouts/row/row.d.ts +4 -0
  37. package/dist/layouts/row/row.d.ts.map +1 -0
  38. package/dist/layouts/row/row.js +11 -0
  39. package/dist/layouts/row/row.js.map +1 -0
  40. package/dist/layouts/section/heading.d.ts +7 -0
  41. package/dist/layouts/section/heading.d.ts.map +1 -0
  42. package/dist/layouts/section/heading.js +9 -0
  43. package/dist/layouts/section/heading.js.map +1 -0
  44. package/dist/layouts/section/section.d.ts +4 -0
  45. package/dist/layouts/section/section.d.ts.map +1 -0
  46. package/dist/layouts/section/section.js +22 -0
  47. package/dist/layouts/section/section.js.map +1 -0
  48. package/dist/navigation/tabs/primitives/tabs_list.d.ts.map +1 -1
  49. package/dist/navigation/tabs/primitives/tabs_list.js +17 -24
  50. package/dist/navigation/tabs/primitives/tabs_list.js.map +1 -1
  51. package/dist/overlay/carrot/base_carrot.d.ts +8 -0
  52. package/dist/overlay/carrot/base_carrot.d.ts.map +1 -0
  53. package/dist/overlay/carrot/base_carrot.js +21 -0
  54. package/dist/overlay/carrot/base_carrot.js.map +1 -0
  55. package/dist/row.css +1 -0
  56. package/dist/section.css +1 -0
  57. package/dist/section.module-0wyGkhDg.js +5 -0
  58. package/dist/section.module-0wyGkhDg.js.map +1 -0
  59. package/dist/{showcase-WfP6kBEb.js → showcase-DK557szS.js} +18018 -16269
  60. package/dist/showcase-DK557szS.js.map +1 -0
  61. package/dist/surfaces/pop_confirm/pop_confirm.js +6 -3
  62. package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
  63. package/dist/{syntaxhighlighter-IQDEPFLK-BX_eF8__.js → syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js} +54 -54
  64. package/dist/syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js.map +1 -0
  65. package/dist/themes/themes/ergo/ergo_theme.css +1 -1
  66. package/dist/themes/themes/ergo/ergo_theme.js +403 -263
  67. package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
  68. package/dist/themes/themes/windows_98/windows_98.css +1 -1
  69. package/dist/themes/themes/windows_98/windows_98_theme.js +108 -1
  70. package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
  71. package/dist/tokens/index.d.ts +2 -0
  72. package/dist/tokens/index.d.ts.map +1 -1
  73. package/dist/tokens/index.js +5 -1
  74. package/dist/tokens/index.js.map +1 -1
  75. package/dist/tokens/key/key.d.ts +3 -0
  76. package/dist/tokens/key/key.d.ts.map +1 -0
  77. package/dist/tokens/key/key.js +8 -0
  78. package/dist/tokens/key/key.js.map +1 -0
  79. package/dist/tokens/value/value.d.ts +3 -0
  80. package/dist/tokens/value/value.d.ts.map +1 -0
  81. package/dist/tokens/value/value.js +8 -0
  82. package/dist/tokens/value/value.js.map +1 -0
  83. package/package.json +1 -1
  84. package/src/actions/__docs__/actions.mdx +159 -34
  85. package/src/actions/__docs__/actions.stories.tsx +416 -101
  86. package/src/actions/__docs__/components/showcase.tsx +10 -6
  87. package/src/actions/button/__stories__/button.stories.tsx +10 -0
  88. package/src/actions/button/__stories__/toggle.stories.tsx +177 -0
  89. package/src/actions/button/base_button/base_button.tsx +8 -10
  90. package/src/actions/button/button/button.tsx +11 -2
  91. package/src/actions/button/slim_button/slim_button.tsx +20 -13
  92. package/src/actions/toggle/toggle.tsx +26 -0
  93. package/src/inputs/mask_input/mask.ts +7 -1
  94. package/src/layouts/index.ts +4 -2
  95. package/src/layouts/row/row.module.css +5 -0
  96. package/src/layouts/row/row.tsx +15 -0
  97. package/src/layouts/section/__stories__/section.stories.module.css +6 -0
  98. package/src/layouts/section/__stories__/section.stories.tsx +152 -0
  99. package/src/layouts/section/heading.tsx +16 -0
  100. package/src/layouts/section/section.module.css +41 -0
  101. package/src/layouts/section/section.tsx +21 -0
  102. package/src/navigation/tabs/primitives/tabs_list.tsx +5 -6
  103. package/src/overlay/carrot/base_carrot.tsx +24 -0
  104. package/src/overlay/carrot/carrot.stories.tsx +54 -0
  105. package/src/surfaces/card/card.stories.tsx +14 -14
  106. package/src/surfaces/modal/__stories__/modal.stories.tsx +16 -7
  107. package/src/surfaces/window/window.stories.tsx +16 -10
  108. package/src/themes/themes/ergo/__stories__/components/material_picker/sb_inverted_materials.module.css +4 -4
  109. package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.module.css +3 -0
  110. package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +5 -2
  111. package/src/themes/themes/ergo/__stories__/material.stories.tsx +2 -2
  112. package/src/themes/themes/ergo/__stories__/sb_materials.module.css +31 -26
  113. package/src/themes/themes/ergo/ergo_theme.css +400 -260
  114. package/src/themes/themes/windows_98/windows_98.css +108 -1
  115. package/src/tokens/index.ts +2 -0
  116. package/src/tokens/key/key.tsx +10 -0
  117. package/src/tokens/value/value.tsx +10 -0
  118. package/tsconfig.json +6 -0
  119. package/dist/Color-ASIRERSW-B4GaVKuQ.js +0 -990
  120. package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +0 -1
  121. package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +0 -1
  122. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +0 -6
  123. package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +0 -1
  124. package/dist/layouts/list/section_header.d.ts +0 -6
  125. package/dist/layouts/list/section_header.d.ts.map +0 -1
  126. package/dist/layouts/list/section_header.js +0 -22
  127. package/dist/layouts/list/section_header.js.map +0 -1
  128. package/dist/showcase-WfP6kBEb.js.map +0 -1
  129. package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +0 -1
  130. package/src/layouts/list/section_header.module.css +0 -20
  131. package/src/layouts/list/section_header.tsx +0 -21
@@ -0,0 +1 @@
1
+ {"version":3,"file":"key.js","sources":["../../../src/tokens/key/key.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { HStack, HStackProps } from '../../stacks/h_stack.js';\n\nexport const Key = ({ children, className, hAlign = 'start', ...props }: HStackProps) => {\n return (\n <HStack className={clsx(className, 'tcn-key')} hAlign={hAlign} {...props}>\n {children}\n </HStack>\n );\n};\n"],"names":["Key","children","className","hAlign","props","jsx","HStack","clsx"],"mappings":";;;AAGO,MAAMA,IAAM,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,QAAAC,IAAS,SAAS,GAAGC,QAE5D,gBAAAC,EAACC,GAAA,EAAO,WAAWC,EAAKL,GAAW,SAAS,GAAG,QAAAC,GAAiB,GAAGC,GAChE,UAAAH,EAAA,CACH;"}
@@ -0,0 +1,3 @@
1
+ import { HStackProps } from '../../stacks/h_stack.js';
2
+ export declare const Value: ({ children, className, hAlign, ...props }: HStackProps) => import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=value.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../../src/tokens/value/value.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE9D,eAAO,MAAM,KAAK,GAAI,2CAAmD,WAAW,4CAMnF,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import a from "clsx";
3
+ import { HStack as c } from "../../stacks/h_stack.js";
4
+ const p = ({ children: r, className: o, hAlign: t = "end", ...m }) => /* @__PURE__ */ e(c, { className: a(o, "tcn-value"), hAlign: t, ...m, children: r });
5
+ export {
6
+ p as Value
7
+ };
8
+ //# sourceMappingURL=value.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value.js","sources":["../../../src/tokens/value/value.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { HStack, HStackProps } from '../../stacks/h_stack.js';\n\nexport const Value = ({ children, className, hAlign = 'end', ...props }: HStackProps) => {\n return (\n <HStack className={clsx(className, 'tcn-value')} hAlign={hAlign} {...props}>\n {children}\n </HStack>\n );\n};\n"],"names":["Value","children","className","hAlign","props","jsx","HStack","clsx"],"mappings":";;;AAGO,MAAMA,IAAQ,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,QAAAC,IAAS,OAAO,GAAGC,QAE5D,gBAAAC,EAACC,GAAA,EAAO,WAAWC,EAAKL,GAAW,WAAW,GAAG,QAAAC,GAAiB,GAAGC,GAClE,UAAAH,EAAA,CACH;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tcn/ui",
3
- "version": "0.3.3",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "author": "TCN",
@@ -7,58 +7,93 @@ import { Gallery } from './components/gallery';
7
7
 
8
8
  # Actions
9
9
 
10
- Interactive elements that triggers an action, or event. For example submitting a form, closing a modal, or deleting an entity.
10
+ Actions are interactive elements that trigger an event, or manage a workflow setting.
11
11
 
12
12
  - [Actions](#actions)
13
+ - [Base Action](#base-action)
13
14
  - [Button](#button)
14
- - [Utility (Slim Button)](#utility)
15
- - [Button Group](#button-group)
15
+ - [As Utility](#utility-button)
16
+ - [Toggle](#toggle)
17
+ - [As Utility](#utility-toggle)
18
+ - [Action Group](#action-group)
19
+
20
+ ## Base Action
21
+
22
+ ```tsx
23
+ export interface BaseButtonOwnProps {
24
+ size?: Size;
25
+ color?: string;
26
+ utility?: boolean;
27
+ }
28
+ ```
29
+
30
+ Base actions are the foundation for all actions. They are used to build the button and toggle components.
31
+
32
+ `size`: Customize the size of actions in relation to one another on a surface.
33
+
34
+ `color`: Override the accent color for the action.
35
+
36
+ `utility`: Flag the button as a utility, used to create compact actions.
37
+
16
38
 
17
39
  ## Button
18
40
 
19
- Relaxed, text based actions for high level page, or surface decisions (Cancel, Save, etc.)
41
+ Actions for high level page, or surface decisions.
42
+ Buttons trigger an action or event, for example, submitting a form, closing a modal, or deleting an entity.
43
+ Across a surface buttons are expected to have hierarchy, with one primary action per surface.
44
+ They also can have severity levels, which reflect to the user the level of impact for high consequence actions.
45
+ Buttons do not store selected state, and should reflect a single action or behavior per button.
46
+
47
+ ### Text Button
20
48
 
21
- <Gallery minColumnWidth="350px">
49
+ <Gallery minColumnWidth="400px">
22
50
 
23
51
  <Showcase
24
52
  title="Baseline"
25
53
  description="The default, out-of-the-box button with no additional props."
26
- of={ActionStories.ButtonBaselineShowcase}
54
+ of={ActionStories.ButtonBaseline}
27
55
  width="180px"
28
56
  />
29
57
 
30
58
  <Showcase
31
59
  title="Hierarchy"
32
60
  description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
33
- of={ActionStories.HierarchyShowcase}
61
+ of={ActionStories.ButtonHierarchy}
34
62
  width="380px"
35
63
  />
36
64
 
37
65
  <Showcase
38
66
  title="Size"
39
67
  description="Used to customize the size of actions in relation to one another on a surface. Use sparingly, do not use as a replacement for hierarchy."
40
- of={ActionStories.SizeShowcase}
68
+ of={ActionStories.ButtonSize}
41
69
  width="320px"
42
70
  />
43
71
 
44
72
  <Showcase
45
73
  title="Disabled"
46
74
  description="Prevents interaction and reduces visual prominence."
47
- of={ActionStories.DisabledShowcase}
75
+ of={ActionStories.ButtonDisabled}
48
76
  width="420px"
49
77
  />
50
78
 
51
79
  <Showcase
52
80
  title="With Icons"
53
81
  description="Icons can be added to buttons with the use of Icon and Spacer components."
54
- of={ActionStories.IconShowcase}
82
+ of={ActionStories.ButtonWithIcons}
55
83
  width="300px"
56
84
  />
57
85
 
86
+ <Showcase
87
+ title="Full Width"
88
+ description="Fill container width for mobile or prominent CTAs."
89
+ of={ActionStories.ButtonFullWidth}
90
+ width="340px"
91
+ />
92
+
58
93
  <Showcase
59
94
  title="Severity"
60
95
  description="Visual indication of the severity of consequential, one-time actions."
61
- of={ActionStories.SeverityShowcase}
96
+ of={ActionStories.ButtonSeverity}
62
97
  width="300px"
63
98
  >
64
99
  <Markdown>
@@ -84,77 +119,166 @@ Use sparingly for consequential, one-time actions such as:
84
119
  description="
85
120
  Override accent color for heavily brand or product specific actions.
86
121
  Use sparingly, should be avoided to create cohesion and consistency between UIs."
87
- of={ActionStories.ColorShowcase}
88
- width="420px"
89
- />
122
+ of={ActionStories.ButtonCustomColors}
123
+ width="480px"
124
+ />
125
+
90
126
 
91
127
  <Showcase
92
- title="Full Width"
93
- description="Fill container width for mobile or prominent CTAs."
94
- of={ActionStories.FullWidth}
128
+ title="Interactive State"
129
+ description="Visual indication of the interactive state of a button."
130
+ of={ActionStories.ButtonInteractiveStates}
95
131
  width="340px"
96
132
  />
97
133
 
98
134
  </Gallery>
99
135
 
100
136
 
137
+ ### Utility Button
101
138
 
102
- ## Utility
139
+ Examples of the utility prop set to true on the button component.
103
140
 
104
- Compact, icon-based actions. Used as re-usable tooling for item rows, utility bars, or supplemental behavior on elements (Close Panel, Copy Entity, ect)
105
141
 
106
142
  <Gallery>
107
143
 
108
144
  <Showcase
109
145
  title="Baseline"
110
- description="The default, out-of-the-box utility button with no additional props."
111
- of={ActionStories.SlimButtonBaselineShowcase}
146
+ of={ActionStories.UtilityButtonBaseline}
112
147
  width="180px"
113
- />
148
+ />
114
149
 
115
150
  <Showcase
116
151
  title="Hierarchy"
117
- description="Visually indicates the importance of an action and its relationship to other actions. A primary action should be limited to one per surface."
118
- of={ActionStories.SlimButtonHierarchy}
152
+ of={ActionStories.UtilityButtonHierarchy}
119
153
  width="240px"
120
154
  />
121
155
 
122
156
  <Showcase
123
157
  title="Size"
124
- description="Used to customize the size of actions in relation to one another on a surface. Use sparingly, do not use as a replacement for hierarchy."
125
- of={ActionStories.SlimButtonSizes}
158
+ of={ActionStories.UtilityButtonSizes}
126
159
  width="220px"
127
160
  />
128
161
 
129
162
  <Showcase
130
163
  title="Disabled"
131
- description="Prevents interaction and reduces visual prominence."
132
- of={ActionStories.SlimButtonDisabled}
164
+ of={ActionStories.UtilityButtonDisabled}
133
165
  width="240px"
134
166
  />
135
167
 
136
168
  <Showcase
137
169
  title="Severity"
138
- description="Visual indication of the severity of consequential, one-time actions."
139
- of={ActionStories.SlimButtonSeverity}
170
+ of={ActionStories.UtilityButtonSeverity}
140
171
  width="140px"
141
172
  />
142
173
 
143
174
  <Showcase
144
175
  title="Custom Colors"
145
- description="Override accent color for heavily brand or product specific actions. Use sparingly, should be avoided to create cohesion and consistency between UIs."
146
- of={ActionStories.SlimButtonColors}
176
+ of={ActionStories.UtilityButtonColors}
147
177
  width="140px"
148
178
  />
149
179
 
180
+ <Showcase
181
+ title="Interactive State"
182
+ of={ActionStories.UtilityButtonInteractiveStates}
183
+ width="140px"
184
+ />
185
+
150
186
  </Gallery>
151
187
 
152
- ## Button Group
153
188
 
154
- Visually grouped and styled buttons for closely related actions. The `hierarchy` and `size` props set on the ButtonGroup are automatically inherited by all child Button elements, ensuring visual consistency without needing to configure each button individually.
189
+ ## Toggle
190
+
191
+ Buttons with selected state for workflow or surface settings.
192
+ Toggles don't store severity or hierarchy directly.
193
+ They share the same visual hierarchy and severity across the same surface or group.
194
+ Different groups or surfaces can elevate the importance or visual weight of its settings depending on the context, and current workflow.
195
+
196
+ <Gallery minColumnWidth="240px">
197
+
198
+ <Showcase
199
+ title="Baseline"
200
+ of={ActionStories.ToggleBaseline}
201
+ width="180px"
202
+ />
203
+
204
+ <Showcase
205
+ title="Size"
206
+ of={ActionStories.ToggleSize}
207
+ width="280px"
208
+ />
209
+
210
+ <Showcase
211
+ title="Disabled"
212
+ of={ActionStories.ToggleDisabled}
213
+ width="220px"
214
+ />
215
+
216
+ <Showcase
217
+ title="With Icons"
218
+ of={ActionStories.ToggleWithIcons}
219
+ width="180px"
220
+ />
221
+
222
+ <Showcase
223
+ title="Custom Colors"
224
+ of={ActionStories.ToggleCustomColors}
225
+ width="280px"
226
+ />
227
+
228
+ <Showcase
229
+ title="Interactive State"
230
+ of={ActionStories.ToggleInteractiveStates}
231
+ width="240px"
232
+ />
233
+
234
+ </Gallery>
235
+
236
+ ## Button Group
155
237
 
156
238
  <Gallery minColumnWidth="380px">
157
239
 
240
+ </Gallery>
241
+
242
+ ### Utility Toggle
243
+
244
+ <Gallery>
245
+
246
+ <Showcase
247
+ title="Baseline"
248
+ of={ActionStories.UtilityToggleBaseline}
249
+ width="80px"
250
+ />
251
+
252
+ <Showcase
253
+ title="Size"
254
+ of={ActionStories.UtilityToggleSize}
255
+ width="160px"
256
+ />
257
+
258
+ <Showcase
259
+ title="Disabled"
260
+ of={ActionStories.UtilityToggleDisabled}
261
+ width="120px"
262
+ />
263
+
264
+ <Showcase
265
+ title="Custom Colors"
266
+ of={ActionStories.UtilityToggleCustomColors}
267
+ width="80px"
268
+ />
269
+
270
+ <Showcase
271
+ title="Interactive State"
272
+ of={ActionStories.UtilityToggleInteractiveStates}
273
+ width="140px"
274
+ />
275
+
276
+ </Gallery>
277
+
278
+
279
+ ## Action Group
280
+
281
+ <Gallery>
158
282
  <Showcase
159
283
  title="Baseline"
160
284
  description="The default, out-of-the-box button group with no additional props."
@@ -191,4 +315,5 @@ Visually grouped and styled buttons for closely related actions. The `hierarchy`
191
315
  of={ActionStories.ButtonGroupWithIcons}
192
316
  />
193
317
 
318
+
194
319
  </Gallery>