@nysds/components 1.16.0 → 1.16.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.
@@ -87,6 +87,10 @@ export declare class NysDatepicker extends LitElement {
87
87
  description: string;
88
88
  /** Initial date when calendar opens (YYYY-MM-DD). */
89
89
  startDate: string;
90
+ /** The earliest selectable date (YYYY-MM-DD). */
91
+ minDate: string;
92
+ /** The latest selectable date (YYYY-MM-DD). */
93
+ maxDate: string;
90
94
  /** Dark background mode. */
91
95
  inverted: boolean;
92
96
  /** Selected date. Accepts Date object or ISO string (YYYY-MM-DD). */
@@ -148,6 +152,7 @@ export declare class NysDatepicker extends LitElement {
148
152
  private _parseLocalDate;
149
153
  private _setTodayDate;
150
154
  private _setFocusOnTodayDate;
155
+ private _isOutOfRange;
151
156
  private _dispatchInputEvent;
152
157
  /**
153
158
  * Event Handlers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nysds/components",
3
- "version": "1.16.0",
3
+ "version": "1.16.1",
4
4
  "description": "New York State's design system and code component library.",
5
5
  "type": "module",
6
6
  "workspaces": [
@@ -69,15 +69,15 @@
69
69
  "homepage": "https://designsystem.ny.gov/",
70
70
  "packageManager": "npm@11.6.2",
71
71
  "devDependencies": {
72
- "@chromatic-com/storybook": "^5.0.1",
72
+ "@chromatic-com/storybook": "^5.1.2",
73
73
  "@custom-elements-manifest/analyzer": "^0.11.0",
74
74
  "@figma/code-connect": "^1.4.0",
75
75
  "@floating-ui/dom": "^1.7.4",
76
76
  "@open-wc/testing": "^4.0.0",
77
- "@storybook/addon-a11y": "10.2.10",
78
- "@storybook/addon-docs": "10.2.10",
79
- "@storybook/addon-links": "10.2.10",
80
- "@storybook/web-components-vite": "10.2.10",
77
+ "@storybook/addon-a11y": "10.3.5",
78
+ "@storybook/addon-docs": "10.3.5",
79
+ "@storybook/addon-links": "10.3.5",
80
+ "@storybook/web-components-vite": "10.3.5",
81
81
  "@types/mocha": "^10.0.10",
82
82
  "@typescript-eslint/eslint-plugin": "^8.46.2",
83
83
  "@typescript-eslint/parser": "^8.46.2",
@@ -95,7 +95,7 @@
95
95
  "eslint": "^10.0.0",
96
96
  "eslint-plugin-lit": "^2.2.1",
97
97
  "eslint-plugin-prettier": "^5.5.5",
98
- "eslint-plugin-storybook": "10.2.10",
98
+ "eslint-plugin-storybook": "10.3.5",
99
99
  "i": "^0.3.7",
100
100
  "lit": "^3.3.1",
101
101
  "lit-analyzer": "^2.0.3",
@@ -106,7 +106,7 @@
106
106
  "rollup-plugin-visualizer": "^6.0.5",
107
107
  "sass": "^1.94.0",
108
108
  "sinon": "^21.0.0",
109
- "storybook": "10.2.10",
109
+ "storybook": "10.3.5",
110
110
  "stylelint": "^17.1.1",
111
111
  "stylelint-config-standard": "^40.0.0",
112
112
  "stylelint-config-standard-scss": "^17.0.0",
@@ -124,6 +124,6 @@
124
124
  "storybook": "$storybook"
125
125
  },
126
126
  "dependencies": {
127
- "wc-datepicker": "^0.9.2"
127
+ "wc-datepicker": "^0.10.0"
128
128
  }
129
129
  }
@@ -73,6 +73,12 @@ export interface NysDatepickerProps extends Pick<
73
73
  /** Initial date when calendar opens (YYYY-MM-DD). */
74
74
  startDate?: NysDatepickerElement["startDate"];
75
75
 
76
+ /** The earliest selectable date (YYYY-MM-DD). */
77
+ minDate?: NysDatepickerElement["minDate"];
78
+
79
+ /** The latest selectable date (YYYY-MM-DD). */
80
+ maxDate?: NysDatepickerElement["maxDate"];
81
+
76
82
  /** Selected date. Accepts Date object or ISO string (YYYY-MM-DD). */
77
83
  value?: NysDatepickerElement["value"];
78
84
 
@@ -22,6 +22,8 @@ export const NysDatepicker = forwardRef((props, forwardedRef) => {
22
22
  label,
23
23
  description,
24
24
  startDate,
25
+ minDate,
26
+ maxDate,
25
27
  value,
26
28
  ...filteredProps
27
29
  } = props;
@@ -52,6 +54,8 @@ export const NysDatepicker = forwardRef((props, forwardedRef) => {
52
54
  label: props.label,
53
55
  description: props.description,
54
56
  startDate: props.startDate,
57
+ minDate: props.minDate,
58
+ maxDate: props.maxDate,
55
59
  value: props.value,
56
60
  class: props.className,
57
61
  exportparts: props.exportparts,
@@ -377,6 +377,10 @@ export type NysDatepickerProps = {
377
377
  description?: string;
378
378
  /** Initial date when calendar opens (YYYY-MM-DD). */
379
379
  startDate?: string;
380
+ /** The earliest selectable date (YYYY-MM-DD). */
381
+ minDate?: string;
382
+ /** The latest selectable date (YYYY-MM-DD). */
383
+ maxDate?: string;
380
384
  /** Dark background mode. */
381
385
  inverted?: boolean;
382
386
  /** Selected date. Accepts Date object or ISO string (YYYY-MM-DD). */