@rippling/pebble-sdui-web 0.15.1 → 0.15.2

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.
@@ -8,7 +8,7 @@ const q = (e) => t("ActionCard", e), U = (e) => t("AiIcon", e), B = (e) => t("Al
8
8
  "openChatAssistantWithMessage",
9
9
  e,
10
10
  i
11
- ), po = (e, i) => a("pushState", e, i), lo = (e, i) => a("removeState", e, i), co = (e, i) => a("setState", e, i), yo = (e, i) => a("showNotification", e, i), uo = (e, i) => a("triggerFunction", e, i), R = "custom-apps", P = "1.5.3", r = {
11
+ ), po = (e, i) => a("pushState", e, i), lo = (e, i) => a("removeState", e, i), co = (e, i) => a("setState", e, i), yo = (e, i) => a("showNotification", e, i), uo = (e, i) => a("triggerFunction", e, i), R = "custom-apps", P = "1.5.4", r = {
12
12
  ActionCard: {
13
13
  description: "Placeholder for states like empty, success, error, and loading, featuring animations, icons, text, and action buttons.",
14
14
  events: ["pressPrimary", "pressSecondary"],
@@ -3574,7 +3574,203 @@ const q = (e) => t("ActionCard", e), U = (e) => t("AiIcon", e), B = (e) => t("Al
3574
3574
  },
3575
3575
  type: "object"
3576
3576
  },
3577
- acceptsChildren: !1
3577
+ acceptsChildren: !1,
3578
+ category: ["buttons"],
3579
+ keywords: [
3580
+ "button",
3581
+ "cta",
3582
+ "call to action",
3583
+ "submit",
3584
+ "save",
3585
+ "action",
3586
+ "click",
3587
+ "primary action"
3588
+ ],
3589
+ anatomy: {
3590
+ parts: [
3591
+ {
3592
+ name: "label",
3593
+ required: !0,
3594
+ role: "Verb-led action text passed as children"
3595
+ },
3596
+ {
3597
+ name: "icon",
3598
+ role: "Optional glyph via the icon prop when it aids recognition"
3599
+ },
3600
+ {
3601
+ name: "badge",
3602
+ role: "Optional short status text beside the label"
3603
+ }
3604
+ ],
3605
+ summary: "A sized container holding a verb-led text label, with an optional leading icon and an optional short badge beside the label."
3606
+ },
3607
+ guidance: {
3608
+ doNotUseWhen: [
3609
+ "Navigating to another page or URL — use Anchor",
3610
+ "Icon-only action without an accessible name — use Button.Icon with aria-label",
3611
+ "Toggleable selected state — use a segmented control or Switch",
3612
+ "Dense repeated row actions — use a Menu or overflow pattern"
3613
+ ],
3614
+ useWhen: [
3615
+ "Submitting a form or confirming an action",
3616
+ "Primary call-to-action on a page, card, or modal footer",
3617
+ "Starting a flow (add, create, invite)",
3618
+ "Icon-only action via Button.Icon with an accessible name"
3619
+ ]
3620
+ },
3621
+ antiPatterns: [
3622
+ {
3623
+ instead: "Use Button.Icon with aria-label",
3624
+ pattern: "Icon-only actions built as Button with an icon prop and no label",
3625
+ why: "Ambiguous hierarchy and missing accessible name"
3626
+ },
3627
+ {
3628
+ instead: "Use Button.Icon",
3629
+ pattern: "Plain clickable Icon used for actions",
3630
+ why: "No button semantics, focus, or hit-area guarantees"
3631
+ },
3632
+ {
3633
+ instead: "Use Anchor with href",
3634
+ pattern: "Navigation implemented as Button + onClick router push",
3635
+ why: "Breaks link semantics, middle-click, and screen reader expectations"
3636
+ },
3637
+ {
3638
+ instead: "Keep the CTA enabled and surface inline validation errors",
3639
+ pattern: "Disabled primary CTA on forms and footers",
3640
+ why: "Users cannot trigger validation feedback"
3641
+ },
3642
+ {
3643
+ instead: "Open a confirmation Modal and place the destructive Button in Modal.Footer",
3644
+ pattern: "DESTRUCTIVE appearance used inline outside a confirmation modal",
3645
+ why: "Destructive actions need a confirmation step"
3646
+ },
3647
+ {
3648
+ instead: "Use PRIMARY for emphasis; reserve ACTIVE for selected state",
3649
+ pattern: "ACTIVE appearance used as a static color",
3650
+ why: "ACTIVE communicates selected/on state, not emphasis"
3651
+ },
3652
+ {
3653
+ instead: "Pick one size per surface (default M)",
3654
+ pattern: "Mixed button sizes on the same surface",
3655
+ why: "Breaks visual hierarchy"
3656
+ },
3657
+ {
3658
+ instead: "Use Button.Icon or a Menu for dense repeated actions",
3659
+ pattern: "Text variant used for dense toolbar or row actions",
3660
+ why: "Hierarchy and component choice become unclear"
3661
+ },
3662
+ {
3663
+ instead: "Always compose from Button",
3664
+ pattern: "Custom button-like control built from raw elements",
3665
+ why: "Loses accessibility, theming, and state-layer behavior"
3666
+ },
3667
+ {
3668
+ instead: "Use Button.SIZES",
3669
+ pattern: "Legacy BUTTON_SIZES constant",
3670
+ why: "Deprecated alias"
3671
+ },
3672
+ {
3673
+ instead: 'Use a single verb-led label like "Save changes"',
3674
+ pattern: "Vague, compound, or non-verb-led labels",
3675
+ why: "Users cannot predict the outcome"
3676
+ },
3677
+ {
3678
+ instead: "Only add an icon when it disambiguates the action",
3679
+ pattern: "Decorative icon added to a labeled Button without clear necessity",
3680
+ why: "Adds noise without aiding recognition"
3681
+ }
3682
+ ],
3683
+ propGuidance: [
3684
+ {
3685
+ guidance: "PRIMARY for the single main action on a surface; OUTLINE or GHOST for secondary actions; DESTRUCTIVE only inside confirmation flows.",
3686
+ pitfall: "ACTIVE is a selected/on state, not a static emphasis color.",
3687
+ prop: "appearance"
3688
+ },
3689
+ {
3690
+ guidance: "TEXT is for low-emphasis inline actions where context makes the target obvious; default to NORMAL.",
3691
+ prop: "variant"
3692
+ },
3693
+ {
3694
+ guidance: "Default M. Use S/XS only in dense surfaces and keep one size per surface.",
3695
+ prop: "size"
3696
+ },
3697
+ {
3698
+ guidance: "Accepts a glyph string or IconConfig with alignment and color. For icon-only actions use Button.Icon instead.",
3699
+ prop: "icon"
3700
+ },
3701
+ {
3702
+ guidance: "Avoid disabling the primary form CTA; let users attempt submission and show validation errors.",
3703
+ prop: "isDisabled"
3704
+ },
3705
+ {
3706
+ guidance: "Use for async actions to prevent double submits; pair with a label that stays stable while loading.",
3707
+ prop: "isLoading"
3708
+ }
3709
+ ],
3710
+ selection: {
3711
+ confusedWith: [
3712
+ {
3713
+ component: "Anchor",
3714
+ distinguishBy: "Anchor navigates (href); Button performs an action (onClick). If the result is a URL change, use Anchor."
3715
+ },
3716
+ {
3717
+ component: "Button.Icon",
3718
+ distinguishBy: "Icon-only action → Button.Icon with aria-label; labeled action → Button."
3719
+ },
3720
+ {
3721
+ component: "SplitButton",
3722
+ distinguishBy: "One primary action with related alternatives in a menu → SplitButton."
3723
+ },
3724
+ {
3725
+ component: "FloatingButton",
3726
+ distinguishBy: "Action that must stay visible over scrolling content → FloatingButton."
3727
+ }
3728
+ ]
3729
+ },
3730
+ relatedComponents: [
3731
+ {
3732
+ name: "Button.Icon",
3733
+ note: "Icon-only variant; requires aria-label",
3734
+ relationship: ["child"]
3735
+ },
3736
+ {
3737
+ name: "SplitButton",
3738
+ note: "Primary action plus related alternatives",
3739
+ relationship: ["child"]
3740
+ },
3741
+ {
3742
+ name: "FloatingButton",
3743
+ note: "Fixed-position action over content",
3744
+ relationship: ["child"]
3745
+ },
3746
+ {
3747
+ name: "Anchor",
3748
+ note: "Navigation instead of action",
3749
+ relationship: ["alternative"]
3750
+ },
3751
+ {
3752
+ name: "ButtonGroup",
3753
+ note: "Groups related buttons with shared sizing",
3754
+ relationship: ["complement"]
3755
+ },
3756
+ {
3757
+ name: "Modal.Footer",
3758
+ note: "Canonical placement for modal action buttons",
3759
+ relationship: ["complement"]
3760
+ }
3761
+ ],
3762
+ subComponents: {
3763
+ "Button.Icon": {
3764
+ antiPatterns: [
3765
+ {
3766
+ instead: "Pass aria-label describing the action",
3767
+ pattern: "Button.Icon without aria-label or aria-labelledby",
3768
+ why: "Screen readers announce nothing meaningful"
3769
+ }
3770
+ ],
3771
+ description: "Icon-only button for compact actions; always requires an accessible name."
3772
+ }
3773
+ }
3578
3774
  },
3579
3775
  ButtonGroup: {
3580
3776
  description: "Layout container for arranging multiple Button elements horizontally or vertically with configurable placement, alignment, gap, and wrapping.",
@@ -6869,11 +7065,14 @@ const q = (e) => t("ActionCard", e), U = (e) => t("AiIcon", e), B = (e) => t("Al
6869
7065
  },
6870
7066
  Dropdown: {
6871
7067
  description: "A popover menu that displays a list of actions or selectable options. Use for 3–15 choices triggered by a button; for form field selection, use Select instead.",
6872
- events: ["change", "toggle"],
7068
+ events: ["change", "toggle", "action"],
6873
7069
  propsSchema: {
6874
7070
  $schema: "https://json-schema.org/draft/2020-12/schema",
6875
7071
  additionalProperties: !1,
6876
7072
  properties: {
7073
+ clickedValue: {
7074
+ description: "Bindable last clicked item value, written before the action event emits"
7075
+ },
6877
7076
  defaultValue: {
6878
7077
  description: "Initially selected value"
6879
7078
  },
@@ -7294,8 +7493,21 @@ const q = (e) => t("ActionCard", e), U = (e) => t("AiIcon", e), B = (e) => t("Al
7294
7493
  description: "Display the selected option label in the trigger. Defaults to false; empty or unmatched values use triggerLabel",
7295
7494
  type: "boolean"
7296
7495
  },
7496
+ triggerAriaLabel: {
7497
+ description: "Accessible label for the trigger button. Recommended for icon-only triggers.",
7498
+ type: "string"
7499
+ },
7500
+ triggerIcon: {
7501
+ description: "Icon.TYPES name to render in the dropdown trigger button. Provide it for icon-only or icon-plus-label triggers.",
7502
+ type: "string"
7503
+ },
7297
7504
  triggerLabel: {
7298
- description: "Label for the dropdown trigger button",
7505
+ description: "Visible label for the dropdown trigger button. Omit it for an icon-only trigger.",
7506
+ type: "string"
7507
+ },
7508
+ triggerSize: {
7509
+ description: "Size of the trigger button (XS, S, M, L). Default: M",
7510
+ enum: ["XS", "S", "M", "L"],
7299
7511
  type: "string"
7300
7512
  },
7301
7513
  value: {
@@ -7306,7 +7518,7 @@ const q = (e) => t("ActionCard", e), U = (e) => t("AiIcon", e), B = (e) => t("Al
7306
7518
  type: "number"
7307
7519
  }
7308
7520
  },
7309
- required: ["triggerLabel", "list"],
7521
+ required: ["list"],
7310
7522
  type: "object"
7311
7523
  },
7312
7524
  acceptsChildren: !1
@@ -10649,6 +10861,9 @@ const q = (e) => t("ActionCard", e), U = (e) => t("AiIcon", e), B = (e) => t("Al
10649
10861
  description: "Max total size in MB for all attachments",
10650
10862
  type: "number"
10651
10863
  },
10864
+ metadata: {
10865
+ description: "JSON-serializable metadata sent with upload requests"
10866
+ },
10652
10867
  multiPartUpload: {
10653
10868
  description: "Enables multipart upload flow for files larger than 100MB",
10654
10869
  type: "boolean"
@@ -23123,7 +23338,7 @@ const q = (e) => t("ActionCard", e), U = (e) => t("AiIcon", e), B = (e) => t("Al
23123
23338
  type: "number"
23124
23339
  },
23125
23340
  minWidth: {
23126
- description: "Minimum width in grid units",
23341
+ description: "Minimum width in grid units. Default: 1",
23127
23342
  type: "number"
23128
23343
  },
23129
23344
  shadow: {