@sincpro/web-ui 2.11.0 → 2.13.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 +77 -20
- package/dist/components/activity/Messages.d.ts +3 -23
- package/dist/components/activity/Messages.js +3 -17
- package/dist/components/activity/index.d.ts +2 -1
- package/dist/components/activity/index.js +2 -1
- package/dist/components/activity/messageKind.d.ts +23 -0
- package/dist/components/activity/messageKind.js +17 -0
- package/dist/components/assist/assist.d.ts +1 -1
- package/dist/components/assist/assist.js +1 -1
- package/dist/components/frame/model.js +1 -1
- package/dist/components/guide/index.d.ts +2 -1
- package/dist/components/guide/index.js +2 -1
- package/dist/components/guide/selector.d.ts +25 -0
- package/dist/components/guide/selector.js +14 -0
- package/dist/components/guide/target.d.ts +3 -25
- package/dist/components/guide/target.js +2 -14
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/listing/AxisLevels.d.ts +2 -5
- package/dist/components/listing/AxisLevels.js +5 -22
- package/dist/components/listing/BoardColumns.js +10 -6
- package/dist/components/listing/ColumnsMenu.d.ts +3 -7
- package/dist/components/listing/ColumnsMenu.js +4 -8
- package/dist/components/listing/Listing.js +3 -1
- package/dist/components/listing/ListingBar.d.ts +16 -94
- package/dist/components/listing/ListingBar.js +24 -2
- package/dist/components/listing/RecordCard.d.ts +41 -3
- package/dist/components/listing/RecordCard.js +63 -22
- package/dist/components/listing/Row.js +5 -2
- package/dist/components/listing/collapsed.d.ts +2 -0
- package/dist/components/listing/collapsed.js +8 -0
- package/dist/components/listing/columnSpecs.d.ts +34 -0
- package/dist/components/listing/columnSpecs.js +54 -0
- package/dist/components/listing/columns.d.ts +3 -21
- package/dist/components/listing/columns.js +2 -39
- package/dist/components/listing/index.d.ts +11 -7
- package/dist/components/listing/index.js +15 -8
- package/dist/components/listing/levels.d.ts +9 -0
- package/dist/components/listing/levels.js +27 -0
- package/dist/components/listing/pageSizes.d.ts +9 -0
- package/dist/components/listing/pageSizes.js +11 -0
- package/dist/components/listing/pages.d.ts +2 -9
- package/dist/components/listing/pages.js +5 -9
- package/dist/components/listing/set.d.ts +1 -1
- package/dist/components/listing/tree.d.ts +2 -1
- package/dist/components/listing/tree.js +4 -5
- package/dist/components/preview/FilePreview.d.ts +3 -3
- package/dist/components/preview/FilePreview.js +3 -15
- package/dist/components/preview/index.d.ts +2 -1
- package/dist/components/preview/index.js +2 -1
- package/dist/components/preview/previewKind.d.ts +3 -0
- package/dist/components/preview/previewKind.js +17 -0
- package/dist/components/receipt/Receipt.d.ts +51 -0
- package/dist/components/receipt/Receipt.js +23 -0
- package/dist/components/receipt/index.d.ts +1 -0
- package/dist/components/receipt/index.js +3 -0
- package/dist/components/search/CriteriaChips.js +5 -3
- package/dist/components/search/FilterBuilder.d.ts +5 -139
- package/dist/components/search/FilterBuilder.js +5 -579
- package/dist/components/search/JsonEditor.d.ts +2 -8
- package/dist/components/search/JsonEditor.js +5 -15
- package/dist/components/search/RuleValue.d.ts +2 -2
- package/dist/components/search/RuleValue.js +5 -4
- package/dist/components/search/datePeriods.js +1 -1
- package/dist/components/search/filterTree.d.ts +183 -0
- package/dist/components/search/filterTree.js +570 -0
- package/dist/components/search/formatJson.d.ts +8 -0
- package/dist/components/search/formatJson.js +17 -0
- package/dist/components/search/index.d.ts +5 -3
- package/dist/components/search/index.js +7 -3
- package/dist/components/search/query.js +1 -1
- package/dist/components/shell/KioskFrame.d.ts +35 -0
- package/dist/components/shell/KioskFrame.js +39 -0
- package/dist/components/shell/SearchEntry.js +1 -1
- package/dist/components/shell/index.d.ts +1 -0
- package/dist/components/shell/index.js +1 -0
- package/dist/foundations/calendar.js +1 -1
- package/dist/foundations/catalog.d.ts +7 -8
- package/dist/foundations/catalog.js +10 -35
- package/dist/foundations/chart.js +1 -1
- package/dist/foundations/clock.d.ts +3 -0
- package/dist/foundations/clock.js +41 -0
- package/dist/foundations/controlName.d.ts +12 -0
- package/dist/foundations/controlName.js +14 -0
- package/dist/foundations/copy.d.ts +3 -1130
- package/dist/foundations/copy.es.d.ts +1 -1
- package/dist/foundations/copy.es.js +26 -0
- package/dist/foundations/copy.js +13 -747
- package/dist/foundations/copyStore.d.ts +21 -0
- package/dist/foundations/copyStore.js +47 -0
- package/dist/foundations/density.d.ts +4 -8
- package/dist/foundations/density.js +2 -9
- package/dist/foundations/form.d.ts +2 -12
- package/dist/foundations/form.js +4 -14
- package/dist/foundations/idle.d.ts +1 -0
- package/dist/foundations/idle.js +34 -0
- package/dist/foundations/index.d.ts +21 -11
- package/dist/foundations/index.js +28 -11
- package/dist/foundations/keys.d.ts +8 -0
- package/dist/foundations/keys.js +6 -0
- package/dist/foundations/pickBy.d.ts +16 -0
- package/dist/foundations/pickBy.js +17 -0
- package/dist/foundations/pivotSheet.js +0 -0
- package/dist/foundations/pointer.d.ts +25 -0
- package/dist/foundations/pointer.js +28 -0
- package/dist/foundations/shortcut.d.ts +3 -9
- package/dist/foundations/shortcut.js +2 -7
- package/dist/foundations/sticky.d.ts +2 -6
- package/dist/foundations/sticky.js +5 -8
- package/dist/foundations/stickyStyle.d.ts +12 -0
- package/dist/foundations/stickyStyle.js +13 -0
- package/dist/foundations/surface.d.ts +2 -2
- package/dist/foundations/surface.js +4 -2
- package/dist/foundations/theme.d.ts +3 -13
- package/dist/foundations/theme.js +2 -15
- package/dist/foundations/themeChoice.d.ts +19 -0
- package/dist/foundations/themeChoice.js +22 -0
- package/dist/foundations/types.d.ts +3 -0
- package/dist/foundations/uiCopy.d.ts +1173 -0
- package/dist/foundations/uiCopy.js +775 -0
- package/dist/foundations/xlsx.d.ts +4 -10
- package/dist/foundations/xlsx.js +0 -0
- package/dist/foundations/xlsxDownload.d.ts +8 -0
- package/dist/foundations/xlsxDownload.js +28 -0
- package/dist/primitives/button/Button.d.ts +3 -15
- package/dist/primitives/button/Button.js +2 -65
- package/dist/primitives/button/classes.d.ts +21 -0
- package/dist/primitives/button/classes.js +65 -0
- package/dist/primitives/button/index.d.ts +2 -1
- package/dist/primitives/button/index.js +3 -1
- package/dist/primitives/choice/RadioGroup.d.ts +8 -1
- package/dist/primitives/choice/RadioGroup.js +9 -1
- package/dist/primitives/choice/options.d.ts +3 -0
- package/dist/primitives/field/Field.d.ts +2 -6
- package/dist/primitives/field/Field.js +4 -10
- package/dist/primitives/field/Keypad.d.ts +43 -0
- package/dist/primitives/field/Keypad.js +62 -0
- package/dist/primitives/field/Stepper.d.ts +28 -0
- package/dist/primitives/field/Stepper.js +52 -0
- package/dist/primitives/field/classes.d.ts +6 -0
- package/dist/primitives/field/classes.js +13 -0
- package/dist/primitives/field/clipboard.js +1 -1
- package/dist/primitives/field/index.d.ts +5 -1
- package/dist/primitives/field/index.js +9 -1
- package/dist/primitives/field/keypadKeys.d.ts +24 -0
- package/dist/primitives/field/keypadKeys.js +80 -0
- package/dist/primitives/hint/Hint.js +1 -1
- package/dist/primitives/menu/Menu.d.ts +2 -19
- package/dist/primitives/menu/Menu.js +4 -30
- package/dist/primitives/menu/classes.d.ts +18 -0
- package/dist/primitives/menu/classes.js +33 -0
- package/dist/primitives/menu/index.d.ts +2 -1
- package/dist/primitives/menu/index.js +3 -1
- package/dist/primitives/notice/Flag.js +1 -1
- package/dist/primitives/notice/Outcome.d.ts +28 -0
- package/dist/primitives/notice/Outcome.js +28 -0
- package/dist/primitives/notice/index.d.ts +1 -0
- package/dist/primitives/notice/index.js +2 -0
- package/dist/primitives/table/CellCopy.js +1 -1
- package/dist/primitives/table/EditableTable.d.ts +3 -37
- package/dist/primitives/table/EditableTable.js +2 -47
- package/dist/primitives/table/ReportTable.js +1 -1
- package/dist/primitives/table/RowActions.js +1 -1
- package/dist/primitives/table/Table.d.ts +2 -4
- package/dist/primitives/table/Table.js +13 -16
- package/dist/primitives/table/cellTone.d.ts +5 -0
- package/dist/primitives/table/cellTone.js +13 -0
- package/dist/primitives/table/editRules.d.ts +43 -0
- package/dist/primitives/table/editRules.js +53 -0
- package/dist/primitives/table/index.d.ts +4 -2
- package/dist/primitives/table/index.js +4 -2
- package/dist/primitives/tag/Count.d.ts +2 -3
- package/dist/primitives/tag/Count.js +4 -5
- package/dist/primitives/tag/Tags.d.ts +22 -1
- package/dist/primitives/tag/Tags.js +57 -14
- package/dist/primitives/tag/countText.d.ts +3 -0
- package/dist/primitives/tag/countText.js +7 -0
- package/dist/primitives/tag/index.d.ts +3 -2
- package/dist/primitives/tag/index.js +2 -1
- package/dist/primitives/value/DateValue.d.ts +2 -5
- package/dist/primitives/value/DateValue.js +6 -44
- package/dist/primitives/value/Elapsed.d.ts +16 -0
- package/dist/primitives/value/Elapsed.js +37 -0
- package/dist/primitives/value/Meter.d.ts +3 -8
- package/dist/primitives/value/Meter.js +2 -9
- package/dist/primitives/value/RichText.d.ts +2 -4
- package/dist/primitives/value/RichText.js +5 -20
- package/dist/primitives/value/Value.d.ts +10 -7
- package/dist/primitives/value/Value.js +7 -24
- package/dist/primitives/value/elapsedTime.d.ts +26 -0
- package/dist/primitives/value/elapsedTime.js +32 -0
- package/dist/primitives/value/format.d.ts +16 -0
- package/dist/primitives/value/format.js +81 -0
- package/dist/primitives/value/index.d.ts +9 -4
- package/dist/primitives/value/index.js +13 -4
- package/dist/primitives/value/meterLevel.d.ts +10 -0
- package/dist/primitives/value/meterLevel.js +12 -0
- package/dist/primitives/value/richTextPlain.d.ts +4 -0
- package/dist/primitives/value/richTextPlain.js +23 -0
- package/dist/tokens.css +87 -1
- package/dist/views/list/List.d.ts +11 -0
- package/dist/views/list/List.js +14 -3
- package/dist/views/list/ListView.d.ts +1 -1
- package/dist/views/list/ListView.js +26 -6
- package/dist/views/list/types.d.ts +7 -0
- package/dist/views/record/Record.js +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { isTheme, resolveTheme, THEME_ATTRIBUTE, THEMES, } from "./themeChoice.js";
|
|
3
4
|
import { createContext, useCallback, useContext, useEffect, useMemo, useState, useSyncExternalStore, } from "react";
|
|
4
|
-
export
|
|
5
|
-
/** The attribute the stylesheet reads. */
|
|
6
|
-
export const THEME_ATTRIBUTE = "data-theme";
|
|
7
|
-
/** `system` is the operating system's answer; the other two are themselves. Pure, so it can
|
|
8
|
-
* be tested without a browser. */
|
|
9
|
-
export function resolveTheme(theme, systemPrefersDark) {
|
|
10
|
-
if (theme === "system")
|
|
11
|
-
return systemPrefersDark ? "dark" : "light";
|
|
12
|
-
return theme;
|
|
13
|
-
}
|
|
14
|
-
/** True for a string that is one of the three values — what comes out of storage or a URL
|
|
15
|
-
* is `string | null`, and this is the way back to `Theme`. */
|
|
16
|
-
export function isTheme(value) {
|
|
17
|
-
return value === "system" || value === "light" || value === "dark";
|
|
18
|
-
}
|
|
5
|
+
export { isTheme, resolveTheme, THEME_ATTRIBUTE, THEMES };
|
|
19
6
|
/** Writes the choice on an element. `system` REMOVES the attribute: the stylesheet then
|
|
20
7
|
* follows `prefers-color-scheme` by itself, and an attribute saying "system" would be a
|
|
21
8
|
* value no selector reads. Returns nothing; the DOM is the output. */
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE THEME'S NAMES — the three choices, the attribute the stylesheet reads, how `system`
|
|
3
|
+
* resolves. Pure, and without `"use client"`: a server layout reads the person's choice (a
|
|
4
|
+
* cookie) and writes `<html data-theme>` itself with `THEME_ATTRIBUTE` and `isTheme`, so the
|
|
5
|
+
* first paint is already the right palette. Writing it from the browser — `applyTheme`,
|
|
6
|
+
* `ThemeProvider` — is `theme.tsx`.
|
|
7
|
+
*/
|
|
8
|
+
export type Theme = "system" | "light" | "dark";
|
|
9
|
+
/** What the palette actually is once `system` has been looked up. */
|
|
10
|
+
export type ResolvedTheme = "light" | "dark";
|
|
11
|
+
export declare const THEMES: readonly Theme[];
|
|
12
|
+
/** The attribute the stylesheet reads. */
|
|
13
|
+
export declare const THEME_ATTRIBUTE = "data-theme";
|
|
14
|
+
/** `system` is the operating system's answer; the other two are themselves. Pure, so it can
|
|
15
|
+
* be tested without a browser. */
|
|
16
|
+
export declare function resolveTheme(theme: Theme, systemPrefersDark: boolean): ResolvedTheme;
|
|
17
|
+
/** True for a string that is one of the three values — what comes out of storage or a URL
|
|
18
|
+
* is `string | null`, and this is the way back to `Theme`. */
|
|
19
|
+
export declare function isTheme(value: unknown): value is Theme;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE THEME'S NAMES — the three choices, the attribute the stylesheet reads, how `system`
|
|
3
|
+
* resolves. Pure, and without `"use client"`: a server layout reads the person's choice (a
|
|
4
|
+
* cookie) and writes `<html data-theme>` itself with `THEME_ATTRIBUTE` and `isTheme`, so the
|
|
5
|
+
* first paint is already the right palette. Writing it from the browser — `applyTheme`,
|
|
6
|
+
* `ThemeProvider` — is `theme.tsx`.
|
|
7
|
+
*/
|
|
8
|
+
export const THEMES = ["system", "light", "dark"];
|
|
9
|
+
/** The attribute the stylesheet reads. */
|
|
10
|
+
export const THEME_ATTRIBUTE = "data-theme";
|
|
11
|
+
/** `system` is the operating system's answer; the other two are themselves. Pure, so it can
|
|
12
|
+
* be tested without a browser. */
|
|
13
|
+
export function resolveTheme(theme, systemPrefersDark) {
|
|
14
|
+
if (theme === "system")
|
|
15
|
+
return systemPrefersDark ? "dark" : "light";
|
|
16
|
+
return theme;
|
|
17
|
+
}
|
|
18
|
+
/** True for a string that is one of the three values — what comes out of storage or a URL
|
|
19
|
+
* is `string | null`, and this is the way back to `Theme`. */
|
|
20
|
+
export function isTheme(value) {
|
|
21
|
+
return value === "system" || value === "light" || value === "dark";
|
|
22
|
+
}
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
* global theme would resolve it by inheritance and then the decision would not
|
|
10
10
|
* be visible in the calling code. See the long note in `system/density.tsx`. */
|
|
11
11
|
export type Surface = "canvas" | "chrome";
|
|
12
|
+
/** How much air a surface gives what is inside it — `comfortable` or `compact`. The surface
|
|
13
|
+
* declares it (`DensityProvider`), uniform inside; see the note in `density.tsx`. */
|
|
14
|
+
export type Density = "comfortable" | "compact";
|
|
12
15
|
/** The meaning of a state color. It is NOT a decorative palette.
|
|
13
16
|
*
|
|
14
17
|
* The moment a tag uses a hue because some variety was needed, all six stop
|