@nysds/components 1.16.0-alpha-3 → 1.16.0-alpha4

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.
@@ -1717,16 +1717,6 @@
1717
1717
  "attribute": "target",
1718
1718
  "reflects": true
1719
1719
  },
1720
- {
1721
- "kind": "method",
1722
- "name": "getButtonElement",
1723
- "privacy": "public",
1724
- "return": {
1725
- "type": {
1726
- "text": "Promise<HTMLElement | null>"
1727
- }
1728
- }
1729
- },
1730
1720
  {
1731
1721
  "kind": "field",
1732
1722
  "name": "_internals",
@@ -1797,7 +1787,7 @@
1797
1787
  "kind": "method",
1798
1788
  "name": "_handleAnyAttributeFunction",
1799
1789
  "privacy": "private",
1800
- "description": "Vanilla JS & Native HTML keydown solution:\nThe <nys-button onClick=\"doFunction();\"></nys-button> onClick is an attribute here.\nThus, we call it here. Otherwise, at this point, this.onClick is null as it isn't props, but a string attribute\nIn vanilla HTML/JS, clicking with execute the attribute function, BUT now with keydown, hence this solution."
1790
+ "description": "A Solution to the Vanilla JS & Native HTML keydown:\n\nHandles inline onClick attributes set as strings in vanilla HTML\n(e.g. <nys-button onClick=\"doSomething()\">).\n\nWhen onClick is set this way, it is a DOM attribute (not a property)\nso this.onClick remains null. Native clicks execute the attribute\nautomatically, but keydown events do not, so we invoke it manually here."
1801
1791
  },
1802
1792
  {
1803
1793
  "kind": "method",
@@ -3070,6 +3060,11 @@
3070
3060
  }
3071
3061
  ]
3072
3062
  },
3063
+ {
3064
+ "kind": "method",
3065
+ "name": "_handleOtherInput",
3066
+ "privacy": "private"
3067
+ },
3073
3068
  {
3074
3069
  "kind": "method",
3075
3070
  "name": "_checkOtherInputs",
@@ -6507,21 +6502,23 @@
6507
6502
  },
6508
6503
  {
6509
6504
  "kind": "field",
6510
- "name": "isMobileMenuOpen",
6505
+ "name": "_isMobileMenuOpen",
6511
6506
  "type": {
6512
6507
  "text": "boolean"
6513
6508
  },
6514
6509
  "privacy": "private",
6515
- "default": "false"
6510
+ "default": "false",
6511
+ "description": "Internal state to track mobile menu open/closed status."
6516
6512
  },
6517
6513
  {
6518
6514
  "kind": "field",
6519
- "name": "hasLinkContent",
6515
+ "name": "_hasLinkContent",
6520
6516
  "type": {
6521
6517
  "text": "boolean"
6522
6518
  },
6523
6519
  "privacy": "private",
6524
- "default": "false"
6520
+ "default": "false",
6521
+ "description": "Internal state to track if any navigation links are present in the slot."
6525
6522
  },
6526
6523
  {
6527
6524
  "kind": "method",
@@ -7797,6 +7794,11 @@
7797
7794
  "name": "_clearOtherState",
7798
7795
  "privacy": "private"
7799
7796
  },
7797
+ {
7798
+ "kind": "method",
7799
+ "name": "_dispatchClearErrorEvent",
7800
+ "privacy": "private"
7801
+ },
7800
7802
  {
7801
7803
  "kind": "method",
7802
7804
  "name": "_emitChangeEvent",
@@ -8406,6 +8408,24 @@
8406
8408
  }
8407
8409
  }
8408
8410
  ]
8411
+ },
8412
+ {
8413
+ "kind": "method",
8414
+ "name": "_handleChildErrorClear",
8415
+ "privacy": "private"
8416
+ },
8417
+ {
8418
+ "kind": "method",
8419
+ "name": "_handleOtherInput",
8420
+ "privacy": "private",
8421
+ "parameters": [
8422
+ {
8423
+ "name": "event",
8424
+ "type": {
8425
+ "text": "Event"
8426
+ }
8427
+ }
8428
+ ]
8409
8429
  }
8410
8430
  ],
8411
8431
  "attributes": [
@@ -9939,6 +9959,7 @@
9939
9959
  {
9940
9960
  "kind": "method",
9941
9961
  "name": "_onSortClick",
9962
+ "privacy": "private",
9942
9963
  "parameters": [
9943
9964
  {
9944
9965
  "name": "columnIndex",
@@ -9993,12 +10014,50 @@
9993
10014
  {
9994
10015
  "kind": "method",
9995
10016
  "name": "downloadFile"
10017
+ },
10018
+ {
10019
+ "kind": "method",
10020
+ "name": "_emitColumnSortEvent",
10021
+ "privacy": "private",
10022
+ "return": {
10023
+ "type": {
10024
+ "text": "boolean"
10025
+ }
10026
+ },
10027
+ "parameters": [
10028
+ {
10029
+ "name": "columnIndex",
10030
+ "type": {
10031
+ "text": "number"
10032
+ },
10033
+ "description": "Zero-based index of the sorted column."
10034
+ },
10035
+ {
10036
+ "name": "columnLabel",
10037
+ "type": {
10038
+ "text": "string"
10039
+ },
10040
+ "description": "The text label of the sorted column header."
10041
+ },
10042
+ {
10043
+ "name": "sortDirection",
10044
+ "type": {
10045
+ "text": "\"asc\" | \"desc\" | \"none\""
10046
+ },
10047
+ "description": "The new sort direction: \"asc\", \"desc\", or \"none\"."
10048
+ }
10049
+ ],
10050
+ "description": "Dispatches the `nys-column-sort` custom event."
9996
10051
  }
9997
10052
  ],
9998
10053
  "events": [
9999
10054
  {
10000
10055
  "description": "Fired when the download button or sortable headers are clicked.",
10001
10056
  "name": "nys-click"
10057
+ },
10058
+ {
10059
+ "description": "Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior. Detail: { columnIndex: number, columnLabel: string, sortDirection: \"asc\" | \"desc\" | \"none\" }",
10060
+ "name": "nys-column-sort"
10002
10061
  }
10003
10062
  ],
10004
10063
  "attributes": [
@@ -12638,6 +12697,321 @@
12638
12697
  }
12639
12698
  }
12640
12699
  ]
12700
+ },
12701
+ {
12702
+ "kind": "javascript-module",
12703
+ "path": "packages/nys-video/src/index.ts",
12704
+ "declarations": [],
12705
+ "exports": [
12706
+ {
12707
+ "kind": "js",
12708
+ "name": "*",
12709
+ "declaration": {
12710
+ "name": "*",
12711
+ "module": "packages/nys-video/src/nys-video"
12712
+ }
12713
+ }
12714
+ ]
12715
+ },
12716
+ {
12717
+ "kind": "javascript-module",
12718
+ "path": "packages/nys-video/src/nys-video.ts",
12719
+ "declarations": [
12720
+ {
12721
+ "kind": "class",
12722
+ "description": "",
12723
+ "name": "NysVideo",
12724
+ "members": [
12725
+ {
12726
+ "kind": "field",
12727
+ "name": "id",
12728
+ "type": {
12729
+ "text": "string"
12730
+ },
12731
+ "default": "\"\"",
12732
+ "description": "Full YouTube URL — required. Component will not render if invalid.",
12733
+ "attribute": "id",
12734
+ "reflects": true
12735
+ },
12736
+ {
12737
+ "kind": "field",
12738
+ "name": "titleText",
12739
+ "type": {
12740
+ "text": "string"
12741
+ },
12742
+ "default": "\"\"",
12743
+ "description": "Title text for the thumbnail of the video",
12744
+ "attribute": "titleText",
12745
+ "reflects": true
12746
+ },
12747
+ {
12748
+ "kind": "field",
12749
+ "name": "videourl",
12750
+ "type": {
12751
+ "text": "string"
12752
+ },
12753
+ "default": "\"\"",
12754
+ "description": "Full YouTube URL — required. Component will not render if invalid.",
12755
+ "attribute": "videourl"
12756
+ },
12757
+ {
12758
+ "kind": "field",
12759
+ "name": "size",
12760
+ "type": {
12761
+ "text": "\"full\" | \"md\" | \"sm\" | \"\""
12762
+ },
12763
+ "default": "\"\"",
12764
+ "description": "Largest size for the video player.\nIf not set, size is determined automatically by viewport width.",
12765
+ "attribute": "size",
12766
+ "reflects": true
12767
+ },
12768
+ {
12769
+ "kind": "field",
12770
+ "name": "loading",
12771
+ "type": {
12772
+ "text": "\"lazy\" | \"eager\""
12773
+ },
12774
+ "default": "\"lazy\"",
12775
+ "attribute": "loading"
12776
+ },
12777
+ {
12778
+ "kind": "field",
12779
+ "name": "starttime",
12780
+ "type": {
12781
+ "text": "number"
12782
+ },
12783
+ "default": "0",
12784
+ "description": "Time in seconds where playback begins. *",
12785
+ "attribute": "starttime"
12786
+ },
12787
+ {
12788
+ "kind": "field",
12789
+ "name": "thumbnail",
12790
+ "type": {
12791
+ "text": "string | null"
12792
+ },
12793
+ "default": "null",
12794
+ "description": "Custom thumbnail image path.\nFalls back to YouTube's auto-generated thumbnail if not provided.",
12795
+ "attribute": "thumbnail"
12796
+ },
12797
+ {
12798
+ "kind": "field",
12799
+ "name": "autoplay",
12800
+ "type": {
12801
+ "text": "boolean"
12802
+ },
12803
+ "default": "false",
12804
+ "description": "Triggers autoplay when the iframe loads",
12805
+ "attribute": "autoplay"
12806
+ },
12807
+ {
12808
+ "kind": "field",
12809
+ "name": "disabled",
12810
+ "type": {
12811
+ "text": "boolean"
12812
+ },
12813
+ "default": "false",
12814
+ "description": "Prevents the video from being played",
12815
+ "attribute": "disabled",
12816
+ "reflects": true
12817
+ },
12818
+ {
12819
+ "kind": "field",
12820
+ "name": "_playerActive",
12821
+ "type": {
12822
+ "text": "boolean"
12823
+ },
12824
+ "privacy": "private",
12825
+ "default": "false",
12826
+ "description": "Tracks whether the user has clicked to load the player"
12827
+ },
12828
+ {
12829
+ "kind": "field",
12830
+ "name": "_announcement",
12831
+ "type": {
12832
+ "text": "string"
12833
+ },
12834
+ "privacy": "private",
12835
+ "default": "\"\"",
12836
+ "description": "Screen reader announcement text"
12837
+ },
12838
+ {
12839
+ "kind": "field",
12840
+ "name": "_adPlaying",
12841
+ "type": {
12842
+ "text": "boolean"
12843
+ },
12844
+ "privacy": "private",
12845
+ "default": "false",
12846
+ "description": "Tracks whether an ad is currently playing to suppress false \"Video is playing\" announcements"
12847
+ },
12848
+ {
12849
+ "kind": "method",
12850
+ "name": "_isValidYouTubeUrl",
12851
+ "privacy": "private",
12852
+ "return": {
12853
+ "type": {
12854
+ "text": "boolean"
12855
+ }
12856
+ },
12857
+ "description": "Functions\n--------------------------------------------------------------------------"
12858
+ },
12859
+ {
12860
+ "kind": "method",
12861
+ "name": "_getVideoId",
12862
+ "privacy": "private"
12863
+ },
12864
+ {
12865
+ "kind": "method",
12866
+ "name": "_getThumbnailUrl",
12867
+ "privacy": "private"
12868
+ },
12869
+ {
12870
+ "kind": "method",
12871
+ "name": "_getEmbedUrl",
12872
+ "privacy": "private"
12873
+ },
12874
+ {
12875
+ "kind": "method",
12876
+ "name": "_announceVideoVO",
12877
+ "privacy": "private",
12878
+ "description": "Because I need to know if Youtube ADs are playing, I need to call YT's API.\nHence, the YT API setup below. The VO has 2 types of announcements:\n- \"Advertisement is playing\"\n- \"Video is playing\"\n\nYT IFrame Player API: https://developers.google.com/youtube/iframe_api_reference"
12879
+ },
12880
+ {
12881
+ "kind": "method",
12882
+ "name": "_handleThumbnailClick",
12883
+ "privacy": "private",
12884
+ "description": "Event Handlers\n--------------------------------------------------------------------------"
12885
+ },
12886
+ {
12887
+ "kind": "method",
12888
+ "name": "_renderAnnouncer",
12889
+ "privacy": "private",
12890
+ "description": "Render Helpers\n--------------------------------------------------------------------------"
12891
+ },
12892
+ {
12893
+ "kind": "method",
12894
+ "name": "_renderPlayIcon",
12895
+ "privacy": "private"
12896
+ }
12897
+ ],
12898
+ "attributes": [
12899
+ {
12900
+ "name": "id",
12901
+ "type": {
12902
+ "text": "string"
12903
+ },
12904
+ "default": "\"\"",
12905
+ "description": "Full YouTube URL — required. Component will not render if invalid.",
12906
+ "fieldName": "id",
12907
+ "propName": "id"
12908
+ },
12909
+ {
12910
+ "name": "titleText",
12911
+ "type": {
12912
+ "text": "string"
12913
+ },
12914
+ "default": "\"\"",
12915
+ "description": "Title text for the thumbnail of the video",
12916
+ "fieldName": "titleText",
12917
+ "propName": "titletext"
12918
+ },
12919
+ {
12920
+ "name": "videourl",
12921
+ "type": {
12922
+ "text": "string"
12923
+ },
12924
+ "default": "\"\"",
12925
+ "description": "Full YouTube URL — required. Component will not render if invalid.",
12926
+ "fieldName": "videourl",
12927
+ "propName": "videourl"
12928
+ },
12929
+ {
12930
+ "name": "size",
12931
+ "type": {
12932
+ "text": "\"full\" | \"md\" | \"sm\" | \"\""
12933
+ },
12934
+ "default": "\"\"",
12935
+ "description": "Largest size for the video player.\nIf not set, size is determined automatically by viewport width.",
12936
+ "fieldName": "size",
12937
+ "propName": "size"
12938
+ },
12939
+ {
12940
+ "name": "loading",
12941
+ "type": {
12942
+ "text": "\"lazy\" | \"eager\""
12943
+ },
12944
+ "default": "\"lazy\"",
12945
+ "fieldName": "loading",
12946
+ "propName": "loading"
12947
+ },
12948
+ {
12949
+ "name": "starttime",
12950
+ "type": {
12951
+ "text": "number"
12952
+ },
12953
+ "default": "0",
12954
+ "description": "Time in seconds where playback begins. *",
12955
+ "fieldName": "starttime",
12956
+ "propName": "starttime"
12957
+ },
12958
+ {
12959
+ "name": "thumbnail",
12960
+ "type": {
12961
+ "text": "string | null"
12962
+ },
12963
+ "default": "null",
12964
+ "description": "Custom thumbnail image path.\nFalls back to YouTube's auto-generated thumbnail if not provided.",
12965
+ "fieldName": "thumbnail",
12966
+ "propName": "thumbnail"
12967
+ },
12968
+ {
12969
+ "name": "autoplay",
12970
+ "type": {
12971
+ "text": "boolean"
12972
+ },
12973
+ "default": "false",
12974
+ "description": "Triggers autoplay when the iframe loads",
12975
+ "fieldName": "autoplay",
12976
+ "propName": "autoplay"
12977
+ },
12978
+ {
12979
+ "name": "disabled",
12980
+ "type": {
12981
+ "text": "boolean"
12982
+ },
12983
+ "default": "false",
12984
+ "description": "Prevents the video from being played",
12985
+ "fieldName": "disabled",
12986
+ "propName": "disabled"
12987
+ }
12988
+ ],
12989
+ "superclass": {
12990
+ "name": "LitElement",
12991
+ "package": "lit"
12992
+ },
12993
+ "tagName": "nys-video",
12994
+ "customElement": true
12995
+ }
12996
+ ],
12997
+ "exports": [
12998
+ {
12999
+ "kind": "custom-element-definition",
13000
+ "name": "nys-video",
13001
+ "declaration": {
13002
+ "name": "NysVideo",
13003
+ "module": "packages/nys-video/src/nys-video.ts"
13004
+ }
13005
+ },
13006
+ {
13007
+ "kind": "js",
13008
+ "name": "NysVideo",
13009
+ "declaration": {
13010
+ "name": "NysVideo",
13011
+ "module": "packages/nys-video/src/nys-video.ts"
13012
+ }
13013
+ }
13014
+ ]
12641
13015
  }
12642
13016
  ]
12643
13017
  }
@@ -1361,7 +1361,7 @@
1361
1361
  },
1362
1362
  {
1363
1363
  "name": "nys-table",
1364
- "description": "`<nys-table>` is a responsive table component that can display native HTML tables,\nsupports striped and bordered styling, sortable columns, and CSV download.\n---\n\n\n### **Events:**\n - **nys-click** - Fired when the download button or sortable headers are clicked.\n\n### **Slots:**\n - _default_ - Accepts a `<table>` element. Only the first table is rendered.",
1364
+ "description": "`<nys-table>` is a responsive table component that can display native HTML tables,\nsupports striped and bordered styling, sortable columns, and CSV download.\n---\n\n\n### **Events:**\n - **nys-click** - Fired when the download button or sortable headers are clicked.\n- **nys-column-sort** - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior. Detail: { columnIndex: number, columnLabel: string, sortDirection: \"asc\" | \"desc\" | \"none\" }\n\n### **Slots:**\n - _default_ - Accepts a `<table>` element. Only the first table is rendered.",
1365
1365
  "attributes": [
1366
1366
  { "name": "id", "values": [] },
1367
1367
  { "name": "name", "values": [] },
@@ -1783,10 +1783,9 @@
1783
1783
  "name": "size",
1784
1784
  "description": "Largest size for the video player.\nIf not set, size is determined automatically by viewport width.",
1785
1785
  "values": [
1786
- { "name": "" },
1787
1786
  { "name": "full" },
1788
- { "name": "contained" },
1789
- { "name": "compacted" },
1787
+ { "name": "md" },
1788
+ { "name": "sm" },
1790
1789
  { "name": "\"\"" }
1791
1790
  ]
1792
1791
  },