Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BlendDesignSystemBindings.res
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ external getMenuItemDescriptionColor: (
) => string = "getMenuItemDescriptionColor"
@module("@juspay/blend-design-system")
external flattenMenuV2Groups: array<MenuV2Types.menuV2GroupType> => array<
MenuV2Types.MenuV2FlatRow.t,
MenuV2Types.menuV2FlatRow,
> = "flattenMenuV2Groups"
@module("@juspay/blend-design-system")
external filterMenuV2Groups: (
Expand Down
27 changes: 19 additions & 8 deletions src/DataTableTypes.res
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ type dataTableColumnFilterOperator =
| @as("lt") Lt
| @as("gte") Gte
| @as("lte") Lte
type dataTableRowAnimationConfigTransitionType =
| @as("bezier") Bezier
| @as("spring") Spring
type pivotAggregationType =
| @as("sum") Sum
| @as("count") Count
Expand Down Expand Up @@ -719,11 +716,25 @@ type rowActionsConfig<'a> = {
slot1?: rowActionConfig<'a>,
slot2?: rowActionConfig<'a>,
}
type rowAnimationConfig = {
enterDuration: float,
enterOffset: float,
transitionType: dataTableRowAnimationConfigTransitionType,
}
// #167: discriminated union — each branch keeps its OWN required fields.
// Build with Bezier({…}); `transitionType` is auto-filled by @tag.
@tag("transitionType")
type rowAnimationConfig =
| @as("bezier")
Bezier({
enterDuration: float,
enterOffset: float,
duration: float,
bezier: (float, float, float, float),
})
| @as("spring")
Spring({
enterDuration: float,
enterOffset: float,
stiffness: float,
damping: float,
mass: float,
})
type dataTablePivotTableConfigInitialConfigValuesConfig = {
field: string,
aggregation: pivotAggregationType,
Expand Down
38 changes: 7 additions & 31 deletions src/MenuV2Types.res
Original file line number Diff line number Diff line change
Expand Up @@ -222,34 +222,10 @@ type menuV2ItemProps = {
index: int,
itemTokens: menuV2MenuV2TokensTypeGroupItemConfig,
}
type menuV2FlattenMenuV2GroupsLabelConfig = {
@as("type") type_: string, // ⚪ loose — was `"label"`
id: string,
label: string,
}
type menuV2FlattenMenuV2GroupsSeparatorConfig = {
@as("type") type_: string, // ⚪ loose — was `"separator"`
id: string,
}
type menuV2FlattenMenuV2GroupsItemConfig = {
@as("type") type_: string, // ⚪ loose — was `"item"`
id: string,
item: menuV2ItemType,
groupId: float,
itemIndex: float,
}
module MenuV2FlatRow = {
type t
external fromMenuV2FlattenMenuV2GroupsLabelConfig: menuV2FlattenMenuV2GroupsLabelConfig => t =
"%identity"
external asMenuV2FlattenMenuV2GroupsLabelConfig: t => menuV2FlattenMenuV2GroupsLabelConfig =
"%identity"
external fromMenuV2FlattenMenuV2GroupsSeparatorConfig: menuV2FlattenMenuV2GroupsSeparatorConfig => t =
"%identity"
external asMenuV2FlattenMenuV2GroupsSeparatorConfig: t => menuV2FlattenMenuV2GroupsSeparatorConfig =
"%identity"
external fromMenuV2FlattenMenuV2GroupsItemConfig: menuV2FlattenMenuV2GroupsItemConfig => t =
"%identity"
external asMenuV2FlattenMenuV2GroupsItemConfig: t => menuV2FlattenMenuV2GroupsItemConfig =
"%identity"
}
// #167: discriminated union — each branch keeps its OWN required fields.
// Build with Label({…}); `type` is auto-filled by @tag.
@tag("type")
type menuV2FlatRow =
| @as("label") Label({id: string, label: string})
| @as("separator") Separator({id: string})
| @as("item") Item({id: string, item: menuV2ItemType, groupId: float, itemIndex: float})
2 changes: 1 addition & 1 deletion src/_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**253** function binding(s) → `BlendDesignSystemBindings.res`.

**3360** shared types deduplicated into **76** `*Types.res` modules (referenced qualified — no per-file redeclaration).
**3356** shared types deduplicated into **76** `*Types.res` modules (referenced qualified — no per-file redeclaration).

## 📦 Dependencies

Expand Down
Loading