@vjdesigns/vjdesigns-ui 3.6.0 → 3.8.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/CHANGELOG.md +204 -184
- package/README.md +1 -1
- package/dist/ai/llms-full.txt +268 -2
- package/dist/ai/llms.txt +5 -0
- package/dist/ai/registry.json +1010 -54
- package/dist/components/data-display/Poll/Poll.cjs.js +1 -0
- package/dist/components/data-display/Poll/Poll.d.ts +114 -0
- package/dist/components/data-display/Poll/Poll.mjs +335 -0
- package/dist/components/data-display/Poll/Poll.module.css.cjs.js +1 -0
- package/dist/components/data-display/Poll/Poll.module.css.mjs +46 -0
- package/dist/components/data-display/Poll/index.d.ts +1 -0
- package/dist/components/data-display/RatingBreakdown/RatingBreakdown.cjs.js +1 -0
- package/dist/components/data-display/RatingBreakdown/RatingBreakdown.d.ts +35 -0
- package/dist/components/data-display/RatingBreakdown/RatingBreakdown.mjs +88 -0
- package/dist/components/data-display/RatingBreakdown/RatingBreakdown.module.css.cjs.js +1 -0
- package/dist/components/data-display/RatingBreakdown/RatingBreakdown.module.css.mjs +21 -0
- package/dist/components/data-display/RatingBreakdown/index.d.ts +1 -0
- package/dist/components/data-display/ReviewCard/ReviewCard.cjs.js +1 -0
- package/dist/components/data-display/ReviewCard/ReviewCard.d.ts +67 -0
- package/dist/components/data-display/ReviewCard/ReviewCard.mjs +174 -0
- package/dist/components/data-display/ReviewCard/ReviewCard.module.css.cjs.js +1 -0
- package/dist/components/data-display/ReviewCard/ReviewCard.module.css.mjs +26 -0
- package/dist/components/data-display/ReviewCard/index.d.ts +1 -0
- package/dist/components/forms/RatingScale/RatingScale.cjs.js +1 -0
- package/dist/components/forms/RatingScale/RatingScale.d.ts +106 -0
- package/dist/components/forms/RatingScale/RatingScale.mjs +175 -0
- package/dist/components/forms/RatingScale/RatingScale.module.css.cjs.js +1 -0
- package/dist/components/forms/RatingScale/RatingScale.module.css.mjs +28 -0
- package/dist/components/forms/RatingScale/index.d.ts +1 -0
- package/dist/components/navigation/MobileNav/MobileNav.cjs.js +1 -0
- package/dist/components/navigation/MobileNav/MobileNav.d.ts +170 -0
- package/dist/components/navigation/MobileNav/MobileNav.mjs +174 -0
- package/dist/components/navigation/MobileNav/MobileNav.module.css.cjs.js +1 -0
- package/dist/components/navigation/MobileNav/MobileNav.module.css.mjs +46 -0
- package/dist/components/navigation/MobileNav/index.d.ts +1 -0
- package/dist/components/primitives/Icon/icons.cjs.js +1 -1
- package/dist/components/primitives/Icon/icons.d.ts +70 -0
- package/dist/components/primitives/Icon/icons.mjs +203 -134
- package/dist/components/primitives/Typography/Typography.d.ts +2 -2
- package/dist/i18n/en.cjs.js +1 -1
- package/dist/i18n/en.mjs +162 -0
- package/dist/i18n/types.d.ts +175 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +111 -106
- package/dist/locales/ar.cjs.js +1 -1
- package/dist/locales/ar.mjs +197 -0
- package/dist/locales/bn.cjs.js +1 -1
- package/dist/locales/bn.mjs +132 -0
- package/dist/locales/cs.cjs.js +1 -1
- package/dist/locales/cs.mjs +182 -0
- package/dist/locales/da.cjs.js +1 -1
- package/dist/locales/da.mjs +162 -0
- package/dist/locales/de.cjs.js +1 -1
- package/dist/locales/de.mjs +162 -0
- package/dist/locales/el.cjs.js +1 -1
- package/dist/locales/el.mjs +162 -0
- package/dist/locales/es.cjs.js +1 -1
- package/dist/locales/es.mjs +162 -0
- package/dist/locales/fa.cjs.js +1 -1
- package/dist/locales/fa.mjs +132 -0
- package/dist/locales/fi.cjs.js +1 -1
- package/dist/locales/fi.mjs +162 -0
- package/dist/locales/fr.cjs.js +1 -1
- package/dist/locales/fr.mjs +167 -0
- package/dist/locales/he.cjs.js +1 -1
- package/dist/locales/he.mjs +172 -0
- package/dist/locales/hi.cjs.js +1 -1
- package/dist/locales/hi.mjs +162 -0
- package/dist/locales/hu.cjs.js +1 -1
- package/dist/locales/hu.mjs +132 -0
- package/dist/locales/id.cjs.js +1 -1
- package/dist/locales/id.mjs +132 -0
- package/dist/locales/it.cjs.js +1 -1
- package/dist/locales/it.mjs +167 -0
- package/dist/locales/ja.cjs.js +1 -1
- package/dist/locales/ja.mjs +132 -0
- package/dist/locales/ko.cjs.js +1 -1
- package/dist/locales/ko.mjs +132 -0
- package/dist/locales/nb.cjs.js +1 -1
- package/dist/locales/nb.mjs +162 -0
- package/dist/locales/nl.cjs.js +1 -1
- package/dist/locales/nl.mjs +162 -0
- package/dist/locales/pl.cjs.js +1 -1
- package/dist/locales/pl.mjs +182 -0
- package/dist/locales/pt-BR.cjs.js +1 -1
- package/dist/locales/pt-BR.mjs +167 -0
- package/dist/locales/ro.cjs.js +1 -1
- package/dist/locales/ro.mjs +172 -0
- package/dist/locales/ru.cjs.js +1 -1
- package/dist/locales/ru.mjs +182 -0
- package/dist/locales/sv.cjs.js +1 -1
- package/dist/locales/sv.mjs +162 -0
- package/dist/locales/th.cjs.js +1 -1
- package/dist/locales/th.mjs +132 -0
- package/dist/locales/tr.cjs.js +1 -1
- package/dist/locales/tr.mjs +132 -0
- package/dist/locales/uk.cjs.js +1 -1
- package/dist/locales/uk.mjs +182 -0
- package/dist/locales/ur.cjs.js +1 -1
- package/dist/locales/ur.mjs +162 -0
- package/dist/locales/vi.cjs.js +1 -1
- package/dist/locales/vi.mjs +132 -0
- package/dist/locales/zh-Hans.cjs.js +1 -1
- package/dist/locales/zh-Hans.mjs +132 -0
- package/dist/locales/zh-Hant.cjs.js +1 -1
- package/dist/locales/zh-Hant.mjs +132 -0
- package/dist/vjdesigns-ui.css +1 -1
- package/package.json +1 -1
package/dist/ai/registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vjdesigns/vjdesigns-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
4
4
|
"summary": "Accessible React 19 component library: WCAG 2.2 AA verified (axe on every story, a contrast check on every color pair), 31 languages with right-to-left support, themeable with any brand color (auto-adjusted to stay accessible), tree-shakable, no runtime dependencies besides React.",
|
|
5
5
|
"install": "npm install @vjdesigns/vjdesigns-ui",
|
|
6
6
|
"stylesheet": "@vjdesigns/vjdesigns-ui/dist/vjdesigns-ui.css",
|
|
@@ -3492,6 +3492,486 @@
|
|
|
3492
3492
|
}
|
|
3493
3493
|
]
|
|
3494
3494
|
},
|
|
3495
|
+
{
|
|
3496
|
+
"name": "Poll",
|
|
3497
|
+
"category": "data-display",
|
|
3498
|
+
"folder": "Poll",
|
|
3499
|
+
"import": "import { Poll } from \"@vjdesigns/vjdesigns-ui\";",
|
|
3500
|
+
"description": "A poll with two phases: voting (a question with choices) and results\r\n(each choice's share, printed as a percentage, with bars). Four layouts:\r\n`bars`, `cards`, `compact`, and `versus` for two choices head to head.\r\nThe poll is UI only: it reports votes through `onVote` and shows the\r\ncounts you pass in `options`; storing votes and enforcing one vote per\r\nperson is up to your server.",
|
|
3501
|
+
"nativeElement": "div",
|
|
3502
|
+
"props": [
|
|
3503
|
+
{
|
|
3504
|
+
"name": "question",
|
|
3505
|
+
"type": "ReactNode",
|
|
3506
|
+
"required": true,
|
|
3507
|
+
"description": "The question, rendered as a heading (see `headingLevel`)."
|
|
3508
|
+
},
|
|
3509
|
+
{
|
|
3510
|
+
"name": "options",
|
|
3511
|
+
"type": "PollOption[]",
|
|
3512
|
+
"required": true,
|
|
3513
|
+
"description": "The choices, with their vote counts. Update `votes` after `onVote`, including the new vote."
|
|
3514
|
+
},
|
|
3515
|
+
{
|
|
3516
|
+
"name": "layout",
|
|
3517
|
+
"type": "PollLayout",
|
|
3518
|
+
"required": false,
|
|
3519
|
+
"default": "\"bars\"",
|
|
3520
|
+
"description": "Layout of both phases. `versus` needs exactly two options."
|
|
3521
|
+
},
|
|
3522
|
+
{
|
|
3523
|
+
"name": "multiple",
|
|
3524
|
+
"type": "boolean",
|
|
3525
|
+
"required": false,
|
|
3526
|
+
"default": "false",
|
|
3527
|
+
"description": "Allow more than one choice (checkboxes)."
|
|
3528
|
+
},
|
|
3529
|
+
{
|
|
3530
|
+
"name": "maxChoices",
|
|
3531
|
+
"type": "number",
|
|
3532
|
+
"required": false,
|
|
3533
|
+
"description": "With `multiple`: the most choices one voter can pick."
|
|
3534
|
+
},
|
|
3535
|
+
{
|
|
3536
|
+
"name": "value",
|
|
3537
|
+
"type": "string[]",
|
|
3538
|
+
"required": false,
|
|
3539
|
+
"description": "The viewer's choice (controlled). After voting, it marks \"Your vote\" in the results."
|
|
3540
|
+
},
|
|
3541
|
+
{
|
|
3542
|
+
"name": "defaultValue",
|
|
3543
|
+
"type": "string[]",
|
|
3544
|
+
"required": false,
|
|
3545
|
+
"default": "[]",
|
|
3546
|
+
"description": "Initial choice (uncontrolled)."
|
|
3547
|
+
},
|
|
3548
|
+
{
|
|
3549
|
+
"name": "onValueChange",
|
|
3550
|
+
"type": "(value: string[]) => void",
|
|
3551
|
+
"required": false,
|
|
3552
|
+
"description": "Called when the viewer's choice changes, before or as they vote."
|
|
3553
|
+
},
|
|
3554
|
+
{
|
|
3555
|
+
"name": "voted",
|
|
3556
|
+
"type": "boolean",
|
|
3557
|
+
"required": false,
|
|
3558
|
+
"description": "Whether the viewer has voted (controlled). Use with `onVotedChange`."
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
"name": "defaultVoted",
|
|
3562
|
+
"type": "boolean",
|
|
3563
|
+
"required": false,
|
|
3564
|
+
"default": "false",
|
|
3565
|
+
"description": "Initial voted state (uncontrolled), e.g. `true` when the server says they already voted."
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
"name": "onVotedChange",
|
|
3569
|
+
"type": "(voted: boolean) => void",
|
|
3570
|
+
"required": false,
|
|
3571
|
+
"description": "Called when the voted state changes (after a vote, or on \"Change vote\")."
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
"name": "onVote",
|
|
3575
|
+
"type": "(values: string[]) => void | Promise<void>",
|
|
3576
|
+
"required": false,
|
|
3577
|
+
"description": "Called with the chosen values when the viewer votes. Return a promise to\r\nshow a loading state; if it rejects, the poll stays in the voting phase\r\n(show your own error message)."
|
|
3578
|
+
},
|
|
3579
|
+
{
|
|
3580
|
+
"name": "submitMode",
|
|
3581
|
+
"type": "PollSubmitMode",
|
|
3582
|
+
"required": false,
|
|
3583
|
+
"default": "\"instant\" for a single choice, \"button\" with `multiple",
|
|
3584
|
+
"description": "`button`: choose, then press Vote. `instant`: clicking a choice votes\r\n(single choice only; each choice is a button)."
|
|
3585
|
+
},
|
|
3586
|
+
{
|
|
3587
|
+
"name": "showResults",
|
|
3588
|
+
"type": "PollShowResults",
|
|
3589
|
+
"required": false,
|
|
3590
|
+
"default": "\"after-vote\"",
|
|
3591
|
+
"description": "When results show: `after-vote`, `always` (results only, no voting), or\r\n`never` (only once the poll is closed, which avoids bandwagon voting)."
|
|
3592
|
+
},
|
|
3593
|
+
{
|
|
3594
|
+
"name": "closed",
|
|
3595
|
+
"type": "boolean",
|
|
3596
|
+
"required": false,
|
|
3597
|
+
"default": "false",
|
|
3598
|
+
"description": "The poll is over: voting is off and the final results show. Also true once `endsAt` passes."
|
|
3599
|
+
},
|
|
3600
|
+
{
|
|
3601
|
+
"name": "endsAt",
|
|
3602
|
+
"type": "string",
|
|
3603
|
+
"required": false,
|
|
3604
|
+
"description": "When voting ends: an ISO date (\"2026-12-01\", the end of that day) or date-time. Shown as \"Ends in 3 days\"."
|
|
3605
|
+
},
|
|
3606
|
+
{
|
|
3607
|
+
"name": "totalVotes",
|
|
3608
|
+
"type": "number",
|
|
3609
|
+
"required": false,
|
|
3610
|
+
"description": "Total votes, when it differs from the sum of `votes` (e.g. multiple choice counts voters)."
|
|
3611
|
+
},
|
|
3612
|
+
{
|
|
3613
|
+
"name": "allowChangeVote",
|
|
3614
|
+
"type": "boolean",
|
|
3615
|
+
"required": false,
|
|
3616
|
+
"default": "false",
|
|
3617
|
+
"description": "Show a \"Change vote\" button in the results while the poll is open."
|
|
3618
|
+
},
|
|
3619
|
+
{
|
|
3620
|
+
"name": "highlightWinner",
|
|
3621
|
+
"type": "boolean",
|
|
3622
|
+
"required": false,
|
|
3623
|
+
"default": "true",
|
|
3624
|
+
"description": "Mark the sole leader with a \"Leading\" (or \"Winner\") tag and bold label."
|
|
3625
|
+
},
|
|
3626
|
+
{
|
|
3627
|
+
"name": "headingLevel",
|
|
3628
|
+
"type": "2 | 3 | 4 | 5 | 6",
|
|
3629
|
+
"required": false,
|
|
3630
|
+
"default": "3",
|
|
3631
|
+
"description": "Heading level of the question."
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
"name": "size",
|
|
3635
|
+
"type": "Size",
|
|
3636
|
+
"required": false,
|
|
3637
|
+
"default": "\"md\"",
|
|
3638
|
+
"description": "Text and control size."
|
|
3639
|
+
},
|
|
3640
|
+
{
|
|
3641
|
+
"name": "labels",
|
|
3642
|
+
"type": "Partial<{ vote: string; changeVote: string; yourVote: string; leading: string; winner: string; finalResults: string; versus: string; }>",
|
|
3643
|
+
"required": false,
|
|
3644
|
+
"description": "Overrides the built-in text (vote button, tags, footer, announcements). Localize it here."
|
|
3645
|
+
}
|
|
3646
|
+
],
|
|
3647
|
+
"subcomponents": [],
|
|
3648
|
+
"storybook": "Data Display/Poll",
|
|
3649
|
+
"stories": [
|
|
3650
|
+
{
|
|
3651
|
+
"name": "Playground",
|
|
3652
|
+
"description": ""
|
|
3653
|
+
},
|
|
3654
|
+
{
|
|
3655
|
+
"name": "Bars",
|
|
3656
|
+
"description": ""
|
|
3657
|
+
},
|
|
3658
|
+
{
|
|
3659
|
+
"name": "Cards",
|
|
3660
|
+
"description": ""
|
|
3661
|
+
},
|
|
3662
|
+
{
|
|
3663
|
+
"name": "Compact",
|
|
3664
|
+
"description": ""
|
|
3665
|
+
},
|
|
3666
|
+
{
|
|
3667
|
+
"name": "Versus",
|
|
3668
|
+
"description": ""
|
|
3669
|
+
},
|
|
3670
|
+
{
|
|
3671
|
+
"name": "All Layouts",
|
|
3672
|
+
"description": ""
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
"name": "Sizes",
|
|
3676
|
+
"description": ""
|
|
3677
|
+
},
|
|
3678
|
+
{
|
|
3679
|
+
"name": "Multiple Choice",
|
|
3680
|
+
"description": ""
|
|
3681
|
+
},
|
|
3682
|
+
{
|
|
3683
|
+
"name": "Async vote (loading and failure)",
|
|
3684
|
+
"description": ""
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"name": "Hidden Until Closed",
|
|
3688
|
+
"description": ""
|
|
3689
|
+
},
|
|
3690
|
+
{
|
|
3691
|
+
"name": "Closed",
|
|
3692
|
+
"description": ""
|
|
3693
|
+
},
|
|
3694
|
+
{
|
|
3695
|
+
"name": "Ended By Date",
|
|
3696
|
+
"description": ""
|
|
3697
|
+
},
|
|
3698
|
+
{
|
|
3699
|
+
"name": "Tie",
|
|
3700
|
+
"description": ""
|
|
3701
|
+
},
|
|
3702
|
+
{
|
|
3703
|
+
"name": "No Votes Yet",
|
|
3704
|
+
"description": ""
|
|
3705
|
+
},
|
|
3706
|
+
{
|
|
3707
|
+
"name": "Long Content",
|
|
3708
|
+
"description": ""
|
|
3709
|
+
},
|
|
3710
|
+
{
|
|
3711
|
+
"name": "computePollResults()",
|
|
3712
|
+
"description": ""
|
|
3713
|
+
}
|
|
3714
|
+
]
|
|
3715
|
+
},
|
|
3716
|
+
{
|
|
3717
|
+
"name": "RatingBreakdown",
|
|
3718
|
+
"category": "data-display",
|
|
3719
|
+
"folder": "RatingBreakdown",
|
|
3720
|
+
"import": "import { RatingBreakdown } from \"@vjdesigns/vjdesigns-ui\";",
|
|
3721
|
+
"description": "The summary above a review list: the average rating as a big number with\r\nstars, the review count, and one bar per level showing its share. Each\r\nrow reads \"5 stars: 920 reviews, 72%\"; with `onLevelSelect` the rows are\r\ntoggle buttons for filtering by level.",
|
|
3722
|
+
"nativeElement": "div",
|
|
3723
|
+
"props": [
|
|
3724
|
+
{
|
|
3725
|
+
"name": "counts",
|
|
3726
|
+
"type": "Record<number, number>",
|
|
3727
|
+
"required": true,
|
|
3728
|
+
"description": "Reviews per level, e.g. `{ 5: 920, 4: 210, 3: 80, 2: 40, 1: 34 }`. Missing levels count as 0."
|
|
3729
|
+
},
|
|
3730
|
+
{
|
|
3731
|
+
"name": "average",
|
|
3732
|
+
"type": "number",
|
|
3733
|
+
"required": false,
|
|
3734
|
+
"description": "The average rating. Computed from `counts` when omitted."
|
|
3735
|
+
},
|
|
3736
|
+
{
|
|
3737
|
+
"name": "total",
|
|
3738
|
+
"type": "number",
|
|
3739
|
+
"required": false,
|
|
3740
|
+
"description": "Total reviews. The sum of `counts` when omitted."
|
|
3741
|
+
},
|
|
3742
|
+
{
|
|
3743
|
+
"name": "max",
|
|
3744
|
+
"type": "number",
|
|
3745
|
+
"required": false,
|
|
3746
|
+
"default": "5",
|
|
3747
|
+
"description": "The highest level (number of stars)."
|
|
3748
|
+
},
|
|
3749
|
+
{
|
|
3750
|
+
"name": "onLevelSelect",
|
|
3751
|
+
"type": "(level: number | null) => void",
|
|
3752
|
+
"required": false,
|
|
3753
|
+
"description": "Called when a level row is pressed, with that level, or `null` when the\r\npressed row is pressed again. Turns each row into a toggle button for\r\nfiltering a review list."
|
|
3754
|
+
},
|
|
3755
|
+
{
|
|
3756
|
+
"name": "selectedLevel",
|
|
3757
|
+
"type": "number | null",
|
|
3758
|
+
"required": false,
|
|
3759
|
+
"description": "The level currently filtered on (shown pressed). Use with `onLevelSelect`."
|
|
3760
|
+
},
|
|
3761
|
+
{
|
|
3762
|
+
"name": "recommendPercent",
|
|
3763
|
+
"type": "number",
|
|
3764
|
+
"required": false,
|
|
3765
|
+
"description": "Share of reviewers who would recommend, 0 to 100. Shown as \"92% would recommend\"."
|
|
3766
|
+
},
|
|
3767
|
+
{
|
|
3768
|
+
"name": "layout",
|
|
3769
|
+
"type": "RatingBreakdownLayout",
|
|
3770
|
+
"required": false,
|
|
3771
|
+
"default": "\"stacked\"",
|
|
3772
|
+
"description": "`stacked`: the average above the bars. `inline`: beside them (wraps on narrow screens)."
|
|
3773
|
+
},
|
|
3774
|
+
{
|
|
3775
|
+
"name": "size",
|
|
3776
|
+
"type": "Size",
|
|
3777
|
+
"required": false,
|
|
3778
|
+
"default": "\"md\"",
|
|
3779
|
+
"description": "Text size."
|
|
3780
|
+
}
|
|
3781
|
+
],
|
|
3782
|
+
"subcomponents": [],
|
|
3783
|
+
"storybook": "Data Display/RatingBreakdown",
|
|
3784
|
+
"stories": [
|
|
3785
|
+
{
|
|
3786
|
+
"name": "Playground",
|
|
3787
|
+
"description": ""
|
|
3788
|
+
},
|
|
3789
|
+
{
|
|
3790
|
+
"name": "Stacked",
|
|
3791
|
+
"description": ""
|
|
3792
|
+
},
|
|
3793
|
+
{
|
|
3794
|
+
"name": "Inline",
|
|
3795
|
+
"description": ""
|
|
3796
|
+
},
|
|
3797
|
+
{
|
|
3798
|
+
"name": "Filterable",
|
|
3799
|
+
"description": ""
|
|
3800
|
+
},
|
|
3801
|
+
{
|
|
3802
|
+
"name": "Sizes",
|
|
3803
|
+
"description": ""
|
|
3804
|
+
},
|
|
3805
|
+
{
|
|
3806
|
+
"name": "No Reviews",
|
|
3807
|
+
"description": ""
|
|
3808
|
+
},
|
|
3809
|
+
{
|
|
3810
|
+
"name": "Ten Point Scale",
|
|
3811
|
+
"description": ""
|
|
3812
|
+
}
|
|
3813
|
+
]
|
|
3814
|
+
},
|
|
3815
|
+
{
|
|
3816
|
+
"name": "ReviewCard",
|
|
3817
|
+
"category": "data-display",
|
|
3818
|
+
"folder": "ReviewCard",
|
|
3819
|
+
"import": "import { ReviewCard } from \"@vjdesigns/vjdesigns-ui\";",
|
|
3820
|
+
"description": "One customer review: the reviewer with avatar, star rating, date,\r\nverified badge, headline, body (clamped with \"Read more\"), a would-\r\nrecommend indicator, photos, helpful votes, and an owner reply. Rendered\r\nas an `<article>` named by its headline (or the reviewer).",
|
|
3821
|
+
"nativeElement": "article",
|
|
3822
|
+
"props": [
|
|
3823
|
+
{
|
|
3824
|
+
"name": "author",
|
|
3825
|
+
"type": "ReviewAuthor",
|
|
3826
|
+
"required": true,
|
|
3827
|
+
"description": "The reviewer."
|
|
3828
|
+
},
|
|
3829
|
+
{
|
|
3830
|
+
"name": "rating",
|
|
3831
|
+
"type": "number",
|
|
3832
|
+
"required": false,
|
|
3833
|
+
"description": "Star rating, shown with `RatingDisplay`. Omit for a text-only review."
|
|
3834
|
+
},
|
|
3835
|
+
{
|
|
3836
|
+
"name": "max",
|
|
3837
|
+
"type": "number",
|
|
3838
|
+
"required": false,
|
|
3839
|
+
"default": "5",
|
|
3840
|
+
"description": "Highest rating."
|
|
3841
|
+
},
|
|
3842
|
+
{
|
|
3843
|
+
"name": "title",
|
|
3844
|
+
"type": "ReactNode",
|
|
3845
|
+
"required": false,
|
|
3846
|
+
"description": "Review headline, rendered as a heading (see `headingLevel`)."
|
|
3847
|
+
},
|
|
3848
|
+
{
|
|
3849
|
+
"name": "headingLevel",
|
|
3850
|
+
"type": "2 | 3 | 4 | 5 | 6",
|
|
3851
|
+
"required": false,
|
|
3852
|
+
"default": "3",
|
|
3853
|
+
"description": "Heading level of `title`."
|
|
3854
|
+
},
|
|
3855
|
+
{
|
|
3856
|
+
"name": "date",
|
|
3857
|
+
"type": "string",
|
|
3858
|
+
"required": false,
|
|
3859
|
+
"description": "ISO date (\"YYYY-MM-DD\") the review was written. Formatted for the locale in a `<time>`."
|
|
3860
|
+
},
|
|
3861
|
+
{
|
|
3862
|
+
"name": "verified",
|
|
3863
|
+
"type": "boolean",
|
|
3864
|
+
"required": false,
|
|
3865
|
+
"default": "false",
|
|
3866
|
+
"description": "Show a \"Verified purchase\" badge."
|
|
3867
|
+
},
|
|
3868
|
+
{
|
|
3869
|
+
"name": "verifiedLabel",
|
|
3870
|
+
"type": "string",
|
|
3871
|
+
"required": false,
|
|
3872
|
+
"default": "\"Verified purchase\"",
|
|
3873
|
+
"description": "Text of the verified badge, e.g. \"Verified attendee\"."
|
|
3874
|
+
},
|
|
3875
|
+
{
|
|
3876
|
+
"name": "recommend",
|
|
3877
|
+
"type": "boolean",
|
|
3878
|
+
"required": false,
|
|
3879
|
+
"description": "`true`: thumbs up \"Recommends\". `false`: thumbs down \"Doesn't recommend\". Omit to show neither."
|
|
3880
|
+
},
|
|
3881
|
+
{
|
|
3882
|
+
"name": "children",
|
|
3883
|
+
"type": "ReactNode",
|
|
3884
|
+
"required": false,
|
|
3885
|
+
"description": "The review body. Long text is clamped to `maxLines` with a \"Read more\" button."
|
|
3886
|
+
},
|
|
3887
|
+
{
|
|
3888
|
+
"name": "maxLines",
|
|
3889
|
+
"type": "number",
|
|
3890
|
+
"required": false,
|
|
3891
|
+
"default": "5",
|
|
3892
|
+
"description": "Lines shown before \"Read more\". `0` never clamps."
|
|
3893
|
+
},
|
|
3894
|
+
{
|
|
3895
|
+
"name": "media",
|
|
3896
|
+
"type": "ReactNode",
|
|
3897
|
+
"required": false,
|
|
3898
|
+
"description": "Photos or other media, shown under the body."
|
|
3899
|
+
},
|
|
3900
|
+
{
|
|
3901
|
+
"name": "helpfulCount",
|
|
3902
|
+
"type": "number",
|
|
3903
|
+
"required": false,
|
|
3904
|
+
"description": "How many people found the review helpful. Shown as \"12 people found this helpful\"."
|
|
3905
|
+
},
|
|
3906
|
+
{
|
|
3907
|
+
"name": "helpful",
|
|
3908
|
+
"type": "boolean | null",
|
|
3909
|
+
"required": false,
|
|
3910
|
+
"description": "The viewer's helpful vote (controlled): `true` yes, `false` no, `null` none."
|
|
3911
|
+
},
|
|
3912
|
+
{
|
|
3913
|
+
"name": "defaultHelpful",
|
|
3914
|
+
"type": "boolean | null",
|
|
3915
|
+
"required": false,
|
|
3916
|
+
"default": "null",
|
|
3917
|
+
"description": "Initial helpful vote (uncontrolled)."
|
|
3918
|
+
},
|
|
3919
|
+
{
|
|
3920
|
+
"name": "onHelpfulChange",
|
|
3921
|
+
"type": "(helpful: boolean | null) => void",
|
|
3922
|
+
"required": false,
|
|
3923
|
+
"description": "Called with the viewer's helpful vote. Setting it shows \"Helpful? Yes / No\"\r\ntoggle buttons; pressing the pressed one again clears it (`null`)."
|
|
3924
|
+
},
|
|
3925
|
+
{
|
|
3926
|
+
"name": "response",
|
|
3927
|
+
"type": "ReviewResponse",
|
|
3928
|
+
"required": false,
|
|
3929
|
+
"description": "An owner or seller reply, shown indented under the review."
|
|
3930
|
+
},
|
|
3931
|
+
{
|
|
3932
|
+
"name": "actions",
|
|
3933
|
+
"type": "ReactNode",
|
|
3934
|
+
"required": false,
|
|
3935
|
+
"description": "Extra actions in the footer, e.g. Report or Share buttons."
|
|
3936
|
+
}
|
|
3937
|
+
],
|
|
3938
|
+
"subcomponents": [],
|
|
3939
|
+
"storybook": "Data Display/ReviewCard",
|
|
3940
|
+
"stories": [
|
|
3941
|
+
{
|
|
3942
|
+
"name": "Playground",
|
|
3943
|
+
"description": ""
|
|
3944
|
+
},
|
|
3945
|
+
{
|
|
3946
|
+
"name": "Complete",
|
|
3947
|
+
"description": ""
|
|
3948
|
+
},
|
|
3949
|
+
{
|
|
3950
|
+
"name": "Long Review Read More",
|
|
3951
|
+
"description": ""
|
|
3952
|
+
},
|
|
3953
|
+
{
|
|
3954
|
+
"name": "Short Review No Clamp",
|
|
3955
|
+
"description": ""
|
|
3956
|
+
},
|
|
3957
|
+
{
|
|
3958
|
+
"name": "Does Not Recommend",
|
|
3959
|
+
"description": ""
|
|
3960
|
+
},
|
|
3961
|
+
{
|
|
3962
|
+
"name": "Text Only",
|
|
3963
|
+
"description": ""
|
|
3964
|
+
},
|
|
3965
|
+
{
|
|
3966
|
+
"name": "With Photos",
|
|
3967
|
+
"description": ""
|
|
3968
|
+
},
|
|
3969
|
+
{
|
|
3970
|
+
"name": "Composition: reviews page",
|
|
3971
|
+
"description": ""
|
|
3972
|
+
}
|
|
3973
|
+
]
|
|
3974
|
+
},
|
|
3495
3975
|
{
|
|
3496
3976
|
"name": "Stat",
|
|
3497
3977
|
"category": "data-display",
|
|
@@ -10459,103 +10939,329 @@
|
|
|
10459
10939
|
"name": "max",
|
|
10460
10940
|
"type": "number",
|
|
10461
10941
|
"required": false,
|
|
10462
|
-
"default": "5",
|
|
10463
|
-
"description": "Number of icons (the highest value)."
|
|
10942
|
+
"default": "5",
|
|
10943
|
+
"description": "Number of icons (the highest value)."
|
|
10944
|
+
},
|
|
10945
|
+
{
|
|
10946
|
+
"name": "size",
|
|
10947
|
+
"type": "Size",
|
|
10948
|
+
"required": false,
|
|
10949
|
+
"default": "\"md\"",
|
|
10950
|
+
"description": "Icon size. `Rating`: sm 20px, md 24px, lg 32px icons (every hit target\nis still at least 24x24px). `RatingDisplay`: sm 16px, md 20px, lg 24px.\nFalls back to a surrounding Field's size."
|
|
10951
|
+
},
|
|
10952
|
+
{
|
|
10953
|
+
"name": "tone",
|
|
10954
|
+
"type": "Tone",
|
|
10955
|
+
"required": false,
|
|
10956
|
+
"default": "\"warning\"",
|
|
10957
|
+
"description": "Color of the filled icons. Uses each tone's verified `--color-{tone}-border`\n(3:1 on bg, surface, and raised surfaces in both themes). Empty icons are\noutlines in `--color-border-strong`, so filled vs empty differs by shape too."
|
|
10958
|
+
},
|
|
10959
|
+
{
|
|
10960
|
+
"name": "icon",
|
|
10961
|
+
"type": "ReactNode",
|
|
10962
|
+
"required": false,
|
|
10963
|
+
"default": "<StarFilledIcon />",
|
|
10964
|
+
"description": "Filled icon (a filled shape, e.g. `<StarFilledIcon />`). It is sized to the\nicon box. Keep it visibly different in *shape* from `emptyIcon`\n(filled vs outline), not only in color."
|
|
10965
|
+
},
|
|
10966
|
+
{
|
|
10967
|
+
"name": "emptyIcon",
|
|
10968
|
+
"type": "ReactNode",
|
|
10969
|
+
"required": false,
|
|
10970
|
+
"default": "<StarIcon />",
|
|
10971
|
+
"description": "Empty icon (an outline of the same shape, e.g. `<StarIcon />`)."
|
|
10972
|
+
},
|
|
10973
|
+
{
|
|
10974
|
+
"name": "showValue",
|
|
10975
|
+
"type": "boolean",
|
|
10976
|
+
"required": false,
|
|
10977
|
+
"description": "Show the numeric value next to the icons, e.g. \"4.5 / 5\"."
|
|
10978
|
+
},
|
|
10979
|
+
{
|
|
10980
|
+
"name": "value",
|
|
10981
|
+
"type": "number",
|
|
10982
|
+
"required": true,
|
|
10983
|
+
"description": "The rating to show. Fractions are drawn exactly: 3.7 fills 70% of the 4th icon. Clamped to 0..`max`."
|
|
10984
|
+
},
|
|
10985
|
+
{
|
|
10986
|
+
"name": "count",
|
|
10987
|
+
"type": "number",
|
|
10988
|
+
"required": false,
|
|
10989
|
+
"description": "Number of reviews, shown after the icons as \"(128 reviews)\"."
|
|
10990
|
+
},
|
|
10991
|
+
{
|
|
10992
|
+
"name": "formatCount",
|
|
10993
|
+
"type": "(count: number) => ReactNode",
|
|
10994
|
+
"required": false,
|
|
10995
|
+
"default": "\"(128 reviews)\"",
|
|
10996
|
+
"description": "Customizes (or localizes) the review count text."
|
|
10997
|
+
},
|
|
10998
|
+
{
|
|
10999
|
+
"name": "getLabel",
|
|
11000
|
+
"type": "(value: number, max: number) => string",
|
|
11001
|
+
"required": false,
|
|
11002
|
+
"default": "\"Rated 4.5 out of 5\"",
|
|
11003
|
+
"description": "Accessible name of the icon row (`role=\"img\"`). Localize it here.\nAn explicit `aria-label` prop wins."
|
|
11004
|
+
}
|
|
11005
|
+
],
|
|
11006
|
+
"subcomponents": [],
|
|
11007
|
+
"storybook": "Forms/Rating",
|
|
11008
|
+
"stories": [
|
|
11009
|
+
{
|
|
11010
|
+
"name": "Playground",
|
|
11011
|
+
"description": "Half stars and a zero option on: any value from 0 to 5 in steps of 0.5."
|
|
11012
|
+
},
|
|
11013
|
+
{
|
|
11014
|
+
"name": "Basic",
|
|
11015
|
+
"description": ""
|
|
11016
|
+
},
|
|
11017
|
+
{
|
|
11018
|
+
"name": "Zero to five, in halves",
|
|
11019
|
+
"description": "`allowZero` adds a \"0\" option before the stars, so 0/5 is a real rating\n(not the same as no rating, `null`). With `precision={0.5}`, every value\nfrom 0 to 5 in halves can be picked by pointer or keyboard."
|
|
11020
|
+
},
|
|
11021
|
+
{
|
|
11022
|
+
"name": "Zero (read-only)",
|
|
11023
|
+
"description": "Read-only, a zero rating is \"Rated 0 out of 5\", not \"Not rated\"."
|
|
11024
|
+
},
|
|
11025
|
+
{
|
|
11026
|
+
"name": "Half Precision",
|
|
11027
|
+
"description": ""
|
|
11028
|
+
},
|
|
11029
|
+
{
|
|
11030
|
+
"name": "Sizes",
|
|
11031
|
+
"description": ""
|
|
11032
|
+
},
|
|
11033
|
+
{
|
|
11034
|
+
"name": "Tones",
|
|
11035
|
+
"description": ""
|
|
11036
|
+
},
|
|
11037
|
+
{
|
|
11038
|
+
"name": "Custom Icons",
|
|
11039
|
+
"description": ""
|
|
11040
|
+
},
|
|
11041
|
+
{
|
|
11042
|
+
"name": "Allow Clear",
|
|
11043
|
+
"description": ""
|
|
11044
|
+
},
|
|
11045
|
+
{
|
|
11046
|
+
"name": "Read-Only Display",
|
|
11047
|
+
"description": ""
|
|
11048
|
+
},
|
|
11049
|
+
{
|
|
11050
|
+
"name": "Disabled",
|
|
11051
|
+
"description": ""
|
|
11052
|
+
},
|
|
11053
|
+
{
|
|
11054
|
+
"name": "Invalid",
|
|
11055
|
+
"description": ""
|
|
11056
|
+
},
|
|
11057
|
+
{
|
|
11058
|
+
"name": "In a Field",
|
|
11059
|
+
"description": ""
|
|
11060
|
+
},
|
|
11061
|
+
{
|
|
11062
|
+
"name": "Controlled",
|
|
11063
|
+
"description": ""
|
|
11064
|
+
},
|
|
11065
|
+
{
|
|
11066
|
+
"name": "Rate This Game (Form)",
|
|
11067
|
+
"description": ""
|
|
11068
|
+
},
|
|
11069
|
+
{
|
|
11070
|
+
"name": "Unrated (read-only and zero)",
|
|
11071
|
+
"description": "A read-only rating with no value says \"Not rated\" (not \"Rated 0\"), and a value of 0 means unrated, not one star."
|
|
11072
|
+
}
|
|
11073
|
+
]
|
|
11074
|
+
},
|
|
11075
|
+
{
|
|
11076
|
+
"name": "RatingScale",
|
|
11077
|
+
"category": "forms",
|
|
11078
|
+
"folder": "RatingScale",
|
|
11079
|
+
"import": "import { RatingScale } from \"@vjdesigns/vjdesigns-ui\";",
|
|
11080
|
+
"description": "A labeled, single-choice rating scale: faces, numbers (such as a 0 to 10\r\nlikelihood scale), or thumbs up and down. Unlike `Rating`, each option is\r\nits own choice with its own name, so choosing one never fills the others.\r\nBuilt on native radios in a `role=\"radiogroup\"`: Tab lands on the selected\r\noption, arrow keys move and select, and the value submits with a form.",
|
|
11081
|
+
"nativeElement": "div",
|
|
11082
|
+
"props": [
|
|
11083
|
+
{
|
|
11084
|
+
"name": "variant",
|
|
11085
|
+
"type": "RatingScaleVariant",
|
|
11086
|
+
"required": false,
|
|
11087
|
+
"default": "\"numbers\"",
|
|
11088
|
+
"description": "Look and built-in options: five `faces` (very unhappy to very happy),\r\n`numbers` from `min` to `max` (e.g. a 0 to 10 likelihood scale), or\r\n`thumbs` up (`1`) and down (`0`)."
|
|
11089
|
+
},
|
|
11090
|
+
{
|
|
11091
|
+
"name": "value",
|
|
11092
|
+
"type": "number | null",
|
|
11093
|
+
"required": false,
|
|
11094
|
+
"description": "Selected value (controlled). `null` means nothing is selected. Use with `onValueChange`."
|
|
11095
|
+
},
|
|
11096
|
+
{
|
|
11097
|
+
"name": "defaultValue",
|
|
11098
|
+
"type": "number | null",
|
|
11099
|
+
"required": false,
|
|
11100
|
+
"default": "null",
|
|
11101
|
+
"description": "Initial value (uncontrolled)."
|
|
11102
|
+
},
|
|
11103
|
+
{
|
|
11104
|
+
"name": "onValueChange",
|
|
11105
|
+
"type": "(value: number | null) => void",
|
|
11106
|
+
"required": false,
|
|
11107
|
+
"description": "Called with the selected value, or `null` when cleared."
|
|
11108
|
+
},
|
|
11109
|
+
{
|
|
11110
|
+
"name": "min",
|
|
11111
|
+
"type": "number",
|
|
11112
|
+
"required": false,
|
|
11113
|
+
"default": "1",
|
|
11114
|
+
"description": "`numbers` only: the lowest value."
|
|
11115
|
+
},
|
|
11116
|
+
{
|
|
11117
|
+
"name": "max",
|
|
11118
|
+
"type": "number",
|
|
11119
|
+
"required": false,
|
|
11120
|
+
"default": "5",
|
|
11121
|
+
"description": "`numbers` only: the highest value."
|
|
11122
|
+
},
|
|
11123
|
+
{
|
|
11124
|
+
"name": "options",
|
|
11125
|
+
"type": "RatingScaleOption[]",
|
|
11126
|
+
"required": false,
|
|
11127
|
+
"description": "Custom options, replacing the variant's built-in set (and `min` / `max`).\r\nThe variant still sets the look."
|
|
11128
|
+
},
|
|
11129
|
+
{
|
|
11130
|
+
"name": "startLabel",
|
|
11131
|
+
"type": "ReactNode",
|
|
11132
|
+
"required": false,
|
|
11133
|
+
"description": "Caption under the first option, e.g. \"Not likely\". Also read as part of the description."
|
|
11134
|
+
},
|
|
11135
|
+
{
|
|
11136
|
+
"name": "endLabel",
|
|
11137
|
+
"type": "ReactNode",
|
|
11138
|
+
"required": false,
|
|
11139
|
+
"description": "Caption under the last option, e.g. \"Very likely\". Also read as part of the description."
|
|
11140
|
+
},
|
|
11141
|
+
{
|
|
11142
|
+
"name": "showLabels",
|
|
11143
|
+
"type": "boolean",
|
|
11144
|
+
"required": false,
|
|
11145
|
+
"default": "false",
|
|
11146
|
+
"description": "Show each option's label under it (faces and thumbs)."
|
|
11147
|
+
},
|
|
11148
|
+
{
|
|
11149
|
+
"name": "sentiment",
|
|
11150
|
+
"type": "boolean",
|
|
11151
|
+
"required": false,
|
|
11152
|
+
"default": "false",
|
|
11153
|
+
"description": "`faces` only: tint the faces from danger (lowest) to success (highest).\r\nThe face shapes already carry the meaning; the tint is extra."
|
|
11154
|
+
},
|
|
11155
|
+
{
|
|
11156
|
+
"name": "size",
|
|
11157
|
+
"type": "Size",
|
|
11158
|
+
"required": false,
|
|
11159
|
+
"default": "\"md\"",
|
|
11160
|
+
"description": "Option size. Falls back to a surrounding Field's size."
|
|
11161
|
+
},
|
|
11162
|
+
{
|
|
11163
|
+
"name": "allowClear",
|
|
11164
|
+
"type": "boolean",
|
|
11165
|
+
"required": false,
|
|
11166
|
+
"description": "Let the user remove their choice: clicking (or pressing Space on) the\r\nselected option again, or pressing Delete / Backspace, resets it to `null`."
|
|
10464
11167
|
},
|
|
10465
11168
|
{
|
|
10466
|
-
"name": "
|
|
10467
|
-
"type": "
|
|
11169
|
+
"name": "clearHint",
|
|
11170
|
+
"type": "string",
|
|
10468
11171
|
"required": false,
|
|
10469
|
-
"default": "\"
|
|
10470
|
-
"description": "
|
|
11172
|
+
"default": "\"Press Space on the selected rating, or Delete, to clear it.\"",
|
|
11173
|
+
"description": "Instructions announced with each option when `allowClear` is on. Localize it here."
|
|
10471
11174
|
},
|
|
10472
11175
|
{
|
|
10473
|
-
"name": "
|
|
10474
|
-
"type": "
|
|
11176
|
+
"name": "disabled",
|
|
11177
|
+
"type": "boolean",
|
|
10475
11178
|
"required": false,
|
|
10476
|
-
"
|
|
10477
|
-
"description": "Color of the filled icons. Uses each tone's verified `--color-{tone}-border`\n(3:1 on bg, surface, and raised surfaces in both themes). Empty icons are\noutlines in `--color-border-strong`, so filled vs empty differs by shape too."
|
|
11179
|
+
"description": "Disables every option. Falls back to a surrounding Field's state."
|
|
10478
11180
|
},
|
|
10479
11181
|
{
|
|
10480
|
-
"name": "
|
|
10481
|
-
"type": "
|
|
11182
|
+
"name": "readOnly",
|
|
11183
|
+
"type": "boolean",
|
|
10482
11184
|
"required": false,
|
|
10483
|
-
"
|
|
10484
|
-
"description": "Filled icon (a filled shape, e.g. `<StarFilledIcon />`). It is sized to the\nicon box. Keep it visibly different in *shape* from `emptyIcon`\n(filled vs outline), not only in color."
|
|
11185
|
+
"description": "Show the value without allowing changes: a single `role=\"img\"` named\r\n\"Rated: Happy\", plus a hidden input so the value still submits when `name` is set."
|
|
10485
11186
|
},
|
|
10486
11187
|
{
|
|
10487
|
-
"name": "
|
|
10488
|
-
"type": "
|
|
11188
|
+
"name": "invalid",
|
|
11189
|
+
"type": "boolean",
|
|
10489
11190
|
"required": false,
|
|
10490
|
-
"
|
|
10491
|
-
"description": "Empty icon (an outline of the same shape, e.g. `<StarIcon />`)."
|
|
11191
|
+
"description": "Marks the scale invalid: danger outlines and `aria-invalid`. Falls back to a surrounding Field's state."
|
|
10492
11192
|
},
|
|
10493
11193
|
{
|
|
10494
|
-
"name": "
|
|
11194
|
+
"name": "required",
|
|
10495
11195
|
"type": "boolean",
|
|
10496
11196
|
"required": false,
|
|
10497
|
-
"description": "
|
|
11197
|
+
"description": "A choice is required: sets native `required` on the radios. Falls back to a surrounding Field's state."
|
|
10498
11198
|
},
|
|
10499
11199
|
{
|
|
10500
|
-
"name": "
|
|
10501
|
-
"type": "
|
|
10502
|
-
"required":
|
|
10503
|
-
"description": "
|
|
11200
|
+
"name": "name",
|
|
11201
|
+
"type": "string",
|
|
11202
|
+
"required": false,
|
|
11203
|
+
"description": "Shared `name` for the native radios (used in form submission). Generated with `useId` when omitted."
|
|
10504
11204
|
},
|
|
10505
11205
|
{
|
|
10506
|
-
"name": "
|
|
10507
|
-
"type": "
|
|
11206
|
+
"name": "getReadOnlyLabel",
|
|
11207
|
+
"type": "(option: RatingScaleOption) => string",
|
|
10508
11208
|
"required": false,
|
|
10509
|
-
"
|
|
11209
|
+
"default": "\"Rated: Happy\"",
|
|
11210
|
+
"description": "Read-only: accessible name. Localize it here."
|
|
10510
11211
|
},
|
|
10511
11212
|
{
|
|
10512
|
-
"name": "
|
|
10513
|
-
"type": "
|
|
11213
|
+
"name": "unratedLabel",
|
|
11214
|
+
"type": "string",
|
|
10514
11215
|
"required": false,
|
|
10515
|
-
"default": "\"
|
|
10516
|
-
"description": "
|
|
11216
|
+
"default": "\"Not rated\"",
|
|
11217
|
+
"description": "Read-only with no value: accessible name."
|
|
10517
11218
|
},
|
|
10518
11219
|
{
|
|
10519
|
-
"name": "
|
|
10520
|
-
"type": "
|
|
11220
|
+
"name": "label",
|
|
11221
|
+
"type": "ReactNode",
|
|
10521
11222
|
"required": false,
|
|
10522
|
-
"
|
|
10523
|
-
|
|
11223
|
+
"description": "Visible label, used when the scale stands alone. Ignored inside a\r\n`Field`/`Fieldset`, whose label or legend names it. Without a label,\r\npass `aria-label` or `aria-labelledby`."
|
|
11224
|
+
},
|
|
11225
|
+
{
|
|
11226
|
+
"name": "description",
|
|
11227
|
+
"type": "ReactNode",
|
|
11228
|
+
"required": false,
|
|
11229
|
+
"description": "Help text under the label, linked with `aria-describedby`."
|
|
10524
11230
|
}
|
|
10525
11231
|
],
|
|
10526
11232
|
"subcomponents": [],
|
|
10527
|
-
"storybook": "Forms/
|
|
11233
|
+
"storybook": "Forms/RatingScale",
|
|
10528
11234
|
"stories": [
|
|
10529
11235
|
{
|
|
10530
11236
|
"name": "Playground",
|
|
10531
|
-
"description": "
|
|
11237
|
+
"description": ""
|
|
10532
11238
|
},
|
|
10533
11239
|
{
|
|
10534
|
-
"name": "
|
|
11240
|
+
"name": "Faces",
|
|
10535
11241
|
"description": ""
|
|
10536
11242
|
},
|
|
10537
11243
|
{
|
|
10538
|
-
"name": "
|
|
10539
|
-
"description": "
|
|
11244
|
+
"name": "Faces With Sentiment",
|
|
11245
|
+
"description": ""
|
|
10540
11246
|
},
|
|
10541
11247
|
{
|
|
10542
|
-
"name": "
|
|
10543
|
-
"description": "
|
|
11248
|
+
"name": "Numbers (0 to 10)",
|
|
11249
|
+
"description": ""
|
|
10544
11250
|
},
|
|
10545
11251
|
{
|
|
10546
|
-
"name": "
|
|
11252
|
+
"name": "One To Five",
|
|
10547
11253
|
"description": ""
|
|
10548
11254
|
},
|
|
10549
11255
|
{
|
|
10550
|
-
"name": "
|
|
11256
|
+
"name": "Thumbs",
|
|
10551
11257
|
"description": ""
|
|
10552
11258
|
},
|
|
10553
11259
|
{
|
|
10554
|
-
"name": "
|
|
11260
|
+
"name": "All Variants",
|
|
10555
11261
|
"description": ""
|
|
10556
11262
|
},
|
|
10557
11263
|
{
|
|
10558
|
-
"name": "
|
|
11264
|
+
"name": "Sizes",
|
|
10559
11265
|
"description": ""
|
|
10560
11266
|
},
|
|
10561
11267
|
{
|
|
@@ -10563,7 +11269,11 @@
|
|
|
10563
11269
|
"description": ""
|
|
10564
11270
|
},
|
|
10565
11271
|
{
|
|
10566
|
-
"name": "Read
|
|
11272
|
+
"name": "Read Only",
|
|
11273
|
+
"description": ""
|
|
11274
|
+
},
|
|
11275
|
+
{
|
|
11276
|
+
"name": "Read Only Unrated",
|
|
10567
11277
|
"description": ""
|
|
10568
11278
|
},
|
|
10569
11279
|
{
|
|
@@ -10575,20 +11285,20 @@
|
|
|
10575
11285
|
"description": ""
|
|
10576
11286
|
},
|
|
10577
11287
|
{
|
|
10578
|
-
"name": "
|
|
11288
|
+
"name": "Custom Options",
|
|
10579
11289
|
"description": ""
|
|
10580
11290
|
},
|
|
10581
11291
|
{
|
|
10582
|
-
"name": "
|
|
11292
|
+
"name": "In Field",
|
|
10583
11293
|
"description": ""
|
|
10584
11294
|
},
|
|
10585
11295
|
{
|
|
10586
|
-
"name": "
|
|
11296
|
+
"name": "Controlled",
|
|
10587
11297
|
"description": ""
|
|
10588
11298
|
},
|
|
10589
11299
|
{
|
|
10590
|
-
"name": "
|
|
10591
|
-
"description": "
|
|
11300
|
+
"name": "Survey Form",
|
|
11301
|
+
"description": ""
|
|
10592
11302
|
}
|
|
10593
11303
|
]
|
|
10594
11304
|
},
|
|
@@ -15725,6 +16435,238 @@
|
|
|
15725
16435
|
}
|
|
15726
16436
|
]
|
|
15727
16437
|
},
|
|
16438
|
+
{
|
|
16439
|
+
"name": "MobileNav",
|
|
16440
|
+
"category": "navigation",
|
|
16441
|
+
"folder": "MobileNav",
|
|
16442
|
+
"import": "import { MobileNav } from \"@vjdesigns/vjdesigns-ui\";",
|
|
16443
|
+
"description": "A mobile navigation bar: a bottom tab bar, a top bar, or a side rail of\r\nicon-and-label links. A bubble slides to the current item, with an\r\nanimated `effect` (floating bubbles by default; also sparkle, confetti,\r\nglow, jelly, orbit, splash, or none). With reduced motion, the bubble simply\r\nmoves without the effects.\r\n\r\nRenders a `<nav>` landmark with a list of links. The current item has\r\n`aria-current=\"page\"` and is marked by the bubble's shape and an indicator\r\nbar, never by color alone. Every item keeps its label as its accessible\r\nname, even when labels are hidden.",
|
|
16444
|
+
"nativeElement": "nav",
|
|
16445
|
+
"props": [
|
|
16446
|
+
{
|
|
16447
|
+
"name": "children",
|
|
16448
|
+
"type": "ReactNode",
|
|
16449
|
+
"required": false,
|
|
16450
|
+
"description": "`MobileNav.Item`s, usually three to five."
|
|
16451
|
+
},
|
|
16452
|
+
{
|
|
16453
|
+
"name": "placement",
|
|
16454
|
+
"type": "MobileNavPlacement",
|
|
16455
|
+
"required": false,
|
|
16456
|
+
"default": "\"bottom\"",
|
|
16457
|
+
"description": "Edge of the screen the bar sits on: `bottom`, `top`, or a `side` rail."
|
|
16458
|
+
},
|
|
16459
|
+
{
|
|
16460
|
+
"name": "side",
|
|
16461
|
+
"type": "MobileNavSide",
|
|
16462
|
+
"required": false,
|
|
16463
|
+
"default": "\"start\"",
|
|
16464
|
+
"description": "With `placement=\"side\"`, the edge the rail sits on (logical, so it mirrors in RTL)."
|
|
16465
|
+
},
|
|
16466
|
+
{
|
|
16467
|
+
"name": "variant",
|
|
16468
|
+
"type": "MobileNavVariant",
|
|
16469
|
+
"required": false,
|
|
16470
|
+
"default": "\"surface\"",
|
|
16471
|
+
"description": "Visual style. See `MobileNavVariant`."
|
|
16472
|
+
},
|
|
16473
|
+
{
|
|
16474
|
+
"name": "floating",
|
|
16475
|
+
"type": "boolean",
|
|
16476
|
+
"required": false,
|
|
16477
|
+
"default": "false",
|
|
16478
|
+
"description": "Detaches the bar from the edge as a rounded, shadowed island with space around it."
|
|
16479
|
+
},
|
|
16480
|
+
{
|
|
16481
|
+
"name": "position",
|
|
16482
|
+
"type": "MobileNavPosition",
|
|
16483
|
+
"required": false,
|
|
16484
|
+
"default": "\"fixed\"",
|
|
16485
|
+
"description": "`fixed` stays on its edge of the viewport; `sticky` sticks to its edge of\r\nthe scroll container; `static` stays in the flow."
|
|
16486
|
+
},
|
|
16487
|
+
{
|
|
16488
|
+
"name": "size",
|
|
16489
|
+
"type": "Size",
|
|
16490
|
+
"required": false,
|
|
16491
|
+
"default": "\"md\"",
|
|
16492
|
+
"description": "Bar height (or rail width) and icon size. Bars: sm 56px, md 64px, lg 72px. Rails: sm 64px, md 80px, lg 96px."
|
|
16493
|
+
},
|
|
16494
|
+
{
|
|
16495
|
+
"name": "effect",
|
|
16496
|
+
"type": "MobileNavEffect",
|
|
16497
|
+
"required": false,
|
|
16498
|
+
"default": "\"bubbles\"",
|
|
16499
|
+
"description": "The animated effect when the current item changes: `bubbles`,\r\n`sparkle`, `confetti`, `glow`, `jelly`, `orbit`, `splash`, or `none` to\r\nturn it off. See `MobileNavEffect`."
|
|
16500
|
+
},
|
|
16501
|
+
{
|
|
16502
|
+
"name": "activeTone",
|
|
16503
|
+
"type": "MobileNavActiveTone",
|
|
16504
|
+
"required": false,
|
|
16505
|
+
"default": "\"accent\"",
|
|
16506
|
+
"description": "Color of the bubble and indicator behind the current item."
|
|
16507
|
+
},
|
|
16508
|
+
{
|
|
16509
|
+
"name": "labels",
|
|
16510
|
+
"type": "MobileNavLabels",
|
|
16511
|
+
"required": false,
|
|
16512
|
+
"default": "\"always\"",
|
|
16513
|
+
"description": "Which labels are visible: `always`, only the `active` item's, or `never`. Labels are always the items' accessible names."
|
|
16514
|
+
},
|
|
16515
|
+
{
|
|
16516
|
+
"name": "hideAbove",
|
|
16517
|
+
"type": "MobileNavBreakpoint",
|
|
16518
|
+
"required": false,
|
|
16519
|
+
"description": "Hides the bar at this breakpoint and wider, e.g. `\"md\"` to show it only on phones."
|
|
16520
|
+
},
|
|
16521
|
+
{
|
|
16522
|
+
"name": "reserveSpace",
|
|
16523
|
+
"type": "boolean",
|
|
16524
|
+
"required": false,
|
|
16525
|
+
"default": "true",
|
|
16526
|
+
"description": "With `position=\"fixed\"`, keeps focused and scrolled-to content clear of\r\nthe bar (WCAG 2.4.11): while mounted, sets the matching `scroll-padding`\r\non `<html>` to the space the bar covers, and `--mobile-nav-offset` on\r\n`<html>` to the same length, so the page can reserve room for it\r\n(`body { padding-block-end: var(--mobile-nav-offset, 0px) }` under a\r\nbottom bar). Both are restored on unmount, and are 0 while hidden by\r\n`hideAbove`."
|
|
16527
|
+
},
|
|
16528
|
+
{
|
|
16529
|
+
"name": "value",
|
|
16530
|
+
"type": "string",
|
|
16531
|
+
"required": false,
|
|
16532
|
+
"description": "The current item's `value`, when controlled. An item's own `active` prop wins."
|
|
16533
|
+
},
|
|
16534
|
+
{
|
|
16535
|
+
"name": "defaultValue",
|
|
16536
|
+
"type": "string",
|
|
16537
|
+
"required": false,
|
|
16538
|
+
"description": "The initially current item's `value`, when uncontrolled. Selecting an item makes it current."
|
|
16539
|
+
},
|
|
16540
|
+
{
|
|
16541
|
+
"name": "onValueChange",
|
|
16542
|
+
"type": "(value: string) => void",
|
|
16543
|
+
"required": false,
|
|
16544
|
+
"description": "Called with an item's `value` when it's selected."
|
|
16545
|
+
},
|
|
16546
|
+
{
|
|
16547
|
+
"name": "aria-label",
|
|
16548
|
+
"type": "string",
|
|
16549
|
+
"required": false,
|
|
16550
|
+
"default": "\"Main\" (translated)",
|
|
16551
|
+
"description": "Accessible name of the navigation landmark."
|
|
16552
|
+
}
|
|
16553
|
+
],
|
|
16554
|
+
"subcomponents": [
|
|
16555
|
+
{
|
|
16556
|
+
"name": "MobileNav.Item",
|
|
16557
|
+
"exportedAs": "MobileNavItem",
|
|
16558
|
+
"description": "One destination in a `MobileNav`: an icon over a label, in its own `<li>`.\r\nSelecting it makes it current when the root is uncontrolled (and calls\r\n`onValueChange`), even if a client-side router prevents the default\r\nnavigation.",
|
|
16559
|
+
"props": [
|
|
16560
|
+
{
|
|
16561
|
+
"name": "as",
|
|
16562
|
+
"type": "C",
|
|
16563
|
+
"required": false,
|
|
16564
|
+
"default": "\"a\"",
|
|
16565
|
+
"description": "The element or component to render, e.g. your router's `Link`. Use a\r\nlink for navigation; `\"button\"` suits an action such as opening a sheet."
|
|
16566
|
+
},
|
|
16567
|
+
{
|
|
16568
|
+
"name": "value",
|
|
16569
|
+
"type": "string",
|
|
16570
|
+
"required": false,
|
|
16571
|
+
"description": "Identifies the item for the root's `value` / `defaultValue` / `onValueChange`."
|
|
16572
|
+
},
|
|
16573
|
+
{
|
|
16574
|
+
"name": "active",
|
|
16575
|
+
"type": "boolean",
|
|
16576
|
+
"required": false,
|
|
16577
|
+
"description": "Marks the item as the current page (`aria-current=\"page\"`), whatever\r\nthe root's `value`. Use it when your router knows the current page."
|
|
16578
|
+
},
|
|
16579
|
+
{
|
|
16580
|
+
"name": "icon",
|
|
16581
|
+
"type": "ReactNode",
|
|
16582
|
+
"required": true,
|
|
16583
|
+
"description": "The icon. Decorative: the label names the item."
|
|
16584
|
+
},
|
|
16585
|
+
{
|
|
16586
|
+
"name": "activeIcon",
|
|
16587
|
+
"type": "ReactNode",
|
|
16588
|
+
"required": false,
|
|
16589
|
+
"description": "A different icon for the current item, e.g. a filled version, as an extra cue besides color."
|
|
16590
|
+
},
|
|
16591
|
+
{
|
|
16592
|
+
"name": "badge",
|
|
16593
|
+
"type": "MobileNavBadgeValue",
|
|
16594
|
+
"required": false,
|
|
16595
|
+
"description": "A count (shown with `Badge` `count`, capped at 99+, hidden at 0) or a\r\nshort text such as \"New\", on the icon's corner. It's read after the\r\nlabel (\"Messages 3\")."
|
|
16596
|
+
},
|
|
16597
|
+
{
|
|
16598
|
+
"name": "badgeLabel",
|
|
16599
|
+
"type": "string",
|
|
16600
|
+
"required": false,
|
|
16601
|
+
"description": "Screen-reader text for the badge, e.g. \"3 unread messages\". Replaces the badge text in the accessible name."
|
|
16602
|
+
},
|
|
16603
|
+
{
|
|
16604
|
+
"name": "badgeTone",
|
|
16605
|
+
"type": "Tone",
|
|
16606
|
+
"required": false,
|
|
16607
|
+
"description": "Badge color. By default `accent`, or the bar's colors swapped on the `solid` variant."
|
|
16608
|
+
},
|
|
16609
|
+
{
|
|
16610
|
+
"name": "children",
|
|
16611
|
+
"type": "ReactNode",
|
|
16612
|
+
"required": true,
|
|
16613
|
+
"description": "The label. Always the item's accessible name, even when hidden by `labels`."
|
|
16614
|
+
}
|
|
16615
|
+
]
|
|
16616
|
+
}
|
|
16617
|
+
],
|
|
16618
|
+
"storybook": "Navigation/MobileNav",
|
|
16619
|
+
"stories": [
|
|
16620
|
+
{
|
|
16621
|
+
"name": "Playground",
|
|
16622
|
+
"description": ""
|
|
16623
|
+
},
|
|
16624
|
+
{
|
|
16625
|
+
"name": "Effects",
|
|
16626
|
+
"description": "Every `effect`. Tap the items to play each one. `effect=\"none\"` turns the\r\neffect off; the bubble still slides. With reduced motion, none play."
|
|
16627
|
+
},
|
|
16628
|
+
{
|
|
16629
|
+
"name": "Placements",
|
|
16630
|
+
"description": "Bottom tab bar, top bar, and a side rail at either edge."
|
|
16631
|
+
},
|
|
16632
|
+
{
|
|
16633
|
+
"name": "Labels",
|
|
16634
|
+
"description": "Labels on every item, only on the current one (it grows into a pill), or icons only."
|
|
16635
|
+
},
|
|
16636
|
+
{
|
|
16637
|
+
"name": "Variants And Tones",
|
|
16638
|
+
"description": "Surface and solid bars in every active tone."
|
|
16639
|
+
},
|
|
16640
|
+
{
|
|
16641
|
+
"name": "Sizes",
|
|
16642
|
+
"description": ""
|
|
16643
|
+
},
|
|
16644
|
+
{
|
|
16645
|
+
"name": "Floating",
|
|
16646
|
+
"description": "A rounded island with space around it, as a bar and as a rail."
|
|
16647
|
+
},
|
|
16648
|
+
{
|
|
16649
|
+
"name": "Active Icons",
|
|
16650
|
+
"description": "`activeIcon` swaps in a filled icon on the current item, an extra cue besides color."
|
|
16651
|
+
},
|
|
16652
|
+
{
|
|
16653
|
+
"name": "Router Controlled",
|
|
16654
|
+
"description": "With a router: each item's `active` says which page is current, and the root holds no state."
|
|
16655
|
+
},
|
|
16656
|
+
{
|
|
16657
|
+
"name": "Long Labels",
|
|
16658
|
+
"description": "Long labels shorten with an ellipsis instead of pushing other items out."
|
|
16659
|
+
},
|
|
16660
|
+
{
|
|
16661
|
+
"name": "Right To Left",
|
|
16662
|
+
"description": "Right-to-left: items run from the right, and a start rail sits on the right."
|
|
16663
|
+
},
|
|
16664
|
+
{
|
|
16665
|
+
"name": "Fixed",
|
|
16666
|
+
"description": "`position=\"fixed\"` (the default in apps): the bar stays on the viewport's\r\nbottom edge, and `<html>` gets scroll padding and `--mobile-nav-offset`\r\nso focused content isn't hidden behind it."
|
|
16667
|
+
}
|
|
16668
|
+
]
|
|
16669
|
+
},
|
|
15728
16670
|
{
|
|
15729
16671
|
"name": "Navbar",
|
|
15730
16672
|
"category": "navigation",
|
|
@@ -20885,7 +21827,21 @@
|
|
|
20885
21827
|
"FolderIcon",
|
|
20886
21828
|
"FolderOpenIcon",
|
|
20887
21829
|
"ImageIcon",
|
|
20888
|
-
"LoaderIcon"
|
|
21830
|
+
"LoaderIcon",
|
|
21831
|
+
"FaceVerySadIcon",
|
|
21832
|
+
"FaceSadIcon",
|
|
21833
|
+
"FaceNeutralIcon",
|
|
21834
|
+
"FaceHappyIcon",
|
|
21835
|
+
"FaceVeryHappyIcon",
|
|
21836
|
+
"ThumbsUpIcon",
|
|
21837
|
+
"ThumbsDownIcon",
|
|
21838
|
+
"VerifiedIcon",
|
|
21839
|
+
"VolumeIcon",
|
|
21840
|
+
"VolumeOffIcon",
|
|
21841
|
+
"FullscreenIcon",
|
|
21842
|
+
"FullscreenExitIcon",
|
|
21843
|
+
"CaptionsIcon",
|
|
21844
|
+
"PipIcon"
|
|
20889
21845
|
],
|
|
20890
21846
|
"hooks": [
|
|
20891
21847
|
{
|