@parallelworks/ui 0.46.0 → 0.48.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.
- package/README.md +17 -2
- package/dist/ai/components/ChatInput.js +1 -1
- package/dist/components/ColorInput.d.ts +36 -0
- package/dist/components/ColorInput.js +82 -0
- package/dist/components/Combobox.d.ts +5 -2
- package/dist/components/Combobox.js +12 -11
- package/dist/components/CreateModal.js +2 -2
- package/dist/components/DatePicker.d.ts +5 -1
- package/dist/components/DatePicker.js +7 -7
- package/dist/components/Field.d.ts +19 -5
- package/dist/components/Field.js +21 -4
- package/dist/components/Input.d.ts +11 -1
- package/dist/components/Input.js +9 -6
- package/dist/components/MenuEntries.js +1 -1
- package/dist/components/NumberInput.d.ts +1 -0
- package/dist/components/OneTimeCodeInput.d.ts +23 -0
- package/dist/components/OneTimeCodeInput.js +39 -0
- package/dist/components/Provider.d.ts +12 -3
- package/dist/components/Provider.js +14 -2
- package/dist/components/SearchInput.d.ts +1 -0
- package/dist/components/Section.d.ts +7 -2
- package/dist/components/Section.js +58 -39
- package/dist/components/SegmentedControl.d.ts +4 -2
- package/dist/components/SegmentedControl.js +4 -2
- package/dist/components/Select.d.ts +2 -1
- package/dist/components/Select.js +1 -1
- package/dist/components/Tabs.js +1 -0
- package/dist/components/ThemeEditor.js +15 -52
- package/dist/components/ToggleGroup.d.ts +42 -0
- package/dist/components/ToggleGroup.js +69 -0
- package/dist/components/fieldBox.js +1 -1
- package/dist/form/Fields/BooleanField.js +1 -1
- package/dist/form/Fields/ColorField.js +6 -10
- package/dist/form/Fields/DropdownField.js +1 -1
- package/dist/form/Fields/DurationField.js +1 -1
- package/dist/form/Fields/MultiDropdownField.js +1 -1
- package/dist/form/Fields/StringField.js +1 -1
- package/dist/form/Fields/TextAreaField.js +1 -1
- package/dist/form/Form.js +1 -1
- package/dist/graph/GraphEditorDialogs.js +1 -1
- package/dist/graph/InputDialog.js +2 -2
- package/dist/graph/WorkflowSettingsDialog.js +1 -1
- package/dist/graph/editorFields.js +2 -2
- package/dist/graph/inputRefs.js +1 -1
- package/dist/graph/stepWith.js +1 -1
- package/dist/icons.d.ts +17 -1
- package/dist/icons.js +19 -3
- package/dist/index.d.ts +5 -1
- package/dist/index.js +14 -10
- package/dist/list/ListViewControls.js +1 -1
- package/dist/list/listSearch.js +1 -1
- package/dist/styles/theme.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/derive.d.ts +3 -0
- package/dist/theme/derive.js +11 -7
- package/package.json +1 -1
package/dist/theme/derive.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ export interface DeriveOptions {
|
|
|
14
14
|
/** How the code theme colors syntax. */
|
|
15
15
|
code?: CodeStyle;
|
|
16
16
|
}
|
|
17
|
+
/** The surfaces placeholder and disabled text sit on: field boxes, and the bare inputs of
|
|
18
|
+
* search bars, menus and dialogs that take their surface's background. */
|
|
19
|
+
export declare const PLACEHOLDER_ON: ThemeToken[];
|
|
17
20
|
/** Every token as sRGB, plus display-p3 overrides that keep every contrast the sRGB output meets. */
|
|
18
21
|
export declare function generateTheme(scheme: Scheme, options?: DeriveOptions): GeneratedTheme;
|
|
19
22
|
/** Every `--theme-*` token for a scheme, in sRGB. */
|
package/dist/theme/derive.js
CHANGED
|
@@ -88,6 +88,15 @@ function inkFor(surface, tint, dark) {
|
|
|
88
88
|
function byContrast(k, [at0, at30, at100]) {
|
|
89
89
|
return k <= 30 ? at0 + (at30 - at0) * k / 30 : at30 + (at100 - at30) * (k - 30) / 70;
|
|
90
90
|
}
|
|
91
|
+
/** The surfaces placeholder and disabled text sit on: field boxes, and the bare inputs of
|
|
92
|
+
* search bars, menus and dialogs that take their surface's background. */
|
|
93
|
+
var PLACEHOLDER_ON = [
|
|
94
|
+
"--theme-input-bg",
|
|
95
|
+
"--theme-input-disabled-bg",
|
|
96
|
+
"--theme-app-bg",
|
|
97
|
+
"--theme-panel-bg",
|
|
98
|
+
"--theme-muted-panel-bg"
|
|
99
|
+
];
|
|
91
100
|
/** The roles' targets at a contrast. WCAG AA is the floor at every contrast. */
|
|
92
101
|
function targets(k) {
|
|
93
102
|
const at = (wcag, apca) => ({
|
|
@@ -267,12 +276,7 @@ function build(scheme, options) {
|
|
|
267
276
|
];
|
|
268
277
|
solved("--theme-app", ink, textOn, t.primary);
|
|
269
278
|
solved("--theme-muted-text-color", ink, textOn, t.secondary);
|
|
270
|
-
solved("--theme-placeholder", ink,
|
|
271
|
-
"--theme-input-bg",
|
|
272
|
-
"--theme-input-disabled-bg",
|
|
273
|
-
"--theme-app-bg",
|
|
274
|
-
"--theme-panel-bg"
|
|
275
|
-
], t.placeholder);
|
|
279
|
+
solved("--theme-placeholder", ink, PLACEHOLDER_ON, t.placeholder);
|
|
276
280
|
solved("--theme-link", accent, [
|
|
277
281
|
"--theme-app-bg",
|
|
278
282
|
"--theme-panel-bg",
|
|
@@ -472,4 +476,4 @@ function themeStylesheet(selector, scheme, options = {}) {
|
|
|
472
476
|
return `${selector} {\n${block(srgb, " ")}\n}\n${wide ? `\n@media (color-gamut: p3) {\n ${selector} {\n${wide}\n }\n}\n` : ""}`;
|
|
473
477
|
}
|
|
474
478
|
//#endregion
|
|
475
|
-
export { SIDEBAR_TOKENS, THEME_TOKENS, deriveTheme, generateTheme, themeStylesheet };
|
|
479
|
+
export { PLACEHOLDER_ON, SIDEBAR_TOKENS, THEME_TOKENS, deriveTheme, generateTheme, themeStylesheet };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parallelworks/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.48.0",
|
|
4
4
|
"description": "React UI components: a theme contract, icons, brand logos, primitives, lists, forms, a job graph, a code editor, a log viewer, a file explorer and an AI chat, each on its own subpath",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|