@sebgroup/green-core 2.20.0-rc.20251215154321804 → 2.20.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.
@@ -27414,107 +27414,23 @@
27414
27414
  },
27415
27415
  {
27416
27416
  "kind": "javascript-module",
27417
- "path": "src/components/radio/index.ts",
27418
- "declarations": [],
27419
- "exports": [
27420
- {
27421
- "kind": "js",
27422
- "name": "*",
27423
- "declaration": {
27424
- "name": "*",
27425
- "module": "src/components/radio/radio"
27426
- }
27427
- },
27428
- {
27429
- "kind": "js",
27430
- "name": "*",
27431
- "declaration": {
27432
- "name": "*",
27433
- "module": "src/components/radio/radio-group/radio-group"
27434
- }
27435
- }
27436
- ]
27437
- },
27438
- {
27439
- "kind": "javascript-module",
27440
- "path": "src/components/radio/radio.component.ts",
27417
+ "path": "src/components/popover/backdrop.component.ts",
27441
27418
  "declarations": [
27442
27419
  {
27443
27420
  "kind": "class",
27444
27421
  "description": "",
27445
- "name": "GdsRadio",
27422
+ "name": "GdsBackdrop",
27446
27423
  "members": [
27447
27424
  {
27448
27425
  "kind": "field",
27449
- "name": "label",
27450
- "type": {
27451
- "text": "string"
27452
- },
27453
- "default": "''",
27454
- "description": "The label displayed next to the radio button.",
27455
- "attribute": "label"
27456
- },
27457
- {
27458
- "kind": "field",
27459
- "name": "supportingText",
27460
- "type": {
27461
- "text": "string"
27462
- },
27463
- "default": "''",
27464
- "description": "The supporting text displayed below the label.\nThis text provides additional context or information to the user.",
27465
- "attribute": "supporting-text"
27466
- },
27467
- {
27468
- "kind": "field",
27469
- "name": "value",
27470
- "type": {
27471
- "text": "string"
27472
- },
27473
- "default": "''",
27474
- "description": "The value of the radio button.",
27475
- "attribute": "value"
27476
- },
27477
- {
27478
- "kind": "field",
27479
- "name": "checked",
27480
- "type": {
27481
- "text": "boolean"
27482
- },
27483
- "default": "false",
27484
- "description": "Whether the radio button is checked or not.",
27485
- "attribute": "checked",
27486
- "reflects": true
27487
- },
27488
- {
27489
- "kind": "field",
27490
- "name": "disabled",
27426
+ "name": "show",
27491
27427
  "type": {
27492
27428
  "text": "boolean"
27493
27429
  },
27494
27430
  "default": "false",
27495
- "description": "Whether the radio button is disabled or not.",
27496
- "attribute": "disabled",
27431
+ "attribute": "show",
27497
27432
  "reflects": true
27498
27433
  },
27499
- {
27500
- "kind": "field",
27501
- "name": "invalid",
27502
- "type": {
27503
- "text": "boolean"
27504
- },
27505
- "default": "false",
27506
- "description": "Whether the radio button is invalid or not.",
27507
- "attribute": "invalid"
27508
- },
27509
- {
27510
- "kind": "field",
27511
- "name": "errorMessage",
27512
- "type": {
27513
- "text": "string | undefined"
27514
- },
27515
- "description": "The accessible error message text for the radio button.\n\nThis text is not visually rendered, but will be announced by\nscreen readers when the radio button is in an invalid state.",
27516
- "attribute": "errorMessage"
27517
- },
27518
27434
  {
27519
27435
  "kind": "method",
27520
27436
  "name": "define",
@@ -27645,11 +27561,36 @@
27645
27561
  }
27646
27562
  }
27647
27563
  ],
27648
- "events": [
27564
+ "attributes": [
27649
27565
  {
27650
- "description": "Dispatched when the radio button is checked.",
27651
- "name": "input"
27566
+ "name": "show",
27567
+ "type": {
27568
+ "text": "boolean"
27569
+ },
27570
+ "default": "false",
27571
+ "fieldName": "show"
27652
27572
  },
27573
+ {
27574
+ "name": "gds-element",
27575
+ "type": {
27576
+ "text": "string | undefined"
27577
+ },
27578
+ "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
27579
+ "readonly": true,
27580
+ "fieldName": "gdsElementName",
27581
+ "inheritedFrom": {
27582
+ "name": "GdsElement",
27583
+ "module": "src/gds-element.ts"
27584
+ }
27585
+ }
27586
+ ],
27587
+ "superclass": {
27588
+ "name": "GdsElement",
27589
+ "module": "/src/gds-element"
27590
+ },
27591
+ "tagName": "gds-backdrop",
27592
+ "customElement": true,
27593
+ "events": [
27653
27594
  {
27654
27595
  "name": "gds-element-disconnected",
27655
27596
  "type": {
@@ -27680,502 +27621,236 @@
27680
27621
  "module": "src/gds-element.ts"
27681
27622
  }
27682
27623
  }
27683
- ],
27684
- "attributes": [
27624
+ ]
27625
+ }
27626
+ ],
27627
+ "exports": [
27628
+ {
27629
+ "kind": "js",
27630
+ "name": "GdsBackdrop",
27631
+ "declaration": {
27632
+ "name": "GdsBackdrop",
27633
+ "module": "src/components/popover/backdrop.component.ts"
27634
+ }
27635
+ }
27636
+ ]
27637
+ },
27638
+ {
27639
+ "kind": "javascript-module",
27640
+ "path": "src/components/popover/backdrop.ts",
27641
+ "declarations": [],
27642
+ "exports": [
27643
+ {
27644
+ "kind": "js",
27645
+ "name": "GdsBackdrop",
27646
+ "declaration": {
27647
+ "name": "GdsBackdrop",
27648
+ "module": "src/components/popover/backdrop.ts"
27649
+ }
27650
+ }
27651
+ ]
27652
+ },
27653
+ {
27654
+ "kind": "javascript-module",
27655
+ "path": "src/components/popover/index.ts",
27656
+ "declarations": [],
27657
+ "exports": [
27658
+ {
27659
+ "kind": "js",
27660
+ "name": "*",
27661
+ "declaration": {
27662
+ "name": "*",
27663
+ "module": "src/components/popover/popover"
27664
+ }
27665
+ },
27666
+ {
27667
+ "kind": "js",
27668
+ "name": "*",
27669
+ "declaration": {
27670
+ "name": "*",
27671
+ "module": "src/components/popover/backdrop"
27672
+ }
27673
+ }
27674
+ ]
27675
+ },
27676
+ {
27677
+ "kind": "javascript-module",
27678
+ "path": "src/components/popover/popover.component.ts",
27679
+ "declarations": [
27680
+ {
27681
+ "kind": "function",
27682
+ "name": "applyTriggerAriaAttributes",
27683
+ "parameters": [
27685
27684
  {
27686
- "name": "label",
27685
+ "name": "trigger",
27687
27686
  "type": {
27688
- "text": "string"
27689
- },
27690
- "default": "''",
27691
- "description": "The label displayed next to the radio button.",
27692
- "fieldName": "label"
27687
+ "text": "HTMLElement"
27688
+ }
27693
27689
  },
27694
27690
  {
27695
- "name": "supporting-text",
27691
+ "name": "open",
27696
27692
  "type": {
27697
- "text": "string"
27698
- },
27699
- "default": "''",
27700
- "description": "The supporting text displayed below the label.\nThis text provides additional context or information to the user.",
27701
- "fieldName": "supportingText"
27693
+ "text": "boolean"
27694
+ }
27702
27695
  },
27703
27696
  {
27704
- "name": "value",
27697
+ "name": "popupRole",
27705
27698
  "type": {
27706
27699
  "text": "string"
27707
- },
27708
- "default": "''",
27709
- "description": "The value of the radio button.",
27710
- "fieldName": "value"
27700
+ }
27701
+ }
27702
+ ],
27703
+ "description": "Apply the necessary ARIA attributes to a popover trigger element. Use this to apply correct\nattributes in advance if you render `<gds-popover>` conditionally, since the popover component\nonly applies these attributes when it initializes."
27704
+ },
27705
+ {
27706
+ "kind": "class",
27707
+ "description": "",
27708
+ "name": "GdsPopover",
27709
+ "slots": [
27710
+ {
27711
+ "description": "Content of the popover",
27712
+ "name": ""
27711
27713
  },
27712
27714
  {
27713
- "name": "checked",
27715
+ "description": "Trigger element for the popover. If this slot is occupied, the popover will listen to keydown and click events on the trigger and automtaiclly open when clicked or when the trigger is focused and `ArrowDown` is pressed.",
27716
+ "name": "trigger"
27717
+ }
27718
+ ],
27719
+ "members": [
27720
+ {
27721
+ "kind": "field",
27722
+ "name": "DefaultMiddleware",
27714
27723
  "type": {
27715
- "text": "boolean"
27724
+ "text": "Middleware[]"
27716
27725
  },
27717
- "default": "false",
27718
- "description": "Whether the radio button is checked or not.",
27719
- "fieldName": "checked"
27726
+ "static": true,
27727
+ "default": "[ offset(8), shift({ crossAxis: true, padding: 8, }), ]",
27728
+ "description": "The default set of middleware for Floating UI positioning used by GdsPopover."
27720
27729
  },
27721
27730
  {
27722
- "name": "disabled",
27731
+ "kind": "field",
27732
+ "name": "open",
27723
27733
  "type": {
27724
27734
  "text": "boolean"
27725
27735
  },
27726
27736
  "default": "false",
27727
- "description": "Whether the radio button is disabled or not.",
27728
- "fieldName": "disabled"
27737
+ "description": "Whether the popover is open.",
27738
+ "attribute": "open",
27739
+ "reflects": true
27729
27740
  },
27730
27741
  {
27731
- "name": "invalid",
27742
+ "kind": "field",
27743
+ "name": "popupRole",
27732
27744
  "type": {
27733
- "text": "boolean"
27745
+ "text": "'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'"
27734
27746
  },
27735
- "default": "false",
27736
- "description": "Whether the radio button is invalid or not.",
27737
- "fieldName": "invalid"
27738
- },
27739
- {
27740
- "name": "errorMessage",
27741
- "type": {
27742
- "text": "string | undefined"
27743
- },
27744
- "description": "The accessible error message text for the radio button.\n\nThis text is not visually rendered, but will be announced by\nscreen readers when the radio button is in an invalid state.",
27745
- "fieldName": "errorMessage"
27747
+ "default": "'dialog'",
27748
+ "description": "This is used to indicate the semantic role of the popover. This will set the `aria-haspopup` attribute on the trigger element.\nRead here for more information: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup",
27749
+ "attribute": "popup-role"
27746
27750
  },
27747
- {
27748
- "name": "gds-element",
27749
- "type": {
27750
- "text": "string | undefined"
27751
- },
27752
- "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
27753
- "readonly": true,
27754
- "fieldName": "gdsElementName",
27755
- "inheritedFrom": {
27756
- "name": "GdsElement",
27757
- "module": "src/gds-element.ts"
27758
- }
27759
- }
27760
- ],
27761
- "superclass": {
27762
- "name": "GdsElement",
27763
- "module": "/src/gds-element"
27764
- },
27765
- "tagName": "gds-radio",
27766
- "customElement": true
27767
- }
27768
- ],
27769
- "exports": [
27770
- {
27771
- "kind": "js",
27772
- "name": "GdsRadio",
27773
- "declaration": {
27774
- "name": "GdsRadio",
27775
- "module": "src/components/radio/radio.component.ts"
27776
- }
27777
- }
27778
- ]
27779
- },
27780
- {
27781
- "kind": "javascript-module",
27782
- "path": "src/components/radio/radio.stories.ts",
27783
- "declarations": [
27784
- {
27785
- "kind": "variable",
27786
- "name": "meta",
27787
- "type": {
27788
- "text": "Meta"
27789
- },
27790
- "default": "{ title: 'Components/Radio', component: 'gds-radio-group', subcomponents: { GdsRadio: 'gds-radio' }, tags: ['autodocs'], argTypes: { ...argTablePropsFor('gds-radio-group'), }, }",
27791
- "description": "A radio button is a form element that allows users to select one of the predefined set of choices.<br/>\nThey are grouped using a radio group component which manages selection, keyboard navigation, and validation.\n\nGroups support vertical and horizontal layouts, and can be sized to fit different space requirements."
27792
- },
27793
- {
27794
- "kind": "variable",
27795
- "name": "RadioButton",
27796
- "type": {
27797
- "text": "Story"
27798
- },
27799
- "default": "{ ...DefaultParams, name: 'Radio', args: { label: 'Pick an option', supportingText: 'Label support text.', innerHTML: ` <gds-radio label=\"Radio Option 1\" supporting-text=\"Supporting text\" value=\"1\"></gds-radio> <gds-radio label=\"Radio Option 2\" supporting-text=\"Supporting text\" value=\"2\"></gds-radio> <gds-radio label=\"Radio Option 3\" supporting-text=\"Supporting text\" value=\"3\"></gds-radio>`, }, }",
27800
- "description": "Radio buttons allow users to select a single option from a list of two or more mutually exclusive options.<br />\nEach radio button must have both a label and a value.\n\nUsage:\n\n```html\n<gds-radio-group label=\"Select an option\">\n <gds-radio label=\"Option 1\" value=\"1\"></gds-radio>\n <gds-radio label=\"Option 2\" value=\"2\"></gds-radio>\n</gds-radio-group>\n```\n\nInteractive example with supporting texts:"
27801
- },
27802
- {
27803
- "kind": "variable",
27804
- "name": "Validation",
27805
- "type": {
27806
- "text": "Story"
27807
- },
27808
- "default": "{ ...DefaultParams, name: 'Validation', render: () => html` <form method=\"dialog\"> <gds-flex flex-direction=\"column\" align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" show-extended-supporting-text .validator=${{ validate: (el: GdsRadioGroup) => { if (!el.value) return [ { ...el.validity, valid: false, customError: true }, 'This is required', ] }, }} > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> <gds-button type=\"submit\">Submit</gds-button> </gds-flex> </form> `, }",
27809
- "description": "Radio groups support validation using Green Core's [form validation API](/docs/components-form-validation-documentation--docs).\n\nThe error message appears below the radio group, and can be set either trough a validator, or explicctly using the using the `error-message` attribute.\n\nIf you click on 'submit' first on the example below it will validate the radio group and show the error message."
27810
- },
27811
- {
27812
- "kind": "variable",
27813
- "name": "DosAndDonts",
27814
- "type": {
27815
- "text": "Story"
27816
- },
27817
- "default": "{ ...DefaultParams, name: \"Do's and don'ts\", render: () => html` <gds-flex gap=\"xl\"> <gds-flex gap=\"l\" flex-direction=\"column\" flex=\"1\"> <gds-card align-items=\"center\" flex-direction=\"row\" gap=\"2xs\" padding=\"s\" variant=\"positive\" > <gds-icon-circle-check></gds-icon-circle-check> <gds-text tag=\"small\">Do provide both Label and Value</gds-text> </gds-card> <gds-card align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text\"> <span slot=\"extended-supporting-text\"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span> <gds-radio label=\"Radio Label\" value=\"1\"></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\"></gds-radio> </gds-radio-group> </gds-card> </gds-flex> <gds-flex gap=\"l\" flex-direction=\"column\" flex=\"1\"> <gds-card align-items=\"center\" flex-direction=\"row\" gap=\"2xs\" padding=\"s\" variant=\"negative\" > <gds-icon-cross-small></gds-icon-cross-small> <gds-text tag=\"small\">Never exclude the label</gds-text> </gds-card> <form method=\"dialog\"> <gds-card align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text\"> <span slot=\"extended-supporting-text\"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span> <gds-radio value=\"1\"></gds-radio> <gds-radio value=\"2\"></gds-radio> </gds-radio-group> </gds-card> </form> </gds-flex> <gds-flex gap=\"l\" flex-direction=\"column\" flex=\"1\"> <gds-card align-items=\"center\" flex-direction=\"row\" gap=\"2xs\" padding=\"s\" variant=\"negative\" > <gds-icon-cross-small></gds-icon-cross-small> <gds-text tag=\"small\">Never exclude the value </gds-text> </gds-card> <form method=\"dialog\"> <gds-card align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text\"> <span slot=\"extended-supporting-text\"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span> <gds-radio label=\"Radio Label\"></gds-radio> <gds-radio label=\"Radio Label\"></gds-radio> </gds-radio-group> </gds-card> </form> </gds-flex> </gds-flex> `, }"
27818
- },
27819
- {
27820
- "kind": "variable",
27821
- "name": "Disabled",
27822
- "type": {
27823
- "text": "Story"
27824
- },
27825
- "default": "{ ...DefaultParams, name: 'Disabled', render: () => html` <div class=\"radio-group\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" show-extended-supporting-text value=\"4\" > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" disabled supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" disabled supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </div> `, }",
27826
- "description": "Disabled radio buttons cannot be interacted with and appear visually muted.\n\nIn general, this state should never be used. Instead, aim to explain to the user why the choice is wrong in an error message and make sure they understand how to correct it."
27827
- },
27828
- {
27829
- "kind": "variable",
27830
- "name": "Size",
27831
- "type": {
27832
- "text": "Story"
27833
- },
27834
- "default": "{ ...DefaultParams, name: 'Size', render: () => html` <div class=\"radio-group\"> <gds-flex gap=\"xl\" margin=\"0 auto\"> <gds-flex gap=\"s\" flex-direction=\"column\" flex=\"1\"> <gds-text tag=\"small\">Size: Large(default)</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> <gds-flex gap=\"s\" flex-direction=\"column\" flex=\"1\"> <gds-text tag=\"small\">Size: small</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" size=\"small\" > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> </gds-flex> </div> `, }",
27835
- "description": "Radio buttons support two sizes:\n- Large (default): Standard size for most use cases\n- Small: Compact size for space-constrained layouts\n\nThe size can be set on the radio group and applies to all radio buttons within."
27836
- },
27837
- {
27838
- "kind": "variable",
27839
- "name": "Direction",
27840
- "type": {
27841
- "text": "Story"
27842
- },
27843
- "default": "{ ...DefaultParams, name: 'Direction', render: () => html` <div class=\"radio-group\"> <gds-flex gap=\"xl\" margin=\"0 auto\"> <gds-flex gap=\"s\" flex-direction=\"column\"> <gds-text tag=\"small\">Column (default)</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" show-extended-supporting-text > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"3\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"4\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> <gds-flex gap=\"s\" flex=\"1\" flex-direction=\"column\"> <gds-text tag=\"small\">Row</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" size=\"small\" direction=\"row\" show-extended-supporting-text > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"3\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"4\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"5\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"6\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> </gds-flex> </div> `, }",
27844
- "description": "Radio buttons can be arranged in two directions:\n- Column (default): Vertical stacking for clear separation\n- Row: Horizontal alignment for compact layouts that will break to new line when not enough space is available\n\nChoose the direction based on available space and number of options."
27845
- },
27846
- {
27847
- "kind": "variable",
27848
- "name": "GroupLabel",
27849
- "type": {
27850
- "text": "Story"
27851
- },
27852
- "default": "{ ...DefaultParams, name: 'Radio group label', render: () => html` <div class=\"radio-group\"> <gds-radio-group> <gds-radio label=\"Radio Label\" value=\"1\"></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\"></gds-radio> </gds-radio-group> </div> `, }",
27853
- "description": "While radio groups can be created without a label, it's recommended to always provide one for clarity and accessibility.\nThe label helps users understand what the options are for.\n\nIn certain cases when space is limited, the group label can be omitted."
27854
- }
27855
- ],
27856
- "exports": [
27857
- {
27858
- "kind": "js",
27859
- "name": "default",
27860
- "declaration": {
27861
- "name": "meta",
27862
- "module": "src/components/radio/radio.stories.ts"
27863
- }
27864
- },
27865
- {
27866
- "kind": "js",
27867
- "name": "RadioButton",
27868
- "declaration": {
27869
- "name": "RadioButton",
27870
- "module": "src/components/radio/radio.stories.ts"
27871
- }
27872
- },
27873
- {
27874
- "kind": "js",
27875
- "name": "Validation",
27876
- "declaration": {
27877
- "name": "Validation",
27878
- "module": "src/components/radio/radio.stories.ts"
27879
- }
27880
- },
27881
- {
27882
- "kind": "js",
27883
- "name": "DosAndDonts",
27884
- "declaration": {
27885
- "name": "DosAndDonts",
27886
- "module": "src/components/radio/radio.stories.ts"
27887
- }
27888
- },
27889
- {
27890
- "kind": "js",
27891
- "name": "Disabled",
27892
- "declaration": {
27893
- "name": "Disabled",
27894
- "module": "src/components/radio/radio.stories.ts"
27895
- }
27896
- },
27897
- {
27898
- "kind": "js",
27899
- "name": "Size",
27900
- "declaration": {
27901
- "name": "Size",
27902
- "module": "src/components/radio/radio.stories.ts"
27903
- }
27904
- },
27905
- {
27906
- "kind": "js",
27907
- "name": "Direction",
27908
- "declaration": {
27909
- "name": "Direction",
27910
- "module": "src/components/radio/radio.stories.ts"
27911
- }
27912
- },
27913
- {
27914
- "kind": "js",
27915
- "name": "GroupLabel",
27916
- "declaration": {
27917
- "name": "GroupLabel",
27918
- "module": "src/components/radio/radio.stories.ts"
27919
- }
27920
- }
27921
- ]
27922
- },
27923
- {
27924
- "kind": "javascript-module",
27925
- "path": "src/components/radio/radio.styles.ts",
27926
- "declarations": [
27927
- {
27928
- "kind": "variable",
27929
- "name": "style",
27930
- "default": "css` :host { cursor: pointer; } :host([disabled]) { color: var(--gds-sys-color-content-disabled-01); cursor: default; } :host(:focus) { outline: none; } `"
27931
- }
27932
- ],
27933
- "exports": [
27934
- {
27935
- "kind": "js",
27936
- "name": "default",
27937
- "declaration": {
27938
- "name": "style",
27939
- "module": "src/components/radio/radio.styles.ts"
27940
- }
27941
- }
27942
- ]
27943
- },
27944
- {
27945
- "kind": "javascript-module",
27946
- "path": "src/components/radio/radio.ts",
27947
- "declarations": [],
27948
- "exports": [
27949
- {
27950
- "kind": "js",
27951
- "name": "GdsRadio",
27952
- "declaration": {
27953
- "name": "GdsRadio",
27954
- "module": "src/components/radio/radio.ts"
27955
- }
27956
- }
27957
- ]
27958
- },
27959
- {
27960
- "kind": "javascript-module",
27961
- "path": "src/components/rich-text/index.ts",
27962
- "declarations": [],
27963
- "exports": [
27964
- {
27965
- "kind": "js",
27966
- "name": "*",
27967
- "declaration": {
27968
- "name": "*",
27969
- "module": "src/components/rich-text/rich-text"
27970
- }
27971
- }
27972
- ]
27973
- },
27974
- {
27975
- "kind": "javascript-module",
27976
- "path": "src/components/rich-text/rich-text.component.ts",
27977
- "declarations": [
27978
- {
27979
- "kind": "class",
27980
- "description": "`gds-rich-text` can be used to wrap generic HTML content and apply typography styles.\n\nThe wrapped content will render inside the shadowRoot of the `gds-rich-text` element, thereby applying the\ndefault typography styles and standard element styles defined in the Green Design System.",
27981
- "name": "GdsRichText",
27982
- "members": [
27983
27751
  {
27984
27752
  "kind": "field",
27985
- "name": "captureMode",
27753
+ "name": "triggerRef",
27986
27754
  "type": {
27987
- "text": "'clone' | 'move'"
27988
- },
27989
- "default": "'clone'",
27990
- "description": "Capture mode for the content.\n\n- `clone` (default): Clones the content to the shadowRoot.\\\n This is the default and most compatible behaviour, since it leaves the original DOM untouched.\n the downside is that events added through `addEventListener` will not be retained in the cloned DOM.\n\n- `move`: Moves the content to the inner shadowRoot.\\\n This mode moves the full original sub-tree into the shadowRoot, leaving everything, including event\n listeners, intact.\n This mode is less compatible with some libraries that rely on the original DOM structure, for example React",
27991
- "attribute": "captureMode"
27992
- },
27993
- {
27994
- "kind": "method",
27995
- "name": "querySelectorAll",
27996
- "return": {
27997
- "type": {
27998
- "text": "NodeList"
27999
- }
28000
- },
28001
- "parameters": [
28002
- {
28003
- "name": "selector",
28004
- "type": {
28005
- "text": "string"
28006
- }
28007
- }
28008
- ],
28009
- "description": "Forwards the selector to the corresponding function on the inner shadowRoot."
28010
- },
28011
- {
28012
- "kind": "method",
28013
- "name": "querySelector",
28014
- "return": {
28015
- "type": {
28016
- "text": "Element | null"
28017
- }
27755
+ "text": "Promise<HTMLElement> | undefined"
28018
27756
  },
28019
- "parameters": [
28020
- {
28021
- "name": "selector",
28022
- "type": {
28023
- "text": "string"
28024
- }
28025
- }
28026
- ],
28027
- "description": "Forwards the selector to the corresponding function on the inner shadowRoot."
27757
+ "description": "Optional way to assign a trigger element for the popover. When using Lit, this can take a value from a `@queryAsync` decorator in order to set the trigger element programatically."
28028
27758
  },
28029
27759
  {
28030
27760
  "kind": "field",
28031
- "name": "innerHTML",
27761
+ "name": "anchorRef",
28032
27762
  "type": {
28033
- "text": "string"
27763
+ "text": "Promise<HTMLElement> | undefined"
28034
27764
  },
28035
- "description": "Forwards innerHTML from the inner shadowRoot."
27765
+ "description": "Optional way to assign an anchor element for the popover. When using Lit, this can take a value from a `@queryAsync` decorator in order to set the anchor element programatically."
28036
27766
  },
28037
27767
  {
28038
27768
  "kind": "field",
28039
- "name": "'align-self'",
27769
+ "name": "label",
28040
27770
  "type": {
28041
27771
  "text": "string | undefined"
28042
27772
  },
28043
- "description": "Style Expression Property that controls the `align-self` property.\nSupports all valid CSS `align-self` values.",
28044
- "category": "Declarative layout / Style expression properties",
28045
- "inheritedFrom": {
28046
- "name": "withLayoutChildProps",
28047
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28048
- }
27773
+ "default": "undefined",
27774
+ "description": "Optional trigger element for the popover.",
27775
+ "attribute": "label"
28049
27776
  },
28050
27777
  {
28051
27778
  "kind": "field",
28052
- "name": "'justify-self'",
27779
+ "name": "placement",
28053
27780
  "type": {
28054
- "text": "string | undefined"
27781
+ "text": "Placement"
28055
27782
  },
28056
- "description": "Style Expression Property that controls the `justify-self` property.\nSupports all valid CSS `justify-self` values.",
28057
- "category": "Declarative layout / Style expression properties",
28058
- "inheritedFrom": {
28059
- "name": "withLayoutChildProps",
28060
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28061
- }
27783
+ "default": "'bottom-start'",
27784
+ "description": "The placement of the popover relative to the trigger.\nAccepts any of the placements supported by Floating UI.",
27785
+ "attribute": "placement"
28062
27786
  },
28063
27787
  {
28064
27788
  "kind": "field",
28065
- "name": "'place-self'",
27789
+ "name": "disableMobileStyles",
28066
27790
  "type": {
28067
- "text": "string | undefined"
27791
+ "text": "boolean"
28068
27792
  },
28069
- "description": "Style Expression Property that controls the `place-self` property.\nSupports all valid CSS `place-self` values.",
28070
- "category": "Declarative layout / Style expression properties",
28071
- "inheritedFrom": {
28072
- "name": "withLayoutChildProps",
28073
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28074
- }
27793
+ "default": "false",
27794
+ "description": "Whether to use a modal dialog in mobile viewport.",
27795
+ "attribute": "disableMobileStyles"
28075
27796
  },
28076
27797
  {
28077
27798
  "kind": "field",
28078
- "name": "'grid-column'",
27799
+ "name": "autofocus",
28079
27800
  "type": {
28080
- "text": "string | undefined"
27801
+ "text": "boolean"
28081
27802
  },
28082
- "description": "Style Expression Property that controls the `grid-column` property.\nSupports all valid CSS grid-column values.\nDocumentation: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column",
28083
- "category": "Declarative layout / Style expression properties",
28084
- "inheritedFrom": {
28085
- "name": "withLayoutChildProps",
28086
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28087
- }
27803
+ "default": "false",
27804
+ "description": "Whether the popover should autofocus the first slotted child when opened.",
27805
+ "attribute": "autofocus"
28088
27806
  },
28089
27807
  {
28090
27808
  "kind": "field",
28091
- "name": "'grid-row'",
28092
- "type": {
28093
- "text": "string | undefined"
28094
- },
28095
- "description": "Style Expression Property that controls the `grid-row` property.\nSupports all valid CSS `grid-row` values.",
28096
- "category": "Declarative layout / Style expression properties",
28097
- "inheritedFrom": {
28098
- "name": "withLayoutChildProps",
28099
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28100
- }
27809
+ "name": "calcMinWidth",
27810
+ "description": "A callback that returns the minimum width of the popover.\nBy default, the popover minWidth will be as wide as the trigger element."
28101
27811
  },
28102
27812
  {
28103
27813
  "kind": "field",
28104
- "name": "'grid-area'",
28105
- "type": {
28106
- "text": "string | undefined"
28107
- },
28108
- "description": "Style Expression Property that controls the `grid-area` property.\nSupports all valid CSS `grid-area` values.",
28109
- "category": "Declarative layout / Style expression properties",
28110
- "inheritedFrom": {
28111
- "name": "withLayoutChildProps",
28112
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28113
- }
27814
+ "name": "calcMaxWidth",
27815
+ "description": "A callback that returns the maximum width of the popover.\nBy default, the popover maxWidth will be set to `auto` and will grow as needed."
28114
27816
  },
28115
27817
  {
28116
27818
  "kind": "field",
28117
- "name": "flex",
28118
- "type": {
28119
- "text": "string | undefined"
28120
- },
28121
- "description": "Style Expression Property that controls the `flex` property.\nSupports all valid CSS `flex` values.",
28122
- "category": "Declarative layout / Style expression properties",
28123
- "inheritedFrom": {
28124
- "name": "withLayoutChildProps",
28125
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28126
- }
27819
+ "name": "calcMinHeight",
27820
+ "description": "A callback that returns the minimum height of the popover.\nBy default, the popover minHeight will be set to `auto`"
28127
27821
  },
28128
27822
  {
28129
27823
  "kind": "field",
28130
- "name": "order",
28131
- "type": {
28132
- "text": "string | undefined"
28133
- },
28134
- "description": "Style Expression Property that controls the `order` property.\nSupports all valid CSS `order` values.",
28135
- "category": "Declarative layout / Style expression properties",
28136
- "inheritedFrom": {
28137
- "name": "withLayoutChildProps",
28138
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28139
- }
27824
+ "name": "calcMaxHeight",
27825
+ "description": "A callback that returns the maximum height of the popover.\nBy default, the popover maxHeight will be set to a hard coded pixel value (check source code)."
28140
27826
  },
28141
27827
  {
28142
27828
  "kind": "field",
28143
- "name": "margin",
27829
+ "name": "nonmodal",
28144
27830
  "type": {
28145
- "text": "string | undefined"
27831
+ "text": "boolean"
28146
27832
  },
28147
- "description": "Style Expression Property that controls the `margin` property.\nOnly accepts space tokens.",
28148
- "category": "Declarative layout / Style expression properties",
28149
- "inheritedFrom": {
28150
- "name": "withMarginProps",
28151
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28152
- }
27833
+ "default": "false",
27834
+ "description": "Whether the popover is nonmodal. When true, the popover will not trap focus and other elements\non the page will still be interactable while the popover is open.",
27835
+ "attribute": "nonmodal",
27836
+ "reflects": true
28153
27837
  },
28154
27838
  {
28155
27839
  "kind": "field",
28156
- "name": "'margin-inline'",
27840
+ "name": "backdrop",
28157
27841
  "type": {
28158
27842
  "text": "string | undefined"
28159
27843
  },
28160
- "description": "Style Expression Property that controls the `margin-inline` property.\nOnly accepts space tokens.",
28161
- "category": "Declarative layout / Style expression properties",
28162
- "inheritedFrom": {
28163
- "name": "withMarginProps",
28164
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28165
- }
27844
+ "description": "When this is set to `true`, the `:backdrop` pseudo-element will be visible if the popover is\nin modal mode. When not in modal mode (using the `nonmodal` attribute), this can instead be\nset to a selector matching a `<gds-backdrop>` element, in wich case the popover will take\ncontrol of that backdrop.\n\nExample:\n```html\n<gds-popover backdrop=\".my-backdrop\">\n <gds-button slot=\"trigger\">Open</gds-button>\n <p>Popover content</p>\n</gds-popover>\n<gds-backdrop class=\"my-backdrop\"></gds-backdrop>\n```",
27845
+ "attribute": "backdrop"
28166
27846
  },
28167
27847
  {
28168
27848
  "kind": "field",
28169
- "name": "'margin-block'",
27849
+ "name": "floatingUIMiddleware",
28170
27850
  "type": {
28171
- "text": "string | undefined"
27851
+ "text": "Middleware[]"
28172
27852
  },
28173
- "description": "Style Expression Property that controls the `margin-block` property.\nOnly accepts space tokens.",
28174
- "category": "Declarative layout / Style expression properties",
28175
- "inheritedFrom": {
28176
- "name": "withMarginProps",
28177
- "module": "src/utils/mixins/declarative-layout-mixins.ts"
28178
- }
27853
+ "description": "An array of middleware for the Floating UI positioning algorithm. Here you can pass in an array\nof middleware to customize positioning to your needs. This array is passed directly to Floting UI,\nso you can just follow the documentation here: https://floating-ui.com/docs/middleware\n\nThis property does not have a corresponding attribute, so it can only be set in JavaScript.\n\nDefaults to `[offset(8), flip()]`"
28179
27854
  },
28180
27855
  {
28181
27856
  "kind": "method",
@@ -28307,60 +27982,33 @@
28307
27982
  }
28308
27983
  }
28309
27984
  ],
28310
- "attributes": [
27985
+ "events": [
28311
27986
  {
28312
- "name": "captureMode",
28313
- "type": {
28314
- "text": "'clone' | 'move'"
28315
- },
28316
- "default": "'clone'",
28317
- "description": "Capture mode for the content.\n\n- `clone` (default): Clones the content to the shadowRoot.\\\n This is the default and most compatible behaviour, since it leaves the original DOM untouched.\n the downside is that events added through `addEventListener` will not be retained in the cloned DOM.\n\n- `move`: Moves the content to the inner shadowRoot.\\\n This mode moves the full original sub-tree into the shadowRoot, leaving everything, including event\n listeners, intact.\n This mode is less compatible with some libraries that rely on the original DOM structure, for example React",
28318
- "fieldName": "captureMode"
27987
+ "description": "Fired when the popover is opened or closed. Can be cancelled to prevent the popover from opening or closing. The `detail` object contains the `open` boolean to indicate the result of the state change, and the `reason` string which can be one of `show`, `close`, or `cancel`.",
27988
+ "name": "gds-ui-state"
28319
27989
  },
28320
27990
  {
28321
- "name": "gds-element",
27991
+ "name": "gds-element-disconnected",
28322
27992
  "type": {
28323
- "text": "string | undefined"
27993
+ "text": "CustomEvent"
28324
27994
  },
28325
- "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
28326
- "readonly": true,
28327
- "fieldName": "gdsElementName",
27995
+ "description": "When the element is disconnected from the DOM",
28328
27996
  "inheritedFrom": {
28329
27997
  "name": "GdsElement",
28330
27998
  "module": "src/gds-element.ts"
28331
27999
  }
28332
- }
28333
- ],
28334
- "mixins": [
28335
- {
28336
- "name": "withLayoutChildProps",
28337
- "module": "/src/utils/mixins/declarative-layout-mixins"
28338
28000
  },
28339
28001
  {
28340
- "name": "withMarginProps",
28341
- "module": "/src/utils/mixins/declarative-layout-mixins"
28342
- }
28343
- ],
28344
- "superclass": {
28345
- "name": "GdsElement",
28346
- "module": "/src/gds-element"
28347
- },
28348
- "tagName": "gds-rich-text",
28349
- "customElement": true,
28350
- "events": [
28351
- {
28352
- "name": "gds-element-disconnected",
28002
+ "name": "name",
28353
28003
  "type": {
28354
- "text": "CustomEvent"
28004
+ "text": "Event"
28355
28005
  },
28356
- "description": "When the element is disconnected from the DOM",
28357
28006
  "inheritedFrom": {
28358
28007
  "name": "GdsElement",
28359
28008
  "module": "src/gds-element.ts"
28360
28009
  }
28361
28010
  },
28362
28011
  {
28363
- "name": "name",
28364
28012
  "type": {
28365
28013
  "text": "Event"
28366
28014
  },
@@ -28368,33 +28016,124 @@
28368
28016
  "name": "GdsElement",
28369
28017
  "module": "src/gds-element.ts"
28370
28018
  }
28019
+ }
28020
+ ],
28021
+ "attributes": [
28022
+ {
28023
+ "name": "open",
28024
+ "type": {
28025
+ "text": "boolean"
28026
+ },
28027
+ "default": "false",
28028
+ "description": "Whether the popover is open.",
28029
+ "fieldName": "open"
28371
28030
  },
28372
28031
  {
28032
+ "name": "popup-role",
28373
28033
  "type": {
28374
- "text": "Event"
28034
+ "text": "'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'"
28035
+ },
28036
+ "default": "'dialog'",
28037
+ "description": "This is used to indicate the semantic role of the popover. This will set the `aria-haspopup` attribute on the trigger element.\nRead here for more information: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup",
28038
+ "fieldName": "popupRole"
28039
+ },
28040
+ {
28041
+ "name": "label",
28042
+ "type": {
28043
+ "text": "string | undefined"
28044
+ },
28045
+ "default": "undefined",
28046
+ "description": "Optional trigger element for the popover.",
28047
+ "fieldName": "label"
28048
+ },
28049
+ {
28050
+ "name": "placement",
28051
+ "type": {
28052
+ "text": "Placement"
28053
+ },
28054
+ "default": "'bottom-start'",
28055
+ "description": "The placement of the popover relative to the trigger.\nAccepts any of the placements supported by Floating UI.",
28056
+ "fieldName": "placement"
28057
+ },
28058
+ {
28059
+ "name": "disableMobileStyles",
28060
+ "type": {
28061
+ "text": "boolean"
28062
+ },
28063
+ "default": "false",
28064
+ "description": "Whether to use a modal dialog in mobile viewport.",
28065
+ "fieldName": "disableMobileStyles"
28066
+ },
28067
+ {
28068
+ "name": "autofocus",
28069
+ "type": {
28070
+ "text": "boolean"
28071
+ },
28072
+ "default": "false",
28073
+ "description": "Whether the popover should autofocus the first slotted child when opened.",
28074
+ "fieldName": "autofocus"
28075
+ },
28076
+ {
28077
+ "name": "nonmodal",
28078
+ "type": {
28079
+ "text": "boolean"
28080
+ },
28081
+ "default": "false",
28082
+ "description": "Whether the popover is nonmodal. When true, the popover will not trap focus and other elements\non the page will still be interactable while the popover is open.",
28083
+ "fieldName": "nonmodal"
28084
+ },
28085
+ {
28086
+ "name": "backdrop",
28087
+ "type": {
28088
+ "text": "string | undefined"
28375
28089
  },
28090
+ "description": "When this is set to `true`, the `:backdrop` pseudo-element will be visible if the popover is\nin modal mode. When not in modal mode (using the `nonmodal` attribute), this can instead be\nset to a selector matching a `<gds-backdrop>` element, in wich case the popover will take\ncontrol of that backdrop.\n\nExample:\n```html\n<gds-popover backdrop=\".my-backdrop\">\n <gds-button slot=\"trigger\">Open</gds-button>\n <p>Popover content</p>\n</gds-popover>\n<gds-backdrop class=\"my-backdrop\"></gds-backdrop>\n```",
28091
+ "fieldName": "backdrop"
28092
+ },
28093
+ {
28094
+ "name": "gds-element",
28095
+ "type": {
28096
+ "text": "string | undefined"
28097
+ },
28098
+ "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
28099
+ "readonly": true,
28100
+ "fieldName": "gdsElementName",
28376
28101
  "inheritedFrom": {
28377
28102
  "name": "GdsElement",
28378
28103
  "module": "src/gds-element.ts"
28379
28104
  }
28380
28105
  }
28381
- ]
28106
+ ],
28107
+ "superclass": {
28108
+ "name": "GdsElement",
28109
+ "module": "/src/gds-element"
28110
+ },
28111
+ "tagName": "gds-popover",
28112
+ "customElement": true
28382
28113
  }
28383
28114
  ],
28384
28115
  "exports": [
28385
28116
  {
28386
28117
  "kind": "js",
28387
- "name": "GdsRichText",
28118
+ "name": "applyTriggerAriaAttributes",
28388
28119
  "declaration": {
28389
- "name": "GdsRichText",
28390
- "module": "src/components/rich-text/rich-text.component.ts"
28120
+ "name": "applyTriggerAriaAttributes",
28121
+ "module": "src/components/popover/popover.component.ts"
28122
+ }
28123
+ },
28124
+ {
28125
+ "kind": "js",
28126
+ "name": "GdsPopover",
28127
+ "declaration": {
28128
+ "name": "GdsPopover",
28129
+ "module": "src/components/popover/popover.component.ts"
28391
28130
  }
28392
28131
  }
28393
28132
  ]
28394
28133
  },
28395
28134
  {
28396
28135
  "kind": "javascript-module",
28397
- "path": "src/components/rich-text/rich-text.stories.ts",
28136
+ "path": "src/components/popover/popover.stories.ts",
28398
28137
  "declarations": [
28399
28138
  {
28400
28139
  "kind": "variable",
@@ -28402,164 +28141,80 @@
28402
28141
  "type": {
28403
28142
  "text": "Meta"
28404
28143
  },
28405
- "default": "{ title: 'Components/Rich Text', component: 'gds-rich-text', tags: ['autodocs'], argTypes: { ...argTablePropsFor('gds-rich-text'), }, }",
28406
- "description": "`gds-rich-text` can be used to wrap generic HTML content and apply typography styles.\n\nThe wrapped content will get captured and transferred to the inner shadowRoot of the `gds-rich-text` element.\n\nA typical use case for this component is to wrap a block of HTML content output from a CMS or other source\nthat you want to apply the design system typography to.\n\nIt supports out of the box all heading styles, paragraphs, lists, blockquotes, figures, tables, and more."
28407
- },
28408
- {
28409
- "kind": "variable",
28410
- "name": "Card",
28411
- "type": {
28412
- "text": "Story"
28413
- },
28414
- "default": "{ ...DefaultParams, name: 'Card', render: (args) => html` <gds-card> <gds-rich-text> <h1> The Starship <small>SS Endeavor</small> <mark>Exploration Class</mark> </h1> <h2>Heading one</h2> <h3>Heading test</h3> <p> The <strong>SS Endeavor</strong> is a state-of-the-art exploration class starship designed for deep space missions. Equipped with advanced technology and robust systems, it aims to expand our understanding of the universe. With a focus on <em>interstellar travel</em>, the SS Endeavor features a unique propulsion system that allows for faster-than-light travel. Its mission is to explore uncharted territories and gather data on distant celestial bodies. <a href=\"#\">Link</a> </p> <figure> <img src=\"https://placehold.co/600x400\" alt=\"SS Endeavor Starship\" /> <figcaption> Artist's rendition of the SS Endeavor in flight. </figcaption> </figure> <blockquote> <p> \"The SS Endeavor represents the pinnacle of human engineering and ambition. It is not just a vessel; it is our gateway to the stars.\" <cite>— Dr. Amelia Carter, Chief Engineer</cite> </p> </blockquote> <p> For detailed specifications, please refer to the <a href=\"javascript:;\" onclick=\"console.log('Accessing starship specifications')\" >technical documentation</a >. The SS Endeavor is equipped with cutting-edge systems that ensure the safety and efficiency of its crew during long-duration missions. </p> <p> Furthermore, <mark>SS Endeavor</mark> is designed with a modular approach, allowing for easy <code>upgrades</code> and <code>maintenance</code>. </p> <h2>Specifications</h2> <ul> <li> Length: 150 meters Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </li> <li>Width: 50 meters</li> <li>Height: 30 meters</li> <li>Crew Capacity: 100 personnel</li> <li>Propulsion: Quantum Slipstream Drive</li> <li>Maximum Speed: 10 light-years per hour</li> </ul> <hr /> <h2>One digit list</h2> <ol> <li> Conduct scientific research on exoplanets, focusing on atmospheric composition <a href=\"#\">Inline link</a> and potential habitability. </li> <li> Establish contact with potential extraterrestrial civilizations through advanced signal detection and transmission protocols. </li> <li> Collect comprehensive data on diverse cosmic phenomena, including black hole dynamics, supernova remnants, and dark matter distribution. </li> <li> Test new technologies in real-world scenarios, specifically advanced propulsion systems for interstellar travel. </li> <li> Test new technologies in real-world scenarios, implementing closed-loop life support systems for long-duration space missions. </li> </ol> <h2>Two digit list</h2> <ol> <li> Conduct scientific research on exoplanets, focusing on atmospheric composition <a href=\"#\">Inline link</a> and potential habitability. </li> <li> Establish contact with potential extraterrestrial civilizations through advanced signal detection and transmission protocols. </li> <li> Collect comprehensive data on diverse cosmic phenomena, including black hole dynamics, supernova remnants, and dark matter distribution. </li> <li> Test new technologies in real-world scenarios, specifically advanced propulsion systems for interstellar travel. </li> <li> Test new technologies in real-world scenarios, implementing closed-loop life support systems for long-duration space missions. </li> <li> Test new technologies in real-world scenarios, evaluating the effectiveness of advanced radiation shielding materials. </li> <li> Test new technologies in real-world scenarios, deploying autonomous robotic systems for deep-space exploration and resource extraction. </li> <li> Test new technologies in real-world scenarios, analyzing the performance of quantum communication networks in space. </li> <li> Test new technologies in real-world scenarios, using advanced AI for real time data analysis and decision making. </li> <li> Investigate the origins and evolution of the universe through high-resolution astronomical observations. </li> <li> Develop and deploy advanced sensor arrays for detecting gravitational waves and other subtle cosmic signals. </li> <li> Analyze asteroid compositions to understand the early solar system and potential resources. </li> <li> Map the galactic structure with unprecedented accuracy, revealing hidden star systems and nebula. </li> <li> Study the effects of prolonged space travel on human physiology and psychology, preparing for future interstellar journeys. </li> <li> Create detailed models of planetary formation and evolution, improving our understanding of planet diversity. </li> <li> Explore the possibility of utilizing advanced energy sources, like fusion reactors, for deep space exploration. </li> </ol> <h3>Research Areas</h3> <details name=\"named-details\"> <summary>Focus Areas</summary> <p>The SS Endeavor will focus on the following research areas:</p> <ul> <li>Astrobiology</li> <li>Exoplanetary geology</li> <li>Astrophysics and cosmology</li> <li>Space weather and its effects on technology</li> </ul> </details> <details name=\"named-details\"> <summary>Exploration Objectives</summary> <p> The SS Endeavor aims to achieve significant breakthroughs in the following exploration objectives: </p> <ul> <li> Mapping the surface of Mars for potential human colonization </li> <li>Studying the atmospheres of gas giants</li> <li>Investigating the potential for life on Europa</li> <li>Understanding the dynamics of asteroid belts</li> </ul> </details> <details name=\"named-details\"> <summary>Technological Innovations</summary> <p> The SS Endeavor will develop and implement cutting-edge technologies in these areas: </p> <ul> <li>Advanced propulsion systems for deep space travel</li> <li>Autonomous robotic systems for planetary exploration</li> <li> Next-generation communication systems for interstellar data transmission </li> <li>Innovative life support systems for long-duration missions</li> </ul> </details> <p> In summary, the <strong>SS Endeavor</strong> is poised to lead humanity's next great leap into the cosmos. <s>With the right investments and support,</s> its missions will pave the way for future exploration and discovery. <mark>Join us</mark> as we embark on this exciting journey into the unknown. </p> <table> <thead> <tr> <th>Component</th> <th>Details</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td>Life Support System</td> <td>Advanced recycling and oxygen generation</td> <td>Ensures crew survival during long missions</td> </tr> <tr> <td>Navigation System</td> <td>AI-assisted star mapping</td> <td>Guides the ship through uncharted space</td> </tr> <tr> <td>Defensive Systems</td> <td>Energy shields and hull plating</td> <td>Protects against cosmic threats</td> </tr> <tr> <td>Scientific Labs</td> <td>Equipped for various research disciplines</td> <td>Facilitates on-board experiments</td> </tr> <tr> <td>Propulsion System</td> <td>Quantum Slipstream Drive</td> <td>Enables faster-than-light travel</td> </tr> </tbody> </table> <h2>Iframe</h2> <iframe src=\"https://example.com/\" height=\"400\"></iframe> </gds-rich-text> </gds-card> `, }"
28415
- },
28416
- {
28417
- "kind": "variable",
28418
- "name": "Headings",
28419
- "type": {
28420
- "text": "Story"
28421
- },
28422
- "default": "{ ...DefaultParams, name: 'Headings', render: (args) => html` <gds-rich-text> <!-- <h1>The Starship SS Endeavor Exploration Class</h1> <h2>Mission Alpha Centauri Deep Space Exploration</h2> <h3>Rocket Falcon Heavy Launch Vehicle</h3> <h4>Engine Raptor Next-Gen Propulsion</h4> <h5>Module Dragon Crew Transport</h5> <h6>Satellite Starlink Global Internet</h6> --> <h1>Heading 1</h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h2>Heading 2</h2> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h3>Heading 3</h3> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h4>Heading 4</h4> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h5>Heading 5</h5> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h6>Heading 6</h6> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> </gds-rich-text> `, }",
28423
- "description": "`gds-rich-text` can be used to wrap generic HTML content and apply typography styles.\nIt supports out of the box all heading styles from h1 to h6 based on the green design system typography styles."
28424
- },
28425
- {
28426
- "kind": "variable",
28427
- "name": "Lists",
28428
- "type": {
28429
- "text": "Story"
28430
- },
28431
- "default": "{ ...DefaultParams, name: 'Lists', render: (args) => html` <gds-rich-text> <h2>Key Technologies in Space Exploration</h2> <ul> <li>Rocket propulsion systems</li> <li>Life support systems</li> <li>Communication satellites</li> <li>Space habitats and modules</li> <li>Robotic exploration rovers</li> <li>Advanced materials for spacecraft</li> </ul> <h2>Major Milestones in Space Exploration</h2> <ol> <li>Launch of Sputnik 1 (1957) - The first artificial satellite.</li> <li> First human in space (Yuri Gagarin, 1961) - Historic manned spaceflight. </li> <li> Apollo 11 Moon landing (1969) - First humans to walk on the Moon. </li> <li> Launch of the Space Shuttle (1981) - Introduction of reusable spacecraft. </li> <li> Mars Rover Curiosity landing (2012) - Advanced exploration of the Martian surface. </li> <li> Launch of the James Webb Space Telescope (2021) - Next-generation space observatory. </li> </ol> </gds-rich-text> `, }",
28432
- "description": "`gds-rich-text` has built-in support for ordered and unordered lists.\nIt applies consistent spacing and typography styles to list items."
28433
- },
28434
- {
28435
- "kind": "variable",
28436
- "name": "Details",
28437
- "type": {
28438
- "text": "Story"
28439
- },
28440
- "default": "{ ...DefaultParams, name: 'Details', render: (args) => html` <gds-rich-text> <h3>Research Areas</h3> <details name=\"named-details\"> <summary>Focus Areas</summary> <p>The SS Endeavor will focus on the following research areas:</p> <ul> <li>Astrobiology</li> <li>Exoplanetary geology</li> <li>Astrophysics and cosmology</li> <li>Space weather and its effects on technology</li> </ul> </details> <details name=\"named-details\"> <summary>Exploration Objectives</summary> <p> The SS Endeavor aims to achieve significant breakthroughs in the following exploration objectives: </p> <ul> <li>Mapping the surface of Mars for potential human colonization</li> <li>Studying the atmospheres of gas giants</li> <li>Investigating the potential for life on Europa</li> <li>Understanding the dynamics of asteroid belts</li> </ul> </details> <details name=\"named-details\"> <summary>Technological Innovations</summary> <p> The SS Endeavor will develop and implement cutting-edge technologies in these areas: </p> <ul> <li>Advanced propulsion systems for deep space travel</li> <li>Autonomous robotic systems for planetary exploration</li> <li> Next-generation communication systems for interstellar data transmission </li> <li>Innovative life support systems for long-duration missions</li> </ul> </details> </gds-rich-text> `, }",
28441
- "description": "`gds-rich-text` has built-in support for details html element.\n\nThe details element is a disclosure widget from HTML5 that can be used to hide or show additional content."
28442
- },
28443
- {
28444
- "kind": "variable",
28445
- "name": "Blockquote",
28446
- "type": {
28447
- "text": "Story"
28448
- },
28449
- "default": "{ ...DefaultParams, name: 'Blockquote', render: (args) => html` <gds-rich-text> <h2>Inspirational Quotes from Space Exploration Pioneers</h2> <blockquote> <p> \"That's one small step for [a] man, one giant leap for mankind.\" <cite>— Neil Armstrong, Apollo 11 Astronaut</cite> </p> </blockquote> <blockquote> <p> \"The important achievement of Apollo was demonstrating that humanity is not forever chained to this planet and our visions go rather further than that and our opportunities are unlimited.\" <cite>— Neil Armstrong</cite> </p> </blockquote> <blockquote> <p> \"To confine our attention to terrestrial matters would be to limit the human spirit.\" <cite>— Stephen Hawking, Theoretical Physicist</cite> </p> </blockquote> <blockquote> <p> \"The Earth is the cradle of humanity, but mankind cannot stay in the cradle forever.\" <cite>— Konstantin Tsiolkovsky, Rocket Scientist</cite> </p> </blockquote> <blockquote> <p> \"I don't want to be an astronaut. I want to be a space explorer.\" <cite>— Chris Hadfield, Astronaut</cite> </p> </blockquote> </gds-rich-text> `, }",
28450
- "description": "`gds-rich-text` has built-in support blockquote element."
28144
+ "default": "{ title: 'Components/Popover', component: 'gds-popover', parameters: { layout: 'centered', }, tags: ['autodocs'], argTypes: { ...argTablePropsFor('gds-popover'), }, }",
28145
+ "description": "A popover is a temporary view that appears above other content."
28451
28146
  },
28452
28147
  {
28453
28148
  "kind": "variable",
28454
- "name": "Formatting",
28149
+ "name": "Usage",
28455
28150
  "type": {
28456
28151
  "text": "Story"
28457
28152
  },
28458
- "default": "{ ...DefaultParams, name: 'Formatting', render: (args) => html` <gds-rich-text> <h3>Key Concepts in Space Exploration</h3> <p> The field of space exploration is constantly evolving. It is essential to understand the <strong>fundamental principles</strong> that guide our missions. For example, <mark>propulsion technology</mark> is crucial for <em>successful space travel</em>. Moreover, the study of <s>black holes</s> has revealed significant insights into the <small>nature of the universe</small>. </p> <p> As we continue to explore the cosmos, <strong>collaboration</strong> among international space agencies is vital. Together, we can achieve <mark>greater advancements</mark> in our understanding of the universe. </p> </gds-rich-text> `, }",
28459
- "description": "`gds-rich-text` has built-in support for inline formatting tags such as `s`, `mark`, `strong`,`small` and `em`."
28153
+ "default": "{ ...DefaultParams, }",
28154
+ "description": "The popover can be used declaratively by adding a trigger button and content inside the popover element, like in the example below.\n\nIt is also possible to set the trigger and anchor by supplying DOM references (wrapped in promises) to the `triggerRef` and `anchorRef`\nproperties. This is useful when the trigger and anchor needs to be different elements."
28460
28155
  },
28461
28156
  {
28462
28157
  "kind": "variable",
28463
- "name": "Table",
28158
+ "name": "CancelEvent",
28464
28159
  "type": {
28465
28160
  "text": "Story"
28466
28161
  },
28467
- "default": "{ ...DefaultParams, name: 'Table', render: (args) => html` <gds-rich-text> <h2>Significant Space Missions</h2> <table> <thead> <tr> <th>Mission Name</th> <th>Launch</th> <th>Objectives</th> <th>Outcomes</th> </tr> </thead> <tbody> <tr> <td>Apollo 11</td> <td>1969</td> <td>First manned Moon landing</td> <td> Successful lunar landing; Neil Armstrong and Buzz Aldrin walked on the Moon. </td> </tr> <tr> <td>Voyager 1</td> <td>1977</td> <td>Explore outer planets and interstellar space</td> <td> Provided detailed images of Jupiter and Saturn; currently in interstellar space. </td> </tr> <tr> <td>Hubble Space Telescope</td> <td>1990</td> <td>Observe distant galaxies and cosmic phenomena</td> <td> Revolutionized astronomy; provided stunning images and data. </td> </tr> <tr> <td>Curiosity Rover</td> <td>2011</td> <td>Explore Mars' surface and assess habitability</td> <td> Confirmed the presence of water; conducted extensive geological analysis. </td> </tr> <tr> <td>James Webb Space Telescope</td> <td>2021</td> <td>Observe the early universe and exoplanets</td> <td>Expected to provide unprecedented insights into the cosmos.</td> </tr> </tbody> </table> </gds-rich-text> `, }",
28468
- "description": "`gds-rich-text` has built-in support for tables."
28162
+ "default": "{ ...DefaultParams, render: () => html` <gds-popover id=\"cancellable\" @gds-ui-state=${(e: CustomEvent) => e.detail.reason === 'close' && e.preventDefault()} > <gds-button rank=\"secondary\" slot=\"trigger\"> Show popover <gds-icon-chevron-bottom slot=\"trail\"></gds-icon-chevron-bottom> </gds-button> <div style=\"padding: 1rem; padding-top: 0\"> <h3>Customized closing behavior</h3> <p> This popover can only be closed by click the button below or hitting escape. </p> <gds-button rank=\"primary\" @click=${() => { ;(document.getElementById('cancellable') as GdsPopover).open = false }} >Close me!</gds-button > </div> </gds-popover>`, }",
28163
+ "description": "By default, the popover will close when clicking outside or hitting the escape key. This behavior can be customized by listening to the `gds-ui-state` event and calling `preventDefault()` on the event object when the popover should not close.\n\nFor example:\n\n```html\n<gds-popover"
28469
28164
  },
28470
28165
  {
28471
28166
  "kind": "variable",
28472
- "name": "Basic",
28167
+ "name": "Customization",
28473
28168
  "type": {
28474
28169
  "text": "Story"
28475
28170
  },
28476
- "default": "{ ...DefaultParams, name: 'Theme', render: (args) => html` <gds-card variant=\"tertiary\"> <gds-rich-text> <h1> The Starship <small>SS Endeavor</small> <mark>Exploration Class</mark> </h1> <h2>Heading one</h2> <h3>Heading test</h3> <p> The <strong>SS Endeavor</strong> is a state-of-the-art exploration class starship designed for deep space missions. Equipped with advanced technology and robust systems, it aims to expand our understanding of the universe. With a focus on <em>interstellar travel</em>, the SS Endeavor features a unique propulsion system that allows for faster-than-light travel. Its mission is to explore uncharted territories and gather data on distant celestial bodies. <a href=\"#\">Link</a> </p> <figure> <img src=\"https://placehold.co/600x400\" alt=\"SS Endeavor Starship\" /> <figcaption> Artist's rendition of the SS Endeavor in flight. </figcaption> </figure> <blockquote> <p> \"The SS Endeavor represents the pinnacle of human engineering and ambition. It is not just a vessel; it is our gateway to the stars.\" <cite>— Dr. Amelia Carter, Chief Engineer</cite> </p> </blockquote> <p> For detailed specifications, please refer to the <a href=\"javascript:;\" onclick=\"console.log('Accessing starship specifications')\" >technical documentation</a >. The SS Endeavor is equipped with cutting-edge systems that ensure the safety and efficiency of its crew during long-duration missions. </p> <p> Furthermore, <mark>SS Endeavor</mark> is designed with a modular approach, allowing for easy upgrades and maintenance. </p> <h2>Specifications</h2> <ul> <li> Length: 150 meters Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </li> <li>Width: 50 meters</li> <li>Height: 30 meters</li> <li>Crew Capacity: 100 personnel</li> <li>Propulsion: Quantum Slipstream Drive</li> <li>Maximum Speed: 10 light-years per hour</li> </ul> <hr /> <h2>Mission Objectives</h2> <ol> <li>Conduct scientific research on exoplanets.</li> <li> Establish contact with potential extraterrestrial civilizations. </li> <li>Collect data on cosmic phenomena.</li> <li>Test new technologies in real-world scenarios.</li> </ol> <h3>Research Areas</h3> <details name=\"named-details\"> <summary>Focus Areas</summary> <p>The SS Endeavor will focus on the following research areas:</p> <ul> <li>Astrobiology</li> <li>Exoplanetary geology</li> <li>Astrophysics and cosmology</li> <li>Space weather and its effects on technology</li> </ul> </details> <details name=\"named-details\"> <summary>Exploration Objectives</summary> <p> The SS Endeavor aims to achieve significant breakthroughs in the following exploration objectives: </p> <ul> <li> Mapping the surface of Mars for potential human colonization </li> <li>Studying the atmospheres of gas giants</li> <li>Investigating the potential for life on Europa</li> <li>Understanding the dynamics of asteroid belts</li> </ul> </details> <details name=\"named-details\"> <summary>Technological Innovations</summary> <p> The SS Endeavor will develop and implement cutting-edge technologies in these areas: </p> <ul> <li>Advanced propulsion systems for deep space travel</li> <li>Autonomous robotic systems for planetary exploration</li> <li> Next-generation communication systems for interstellar data transmission </li> <li>Innovative life support systems for long-duration missions</li> </ul> </details> <p> In summary, the <strong>SS Endeavor</strong> is poised to lead humanity's next great leap into the cosmos. <s>With the right investments and support,</s> its missions will pave the way for future exploration and discovery. <mark>Join us</mark> as we embark on this exciting journey into the unknown. </p> <table> <thead> <tr> <th>Component</th> <th>Details</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td>Life Support System</td> <td>Advanced recycling and oxygen generation</td> <td>Ensures crew survival during long missions</td> </tr> <tr> <td>Navigation System</td> <td>AI-assisted star mapping</td> <td>Guides the ship through uncharted space</td> </tr> <tr> <td>Defensive Systems</td> <td>Energy shields and hull plating</td> <td>Protects against cosmic threats</td> </tr> <tr> <td>Scientific Labs</td> <td>Equipped for various research disciplines</td> <td>Facilitates on-board experiments</td> </tr> <tr> <td>Propulsion System</td> <td>Quantum Slipstream Drive</td> <td>Enables faster-than-light travel</td> </tr> </tbody> </table> <h2>Iframe</h2> <iframe src=\"https://example.com/\" height=\"400\"></iframe> </gds-rich-text> </gds-card> `, }",
28477
- "description": "Rich text can be used with other components to create engaging content.\nIn this example, we combine rich text with a card component to showcase how colors will be applied.\n\nExample:\n\n```html\n<gds-card variant=\"tertiary\">\n <gds-rich-text>\n ...\n </gds-rich-text>\n</gds-card>\n```"
28171
+ "default": "{ ...DefaultParams, render: () => html`<gds-div width=\"700px\" height=\"250px\"> <gds-card variant=\"secondary\" width=\"720px\" border=\"4xs\" border-width=\"0 0 4xs\" border-radius=\"0\" padding=\"0\" position=\"fixed\" flex-direction=\"row\" inset=\"0 auto auto 0\" z-index=\"1000\" > <gds-popover> <gds-menu-button slot=\"trigger\"> <gds-icon-chevron-bottom slot=\"trail\"></gds-icon-chevron-bottom> Basic popover </gds-menu-button compact> <div style=\"padding: 1rem;\">Basic popover</div> </gds-popover> <gds-popover nonmodal backdrop=\"#my-backdrop\" .floatingUIMiddleware=${[{ fn: ({ y }) => ({ x: 25, y: y + 8 }) }]} .calcMaxWidth=${() => '670px'}> <gds-menu-button slot=\"trigger\"> <gds-icon-chevron-bottom slot=\"trail\"></gds-icon-chevron-bottom> With custom backdrop and positioning middleware </gds-menu-button> <div style=\"padding: 0 1rem;\"> <h3>Customized popover</h3> <p>In this popover, we're using custom Floating UI middleware to control the positioning, and <i>calcMaxWidth</i> to set the size.</p> <p>We're also using a backdrop element, referenced by the <i>backdrop</i> attribute, to dim the background below the menu bar.</p> </div> </gds-popover> </gds-card> <gds-backdrop id=\"my-backdrop\"></gds-backdrop> </gds-div>`, }",
28172
+ "description": "Here is an example of how the popover can be customized with sizing, placement and backdrop."
28478
28173
  }
28479
28174
  ],
28480
28175
  "exports": [
28481
28176
  {
28482
28177
  "kind": "js",
28483
28178
  "name": "default",
28484
- "declaration": {
28485
- "name": "meta",
28486
- "module": "src/components/rich-text/rich-text.stories.ts"
28487
- }
28488
- },
28489
- {
28490
- "kind": "js",
28491
- "name": "Card",
28492
- "declaration": {
28493
- "name": "Card",
28494
- "module": "src/components/rich-text/rich-text.stories.ts"
28495
- }
28496
- },
28497
- {
28498
- "kind": "js",
28499
- "name": "Headings",
28500
- "declaration": {
28501
- "name": "Headings",
28502
- "module": "src/components/rich-text/rich-text.stories.ts"
28503
- }
28504
- },
28505
- {
28506
- "kind": "js",
28507
- "name": "Lists",
28508
- "declaration": {
28509
- "name": "Lists",
28510
- "module": "src/components/rich-text/rich-text.stories.ts"
28511
- }
28512
- },
28513
- {
28514
- "kind": "js",
28515
- "name": "Details",
28516
- "declaration": {
28517
- "name": "Details",
28518
- "module": "src/components/rich-text/rich-text.stories.ts"
28519
- }
28520
- },
28521
- {
28522
- "kind": "js",
28523
- "name": "Blockquote",
28524
- "declaration": {
28525
- "name": "Blockquote",
28526
- "module": "src/components/rich-text/rich-text.stories.ts"
28179
+ "declaration": {
28180
+ "name": "meta",
28181
+ "module": "src/components/popover/popover.stories.ts"
28527
28182
  }
28528
28183
  },
28529
28184
  {
28530
28185
  "kind": "js",
28531
- "name": "Formatting",
28186
+ "name": "Usage",
28532
28187
  "declaration": {
28533
- "name": "Formatting",
28534
- "module": "src/components/rich-text/rich-text.stories.ts"
28188
+ "name": "Usage",
28189
+ "module": "src/components/popover/popover.stories.ts"
28535
28190
  }
28536
28191
  },
28537
28192
  {
28538
28193
  "kind": "js",
28539
- "name": "Table",
28194
+ "name": "CancelEvent",
28540
28195
  "declaration": {
28541
- "name": "Table",
28542
- "module": "src/components/rich-text/rich-text.stories.ts"
28196
+ "name": "CancelEvent",
28197
+ "module": "src/components/popover/popover.stories.ts"
28543
28198
  }
28544
28199
  },
28545
28200
  {
28546
28201
  "kind": "js",
28547
- "name": "Basic",
28202
+ "name": "Customization",
28548
28203
  "declaration": {
28549
- "name": "Basic",
28550
- "module": "src/components/rich-text/rich-text.stories.ts"
28204
+ "name": "Customization",
28205
+ "module": "src/components/popover/popover.stories.ts"
28551
28206
  }
28552
28207
  }
28553
28208
  ]
28554
28209
  },
28555
28210
  {
28556
28211
  "kind": "javascript-module",
28557
- "path": "src/components/rich-text/rich-text.styles.ts",
28212
+ "path": "src/components/popover/popover.styles.ts",
28558
28213
  "declarations": [
28559
28214
  {
28560
28215
  "kind": "variable",
28561
28216
  "name": "style",
28562
- "default": "css` :host { font: var(--gds-sys-text-body-regular-m); --default-border: 1px solid color-mix(in srgb, currentColor, transparent 80%); letter-spacing: 0.0125rem; display: block; } h1, h2, h3, h4, h5, h6 { margin-top: var(--gds-sys-space-2xl); margin-bottom: var(--gds-sys-space-xs); } :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: unset; } h1 + h2 { margin-top: 0; } h2 + h3 { margin-top: 0; } h3 + h4 { margin-top: 0; } h4 + h5 { margin-top: 0; } h4 + h5 { margin-top: 0; } h5 + h6 { margin-top: 0; } p { margin: 0; margin-bottom: var(--gds-sys-space-m); max-width: 80ch; } blockquote { margin: unset; margin-block: 2lh; border-left: 0.2rem solid currentColor; padding-left: 2ch; max-width: 40ch; } code { background: var(--gds-sys-color-l3-neutral-02); color: var(--gds-sys-color-content-neutral-01); border-radius: var(--gds-sys-radius-xs); padding: var(--gds-sys-space-3xs); font: var(--gds-sys-text-body-book-s); } hr { border: none; border-top: var(--default-border); margin: var(--gds-sys-space-xl) 0; } s { text-decoration: underline; text-decoration-skip-ink: none; text-underline-offset: -0.22lh; } mark { color: currentColor; background-color: color-mix(in srgb, currentColor, transparent 80%); } /* * lists * ----------------------------------------------------------- */ ul, ol { padding-inline-start: 2ch; margin: unset; margin-bottom: 1lh; max-width: 80ch; } ol { list-style-type: none; counter-reset: ordered-list; margin: unset; padding: unset; } ol li { padding-left: 3.6ch; position: relative; } ol li:before { counter-increment: ordered-list; content: counter(ordered-list) '.'; left: 0.2rem; position: absolute; } ol:not(:has(li:nth-child(10))) li { padding-left: 2.4ch; } ol:has(li:nth-child(10)) li:nth-child(-n + 9):before { left: 1.4ch; } li { padding: 0 0 0.3lh 0; } ul li:last-child { padding: 0; } ul li::marker { content: '– '; } /* * figure and image * ----------------------------------------------------------- */ img { display: block; border-radius: var(--gds-sys-radius-xs); } figure { margin: 0; padding: 0; margin-top: var(--gds-sys-space-xl); } figcaption { font-size: smaller; margin-block-start: var(--gds-sys-space-xs); } /* * table * ----------------------------------------------------------- */ table { border-collapse: separate; border-spacing: 0; width: 100%; border: var(--default-border); border-radius: var(--gds-sys-radius-s); margin-top: var(--gds-sys-space-xl); } th { font-weight: var(--gds-sys-text-weight-book); text-align: left; border-bottom: var(--default-border); border-left: transparent; border-right: transparent; color: currentColor; } th:not(:last-child) { border-right: var(--default-border); } th, td { padding: 0.3lh 2ch; } td:not(:last-child) { border-right: var(--default-border); } tr:nth-child(even) td { background: color-mix(in srgb, currentColor, transparent 95%); } /* * Details * ----------------------------------------------------------- */ details { border-top: solid var(--gds-sys-space-5xs) color-mix(in srgb, currentColor, transparent 90%); font: var(--gds-sys-text-body-regular-m); } summary { font-weight: var(--gds-sys-text-weight-regular); list-style: none; padding: 0.4lh 0.2ch; font: var(--gds-sys-text-body-regular-l); color: currentColor; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; outline-offset: var(--gds-sys-space-3xs); outline-color: currentColor; padding-inline: var(--gds-sys-space-m); } details summary::-webkit-details-marker { display: none; } summary:focus-visible { border-radius: var(--gds-sys-radius-2xs); } details:hover summary { background: color-mix(in srgb, currentColor, transparent 95%); } summary::after { content: '+'; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; font: var(--gds-sys-text-body-regular-l); } details[open] summary::after { content: '-'; } details[open] { border-bottom: var(--gds-sys-space-5xs) solid color-mix(in srgb, currentColor, transparent 95%); padding-bottom: 0.4lh; background: color-mix(in srgb, currentColor, transparent 95%); } details[open] > *:not(summary) { margin-left: var(--gds-sys-space-m); } details[open] summary { margin-bottom: 0.4lh; } details[open] + details { border: none; } details:last-of-type { border-bottom: var(--gds-sys-space-5xs) solid color-mix(in srgb, currentColor, transparent 90%); margin-bottom: var(--gds-sys-space-xl); } a, a:visited { color: currentColor; text-decoration-color: currentColor; } /* * Iframe */ iframe { border: var(--gds-sys-space-5xs) solid var(--gds-sys-color-border-subtle-01); border-radius: var(--gds-sys-radius-xs); min-width: 100%; margin-bottom: var(--gds-sys-space-l); } `"
28217
+ "default": "css` @layer base, reset, transitional-styles; @layer base { :host { display: contents; } :host > div:not([hidden]) { display: contents; } :host([open]) dialog { opacity: 1; box-sizing: border-box; visibility: visible; } dialog { display: flex; flex-direction: column; inset: auto; position: fixed; overflow: hidden; padding: 0px; box-sizing: border-box; right: 0; margin: 0; box-shadow: var(--gds-sys-shadow-l-01); border: var(--gds-sys-space-5xs) solid var(--gds-sys-color-border-subtle-01); border-radius: var(--gds-sys-radius-s); overscroll-behavior: contain; } :host([nonmodal]) dialog { z-index: 1; } @media (max-width: 576px) { dialog.use-modal-in-mobile { border-radius: var(--gds-sys-radius-m) var(--gds-sys-radius-m) 0 0; transition: transform var(--gds-sys-motion-duration-fastest) ease; min-width: 100vw; position: fixed; bottom: 0; left: 0; padding-bottom: 0; transform: translateY(0); @starting-style { transform: translateY(100%); } &::backdrop { background-color: rgba(0, 0, 0, 0.3); display: block; position: fixed; opacity: 1; transition: opacity var(--gds-sys-motion-duration-fast) ease; @starting-style { opacity: 0; } } } } @media (min-width: 577px) { header { display: none; } } header { display: none; } @media (min-width: 577px) { dialog:not(.has-backdrop)::backdrop { background-color: transparent; display: block; position: fixed; } } } `"
28563
28218
  }
28564
28219
  ],
28565
28220
  "exports": [
@@ -28568,45 +28223,157 @@
28568
28223
  "name": "default",
28569
28224
  "declaration": {
28570
28225
  "name": "style",
28571
- "module": "src/components/rich-text/rich-text.styles.ts"
28226
+ "module": "src/components/popover/popover.styles.ts"
28572
28227
  }
28573
28228
  }
28574
28229
  ]
28575
28230
  },
28576
28231
  {
28577
28232
  "kind": "javascript-module",
28578
- "path": "src/components/rich-text/rich-text.ts",
28233
+ "path": "src/components/popover/popover.trans.styles.ts",
28234
+ "declarations": [
28235
+ {
28236
+ "kind": "function",
28237
+ "name": "register"
28238
+ }
28239
+ ],
28240
+ "exports": [
28241
+ {
28242
+ "kind": "js",
28243
+ "name": "register",
28244
+ "declaration": {
28245
+ "name": "register",
28246
+ "module": "src/components/popover/popover.trans.styles.ts"
28247
+ }
28248
+ },
28249
+ {
28250
+ "kind": "js",
28251
+ "name": "default",
28252
+ "declaration": {
28253
+ "name": "register",
28254
+ "module": "src/components/popover/popover.trans.styles.ts"
28255
+ }
28256
+ }
28257
+ ]
28258
+ },
28259
+ {
28260
+ "kind": "javascript-module",
28261
+ "path": "src/components/popover/popover.ts",
28579
28262
  "declarations": [],
28580
28263
  "exports": [
28581
28264
  {
28582
28265
  "kind": "js",
28583
- "name": "GdsRichText",
28266
+ "name": "GdsPopover",
28584
28267
  "declaration": {
28585
- "name": "GdsRichText",
28586
- "module": "src/components/rich-text/rich-text.ts"
28268
+ "name": "GdsPopover",
28269
+ "module": "src/components/popover/popover.ts"
28587
28270
  }
28588
28271
  }
28589
28272
  ]
28590
28273
  },
28591
28274
  {
28592
28275
  "kind": "javascript-module",
28593
- "path": "src/components/popover/backdrop.component.ts",
28276
+ "path": "src/components/radio/index.ts",
28277
+ "declarations": [],
28278
+ "exports": [
28279
+ {
28280
+ "kind": "js",
28281
+ "name": "*",
28282
+ "declaration": {
28283
+ "name": "*",
28284
+ "module": "src/components/radio/radio"
28285
+ }
28286
+ },
28287
+ {
28288
+ "kind": "js",
28289
+ "name": "*",
28290
+ "declaration": {
28291
+ "name": "*",
28292
+ "module": "src/components/radio/radio-group/radio-group"
28293
+ }
28294
+ }
28295
+ ]
28296
+ },
28297
+ {
28298
+ "kind": "javascript-module",
28299
+ "path": "src/components/radio/radio.component.ts",
28594
28300
  "declarations": [
28595
28301
  {
28596
28302
  "kind": "class",
28597
28303
  "description": "",
28598
- "name": "GdsBackdrop",
28304
+ "name": "GdsRadio",
28599
28305
  "members": [
28600
28306
  {
28601
28307
  "kind": "field",
28602
- "name": "show",
28308
+ "name": "label",
28309
+ "type": {
28310
+ "text": "string"
28311
+ },
28312
+ "default": "''",
28313
+ "description": "The label displayed next to the radio button.",
28314
+ "attribute": "label"
28315
+ },
28316
+ {
28317
+ "kind": "field",
28318
+ "name": "supportingText",
28319
+ "type": {
28320
+ "text": "string"
28321
+ },
28322
+ "default": "''",
28323
+ "description": "The supporting text displayed below the label.\nThis text provides additional context or information to the user.",
28324
+ "attribute": "supporting-text"
28325
+ },
28326
+ {
28327
+ "kind": "field",
28328
+ "name": "value",
28329
+ "type": {
28330
+ "text": "string"
28331
+ },
28332
+ "default": "''",
28333
+ "description": "The value of the radio button.",
28334
+ "attribute": "value"
28335
+ },
28336
+ {
28337
+ "kind": "field",
28338
+ "name": "checked",
28603
28339
  "type": {
28604
28340
  "text": "boolean"
28605
28341
  },
28606
28342
  "default": "false",
28607
- "attribute": "show",
28343
+ "description": "Whether the radio button is checked or not.",
28344
+ "attribute": "checked",
28345
+ "reflects": true
28346
+ },
28347
+ {
28348
+ "kind": "field",
28349
+ "name": "disabled",
28350
+ "type": {
28351
+ "text": "boolean"
28352
+ },
28353
+ "default": "false",
28354
+ "description": "Whether the radio button is disabled or not.",
28355
+ "attribute": "disabled",
28608
28356
  "reflects": true
28609
28357
  },
28358
+ {
28359
+ "kind": "field",
28360
+ "name": "invalid",
28361
+ "type": {
28362
+ "text": "boolean"
28363
+ },
28364
+ "default": "false",
28365
+ "description": "Whether the radio button is invalid or not.",
28366
+ "attribute": "invalid"
28367
+ },
28368
+ {
28369
+ "kind": "field",
28370
+ "name": "errorMessage",
28371
+ "type": {
28372
+ "text": "string | undefined"
28373
+ },
28374
+ "description": "The accessible error message text for the radio button.\n\nThis text is not visually rendered, but will be announced by\nscreen readers when the radio button is in an invalid state.",
28375
+ "attribute": "errorMessage"
28376
+ },
28610
28377
  {
28611
28378
  "kind": "method",
28612
28379
  "name": "define",
@@ -28737,49 +28504,33 @@
28737
28504
  }
28738
28505
  }
28739
28506
  ],
28740
- "attributes": [
28507
+ "events": [
28741
28508
  {
28742
- "name": "show",
28743
- "type": {
28744
- "text": "boolean"
28745
- },
28746
- "default": "false",
28747
- "fieldName": "show"
28509
+ "description": "Dispatched when the radio button is checked.",
28510
+ "name": "input"
28748
28511
  },
28749
28512
  {
28750
- "name": "gds-element",
28513
+ "name": "gds-element-disconnected",
28751
28514
  "type": {
28752
- "text": "string | undefined"
28515
+ "text": "CustomEvent"
28753
28516
  },
28754
- "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
28755
- "readonly": true,
28756
- "fieldName": "gdsElementName",
28517
+ "description": "When the element is disconnected from the DOM",
28757
28518
  "inheritedFrom": {
28758
28519
  "name": "GdsElement",
28759
28520
  "module": "src/gds-element.ts"
28760
28521
  }
28761
- }
28762
- ],
28763
- "superclass": {
28764
- "name": "GdsElement",
28765
- "module": "/src/gds-element"
28766
- },
28767
- "tagName": "gds-backdrop",
28768
- "customElement": true,
28769
- "events": [
28522
+ },
28770
28523
  {
28771
- "name": "gds-element-disconnected",
28524
+ "name": "name",
28772
28525
  "type": {
28773
- "text": "CustomEvent"
28526
+ "text": "Event"
28774
28527
  },
28775
- "description": "When the element is disconnected from the DOM",
28776
28528
  "inheritedFrom": {
28777
28529
  "name": "GdsElement",
28778
28530
  "module": "src/gds-element.ts"
28779
28531
  }
28780
28532
  },
28781
28533
  {
28782
- "name": "name",
28783
28534
  "type": {
28784
28535
  "text": "Event"
28785
28536
  },
@@ -28787,246 +28538,503 @@
28787
28538
  "name": "GdsElement",
28788
28539
  "module": "src/gds-element.ts"
28789
28540
  }
28541
+ }
28542
+ ],
28543
+ "attributes": [
28544
+ {
28545
+ "name": "label",
28546
+ "type": {
28547
+ "text": "string"
28548
+ },
28549
+ "default": "''",
28550
+ "description": "The label displayed next to the radio button.",
28551
+ "fieldName": "label"
28790
28552
  },
28791
28553
  {
28554
+ "name": "supporting-text",
28792
28555
  "type": {
28793
- "text": "Event"
28556
+ "text": "string"
28557
+ },
28558
+ "default": "''",
28559
+ "description": "The supporting text displayed below the label.\nThis text provides additional context or information to the user.",
28560
+ "fieldName": "supportingText"
28561
+ },
28562
+ {
28563
+ "name": "value",
28564
+ "type": {
28565
+ "text": "string"
28566
+ },
28567
+ "default": "''",
28568
+ "description": "The value of the radio button.",
28569
+ "fieldName": "value"
28570
+ },
28571
+ {
28572
+ "name": "checked",
28573
+ "type": {
28574
+ "text": "boolean"
28575
+ },
28576
+ "default": "false",
28577
+ "description": "Whether the radio button is checked or not.",
28578
+ "fieldName": "checked"
28579
+ },
28580
+ {
28581
+ "name": "disabled",
28582
+ "type": {
28583
+ "text": "boolean"
28584
+ },
28585
+ "default": "false",
28586
+ "description": "Whether the radio button is disabled or not.",
28587
+ "fieldName": "disabled"
28588
+ },
28589
+ {
28590
+ "name": "invalid",
28591
+ "type": {
28592
+ "text": "boolean"
28593
+ },
28594
+ "default": "false",
28595
+ "description": "Whether the radio button is invalid or not.",
28596
+ "fieldName": "invalid"
28597
+ },
28598
+ {
28599
+ "name": "errorMessage",
28600
+ "type": {
28601
+ "text": "string | undefined"
28602
+ },
28603
+ "description": "The accessible error message text for the radio button.\n\nThis text is not visually rendered, but will be announced by\nscreen readers when the radio button is in an invalid state.",
28604
+ "fieldName": "errorMessage"
28605
+ },
28606
+ {
28607
+ "name": "gds-element",
28608
+ "type": {
28609
+ "text": "string | undefined"
28794
28610
  },
28611
+ "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
28612
+ "readonly": true,
28613
+ "fieldName": "gdsElementName",
28795
28614
  "inheritedFrom": {
28796
28615
  "name": "GdsElement",
28797
28616
  "module": "src/gds-element.ts"
28798
28617
  }
28799
28618
  }
28800
- ]
28619
+ ],
28620
+ "superclass": {
28621
+ "name": "GdsElement",
28622
+ "module": "/src/gds-element"
28623
+ },
28624
+ "tagName": "gds-radio",
28625
+ "customElement": true
28801
28626
  }
28802
28627
  ],
28803
28628
  "exports": [
28804
28629
  {
28805
28630
  "kind": "js",
28806
- "name": "GdsBackdrop",
28631
+ "name": "GdsRadio",
28807
28632
  "declaration": {
28808
- "name": "GdsBackdrop",
28809
- "module": "src/components/popover/backdrop.component.ts"
28633
+ "name": "GdsRadio",
28634
+ "module": "src/components/radio/radio.component.ts"
28810
28635
  }
28811
28636
  }
28812
28637
  ]
28813
28638
  },
28814
28639
  {
28815
28640
  "kind": "javascript-module",
28816
- "path": "src/components/popover/backdrop.ts",
28817
- "declarations": [],
28641
+ "path": "src/components/radio/radio.stories.ts",
28642
+ "declarations": [
28643
+ {
28644
+ "kind": "variable",
28645
+ "name": "meta",
28646
+ "type": {
28647
+ "text": "Meta"
28648
+ },
28649
+ "default": "{ title: 'Components/Radio', component: 'gds-radio-group', subcomponents: { GdsRadio: 'gds-radio' }, tags: ['autodocs'], argTypes: { ...argTablePropsFor('gds-radio-group'), }, }",
28650
+ "description": "A radio button is a form element that allows users to select one of the predefined set of choices.<br/>\nThey are grouped using a radio group component which manages selection, keyboard navigation, and validation.\n\nGroups support vertical and horizontal layouts, and can be sized to fit different space requirements."
28651
+ },
28652
+ {
28653
+ "kind": "variable",
28654
+ "name": "RadioButton",
28655
+ "type": {
28656
+ "text": "Story"
28657
+ },
28658
+ "default": "{ ...DefaultParams, name: 'Radio', args: { label: 'Pick an option', supportingText: 'Label support text.', innerHTML: ` <gds-radio label=\"Radio Option 1\" supporting-text=\"Supporting text\" value=\"1\"></gds-radio> <gds-radio label=\"Radio Option 2\" supporting-text=\"Supporting text\" value=\"2\"></gds-radio> <gds-radio label=\"Radio Option 3\" supporting-text=\"Supporting text\" value=\"3\"></gds-radio>`, }, }",
28659
+ "description": "Radio buttons allow users to select a single option from a list of two or more mutually exclusive options.<br />\nEach radio button must have both a label and a value.\n\nUsage:\n\n```html\n<gds-radio-group label=\"Select an option\">\n <gds-radio label=\"Option 1\" value=\"1\"></gds-radio>\n <gds-radio label=\"Option 2\" value=\"2\"></gds-radio>\n</gds-radio-group>\n```\n\nInteractive example with supporting texts:"
28660
+ },
28661
+ {
28662
+ "kind": "variable",
28663
+ "name": "Validation",
28664
+ "type": {
28665
+ "text": "Story"
28666
+ },
28667
+ "default": "{ ...DefaultParams, name: 'Validation', render: () => html` <form method=\"dialog\"> <gds-flex flex-direction=\"column\" align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" show-extended-supporting-text .validator=${{ validate: (el: GdsRadioGroup) => { if (!el.value) return [ { ...el.validity, valid: false, customError: true }, 'This is required', ] }, }} > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> <gds-button type=\"submit\">Submit</gds-button> </gds-flex> </form> `, }",
28668
+ "description": "Radio groups support validation using Green Core's [form validation API](/docs/components-form-validation-documentation--docs).\n\nThe error message appears below the radio group, and can be set either trough a validator, or explicctly using the using the `error-message` attribute.\n\nIf you click on 'submit' first on the example below it will validate the radio group and show the error message."
28669
+ },
28670
+ {
28671
+ "kind": "variable",
28672
+ "name": "DosAndDonts",
28673
+ "type": {
28674
+ "text": "Story"
28675
+ },
28676
+ "default": "{ ...DefaultParams, name: \"Do's and don'ts\", render: () => html` <gds-flex gap=\"xl\"> <gds-flex gap=\"l\" flex-direction=\"column\" flex=\"1\"> <gds-card align-items=\"center\" flex-direction=\"row\" gap=\"2xs\" padding=\"s\" variant=\"positive\" > <gds-icon-circle-check></gds-icon-circle-check> <gds-text tag=\"small\">Do provide both Label and Value</gds-text> </gds-card> <gds-card align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text\"> <span slot=\"extended-supporting-text\"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span> <gds-radio label=\"Radio Label\" value=\"1\"></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\"></gds-radio> </gds-radio-group> </gds-card> </gds-flex> <gds-flex gap=\"l\" flex-direction=\"column\" flex=\"1\"> <gds-card align-items=\"center\" flex-direction=\"row\" gap=\"2xs\" padding=\"s\" variant=\"negative\" > <gds-icon-cross-small></gds-icon-cross-small> <gds-text tag=\"small\">Never exclude the label</gds-text> </gds-card> <form method=\"dialog\"> <gds-card align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text\"> <span slot=\"extended-supporting-text\"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span> <gds-radio value=\"1\"></gds-radio> <gds-radio value=\"2\"></gds-radio> </gds-radio-group> </gds-card> </form> </gds-flex> <gds-flex gap=\"l\" flex-direction=\"column\" flex=\"1\"> <gds-card align-items=\"center\" flex-direction=\"row\" gap=\"2xs\" padding=\"s\" variant=\"negative\" > <gds-icon-cross-small></gds-icon-cross-small> <gds-text tag=\"small\">Never exclude the value </gds-text> </gds-card> <form method=\"dialog\"> <gds-card align-items=\"flex-start\" gap=\"m\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text\"> <span slot=\"extended-supporting-text\"> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </span> <gds-radio label=\"Radio Label\"></gds-radio> <gds-radio label=\"Radio Label\"></gds-radio> </gds-radio-group> </gds-card> </form> </gds-flex> </gds-flex> `, }"
28677
+ },
28678
+ {
28679
+ "kind": "variable",
28680
+ "name": "Disabled",
28681
+ "type": {
28682
+ "text": "Story"
28683
+ },
28684
+ "default": "{ ...DefaultParams, name: 'Disabled', render: () => html` <div class=\"radio-group\"> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" show-extended-supporting-text value=\"4\" > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" disabled supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" disabled supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </div> `, }",
28685
+ "description": "Disabled radio buttons cannot be interacted with and appear visually muted.\n\nIn general, this state should never be used. Instead, aim to explain to the user why the choice is wrong in an error message and make sure they understand how to correct it."
28686
+ },
28687
+ {
28688
+ "kind": "variable",
28689
+ "name": "Size",
28690
+ "type": {
28691
+ "text": "Story"
28692
+ },
28693
+ "default": "{ ...DefaultParams, name: 'Size', render: () => html` <div class=\"radio-group\"> <gds-flex gap=\"xl\" margin=\"0 auto\"> <gds-flex gap=\"s\" flex-direction=\"column\" flex=\"1\"> <gds-text tag=\"small\">Size: Large(default)</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> <gds-flex gap=\"s\" flex-direction=\"column\" flex=\"1\"> <gds-text tag=\"small\">Size: small</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" size=\"small\" > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> </gds-flex> </div> `, }",
28694
+ "description": "Radio buttons support two sizes:\n- Large (default): Standard size for most use cases\n- Small: Compact size for space-constrained layouts\n\nThe size can be set on the radio group and applies to all radio buttons within."
28695
+ },
28696
+ {
28697
+ "kind": "variable",
28698
+ "name": "Direction",
28699
+ "type": {
28700
+ "text": "Story"
28701
+ },
28702
+ "default": "{ ...DefaultParams, name: 'Direction', render: () => html` <div class=\"radio-group\"> <gds-flex gap=\"xl\" margin=\"0 auto\"> <gds-flex gap=\"s\" flex-direction=\"column\"> <gds-text tag=\"small\">Column (default)</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" show-extended-supporting-text > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"3\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"4\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> <gds-flex gap=\"s\" flex=\"1\" flex-direction=\"column\"> <gds-text tag=\"small\">Row</gds-text> <gds-divider opacity=\"0.1\"></gds-divider> <gds-radio-group label=\"Group Label\" supporting-text=\"Support text for the group\" value=\"4\" size=\"small\" direction=\"row\" show-extended-supporting-text > <span slot=\"extended-supporting-text\"> Extended supporting text for the group </span> <gds-radio label=\"Radio Label\" value=\"1\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"3\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"4\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"5\" supporting-text=\"Example support text\" ></gds-radio> <gds-radio label=\"Radio Label\" value=\"6\" supporting-text=\"Example support text\" ></gds-radio> </gds-radio-group> </gds-flex> </gds-flex> </div> `, }",
28703
+ "description": "Radio buttons can be arranged in two directions:\n- Column (default): Vertical stacking for clear separation\n- Row: Horizontal alignment for compact layouts that will break to new line when not enough space is available\n\nChoose the direction based on available space and number of options."
28704
+ },
28705
+ {
28706
+ "kind": "variable",
28707
+ "name": "GroupLabel",
28708
+ "type": {
28709
+ "text": "Story"
28710
+ },
28711
+ "default": "{ ...DefaultParams, name: 'Radio group label', render: () => html` <div class=\"radio-group\"> <gds-radio-group> <gds-radio label=\"Radio Label\" value=\"1\"></gds-radio> <gds-radio label=\"Radio Label\" value=\"2\"></gds-radio> </gds-radio-group> </div> `, }",
28712
+ "description": "While radio groups can be created without a label, it's recommended to always provide one for clarity and accessibility.\nThe label helps users understand what the options are for.\n\nIn certain cases when space is limited, the group label can be omitted."
28713
+ }
28714
+ ],
28818
28715
  "exports": [
28819
28716
  {
28820
28717
  "kind": "js",
28821
- "name": "GdsBackdrop",
28718
+ "name": "default",
28822
28719
  "declaration": {
28823
- "name": "GdsBackdrop",
28824
- "module": "src/components/popover/backdrop.ts"
28720
+ "name": "meta",
28721
+ "module": "src/components/radio/radio.stories.ts"
28722
+ }
28723
+ },
28724
+ {
28725
+ "kind": "js",
28726
+ "name": "RadioButton",
28727
+ "declaration": {
28728
+ "name": "RadioButton",
28729
+ "module": "src/components/radio/radio.stories.ts"
28730
+ }
28731
+ },
28732
+ {
28733
+ "kind": "js",
28734
+ "name": "Validation",
28735
+ "declaration": {
28736
+ "name": "Validation",
28737
+ "module": "src/components/radio/radio.stories.ts"
28738
+ }
28739
+ },
28740
+ {
28741
+ "kind": "js",
28742
+ "name": "DosAndDonts",
28743
+ "declaration": {
28744
+ "name": "DosAndDonts",
28745
+ "module": "src/components/radio/radio.stories.ts"
28746
+ }
28747
+ },
28748
+ {
28749
+ "kind": "js",
28750
+ "name": "Disabled",
28751
+ "declaration": {
28752
+ "name": "Disabled",
28753
+ "module": "src/components/radio/radio.stories.ts"
28754
+ }
28755
+ },
28756
+ {
28757
+ "kind": "js",
28758
+ "name": "Size",
28759
+ "declaration": {
28760
+ "name": "Size",
28761
+ "module": "src/components/radio/radio.stories.ts"
28762
+ }
28763
+ },
28764
+ {
28765
+ "kind": "js",
28766
+ "name": "Direction",
28767
+ "declaration": {
28768
+ "name": "Direction",
28769
+ "module": "src/components/radio/radio.stories.ts"
28770
+ }
28771
+ },
28772
+ {
28773
+ "kind": "js",
28774
+ "name": "GroupLabel",
28775
+ "declaration": {
28776
+ "name": "GroupLabel",
28777
+ "module": "src/components/radio/radio.stories.ts"
28825
28778
  }
28826
28779
  }
28827
28780
  ]
28828
28781
  },
28829
28782
  {
28830
28783
  "kind": "javascript-module",
28831
- "path": "src/components/popover/index.ts",
28784
+ "path": "src/components/radio/radio.styles.ts",
28785
+ "declarations": [
28786
+ {
28787
+ "kind": "variable",
28788
+ "name": "style",
28789
+ "default": "css` :host { cursor: pointer; } :host([disabled]) { color: var(--gds-sys-color-content-disabled-01); cursor: default; } :host(:focus) { outline: none; } `"
28790
+ }
28791
+ ],
28792
+ "exports": [
28793
+ {
28794
+ "kind": "js",
28795
+ "name": "default",
28796
+ "declaration": {
28797
+ "name": "style",
28798
+ "module": "src/components/radio/radio.styles.ts"
28799
+ }
28800
+ }
28801
+ ]
28802
+ },
28803
+ {
28804
+ "kind": "javascript-module",
28805
+ "path": "src/components/radio/radio.ts",
28832
28806
  "declarations": [],
28833
28807
  "exports": [
28834
28808
  {
28835
28809
  "kind": "js",
28836
- "name": "*",
28810
+ "name": "GdsRadio",
28837
28811
  "declaration": {
28838
- "name": "*",
28839
- "module": "src/components/popover/popover"
28812
+ "name": "GdsRadio",
28813
+ "module": "src/components/radio/radio.ts"
28840
28814
  }
28841
- },
28815
+ }
28816
+ ]
28817
+ },
28818
+ {
28819
+ "kind": "javascript-module",
28820
+ "path": "src/components/rich-text/index.ts",
28821
+ "declarations": [],
28822
+ "exports": [
28842
28823
  {
28843
28824
  "kind": "js",
28844
28825
  "name": "*",
28845
28826
  "declaration": {
28846
28827
  "name": "*",
28847
- "module": "src/components/popover/backdrop"
28828
+ "module": "src/components/rich-text/rich-text"
28848
28829
  }
28849
28830
  }
28850
28831
  ]
28851
28832
  },
28852
28833
  {
28853
28834
  "kind": "javascript-module",
28854
- "path": "src/components/popover/popover.component.ts",
28835
+ "path": "src/components/rich-text/rich-text.component.ts",
28855
28836
  "declarations": [
28856
- {
28857
- "kind": "function",
28858
- "name": "applyTriggerAriaAttributes",
28859
- "parameters": [
28860
- {
28861
- "name": "trigger",
28862
- "type": {
28863
- "text": "HTMLElement"
28864
- }
28865
- },
28866
- {
28867
- "name": "open",
28868
- "type": {
28869
- "text": "boolean"
28870
- }
28871
- },
28872
- {
28873
- "name": "popupRole",
28874
- "type": {
28875
- "text": "string"
28876
- }
28877
- }
28878
- ],
28879
- "description": "Apply the necessary ARIA attributes to a popover trigger element. Use this to apply correct\nattributes in advance if you render `<gds-popover>` conditionally, since the popover component\nonly applies these attributes when it initializes."
28880
- },
28881
28837
  {
28882
28838
  "kind": "class",
28883
- "description": "",
28884
- "name": "GdsPopover",
28885
- "slots": [
28839
+ "description": "`gds-rich-text` can be used to wrap generic HTML content and apply typography styles.\n\nThe wrapped content will render inside the shadowRoot of the `gds-rich-text` element, thereby applying the\ndefault typography styles and standard element styles defined in the Green Design System.",
28840
+ "name": "GdsRichText",
28841
+ "members": [
28886
28842
  {
28887
- "description": "Content of the popover",
28888
- "name": ""
28843
+ "kind": "field",
28844
+ "name": "captureMode",
28845
+ "type": {
28846
+ "text": "'clone' | 'move'"
28847
+ },
28848
+ "default": "'clone'",
28849
+ "description": "Capture mode for the content.\n\n- `clone` (default): Clones the content to the shadowRoot.\\\n This is the default and most compatible behaviour, since it leaves the original DOM untouched.\n the downside is that events added through `addEventListener` will not be retained in the cloned DOM.\n\n- `move`: Moves the content to the inner shadowRoot.\\\n This mode moves the full original sub-tree into the shadowRoot, leaving everything, including event\n listeners, intact.\n This mode is less compatible with some libraries that rely on the original DOM structure, for example React",
28850
+ "attribute": "captureMode"
28889
28851
  },
28890
28852
  {
28891
- "description": "Trigger element for the popover. If this slot is occupied, the popover will listen to keydown and click events on the trigger and automtaiclly open when clicked or when the trigger is focused and `ArrowDown` is pressed.",
28892
- "name": "trigger"
28893
- }
28894
- ],
28895
- "members": [
28853
+ "kind": "method",
28854
+ "name": "querySelectorAll",
28855
+ "return": {
28856
+ "type": {
28857
+ "text": "NodeList"
28858
+ }
28859
+ },
28860
+ "parameters": [
28861
+ {
28862
+ "name": "selector",
28863
+ "type": {
28864
+ "text": "string"
28865
+ }
28866
+ }
28867
+ ],
28868
+ "description": "Forwards the selector to the corresponding function on the inner shadowRoot."
28869
+ },
28896
28870
  {
28897
- "kind": "field",
28898
- "name": "DefaultMiddleware",
28899
- "type": {
28900
- "text": "Middleware[]"
28871
+ "kind": "method",
28872
+ "name": "querySelector",
28873
+ "return": {
28874
+ "type": {
28875
+ "text": "Element | null"
28876
+ }
28901
28877
  },
28902
- "static": true,
28903
- "default": "[ offset(8), shift({ crossAxis: true, padding: 8, }), ]",
28904
- "description": "The default set of middleware for Floating UI positioning used by GdsPopover."
28878
+ "parameters": [
28879
+ {
28880
+ "name": "selector",
28881
+ "type": {
28882
+ "text": "string"
28883
+ }
28884
+ }
28885
+ ],
28886
+ "description": "Forwards the selector to the corresponding function on the inner shadowRoot."
28905
28887
  },
28906
28888
  {
28907
28889
  "kind": "field",
28908
- "name": "open",
28890
+ "name": "innerHTML",
28909
28891
  "type": {
28910
- "text": "boolean"
28892
+ "text": "string"
28911
28893
  },
28912
- "default": "false",
28913
- "description": "Whether the popover is open.",
28914
- "attribute": "open",
28915
- "reflects": true
28894
+ "description": "Forwards innerHTML from the inner shadowRoot."
28916
28895
  },
28917
28896
  {
28918
28897
  "kind": "field",
28919
- "name": "popupRole",
28898
+ "name": "'align-self'",
28920
28899
  "type": {
28921
- "text": "'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'"
28900
+ "text": "string | undefined"
28922
28901
  },
28923
- "default": "'dialog'",
28924
- "description": "This is used to indicate the semantic role of the popover. This will set the `aria-haspopup` attribute on the trigger element.\nRead here for more information: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup",
28925
- "attribute": "popup-role"
28902
+ "description": "Style Expression Property that controls the `align-self` property.\nSupports all valid CSS `align-self` values.",
28903
+ "category": "Declarative layout / Style expression properties",
28904
+ "inheritedFrom": {
28905
+ "name": "withLayoutChildProps",
28906
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28907
+ }
28926
28908
  },
28927
28909
  {
28928
28910
  "kind": "field",
28929
- "name": "triggerRef",
28911
+ "name": "'justify-self'",
28930
28912
  "type": {
28931
- "text": "Promise<HTMLElement> | undefined"
28913
+ "text": "string | undefined"
28932
28914
  },
28933
- "description": "Optional way to assign a trigger element for the popover. When using Lit, this can take a value from a `@queryAsync` decorator in order to set the trigger element programatically."
28915
+ "description": "Style Expression Property that controls the `justify-self` property.\nSupports all valid CSS `justify-self` values.",
28916
+ "category": "Declarative layout / Style expression properties",
28917
+ "inheritedFrom": {
28918
+ "name": "withLayoutChildProps",
28919
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28920
+ }
28934
28921
  },
28935
28922
  {
28936
28923
  "kind": "field",
28937
- "name": "anchorRef",
28924
+ "name": "'place-self'",
28938
28925
  "type": {
28939
- "text": "Promise<HTMLElement> | undefined"
28926
+ "text": "string | undefined"
28940
28927
  },
28941
- "description": "Optional way to assign an anchor element for the popover. When using Lit, this can take a value from a `@queryAsync` decorator in order to set the anchor element programatically."
28928
+ "description": "Style Expression Property that controls the `place-self` property.\nSupports all valid CSS `place-self` values.",
28929
+ "category": "Declarative layout / Style expression properties",
28930
+ "inheritedFrom": {
28931
+ "name": "withLayoutChildProps",
28932
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28933
+ }
28942
28934
  },
28943
28935
  {
28944
28936
  "kind": "field",
28945
- "name": "label",
28937
+ "name": "'grid-column'",
28946
28938
  "type": {
28947
28939
  "text": "string | undefined"
28948
28940
  },
28949
- "default": "undefined",
28950
- "description": "Optional trigger element for the popover.",
28951
- "attribute": "label"
28941
+ "description": "Style Expression Property that controls the `grid-column` property.\nSupports all valid CSS grid-column values.\nDocumentation: https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column",
28942
+ "category": "Declarative layout / Style expression properties",
28943
+ "inheritedFrom": {
28944
+ "name": "withLayoutChildProps",
28945
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28946
+ }
28952
28947
  },
28953
28948
  {
28954
28949
  "kind": "field",
28955
- "name": "placement",
28950
+ "name": "'grid-row'",
28956
28951
  "type": {
28957
- "text": "Placement"
28952
+ "text": "string | undefined"
28958
28953
  },
28959
- "default": "'bottom-start'",
28960
- "description": "The placement of the popover relative to the trigger.\nAccepts any of the placements supported by Floating UI.",
28961
- "attribute": "placement"
28954
+ "description": "Style Expression Property that controls the `grid-row` property.\nSupports all valid CSS `grid-row` values.",
28955
+ "category": "Declarative layout / Style expression properties",
28956
+ "inheritedFrom": {
28957
+ "name": "withLayoutChildProps",
28958
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28959
+ }
28962
28960
  },
28963
28961
  {
28964
28962
  "kind": "field",
28965
- "name": "disableMobileStyles",
28963
+ "name": "'grid-area'",
28966
28964
  "type": {
28967
- "text": "boolean"
28965
+ "text": "string | undefined"
28968
28966
  },
28969
- "default": "false",
28970
- "description": "Whether to use a modal dialog in mobile viewport.",
28971
- "attribute": "disableMobileStyles"
28967
+ "description": "Style Expression Property that controls the `grid-area` property.\nSupports all valid CSS `grid-area` values.",
28968
+ "category": "Declarative layout / Style expression properties",
28969
+ "inheritedFrom": {
28970
+ "name": "withLayoutChildProps",
28971
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28972
+ }
28972
28973
  },
28973
28974
  {
28974
28975
  "kind": "field",
28975
- "name": "autofocus",
28976
+ "name": "flex",
28976
28977
  "type": {
28977
- "text": "boolean"
28978
+ "text": "string | undefined"
28978
28979
  },
28979
- "default": "false",
28980
- "description": "Whether the popover should autofocus the first slotted child when opened.",
28981
- "attribute": "autofocus"
28982
- },
28983
- {
28984
- "kind": "field",
28985
- "name": "calcMinWidth",
28986
- "description": "A callback that returns the minimum width of the popover.\nBy default, the popover minWidth will be as wide as the trigger element."
28987
- },
28988
- {
28989
- "kind": "field",
28990
- "name": "calcMaxWidth",
28991
- "description": "A callback that returns the maximum width of the popover.\nBy default, the popover maxWidth will be set to `auto` and will grow as needed."
28992
- },
28993
- {
28994
- "kind": "field",
28995
- "name": "calcMinHeight",
28996
- "description": "A callback that returns the minimum height of the popover.\nBy default, the popover minHeight will be set to `auto`"
28980
+ "description": "Style Expression Property that controls the `flex` property.\nSupports all valid CSS `flex` values.",
28981
+ "category": "Declarative layout / Style expression properties",
28982
+ "inheritedFrom": {
28983
+ "name": "withLayoutChildProps",
28984
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28985
+ }
28997
28986
  },
28998
28987
  {
28999
28988
  "kind": "field",
29000
- "name": "calcMaxHeight",
29001
- "description": "A callback that returns the maximum height of the popover.\nBy default, the popover maxHeight will be set to a hard coded pixel value (check source code)."
28989
+ "name": "order",
28990
+ "type": {
28991
+ "text": "string | undefined"
28992
+ },
28993
+ "description": "Style Expression Property that controls the `order` property.\nSupports all valid CSS `order` values.",
28994
+ "category": "Declarative layout / Style expression properties",
28995
+ "inheritedFrom": {
28996
+ "name": "withLayoutChildProps",
28997
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
28998
+ }
29002
28999
  },
29003
29000
  {
29004
29001
  "kind": "field",
29005
- "name": "nonmodal",
29002
+ "name": "margin",
29006
29003
  "type": {
29007
- "text": "boolean"
29004
+ "text": "string | undefined"
29008
29005
  },
29009
- "default": "false",
29010
- "description": "Whether the popover is nonmodal. When true, the popover will not trap focus and other elements\non the page will still be interactable while the popover is open.",
29011
- "attribute": "nonmodal",
29012
- "reflects": true
29006
+ "description": "Style Expression Property that controls the `margin` property.\nOnly accepts space tokens.",
29007
+ "category": "Declarative layout / Style expression properties",
29008
+ "inheritedFrom": {
29009
+ "name": "withMarginProps",
29010
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
29011
+ }
29013
29012
  },
29014
29013
  {
29015
29014
  "kind": "field",
29016
- "name": "backdrop",
29015
+ "name": "'margin-inline'",
29017
29016
  "type": {
29018
29017
  "text": "string | undefined"
29019
29018
  },
29020
- "description": "When this is set to `true`, the `:backdrop` pseudo-element will be visible if the popover is\nin modal mode. When not in modal mode (using the `nonmodal` attribute), this can instead be\nset to a selector matching a `<gds-backdrop>` element, in wich case the popover will take\ncontrol of that backdrop.\n\nExample:\n```html\n<gds-popover backdrop=\".my-backdrop\">\n <gds-button slot=\"trigger\">Open</gds-button>\n <p>Popover content</p>\n</gds-popover>\n<gds-backdrop class=\"my-backdrop\"></gds-backdrop>\n```",
29021
- "attribute": "backdrop"
29019
+ "description": "Style Expression Property that controls the `margin-inline` property.\nOnly accepts space tokens.",
29020
+ "category": "Declarative layout / Style expression properties",
29021
+ "inheritedFrom": {
29022
+ "name": "withMarginProps",
29023
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
29024
+ }
29022
29025
  },
29023
29026
  {
29024
29027
  "kind": "field",
29025
- "name": "floatingUIMiddleware",
29028
+ "name": "'margin-block'",
29026
29029
  "type": {
29027
- "text": "Middleware[]"
29030
+ "text": "string | undefined"
29028
29031
  },
29029
- "description": "An array of middleware for the Floating UI positioning algorithm. Here you can pass in an array\nof middleware to customize positioning to your needs. This array is passed directly to Floting UI,\nso you can just follow the documentation here: https://floating-ui.com/docs/middleware\n\nThis property does not have a corresponding attribute, so it can only be set in JavaScript.\n\nDefaults to `[offset(8), flip()]`"
29032
+ "description": "Style Expression Property that controls the `margin-block` property.\nOnly accepts space tokens.",
29033
+ "category": "Declarative layout / Style expression properties",
29034
+ "inheritedFrom": {
29035
+ "name": "withMarginProps",
29036
+ "module": "src/utils/mixins/declarative-layout-mixins.ts"
29037
+ }
29030
29038
  },
29031
29039
  {
29032
29040
  "kind": "method",
@@ -29158,158 +29166,94 @@
29158
29166
  }
29159
29167
  }
29160
29168
  ],
29161
- "events": [
29162
- {
29163
- "description": "Fired when the popover is opened or closed. Can be cancelled to prevent the popover from opening or closing. The `detail` object contains the `open` boolean to indicate the result of the state change, and the `reason` string which can be one of `show`, `close`, or `cancel`.",
29164
- "name": "gds-ui-state"
29165
- },
29166
- {
29167
- "name": "gds-element-disconnected",
29168
- "type": {
29169
- "text": "CustomEvent"
29170
- },
29171
- "description": "When the element is disconnected from the DOM",
29172
- "inheritedFrom": {
29173
- "name": "GdsElement",
29174
- "module": "src/gds-element.ts"
29175
- }
29176
- },
29177
- {
29178
- "name": "name",
29179
- "type": {
29180
- "text": "Event"
29181
- },
29182
- "inheritedFrom": {
29183
- "name": "GdsElement",
29184
- "module": "src/gds-element.ts"
29185
- }
29186
- },
29187
- {
29188
- "type": {
29189
- "text": "Event"
29190
- },
29191
- "inheritedFrom": {
29192
- "name": "GdsElement",
29193
- "module": "src/gds-element.ts"
29194
- }
29195
- }
29196
- ],
29197
29169
  "attributes": [
29198
29170
  {
29199
- "name": "open",
29200
- "type": {
29201
- "text": "boolean"
29202
- },
29203
- "default": "false",
29204
- "description": "Whether the popover is open.",
29205
- "fieldName": "open"
29206
- },
29207
- {
29208
- "name": "popup-role",
29209
- "type": {
29210
- "text": "'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'"
29211
- },
29212
- "default": "'dialog'",
29213
- "description": "This is used to indicate the semantic role of the popover. This will set the `aria-haspopup` attribute on the trigger element.\nRead here for more information: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-haspopup",
29214
- "fieldName": "popupRole"
29215
- },
29216
- {
29217
- "name": "label",
29218
- "type": {
29219
- "text": "string | undefined"
29220
- },
29221
- "default": "undefined",
29222
- "description": "Optional trigger element for the popover.",
29223
- "fieldName": "label"
29224
- },
29225
- {
29226
- "name": "placement",
29227
- "type": {
29228
- "text": "Placement"
29229
- },
29230
- "default": "'bottom-start'",
29231
- "description": "The placement of the popover relative to the trigger.\nAccepts any of the placements supported by Floating UI.",
29232
- "fieldName": "placement"
29233
- },
29234
- {
29235
- "name": "disableMobileStyles",
29171
+ "name": "captureMode",
29236
29172
  "type": {
29237
- "text": "boolean"
29173
+ "text": "'clone' | 'move'"
29238
29174
  },
29239
- "default": "false",
29240
- "description": "Whether to use a modal dialog in mobile viewport.",
29241
- "fieldName": "disableMobileStyles"
29175
+ "default": "'clone'",
29176
+ "description": "Capture mode for the content.\n\n- `clone` (default): Clones the content to the shadowRoot.\\\n This is the default and most compatible behaviour, since it leaves the original DOM untouched.\n the downside is that events added through `addEventListener` will not be retained in the cloned DOM.\n\n- `move`: Moves the content to the inner shadowRoot.\\\n This mode moves the full original sub-tree into the shadowRoot, leaving everything, including event\n listeners, intact.\n This mode is less compatible with some libraries that rely on the original DOM structure, for example React",
29177
+ "fieldName": "captureMode"
29242
29178
  },
29243
29179
  {
29244
- "name": "autofocus",
29180
+ "name": "gds-element",
29245
29181
  "type": {
29246
- "text": "boolean"
29182
+ "text": "string | undefined"
29247
29183
  },
29248
- "default": "false",
29249
- "description": "Whether the popover should autofocus the first slotted child when opened.",
29250
- "fieldName": "autofocus"
29184
+ "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
29185
+ "readonly": true,
29186
+ "fieldName": "gdsElementName",
29187
+ "inheritedFrom": {
29188
+ "name": "GdsElement",
29189
+ "module": "src/gds-element.ts"
29190
+ }
29191
+ }
29192
+ ],
29193
+ "mixins": [
29194
+ {
29195
+ "name": "withLayoutChildProps",
29196
+ "module": "/src/utils/mixins/declarative-layout-mixins"
29251
29197
  },
29252
29198
  {
29253
- "name": "nonmodal",
29199
+ "name": "withMarginProps",
29200
+ "module": "/src/utils/mixins/declarative-layout-mixins"
29201
+ }
29202
+ ],
29203
+ "superclass": {
29204
+ "name": "GdsElement",
29205
+ "module": "/src/gds-element"
29206
+ },
29207
+ "tagName": "gds-rich-text",
29208
+ "customElement": true,
29209
+ "events": [
29210
+ {
29211
+ "name": "gds-element-disconnected",
29254
29212
  "type": {
29255
- "text": "boolean"
29213
+ "text": "CustomEvent"
29256
29214
  },
29257
- "default": "false",
29258
- "description": "Whether the popover is nonmodal. When true, the popover will not trap focus and other elements\non the page will still be interactable while the popover is open.",
29259
- "fieldName": "nonmodal"
29215
+ "description": "When the element is disconnected from the DOM",
29216
+ "inheritedFrom": {
29217
+ "name": "GdsElement",
29218
+ "module": "src/gds-element.ts"
29219
+ }
29260
29220
  },
29261
29221
  {
29262
- "name": "backdrop",
29222
+ "name": "name",
29263
29223
  "type": {
29264
- "text": "string | undefined"
29224
+ "text": "Event"
29265
29225
  },
29266
- "description": "When this is set to `true`, the `:backdrop` pseudo-element will be visible if the popover is\nin modal mode. When not in modal mode (using the `nonmodal` attribute), this can instead be\nset to a selector matching a `<gds-backdrop>` element, in wich case the popover will take\ncontrol of that backdrop.\n\nExample:\n```html\n<gds-popover backdrop=\".my-backdrop\">\n <gds-button slot=\"trigger\">Open</gds-button>\n <p>Popover content</p>\n</gds-popover>\n<gds-backdrop class=\"my-backdrop\"></gds-backdrop>\n```",
29267
- "fieldName": "backdrop"
29226
+ "inheritedFrom": {
29227
+ "name": "GdsElement",
29228
+ "module": "src/gds-element.ts"
29229
+ }
29268
29230
  },
29269
29231
  {
29270
- "name": "gds-element",
29271
29232
  "type": {
29272
- "text": "string | undefined"
29233
+ "text": "Event"
29273
29234
  },
29274
- "description": "The unscoped name of this element. This attribute is set automatically by the element and is inteded to be read-only.",
29275
- "readonly": true,
29276
- "fieldName": "gdsElementName",
29277
29235
  "inheritedFrom": {
29278
29236
  "name": "GdsElement",
29279
29237
  "module": "src/gds-element.ts"
29280
29238
  }
29281
29239
  }
29282
- ],
29283
- "superclass": {
29284
- "name": "GdsElement",
29285
- "module": "/src/gds-element"
29286
- },
29287
- "tagName": "gds-popover",
29288
- "customElement": true
29240
+ ]
29289
29241
  }
29290
29242
  ],
29291
29243
  "exports": [
29292
29244
  {
29293
29245
  "kind": "js",
29294
- "name": "applyTriggerAriaAttributes",
29295
- "declaration": {
29296
- "name": "applyTriggerAriaAttributes",
29297
- "module": "src/components/popover/popover.component.ts"
29298
- }
29299
- },
29300
- {
29301
- "kind": "js",
29302
- "name": "GdsPopover",
29246
+ "name": "GdsRichText",
29303
29247
  "declaration": {
29304
- "name": "GdsPopover",
29305
- "module": "src/components/popover/popover.component.ts"
29248
+ "name": "GdsRichText",
29249
+ "module": "src/components/rich-text/rich-text.component.ts"
29306
29250
  }
29307
29251
  }
29308
29252
  ]
29309
29253
  },
29310
29254
  {
29311
29255
  "kind": "javascript-module",
29312
- "path": "src/components/popover/popover.stories.ts",
29256
+ "path": "src/components/rich-text/rich-text.stories.ts",
29313
29257
  "declarations": [
29314
29258
  {
29315
29259
  "kind": "variable",
@@ -29317,35 +29261,79 @@
29317
29261
  "type": {
29318
29262
  "text": "Meta"
29319
29263
  },
29320
- "default": "{ title: 'Components/Popover', component: 'gds-popover', parameters: { layout: 'centered', }, tags: ['autodocs'], argTypes: { ...argTablePropsFor('gds-popover'), }, }",
29321
- "description": "A popover is a temporary view that appears above other content."
29264
+ "default": "{ title: 'Components/Rich Text', component: 'gds-rich-text', tags: ['autodocs'], argTypes: { ...argTablePropsFor('gds-rich-text'), }, }",
29265
+ "description": "`gds-rich-text` can be used to wrap generic HTML content and apply typography styles.\n\nThe wrapped content will get captured and transferred to the inner shadowRoot of the `gds-rich-text` element.\n\nA typical use case for this component is to wrap a block of HTML content output from a CMS or other source\nthat you want to apply the design system typography to.\n\nIt supports out of the box all heading styles, paragraphs, lists, blockquotes, figures, tables, and more."
29322
29266
  },
29323
29267
  {
29324
29268
  "kind": "variable",
29325
- "name": "Usage",
29269
+ "name": "Card",
29326
29270
  "type": {
29327
29271
  "text": "Story"
29328
29272
  },
29329
- "default": "{ ...DefaultParams, }",
29330
- "description": "The popover can be used declaratively by adding a trigger button and content inside the popover element, like in the example below.\n\nIt is also possible to set the trigger and anchor by supplying DOM references (wrapped in promises) to the `triggerRef` and `anchorRef`\nproperties. This is useful when the trigger and anchor needs to be different elements."
29273
+ "default": "{ ...DefaultParams, name: 'Card', render: (args) => html` <gds-card> <gds-rich-text> <h1> The Starship <small>SS Endeavor</small> <mark>Exploration Class</mark> </h1> <h2>Heading one</h2> <h3>Heading test</h3> <p> The <strong>SS Endeavor</strong> is a state-of-the-art exploration class starship designed for deep space missions. Equipped with advanced technology and robust systems, it aims to expand our understanding of the universe. With a focus on <em>interstellar travel</em>, the SS Endeavor features a unique propulsion system that allows for faster-than-light travel. Its mission is to explore uncharted territories and gather data on distant celestial bodies. <a href=\"#\">Link</a> </p> <figure> <img src=\"https://placehold.co/600x400\" alt=\"SS Endeavor Starship\" /> <figcaption> Artist's rendition of the SS Endeavor in flight. </figcaption> </figure> <blockquote> <p> \"The SS Endeavor represents the pinnacle of human engineering and ambition. It is not just a vessel; it is our gateway to the stars.\" <cite>— Dr. Amelia Carter, Chief Engineer</cite> </p> </blockquote> <p> For detailed specifications, please refer to the <a href=\"javascript:;\" onclick=\"console.log('Accessing starship specifications')\" >technical documentation</a >. The SS Endeavor is equipped with cutting-edge systems that ensure the safety and efficiency of its crew during long-duration missions. </p> <p> Furthermore, <mark>SS Endeavor</mark> is designed with a modular approach, allowing for easy <code>upgrades</code> and <code>maintenance</code>. </p> <h2>Specifications</h2> <ul> <li> Length: 150 meters Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </li> <li>Width: 50 meters</li> <li>Height: 30 meters</li> <li>Crew Capacity: 100 personnel</li> <li>Propulsion: Quantum Slipstream Drive</li> <li>Maximum Speed: 10 light-years per hour</li> </ul> <hr /> <h2>One digit list</h2> <ol> <li> Conduct scientific research on exoplanets, focusing on atmospheric composition <a href=\"#\">Inline link</a> and potential habitability. </li> <li> Establish contact with potential extraterrestrial civilizations through advanced signal detection and transmission protocols. </li> <li> Collect comprehensive data on diverse cosmic phenomena, including black hole dynamics, supernova remnants, and dark matter distribution. </li> <li> Test new technologies in real-world scenarios, specifically advanced propulsion systems for interstellar travel. </li> <li> Test new technologies in real-world scenarios, implementing closed-loop life support systems for long-duration space missions. </li> </ol> <h2>Two digit list</h2> <ol> <li> Conduct scientific research on exoplanets, focusing on atmospheric composition <a href=\"#\">Inline link</a> and potential habitability. </li> <li> Establish contact with potential extraterrestrial civilizations through advanced signal detection and transmission protocols. </li> <li> Collect comprehensive data on diverse cosmic phenomena, including black hole dynamics, supernova remnants, and dark matter distribution. </li> <li> Test new technologies in real-world scenarios, specifically advanced propulsion systems for interstellar travel. </li> <li> Test new technologies in real-world scenarios, implementing closed-loop life support systems for long-duration space missions. </li> <li> Test new technologies in real-world scenarios, evaluating the effectiveness of advanced radiation shielding materials. </li> <li> Test new technologies in real-world scenarios, deploying autonomous robotic systems for deep-space exploration and resource extraction. </li> <li> Test new technologies in real-world scenarios, analyzing the performance of quantum communication networks in space. </li> <li> Test new technologies in real-world scenarios, using advanced AI for real time data analysis and decision making. </li> <li> Investigate the origins and evolution of the universe through high-resolution astronomical observations. </li> <li> Develop and deploy advanced sensor arrays for detecting gravitational waves and other subtle cosmic signals. </li> <li> Analyze asteroid compositions to understand the early solar system and potential resources. </li> <li> Map the galactic structure with unprecedented accuracy, revealing hidden star systems and nebula. </li> <li> Study the effects of prolonged space travel on human physiology and psychology, preparing for future interstellar journeys. </li> <li> Create detailed models of planetary formation and evolution, improving our understanding of planet diversity. </li> <li> Explore the possibility of utilizing advanced energy sources, like fusion reactors, for deep space exploration. </li> </ol> <h3>Research Areas</h3> <details name=\"named-details\"> <summary>Focus Areas</summary> <p>The SS Endeavor will focus on the following research areas:</p> <ul> <li>Astrobiology</li> <li>Exoplanetary geology</li> <li>Astrophysics and cosmology</li> <li>Space weather and its effects on technology</li> </ul> </details> <details name=\"named-details\"> <summary>Exploration Objectives</summary> <p> The SS Endeavor aims to achieve significant breakthroughs in the following exploration objectives: </p> <ul> <li> Mapping the surface of Mars for potential human colonization </li> <li>Studying the atmospheres of gas giants</li> <li>Investigating the potential for life on Europa</li> <li>Understanding the dynamics of asteroid belts</li> </ul> </details> <details name=\"named-details\"> <summary>Technological Innovations</summary> <p> The SS Endeavor will develop and implement cutting-edge technologies in these areas: </p> <ul> <li>Advanced propulsion systems for deep space travel</li> <li>Autonomous robotic systems for planetary exploration</li> <li> Next-generation communication systems for interstellar data transmission </li> <li>Innovative life support systems for long-duration missions</li> </ul> </details> <p> In summary, the <strong>SS Endeavor</strong> is poised to lead humanity's next great leap into the cosmos. <s>With the right investments and support,</s> its missions will pave the way for future exploration and discovery. <mark>Join us</mark> as we embark on this exciting journey into the unknown. </p> <table> <thead> <tr> <th>Component</th> <th>Details</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td>Life Support System</td> <td>Advanced recycling and oxygen generation</td> <td>Ensures crew survival during long missions</td> </tr> <tr> <td>Navigation System</td> <td>AI-assisted star mapping</td> <td>Guides the ship through uncharted space</td> </tr> <tr> <td>Defensive Systems</td> <td>Energy shields and hull plating</td> <td>Protects against cosmic threats</td> </tr> <tr> <td>Scientific Labs</td> <td>Equipped for various research disciplines</td> <td>Facilitates on-board experiments</td> </tr> <tr> <td>Propulsion System</td> <td>Quantum Slipstream Drive</td> <td>Enables faster-than-light travel</td> </tr> </tbody> </table> <h2>Iframe</h2> <iframe src=\"https://example.com/\" height=\"400\"></iframe> </gds-rich-text> </gds-card> `, }"
29331
29274
  },
29332
29275
  {
29333
29276
  "kind": "variable",
29334
- "name": "CancelEvent",
29277
+ "name": "Headings",
29335
29278
  "type": {
29336
29279
  "text": "Story"
29337
29280
  },
29338
- "default": "{ ...DefaultParams, render: () => html` <gds-popover id=\"cancellable\" @gds-ui-state=${(e: CustomEvent) => e.detail.reason === 'close' && e.preventDefault()} > <gds-button rank=\"secondary\" slot=\"trigger\"> Show popover <gds-icon-chevron-bottom slot=\"trail\"></gds-icon-chevron-bottom> </gds-button> <div style=\"padding: 1rem; padding-top: 0\"> <h3>Customized closing behavior</h3> <p> This popover can only be closed by click the button below or hitting escape. </p> <gds-button rank=\"primary\" @click=${() => { ;(document.getElementById('cancellable') as GdsPopover).open = false }} >Close me!</gds-button > </div> </gds-popover>`, }",
29339
- "description": "By default, the popover will close when clicking outside or hitting the escape key. This behavior can be customized by listening to the `gds-ui-state` event and calling `preventDefault()` on the event object when the popover should not close.\n\nFor example:\n\n```html\n<gds-popover"
29281
+ "default": "{ ...DefaultParams, name: 'Headings', render: (args) => html` <gds-rich-text> <!-- <h1>The Starship SS Endeavor Exploration Class</h1> <h2>Mission Alpha Centauri Deep Space Exploration</h2> <h3>Rocket Falcon Heavy Launch Vehicle</h3> <h4>Engine Raptor Next-Gen Propulsion</h4> <h5>Module Dragon Crew Transport</h5> <h6>Satellite Starlink Global Internet</h6> --> <h1>Heading 1</h1> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h2>Heading 2</h2> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h3>Heading 3</h3> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h4>Heading 4</h4> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h5>Heading 5</h5> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <h6>Heading 6</h6> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </p> </gds-rich-text> `, }",
29282
+ "description": "`gds-rich-text` can be used to wrap generic HTML content and apply typography styles.\nIt supports out of the box all heading styles from h1 to h6 based on the green design system typography styles."
29340
29283
  },
29341
29284
  {
29342
29285
  "kind": "variable",
29343
- "name": "Customization",
29286
+ "name": "Lists",
29344
29287
  "type": {
29345
29288
  "text": "Story"
29346
29289
  },
29347
- "default": "{ ...DefaultParams, render: () => html`<gds-div width=\"700px\" height=\"250px\"> <gds-card variant=\"secondary\" width=\"720px\" border=\"4xs\" border-width=\"0 0 4xs\" border-radius=\"0\" padding=\"0\" position=\"fixed\" flex-direction=\"row\" inset=\"0 auto auto 0\" z-index=\"1000\" > <gds-popover> <gds-menu-button slot=\"trigger\"> <gds-icon-chevron-bottom slot=\"trail\"></gds-icon-chevron-bottom> Basic popover </gds-menu-button compact> <div style=\"padding: 1rem;\">Basic popover</div> </gds-popover> <gds-popover nonmodal backdrop=\"#my-backdrop\" .floatingUIMiddleware=${[{ fn: ({ y }) => ({ x: 25, y: y + 8 }) }]} .calcMaxWidth=${() => '670px'}> <gds-menu-button slot=\"trigger\"> <gds-icon-chevron-bottom slot=\"trail\"></gds-icon-chevron-bottom> With custom backdrop and positioning middleware </gds-menu-button> <div style=\"padding: 0 1rem;\"> <h3>Customized popover</h3> <p>In this popover, we're using custom Floating UI middleware to control the positioning, and <i>calcMaxWidth</i> to set the size.</p> <p>We're also using a backdrop element, referenced by the <i>backdrop</i> attribute, to dim the background below the menu bar.</p> </div> </gds-popover> </gds-card> <gds-backdrop id=\"my-backdrop\"></gds-backdrop> </gds-div>`, }",
29348
- "description": "Here is an example of how the popover can be customized with sizing, placement and backdrop."
29290
+ "default": "{ ...DefaultParams, name: 'Lists', render: (args) => html` <gds-rich-text> <h2>Key Technologies in Space Exploration</h2> <ul> <li>Rocket propulsion systems</li> <li>Life support systems</li> <li>Communication satellites</li> <li>Space habitats and modules</li> <li>Robotic exploration rovers</li> <li>Advanced materials for spacecraft</li> </ul> <h2>Major Milestones in Space Exploration</h2> <ol> <li>Launch of Sputnik 1 (1957) - The first artificial satellite.</li> <li> First human in space (Yuri Gagarin, 1961) - Historic manned spaceflight. </li> <li> Apollo 11 Moon landing (1969) - First humans to walk on the Moon. </li> <li> Launch of the Space Shuttle (1981) - Introduction of reusable spacecraft. </li> <li> Mars Rover Curiosity landing (2012) - Advanced exploration of the Martian surface. </li> <li> Launch of the James Webb Space Telescope (2021) - Next-generation space observatory. </li> </ol> </gds-rich-text> `, }",
29291
+ "description": "`gds-rich-text` has built-in support for ordered and unordered lists.\nIt applies consistent spacing and typography styles to list items."
29292
+ },
29293
+ {
29294
+ "kind": "variable",
29295
+ "name": "Details",
29296
+ "type": {
29297
+ "text": "Story"
29298
+ },
29299
+ "default": "{ ...DefaultParams, name: 'Details', render: (args) => html` <gds-rich-text> <h3>Research Areas</h3> <details name=\"named-details\"> <summary>Focus Areas</summary> <p>The SS Endeavor will focus on the following research areas:</p> <ul> <li>Astrobiology</li> <li>Exoplanetary geology</li> <li>Astrophysics and cosmology</li> <li>Space weather and its effects on technology</li> </ul> </details> <details name=\"named-details\"> <summary>Exploration Objectives</summary> <p> The SS Endeavor aims to achieve significant breakthroughs in the following exploration objectives: </p> <ul> <li>Mapping the surface of Mars for potential human colonization</li> <li>Studying the atmospheres of gas giants</li> <li>Investigating the potential for life on Europa</li> <li>Understanding the dynamics of asteroid belts</li> </ul> </details> <details name=\"named-details\"> <summary>Technological Innovations</summary> <p> The SS Endeavor will develop and implement cutting-edge technologies in these areas: </p> <ul> <li>Advanced propulsion systems for deep space travel</li> <li>Autonomous robotic systems for planetary exploration</li> <li> Next-generation communication systems for interstellar data transmission </li> <li>Innovative life support systems for long-duration missions</li> </ul> </details> </gds-rich-text> `, }",
29300
+ "description": "`gds-rich-text` has built-in support for details html element.\n\nThe details element is a disclosure widget from HTML5 that can be used to hide or show additional content."
29301
+ },
29302
+ {
29303
+ "kind": "variable",
29304
+ "name": "Blockquote",
29305
+ "type": {
29306
+ "text": "Story"
29307
+ },
29308
+ "default": "{ ...DefaultParams, name: 'Blockquote', render: (args) => html` <gds-rich-text> <h2>Inspirational Quotes from Space Exploration Pioneers</h2> <blockquote> <p> \"That's one small step for [a] man, one giant leap for mankind.\" <cite>— Neil Armstrong, Apollo 11 Astronaut</cite> </p> </blockquote> <blockquote> <p> \"The important achievement of Apollo was demonstrating that humanity is not forever chained to this planet and our visions go rather further than that and our opportunities are unlimited.\" <cite>— Neil Armstrong</cite> </p> </blockquote> <blockquote> <p> \"To confine our attention to terrestrial matters would be to limit the human spirit.\" <cite>— Stephen Hawking, Theoretical Physicist</cite> </p> </blockquote> <blockquote> <p> \"The Earth is the cradle of humanity, but mankind cannot stay in the cradle forever.\" <cite>— Konstantin Tsiolkovsky, Rocket Scientist</cite> </p> </blockquote> <blockquote> <p> \"I don't want to be an astronaut. I want to be a space explorer.\" <cite>— Chris Hadfield, Astronaut</cite> </p> </blockquote> </gds-rich-text> `, }",
29309
+ "description": "`gds-rich-text` has built-in support blockquote element."
29310
+ },
29311
+ {
29312
+ "kind": "variable",
29313
+ "name": "Formatting",
29314
+ "type": {
29315
+ "text": "Story"
29316
+ },
29317
+ "default": "{ ...DefaultParams, name: 'Formatting', render: (args) => html` <gds-rich-text> <h3>Key Concepts in Space Exploration</h3> <p> The field of space exploration is constantly evolving. It is essential to understand the <strong>fundamental principles</strong> that guide our missions. For example, <mark>propulsion technology</mark> is crucial for <em>successful space travel</em>. Moreover, the study of <s>black holes</s> has revealed significant insights into the <small>nature of the universe</small>. </p> <p> As we continue to explore the cosmos, <strong>collaboration</strong> among international space agencies is vital. Together, we can achieve <mark>greater advancements</mark> in our understanding of the universe. </p> </gds-rich-text> `, }",
29318
+ "description": "`gds-rich-text` has built-in support for inline formatting tags such as `s`, `mark`, `strong`,`small` and `em`."
29319
+ },
29320
+ {
29321
+ "kind": "variable",
29322
+ "name": "Table",
29323
+ "type": {
29324
+ "text": "Story"
29325
+ },
29326
+ "default": "{ ...DefaultParams, name: 'Table', render: (args) => html` <gds-rich-text> <h2>Significant Space Missions</h2> <table> <thead> <tr> <th>Mission Name</th> <th>Launch</th> <th>Objectives</th> <th>Outcomes</th> </tr> </thead> <tbody> <tr> <td>Apollo 11</td> <td>1969</td> <td>First manned Moon landing</td> <td> Successful lunar landing; Neil Armstrong and Buzz Aldrin walked on the Moon. </td> </tr> <tr> <td>Voyager 1</td> <td>1977</td> <td>Explore outer planets and interstellar space</td> <td> Provided detailed images of Jupiter and Saturn; currently in interstellar space. </td> </tr> <tr> <td>Hubble Space Telescope</td> <td>1990</td> <td>Observe distant galaxies and cosmic phenomena</td> <td> Revolutionized astronomy; provided stunning images and data. </td> </tr> <tr> <td>Curiosity Rover</td> <td>2011</td> <td>Explore Mars' surface and assess habitability</td> <td> Confirmed the presence of water; conducted extensive geological analysis. </td> </tr> <tr> <td>James Webb Space Telescope</td> <td>2021</td> <td>Observe the early universe and exoplanets</td> <td>Expected to provide unprecedented insights into the cosmos.</td> </tr> </tbody> </table> </gds-rich-text> `, }",
29327
+ "description": "`gds-rich-text` has built-in support for tables."
29328
+ },
29329
+ {
29330
+ "kind": "variable",
29331
+ "name": "Basic",
29332
+ "type": {
29333
+ "text": "Story"
29334
+ },
29335
+ "default": "{ ...DefaultParams, name: 'Theme', render: (args) => html` <gds-card variant=\"tertiary\"> <gds-rich-text> <h1> The Starship <small>SS Endeavor</small> <mark>Exploration Class</mark> </h1> <h2>Heading one</h2> <h3>Heading test</h3> <p> The <strong>SS Endeavor</strong> is a state-of-the-art exploration class starship designed for deep space missions. Equipped with advanced technology and robust systems, it aims to expand our understanding of the universe. With a focus on <em>interstellar travel</em>, the SS Endeavor features a unique propulsion system that allows for faster-than-light travel. Its mission is to explore uncharted territories and gather data on distant celestial bodies. <a href=\"#\">Link</a> </p> <figure> <img src=\"https://placehold.co/600x400\" alt=\"SS Endeavor Starship\" /> <figcaption> Artist's rendition of the SS Endeavor in flight. </figcaption> </figure> <blockquote> <p> \"The SS Endeavor represents the pinnacle of human engineering and ambition. It is not just a vessel; it is our gateway to the stars.\" <cite>— Dr. Amelia Carter, Chief Engineer</cite> </p> </blockquote> <p> For detailed specifications, please refer to the <a href=\"javascript:;\" onclick=\"console.log('Accessing starship specifications')\" >technical documentation</a >. The SS Endeavor is equipped with cutting-edge systems that ensure the safety and efficiency of its crew during long-duration missions. </p> <p> Furthermore, <mark>SS Endeavor</mark> is designed with a modular approach, allowing for easy upgrades and maintenance. </p> <h2>Specifications</h2> <ul> <li> Length: 150 meters Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </li> <li>Width: 50 meters</li> <li>Height: 30 meters</li> <li>Crew Capacity: 100 personnel</li> <li>Propulsion: Quantum Slipstream Drive</li> <li>Maximum Speed: 10 light-years per hour</li> </ul> <hr /> <h2>Mission Objectives</h2> <ol> <li>Conduct scientific research on exoplanets.</li> <li> Establish contact with potential extraterrestrial civilizations. </li> <li>Collect data on cosmic phenomena.</li> <li>Test new technologies in real-world scenarios.</li> </ol> <h3>Research Areas</h3> <details name=\"named-details\"> <summary>Focus Areas</summary> <p>The SS Endeavor will focus on the following research areas:</p> <ul> <li>Astrobiology</li> <li>Exoplanetary geology</li> <li>Astrophysics and cosmology</li> <li>Space weather and its effects on technology</li> </ul> </details> <details name=\"named-details\"> <summary>Exploration Objectives</summary> <p> The SS Endeavor aims to achieve significant breakthroughs in the following exploration objectives: </p> <ul> <li> Mapping the surface of Mars for potential human colonization </li> <li>Studying the atmospheres of gas giants</li> <li>Investigating the potential for life on Europa</li> <li>Understanding the dynamics of asteroid belts</li> </ul> </details> <details name=\"named-details\"> <summary>Technological Innovations</summary> <p> The SS Endeavor will develop and implement cutting-edge technologies in these areas: </p> <ul> <li>Advanced propulsion systems for deep space travel</li> <li>Autonomous robotic systems for planetary exploration</li> <li> Next-generation communication systems for interstellar data transmission </li> <li>Innovative life support systems for long-duration missions</li> </ul> </details> <p> In summary, the <strong>SS Endeavor</strong> is poised to lead humanity's next great leap into the cosmos. <s>With the right investments and support,</s> its missions will pave the way for future exploration and discovery. <mark>Join us</mark> as we embark on this exciting journey into the unknown. </p> <table> <thead> <tr> <th>Component</th> <th>Details</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td>Life Support System</td> <td>Advanced recycling and oxygen generation</td> <td>Ensures crew survival during long missions</td> </tr> <tr> <td>Navigation System</td> <td>AI-assisted star mapping</td> <td>Guides the ship through uncharted space</td> </tr> <tr> <td>Defensive Systems</td> <td>Energy shields and hull plating</td> <td>Protects against cosmic threats</td> </tr> <tr> <td>Scientific Labs</td> <td>Equipped for various research disciplines</td> <td>Facilitates on-board experiments</td> </tr> <tr> <td>Propulsion System</td> <td>Quantum Slipstream Drive</td> <td>Enables faster-than-light travel</td> </tr> </tbody> </table> <h2>Iframe</h2> <iframe src=\"https://example.com/\" height=\"400\"></iframe> </gds-rich-text> </gds-card> `, }",
29336
+ "description": "Rich text can be used with other components to create engaging content.\nIn this example, we combine rich text with a card component to showcase how colors will be applied.\n\nExample:\n\n```html\n<gds-card variant=\"tertiary\">\n <gds-rich-text>\n ...\n </gds-rich-text>\n</gds-card>\n```"
29349
29337
  }
29350
29338
  ],
29351
29339
  "exports": [
@@ -29354,95 +29342,107 @@
29354
29342
  "name": "default",
29355
29343
  "declaration": {
29356
29344
  "name": "meta",
29357
- "module": "src/components/popover/popover.stories.ts"
29345
+ "module": "src/components/rich-text/rich-text.stories.ts"
29358
29346
  }
29359
29347
  },
29360
29348
  {
29361
29349
  "kind": "js",
29362
- "name": "Usage",
29350
+ "name": "Card",
29363
29351
  "declaration": {
29364
- "name": "Usage",
29365
- "module": "src/components/popover/popover.stories.ts"
29352
+ "name": "Card",
29353
+ "module": "src/components/rich-text/rich-text.stories.ts"
29366
29354
  }
29367
29355
  },
29368
29356
  {
29369
29357
  "kind": "js",
29370
- "name": "CancelEvent",
29358
+ "name": "Headings",
29371
29359
  "declaration": {
29372
- "name": "CancelEvent",
29373
- "module": "src/components/popover/popover.stories.ts"
29360
+ "name": "Headings",
29361
+ "module": "src/components/rich-text/rich-text.stories.ts"
29374
29362
  }
29375
29363
  },
29376
29364
  {
29377
29365
  "kind": "js",
29378
- "name": "Customization",
29366
+ "name": "Lists",
29379
29367
  "declaration": {
29380
- "name": "Customization",
29381
- "module": "src/components/popover/popover.stories.ts"
29368
+ "name": "Lists",
29369
+ "module": "src/components/rich-text/rich-text.stories.ts"
29382
29370
  }
29383
- }
29384
- ]
29385
- },
29386
- {
29387
- "kind": "javascript-module",
29388
- "path": "src/components/popover/popover.styles.ts",
29389
- "declarations": [
29371
+ },
29390
29372
  {
29391
- "kind": "variable",
29392
- "name": "style",
29393
- "default": "css` @layer base, reset, transitional-styles; @layer base { :host { display: contents; } :host > div:not([hidden]) { display: contents; } :host([open]) dialog { opacity: 1; box-sizing: border-box; visibility: visible; } dialog { display: flex; flex-direction: column; inset: auto; position: fixed; overflow: hidden; padding: 0px; box-sizing: border-box; right: 0; margin: 0; box-shadow: var(--gds-sys-shadow-l-01); border: var(--gds-sys-space-5xs) solid var(--gds-sys-color-border-subtle-01); border-radius: var(--gds-sys-radius-s); overscroll-behavior: contain; } :host([nonmodal]) dialog { z-index: 1; } @media (max-width: 576px) { dialog.use-modal-in-mobile { border-radius: var(--gds-sys-radius-m) var(--gds-sys-radius-m) 0 0; transition: transform var(--gds-sys-motion-duration-fastest) ease; min-width: 100vw; position: fixed; bottom: 0; left: 0; padding-bottom: 0; transform: translateY(0); @starting-style { transform: translateY(100%); } &::backdrop { background-color: rgba(0, 0, 0, 0.3); display: block; position: fixed; opacity: 1; transition: opacity var(--gds-sys-motion-duration-fast) ease; @starting-style { opacity: 0; } } } } @media (min-width: 577px) { header { display: none; } } header { display: none; } @media (min-width: 577px) { dialog:not(.has-backdrop)::backdrop { background-color: transparent; display: block; position: fixed; } } } `"
29394
- }
29395
- ],
29396
- "exports": [
29373
+ "kind": "js",
29374
+ "name": "Details",
29375
+ "declaration": {
29376
+ "name": "Details",
29377
+ "module": "src/components/rich-text/rich-text.stories.ts"
29378
+ }
29379
+ },
29397
29380
  {
29398
29381
  "kind": "js",
29399
- "name": "default",
29382
+ "name": "Blockquote",
29400
29383
  "declaration": {
29401
- "name": "style",
29402
- "module": "src/components/popover/popover.styles.ts"
29384
+ "name": "Blockquote",
29385
+ "module": "src/components/rich-text/rich-text.stories.ts"
29386
+ }
29387
+ },
29388
+ {
29389
+ "kind": "js",
29390
+ "name": "Formatting",
29391
+ "declaration": {
29392
+ "name": "Formatting",
29393
+ "module": "src/components/rich-text/rich-text.stories.ts"
29394
+ }
29395
+ },
29396
+ {
29397
+ "kind": "js",
29398
+ "name": "Table",
29399
+ "declaration": {
29400
+ "name": "Table",
29401
+ "module": "src/components/rich-text/rich-text.stories.ts"
29402
+ }
29403
+ },
29404
+ {
29405
+ "kind": "js",
29406
+ "name": "Basic",
29407
+ "declaration": {
29408
+ "name": "Basic",
29409
+ "module": "src/components/rich-text/rich-text.stories.ts"
29403
29410
  }
29404
29411
  }
29405
29412
  ]
29406
29413
  },
29407
29414
  {
29408
29415
  "kind": "javascript-module",
29409
- "path": "src/components/popover/popover.trans.styles.ts",
29416
+ "path": "src/components/rich-text/rich-text.styles.ts",
29410
29417
  "declarations": [
29411
29418
  {
29412
- "kind": "function",
29413
- "name": "register"
29419
+ "kind": "variable",
29420
+ "name": "style",
29421
+ "default": "css` :host { font: var(--gds-sys-text-body-regular-m); --default-border: 1px solid color-mix(in srgb, currentColor, transparent 80%); letter-spacing: 0.0125rem; display: block; } h1, h2, h3, h4, h5, h6 { margin-top: var(--gds-sys-space-2xl); margin-bottom: var(--gds-sys-space-xs); } :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: unset; } h1 + h2 { margin-top: 0; } h2 + h3 { margin-top: 0; } h3 + h4 { margin-top: 0; } h4 + h5 { margin-top: 0; } h4 + h5 { margin-top: 0; } h5 + h6 { margin-top: 0; } p { margin: 0; margin-bottom: var(--gds-sys-space-m); max-width: 80ch; } blockquote { margin: unset; margin-block: 2lh; border-left: 0.2rem solid currentColor; padding-left: 2ch; max-width: 40ch; } code { background: var(--gds-sys-color-l3-neutral-02); color: var(--gds-sys-color-content-neutral-01); border-radius: var(--gds-sys-radius-xs); padding: var(--gds-sys-space-3xs); font: var(--gds-sys-text-body-book-s); } hr { border: none; border-top: var(--default-border); margin: var(--gds-sys-space-xl) 0; } s { text-decoration: underline; text-decoration-skip-ink: none; text-underline-offset: -0.22lh; } mark { color: currentColor; background-color: color-mix(in srgb, currentColor, transparent 80%); } /* * lists * ----------------------------------------------------------- */ ul, ol { padding-inline-start: 2ch; margin: unset; margin-bottom: 1lh; max-width: 80ch; } ol { list-style-type: none; counter-reset: ordered-list; margin: unset; padding: unset; } ol li { padding-left: 3.6ch; position: relative; } ol li:before { counter-increment: ordered-list; content: counter(ordered-list) '.'; left: 0.2rem; position: absolute; } ol:not(:has(li:nth-child(10))) li { padding-left: 2.4ch; } ol:has(li:nth-child(10)) li:nth-child(-n + 9):before { left: 1.4ch; } li { padding: 0 0 0.3lh 0; } ul li:last-child { padding: 0; } ul li::marker { content: '– '; } /* * figure and image * ----------------------------------------------------------- */ img { display: block; border-radius: var(--gds-sys-radius-xs); } figure { margin: 0; padding: 0; margin-top: var(--gds-sys-space-xl); } figcaption { font-size: smaller; margin-block-start: var(--gds-sys-space-xs); } /* * table * ----------------------------------------------------------- */ table { border-collapse: separate; border-spacing: 0; width: 100%; border: var(--default-border); border-radius: var(--gds-sys-radius-s); margin-top: var(--gds-sys-space-xl); } th { font-weight: var(--gds-sys-text-weight-book); text-align: left; border-bottom: var(--default-border); border-left: transparent; border-right: transparent; color: currentColor; } th:not(:last-child) { border-right: var(--default-border); } th, td { padding: 0.3lh 2ch; } td:not(:last-child) { border-right: var(--default-border); } tr:nth-child(even) td { background: color-mix(in srgb, currentColor, transparent 95%); } /* * Details * ----------------------------------------------------------- */ details { border-top: solid var(--gds-sys-space-5xs) color-mix(in srgb, currentColor, transparent 90%); font: var(--gds-sys-text-body-regular-m); } summary { font-weight: var(--gds-sys-text-weight-regular); list-style: none; padding: 0.4lh 0.2ch; font: var(--gds-sys-text-body-regular-l); color: currentColor; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; outline-offset: var(--gds-sys-space-3xs); outline-color: currentColor; padding-inline: var(--gds-sys-space-m); } details summary::-webkit-details-marker { display: none; } summary:focus-visible { border-radius: var(--gds-sys-radius-2xs); } details:hover summary { background: color-mix(in srgb, currentColor, transparent 95%); } summary::after { content: '+'; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; font: var(--gds-sys-text-body-regular-l); } details[open] summary::after { content: '-'; } details[open] { border-bottom: var(--gds-sys-space-5xs) solid color-mix(in srgb, currentColor, transparent 95%); padding-bottom: 0.4lh; background: color-mix(in srgb, currentColor, transparent 95%); } details[open] > *:not(summary) { margin-left: var(--gds-sys-space-m); } details[open] summary { margin-bottom: 0.4lh; } details[open] + details { border: none; } details:last-of-type { border-bottom: var(--gds-sys-space-5xs) solid color-mix(in srgb, currentColor, transparent 90%); margin-bottom: var(--gds-sys-space-xl); } a, a:visited { color: currentColor; text-decoration-color: currentColor; } /* * Iframe */ iframe { border: var(--gds-sys-space-5xs) solid var(--gds-sys-color-border-subtle-01); border-radius: var(--gds-sys-radius-xs); min-width: 100%; margin-bottom: var(--gds-sys-space-l); } `"
29414
29422
  }
29415
29423
  ],
29416
29424
  "exports": [
29417
- {
29418
- "kind": "js",
29419
- "name": "register",
29420
- "declaration": {
29421
- "name": "register",
29422
- "module": "src/components/popover/popover.trans.styles.ts"
29423
- }
29424
- },
29425
29425
  {
29426
29426
  "kind": "js",
29427
29427
  "name": "default",
29428
29428
  "declaration": {
29429
- "name": "register",
29430
- "module": "src/components/popover/popover.trans.styles.ts"
29429
+ "name": "style",
29430
+ "module": "src/components/rich-text/rich-text.styles.ts"
29431
29431
  }
29432
29432
  }
29433
29433
  ]
29434
29434
  },
29435
29435
  {
29436
29436
  "kind": "javascript-module",
29437
- "path": "src/components/popover/popover.ts",
29437
+ "path": "src/components/rich-text/rich-text.ts",
29438
29438
  "declarations": [],
29439
29439
  "exports": [
29440
29440
  {
29441
29441
  "kind": "js",
29442
- "name": "GdsPopover",
29442
+ "name": "GdsRichText",
29443
29443
  "declaration": {
29444
- "name": "GdsPopover",
29445
- "module": "src/components/popover/popover.ts"
29444
+ "name": "GdsRichText",
29445
+ "module": "src/components/rich-text/rich-text.ts"
29446
29446
  }
29447
29447
  }
29448
29448
  ]