@nordhealth/components 1.0.0 → 1.0.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.
Files changed (178) hide show
  1. package/custom-elements.json +360 -139
  2. package/lib/Avatar.js +1 -1
  3. package/lib/Avatar.js.map +1 -1
  4. package/lib/Badge.js +1 -1
  5. package/lib/Badge.js.map +1 -1
  6. package/lib/Banner.js +1 -1
  7. package/lib/Banner.js.map +1 -1
  8. package/lib/Button.js +1 -1
  9. package/lib/Button.js.map +1 -1
  10. package/lib/Calendar-52774c03.js +2 -0
  11. package/lib/Calendar-52774c03.js.map +1 -0
  12. package/lib/Calendar.js +1 -1
  13. package/lib/Card.js +1 -1
  14. package/lib/Card.js.map +1 -1
  15. package/lib/Checkbox.js +1 -1
  16. package/lib/Checkbox.js.map +1 -1
  17. package/lib/CommandMenu.js +1 -1
  18. package/lib/CommandMenu.js.map +1 -1
  19. package/lib/CommandMenuAction.js +1 -1
  20. package/lib/CommandMenuAction.js.map +1 -1
  21. package/lib/{Component-9d373ef3.js → Component-6bf383d6.js} +2 -2
  22. package/lib/Component-6bf383d6.js.map +1 -0
  23. package/lib/DatePicker.js +1 -1
  24. package/lib/DatePicker.js.map +1 -1
  25. package/lib/DateSelectEvent.js.map +1 -1
  26. package/lib/DirectionController-8b298382.js +2 -0
  27. package/lib/DirectionController-8b298382.js.map +1 -0
  28. package/lib/DraftComponentMixin-9e4b7b34.js.map +1 -1
  29. package/lib/Dropdown.js +1 -1
  30. package/lib/Dropdown.js.map +1 -1
  31. package/lib/DropdownGroup.js +1 -1
  32. package/lib/DropdownGroup.js.map +1 -1
  33. package/lib/DropdownItem.js +1 -1
  34. package/lib/DropdownItem.js.map +1 -1
  35. package/lib/EmptyState.js +1 -1
  36. package/lib/EmptyState.js.map +1 -1
  37. package/lib/EventController-d99ebeef.js.map +1 -1
  38. package/lib/Fieldset.js +1 -1
  39. package/lib/Fieldset.js.map +1 -1
  40. package/lib/{FocusableMixin-ebb67709.js → FocusableMixin-c010d3b3.js} +2 -2
  41. package/lib/{FocusableMixin-ebb67709.js.map → FocusableMixin-c010d3b3.js.map} +1 -1
  42. package/lib/FormAssociatedMixin-f69a60dd.js +2 -0
  43. package/lib/FormAssociatedMixin-f69a60dd.js.map +1 -0
  44. package/lib/{FormField-50bd73d5.js → FormField-900069ed.js} +2 -2
  45. package/lib/FormField-900069ed.js.map +1 -0
  46. package/lib/Header.js +1 -1
  47. package/lib/Header.js.map +1 -1
  48. package/lib/Icon.js +1 -1
  49. package/lib/Icon.js.map +1 -1
  50. package/lib/Input.js +1 -1
  51. package/lib/Input.js.map +1 -1
  52. package/lib/{InputMixin-94d15730.js → InputMixin-84ca72ae.js} +2 -2
  53. package/lib/InputMixin-84ca72ae.js.map +1 -0
  54. package/lib/KeyboardController.js +1 -1
  55. package/lib/KeyboardController.js.map +1 -1
  56. package/lib/Layout.js +1 -1
  57. package/lib/Layout.js.map +1 -1
  58. package/lib/LightDismissController-a2645ae6.js +2 -0
  59. package/lib/LightDismissController-a2645ae6.js.map +1 -0
  60. package/lib/LightDomController-f21f0a7c.js +2 -0
  61. package/lib/LightDomController-f21f0a7c.js.map +1 -0
  62. package/lib/LocalizeController.js +1 -1
  63. package/lib/LocalizeController.js.map +1 -1
  64. package/lib/NavGroup.js +1 -1
  65. package/lib/NavGroup.js.map +1 -1
  66. package/lib/NavItem.js +1 -1
  67. package/lib/NavItem.js.map +1 -1
  68. package/lib/Navigation.js +1 -1
  69. package/lib/Navigation.js.map +1 -1
  70. package/lib/Popout.js +1 -1
  71. package/lib/Popout.js.map +1 -1
  72. package/lib/ProgressBar.js +1 -1
  73. package/lib/ProgressBar.js.map +1 -1
  74. package/lib/Radio.js +1 -1
  75. package/lib/Radio.js.map +1 -1
  76. package/lib/Select.js +1 -1
  77. package/lib/Select.js.map +1 -1
  78. package/lib/SelectEvent.js.map +1 -1
  79. package/lib/ShortcutController-87615e31.js +2 -0
  80. package/lib/ShortcutController-87615e31.js.map +1 -0
  81. package/lib/SlotController-ea6eff46.js +2 -0
  82. package/lib/SlotController-ea6eff46.js.map +1 -0
  83. package/lib/Spinner.js +1 -1
  84. package/lib/Spinner.js.map +1 -1
  85. package/lib/Stack.js +1 -1
  86. package/lib/Stack.js.map +1 -1
  87. package/lib/Table.js +1 -1
  88. package/lib/Table.js.map +1 -1
  89. package/lib/{TextField-9bee8388.js → TextField-0ba775e0.js} +2 -2
  90. package/lib/TextField-0ba775e0.js.map +1 -0
  91. package/lib/Textarea.js +1 -1
  92. package/lib/Textarea.js.map +1 -1
  93. package/lib/Tooltip.js +1 -1
  94. package/lib/Tooltip.js.map +1 -1
  95. package/lib/VisuallyHidden.js +1 -1
  96. package/lib/VisuallyHidden.js.map +1 -1
  97. package/lib/bundle.js +16 -25
  98. package/lib/bundle.js.map +1 -1
  99. package/lib/{class-map-87423405.js → class-map-f93f9ba8.js} +2 -2
  100. package/lib/{class-map-87423405.js.map → class-map-f93f9ba8.js.map} +1 -1
  101. package/lib/collection-800f5002.js.map +1 -1
  102. package/lib/cond-a3e00141.js +2 -0
  103. package/lib/cond-a3e00141.js.map +1 -0
  104. package/lib/date-adapter.js +1 -1
  105. package/lib/date-adapter.js.map +1 -1
  106. package/lib/dates-56f73760.js +2 -0
  107. package/lib/dates-56f73760.js.map +1 -0
  108. package/lib/directive-de55b00a.js.map +1 -1
  109. package/lib/en-us.js.map +1 -1
  110. package/lib/events-731d0007.js.map +1 -1
  111. package/lib/fi-fi.js.map +1 -1
  112. package/lib/fsm-50373df9.js.map +1 -1
  113. package/lib/if-defined-ee2efb2f.js +7 -0
  114. package/lib/{if-defined-fe657a02.js.map → if-defined-ee2efb2f.js.map} +1 -1
  115. package/lib/index.js +1 -1
  116. package/lib/{lit-element-74b6bb4b.js → lit-element-99bdfe5a.js} +3 -3
  117. package/lib/{lit-element-74b6bb4b.js.map → lit-element-99bdfe5a.js.map} +1 -1
  118. package/lib/localization.js.map +1 -1
  119. package/lib/localization2.js.map +1 -1
  120. package/lib/localization3.js.map +1 -1
  121. package/lib/month-view.js +1 -1
  122. package/lib/month-view.js.map +1 -1
  123. package/lib/number-ff1c5d88.js +7 -0
  124. package/lib/{number-3a8ef88a.js.map → number-ff1c5d88.js.map} +1 -1
  125. package/lib/observe-a9c6dfb6.js +2 -0
  126. package/lib/observe-a9c6dfb6.js.map +1 -0
  127. package/lib/positioning-763efb3a.js +2 -0
  128. package/lib/positioning-763efb3a.js.map +1 -0
  129. package/lib/query-assigned-elements-ef860822.js +12 -0
  130. package/lib/query-assigned-elements-ef860822.js.map +1 -0
  131. package/lib/{ref-7d028e3a.js → ref-7e1d4d24.js} +3 -3
  132. package/lib/ref-7e1d4d24.js.map +1 -0
  133. package/lib/src/avatar/Avatar.d.ts +2 -2
  134. package/lib/src/calendar/Calendar.d.ts +3 -3
  135. package/lib/src/command-menu/CommandMenu.d.ts +4 -3
  136. package/lib/src/command-menu/CommandMenuAction.d.ts +3 -4
  137. package/lib/src/command-menu/SelectEvent.d.ts +1 -1
  138. package/lib/src/common/decorators/observe.d.ts +3 -0
  139. package/lib/src/common/directives/cond.d.ts +29 -7
  140. package/lib/src/common/fsm.d.ts +5 -3
  141. package/lib/src/common/mixins/InputMixin.d.ts +1 -1
  142. package/lib/src/icon/Icon.d.ts +3 -4
  143. package/lib/src/popout/Popout.d.ts +3 -5
  144. package/lib/src/radio/Radio.d.ts +1 -1
  145. package/lib/src/textarea/Textarea.d.ts +2 -3
  146. package/lib/src/tooltip/Tooltip.d.ts +3 -6
  147. package/lib/translation.js.map +1 -1
  148. package/lib/unsafe-html-feceb926.js +7 -0
  149. package/lib/{unsafe-html-989a642b.js.map → unsafe-html-feceb926.js.map} +1 -1
  150. package/package.json +12 -12
  151. package/lib/Calendar-d1632bb6.js +0 -2
  152. package/lib/Calendar-d1632bb6.js.map +0 -1
  153. package/lib/Component-9d373ef3.js.map +0 -1
  154. package/lib/DirectionController-b267af23.js +0 -2
  155. package/lib/DirectionController-b267af23.js.map +0 -1
  156. package/lib/FormAssociatedMixin-1f97ed66.js +0 -2
  157. package/lib/FormAssociatedMixin-1f97ed66.js.map +0 -1
  158. package/lib/FormField-50bd73d5.js.map +0 -1
  159. package/lib/InputMixin-94d15730.js.map +0 -1
  160. package/lib/LightDismissController-a35d0f66.js +0 -2
  161. package/lib/LightDismissController-a35d0f66.js.map +0 -1
  162. package/lib/LightDomController-011334da.js +0 -2
  163. package/lib/LightDomController-011334da.js.map +0 -1
  164. package/lib/ShortcutController-93173ff4.js +0 -2
  165. package/lib/ShortcutController-93173ff4.js.map +0 -1
  166. package/lib/SlotController-683d0e7c.js +0 -2
  167. package/lib/SlotController-683d0e7c.js.map +0 -1
  168. package/lib/TextField-9bee8388.js.map +0 -1
  169. package/lib/dates-9272b910.js +0 -2
  170. package/lib/dates-9272b910.js.map +0 -1
  171. package/lib/if-defined-fe657a02.js +0 -7
  172. package/lib/number-3a8ef88a.js +0 -7
  173. package/lib/positioning-72899e14.js +0 -2
  174. package/lib/positioning-72899e14.js.map +0 -1
  175. package/lib/query-assigned-elements-37b095c4.js +0 -26
  176. package/lib/query-assigned-elements-37b095c4.js.map +0 -1
  177. package/lib/ref-7d028e3a.js.map +0 -1
  178. package/lib/unsafe-html-989a642b.js +0 -7
@@ -338,6 +338,11 @@
338
338
  "description": "The name of the person.",
339
339
  "attribute": "name"
340
340
  },
341
+ {
342
+ "kind": "method",
343
+ "name": "handleSrcChange",
344
+ "privacy": "protected"
345
+ },
341
346
  {
342
347
  "kind": "method",
343
348
  "name": "renderImage",
@@ -1110,6 +1115,16 @@
1110
1115
  ],
1111
1116
  "description": "Programmatically move focus to the calendar."
1112
1117
  },
1118
+ {
1119
+ "kind": "method",
1120
+ "name": "handleValueChange",
1121
+ "privacy": "protected"
1122
+ },
1123
+ {
1124
+ "kind": "method",
1125
+ "name": "handleFocusedDayChange",
1126
+ "privacy": "protected"
1127
+ },
1113
1128
  {
1114
1129
  "kind": "method",
1115
1130
  "name": "handleLangChange",
@@ -1339,16 +1354,6 @@
1339
1354
  "kind": "class",
1340
1355
  "description": "",
1341
1356
  "name": "DateSelectEvent",
1342
- "members": [
1343
- {
1344
- "kind": "field",
1345
- "name": "date",
1346
- "type": {
1347
- "text": "Date"
1348
- },
1349
- "default": "date"
1350
- }
1351
- ],
1352
1357
  "superclass": {
1353
1358
  "name": "NordEvent",
1354
1359
  "module": "/src/common/events.js"
@@ -2397,6 +2402,21 @@
2397
2402
  }
2398
2403
  ]
2399
2404
  },
2405
+ {
2406
+ "kind": "method",
2407
+ "name": "handleCommandsChange",
2408
+ "privacy": "protected"
2409
+ },
2410
+ {
2411
+ "kind": "method",
2412
+ "name": "handleBump",
2413
+ "privacy": "protected"
2414
+ },
2415
+ {
2416
+ "kind": "method",
2417
+ "name": "focusOnOpen",
2418
+ "privacy": "protected"
2419
+ },
2400
2420
  {
2401
2421
  "kind": "method",
2402
2422
  "name": "handleAnimationEnd",
@@ -2600,7 +2620,7 @@
2600
2620
  {
2601
2621
  "kind": "method",
2602
2622
  "name": "ensureInView",
2603
- "privacy": "private",
2623
+ "privacy": "protected",
2604
2624
  "description": "Scroll to show element"
2605
2625
  },
2606
2626
  {
@@ -2677,15 +2697,6 @@
2677
2697
  "description": "",
2678
2698
  "name": "KeyboardController",
2679
2699
  "members": [
2680
- {
2681
- "kind": "field",
2682
- "name": "host",
2683
- "type": {
2684
- "text": "CommandMenu"
2685
- },
2686
- "privacy": "private",
2687
- "default": "host"
2688
- },
2689
2700
  {
2690
2701
  "kind": "field",
2691
2702
  "name": "globalShortcuts",
@@ -2749,14 +2760,6 @@
2749
2760
  },
2750
2761
  "static": true,
2751
2762
  "default": "\"nord-select\""
2752
- },
2753
- {
2754
- "kind": "field",
2755
- "name": "command",
2756
- "type": {
2757
- "text": "ICommandMenuAction"
2758
- },
2759
- "default": "command"
2760
2763
  }
2761
2764
  ],
2762
2765
  "superclass": {
@@ -5573,13 +5576,8 @@
5573
5576
  },
5574
5577
  {
5575
5578
  "kind": "method",
5576
- "name": "resolve",
5577
- "privacy": "private",
5578
- "return": {
5579
- "type": {
5580
- "text": "string | Promise<string>"
5581
- }
5582
- }
5579
+ "name": "handleNameChange",
5580
+ "privacy": "protected"
5583
5581
  }
5584
5582
  ],
5585
5583
  "attributes": [
@@ -6424,16 +6422,6 @@
6424
6422
  "kind": "field",
6425
6423
  "name": "handleLangChange",
6426
6424
  "privacy": "private"
6427
- },
6428
- {
6429
- "kind": "field",
6430
- "name": "host",
6431
- "default": "host"
6432
- },
6433
- {
6434
- "kind": "field",
6435
- "name": "options",
6436
- "default": "options"
6437
6425
  }
6438
6426
  ]
6439
6427
  }
@@ -7164,6 +7152,16 @@
7164
7152
  ],
7165
7153
  "description": "Hide the popout."
7166
7154
  },
7155
+ {
7156
+ "kind": "method",
7157
+ "name": "handleIdChange",
7158
+ "privacy": "protected"
7159
+ },
7160
+ {
7161
+ "kind": "method",
7162
+ "name": "handleOpenChange",
7163
+ "privacy": "protected"
7164
+ },
7167
7165
  {
7168
7166
  "kind": "field",
7169
7167
  "name": "updatePosition",
@@ -7528,6 +7526,19 @@
7528
7526
  "attribute": "checked",
7529
7527
  "reflects": true
7530
7528
  },
7529
+ {
7530
+ "kind": "method",
7531
+ "name": "handleCheckedChange",
7532
+ "privacy": "protected",
7533
+ "parameters": [
7534
+ {
7535
+ "name": "previousChecked",
7536
+ "type": {
7537
+ "text": "boolean"
7538
+ }
7539
+ }
7540
+ ]
7541
+ },
7531
7542
  {
7532
7543
  "kind": "method",
7533
7544
  "name": "uncheckSiblings",
@@ -9076,7 +9087,7 @@
9076
9087
  {
9077
9088
  "kind": "method",
9078
9089
  "name": "resizeToFitContent",
9079
- "privacy": "private"
9090
+ "privacy": "protected"
9080
9091
  },
9081
9092
  {
9082
9093
  "kind": "field",
@@ -9767,7 +9778,12 @@
9767
9778
  },
9768
9779
  {
9769
9780
  "kind": "method",
9770
- "name": "handleTransition",
9781
+ "name": "handleIdChange",
9782
+ "privacy": "protected"
9783
+ },
9784
+ {
9785
+ "kind": "method",
9786
+ "name": "handleStateChange",
9771
9787
  "privacy": "private",
9772
9788
  "parameters": [
9773
9789
  {
@@ -9986,11 +10002,6 @@
9986
10002
  "name": "observe",
9987
10003
  "privacy": "private",
9988
10004
  "static": true
9989
- },
9990
- {
9991
- "kind": "field",
9992
- "name": "host",
9993
- "default": "host"
9994
10005
  }
9995
10006
  ]
9996
10007
  }
@@ -10243,16 +10254,6 @@
10243
10254
  "kind": "field",
10244
10255
  "name": "handleFormData",
10245
10256
  "privacy": "private"
10246
- },
10247
- {
10248
- "kind": "field",
10249
- "name": "host",
10250
- "default": "host"
10251
- },
10252
- {
10253
- "kind": "field",
10254
- "name": "options",
10255
- "default": "options"
10256
10257
  }
10257
10258
  ]
10258
10259
  }
@@ -10284,7 +10285,7 @@
10284
10285
  "text": "ShortcutController"
10285
10286
  },
10286
10287
  "privacy": "private",
10287
- "default": "new ShortcutController(this.host, { Escape: this.handleEsc })"
10288
+ "default": "new ShortcutController(host, { Escape: this.handleEsc })"
10288
10289
  },
10289
10290
  {
10290
10291
  "kind": "field",
@@ -10308,16 +10309,6 @@
10308
10309
  "kind": "field",
10309
10310
  "name": "handleClickOut",
10310
10311
  "privacy": "private"
10311
- },
10312
- {
10313
- "kind": "field",
10314
- "name": "host",
10315
- "default": "host"
10316
- },
10317
- {
10318
- "kind": "field",
10319
- "name": "options",
10320
- "default": "options"
10321
10312
  }
10322
10313
  ]
10323
10314
  }
@@ -10357,16 +10348,6 @@
10357
10348
  {
10358
10349
  "kind": "method",
10359
10350
  "name": "hostDisconnected"
10360
- },
10361
- {
10362
- "kind": "field",
10363
- "name": "host",
10364
- "default": "host"
10365
- },
10366
- {
10367
- "kind": "field",
10368
- "name": "options",
10369
- "default": "options"
10370
10351
  }
10371
10352
  ]
10372
10353
  }
@@ -10442,11 +10423,6 @@
10442
10423
  "name": "syncLightDom",
10443
10424
  "privacy": "private"
10444
10425
  },
10445
- {
10446
- "kind": "field",
10447
- "name": "options",
10448
- "default": "options"
10449
- },
10450
10426
  {
10451
10427
  "kind": "field",
10452
10428
  "name": "events",
@@ -10492,24 +10468,6 @@
10492
10468
  "name": "SlotController",
10493
10469
  "module": "src/common/controllers/SlotController.ts"
10494
10470
  }
10495
- },
10496
- {
10497
- "kind": "field",
10498
- "name": "host",
10499
- "default": "host",
10500
- "inheritedFrom": {
10501
- "name": "SlotController",
10502
- "module": "src/common/controllers/SlotController.ts"
10503
- }
10504
- },
10505
- {
10506
- "kind": "field",
10507
- "name": "slotName",
10508
- "default": "slotName",
10509
- "inheritedFrom": {
10510
- "name": "SlotController",
10511
- "module": "src/common/controllers/SlotController.ts"
10512
- }
10513
10471
  }
10514
10472
  ],
10515
10473
  "superclass": {
@@ -10568,16 +10526,6 @@
10568
10526
  {
10569
10527
  "kind": "method",
10570
10528
  "name": "hostDisconnected"
10571
- },
10572
- {
10573
- "kind": "field",
10574
- "name": "host",
10575
- "default": "host"
10576
- },
10577
- {
10578
- "kind": "field",
10579
- "name": "options",
10580
- "default": "options"
10581
10529
  }
10582
10530
  ]
10583
10531
  }
@@ -10633,16 +10581,6 @@
10633
10581
  }
10634
10582
  }
10635
10583
  ]
10636
- },
10637
- {
10638
- "kind": "field",
10639
- "name": "shortcuts",
10640
- "default": "shortcuts"
10641
- },
10642
- {
10643
- "kind": "field",
10644
- "name": "target",
10645
- "default": "target"
10646
10584
  }
10647
10585
  ]
10648
10586
  }
@@ -10717,16 +10655,6 @@
10717
10655
  }
10718
10656
  }
10719
10657
  ]
10720
- },
10721
- {
10722
- "kind": "field",
10723
- "name": "host",
10724
- "default": "host"
10725
- },
10726
- {
10727
- "kind": "field",
10728
- "name": "slotName",
10729
- "default": "slotName"
10730
10658
  }
10731
10659
  ]
10732
10660
  }
@@ -10868,16 +10796,309 @@
10868
10796
  }
10869
10797
  ]
10870
10798
  },
10799
+ {
10800
+ "kind": "javascript-module",
10801
+ "path": "src/common/decorators/observe.ts",
10802
+ "declarations": [
10803
+ {
10804
+ "kind": "function",
10805
+ "name": "observe",
10806
+ "parameters": [
10807
+ {
10808
+ "name": "propertyName",
10809
+ "type": {
10810
+ "text": "string"
10811
+ }
10812
+ },
10813
+ {
10814
+ "name": "lifecycle",
10815
+ "default": "\"update\"",
10816
+ "type": {
10817
+ "text": "ObserveLifecycle"
10818
+ }
10819
+ }
10820
+ ]
10821
+ }
10822
+ ],
10823
+ "exports": [
10824
+ {
10825
+ "kind": "js",
10826
+ "name": "observe",
10827
+ "declaration": {
10828
+ "name": "observe",
10829
+ "module": "src/common/decorators/observe.ts"
10830
+ }
10831
+ }
10832
+ ]
10833
+ },
10871
10834
  {
10872
10835
  "kind": "javascript-module",
10873
10836
  "path": "src/common/directives/cond.ts",
10874
10837
  "declarations": [
10875
10838
  {
10876
- "kind": "variable",
10877
- "name": "cond"
10839
+ "kind": "function",
10840
+ "name": "cond",
10841
+ "return": {
10842
+ "type": {
10843
+ "text": "typeof value | typeof nothing"
10844
+ }
10845
+ },
10846
+ "parameters": [
10847
+ {
10848
+ "name": "value",
10849
+ "type": {
10850
+ "text": "any"
10851
+ }
10852
+ }
10853
+ ],
10854
+ "description": "if value is truthy, return it, otherwise return nothing"
10855
+ },
10856
+ {
10857
+ "kind": "function",
10858
+ "name": "cond",
10859
+ "return": {
10860
+ "type": {
10861
+ "text": "typeof trueCase | typeof nothing"
10862
+ }
10863
+ },
10864
+ "parameters": [
10865
+ {
10866
+ "name": "condition",
10867
+ "type": {
10868
+ "text": "unknown"
10869
+ }
10870
+ },
10871
+ {
10872
+ "name": "trueCase",
10873
+ "type": {
10874
+ "text": "any"
10875
+ }
10876
+ }
10877
+ ],
10878
+ "description": "if condition is truthy, return trueCase, otherwise return nothing"
10879
+ },
10880
+ {
10881
+ "kind": "function",
10882
+ "name": "cond",
10883
+ "return": {
10884
+ "type": {
10885
+ "text": "typeof trueCase"
10886
+ }
10887
+ },
10888
+ "parameters": [
10889
+ {
10890
+ "name": "condition",
10891
+ "type": {
10892
+ "text": "true"
10893
+ }
10894
+ },
10895
+ {
10896
+ "name": "trueCase",
10897
+ "type": {
10898
+ "text": "any"
10899
+ }
10900
+ }
10901
+ ],
10902
+ "description": "condition is true, so always return trueCase"
10903
+ },
10904
+ {
10905
+ "kind": "function",
10906
+ "name": "cond",
10907
+ "return": {
10908
+ "type": {
10909
+ "text": "typeof nothing"
10910
+ }
10911
+ },
10912
+ "parameters": [
10913
+ {
10914
+ "name": "condition",
10915
+ "type": {
10916
+ "text": "false"
10917
+ }
10918
+ },
10919
+ {
10920
+ "name": "trueCase",
10921
+ "type": {
10922
+ "text": "any"
10923
+ }
10924
+ }
10925
+ ],
10926
+ "description": "condition is false, to will always return nothing"
10927
+ },
10928
+ {
10929
+ "kind": "function",
10930
+ "name": "cond",
10931
+ "return": {
10932
+ "type": {
10933
+ "text": "typeof trueCase | typeof falseCase"
10934
+ }
10935
+ },
10936
+ "parameters": [
10937
+ {
10938
+ "name": "condition",
10939
+ "type": {
10940
+ "text": "unknown"
10941
+ }
10942
+ },
10943
+ {
10944
+ "name": "trueCase",
10945
+ "type": {
10946
+ "text": "any"
10947
+ }
10948
+ },
10949
+ {
10950
+ "name": "falseCase",
10951
+ "type": {
10952
+ "text": "any"
10953
+ }
10954
+ }
10955
+ ],
10956
+ "description": "if condition is truthy, return trueCase, otherwise return falseCase"
10957
+ },
10958
+ {
10959
+ "kind": "function",
10960
+ "name": "cond",
10961
+ "return": {
10962
+ "type": {
10963
+ "text": "typeof trueCase"
10964
+ }
10965
+ },
10966
+ "parameters": [
10967
+ {
10968
+ "name": "condition",
10969
+ "type": {
10970
+ "text": "true"
10971
+ }
10972
+ },
10973
+ {
10974
+ "name": "trueCase",
10975
+ "type": {
10976
+ "text": "any"
10977
+ }
10978
+ },
10979
+ {
10980
+ "name": "falseCase",
10981
+ "type": {
10982
+ "text": "any"
10983
+ }
10984
+ }
10985
+ ],
10986
+ "description": "condition is true, so always return trueCase"
10987
+ },
10988
+ {
10989
+ "kind": "function",
10990
+ "name": "cond",
10991
+ "return": {
10992
+ "type": {
10993
+ "text": "typeof falseCase"
10994
+ }
10995
+ },
10996
+ "parameters": [
10997
+ {
10998
+ "name": "condition",
10999
+ "type": {
11000
+ "text": "false"
11001
+ }
11002
+ },
11003
+ {
11004
+ "name": "trueCase",
11005
+ "type": {
11006
+ "text": "any"
11007
+ }
11008
+ },
11009
+ {
11010
+ "name": "falseCase",
11011
+ "type": {
11012
+ "text": "any"
11013
+ }
11014
+ }
11015
+ ],
11016
+ "description": "condition is false, so always return falseCase"
11017
+ },
11018
+ {
11019
+ "kind": "function",
11020
+ "name": "cond",
11021
+ "parameters": [
11022
+ {
11023
+ "name": "condition",
11024
+ "type": {
11025
+ "text": "unknown"
11026
+ }
11027
+ },
11028
+ {
11029
+ "name": "trueCase",
11030
+ "default": "condition",
11031
+ "type": {
11032
+ "text": "any"
11033
+ }
11034
+ },
11035
+ {
11036
+ "name": "falseCase",
11037
+ "default": "nothing",
11038
+ "type": {
11039
+ "text": "any"
11040
+ }
11041
+ }
11042
+ ]
10878
11043
  }
10879
11044
  ],
10880
11045
  "exports": [
11046
+ {
11047
+ "kind": "js",
11048
+ "name": "cond",
11049
+ "declaration": {
11050
+ "name": "cond",
11051
+ "module": "src/common/directives/cond.ts"
11052
+ }
11053
+ },
11054
+ {
11055
+ "kind": "js",
11056
+ "name": "cond",
11057
+ "declaration": {
11058
+ "name": "cond",
11059
+ "module": "src/common/directives/cond.ts"
11060
+ }
11061
+ },
11062
+ {
11063
+ "kind": "js",
11064
+ "name": "cond",
11065
+ "declaration": {
11066
+ "name": "cond",
11067
+ "module": "src/common/directives/cond.ts"
11068
+ }
11069
+ },
11070
+ {
11071
+ "kind": "js",
11072
+ "name": "cond",
11073
+ "declaration": {
11074
+ "name": "cond",
11075
+ "module": "src/common/directives/cond.ts"
11076
+ }
11077
+ },
11078
+ {
11079
+ "kind": "js",
11080
+ "name": "cond",
11081
+ "declaration": {
11082
+ "name": "cond",
11083
+ "module": "src/common/directives/cond.ts"
11084
+ }
11085
+ },
11086
+ {
11087
+ "kind": "js",
11088
+ "name": "cond",
11089
+ "declaration": {
11090
+ "name": "cond",
11091
+ "module": "src/common/directives/cond.ts"
11092
+ }
11093
+ },
11094
+ {
11095
+ "kind": "js",
11096
+ "name": "cond",
11097
+ "declaration": {
11098
+ "name": "cond",
11099
+ "module": "src/common/directives/cond.ts"
11100
+ }
11101
+ },
10881
11102
  {
10882
11103
  "kind": "js",
10883
11104
  "name": "cond",
@@ -11727,7 +11948,7 @@
11727
11948
  "kind": "field",
11728
11949
  "name": "name",
11729
11950
  "type": {
11730
- "text": "string"
11951
+ "text": "string | undefined"
11731
11952
  }
11732
11953
  },
11733
11954
  {
package/lib/Avatar.js CHANGED
@@ -1,2 +1,2 @@
1
- import{_ as e,n as i}from"./query-assigned-elements-37b095c4.js";import{r as t,s as r,$ as s,w as a}from"./lit-element-74b6bb4b.js";import{l as o}from"./if-defined-fe657a02.js";import{e as n}from"./property-03f59dce.js";import{t as l}from"./state-70f38ceb.js";import{s as c}from"./Component-9d373ef3.js";import{f as d}from"./fsm-50373df9.js";const h=t`:host{--n-avatar-size:var(--n-size-icon-l);display:inline-flex;block-size:var(--n-avatar-size);inline-size:var(--n-avatar-size)}.n-avatar{background:var(--n-color-status-info);border-radius:var(--n-border-radius-circle);overflow:hidden;inline-size:100%;block-size:100%}img,svg{inline-size:100%;block-size:auto;object-fit:cover}.n-loading{display:none}:host([size="l"]){--n-avatar-size:var(--n-size-icon-xl)}:host([size=xl]){--n-avatar-size:var(--n-size-icon-xxl)}:host([size=xxl]){--n-avatar-size:calc(var(--n-size-icon-xxl) * 1.5)}`,{transition:v}=d({initial:{"src-set":"loading"},loading:{load:"loaded",error:"initial","src-clear":"initial"},loaded:{"src-set":"loading","src-clear":"initial"}});let f=class extends r{constructor(){super(...arguments),this.state="initial",this.size="m",this.name=""}willUpdate(e){if(e.has("src")){const e=this.src?"src-set":"src-clear";this.state=v(this.state,e)}}render(){return s`<div class="n-avatar">${"initial"!==this.state?this.renderImage():a} ${"loaded"!==this.state?this.renderFallback():a}</div>`}renderImage(){return this.src?s`<img class="n-${this.state}" src="${this.src}" @load="${this.handleLoad}" @error="${this.handleError}" alt="${this.name||""}">`:a}renderFallback(){return s`<svg aria-label="${this.name}" role="${o(this.name?"img":void 0)}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27"><rect fill="var(--n-color-status-info)" height="27" rx="12" width="27" x="0" y="0"></rect><g fill="#fff" opacity=".5"><circle cx="13.5" cy="30" r="13"></circle><circle cx="13.5" cy="11" r="5"></circle></g></svg>`}handleLoad(){this.state=v(this.state,"load")}handleError(){this.state=v(this.state,"error")}};f.styles=[c,h],e([l()],f.prototype,"state",void 0),e([n({reflect:!0})],f.prototype,"size",void 0),e([n({reflect:!0})],f.prototype,"src",void 0),e([n()],f.prototype,"name",void 0),f=e([i("nord-avatar")],f);var m=f;export{m as default};
1
+ import{_ as e,n as r}from"./query-assigned-elements-ef860822.js";import{r as t,s,$ as a,w as i}from"./lit-element-99bdfe5a.js";import{e as o}from"./property-03f59dce.js";import{t as n}from"./state-70f38ceb.js";import{s as l}from"./Component-6bf383d6.js";import{f as c}from"./fsm-50373df9.js";import{c as d}from"./cond-a3e00141.js";import{o as h}from"./observe-a9c6dfb6.js";const v=t`:host{--n-avatar-size:var(--n-size-icon-l);display:inline-flex;block-size:var(--n-avatar-size);inline-size:var(--n-avatar-size)}.n-avatar{background:var(--n-color-status-info);border-radius:var(--n-border-radius-circle);overflow:hidden;inline-size:100%;block-size:100%}img,svg{inline-size:100%;block-size:auto;object-fit:cover}.n-loading{display:none}:host([size="l"]){--n-avatar-size:var(--n-size-icon-xl)}:host([size=xl]){--n-avatar-size:var(--n-size-icon-xxl)}:host([size=xxl]){--n-avatar-size:calc(var(--n-size-icon-xxl) * 1.5)}`,{transition:m}=c({initial:{"src-set":"loading"},loading:{load:"loaded",error:"initial","src-clear":"initial"},loaded:{"src-set":"loading","src-clear":"initial"}});let f=class extends s{constructor(){super(...arguments),this.state="initial",this.size="m",this.name=""}render(){return a`<div class="n-avatar">${"initial"!==this.state?this.renderImage():i} ${"loaded"!==this.state?this.renderFallback():i}</div>`}handleSrcChange(){const e=this.src?"src-set":"src-clear";this.state=m(this.state,e)}renderImage(){return this.src?a`<img class="n-${this.state}" src="${this.src}" @load="${this.handleLoad}" @error="${this.handleError}" alt="${this.name||""}">`:i}renderFallback(){return a`<svg aria-label="${this.name}" role="${d(this.name,"img")}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27 27"><rect fill="var(--n-color-status-info)" height="27" rx="12" width="27" x="0" y="0"></rect><g fill="#fff" opacity=".5"><circle cx="13.5" cy="30" r="13"></circle><circle cx="13.5" cy="11" r="5"></circle></g></svg>`}handleLoad(){this.state=m(this.state,"load")}handleError(){this.state=m(this.state,"error")}};f.styles=[l,v],e([n()],f.prototype,"state",void 0),e([o({reflect:!0})],f.prototype,"size",void 0),e([o({reflect:!0})],f.prototype,"src",void 0),e([o()],f.prototype,"name",void 0),e([h("src")],f.prototype,"handleSrcChange",null),f=e([r("nord-avatar")],f);var p=f;export{p as default};
2
2
  //# sourceMappingURL=Avatar.js.map