@sakaniui/mcp 0.18.2 → 0.19.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 +2 -2
- package/bin/sakaniui-mcp.mjs +16 -3
- package/data/AGENTS.md +14 -0
- package/data/CHANGELOG.md +16 -0
- package/data/dist/emoji-index.json +1 -1
- package/data/dist/icon-index.json +1 -1
- package/data/dist/manifest.json +1041 -255
- package/data/package.json +1 -1
- package/package.json +1 -1
package/data/dist/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 6,
|
|
3
3
|
"name": "@sakaniui/react",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.19.0",
|
|
5
5
|
"description": "Machine-readable contract of the SakaniUI React library, generated from its TypeScript source.",
|
|
6
6
|
"docs": "https://www.sakaniui.com",
|
|
7
7
|
"guide": "https://www.sakaniui.com/llms-full.txt",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"@sakaniui/react/emoji": "Fluent Emoji (full colour): EmojiName, one module each (1594 emoji, 311 with skin tones)."
|
|
25
25
|
},
|
|
26
26
|
"conventions": {
|
|
27
|
-
"version": "This manifest describes @sakaniui/react@0.
|
|
27
|
+
"version": "This manifest describes @sakaniui/react@0.19.0. Each component has `since`, the first release that contained it; a prop added later has its own `since`, and a value added later is listed in the prop's `valuesSince`. If the project has an older version installed, anything newer than that does not exist there.",
|
|
28
28
|
"acceptsNativeProps": "Components forward native HTML attributes (className, style, aria-*, event handlers) to their root element unless a prop says otherwise; only the props that are specific to SakaniUI are listed here.",
|
|
29
29
|
"accessibleName": "When `contract.requiresAccessibleName` is true, a required prop (aria-label, aria-labelledby or an alt text) is the only thing that names the control or image. Do not omit it.",
|
|
30
|
-
"tokens": "Use only the token names listed under `tokens`. Colour tokens follow the theme (the `.dark` class flips them); do not hard-code colours.",
|
|
30
|
+
"tokens": "Use only the token names listed under `tokens`. Colour tokens follow the theme (the `.dark` class flips them; get_tokens lists the light and the dark value of each token that changes); do not hard-code colours.",
|
|
31
31
|
"icons": "Icon props take the component itself (IconSettings), not an element (<IconSettings />). Only names in icon-index.json exist; search them (MCP: search_icons) instead of guessing. Emoji are separate (`@sakaniui/react/emoji`, emoji-index.json, MCP: search_emoji) and are rendered as elements, not passed to icon props.",
|
|
32
32
|
"examples": "Each component has `example`: its imports and the element with every required prop filled in, type-checked against this build. Start from it.",
|
|
33
33
|
"shapes": "A prop with a `shape` takes an object (collection \"object\") or an array of objects (collection \"array\") with exactly those fields; `required` fields must be present. In a generic shape (`typeParameters: [\"T\"]`) T is the type of your own data: `key: keyof T & string` means the key must be a field of your row type. `recipes` hold patterns the types alone do not teach.",
|
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
"wrap"
|
|
196
196
|
],
|
|
197
197
|
"tokens": {
|
|
198
|
-
"count":
|
|
198
|
+
"count": 250,
|
|
199
199
|
"groups": {
|
|
200
200
|
"bp": {
|
|
201
201
|
"--bp-sm": "640px",
|
|
@@ -305,6 +305,13 @@
|
|
|
305
305
|
"--color-chart-4": "var(--color-chart-purple)",
|
|
306
306
|
"--color-chart-5": "var(--color-chart-gold)",
|
|
307
307
|
"--color-chart-6": "var(--color-chart-green)",
|
|
308
|
+
"--color-map-bin-0": "color-mix(in srgb, var(--color-chart-2) 25%, var(--color-bg-muted))",
|
|
309
|
+
"--color-map-bin-1": "color-mix(in srgb, var(--color-chart-2) 43.75%, var(--color-bg-muted))",
|
|
310
|
+
"--color-map-bin-2": "color-mix(in srgb, var(--color-chart-2) 62.5%, var(--color-bg-muted))",
|
|
311
|
+
"--color-map-bin-3": "color-mix(in srgb, var(--color-chart-2) 81.25%, var(--color-bg-muted))",
|
|
312
|
+
"--color-map-bin-4": "var(--color-chart-2)",
|
|
313
|
+
"--color-map-neg-0": "color-mix(in srgb, var(--color-chart-1) 85%, var(--color-bg-muted))",
|
|
314
|
+
"--color-map-neg-1": "color-mix(in srgb, var(--color-chart-1) 40%, var(--color-bg-muted))",
|
|
308
315
|
"--color-accent-default": "var(--color-neutral-900)",
|
|
309
316
|
"--color-accent-hover": "var(--color-neutral-800)",
|
|
310
317
|
"--color-accent-active": "var(--color-neutral-700)",
|
|
@@ -470,12 +477,63 @@
|
|
|
470
477
|
"--liquid-shadow-clear": "0 3px 8px -4px rgba(16, 15, 12, 0.16), 0 1px 3px rgba(16, 15, 12, 0.08)",
|
|
471
478
|
"--liquid-glare": "rgba(255, 255, 255, 0.35)"
|
|
472
479
|
}
|
|
480
|
+
},
|
|
481
|
+
"dark": {
|
|
482
|
+
"--color-bg-canvas": "var(--color-neutral-950)",
|
|
483
|
+
"--color-bg-surface": "var(--color-neutral-900)",
|
|
484
|
+
"--color-bg-subtle": "var(--color-neutral-800)",
|
|
485
|
+
"--color-bg-muted": "var(--color-neutral-700)",
|
|
486
|
+
"--color-bg-inverse": "var(--color-neutral-50)",
|
|
487
|
+
"--color-fg-default": "var(--color-neutral-50)",
|
|
488
|
+
"--color-fg-muted": "var(--color-neutral-400)",
|
|
489
|
+
"--color-fg-subtle": "var(--color-neutral-500)",
|
|
490
|
+
"--color-fg-on-accent": "var(--color-neutral-900)",
|
|
491
|
+
"--color-fg-on-inverse": "var(--color-neutral-900)",
|
|
492
|
+
"--color-border-subtle": "var(--color-neutral-800)",
|
|
493
|
+
"--color-border-default": "var(--color-neutral-700)",
|
|
494
|
+
"--color-border-strong": "var(--color-neutral-600)",
|
|
495
|
+
"--color-border-focus": "var(--color-primary-400)",
|
|
496
|
+
"--color-accent-default": "var(--color-neutral-50)",
|
|
497
|
+
"--color-accent-hover": "var(--color-neutral-200)",
|
|
498
|
+
"--color-accent-active": "var(--color-neutral-300)",
|
|
499
|
+
"--color-accent-subtle": "var(--color-neutral-800)",
|
|
500
|
+
"--color-accent-fg": "var(--color-neutral-900)",
|
|
501
|
+
"--color-brand-hover": "var(--color-primary-400)",
|
|
502
|
+
"--color-brand-subtle": "var(--color-primary-950)",
|
|
503
|
+
"--color-brand-fg": "var(--color-primary-400)",
|
|
504
|
+
"--color-success-fg": "var(--color-success-400)",
|
|
505
|
+
"--color-success-bg": "var(--color-success-950)",
|
|
506
|
+
"--color-success-border": "var(--color-success-800)",
|
|
507
|
+
"--color-warning-fg": "var(--color-warning-400)",
|
|
508
|
+
"--color-warning-bg": "var(--color-warning-950)",
|
|
509
|
+
"--color-warning-border": "var(--color-warning-800)",
|
|
510
|
+
"--color-danger-fg": "var(--color-danger-400)",
|
|
511
|
+
"--color-danger-bg": "var(--color-danger-950)",
|
|
512
|
+
"--color-danger-border": "var(--color-danger-800)",
|
|
513
|
+
"--color-info-fg": "var(--color-info-400)",
|
|
514
|
+
"--color-info-bg": "var(--color-info-950)",
|
|
515
|
+
"--color-info-border": "var(--color-info-800)",
|
|
516
|
+
"--glass-bg": "rgba(20, 20, 20, 0.64)",
|
|
517
|
+
"--glass-bg-overlay": "rgba(20, 20, 20, 0.76)",
|
|
518
|
+
"--glass-bg-chrome": "rgba(20, 20, 20, 0.52)",
|
|
519
|
+
"--glass-bg-subtle": "rgba(255, 255, 255, 0.08)",
|
|
520
|
+
"--glass-bg-subtle-hover": "rgba(255, 255, 255, 0.14)",
|
|
521
|
+
"--glass-border": "rgba(255, 255, 255, 0.1)",
|
|
522
|
+
"--glass-border-strong": "rgba(255, 255, 255, 0.16)",
|
|
523
|
+
"--glass-highlight": "inset 0 1px 0 0 rgba(255, 255, 255, 0.08)",
|
|
524
|
+
"--glass-fg-muted": "var(--color-neutral-300)",
|
|
525
|
+
"--liquid-tint-regular": "rgba(20, 20, 20, 0.66)",
|
|
526
|
+
"--liquid-tint-clear": "rgba(20, 20, 20, 0.3)",
|
|
527
|
+
"--liquid-tint-subtle": "rgba(255, 255, 255, 0.08)",
|
|
528
|
+
"--liquid-glare": "rgba(255, 255, 255, 0.14)",
|
|
529
|
+
"--liquid-overlay-tint": "rgba(20, 20, 20, 0.72)",
|
|
530
|
+
"--liquid-panel-tint": "rgba(20, 20, 20, 0.76)"
|
|
473
531
|
}
|
|
474
532
|
},
|
|
475
533
|
"counts": {
|
|
476
|
-
"components":
|
|
477
|
-
"blocks":
|
|
478
|
-
"utilities":
|
|
534
|
+
"components": 153,
|
|
535
|
+
"blocks": 46,
|
|
536
|
+
"utilities": 13
|
|
479
537
|
},
|
|
480
538
|
"components": [
|
|
481
539
|
{
|
|
@@ -5492,13 +5550,13 @@
|
|
|
5492
5550
|
"description": "Returns the item located at the specified index."
|
|
5493
5551
|
},
|
|
5494
5552
|
{
|
|
5495
|
-
"name": "__@iterator@
|
|
5553
|
+
"name": "__@iterator@16860",
|
|
5496
5554
|
"type": "() => ArrayIterator<number>",
|
|
5497
5555
|
"required": true,
|
|
5498
5556
|
"description": "Iterator"
|
|
5499
5557
|
},
|
|
5500
5558
|
{
|
|
5501
|
-
"name": "__@unscopables@
|
|
5559
|
+
"name": "__@unscopables@16890",
|
|
5502
5560
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
5503
5561
|
"required": true,
|
|
5504
5562
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -6088,13 +6146,13 @@
|
|
|
6088
6146
|
"description": "Returns the item located at the specified index."
|
|
6089
6147
|
},
|
|
6090
6148
|
{
|
|
6091
|
-
"name": "__@iterator@
|
|
6149
|
+
"name": "__@iterator@16860",
|
|
6092
6150
|
"type": "() => ArrayIterator<number>",
|
|
6093
6151
|
"required": true,
|
|
6094
6152
|
"description": "Iterator"
|
|
6095
6153
|
},
|
|
6096
6154
|
{
|
|
6097
|
-
"name": "__@unscopables@
|
|
6155
|
+
"name": "__@unscopables@16890",
|
|
6098
6156
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
6099
6157
|
"required": true,
|
|
6100
6158
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -6529,13 +6587,13 @@
|
|
|
6529
6587
|
"description": "Returns the item located at the specified index."
|
|
6530
6588
|
},
|
|
6531
6589
|
{
|
|
6532
|
-
"name": "__@iterator@
|
|
6590
|
+
"name": "__@iterator@16860",
|
|
6533
6591
|
"type": "() => ArrayIterator<number>",
|
|
6534
6592
|
"required": true,
|
|
6535
6593
|
"description": "Iterator"
|
|
6536
6594
|
},
|
|
6537
6595
|
{
|
|
6538
|
-
"name": "__@unscopables@
|
|
6596
|
+
"name": "__@unscopables@16890",
|
|
6539
6597
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
6540
6598
|
"required": true,
|
|
6541
6599
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -6836,13 +6894,13 @@
|
|
|
6836
6894
|
"description": "Returns the item located at the specified index."
|
|
6837
6895
|
},
|
|
6838
6896
|
{
|
|
6839
|
-
"name": "__@iterator@
|
|
6897
|
+
"name": "__@iterator@16860",
|
|
6840
6898
|
"type": "() => ArrayIterator<number>",
|
|
6841
6899
|
"required": true,
|
|
6842
6900
|
"description": "Iterator"
|
|
6843
6901
|
},
|
|
6844
6902
|
{
|
|
6845
|
-
"name": "__@unscopables@
|
|
6903
|
+
"name": "__@unscopables@16890",
|
|
6846
6904
|
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
6847
6905
|
"required": true,
|
|
6848
6906
|
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
@@ -8767,277 +8825,766 @@
|
|
|
8767
8825
|
]
|
|
8768
8826
|
},
|
|
8769
8827
|
{
|
|
8770
|
-
"name": "
|
|
8771
|
-
"kind": "component",
|
|
8772
|
-
"category": "Application",
|
|
8773
|
-
"import": "@sakaniui/react",
|
|
8774
|
-
"summary": "Two divider lines flanking arbitrary centered content. `label` is a convenience shorthand for the common Text case, styled as that same overline automatically.",
|
|
8775
|
-
"props": [
|
|
8776
|
-
{
|
|
8777
|
-
"name": "children",
|
|
8778
|
-
"type": "ReactNode",
|
|
8779
|
-
"required": false,
|
|
8780
|
-
"description": "Full custom content between the two lines (e.g. a brand badge or icon-wrap)."
|
|
8781
|
-
},
|
|
8782
|
-
{
|
|
8783
|
-
"name": "label",
|
|
8784
|
-
"type": "string",
|
|
8785
|
-
"required": false,
|
|
8786
|
-
"description": "Shorthand for the common case -- plain uppercase overline text. Ignored if `children` is set."
|
|
8787
|
-
},
|
|
8788
|
-
{
|
|
8789
|
-
"name": "className",
|
|
8790
|
-
"type": "string",
|
|
8791
|
-
"required": false
|
|
8792
|
-
}
|
|
8793
|
-
],
|
|
8794
|
-
"contract": {
|
|
8795
|
-
"requiredProps": [],
|
|
8796
|
-
"requiresAccessibleName": false
|
|
8797
|
-
},
|
|
8798
|
-
"since": "0.1.0",
|
|
8799
|
-
"example": "import { RichSeparator } from '@sakaniui/react';\n\n<RichSeparator />"
|
|
8800
|
-
},
|
|
8801
|
-
{
|
|
8802
|
-
"name": "RichTextHeading",
|
|
8803
|
-
"kind": "component",
|
|
8804
|
-
"category": "Marketing",
|
|
8805
|
-
"import": "@sakaniui/react",
|
|
8806
|
-
"summary": "A heading for rich-text content; `level` is \"h2\" or \"h3\" and sets the real HTML tag.",
|
|
8807
|
-
"props": [
|
|
8808
|
-
{
|
|
8809
|
-
"name": "level",
|
|
8810
|
-
"type": "\"h2\" | \"h3\"",
|
|
8811
|
-
"required": false,
|
|
8812
|
-
"values": [
|
|
8813
|
-
"h2",
|
|
8814
|
-
"h3"
|
|
8815
|
-
],
|
|
8816
|
-
"default": "h2"
|
|
8817
|
-
},
|
|
8818
|
-
{
|
|
8819
|
-
"name": "className",
|
|
8820
|
-
"type": "string",
|
|
8821
|
-
"required": false
|
|
8822
|
-
}
|
|
8823
|
-
],
|
|
8824
|
-
"contract": {
|
|
8825
|
-
"requiredProps": [],
|
|
8826
|
-
"requiresAccessibleName": false
|
|
8827
|
-
},
|
|
8828
|
-
"since": "0.3.0",
|
|
8829
|
-
"example": "import { RichTextHeading } from '@sakaniui/react';\n\n<RichTextHeading>Label</RichTextHeading>"
|
|
8830
|
-
},
|
|
8831
|
-
{
|
|
8832
|
-
"name": "RichTextParagraph",
|
|
8833
|
-
"kind": "component",
|
|
8834
|
-
"category": "Marketing",
|
|
8835
|
-
"import": "@sakaniui/react",
|
|
8836
|
-
"summary": "A muted body paragraph for rich-text content; it can contain inline links.",
|
|
8837
|
-
"props": [
|
|
8838
|
-
{
|
|
8839
|
-
"name": "className",
|
|
8840
|
-
"type": "string",
|
|
8841
|
-
"required": false
|
|
8842
|
-
}
|
|
8843
|
-
],
|
|
8844
|
-
"contract": {
|
|
8845
|
-
"requiredProps": [],
|
|
8846
|
-
"requiresAccessibleName": false
|
|
8847
|
-
},
|
|
8848
|
-
"since": "0.3.0",
|
|
8849
|
-
"example": "import { RichTextParagraph } from '@sakaniui/react';\n\n<RichTextParagraph>Label</RichTextParagraph>"
|
|
8850
|
-
},
|
|
8851
|
-
{
|
|
8852
|
-
"name": "SectionHeading",
|
|
8853
|
-
"kind": "component",
|
|
8854
|
-
"category": "Marketing",
|
|
8855
|
-
"import": "@sakaniui/react",
|
|
8856
|
-
"summary": "A section heading with an optional eyebrow badge and subtitle; `align` is \"left\" or \"center\" and `titleAs` sets the heading tag.",
|
|
8857
|
-
"props": [
|
|
8858
|
-
{
|
|
8859
|
-
"name": "eyebrow",
|
|
8860
|
-
"type": "string",
|
|
8861
|
-
"required": false,
|
|
8862
|
-
"description": "Small pill above the title, e.g. \"Features\". Omit to hide it."
|
|
8863
|
-
},
|
|
8864
|
-
{
|
|
8865
|
-
"name": "title",
|
|
8866
|
-
"type": "string",
|
|
8867
|
-
"required": true
|
|
8868
|
-
},
|
|
8869
|
-
{
|
|
8870
|
-
"name": "subtitle",
|
|
8871
|
-
"type": "string",
|
|
8872
|
-
"required": false
|
|
8873
|
-
},
|
|
8874
|
-
{
|
|
8875
|
-
"name": "align",
|
|
8876
|
-
"type": "\"left\" | \"center\"",
|
|
8877
|
-
"required": false,
|
|
8878
|
-
"values": [
|
|
8879
|
-
"left",
|
|
8880
|
-
"center"
|
|
8881
|
-
],
|
|
8882
|
-
"default": "center"
|
|
8883
|
-
},
|
|
8884
|
-
{
|
|
8885
|
-
"name": "titleAs",
|
|
8886
|
-
"type": "\"h2\" | \"h3\" | \"h1\" | \"h4\"",
|
|
8887
|
-
"required": false,
|
|
8888
|
-
"values": [
|
|
8889
|
-
"h2",
|
|
8890
|
-
"h3",
|
|
8891
|
-
"h1",
|
|
8892
|
-
"h4"
|
|
8893
|
-
],
|
|
8894
|
-
"default": "h2",
|
|
8895
|
-
"description": "Heading tag for `title`. Defaults to \"h2\"."
|
|
8896
|
-
},
|
|
8897
|
-
{
|
|
8898
|
-
"name": "className",
|
|
8899
|
-
"type": "string",
|
|
8900
|
-
"required": false
|
|
8901
|
-
}
|
|
8902
|
-
],
|
|
8903
|
-
"contract": {
|
|
8904
|
-
"requiredProps": [
|
|
8905
|
-
"title"
|
|
8906
|
-
],
|
|
8907
|
-
"requiresAccessibleName": false
|
|
8908
|
-
},
|
|
8909
|
-
"since": "0.3.0",
|
|
8910
|
-
"example": "import { SectionHeading } from '@sakaniui/react';\n\n<SectionHeading title=\"Title\" />"
|
|
8911
|
-
},
|
|
8912
|
-
{
|
|
8913
|
-
"name": "SegmentedControl",
|
|
8828
|
+
"name": "RegionMap",
|
|
8914
8829
|
"kind": "component",
|
|
8915
8830
|
"category": "Composite",
|
|
8916
8831
|
"import": "@sakaniui/react",
|
|
8917
|
-
"summary": "
|
|
8832
|
+
"summary": "A choropleth: regions (states, countries, any shapes you pass) shaded by a value, with a hover card and a click to zoom into one region.",
|
|
8918
8833
|
"props": [
|
|
8919
8834
|
{
|
|
8920
|
-
"name": "
|
|
8921
|
-
"type": "
|
|
8835
|
+
"name": "regions",
|
|
8836
|
+
"type": "RegionShape[]",
|
|
8922
8837
|
"required": true,
|
|
8838
|
+
"description": "The shapes to draw, e.g. `US_STATES`.",
|
|
8923
8839
|
"shape": {
|
|
8924
|
-
"type": "
|
|
8840
|
+
"type": "RegionShape",
|
|
8925
8841
|
"collection": "array",
|
|
8926
8842
|
"fields": [
|
|
8927
8843
|
{
|
|
8928
|
-
"name": "
|
|
8844
|
+
"name": "id",
|
|
8929
8845
|
"type": "string",
|
|
8930
8846
|
"required": true
|
|
8931
8847
|
},
|
|
8932
8848
|
{
|
|
8933
|
-
"name": "
|
|
8849
|
+
"name": "name",
|
|
8934
8850
|
"type": "string",
|
|
8935
8851
|
"required": true
|
|
8852
|
+
},
|
|
8853
|
+
{
|
|
8854
|
+
"name": "d",
|
|
8855
|
+
"type": "string",
|
|
8856
|
+
"required": true,
|
|
8857
|
+
"description": "SVG path data in the shapes' own coordinate space (see the viewBox that ships with them)."
|
|
8858
|
+
},
|
|
8859
|
+
{
|
|
8860
|
+
"name": "box",
|
|
8861
|
+
"type": "[number, number, number, number]",
|
|
8862
|
+
"required": true,
|
|
8863
|
+
"description": "[x, y, width, height] of the path, used to zoom to it."
|
|
8936
8864
|
}
|
|
8937
8865
|
]
|
|
8938
8866
|
}
|
|
8939
8867
|
},
|
|
8940
8868
|
{
|
|
8941
|
-
"name": "
|
|
8942
|
-
"type": "
|
|
8943
|
-
"required": false
|
|
8944
|
-
},
|
|
8945
|
-
{
|
|
8946
|
-
"name": "defaultValue",
|
|
8947
|
-
"type": "string",
|
|
8948
|
-
"required": false
|
|
8949
|
-
},
|
|
8950
|
-
{
|
|
8951
|
-
"name": "onChange",
|
|
8952
|
-
"type": "((value: string) => void)",
|
|
8953
|
-
"required": false
|
|
8954
|
-
},
|
|
8955
|
-
{
|
|
8956
|
-
"name": "fullWidth",
|
|
8957
|
-
"type": "boolean",
|
|
8958
|
-
"required": false,
|
|
8959
|
-
"description": "Stretch the track to fill its container; segments then share the width equally."
|
|
8960
|
-
},
|
|
8961
|
-
{
|
|
8962
|
-
"name": "className",
|
|
8963
|
-
"type": "string",
|
|
8964
|
-
"required": false
|
|
8965
|
-
}
|
|
8966
|
-
],
|
|
8967
|
-
"contract": {
|
|
8968
|
-
"requiredProps": [
|
|
8969
|
-
"options"
|
|
8970
|
-
],
|
|
8971
|
-
"requiresAccessibleName": false
|
|
8972
|
-
},
|
|
8973
|
-
"since": "0.1.0",
|
|
8974
|
-
"example": "import { SegmentedControl } from '@sakaniui/react';\n\n<SegmentedControl options={[{ value: \"Value\", label: \"Label\" }]} />"
|
|
8975
|
-
},
|
|
8976
|
-
{
|
|
8977
|
-
"name": "Select",
|
|
8978
|
-
"kind": "component",
|
|
8979
|
-
"category": "Forms",
|
|
8980
|
-
"import": "@sakaniui/react",
|
|
8981
|
-
"summary": "Single-select dropdown.",
|
|
8982
|
-
"props": [
|
|
8983
|
-
{
|
|
8984
|
-
"name": "label",
|
|
8985
|
-
"type": "string",
|
|
8986
|
-
"required": false
|
|
8987
|
-
},
|
|
8988
|
-
{
|
|
8989
|
-
"name": "description",
|
|
8990
|
-
"type": "string",
|
|
8991
|
-
"required": false
|
|
8992
|
-
},
|
|
8993
|
-
{
|
|
8994
|
-
"name": "error",
|
|
8995
|
-
"type": "string",
|
|
8996
|
-
"required": false
|
|
8997
|
-
},
|
|
8998
|
-
{
|
|
8999
|
-
"name": "size",
|
|
9000
|
-
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
9001
|
-
"required": false,
|
|
9002
|
-
"values": [
|
|
9003
|
-
"sm",
|
|
9004
|
-
"md",
|
|
9005
|
-
"lg"
|
|
9006
|
-
],
|
|
9007
|
-
"default": "md"
|
|
9008
|
-
},
|
|
9009
|
-
{
|
|
9010
|
-
"name": "placeholder",
|
|
9011
|
-
"type": "string",
|
|
9012
|
-
"required": false,
|
|
9013
|
-
"default": "Select an option"
|
|
9014
|
-
},
|
|
9015
|
-
{
|
|
9016
|
-
"name": "options",
|
|
9017
|
-
"type": "SelectOption[]",
|
|
8869
|
+
"name": "viewBox",
|
|
8870
|
+
"type": "Box",
|
|
9018
8871
|
"required": true,
|
|
8872
|
+
"description": "The coordinate box the shapes live in, e.g. `US_STATES_VIEWBOX`.",
|
|
9019
8873
|
"shape": {
|
|
9020
|
-
"type": "
|
|
9021
|
-
"collection": "
|
|
8874
|
+
"type": "Box",
|
|
8875
|
+
"collection": "object",
|
|
9022
8876
|
"fields": [
|
|
9023
8877
|
{
|
|
9024
|
-
"name": "
|
|
9025
|
-
"type": "
|
|
8878
|
+
"name": "0",
|
|
8879
|
+
"type": "number",
|
|
9026
8880
|
"required": true
|
|
9027
8881
|
},
|
|
9028
8882
|
{
|
|
9029
|
-
"name": "
|
|
9030
|
-
"type": "
|
|
8883
|
+
"name": "1",
|
|
8884
|
+
"type": "number",
|
|
9031
8885
|
"required": true
|
|
9032
8886
|
},
|
|
9033
8887
|
{
|
|
9034
|
-
"name": "
|
|
9035
|
-
"type": "
|
|
9036
|
-
"required":
|
|
9037
|
-
}
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
8888
|
+
"name": "2",
|
|
8889
|
+
"type": "number",
|
|
8890
|
+
"required": true
|
|
8891
|
+
},
|
|
8892
|
+
{
|
|
8893
|
+
"name": "3",
|
|
8894
|
+
"type": "number",
|
|
8895
|
+
"required": true
|
|
8896
|
+
},
|
|
8897
|
+
{
|
|
8898
|
+
"name": "length",
|
|
8899
|
+
"type": "4",
|
|
8900
|
+
"required": true
|
|
8901
|
+
},
|
|
8902
|
+
{
|
|
8903
|
+
"name": "toString",
|
|
8904
|
+
"type": "() => string",
|
|
8905
|
+
"required": true,
|
|
8906
|
+
"description": "Returns a string representation of an array."
|
|
8907
|
+
},
|
|
8908
|
+
{
|
|
8909
|
+
"name": "toLocaleString",
|
|
8910
|
+
"type": "{ (): string; (locales: string | string[], options?: (NumberFormatOptions & DateTimeFormatOptions) | undefined): string; }",
|
|
8911
|
+
"required": true,
|
|
8912
|
+
"description": "Returns a string representation of an array. The elements are converted to string using their toLocaleString methods."
|
|
8913
|
+
},
|
|
8914
|
+
{
|
|
8915
|
+
"name": "pop",
|
|
8916
|
+
"type": "() => number",
|
|
8917
|
+
"required": true,
|
|
8918
|
+
"description": "Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified."
|
|
8919
|
+
},
|
|
8920
|
+
{
|
|
8921
|
+
"name": "push",
|
|
8922
|
+
"type": "(...items: number[]) => number",
|
|
8923
|
+
"required": true,
|
|
8924
|
+
"description": "Appends new elements to the end of an array, and returns the new length of the array."
|
|
8925
|
+
},
|
|
8926
|
+
{
|
|
8927
|
+
"name": "concat",
|
|
8928
|
+
"type": "{ (...items: ConcatArray<number>[]): number[]; (...items: (number | ConcatArray<number>)[]): number[]; }",
|
|
8929
|
+
"required": true,
|
|
8930
|
+
"description": "Combines two or more arrays. This method returns a new array without modifying any existing arrays."
|
|
8931
|
+
},
|
|
8932
|
+
{
|
|
8933
|
+
"name": "join",
|
|
8934
|
+
"type": "(separator?: string | undefined) => string",
|
|
8935
|
+
"required": true,
|
|
8936
|
+
"description": "Adds all the elements of an array into a string, separated by the specified separator string."
|
|
8937
|
+
},
|
|
8938
|
+
{
|
|
8939
|
+
"name": "reverse",
|
|
8940
|
+
"type": "() => number[]",
|
|
8941
|
+
"required": true,
|
|
8942
|
+
"description": "Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array."
|
|
8943
|
+
},
|
|
8944
|
+
{
|
|
8945
|
+
"name": "shift",
|
|
8946
|
+
"type": "() => number",
|
|
8947
|
+
"required": true,
|
|
8948
|
+
"description": "Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified."
|
|
8949
|
+
},
|
|
8950
|
+
{
|
|
8951
|
+
"name": "slice",
|
|
8952
|
+
"type": "(start?: number | undefined, end?: number | undefined) => number[]",
|
|
8953
|
+
"required": true,
|
|
8954
|
+
"description": "Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array."
|
|
8955
|
+
},
|
|
8956
|
+
{
|
|
8957
|
+
"name": "sort",
|
|
8958
|
+
"type": "(compareFn?: ((a: number, b: number) => number) | undefined) => Box",
|
|
8959
|
+
"required": true,
|
|
8960
|
+
"description": "Sorts an array in place. This method mutates the array and returns a reference to the same array."
|
|
8961
|
+
},
|
|
8962
|
+
{
|
|
8963
|
+
"name": "splice",
|
|
8964
|
+
"type": "{ (start: number, deleteCount?: number | undefined): number[]; (start: number, deleteCount: number, ...items: number[]): number[]; }",
|
|
8965
|
+
"required": true,
|
|
8966
|
+
"description": "Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements."
|
|
8967
|
+
},
|
|
8968
|
+
{
|
|
8969
|
+
"name": "unshift",
|
|
8970
|
+
"type": "(...items: number[]) => number",
|
|
8971
|
+
"required": true,
|
|
8972
|
+
"description": "Inserts new elements at the start of an array, and returns the new length of the array."
|
|
8973
|
+
},
|
|
8974
|
+
{
|
|
8975
|
+
"name": "indexOf",
|
|
8976
|
+
"type": "(searchElement: number, fromIndex?: number | undefined) => number",
|
|
8977
|
+
"required": true,
|
|
8978
|
+
"description": "Returns the index of the first occurrence of a value in an array, or -1 if it is not present."
|
|
8979
|
+
},
|
|
8980
|
+
{
|
|
8981
|
+
"name": "lastIndexOf",
|
|
8982
|
+
"type": "(searchElement: number, fromIndex?: number | undefined) => number",
|
|
8983
|
+
"required": true,
|
|
8984
|
+
"description": "Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present."
|
|
8985
|
+
},
|
|
8986
|
+
{
|
|
8987
|
+
"name": "every",
|
|
8988
|
+
"type": "{ <S extends number>(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): this is S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): boolean; }",
|
|
8989
|
+
"required": true,
|
|
8990
|
+
"description": "Determines whether all the members of an array satisfy the specified test."
|
|
8991
|
+
},
|
|
8992
|
+
{
|
|
8993
|
+
"name": "some",
|
|
8994
|
+
"type": "(predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any) => boolean",
|
|
8995
|
+
"required": true,
|
|
8996
|
+
"description": "Determines whether the specified callback function returns true for any element of an array."
|
|
8997
|
+
},
|
|
8998
|
+
{
|
|
8999
|
+
"name": "forEach",
|
|
9000
|
+
"type": "(callbackfn: (value: number, index: number, array: number[]) => void, thisArg?: any) => void",
|
|
9001
|
+
"required": true,
|
|
9002
|
+
"description": "Performs the specified action for each element in an array."
|
|
9003
|
+
},
|
|
9004
|
+
{
|
|
9005
|
+
"name": "map",
|
|
9006
|
+
"type": "<U>(callbackfn: (value: number, index: number, array: number[]) => U, thisArg?: any) => U[]",
|
|
9007
|
+
"required": true,
|
|
9008
|
+
"description": "Calls a defined callback function on each element of an array, and returns an array that contains the results."
|
|
9009
|
+
},
|
|
9010
|
+
{
|
|
9011
|
+
"name": "filter",
|
|
9012
|
+
"type": "{ <S extends number>(predicate: (value: number, index: number, array: number[]) => value is S, thisArg?: any): S[]; (predicate: (value: number, index: number, array: number[]) => unknown, thisArg?: any): number[]; }",
|
|
9013
|
+
"required": true,
|
|
9014
|
+
"description": "Returns the elements of an array that meet the condition specified in a callback function."
|
|
9015
|
+
},
|
|
9016
|
+
{
|
|
9017
|
+
"name": "reduce",
|
|
9018
|
+
"type": "{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }",
|
|
9019
|
+
"required": true,
|
|
9020
|
+
"description": "Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function."
|
|
9021
|
+
},
|
|
9022
|
+
{
|
|
9023
|
+
"name": "reduceRight",
|
|
9024
|
+
"type": "{ (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number): number; (callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: number[]) => number, initialValue: number): number; <U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: number[]) => U, initialValue: U): U; }",
|
|
9025
|
+
"required": true,
|
|
9026
|
+
"description": "Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function."
|
|
9027
|
+
},
|
|
9028
|
+
{
|
|
9029
|
+
"name": "find",
|
|
9030
|
+
"type": "{ <S extends number>(predicate: (value: number, index: number, obj: number[]) => value is S, thisArg?: any): S | undefined; (predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any): number | undefined; }",
|
|
9031
|
+
"required": true,
|
|
9032
|
+
"description": "Returns the value of the first element in the array where predicate is true, and undefined otherwise."
|
|
9033
|
+
},
|
|
9034
|
+
{
|
|
9035
|
+
"name": "findIndex",
|
|
9036
|
+
"type": "(predicate: (value: number, index: number, obj: number[]) => unknown, thisArg?: any) => number",
|
|
9037
|
+
"required": true,
|
|
9038
|
+
"description": "Returns the index of the first element in the array where predicate is true, and -1 otherwise."
|
|
9039
|
+
},
|
|
9040
|
+
{
|
|
9041
|
+
"name": "fill",
|
|
9042
|
+
"type": "(value: number, start?: number | undefined, end?: number | undefined) => Box",
|
|
9043
|
+
"required": true,
|
|
9044
|
+
"description": "Changes all array elements from `start` to `end` index to a static `value` and returns the modified array"
|
|
9045
|
+
},
|
|
9046
|
+
{
|
|
9047
|
+
"name": "copyWithin",
|
|
9048
|
+
"type": "(target: number, start: number, end?: number | undefined) => Box",
|
|
9049
|
+
"required": true,
|
|
9050
|
+
"description": "Returns the this object after copying a section of the array identified by start and end to the same array starting at position target"
|
|
9051
|
+
},
|
|
9052
|
+
{
|
|
9053
|
+
"name": "entries",
|
|
9054
|
+
"type": "() => ArrayIterator<[number, number]>",
|
|
9055
|
+
"required": true,
|
|
9056
|
+
"description": "Returns an iterable of key, value pairs for every entry in the array"
|
|
9057
|
+
},
|
|
9058
|
+
{
|
|
9059
|
+
"name": "keys",
|
|
9060
|
+
"type": "() => ArrayIterator<number>",
|
|
9061
|
+
"required": true,
|
|
9062
|
+
"description": "Returns an iterable of keys in the array"
|
|
9063
|
+
},
|
|
9064
|
+
{
|
|
9065
|
+
"name": "values",
|
|
9066
|
+
"type": "() => ArrayIterator<number>",
|
|
9067
|
+
"required": true,
|
|
9068
|
+
"description": "Returns an iterable of values in the array"
|
|
9069
|
+
},
|
|
9070
|
+
{
|
|
9071
|
+
"name": "includes",
|
|
9072
|
+
"type": "(searchElement: number, fromIndex?: number | undefined) => boolean",
|
|
9073
|
+
"required": true,
|
|
9074
|
+
"description": "Determines whether an array includes a certain element, returning true or false as appropriate."
|
|
9075
|
+
},
|
|
9076
|
+
{
|
|
9077
|
+
"name": "flatMap",
|
|
9078
|
+
"type": "<U, This = undefined>(callback: (this: This, value: number, index: number, array: number[]) => U | readonly U[], thisArg?: This | undefined) => U[]",
|
|
9079
|
+
"required": true,
|
|
9080
|
+
"description": "Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1."
|
|
9081
|
+
},
|
|
9082
|
+
{
|
|
9083
|
+
"name": "flat",
|
|
9084
|
+
"type": "<A, D extends number = 1>(this: A, depth?: D | undefined) => FlatArray<A, D>[]",
|
|
9085
|
+
"required": true,
|
|
9086
|
+
"description": "Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth."
|
|
9087
|
+
},
|
|
9088
|
+
{
|
|
9089
|
+
"name": "at",
|
|
9090
|
+
"type": "(index: number) => number",
|
|
9091
|
+
"required": true,
|
|
9092
|
+
"description": "Returns the item located at the specified index."
|
|
9093
|
+
},
|
|
9094
|
+
{
|
|
9095
|
+
"name": "__@iterator@16860",
|
|
9096
|
+
"type": "() => ArrayIterator<number>",
|
|
9097
|
+
"required": true,
|
|
9098
|
+
"description": "Iterator"
|
|
9099
|
+
},
|
|
9100
|
+
{
|
|
9101
|
+
"name": "__@unscopables@16890",
|
|
9102
|
+
"type": "{ [x: number]: boolean | undefined; length?: boolean | undefined; toString?: boolean | undefined; toLocaleString?: boolean | undefined; pop?: boolean | undefined; push?: boolean | undefined; concat?: boolean | undefined; join?: boolean | undefined; reverse?: boolean | undefined; shift?: boolean | undefined; slice?: boolean | undefined; sort?: boolean | undefined; splice?: boolean | undefined; unshift?: boolean | undefined; indexOf?: boolean | undefined; lastIndexOf?: boolean | undefined; every?: boolean | undefined; some?: boolean | undefined; forEach?: boolean | undefined; map?: boolean | undefined; filter?: boolean | undefined; reduce?: boolean | undefined; reduceRight?: boolean | undefined; find?: boolean | undefined; findIndex?: boolean | undefined; fill?: boolean | undefined; copyWithin?: boolean | undefined; entries?: boolean | undefined; keys?: boolean | undefined; values?: boolean | undefined; includes?: boolean | undefined; flatMap?: boolean | undefined; flat?: boolean | undefined; at?: boolean | undefined; [Symbol.iterator]?: boolean | undefined; readonly [Symbol.unscopables]?: boolean | undefined; }",
|
|
9103
|
+
"required": true,
|
|
9104
|
+
"description": "Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement."
|
|
9105
|
+
}
|
|
9106
|
+
]
|
|
9107
|
+
}
|
|
9108
|
+
},
|
|
9109
|
+
{
|
|
9110
|
+
"name": "values",
|
|
9111
|
+
"type": "Record<string, number | null>",
|
|
9112
|
+
"required": false,
|
|
9113
|
+
"description": "The value for each region, by id. Missing or null draws the neutral tone."
|
|
9114
|
+
},
|
|
9115
|
+
{
|
|
9116
|
+
"name": "scale",
|
|
9117
|
+
"type": "RegionScale",
|
|
9118
|
+
"required": false,
|
|
9119
|
+
"description": "How values map to colours. Left out: no shading.",
|
|
9120
|
+
"shape": {
|
|
9121
|
+
"type": "RegionScale",
|
|
9122
|
+
"collection": "object",
|
|
9123
|
+
"fields": [
|
|
9124
|
+
{
|
|
9125
|
+
"name": "breaks",
|
|
9126
|
+
"type": "number[]",
|
|
9127
|
+
"required": true
|
|
9128
|
+
},
|
|
9129
|
+
{
|
|
9130
|
+
"name": "diverging",
|
|
9131
|
+
"type": "boolean",
|
|
9132
|
+
"required": false,
|
|
9133
|
+
"description": "Colour bins below zero differently (growth, change). Default false: one blue ramp."
|
|
9134
|
+
}
|
|
9135
|
+
]
|
|
9136
|
+
}
|
|
9137
|
+
},
|
|
9138
|
+
{
|
|
9139
|
+
"name": "selected",
|
|
9140
|
+
"type": "string | null",
|
|
9141
|
+
"required": false,
|
|
9142
|
+
"description": "Controlled selection: the id of the zoomed region, or null for the whole map."
|
|
9143
|
+
},
|
|
9144
|
+
{
|
|
9145
|
+
"name": "defaultSelected",
|
|
9146
|
+
"type": "string | null",
|
|
9147
|
+
"required": false,
|
|
9148
|
+
"default": "null",
|
|
9149
|
+
"description": "Uncontrolled initial selection."
|
|
9150
|
+
},
|
|
9151
|
+
{
|
|
9152
|
+
"name": "onSelectedChange",
|
|
9153
|
+
"type": "((id: string | null) => void)",
|
|
9154
|
+
"required": false,
|
|
9155
|
+
"description": "Called when the selection changes (a click, Enter or Space, Escape)."
|
|
9156
|
+
},
|
|
9157
|
+
{
|
|
9158
|
+
"name": "renderTooltip",
|
|
9159
|
+
"type": "((region: RegionShape, value: number | null) => ReactNode)",
|
|
9160
|
+
"required": false,
|
|
9161
|
+
"description": "The hover card for a region. Default: the name and its value through `formatValue`."
|
|
9162
|
+
},
|
|
9163
|
+
{
|
|
9164
|
+
"name": "formatValue",
|
|
9165
|
+
"type": "((value: number) => string)",
|
|
9166
|
+
"required": false,
|
|
9167
|
+
"description": "Formats a value for the default card and the screen-reader label. Default: `String(value)`."
|
|
9168
|
+
},
|
|
9169
|
+
{
|
|
9170
|
+
"name": "onHoverChange",
|
|
9171
|
+
"type": "((id: string | null) => void)",
|
|
9172
|
+
"required": false,
|
|
9173
|
+
"description": "Called with the id of the region under the pointer or keyboard focus, and null when it leaves."
|
|
9174
|
+
},
|
|
9175
|
+
{
|
|
9176
|
+
"name": "hovered",
|
|
9177
|
+
"type": "string | null",
|
|
9178
|
+
"required": false,
|
|
9179
|
+
"description": "Outline a region from outside (a list row, a legend), without a card."
|
|
9180
|
+
},
|
|
9181
|
+
{
|
|
9182
|
+
"name": "dimExcept",
|
|
9183
|
+
"type": "string[] | null",
|
|
9184
|
+
"required": false,
|
|
9185
|
+
"description": "Fade every region whose id is not in this list (the band a legend segment names). Null: none faded."
|
|
9186
|
+
},
|
|
9187
|
+
{
|
|
9188
|
+
"name": "loading",
|
|
9189
|
+
"type": "boolean",
|
|
9190
|
+
"required": false,
|
|
9191
|
+
"description": "Shimmer the map while data loads."
|
|
9192
|
+
},
|
|
9193
|
+
{
|
|
9194
|
+
"name": "aria-label",
|
|
9195
|
+
"type": "string",
|
|
9196
|
+
"required": false,
|
|
9197
|
+
"default": "Map",
|
|
9198
|
+
"description": "Accessible name for the map."
|
|
9199
|
+
},
|
|
9200
|
+
{
|
|
9201
|
+
"name": "className",
|
|
9202
|
+
"type": "string",
|
|
9203
|
+
"required": false
|
|
9204
|
+
},
|
|
9205
|
+
{
|
|
9206
|
+
"name": "style",
|
|
9207
|
+
"type": "CSSProperties",
|
|
9208
|
+
"required": false
|
|
9209
|
+
}
|
|
9210
|
+
],
|
|
9211
|
+
"contract": {
|
|
9212
|
+
"requiredProps": [
|
|
9213
|
+
"regions",
|
|
9214
|
+
"viewBox"
|
|
9215
|
+
],
|
|
9216
|
+
"requiresAccessibleName": false
|
|
9217
|
+
},
|
|
9218
|
+
"since": "0.19.0",
|
|
9219
|
+
"example": "import { RegionMap } from '@sakaniui/react';\n\n<RegionMap regions={[{ id: \"item-1\", name: \"Name\", d: \"D\", box: [1, 1, 1, 1] }]} viewBox={[1, 1, 1, 1]} />"
|
|
9220
|
+
},
|
|
9221
|
+
{
|
|
9222
|
+
"name": "RegionMapLegend",
|
|
9223
|
+
"kind": "component",
|
|
9224
|
+
"category": "Composite",
|
|
9225
|
+
"import": "@sakaniui/react",
|
|
9226
|
+
"summary": "The colour key for a RegionMap: one segment per bin, with the break values under the joins between segments. Pass the same `scale` the map uses.",
|
|
9227
|
+
"props": [
|
|
9228
|
+
{
|
|
9229
|
+
"name": "scale",
|
|
9230
|
+
"type": "RegionScale",
|
|
9231
|
+
"required": true,
|
|
9232
|
+
"shape": {
|
|
9233
|
+
"type": "RegionScale",
|
|
9234
|
+
"collection": "object",
|
|
9235
|
+
"fields": [
|
|
9236
|
+
{
|
|
9237
|
+
"name": "breaks",
|
|
9238
|
+
"type": "number[]",
|
|
9239
|
+
"required": true
|
|
9240
|
+
},
|
|
9241
|
+
{
|
|
9242
|
+
"name": "diverging",
|
|
9243
|
+
"type": "boolean",
|
|
9244
|
+
"required": false,
|
|
9245
|
+
"description": "Colour bins below zero differently (growth, change). Default false: one blue ramp."
|
|
9246
|
+
}
|
|
9247
|
+
]
|
|
9248
|
+
}
|
|
9249
|
+
},
|
|
9250
|
+
{
|
|
9251
|
+
"name": "formatValue",
|
|
9252
|
+
"type": "((value: number) => string)",
|
|
9253
|
+
"required": false,
|
|
9254
|
+
"description": "Formats the break labels. Default: `String(value)`."
|
|
9255
|
+
},
|
|
9256
|
+
{
|
|
9257
|
+
"name": "caption",
|
|
9258
|
+
"type": "ReactNode",
|
|
9259
|
+
"required": false,
|
|
9260
|
+
"description": "An optional line under the key."
|
|
9261
|
+
},
|
|
9262
|
+
{
|
|
9263
|
+
"name": "activeBin",
|
|
9264
|
+
"type": "number | null",
|
|
9265
|
+
"required": false,
|
|
9266
|
+
"default": "null",
|
|
9267
|
+
"description": "The bin that is lit; every other segment steps back. Null: all equal."
|
|
9268
|
+
},
|
|
9269
|
+
{
|
|
9270
|
+
"name": "lockedBin",
|
|
9271
|
+
"type": "number | null",
|
|
9272
|
+
"required": false,
|
|
9273
|
+
"default": "null",
|
|
9274
|
+
"description": "The bin that is locked on (shown pressed)."
|
|
9275
|
+
},
|
|
9276
|
+
{
|
|
9277
|
+
"name": "markBin",
|
|
9278
|
+
"type": "number | null",
|
|
9279
|
+
"required": false,
|
|
9280
|
+
"default": "null",
|
|
9281
|
+
"description": "A bin to outline without dimming the others, e.g. the bin of the hovered region."
|
|
9282
|
+
},
|
|
9283
|
+
{
|
|
9284
|
+
"name": "onBinHover",
|
|
9285
|
+
"type": "((bin: number | null) => void)",
|
|
9286
|
+
"required": false,
|
|
9287
|
+
"description": "Pointer or keyboard focus on a segment (i), and leaving it (null). Makes the segments buttons."
|
|
9288
|
+
},
|
|
9289
|
+
{
|
|
9290
|
+
"name": "onBinClick",
|
|
9291
|
+
"type": "((bin: number) => void)",
|
|
9292
|
+
"required": false,
|
|
9293
|
+
"description": "A click or Enter on a segment."
|
|
9294
|
+
},
|
|
9295
|
+
{
|
|
9296
|
+
"name": "noData",
|
|
9297
|
+
"type": "boolean",
|
|
9298
|
+
"required": false,
|
|
9299
|
+
"description": "Show a \"No data\" swatch for regions without a value."
|
|
9300
|
+
},
|
|
9301
|
+
{
|
|
9302
|
+
"name": "className",
|
|
9303
|
+
"type": "string",
|
|
9304
|
+
"required": false
|
|
9305
|
+
}
|
|
9306
|
+
],
|
|
9307
|
+
"contract": {
|
|
9308
|
+
"requiredProps": [
|
|
9309
|
+
"scale"
|
|
9310
|
+
],
|
|
9311
|
+
"requiresAccessibleName": false
|
|
9312
|
+
},
|
|
9313
|
+
"since": "0.19.0",
|
|
9314
|
+
"example": "import { RegionMapLegend } from '@sakaniui/react';\n\n<RegionMapLegend scale={{ breaks: [1] }} />"
|
|
9315
|
+
},
|
|
9316
|
+
{
|
|
9317
|
+
"name": "RichSeparator",
|
|
9318
|
+
"kind": "component",
|
|
9319
|
+
"category": "Application",
|
|
9320
|
+
"import": "@sakaniui/react",
|
|
9321
|
+
"summary": "Two divider lines flanking arbitrary centered content. `label` is a convenience shorthand for the common Text case, styled as that same overline automatically.",
|
|
9322
|
+
"props": [
|
|
9323
|
+
{
|
|
9324
|
+
"name": "children",
|
|
9325
|
+
"type": "ReactNode",
|
|
9326
|
+
"required": false,
|
|
9327
|
+
"description": "Full custom content between the two lines (e.g. a brand badge or icon-wrap)."
|
|
9328
|
+
},
|
|
9329
|
+
{
|
|
9330
|
+
"name": "label",
|
|
9331
|
+
"type": "string",
|
|
9332
|
+
"required": false,
|
|
9333
|
+
"description": "Shorthand for the common case -- plain uppercase overline text. Ignored if `children` is set."
|
|
9334
|
+
},
|
|
9335
|
+
{
|
|
9336
|
+
"name": "className",
|
|
9337
|
+
"type": "string",
|
|
9338
|
+
"required": false
|
|
9339
|
+
}
|
|
9340
|
+
],
|
|
9341
|
+
"contract": {
|
|
9342
|
+
"requiredProps": [],
|
|
9343
|
+
"requiresAccessibleName": false
|
|
9344
|
+
},
|
|
9345
|
+
"since": "0.1.0",
|
|
9346
|
+
"example": "import { RichSeparator } from '@sakaniui/react';\n\n<RichSeparator />"
|
|
9347
|
+
},
|
|
9348
|
+
{
|
|
9349
|
+
"name": "RichTextHeading",
|
|
9350
|
+
"kind": "component",
|
|
9351
|
+
"category": "Marketing",
|
|
9352
|
+
"import": "@sakaniui/react",
|
|
9353
|
+
"summary": "A heading for rich-text content; `level` is \"h2\" or \"h3\" and sets the real HTML tag.",
|
|
9354
|
+
"props": [
|
|
9355
|
+
{
|
|
9356
|
+
"name": "level",
|
|
9357
|
+
"type": "\"h2\" | \"h3\"",
|
|
9358
|
+
"required": false,
|
|
9359
|
+
"values": [
|
|
9360
|
+
"h2",
|
|
9361
|
+
"h3"
|
|
9362
|
+
],
|
|
9363
|
+
"default": "h2"
|
|
9364
|
+
},
|
|
9365
|
+
{
|
|
9366
|
+
"name": "className",
|
|
9367
|
+
"type": "string",
|
|
9368
|
+
"required": false
|
|
9369
|
+
}
|
|
9370
|
+
],
|
|
9371
|
+
"contract": {
|
|
9372
|
+
"requiredProps": [],
|
|
9373
|
+
"requiresAccessibleName": false
|
|
9374
|
+
},
|
|
9375
|
+
"since": "0.3.0",
|
|
9376
|
+
"example": "import { RichTextHeading } from '@sakaniui/react';\n\n<RichTextHeading>Label</RichTextHeading>"
|
|
9377
|
+
},
|
|
9378
|
+
{
|
|
9379
|
+
"name": "RichTextParagraph",
|
|
9380
|
+
"kind": "component",
|
|
9381
|
+
"category": "Marketing",
|
|
9382
|
+
"import": "@sakaniui/react",
|
|
9383
|
+
"summary": "A muted body paragraph for rich-text content; it can contain inline links.",
|
|
9384
|
+
"props": [
|
|
9385
|
+
{
|
|
9386
|
+
"name": "className",
|
|
9387
|
+
"type": "string",
|
|
9388
|
+
"required": false
|
|
9389
|
+
}
|
|
9390
|
+
],
|
|
9391
|
+
"contract": {
|
|
9392
|
+
"requiredProps": [],
|
|
9393
|
+
"requiresAccessibleName": false
|
|
9394
|
+
},
|
|
9395
|
+
"since": "0.3.0",
|
|
9396
|
+
"example": "import { RichTextParagraph } from '@sakaniui/react';\n\n<RichTextParagraph>Label</RichTextParagraph>"
|
|
9397
|
+
},
|
|
9398
|
+
{
|
|
9399
|
+
"name": "SectionHeading",
|
|
9400
|
+
"kind": "component",
|
|
9401
|
+
"category": "Marketing",
|
|
9402
|
+
"import": "@sakaniui/react",
|
|
9403
|
+
"summary": "A section heading with an optional eyebrow badge and subtitle; `align` is \"left\" or \"center\" and `titleAs` sets the heading tag.",
|
|
9404
|
+
"props": [
|
|
9405
|
+
{
|
|
9406
|
+
"name": "eyebrow",
|
|
9407
|
+
"type": "string",
|
|
9408
|
+
"required": false,
|
|
9409
|
+
"description": "Small pill above the title, e.g. \"Features\". Omit to hide it."
|
|
9410
|
+
},
|
|
9411
|
+
{
|
|
9412
|
+
"name": "title",
|
|
9413
|
+
"type": "string",
|
|
9414
|
+
"required": true
|
|
9415
|
+
},
|
|
9416
|
+
{
|
|
9417
|
+
"name": "subtitle",
|
|
9418
|
+
"type": "string",
|
|
9419
|
+
"required": false
|
|
9420
|
+
},
|
|
9421
|
+
{
|
|
9422
|
+
"name": "align",
|
|
9423
|
+
"type": "\"left\" | \"center\"",
|
|
9424
|
+
"required": false,
|
|
9425
|
+
"values": [
|
|
9426
|
+
"left",
|
|
9427
|
+
"center"
|
|
9428
|
+
],
|
|
9429
|
+
"default": "center"
|
|
9430
|
+
},
|
|
9431
|
+
{
|
|
9432
|
+
"name": "titleAs",
|
|
9433
|
+
"type": "\"h2\" | \"h3\" | \"h1\" | \"h4\"",
|
|
9434
|
+
"required": false,
|
|
9435
|
+
"values": [
|
|
9436
|
+
"h2",
|
|
9437
|
+
"h3",
|
|
9438
|
+
"h1",
|
|
9439
|
+
"h4"
|
|
9440
|
+
],
|
|
9441
|
+
"default": "h2",
|
|
9442
|
+
"description": "Heading tag for `title`. Defaults to \"h2\"."
|
|
9443
|
+
},
|
|
9444
|
+
{
|
|
9445
|
+
"name": "className",
|
|
9446
|
+
"type": "string",
|
|
9447
|
+
"required": false
|
|
9448
|
+
}
|
|
9449
|
+
],
|
|
9450
|
+
"contract": {
|
|
9451
|
+
"requiredProps": [
|
|
9452
|
+
"title"
|
|
9453
|
+
],
|
|
9454
|
+
"requiresAccessibleName": false
|
|
9455
|
+
},
|
|
9456
|
+
"since": "0.3.0",
|
|
9457
|
+
"example": "import { SectionHeading } from '@sakaniui/react';\n\n<SectionHeading title=\"Title\" />"
|
|
9458
|
+
},
|
|
9459
|
+
{
|
|
9460
|
+
"name": "SegmentedControl",
|
|
9461
|
+
"kind": "component",
|
|
9462
|
+
"category": "Composite",
|
|
9463
|
+
"import": "@sakaniui/react",
|
|
9464
|
+
"summary": "An iOS-style toggle group (segmented control).",
|
|
9465
|
+
"props": [
|
|
9466
|
+
{
|
|
9467
|
+
"name": "options",
|
|
9468
|
+
"type": "SegmentedOption[]",
|
|
9469
|
+
"required": true,
|
|
9470
|
+
"shape": {
|
|
9471
|
+
"type": "SegmentedOption",
|
|
9472
|
+
"collection": "array",
|
|
9473
|
+
"fields": [
|
|
9474
|
+
{
|
|
9475
|
+
"name": "value",
|
|
9476
|
+
"type": "string",
|
|
9477
|
+
"required": true
|
|
9478
|
+
},
|
|
9479
|
+
{
|
|
9480
|
+
"name": "label",
|
|
9481
|
+
"type": "string",
|
|
9482
|
+
"required": true
|
|
9483
|
+
}
|
|
9484
|
+
]
|
|
9485
|
+
}
|
|
9486
|
+
},
|
|
9487
|
+
{
|
|
9488
|
+
"name": "value",
|
|
9489
|
+
"type": "string",
|
|
9490
|
+
"required": false
|
|
9491
|
+
},
|
|
9492
|
+
{
|
|
9493
|
+
"name": "defaultValue",
|
|
9494
|
+
"type": "string",
|
|
9495
|
+
"required": false
|
|
9496
|
+
},
|
|
9497
|
+
{
|
|
9498
|
+
"name": "onChange",
|
|
9499
|
+
"type": "((value: string) => void)",
|
|
9500
|
+
"required": false
|
|
9501
|
+
},
|
|
9502
|
+
{
|
|
9503
|
+
"name": "fullWidth",
|
|
9504
|
+
"type": "boolean",
|
|
9505
|
+
"required": false,
|
|
9506
|
+
"description": "Stretch the track to fill its container; segments then share the width equally."
|
|
9507
|
+
},
|
|
9508
|
+
{
|
|
9509
|
+
"name": "className",
|
|
9510
|
+
"type": "string",
|
|
9511
|
+
"required": false
|
|
9512
|
+
}
|
|
9513
|
+
],
|
|
9514
|
+
"contract": {
|
|
9515
|
+
"requiredProps": [
|
|
9516
|
+
"options"
|
|
9517
|
+
],
|
|
9518
|
+
"requiresAccessibleName": false
|
|
9519
|
+
},
|
|
9520
|
+
"since": "0.1.0",
|
|
9521
|
+
"example": "import { SegmentedControl } from '@sakaniui/react';\n\n<SegmentedControl options={[{ value: \"Value\", label: \"Label\" }]} />"
|
|
9522
|
+
},
|
|
9523
|
+
{
|
|
9524
|
+
"name": "Select",
|
|
9525
|
+
"kind": "component",
|
|
9526
|
+
"category": "Forms",
|
|
9527
|
+
"import": "@sakaniui/react",
|
|
9528
|
+
"summary": "Single-select dropdown.",
|
|
9529
|
+
"props": [
|
|
9530
|
+
{
|
|
9531
|
+
"name": "label",
|
|
9532
|
+
"type": "string",
|
|
9533
|
+
"required": false
|
|
9534
|
+
},
|
|
9535
|
+
{
|
|
9536
|
+
"name": "description",
|
|
9537
|
+
"type": "string",
|
|
9538
|
+
"required": false
|
|
9539
|
+
},
|
|
9540
|
+
{
|
|
9541
|
+
"name": "error",
|
|
9542
|
+
"type": "string",
|
|
9543
|
+
"required": false
|
|
9544
|
+
},
|
|
9545
|
+
{
|
|
9546
|
+
"name": "size",
|
|
9547
|
+
"type": "\"sm\" | \"md\" | \"lg\"",
|
|
9548
|
+
"required": false,
|
|
9549
|
+
"values": [
|
|
9550
|
+
"sm",
|
|
9551
|
+
"md",
|
|
9552
|
+
"lg"
|
|
9553
|
+
],
|
|
9554
|
+
"default": "md"
|
|
9555
|
+
},
|
|
9556
|
+
{
|
|
9557
|
+
"name": "placeholder",
|
|
9558
|
+
"type": "string",
|
|
9559
|
+
"required": false,
|
|
9560
|
+
"default": "Select an option"
|
|
9561
|
+
},
|
|
9562
|
+
{
|
|
9563
|
+
"name": "options",
|
|
9564
|
+
"type": "SelectOption[]",
|
|
9565
|
+
"required": true,
|
|
9566
|
+
"shape": {
|
|
9567
|
+
"type": "SelectOption",
|
|
9568
|
+
"collection": "array",
|
|
9569
|
+
"fields": [
|
|
9570
|
+
{
|
|
9571
|
+
"name": "label",
|
|
9572
|
+
"type": "string",
|
|
9573
|
+
"required": true
|
|
9574
|
+
},
|
|
9575
|
+
{
|
|
9576
|
+
"name": "value",
|
|
9577
|
+
"type": "string",
|
|
9578
|
+
"required": true
|
|
9579
|
+
},
|
|
9580
|
+
{
|
|
9581
|
+
"name": "disabled",
|
|
9582
|
+
"type": "boolean",
|
|
9583
|
+
"required": false
|
|
9584
|
+
}
|
|
9585
|
+
]
|
|
9586
|
+
}
|
|
9587
|
+
},
|
|
9041
9588
|
{
|
|
9042
9589
|
"name": "value",
|
|
9043
9590
|
"type": "string",
|
|
@@ -14694,6 +15241,227 @@
|
|
|
14694
15241
|
"settings page"
|
|
14695
15242
|
]
|
|
14696
15243
|
},
|
|
15244
|
+
{
|
|
15245
|
+
"name": "RegionMapBlock",
|
|
15246
|
+
"kind": "block",
|
|
15247
|
+
"category": "Blocks/Application",
|
|
15248
|
+
"import": "@sakaniui/react/blocks",
|
|
15249
|
+
"summary": "Region Map block (Application): a composition example. Copy it into your project and edit it.",
|
|
15250
|
+
"props": [
|
|
15251
|
+
{
|
|
15252
|
+
"name": "rows",
|
|
15253
|
+
"type": "RegionMapRow[]",
|
|
15254
|
+
"required": false,
|
|
15255
|
+
"description": "The figures for each region.",
|
|
15256
|
+
"shape": {
|
|
15257
|
+
"type": "RegionMapRow",
|
|
15258
|
+
"collection": "array",
|
|
15259
|
+
"fields": [
|
|
15260
|
+
{
|
|
15261
|
+
"name": "id",
|
|
15262
|
+
"type": "string",
|
|
15263
|
+
"required": true
|
|
15264
|
+
},
|
|
15265
|
+
{
|
|
15266
|
+
"name": "name",
|
|
15267
|
+
"type": "string",
|
|
15268
|
+
"required": true
|
|
15269
|
+
},
|
|
15270
|
+
{
|
|
15271
|
+
"name": "values",
|
|
15272
|
+
"type": "Record<string, number>",
|
|
15273
|
+
"required": true
|
|
15274
|
+
}
|
|
15275
|
+
]
|
|
15276
|
+
}
|
|
15277
|
+
},
|
|
15278
|
+
{
|
|
15279
|
+
"name": "metrics",
|
|
15280
|
+
"type": "RegionMapMetric[]",
|
|
15281
|
+
"required": false,
|
|
15282
|
+
"description": "What the map can be shaded by, in tab order.",
|
|
15283
|
+
"shape": {
|
|
15284
|
+
"type": "RegionMapMetric",
|
|
15285
|
+
"collection": "array",
|
|
15286
|
+
"fields": [
|
|
15287
|
+
{
|
|
15288
|
+
"name": "id",
|
|
15289
|
+
"type": "string",
|
|
15290
|
+
"required": true
|
|
15291
|
+
},
|
|
15292
|
+
{
|
|
15293
|
+
"name": "label",
|
|
15294
|
+
"type": "string",
|
|
15295
|
+
"required": true,
|
|
15296
|
+
"description": "The tab label."
|
|
15297
|
+
},
|
|
15298
|
+
{
|
|
15299
|
+
"name": "unit",
|
|
15300
|
+
"type": "string",
|
|
15301
|
+
"required": true,
|
|
15302
|
+
"description": "What the headline figure means, e.g. \"Annual recurring revenue\"."
|
|
15303
|
+
},
|
|
15304
|
+
{
|
|
15305
|
+
"name": "format",
|
|
15306
|
+
"type": "(value: number) => string",
|
|
15307
|
+
"required": true,
|
|
15308
|
+
"description": "Formats a value for the headline, the hover card and the legend."
|
|
15309
|
+
},
|
|
15310
|
+
{
|
|
15311
|
+
"name": "scale",
|
|
15312
|
+
"type": "RegionScale",
|
|
15313
|
+
"required": true,
|
|
15314
|
+
"description": "The legend breaks."
|
|
15315
|
+
},
|
|
15316
|
+
{
|
|
15317
|
+
"name": "compare",
|
|
15318
|
+
"type": "((value: number, average: number) => string)",
|
|
15319
|
+
"required": false,
|
|
15320
|
+
"description": "Words for how a figure compares with the average region (\"+16.6 pts\"). Default: points for a mean metric, a multiple for a sum."
|
|
15321
|
+
},
|
|
15322
|
+
{
|
|
15323
|
+
"name": "aggregate",
|
|
15324
|
+
"type": "\"sum\" | \"mean\"",
|
|
15325
|
+
"required": false,
|
|
15326
|
+
"description": "How the headline combines every region when none is selected. Default \"sum\"."
|
|
15327
|
+
}
|
|
15328
|
+
]
|
|
15329
|
+
}
|
|
15330
|
+
},
|
|
15331
|
+
{
|
|
15332
|
+
"name": "regions",
|
|
15333
|
+
"type": "RegionShape[]",
|
|
15334
|
+
"required": false,
|
|
15335
|
+
"description": "The shapes and the box they live in. Default: the 50 US states.",
|
|
15336
|
+
"shape": {
|
|
15337
|
+
"type": "RegionShape",
|
|
15338
|
+
"collection": "array",
|
|
15339
|
+
"fields": [
|
|
15340
|
+
{
|
|
15341
|
+
"name": "id",
|
|
15342
|
+
"type": "string",
|
|
15343
|
+
"required": true
|
|
15344
|
+
},
|
|
15345
|
+
{
|
|
15346
|
+
"name": "name",
|
|
15347
|
+
"type": "string",
|
|
15348
|
+
"required": true
|
|
15349
|
+
},
|
|
15350
|
+
{
|
|
15351
|
+
"name": "d",
|
|
15352
|
+
"type": "string",
|
|
15353
|
+
"required": true,
|
|
15354
|
+
"description": "SVG path data in the shapes' own coordinate space (see the viewBox that ships with them)."
|
|
15355
|
+
},
|
|
15356
|
+
{
|
|
15357
|
+
"name": "box",
|
|
15358
|
+
"type": "[number, number, number, number]",
|
|
15359
|
+
"required": true,
|
|
15360
|
+
"description": "[x, y, width, height] of the path, used to zoom to it."
|
|
15361
|
+
}
|
|
15362
|
+
]
|
|
15363
|
+
}
|
|
15364
|
+
},
|
|
15365
|
+
{
|
|
15366
|
+
"name": "viewBox",
|
|
15367
|
+
"type": "[number, number, number, number]",
|
|
15368
|
+
"required": false,
|
|
15369
|
+
"default": "[0, 0, 975, 610]"
|
|
15370
|
+
},
|
|
15371
|
+
{
|
|
15372
|
+
"name": "regionNoun",
|
|
15373
|
+
"type": "string",
|
|
15374
|
+
"required": false,
|
|
15375
|
+
"default": "state",
|
|
15376
|
+
"description": "What a region is called in the buttons and the search (\"state\", \"country\")."
|
|
15377
|
+
},
|
|
15378
|
+
{
|
|
15379
|
+
"name": "regionNounPlural",
|
|
15380
|
+
"type": "string",
|
|
15381
|
+
"required": false,
|
|
15382
|
+
"description": "The word for the whole set (\"All states\", \"of 51 states\"). Default: `${regionNoun}s`."
|
|
15383
|
+
},
|
|
15384
|
+
{
|
|
15385
|
+
"name": "allLabel",
|
|
15386
|
+
"type": "string",
|
|
15387
|
+
"required": false,
|
|
15388
|
+
"default": "United States",
|
|
15389
|
+
"description": "The name shown above the headline figure when nothing is zoomed."
|
|
15390
|
+
},
|
|
15391
|
+
{
|
|
15392
|
+
"name": "title",
|
|
15393
|
+
"type": "string",
|
|
15394
|
+
"required": false,
|
|
15395
|
+
"default": "Revenue by state"
|
|
15396
|
+
},
|
|
15397
|
+
{
|
|
15398
|
+
"name": "description",
|
|
15399
|
+
"type": "string",
|
|
15400
|
+
"required": false,
|
|
15401
|
+
"default": "Twelve months to August 31, 2026"
|
|
15402
|
+
},
|
|
15403
|
+
{
|
|
15404
|
+
"name": "state",
|
|
15405
|
+
"type": "\"default\" | \"empty\" | \"loading\"",
|
|
15406
|
+
"required": false,
|
|
15407
|
+
"values": [
|
|
15408
|
+
"default",
|
|
15409
|
+
"empty",
|
|
15410
|
+
"loading"
|
|
15411
|
+
],
|
|
15412
|
+
"default": "default",
|
|
15413
|
+
"description": "\"default\", \"loading\" (skeletons) or \"empty\" (no figures yet)."
|
|
15414
|
+
},
|
|
15415
|
+
{
|
|
15416
|
+
"name": "defaultMetric",
|
|
15417
|
+
"type": "string",
|
|
15418
|
+
"required": false,
|
|
15419
|
+
"description": "The metric shown first (an id from `metrics`)."
|
|
15420
|
+
},
|
|
15421
|
+
{
|
|
15422
|
+
"name": "selectedId",
|
|
15423
|
+
"type": "string | null",
|
|
15424
|
+
"required": false,
|
|
15425
|
+
"description": "The zoomed region's id, or null for the whole map (controlled)."
|
|
15426
|
+
},
|
|
15427
|
+
{
|
|
15428
|
+
"name": "defaultSelectedId",
|
|
15429
|
+
"type": "string | null",
|
|
15430
|
+
"required": false,
|
|
15431
|
+
"default": "null",
|
|
15432
|
+
"description": "The region zoomed first (uncontrolled)."
|
|
15433
|
+
},
|
|
15434
|
+
{
|
|
15435
|
+
"name": "onSelectedChange",
|
|
15436
|
+
"type": "((id: string | null) => void)",
|
|
15437
|
+
"required": false
|
|
15438
|
+
},
|
|
15439
|
+
{
|
|
15440
|
+
"name": "animate",
|
|
15441
|
+
"type": "boolean",
|
|
15442
|
+
"required": false,
|
|
15443
|
+
"default": true,
|
|
15444
|
+
"description": "Play the load animation: each bar grows from the left while its figure counts up from zero. Default true."
|
|
15445
|
+
},
|
|
15446
|
+
{
|
|
15447
|
+
"name": "renderDetail",
|
|
15448
|
+
"type": "((row: RegionMapRow, ctx: { metric: RegionMapMetric; rank: number; total: number; back: () => void; }) => ReactNode)",
|
|
15449
|
+
"required": false,
|
|
15450
|
+
"description": "Replaces the selected region's panel."
|
|
15451
|
+
},
|
|
15452
|
+
{
|
|
15453
|
+
"name": "className",
|
|
15454
|
+
"type": "string",
|
|
15455
|
+
"required": false
|
|
15456
|
+
}
|
|
15457
|
+
],
|
|
15458
|
+
"contract": {
|
|
15459
|
+
"requiredProps": [],
|
|
15460
|
+
"requiresAccessibleName": false
|
|
15461
|
+
},
|
|
15462
|
+
"since": "0.19.0",
|
|
15463
|
+
"example": "import { RegionMapBlock } from '@sakaniui/react/blocks';\n\n<RegionMapBlock />"
|
|
15464
|
+
},
|
|
14697
15465
|
{
|
|
14698
15466
|
"name": "ResetPasswordBlock",
|
|
14699
15467
|
"kind": "block",
|
|
@@ -15198,6 +15966,24 @@
|
|
|
15198
15966
|
}
|
|
15199
15967
|
],
|
|
15200
15968
|
"utilities": [
|
|
15969
|
+
{
|
|
15970
|
+
"name": "autoBreaks",
|
|
15971
|
+
"kind": "helper",
|
|
15972
|
+
"import": "@sakaniui/react",
|
|
15973
|
+
"since": "0.19.0"
|
|
15974
|
+
},
|
|
15975
|
+
{
|
|
15976
|
+
"name": "binColor",
|
|
15977
|
+
"kind": "helper",
|
|
15978
|
+
"import": "@sakaniui/react",
|
|
15979
|
+
"since": "0.19.0"
|
|
15980
|
+
},
|
|
15981
|
+
{
|
|
15982
|
+
"name": "binIndex",
|
|
15983
|
+
"kind": "helper",
|
|
15984
|
+
"import": "@sakaniui/react",
|
|
15985
|
+
"since": "0.19.0"
|
|
15986
|
+
},
|
|
15201
15987
|
{
|
|
15202
15988
|
"name": "DEFAULT_CHECKOUT_STEPS",
|
|
15203
15989
|
"kind": "constant",
|