@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.
@@ -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-11692) `glass`.
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 row inset (8px) in,
136
- // never sharper than the docked 6px chip. An accent tab paints no surface,
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 - 8) : DOCKED_TAB_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.233.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 picker. `<DateTimePicker value={iso} onChange={iso => …} mode="date" | "time" | "datetime" />`. The value prop and the onChange callback both speak ISO 8601 strings (the datastore wire format) — authors never round-trip through `new Date()`. Web renders the browser\'s native `<input type="date|time|datetime-local">` directly (react-native-web has no mapping for the RN datetimepicker library); native uses @react-native-community/datetimepicker. The field themes itself from the workspace theme — text uses `colors.onSurface`, the border `colors.border`, and on web `color-scheme` follows the theme so the browser\'s built-in date UI stays legible on a dark surface; never style it with raw CSS or `document`.',
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
- version: "1.188.0",
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,