@nordhealth/components 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +193 -201
- package/lib/DropdownItem-5c12978f.js +2 -0
- package/lib/DropdownItem-5c12978f.js.map +1 -0
- package/lib/DropdownItem.js +1 -1
- package/lib/Layout.js +1 -1
- package/lib/Layout.js.map +1 -1
- package/lib/Message.js +1 -1
- package/lib/bundle.js +1 -1
- package/lib/bundle.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/src/layout/Layout.d.ts +1 -1
- package/package.json +2 -2
- package/lib/DropdownItem-4a02675f.js +0 -2
- package/lib/DropdownItem-4a02675f.js.map +0 -1
package/custom-elements.json
CHANGED
|
@@ -628,6 +628,91 @@
|
|
|
628
628
|
}
|
|
629
629
|
]
|
|
630
630
|
},
|
|
631
|
+
{
|
|
632
|
+
"kind": "javascript-module",
|
|
633
|
+
"path": "src/banner/Banner.ts",
|
|
634
|
+
"declarations": [
|
|
635
|
+
{
|
|
636
|
+
"kind": "class",
|
|
637
|
+
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
638
|
+
"name": "Banner",
|
|
639
|
+
"cssProperties": [
|
|
640
|
+
{
|
|
641
|
+
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
642
|
+
"name": "--n-banner-border-radius",
|
|
643
|
+
"default": "var(--n-border-radius)"
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
647
|
+
"name": "--n-banner-box-shadow",
|
|
648
|
+
"default": "var(--n-box-shadow-card)"
|
|
649
|
+
}
|
|
650
|
+
],
|
|
651
|
+
"slots": [
|
|
652
|
+
{
|
|
653
|
+
"description": "default slot",
|
|
654
|
+
"name": ""
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
"members": [
|
|
658
|
+
{
|
|
659
|
+
"kind": "field",
|
|
660
|
+
"name": "variant",
|
|
661
|
+
"type": {
|
|
662
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
663
|
+
},
|
|
664
|
+
"default": "\"info\"",
|
|
665
|
+
"description": "The style variant of the banner.",
|
|
666
|
+
"attribute": "variant",
|
|
667
|
+
"reflects": true
|
|
668
|
+
}
|
|
669
|
+
],
|
|
670
|
+
"attributes": [
|
|
671
|
+
{
|
|
672
|
+
"name": "variant",
|
|
673
|
+
"type": {
|
|
674
|
+
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
675
|
+
},
|
|
676
|
+
"default": "\"info\"",
|
|
677
|
+
"description": "The style variant of the banner.",
|
|
678
|
+
"fieldName": "variant"
|
|
679
|
+
}
|
|
680
|
+
],
|
|
681
|
+
"superclass": {
|
|
682
|
+
"name": "LitElement",
|
|
683
|
+
"package": "lit"
|
|
684
|
+
},
|
|
685
|
+
"localization": [],
|
|
686
|
+
"status": "ready",
|
|
687
|
+
"category": "feedback",
|
|
688
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n",
|
|
689
|
+
"examples": [],
|
|
690
|
+
"dependencies": [
|
|
691
|
+
"icon"
|
|
692
|
+
],
|
|
693
|
+
"tagName": "nord-banner",
|
|
694
|
+
"customElement": true
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"exports": [
|
|
698
|
+
{
|
|
699
|
+
"kind": "js",
|
|
700
|
+
"name": "default",
|
|
701
|
+
"declaration": {
|
|
702
|
+
"name": "Banner",
|
|
703
|
+
"module": "src/banner/Banner.ts"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"kind": "custom-element-definition",
|
|
708
|
+
"name": "nord-banner",
|
|
709
|
+
"declaration": {
|
|
710
|
+
"name": "Banner",
|
|
711
|
+
"module": "src/banner/Banner.ts"
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
]
|
|
715
|
+
},
|
|
631
716
|
{
|
|
632
717
|
"kind": "javascript-module",
|
|
633
718
|
"path": "src/badge/Badge.ts",
|
|
@@ -741,91 +826,6 @@
|
|
|
741
826
|
}
|
|
742
827
|
]
|
|
743
828
|
},
|
|
744
|
-
{
|
|
745
|
-
"kind": "javascript-module",
|
|
746
|
-
"path": "src/banner/Banner.ts",
|
|
747
|
-
"declarations": [
|
|
748
|
-
{
|
|
749
|
-
"kind": "class",
|
|
750
|
-
"description": "Banner informs users about important changes or conditions in the\ninterface. Use this component if you need to communicate to users\nin a prominent way.",
|
|
751
|
-
"name": "Banner",
|
|
752
|
-
"cssProperties": [
|
|
753
|
-
{
|
|
754
|
-
"description": "Controls how rounded the corners are, using [border radius tokens](/tokens/#border-radius).",
|
|
755
|
-
"name": "--n-banner-border-radius",
|
|
756
|
-
"default": "var(--n-border-radius)"
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
"description": "Controls the surrounding shadow, using [box shadow tokens](/tokens/#box-shadow).",
|
|
760
|
-
"name": "--n-banner-box-shadow",
|
|
761
|
-
"default": "var(--n-box-shadow-card)"
|
|
762
|
-
}
|
|
763
|
-
],
|
|
764
|
-
"slots": [
|
|
765
|
-
{
|
|
766
|
-
"description": "default slot",
|
|
767
|
-
"name": ""
|
|
768
|
-
}
|
|
769
|
-
],
|
|
770
|
-
"members": [
|
|
771
|
-
{
|
|
772
|
-
"kind": "field",
|
|
773
|
-
"name": "variant",
|
|
774
|
-
"type": {
|
|
775
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
776
|
-
},
|
|
777
|
-
"default": "\"info\"",
|
|
778
|
-
"description": "The style variant of the banner.",
|
|
779
|
-
"attribute": "variant",
|
|
780
|
-
"reflects": true
|
|
781
|
-
}
|
|
782
|
-
],
|
|
783
|
-
"attributes": [
|
|
784
|
-
{
|
|
785
|
-
"name": "variant",
|
|
786
|
-
"type": {
|
|
787
|
-
"text": "\"info\" | \"danger\" | \"success\" | \"warning\""
|
|
788
|
-
},
|
|
789
|
-
"default": "\"info\"",
|
|
790
|
-
"description": "The style variant of the banner.",
|
|
791
|
-
"fieldName": "variant"
|
|
792
|
-
}
|
|
793
|
-
],
|
|
794
|
-
"superclass": {
|
|
795
|
-
"name": "LitElement",
|
|
796
|
-
"package": "lit"
|
|
797
|
-
},
|
|
798
|
-
"localization": [],
|
|
799
|
-
"status": "ready",
|
|
800
|
-
"category": "feedback",
|
|
801
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use this component if you need to communicate in a prominent way.\n- Place banner at the top of the section it applies to.\n- Use for highlighting errors and success statuses.\n- Put banner close to the context it’s referring to.\n- Move focus to the banner if it’s relevant to the current workflow.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Move focus to banner if it appears on page load.\n- Use for highlighting general content or as a banner.\n- Use to replace an error page.\n\n</div>\n\n---\n\n## Content guidelines\n\nBanner content should be clear, accurate and easy to understand:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident. Please see our status page for more details.</div>\n<div class=\"n-usage n-usage-dont\">There was an error.</div>\n\nWhen writing banner content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re Experiencing An Incident.</div>\n\nAlways end in punctuation:\n\n<div class=\"n-usage n-usage-do\">We’re experiencing an incident.</div>\n<div class=\"n-usage n-usage-dont\">We’re experiencing an incident</div>\n",
|
|
802
|
-
"examples": [],
|
|
803
|
-
"dependencies": [
|
|
804
|
-
"icon"
|
|
805
|
-
],
|
|
806
|
-
"tagName": "nord-banner",
|
|
807
|
-
"customElement": true
|
|
808
|
-
}
|
|
809
|
-
],
|
|
810
|
-
"exports": [
|
|
811
|
-
{
|
|
812
|
-
"kind": "js",
|
|
813
|
-
"name": "default",
|
|
814
|
-
"declaration": {
|
|
815
|
-
"name": "Banner",
|
|
816
|
-
"module": "src/banner/Banner.ts"
|
|
817
|
-
}
|
|
818
|
-
},
|
|
819
|
-
{
|
|
820
|
-
"kind": "custom-element-definition",
|
|
821
|
-
"name": "nord-banner",
|
|
822
|
-
"declaration": {
|
|
823
|
-
"name": "Banner",
|
|
824
|
-
"module": "src/banner/Banner.ts"
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
]
|
|
828
|
-
},
|
|
829
829
|
{
|
|
830
830
|
"kind": "javascript-module",
|
|
831
831
|
"path": "src/button/Button.ts",
|
|
@@ -8290,15 +8290,7 @@
|
|
|
8290
8290
|
{
|
|
8291
8291
|
"kind": "method",
|
|
8292
8292
|
"name": "handleNavWidthChange",
|
|
8293
|
-
"privacy": "protected"
|
|
8294
|
-
"parameters": [
|
|
8295
|
-
{
|
|
8296
|
-
"name": "prev",
|
|
8297
|
-
"type": {
|
|
8298
|
-
"text": "number"
|
|
8299
|
-
}
|
|
8300
|
-
}
|
|
8301
|
-
]
|
|
8293
|
+
"privacy": "protected"
|
|
8302
8294
|
},
|
|
8303
8295
|
{
|
|
8304
8296
|
"kind": "method",
|
|
@@ -15185,84 +15177,6 @@
|
|
|
15185
15177
|
}
|
|
15186
15178
|
]
|
|
15187
15179
|
},
|
|
15188
|
-
{
|
|
15189
|
-
"kind": "javascript-module",
|
|
15190
|
-
"path": "src/toast-group/ToastGroup.ts",
|
|
15191
|
-
"declarations": [
|
|
15192
|
-
{
|
|
15193
|
-
"kind": "class",
|
|
15194
|
-
"description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
|
|
15195
|
-
"name": "ToastGroup",
|
|
15196
|
-
"slots": [
|
|
15197
|
-
{
|
|
15198
|
-
"description": "Default slot in which to place toasts.",
|
|
15199
|
-
"name": ""
|
|
15200
|
-
}
|
|
15201
|
-
],
|
|
15202
|
-
"members": [
|
|
15203
|
-
{
|
|
15204
|
-
"kind": "method",
|
|
15205
|
-
"name": "addToast",
|
|
15206
|
-
"parameters": [
|
|
15207
|
-
{
|
|
15208
|
-
"name": "text",
|
|
15209
|
-
"type": {
|
|
15210
|
-
"text": "string"
|
|
15211
|
-
},
|
|
15212
|
-
"description": "The text/message of the toast."
|
|
15213
|
-
},
|
|
15214
|
-
{
|
|
15215
|
-
"name": "options",
|
|
15216
|
-
"default": "{}",
|
|
15217
|
-
"type": {
|
|
15218
|
-
"text": "ToastOptions"
|
|
15219
|
-
},
|
|
15220
|
-
"description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
|
|
15221
|
-
}
|
|
15222
|
-
],
|
|
15223
|
-
"description": "Convenience method for creating and adding a toast to the group.",
|
|
15224
|
-
"return": {
|
|
15225
|
-
"type": {
|
|
15226
|
-
"text": "Toast"
|
|
15227
|
-
}
|
|
15228
|
-
}
|
|
15229
|
-
}
|
|
15230
|
-
],
|
|
15231
|
-
"superclass": {
|
|
15232
|
-
"name": "LitElement",
|
|
15233
|
-
"package": "lit"
|
|
15234
|
-
},
|
|
15235
|
-
"localization": [],
|
|
15236
|
-
"status": "ready",
|
|
15237
|
-
"category": "feedback",
|
|
15238
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
|
|
15239
|
-
"examples": [],
|
|
15240
|
-
"dependencies": [
|
|
15241
|
-
"toast"
|
|
15242
|
-
],
|
|
15243
|
-
"tagName": "nord-toast-group",
|
|
15244
|
-
"customElement": true
|
|
15245
|
-
}
|
|
15246
|
-
],
|
|
15247
|
-
"exports": [
|
|
15248
|
-
{
|
|
15249
|
-
"kind": "js",
|
|
15250
|
-
"name": "default",
|
|
15251
|
-
"declaration": {
|
|
15252
|
-
"name": "ToastGroup",
|
|
15253
|
-
"module": "src/toast-group/ToastGroup.ts"
|
|
15254
|
-
}
|
|
15255
|
-
},
|
|
15256
|
-
{
|
|
15257
|
-
"kind": "custom-element-definition",
|
|
15258
|
-
"name": "nord-toast-group",
|
|
15259
|
-
"declaration": {
|
|
15260
|
-
"name": "ToastGroup",
|
|
15261
|
-
"module": "src/toast-group/ToastGroup.ts"
|
|
15262
|
-
}
|
|
15263
|
-
}
|
|
15264
|
-
]
|
|
15265
|
-
},
|
|
15266
15180
|
{
|
|
15267
15181
|
"kind": "javascript-module",
|
|
15268
15182
|
"path": "src/toggle/Toggle.ts",
|
|
@@ -15970,6 +15884,84 @@
|
|
|
15970
15884
|
}
|
|
15971
15885
|
]
|
|
15972
15886
|
},
|
|
15887
|
+
{
|
|
15888
|
+
"kind": "javascript-module",
|
|
15889
|
+
"path": "src/toast-group/ToastGroup.ts",
|
|
15890
|
+
"declarations": [
|
|
15891
|
+
{
|
|
15892
|
+
"kind": "class",
|
|
15893
|
+
"description": "Toast group is used to position and style a group of toasts, whilst ensuring they are announced by screen readers.",
|
|
15894
|
+
"name": "ToastGroup",
|
|
15895
|
+
"slots": [
|
|
15896
|
+
{
|
|
15897
|
+
"description": "Default slot in which to place toasts.",
|
|
15898
|
+
"name": ""
|
|
15899
|
+
}
|
|
15900
|
+
],
|
|
15901
|
+
"members": [
|
|
15902
|
+
{
|
|
15903
|
+
"kind": "method",
|
|
15904
|
+
"name": "addToast",
|
|
15905
|
+
"parameters": [
|
|
15906
|
+
{
|
|
15907
|
+
"name": "text",
|
|
15908
|
+
"type": {
|
|
15909
|
+
"text": "string"
|
|
15910
|
+
},
|
|
15911
|
+
"description": "The text/message of the toast."
|
|
15912
|
+
},
|
|
15913
|
+
{
|
|
15914
|
+
"name": "options",
|
|
15915
|
+
"default": "{}",
|
|
15916
|
+
"type": {
|
|
15917
|
+
"text": "ToastOptions"
|
|
15918
|
+
},
|
|
15919
|
+
"description": "An optional object for configuring the toast's `variant` and `autoDismiss`."
|
|
15920
|
+
}
|
|
15921
|
+
],
|
|
15922
|
+
"description": "Convenience method for creating and adding a toast to the group.",
|
|
15923
|
+
"return": {
|
|
15924
|
+
"type": {
|
|
15925
|
+
"text": "Toast"
|
|
15926
|
+
}
|
|
15927
|
+
}
|
|
15928
|
+
}
|
|
15929
|
+
],
|
|
15930
|
+
"superclass": {
|
|
15931
|
+
"name": "LitElement",
|
|
15932
|
+
"package": "lit"
|
|
15933
|
+
},
|
|
15934
|
+
"localization": [],
|
|
15935
|
+
"status": "ready",
|
|
15936
|
+
"category": "feedback",
|
|
15937
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use in combination with [Toast](/components/toast/) so that toasts get styled and announced to screen readers correctly.\n- Add as close to the bottom of the document as possible, ideally near the body closing tag, to maintain correct stacking order.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for grouping anything other than toast components\n\n</div>\n\n---\n\n## Content guidelines\n\nToast content should be clear, accurate and understandable by the user:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Your message has been sent</div>\n\nWhen writing the toast content, use the {noun} + {verb} content formula:\n\n<div class=\"n-usage n-usage-do\">Patient created</div>\n<div class=\"n-usage n-usage-dont\">Your patient has been successfully updated</div>\n\nUse a maximum of 3 words when writing the toast content:\n\n<div class=\"n-usage n-usage-do\">Product updated</div>\n<div class=\"n-usage n-usage-dont\">Your product was updated just now</div>\n\nWhen writing the toast content, always write it in sentence case, not title case. The first word should be capitalized and the rest lowercase (unless a proper noun):\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message Sent</div>\n\nAvoid unnecessary words and articles in the toast content, such as “the”, “an” or “a”:\n\n<div class=\"n-usage n-usage-do\">Changes saved</div>\n<div class=\"n-usage n-usage-dont\">The changes were saved</div>\n\nNever end in punctuation:\n\n<div class=\"n-usage n-usage-do\">Message sent</div>\n<div class=\"n-usage n-usage-dont\">Message sent.</div>\n\n---\n\n## Additional considerations\n\n- Toasts are complicated from an accessibility perspective. Whilst they are a convenient UI pattern for messaging, they present difficulties for keyboard or screen reader users. Therefore careful consideration should be given as to whether a toast is the correct choice.\n- If the message cannot be conveyed in 3 words or less, consider re-wording. If the message cannot be shortened any further, consider choosing a different pattern than toast.\n",
|
|
15938
|
+
"examples": [],
|
|
15939
|
+
"dependencies": [
|
|
15940
|
+
"toast"
|
|
15941
|
+
],
|
|
15942
|
+
"tagName": "nord-toast-group",
|
|
15943
|
+
"customElement": true
|
|
15944
|
+
}
|
|
15945
|
+
],
|
|
15946
|
+
"exports": [
|
|
15947
|
+
{
|
|
15948
|
+
"kind": "js",
|
|
15949
|
+
"name": "default",
|
|
15950
|
+
"declaration": {
|
|
15951
|
+
"name": "ToastGroup",
|
|
15952
|
+
"module": "src/toast-group/ToastGroup.ts"
|
|
15953
|
+
}
|
|
15954
|
+
},
|
|
15955
|
+
{
|
|
15956
|
+
"kind": "custom-element-definition",
|
|
15957
|
+
"name": "nord-toast-group",
|
|
15958
|
+
"declaration": {
|
|
15959
|
+
"name": "ToastGroup",
|
|
15960
|
+
"module": "src/toast-group/ToastGroup.ts"
|
|
15961
|
+
}
|
|
15962
|
+
}
|
|
15963
|
+
]
|
|
15964
|
+
},
|
|
15973
15965
|
{
|
|
15974
15966
|
"kind": "javascript-module",
|
|
15975
15967
|
"path": "src/tooltip/Tooltip.ts",
|
|
@@ -16235,20 +16227,16 @@
|
|
|
16235
16227
|
},
|
|
16236
16228
|
{
|
|
16237
16229
|
"kind": "javascript-module",
|
|
16238
|
-
"path": "src/
|
|
16230
|
+
"path": "src/visually-hidden/VisuallyHidden.ts",
|
|
16239
16231
|
"declarations": [
|
|
16240
16232
|
{
|
|
16241
16233
|
"kind": "class",
|
|
16242
|
-
"description": "
|
|
16243
|
-
"name": "
|
|
16234
|
+
"description": "Visually hidden is used when an element needs to be available\nto assistive technologies like screen readers, but be otherwise\nhidden.",
|
|
16235
|
+
"name": "VisuallyHidden",
|
|
16244
16236
|
"slots": [
|
|
16245
16237
|
{
|
|
16246
|
-
"description": "
|
|
16238
|
+
"description": "The visually hidden content.",
|
|
16247
16239
|
"name": ""
|
|
16248
|
-
},
|
|
16249
|
-
{
|
|
16250
|
-
"description": "Optional slot for menus, buttons, toggles, etc.",
|
|
16251
|
-
"name": "end"
|
|
16252
16240
|
}
|
|
16253
16241
|
],
|
|
16254
16242
|
"members": [],
|
|
@@ -16257,11 +16245,12 @@
|
|
|
16257
16245
|
"package": "lit"
|
|
16258
16246
|
},
|
|
16259
16247
|
"localization": [],
|
|
16260
|
-
"
|
|
16261
|
-
"
|
|
16248
|
+
"status": "ready",
|
|
16249
|
+
"category": "text",
|
|
16250
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n",
|
|
16262
16251
|
"examples": [],
|
|
16263
16252
|
"dependencies": [],
|
|
16264
|
-
"tagName": "nord-
|
|
16253
|
+
"tagName": "nord-visually-hidden",
|
|
16265
16254
|
"customElement": true
|
|
16266
16255
|
}
|
|
16267
16256
|
],
|
|
@@ -16270,32 +16259,36 @@
|
|
|
16270
16259
|
"kind": "js",
|
|
16271
16260
|
"name": "default",
|
|
16272
16261
|
"declaration": {
|
|
16273
|
-
"name": "
|
|
16274
|
-
"module": "src/
|
|
16262
|
+
"name": "VisuallyHidden",
|
|
16263
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
16275
16264
|
}
|
|
16276
16265
|
},
|
|
16277
16266
|
{
|
|
16278
16267
|
"kind": "custom-element-definition",
|
|
16279
|
-
"name": "nord-
|
|
16268
|
+
"name": "nord-visually-hidden",
|
|
16280
16269
|
"declaration": {
|
|
16281
|
-
"name": "
|
|
16282
|
-
"module": "src/
|
|
16270
|
+
"name": "VisuallyHidden",
|
|
16271
|
+
"module": "src/visually-hidden/VisuallyHidden.ts"
|
|
16283
16272
|
}
|
|
16284
16273
|
}
|
|
16285
16274
|
]
|
|
16286
16275
|
},
|
|
16287
16276
|
{
|
|
16288
16277
|
"kind": "javascript-module",
|
|
16289
|
-
"path": "src/
|
|
16278
|
+
"path": "src/top-bar/TopBar.ts",
|
|
16290
16279
|
"declarations": [
|
|
16291
16280
|
{
|
|
16292
16281
|
"kind": "class",
|
|
16293
|
-
"description": "
|
|
16294
|
-
"name": "
|
|
16282
|
+
"description": "Top bar is a header component that is always visible at the top of the interface. Top bar allows functionality such as search and contextual menus to be placed at the top of the interface.",
|
|
16283
|
+
"name": "TopBar",
|
|
16295
16284
|
"slots": [
|
|
16296
16285
|
{
|
|
16297
|
-
"description": "
|
|
16286
|
+
"description": "Used for the main content of the top bar. We recommend placing your application’s global search functionality into this slot.",
|
|
16298
16287
|
"name": ""
|
|
16288
|
+
},
|
|
16289
|
+
{
|
|
16290
|
+
"description": "Optional slot for menus, buttons, toggles, etc.",
|
|
16291
|
+
"name": "end"
|
|
16299
16292
|
}
|
|
16300
16293
|
],
|
|
16301
16294
|
"members": [],
|
|
@@ -16304,12 +16297,11 @@
|
|
|
16304
16297
|
"package": "lit"
|
|
16305
16298
|
},
|
|
16306
16299
|
"localization": [],
|
|
16307
|
-
"
|
|
16308
|
-
"
|
|
16309
|
-
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Use to hide text visually from the screen, but keep it available to assistive technologies, such as screen readers.\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for hiding interactive content.\n\n</div>\n",
|
|
16300
|
+
"category": "structure",
|
|
16301
|
+
"readme": "## Usage\n\nThis section includes guidelines for designers and developers about the usage of this component in different contexts.\n\n<div class=\"n-usage n-usage-do\">\n\n### Do\n\n- Applications that utilize the top bar can allow users to customize the color of the top bar to match their preference. [View an example](/components/top-bar/?example=color).\n- If your application allows it, include search to help users find resources and navigate.\n- Include a user menu in the end slot of the top bar.\n- Use the [layout component](/components/layout/?example=top-bar) to provide structure for the top bar component. We’ve also created [an example which shows full theming capabilities](/components/layout/?example=theming).\n\n</div>\n<div class=\"n-usage n-usage-dont\">\n\n### Don’t\n\n- Don’t use for global navigation. Use the [navigation component](/components/navigation/) instead.\n- Don’t allow the user to set a top bar color that doesn’t provide enough contrast with the content.\n- Don’t allow the user to freely pick a hex code as the top bar color. Instead, offer a choice from a predefined palette of colors which provides sufficient contrast with the content. [View an example](/components/top-bar/?example=color).\n\n</div>\n\n---\n\n## Theming\n\nPlease see the [Top Bar theming](/themes/#top-bar-theming) section in our theming documentation for detailed guidelines.\n\n<nord-button variant=\"primary\" href=\"/themes/#top-bar-theming\">Theming Guidelines</nord-button>\n",
|
|
16310
16302
|
"examples": [],
|
|
16311
16303
|
"dependencies": [],
|
|
16312
|
-
"tagName": "nord-
|
|
16304
|
+
"tagName": "nord-top-bar",
|
|
16313
16305
|
"customElement": true
|
|
16314
16306
|
}
|
|
16315
16307
|
],
|
|
@@ -16318,16 +16310,16 @@
|
|
|
16318
16310
|
"kind": "js",
|
|
16319
16311
|
"name": "default",
|
|
16320
16312
|
"declaration": {
|
|
16321
|
-
"name": "
|
|
16322
|
-
"module": "src/
|
|
16313
|
+
"name": "TopBar",
|
|
16314
|
+
"module": "src/top-bar/TopBar.ts"
|
|
16323
16315
|
}
|
|
16324
16316
|
},
|
|
16325
16317
|
{
|
|
16326
16318
|
"kind": "custom-element-definition",
|
|
16327
|
-
"name": "nord-
|
|
16319
|
+
"name": "nord-top-bar",
|
|
16328
16320
|
"declaration": {
|
|
16329
|
-
"name": "
|
|
16330
|
-
"module": "src/
|
|
16321
|
+
"name": "TopBar",
|
|
16322
|
+
"module": "src/top-bar/TopBar.ts"
|
|
16331
16323
|
}
|
|
16332
16324
|
}
|
|
16333
16325
|
]
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{i as o}from"./query-assigned-elements-822fe360.js";const n=o`:host{display:flex;line-height:var(--n-line-height-tight)}.n-dropdown-item{-webkit-appearance:none;appearance:none;cursor:pointer;display:flex;flex:1;gap:var(--n-space-s);align-items:center;font-family:inherit;font-size:inherit;font-weight:var(--n-font-weight);text-decoration:none;border:0;color:var(--n-color-text);padding:var(--n-space-s);border-radius:var(--n-border-radius-s);background:0 0;text-align:start;box-shadow:var(--n-dropdown-item-box-shadow,none);min-inline-size:0}.n-dropdown-item:hover{background:var(--n-color-accent);color:var(--n-color-text-on-accent)}.n-dropdown-item:hover ::slotted(*){color:var(--n-color-text-on-accent)!important}.n-dropdown-item ::slotted(nord-icon){color:var(--n-color-icon)}.n-dropdown-item:hover ::slotted(nord-icon){color:currentColor}.n-dropdown-item:active{opacity:.7}.n-dropdown-item:focus{--n-dropdown-item-box-shadow:0 0 0 2px var(--n-color-accent);outline:0;position:relative;z-index:var(--n-index-masked)}@supports selector(:focus-visible){.n-dropdown-item:focus{--n-dropdown-item-box-shadow:none}.n-dropdown-item:focus-visible{--n-dropdown-item-box-shadow:0 0 0 2px var(--n-color-accent)}}@media (max-width:35.9375em){.n-dropdown-item{gap:var(--n-space-m);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-dropdown-item ::slotted(nord-icon){block-size:var(--n-size-icon-m);inline-size:var(--n-size-icon-m)}}slot[name=end],slot[name=start]{flex:0 0 auto}slot[name=end]{display:flex;margin-inline-start:auto}.n-truncate{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::slotted(nord-icon:not([size])){--_n-icon-size:var(--n-size-icon-s)}`;export{n as s};
|
|
2
|
+
//# sourceMappingURL=DropdownItem-5c12978f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DropdownItem-5c12978f.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/lib/DropdownItem.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as t,e,x as s,s as o}from"./query-assigned-elements-822fe360.js";import{e as r}from"./property-03f59dce.js";import{l as a}from"./if-defined-8a007930.js";import{n as i}from"./ref-6b46e5ea.js";import{F as n}from"./FocusableMixin-186c69a2.js";import{s as f}from"./Component-1f694235.js";import{s as m}from"./DropdownItem-
|
|
1
|
+
import{_ as t,e,x as s,s as o}from"./query-assigned-elements-822fe360.js";import{e as r}from"./property-03f59dce.js";import{l as a}from"./if-defined-8a007930.js";import{n as i}from"./ref-6b46e5ea.js";import{F as n}from"./FocusableMixin-186c69a2.js";import{s as f}from"./Component-1f694235.js";import{s as m}from"./DropdownItem-5c12978f.js";import"./directive-de55b00a.js";let p=class extends(n(o)){constructor(){super(...arguments),this.target="_self"}render(){return(this.href?t=>s`<a href="${a(this.href)}" ${i(this.focusableRef)} target="${this.target}" class="n-dropdown-item">${t}</a>`:t=>s`<button ${i(this.focusableRef)} class="n-dropdown-item">${t}</button>`)(s`<slot name="start"></slot><span class="n-truncate"><slot></slot></span><slot name="end"></slot>`)}};p.styles=[f,m],t([r({reflect:!0})],p.prototype,"href",void 0),t([r()],p.prototype,"target",void 0),p=t([e("nord-dropdown-item")],p);var d=p;export{d as default};
|
|
2
2
|
//# sourceMappingURL=DropdownItem.js.map
|
package/lib/Layout.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as n,_ as e,s as a,x as t,A as o,e as i}from"./query-assigned-elements-822fe360.js";import{e as s}from"./property-03f59dce.js";import{t as r}from"./state-70f38ceb.js";import{i as d}from"./query-2d22378e.js";import{o as l}from"./class-map-c0d8e1e5.js";import{o as c}from"./style-map-5b757428.js";import{l as h}from"./NavToggle-fbd227e5.js";import{D as v}from"./DirectionController-f35f5476.js";import{E as p}from"./EventController-d99ebeef.js";import{L as u}from"./LightDismissController-a2645ae6.js";import{S as g}from"./SlotController-d733c575.js";import{o as b}from"./observe-a9c6dfb6.js";import{c as m}from"./cond-09498763.js";import{f as y}from"./fsm-50373df9.js";import{c as k}from"./number-c3ab3e95.js";import w from"./Icon.js";import{s as f}from"./Component-1f694235.js";import{s as z}from"./Sticky-b4e6c315.js";import"./directive-de55b00a.js";import"./ref-6b46e5ea.js";import"./LocalizeController.js";import"./translation.js";import"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./localization5.js";import"./localization6.js";import"./localization7.js";import"./localization8.js";import"./FocusableMixin-186c69a2.js";import"./Button.js";import"./LightDomController-8a770234.js";import"./Spinner.js";import"./if-defined-8a007930.js";import"./InputMixin-d50cb41a.js";import"./VisuallyHidden.js";import"./ShortcutController-87615e31.js";import"./tinykeys.module-84e6cc41.js";import"./IconManager.js";const x=()=>!0;class S{constructor(n,e){n.addController(this),this.options={enabled:x,...e}}hostConnected(){"undefined"!=typeof BroadcastChannel&&(this.channel=new BroadcastChannel(this.options.channelName),this.channel.addEventListener("message",this))}hostDisconnected(){var n,e;null===(n=this.channel)||void 0===n||n.removeEventListener("message",this),null===(e=this.channel)||void 0===e||e.close()}handleEvent(n){this.options.enabled()&&this.options.onMessage(n.data)}post(n){var e;this.options.enabled()&&(null===(e=this.channel)||void 0===e||e.postMessage(n))}}function j(n,e,a=JSON.stringify,t=JSON.parse){return{get value(){try{const a=localStorage.getItem(n);return a?t(a):e}catch(n){return e}},set value(e){try{localStorage.setItem(n,a(e))}catch(n){}}}}const C=n`:host{--_n-layout-padding:var(--n-layout-padding, var(--n-space-l));--_n-layout-drawer-inline-size:var(--n-layout-drawer-inline-size, 320px);--_n-layout-background-color:var(--n-layout-background-color, var(--n-color-background));--_n-layout-nav-transition-duration:var(--n-transition-mobile);--_n-layout-header-size:var(--n-space-xxl);--_n-layout-header-size-s:calc(var(--n-space-xl) + var(--n-space-m));background:var(--_n-layout-background-color);color:var(--n-color-text);min-block-size:100vh}.n-layout-main,.n-layout-nav{background:var(--_n-layout-background-color);min-block-size:100%}.n-layout-nav{position:fixed;user-select:none;inline-size:var(--_n-layout-nav-width);z-index:var(--n-index-nav);inset-block-start:0;inset-inline-start:0;inset-block-end:0;transform:translateX(var(--n-nav-transform));box-shadow:var(--n-box-shadow-nav)}.n-layout-main{position:relative}main{padding:var(--_n-layout-padding)}.n-has-top-bar{--_n-sticky-top:var(--_n-layout-header-size)}:host([sticky]) .n-has-header{--_n-sticky-size:var(--_n-layout-header-size)}aside{position:fixed;z-index:var(--n-index-nav);inset-block:0;inset-inline-end:0;inline-size:var(--_n-layout-drawer-inline-size);max-inline-size:100%;background:var(--n-color-surface);box-shadow:var(--n-box-shadow-nav)}@media (min-width:1240px){.n-has-drawer .n-layout-content{margin-inline-end:var(--_n-layout-drawer-inline-size)}aside{box-shadow:var(--n-box-shadow-header);border-inline-start:1px solid var(--n-color-border)}}slot[name=drawer]::slotted(*){block-size:100%!important}.n-has-top-bar aside{inset-block-start:var(--_n-layout-header-size)}:is(.n-has-top-bar,.n-has-header) ::slotted(nord-notification-group){inset-block-start:var(--_n-layout-header-size)}:is([data-nav=closed],[data-nav=unpeek]) .n-layout-nav{transform:translateX(-110%)}.n-rtl:is([data-nav=closed],[data-nav=unpeek]) .n-layout-nav{transform:translateX(110%)}[data-screen=narrow] .n-layout-nav{z-index:var(--n-index-popout);transition:transform var(--_n-layout-nav-transition-duration)}[data-screen=wide]:is(:not([data-nav=opened],[data-nav=closed])) .n-layout-nav{transition:transform var(--_n-layout-nav-transition-duration);border-start-end-radius:var(--n-border-radius);border-end-end-radius:var(--n-border-radius);min-block-size:0;inset-block-start:calc(var(--n-space-m) * 4);inset-block-end:var(--n-space-l)}[data-screen=wide][data-nav=opened] .n-layout-nav{border-inline-end:1px solid var(--n-color-border);box-shadow:none}[data-screen=wide][data-nav=opened]:not(.n-has-top-bar) .n-layout-nav{--n-navigation-header-padding-inline:calc(var(--n-space-l) / 1.5)}.n-has-top-bar[data-screen=wide][data-nav=opened] .n-layout-nav{--n-navigation-header-background:var(--n-color-accent-secondary);--n-navigation-header-color:var(--n-color-text-on-accent);--n-navigation-header-divider:none;--n-navigation-header-toggle-icon-color:rgba(255, 255, 255, 0.85);--n-navigation-header-focus-style:0 0 0 1px #fff inset,inset 0 0 0 100px rgba(255, 255, 255, 0.2);border-color:transparent;border-image-slice:1;border-image-source:linear-gradient(to bottom,rgba(255,255,255,.16) calc(var(--_n-layout-header-size) + 1px),var(--n-color-border) calc(var(--_n-layout-header-size) + 1px));background:var(--n-color-accent-secondary);box-shadow:0 0 transparent}[data-screen=wide]:not([data-nav=opened]) .n-layout-nav{--n-navigation-header-block-size:var(--_n-layout-header-size-s);overflow:hidden}[data-screen=wide][data-nav=opened] .n-layout-main{margin-inline-start:var(--_n-layout-nav-width)}[data-screen=narrow] .n-layout-main::after{content:"";position:fixed;inset:0;z-index:var(--n-index-overlay);transition:opacity var(--n-transition-mobile),visibility var(--n-transition-mobile);background:var(--n-color-overlay)}[data-screen=narrow]:not([data-nav=opened],[data-nav=peek],[data-nav=blocked]) .n-layout-main::after{visibility:hidden;opacity:0}.n-resize{touch-action:none;position:absolute;min-block-size:100%;inset-block:0;inset-inline-end:-8px;inline-size:10px;background:0 0}[data-nav=opened] .n-resize{cursor:col-resize}.n-resize::after{content:"";position:absolute;z-index:var(--n-index-sticky);inset-block:0;inset-inline-end:5px;inline-size:3px;background:var(--n-color-accent);transition:opacity var(--n-transition-slowly);opacity:0}.n-resize:focus{outline:0}.n-dragging .n-resize::after,.n-resize:focus::after,[data-nav=opened] .n-resize:hover::after{opacity:1;transition-delay:.15s}@supports selector(:focus-visible){.n-resize:focus::after{opacity:0}.n-resize:focus-visible::after{opacity:1}}.n-dragging{cursor:col-resize!important;-webkit-user-select:none;user-select:none}:host([padding=none]){--_n-layout-padding:var(--n-layout-padding, 0)}.n-top-bar-container{position:sticky;inset-block-start:0;z-index:var(--n-index-top-bar)}.n-has-top-bar{--_n-layout-header-size:var(--_n-layout-header-size-s);--n-navigation-header-block-size:var(--_n-layout-header-size)}.n-has-top-bar :is([name=header],[name=drawer])::slotted(*){--n-header-block-size:var(--_n-layout-header-size)}.n-nav-toggle-container{position:absolute;padding-inline-start:var(--n-space-s);block-size:var(--_n-layout-header-size);display:flex;align-items:center;z-index:calc(var(--n-index-top-bar) + 1)}[data-screen=narrow] .n-nav-toggle-container{padding-inline-start:var(--n-space-xs)}.n-has-top-bar .n-nav-toggle-container,:host([sticky]) .n-nav-toggle-container{position:fixed}[data-screen=wide][data-nav=opened] .n-nav-toggle-container{display:none}.n-has-nav[data-screen=wide]:not([data-nav=opened]) ::slotted(nord-top-bar),.n-has-nav[data-screen=wide]:not([data-nav=opened],.n-has-top-bar) ::slotted(nord-header[slot=header]){--_n-header-gutter:calc(var(--n-space-l) * 1.8)}.n-has-nav[data-screen=narrow] ::slotted(nord-top-bar),.n-has-nav[data-screen=narrow]:not(.n-has-top-bar) ::slotted(nord-header[slot=header]){--_n-header-gutter:var(--n-space-xl)}.n-has-top-bar :is(nord-nav-toggle,::slotted(nord-nav-toggle)){--n-button-background-color:transparent;color:rgba(255,255,255,.85)}.n-has-top-bar :is(nord-nav-toggle,::slotted(nord-nav-toggle)):focus{--n-button-background-color:rgba(0, 0, 0, 0.2)}.n-collapse-btn{--_n-collapse-btn-size:var(--n-space-l);position:fixed;inset-inline-start:calc(var(--_n-layout-nav-width) - (var(--_n-collapse-btn-size)/ 2));inset-block-start:calc(var(--_n-layout-header-size) + (var(--_n-layout-header-size) - var(--_n-collapse-btn-size))/ 2);border-radius:var(--n-border-radius-circle);block-size:var(--_n-collapse-btn-size);inline-size:var(--_n-collapse-btn-size);display:flex;align-items:center;justify-content:center;color:var(--n-color-icon);background:var(--n-color-button);box-shadow:var(--n-box-shadow-card);border:0;z-index:var(--n-index-sticky);opacity:0;visibility:hidden;cursor:pointer;transition:opacity var(--n-transition-slowly),visibility var(--n-transition-slowly),background-color var(--n-transition-quickly),color var(--n-transition-quickly)}.n-collapse-btn:hover{background:var(--n-color-accent);color:var(--n-color-text-on-accent)}.n-collapse-btn:focus{outline:0;box-shadow:0 0 0 2px var(--n-color-accent),var(--n-box-shadow)}[data-screen=narrow] .n-collapse-btn,[data-screen=wide]:not([data-nav=opened]) .n-collapse-btn{display:none}.n-collapse-btn:focus,.n-layout-nav:hover .n-collapse-btn{opacity:1;visibility:visible}.n-collapse-btn nord-icon{transform:rotate(180deg)}.n-rtl .n-collapse-btn nord-icon{transform:rotate(0)}`;w.registerIcon(h);const _=matchMedia("(min-width: 768px)"),N=j("nord-layout.navWidth",250),T=j("nord-layout.navOpen",!0),$=y({opened:{toggle:"closed",close:"closed"},closed:{toggle:"opened",open:"opened",focusin:"peek",pointerenter:"peek"},peek:{toggle:"opened",focusout:"unpeek",pointerleave:"wait",dropdownOpen:"blocked",click:"unpeek",open:"opened"},blocked:{dropdownClose:"peek",open:"opened"},wait:{toggle:"opened",focusin:"peek",pointerenter:"peek",timeout:"unpeek"},unpeek:{toggle:"opened",focusin:"peek",pointerenter:"peek",transitionend:"closed"}});let D=class extends a{constructor(){super(...arguments),this.navSlot=new g(this,"nav"),this.drawerSlot=new g(this,"drawer"),this.topBarSlot=new g(this,"top-bar"),this.headerSlot=new g(this,"header"),this.direction=new v(this),this.events=new p(this),this.lightDismiss=new u(this,{isOpen:()=>"opened"===this.navState&&!this.wideScreen,onDismiss:()=>this.navTransition("close"),isDismissible:n=>n!==this.navEl}),this.broadcast=new S(this,{channelName:"nord-layout-nav-state",enabled:()=>this.syncNavState&&this.wideScreen,onMessage:n=>{"navOpen"in n&&(this.navOpen=n.navOpen),"navWidth"in n&&(this.navWidth=n.navWidth)}}),this.navWidth=N.value,this.isDragging=!1,this.wideScreen=_.matches,this.persistNavState=!1,this.syncNavState=!1,this.padding="m",this.sticky=!1,this.handleMediaQueryChange=()=>{this.wideScreen=_.matches,this.navTransition(this.wideScreen?"open":"close")},this.handleToggleClick=()=>{this.navTransition("toggle")},this.handleNavFocus=()=>{this.navTransition("focusin")},this.handleMainFocus=()=>{this.navTransition("focusout")},this.handleMouseEnter=()=>{this.wideScreen&&this.navTransition("pointerenter")},this.handleMouseLeave=()=>{this.navTransition("pointerleave")},this.handleTransitionEnd=()=>{this.navTransition("transitionend")}}get isNarrow(){return!this.wideScreen}connectedCallback(){super.connectedCallback(),this.events.listen(_,"change",this.handleMediaQueryChange)}willUpdate(){this.hasUpdated||(this.isNarrow||this.persistNavState&&!1===T.value?this.navState="closed":this.navState="opened")}render(){const{navWidth:n,navState:e,navSlot:a,headerSlot:i,topBarSlot:s,drawerSlot:r,isDragging:d,direction:h}=this,v="opened"===e&&this.wideScreen?n:250;return t`<div class="${l({"n-layout":!0,"n-rtl":h.isRTL,"n-dragging":d,"n-has-header":i.hasContent,"n-has-top-bar":s.hasContent,"n-has-drawer":r.hasContent,"n-has-nav":a.hasContent})}" style="${c({"--_n-layout-nav-width":`${v}px`})}" data-nav="${a.hasContent?e:"closed"}" data-screen="${this.wideScreen?"wide":"narrow"}"><div class="n-layout-nav" ?hidden="${a.isEmpty}" @focusin="${this.handleNavFocus}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}" @open="${this.handleDropdownOpen}" @close="${this.handleDropdownClose}"><slot name="nav" @click="${this.handleNavClick}"></slot><div class="n-resize" role="separator" aria-orientation="vertical" tabindex="0" @pointerdown="${m("opened"===e,this.startDragging)}" @pointermove="${m(d,this.handleDrag)}" @pointerleave="${this.stopDragging}" @pointerup="${this.stopDragging}" @keydown="${this.handleKeyboardResize}" ?hidden="${this.isNarrow}"></div>${this.renderNavCollapse()}</div><div class="n-layout-main" @focusin="${this.handleMainFocus}" @click="${this.handleMainClick}">${a.hasContent?this.renderNavToggle():o}<div class="n-top-bar-container"><slot name="top-bar"></slot></div><div class="n-layout-content"><div class="n-sticky"><slot name="header"></slot></div><main><slot></slot></main></div><aside ?hidden="${this.drawerSlot.isEmpty}"><slot name="drawer"></slot></aside></div></div>`}renderNavToggle(){return t`<div class="n-nav-toggle-container"><slot name="nav-toggle" @click="${this.handleToggleClick}" @mouseover="${this.handleMouseEnter}" @mouseout="${this.handleMouseLeave}"><nord-nav-toggle></nord-nav-toggle></slot></div>`}renderNavCollapse(){return t`<button class="n-collapse-btn" @click="${this.handleToggleClick}"><nord-icon name="navigation-toggle-lock" size="s"></nord-icon></button>`}handleNavWidthChange(n){N.value=this.navWidth,null!=n&&this.broadcast.post({navWidth:this.navWidth})}handleNavStateChange(n){switch("wait"===n&&this.peekTimeoutId&&clearTimeout(this.peekTimeoutId),"unpeek"===n&&this.navEl.removeEventListener("transitionend",this.handleTransitionEnd),this.navState){case"closed":this.navOpen=!1;break;case"opened":this.navOpen=!0;break;case"wait":this.peekTimeoutId=setTimeout((()=>this.navTransition("timeout")),300);break;case"unpeek":this.navEl.addEventListener("transitionend",this.handleTransitionEnd,{once:!0})}}handleOpenChange(n){this.isDragging||this.setNavWidth(Math.max(this.navWidth,250)),this.navTransition(this.navOpen?"open":"close"),this.persistNavState&&(T.value=this.navOpen),null!=n&&this.broadcast.post({navOpen:this.navOpen})}navTransition(n){this.navState=$.transition(this.navState,n)}handleNavClick(n){if(!n.defaultPrevented&&!this.wideScreen){const a=n.target;(n=>"nord-nav-item"===n.localName)(e=a)&&!e.hasSubNav&&this.navTransition("close")}var e}handleMainClick(){this.navTransition("click")}handleDropdownOpen(n){"nord-dropdown"===n.target.localName&&this.navTransition("dropdownOpen")}handleDropdownClose(n){"nord-dropdown"===n.target.localName&&this.navTransition("dropdownClose")}handleKeyboardResize(n){const{navWidth:e,direction:{isLTR:a}}=this;switch(n.key){case"ArrowLeft":this.setNavWidth(e+(a?-30:30));break;case"ArrowRight":this.setNavWidth(e+(a?30:-30));break;case"Enter":this.navTransition("toggle");break;case"Home":this.setNavWidth(220);break;case"End":this.setNavWidth(400);break;default:return}n.preventDefault()}setNavWidth(n){this.navWidth=k(Math.round(n),220,400)}startDragging(n){if(0===n.button){n.target.setPointerCapture(n.pointerId),this.isDragging=!0}}stopDragging(){this.isDragging=!1}handleDrag(n){const e=this.direction.isRTL?this.clientWidth-n.clientX:n.clientX;this.setNavWidth(e),this.navTransition(e>=100?"open":"close")}};D.styles=[f,z,C],e([d(".n-layout-nav",!0)],D.prototype,"navEl",void 0),e([r()],D.prototype,"navWidth",void 0),e([r()],D.prototype,"isDragging",void 0),e([r()],D.prototype,"navState",void 0),e([r()],D.prototype,"wideScreen",void 0),e([s({reflect:!0,type:Boolean,attribute:"nav-open"})],D.prototype,"navOpen",void 0),e([s({type:Boolean,attribute:"persist-nav-state"})],D.prototype,"persistNavState",void 0),e([s({type:Boolean,reflect:!0,attribute:"sync-nav-state"})],D.prototype,"syncNavState",void 0),e([s({reflect:!0})],D.prototype,"padding",void 0),e([s({type:Boolean,reflect:!0})],D.prototype,"sticky",void 0),e([b("navWidth","updated")],D.prototype,"handleNavWidthChange",null),e([b("navState")],D.prototype,"handleNavStateChange",null),e([b("navOpen","updated")],D.prototype,"handleOpenChange",null),D=e([i("nord-layout")],D);var W=D;export{W as default};
|
|
1
|
+
import{i as n,_ as e,s as a,x as t,A as o,e as i}from"./query-assigned-elements-822fe360.js";import{e as s}from"./property-03f59dce.js";import{t as r}from"./state-70f38ceb.js";import{i as d}from"./query-2d22378e.js";import{o as l}from"./class-map-c0d8e1e5.js";import{o as c}from"./style-map-5b757428.js";import{l as h}from"./NavToggle-fbd227e5.js";import{D as v}from"./DirectionController-f35f5476.js";import{E as p}from"./EventController-d99ebeef.js";import{L as u}from"./LightDismissController-a2645ae6.js";import{S as g}from"./SlotController-d733c575.js";import{o as b}from"./observe-a9c6dfb6.js";import{c as m}from"./cond-09498763.js";import{f as y}from"./fsm-50373df9.js";import{c as k}from"./number-c3ab3e95.js";import w from"./Icon.js";import{s as f}from"./Component-1f694235.js";import{s as z}from"./Sticky-b4e6c315.js";import"./directive-de55b00a.js";import"./ref-6b46e5ea.js";import"./LocalizeController.js";import"./translation.js";import"./en-us.js";import"./localization.js";import"./localization2.js";import"./localization3.js";import"./localization4.js";import"./localization5.js";import"./localization6.js";import"./localization7.js";import"./localization8.js";import"./FocusableMixin-186c69a2.js";import"./Button.js";import"./LightDomController-8a770234.js";import"./Spinner.js";import"./if-defined-8a007930.js";import"./InputMixin-d50cb41a.js";import"./VisuallyHidden.js";import"./ShortcutController-87615e31.js";import"./tinykeys.module-84e6cc41.js";import"./IconManager.js";const x=()=>!0;class S{constructor(n,e){n.addController(this),this.options={enabled:x,...e}}hostConnected(){"undefined"!=typeof BroadcastChannel&&(this.channel=new BroadcastChannel(this.options.channelName),this.channel.addEventListener("message",this))}hostDisconnected(){var n,e;null===(n=this.channel)||void 0===n||n.removeEventListener("message",this),null===(e=this.channel)||void 0===e||e.close()}handleEvent(n){this.options.enabled()&&this.options.onMessage(n.data)}post(n){var e;this.options.enabled()&&(null===(e=this.channel)||void 0===e||e.postMessage(n))}}function j(n,e,a=JSON.stringify,t=JSON.parse){return{get value(){try{const a=localStorage.getItem(n);return a?t(a):e}catch(n){return e}},set value(e){try{localStorage.setItem(n,a(e))}catch(n){}}}}const C=n`:host{--_n-layout-padding:var(--n-layout-padding, var(--n-space-l));--_n-layout-drawer-inline-size:var(--n-layout-drawer-inline-size, 320px);--_n-layout-background-color:var(--n-layout-background-color, var(--n-color-background));--_n-layout-nav-transition-duration:var(--n-transition-mobile);--_n-layout-header-size:var(--n-space-xxl);--_n-layout-header-size-s:calc(var(--n-space-xl) + var(--n-space-m));background:var(--_n-layout-background-color);color:var(--n-color-text);min-block-size:100vh}.n-layout-main,.n-layout-nav{background:var(--_n-layout-background-color);min-block-size:100%}.n-layout-nav{position:fixed;user-select:none;inline-size:var(--_n-layout-nav-width);z-index:var(--n-index-nav);inset-block-start:0;inset-inline-start:0;inset-block-end:0;transform:translateX(var(--n-nav-transform));box-shadow:var(--n-box-shadow-nav)}.n-layout-main{position:relative}main{padding:var(--_n-layout-padding)}.n-has-top-bar{--_n-sticky-top:var(--_n-layout-header-size)}:host([sticky]) .n-has-header{--_n-sticky-size:var(--_n-layout-header-size)}aside{position:fixed;z-index:var(--n-index-nav);inset-block:0;inset-inline-end:0;inline-size:var(--_n-layout-drawer-inline-size);max-inline-size:100%;background:var(--n-color-surface);box-shadow:var(--n-box-shadow-nav)}@media (min-width:1240px){.n-has-drawer .n-layout-content{margin-inline-end:var(--_n-layout-drawer-inline-size)}aside{box-shadow:var(--n-box-shadow-header);border-inline-start:1px solid var(--n-color-border)}}slot[name=drawer]::slotted(*){block-size:100%!important}.n-has-top-bar aside{inset-block-start:var(--_n-layout-header-size)}:is(.n-has-top-bar,.n-has-header) ::slotted(nord-notification-group){inset-block-start:var(--_n-layout-header-size)}:is([data-nav=closed],[data-nav=unpeek]) .n-layout-nav{transform:translateX(-110%)}.n-rtl:is([data-nav=closed],[data-nav=unpeek]) .n-layout-nav{transform:translateX(110%)}[data-screen=narrow] .n-layout-nav{z-index:var(--n-index-popout);transition:transform var(--_n-layout-nav-transition-duration)}[data-screen=wide]:is(:not([data-nav=opened],[data-nav=closed])) .n-layout-nav{transition:transform var(--_n-layout-nav-transition-duration);border-start-end-radius:var(--n-border-radius);border-end-end-radius:var(--n-border-radius);min-block-size:0;inset-block-start:calc(var(--n-space-m) * 4);inset-block-end:var(--n-space-l)}[data-screen=wide][data-nav=opened] .n-layout-nav{border-inline-end:1px solid var(--n-color-border);box-shadow:none}[data-screen=wide][data-nav=opened]:not(.n-has-top-bar) .n-layout-nav{--n-navigation-header-padding-inline:calc(var(--n-space-l) / 1.5)}.n-has-top-bar[data-screen=wide][data-nav=opened] .n-layout-nav{--n-navigation-header-background:var(--n-color-accent-secondary);--n-navigation-header-color:var(--n-color-text-on-accent);--n-navigation-header-divider:none;--n-navigation-header-toggle-icon-color:rgba(255, 255, 255, 0.85);--n-navigation-header-focus-style:0 0 0 1px #fff inset,inset 0 0 0 100px rgba(255, 255, 255, 0.2);border-color:transparent;border-image-slice:1;border-image-source:linear-gradient(to bottom,rgba(255,255,255,.16) calc(var(--_n-layout-header-size) + 1px),var(--n-color-border) calc(var(--_n-layout-header-size) + 1px));background:var(--n-color-accent-secondary);box-shadow:0 0 transparent}[data-screen=wide]:not([data-nav=opened]) .n-layout-nav{--n-navigation-header-block-size:var(--_n-layout-header-size-s);overflow:hidden}[data-screen=wide][data-nav=opened] .n-layout-main{margin-inline-start:var(--_n-layout-nav-width)}[data-screen=narrow] .n-layout-main::after{content:"";position:fixed;inset:0;z-index:var(--n-index-overlay);transition:opacity var(--n-transition-mobile),visibility var(--n-transition-mobile);background:var(--n-color-overlay)}[data-screen=narrow]:not([data-nav=opened],[data-nav=peek],[data-nav=blocked]) .n-layout-main::after{visibility:hidden;opacity:0}.n-resize{touch-action:none;position:absolute;min-block-size:100%;inset-block:0;inset-inline-end:-8px;inline-size:10px;background:0 0}[data-nav=opened] .n-resize{cursor:col-resize}.n-resize::after{content:"";position:absolute;z-index:var(--n-index-sticky);inset-block:0;inset-inline-end:5px;inline-size:3px;background:var(--n-color-accent);transition:opacity var(--n-transition-slowly);opacity:0}.n-resize:focus{outline:0}.n-dragging .n-resize::after,.n-resize:focus::after,[data-nav=opened] .n-resize:hover::after{opacity:1;transition-delay:.15s}@supports selector(:focus-visible){.n-resize:focus::after{opacity:0}.n-resize:focus-visible::after{opacity:1}}.n-dragging{cursor:col-resize!important;-webkit-user-select:none;user-select:none}:host([padding=none]){--_n-layout-padding:var(--n-layout-padding, 0)}.n-top-bar-container{position:sticky;inset-block-start:0;z-index:var(--n-index-top-bar)}.n-has-top-bar{--_n-layout-header-size:var(--_n-layout-header-size-s);--n-navigation-header-block-size:var(--_n-layout-header-size)}.n-has-top-bar :is([name=header],[name=drawer])::slotted(*){--n-header-block-size:var(--_n-layout-header-size)}.n-nav-toggle-container{position:absolute;padding-inline-start:var(--n-space-s);block-size:var(--_n-layout-header-size);display:flex;align-items:center;z-index:calc(var(--n-index-top-bar) + 1)}[data-screen=narrow] .n-nav-toggle-container{padding-inline-start:var(--n-space-xs)}.n-has-top-bar .n-nav-toggle-container,:host([sticky]) .n-nav-toggle-container{position:fixed}[data-screen=wide][data-nav=opened] .n-nav-toggle-container{display:none}.n-has-nav[data-screen=wide]:not([data-nav=opened]) ::slotted(nord-top-bar),.n-has-nav[data-screen=wide]:not([data-nav=opened],.n-has-top-bar) ::slotted(nord-header[slot=header]){--_n-header-gutter:calc(var(--n-space-l) * 1.8)}.n-has-nav[data-screen=narrow] ::slotted(nord-top-bar),.n-has-nav[data-screen=narrow]:not(.n-has-top-bar) ::slotted(nord-header[slot=header]){--_n-header-gutter:var(--n-space-xl)}.n-has-top-bar :is(nord-nav-toggle,::slotted(nord-nav-toggle)){--n-button-background-color:transparent;color:rgba(255,255,255,.85)}.n-has-top-bar :is(nord-nav-toggle,::slotted(nord-nav-toggle)):focus{--n-button-background-color:rgba(0, 0, 0, 0.2)}.n-collapse-btn{--_n-collapse-btn-size:var(--n-space-l);position:fixed;inset-inline-start:calc(var(--_n-layout-nav-width) - (var(--_n-collapse-btn-size)/ 2));inset-block-start:calc(var(--_n-layout-header-size) + (var(--_n-layout-header-size) - var(--_n-collapse-btn-size))/ 2);border-radius:var(--n-border-radius-circle);block-size:var(--_n-collapse-btn-size);inline-size:var(--_n-collapse-btn-size);display:flex;align-items:center;justify-content:center;color:var(--n-color-icon);background:var(--n-color-button);box-shadow:var(--n-box-shadow-card);border:0;z-index:var(--n-index-sticky);opacity:0;visibility:hidden;cursor:pointer;transition:opacity var(--n-transition-slowly),visibility var(--n-transition-slowly),background-color var(--n-transition-quickly),color var(--n-transition-quickly)}.n-collapse-btn:hover{background:var(--n-color-accent);color:var(--n-color-text-on-accent)}.n-collapse-btn:focus{outline:0;box-shadow:0 0 0 2px var(--n-color-accent),var(--n-box-shadow)}[data-screen=narrow] .n-collapse-btn,[data-screen=wide]:not([data-nav=opened]) .n-collapse-btn{display:none}.n-collapse-btn:focus,.n-layout-nav:hover .n-collapse-btn{opacity:1;visibility:visible}.n-collapse-btn nord-icon{transform:rotate(180deg)}.n-rtl .n-collapse-btn nord-icon{transform:rotate(0)}`;w.registerIcon(h);const _=matchMedia("(min-width: 768px)"),N=j("nord-layout.navWidth",250),T=j("nord-layout.navOpen",!0),$=y({opened:{toggle:"closed",close:"closed"},closed:{toggle:"opened",open:"opened",focusin:"peek",pointerenter:"peek"},peek:{toggle:"opened",focusout:"unpeek",pointerleave:"wait",dropdownOpen:"blocked",click:"unpeek",open:"opened"},blocked:{dropdownClose:"peek",open:"opened"},wait:{toggle:"opened",focusin:"peek",pointerenter:"peek",timeout:"unpeek"},unpeek:{toggle:"opened",focusin:"peek",pointerenter:"peek",transitionend:"closed"}});let D=class extends a{constructor(){super(...arguments),this.navSlot=new g(this,"nav"),this.drawerSlot=new g(this,"drawer"),this.topBarSlot=new g(this,"top-bar"),this.headerSlot=new g(this,"header"),this.direction=new v(this),this.events=new p(this),this.lightDismiss=new u(this,{isOpen:()=>"opened"===this.navState&&!this.wideScreen,onDismiss:()=>this.navTransition("close"),isDismissible:n=>n!==this.navEl}),this.broadcast=new S(this,{channelName:"nord-layout-nav-state",enabled:()=>this.syncNavState&&this.wideScreen,onMessage:n=>{"navOpen"in n&&(this.navOpen=n.navOpen),"navWidth"in n&&(this.navWidth=n.navWidth)}}),this.navWidth=N.value,this.isDragging=!1,this.wideScreen=_.matches,this.persistNavState=!1,this.syncNavState=!1,this.padding="m",this.sticky=!1,this.handleMediaQueryChange=()=>{this.wideScreen=_.matches,this.navTransition(this.wideScreen?"open":"close")},this.handleToggleClick=()=>{this.navTransition("toggle")},this.handleNavFocus=()=>{this.navTransition("focusin")},this.handleMainFocus=()=>{this.navTransition("focusout")},this.handleMouseEnter=()=>{this.wideScreen&&this.navTransition("pointerenter")},this.handleMouseLeave=()=>{this.navTransition("pointerleave")},this.handleTransitionEnd=()=>{this.navTransition("transitionend")}}get isNarrow(){return!this.wideScreen}connectedCallback(){super.connectedCallback(),this.events.listen(_,"change",this.handleMediaQueryChange)}willUpdate(){this.hasUpdated||(this.isNarrow||this.persistNavState&&!1===T.value?this.navState="closed":this.navState="opened")}render(){const{navWidth:n,navState:e,navSlot:a,headerSlot:i,topBarSlot:s,drawerSlot:r,isDragging:d,direction:h}=this,v="opened"===e&&this.wideScreen?n:250;return t`<div class="${l({"n-layout":!0,"n-rtl":h.isRTL,"n-dragging":d,"n-has-header":i.hasContent,"n-has-top-bar":s.hasContent,"n-has-drawer":r.hasContent,"n-has-nav":a.hasContent})}" style="${c({"--_n-layout-nav-width":`${v}px`})}" data-nav="${a.hasContent?e:"closed"}" data-screen="${this.wideScreen?"wide":"narrow"}"><div class="n-layout-nav" ?hidden="${a.isEmpty}" @focusin="${this.handleNavFocus}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}" @open="${this.handleDropdownOpen}" @close="${this.handleDropdownClose}"><slot name="nav" @click="${this.handleNavClick}"></slot><div class="n-resize" role="separator" aria-orientation="vertical" tabindex="0" @pointerdown="${m("opened"===e,this.startDragging)}" @pointermove="${m(d,this.handleDrag)}" @pointerleave="${this.stopDragging}" @pointerup="${this.stopDragging}" @keydown="${this.handleKeyboardResize}" ?hidden="${this.isNarrow}"></div>${this.renderNavCollapse()}</div><div class="n-layout-main" @focusin="${this.handleMainFocus}" @click="${this.handleMainClick}">${a.hasContent?this.renderNavToggle():o}<div class="n-top-bar-container"><slot name="top-bar"></slot></div><div class="n-layout-content"><div class="n-sticky"><slot name="header"></slot></div><main><slot></slot></main></div><aside ?hidden="${this.drawerSlot.isEmpty}"><slot name="drawer"></slot></aside></div></div>`}renderNavToggle(){return t`<div class="n-nav-toggle-container"><slot name="nav-toggle" @click="${this.handleToggleClick}" @mouseover="${this.handleMouseEnter}" @mouseout="${this.handleMouseLeave}"><nord-nav-toggle></nord-nav-toggle></slot></div>`}renderNavCollapse(){return t`<button class="n-collapse-btn" @click="${this.handleToggleClick}"><nord-icon name="navigation-toggle-lock" size="s"></nord-icon></button>`}handleNavWidthChange(){N.value=this.navWidth}handleNavStateChange(n){switch("wait"===n&&this.peekTimeoutId&&clearTimeout(this.peekTimeoutId),"unpeek"===n&&this.navEl.removeEventListener("transitionend",this.handleTransitionEnd),this.navState){case"closed":this.navOpen=!1;break;case"opened":this.navOpen=!0;break;case"wait":this.peekTimeoutId=setTimeout((()=>this.navTransition("timeout")),300);break;case"unpeek":this.navEl.addEventListener("transitionend",this.handleTransitionEnd,{once:!0})}}handleOpenChange(n){this.isDragging||this.setNavWidth(Math.max(this.navWidth,250)),this.navTransition(this.navOpen?"open":"close"),this.persistNavState&&(T.value=this.navOpen),null!=n&&this.broadcast.post({navOpen:this.navOpen})}navTransition(n){this.navState=$.transition(this.navState,n)}handleNavClick(n){if(!n.defaultPrevented&&!this.wideScreen){const a=n.target;(n=>"nord-nav-item"===n.localName)(e=a)&&!e.hasSubNav&&this.navTransition("close")}var e}handleMainClick(){this.navTransition("click")}handleDropdownOpen(n){"nord-dropdown"===n.target.localName&&this.navTransition("dropdownOpen")}handleDropdownClose(n){"nord-dropdown"===n.target.localName&&this.navTransition("dropdownClose")}handleKeyboardResize(n){const{navWidth:e,direction:{isLTR:a}}=this;switch(n.key){case"ArrowLeft":this.setNavWidth(e+(a?-30:30));break;case"ArrowRight":this.setNavWidth(e+(a?30:-30));break;case"Enter":this.navTransition("toggle");break;case"Home":this.setNavWidth(220);break;case"End":this.setNavWidth(400);break;default:return}this.broadcast.post({navWidth:this.navWidth}),n.preventDefault()}setNavWidth(n){this.navWidth=k(Math.round(n),220,400)}startDragging(n){if(0===n.button){n.target.setPointerCapture(n.pointerId),this.isDragging=!0}}stopDragging(){this.isDragging=!1,this.broadcast.post({navWidth:this.navWidth})}handleDrag(n){const e=this.direction.isRTL?this.clientWidth-n.clientX:n.clientX;this.setNavWidth(e),this.navTransition(e>=100?"open":"close")}};D.styles=[f,z,C],e([d(".n-layout-nav",!0)],D.prototype,"navEl",void 0),e([r()],D.prototype,"navWidth",void 0),e([r()],D.prototype,"isDragging",void 0),e([r()],D.prototype,"navState",void 0),e([r()],D.prototype,"wideScreen",void 0),e([s({reflect:!0,type:Boolean,attribute:"nav-open"})],D.prototype,"navOpen",void 0),e([s({type:Boolean,attribute:"persist-nav-state"})],D.prototype,"persistNavState",void 0),e([s({type:Boolean,reflect:!0,attribute:"sync-nav-state"})],D.prototype,"syncNavState",void 0),e([s({reflect:!0})],D.prototype,"padding",void 0),e([s({type:Boolean,reflect:!0})],D.prototype,"sticky",void 0),e([b("navWidth","updated")],D.prototype,"handleNavWidthChange",null),e([b("navState")],D.prototype,"handleNavStateChange",null),e([b("navOpen","updated")],D.prototype,"handleOpenChange",null),D=e([i("nord-layout")],D);var W=D;export{W as default};
|
|
2
2
|
//# sourceMappingURL=Layout.js.map
|