@colixsystems/widget-sdk 0.233.0 → 0.235.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 +9 -1
- package/dist/contract.cjs +9 -2
- package/dist/contract.js +9 -2
- package/dist/datetimepicker-calendar.js +225 -0
- package/dist/datetimepicker-cells.js +71 -0
- package/dist/datetimepicker-format.js +107 -45
- package/dist/datetimepicker-names.js +99 -0
- package/dist/datetimepicker-sheet-header.js +159 -0
- package/dist/datetimepicker-sheet-parts.js +146 -0
- package/dist/datetimepicker-sheet-state.js +117 -0
- package/dist/datetimepicker-sheet.js +113 -0
- package/dist/datetimepicker-time-columns.js +107 -0
- package/dist/datetimepicker-view.js +221 -0
- package/dist/datetimepicker.js +12 -163
- package/dist/datetimepicker.native.js +36 -124
- package/dist/hooks.js +8 -0
- package/dist/host.d.ts +9 -5
- package/dist/navigation.cjs +8 -4
- package/dist/navigation.js +8 -4
- package/package.json +1 -1
- package/src/contract.js +9 -2
package/dist/navigation.js
CHANGED
|
@@ -78,7 +78,7 @@ export function menuItemCap(menuType) {
|
|
|
78
78
|
// `backgroundColor`, `textColor`, `tabActiveBackgroundColor`,
|
|
79
79
|
// `tabActiveTextColor`, `borderColor`, `borderWidth`, `activeStyle`,
|
|
80
80
|
// `tabLayout`, (sc-11678) `shape`, `radius`, `sideMargin`, `bottomSpacing`
|
|
81
|
-
// and (sc-
|
|
81
|
+
// (sc-11692) `glass` and (sc-11703) `padding`.
|
|
82
82
|
export function resolveFooterTokens(theme) {
|
|
83
83
|
const config = isPlainObject(theme) ? theme : {};
|
|
84
84
|
const footer = isPlainObject(config.footer) ? config.footer : {};
|
|
@@ -97,6 +97,7 @@ export function resolveFooterTokens(theme) {
|
|
|
97
97
|
const divider = borderWidth > 0;
|
|
98
98
|
const floats = footer.shape !== "docked";
|
|
99
99
|
const radius = footerSizeOr(footer, "radius");
|
|
100
|
+
const padding = footerSizeOr(footer, "padding");
|
|
100
101
|
const backgroundColor = hexOr(footer.backgroundColor, DEFAULT_FOOTER_SURFACE);
|
|
101
102
|
// sc-11692: frosted unless switched off; only a floating bar has a page
|
|
102
103
|
// behind it to frost.
|
|
@@ -132,11 +133,12 @@ export function resolveFooterTokens(theme) {
|
|
|
132
133
|
// sc-11678: unset floats, so every app gets the rounded, inset bar.
|
|
133
134
|
shape: floats ? "floating" : "docked",
|
|
134
135
|
radius,
|
|
135
|
-
// A filled tab follows a floating bar's curve one
|
|
136
|
-
//
|
|
136
|
+
// A filled tab follows a floating bar's curve one padding in, never
|
|
137
|
+
// sharper than the docked 6px chip. An accent tab paints no surface,
|
|
137
138
|
// and a curved top edge would bend its marker into an arc.
|
|
138
139
|
itemRadius:
|
|
139
|
-
floats && !accent ? Math.max(DOCKED_TAB_RADIUS, radius -
|
|
140
|
+
floats && !accent ? Math.max(DOCKED_TAB_RADIUS, radius - padding) : DOCKED_TAB_RADIUS,
|
|
141
|
+
padding,
|
|
140
142
|
sideMargin: footerSizeOr(footer, "sideMargin"),
|
|
141
143
|
bottomSpacing: footerSizeOr(footer, "bottomSpacing"),
|
|
142
144
|
};
|
|
@@ -148,6 +150,8 @@ export const FOOTER_SIZES = Object.freeze({
|
|
|
148
150
|
radius: Object.freeze({ max: 40, fallback: 28 }),
|
|
149
151
|
sideMargin: Object.freeze({ max: 48, fallback: 12 }),
|
|
150
152
|
bottomSpacing: Object.freeze({ max: 32, fallback: 8 }),
|
|
153
|
+
// sc-11703: the space around the tabs; 4 makes a 48pt bar (40pt tabs).
|
|
154
|
+
padding: Object.freeze({ max: 12, fallback: 4 }),
|
|
151
155
|
});
|
|
152
156
|
const DOCKED_TAB_RADIUS = 6;
|
|
153
157
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@colixsystems/widget-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.235.0",
|
|
4
4
|
"description": "Common widget interface for AppStudio. Implements WidgetManifest, WidgetContext, property schema, and helper hooks.",
|
|
5
5
|
"homepage": "https://github.com/Colix-AB/AppStudio",
|
|
6
6
|
"type": "module",
|
package/src/contract.js
CHANGED
|
@@ -3123,7 +3123,7 @@ const PRIMITIVES = [
|
|
|
3123
3123
|
{
|
|
3124
3124
|
name: "DateTimePicker",
|
|
3125
3125
|
description:
|
|
3126
|
-
'Cross-platform date / time / datetime
|
|
3126
|
+
'Cross-platform date / time / datetime field. `<DateTimePicker value={iso} onChange={iso => …} mode="date" | "time" | "datetime" accessibilityLabel="Due" />`. The value prop and the onChange callback both speak ISO 8601 strings (the datastore wire format): `YYYY-MM-DD` for date, `HH:mm` for time, a full UTC instant for datetime — authors never round-trip through `new Date()`. Clearing emits "". The field shows the value in the app user\'s language beside a calendar (or clock) icon, with a clear button once it holds a value. Web opens a themed calendar sheet in `<Overlay>`: a month grid (keyboard: arrows, Home/End, PageUp/PageDown), a month and year jump, hour and minute columns for time, and a Today / Now button. Native opens the operating system\'s own picker (@react-native-community/datetimepicker). `minimumDate` / `maximumDate` (ISO, `HH:mm` in time mode) bound what can be picked; `disabled` locks the field. Optional copy: `placeholder`, `clearLabel` (default "Clear"), `doneLabel` (default "Done", closes the web time sheet), `closeAccessibilityLabel`; `testID` names the field. Colours come from the workspace theme — the field from the text-field tokens, the sheet from the popover scope, the chosen day from `colors.primary`; never style it with raw CSS or `document`.',
|
|
3127
3127
|
rnComponent: "@react-native-community/datetimepicker",
|
|
3128
3128
|
docsUrl: "https://github.com/react-native-datetimepicker/datetimepicker",
|
|
3129
3129
|
},
|
|
@@ -6042,7 +6042,14 @@ const CONTRACT = deepFreeze({
|
|
|
6042
6042
|
// `FOOTER_HOME_LINE_CLEARANCE_PX`. No widget-facing surface changes.
|
|
6043
6043
|
// 1.188.0: additive (sc-11692) — `resolveFooterTokens` gains `glass` (a
|
|
6044
6044
|
// floating bar is frosted unless `footer.glass` is false) and `glassTint`.
|
|
6045
|
-
|
|
6045
|
+
// 1.189.0: additive (sc-11703) — `resolveFooterTokens` gains `padding`,
|
|
6046
|
+
// the space around a bottom bar's tabs (0–12, default 4); `FOOTER_SIZES`
|
|
6047
|
+
// gains its bound.
|
|
6048
|
+
// 1.190.0: additive (sc-11777) — `<DateTimePicker>` on web opens a themed
|
|
6049
|
+
// calendar sheet instead of the browser's date popup; both hosts show
|
|
6050
|
+
// the value in the app's language with a clear button. New optional
|
|
6051
|
+
// props: placeholder, clearLabel, doneLabel, closeAccessibilityLabel, testID.
|
|
6052
|
+
version: "1.190.0",
|
|
6046
6053
|
sharedTranslationKeys: SHARED_TRANSLATION_KEYS,
|
|
6047
6054
|
hooks: HOOKS,
|
|
6048
6055
|
primitives: PRIMITIVES,
|