@ncino/web-components 5.0.0-preview.1 → 5.0.0-preview.3

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 (168) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +1 -1
  2. package/dist/_virtual/index_html.js +1 -1
  3. package/dist/_virtual/index_react.js +1 -1
  4. package/dist/_virtual/preload-helper.js +1 -1
  5. package/dist/assets/node_modules/.pnpm/ckeditor5@45.2.1/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
  6. package/dist/components/accordion/gator/base/accordion.gator.js +6 -6
  7. package/dist/components/avatar/gator/avatar.gator.js +2 -2
  8. package/dist/components/badge/gator/badge.gator.js +2 -2
  9. package/dist/components/boolean/boolean.gator.js +6 -6
  10. package/dist/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.js +2 -2
  11. package/dist/components/button/gator/button.gator.js +4 -4
  12. package/dist/components/button-group/gator/button-group.gator.js +2 -2
  13. package/dist/components/checkbox/checkbox.gator.js +5 -5
  14. package/dist/components/checkbox-group/checkbox-group.gator.js +8 -8
  15. package/dist/components/combobox/base/combobox.js +1 -1
  16. package/dist/components/combobox/base/combobox.slds.js +13 -13
  17. package/dist/components/date-picker/base/gator/datepicker.gator.js +18 -18
  18. package/dist/components/date-picker/year-month-selector/year-month-selector.gator.js +2 -2
  19. package/dist/components/headline-card/gator/headline-card.gator.js +2 -2
  20. package/dist/components/icon/gator/icon.gator.js +2 -2
  21. package/dist/components/illustration/gator/illustration.gator.js +2 -2
  22. package/dist/components/input/base/input-base.gator.js +1 -1
  23. package/dist/components/input/gator/dropdown/input-dropdown.gator.js +11 -11
  24. package/dist/components/input/gator/input-currency/input-currency.gator.js +2 -2
  25. package/dist/components/input/gator/input-date/input-date.gator.js +15 -15
  26. package/dist/components/input/gator/input-file/input-file.gator.js +3 -3
  27. package/dist/components/input/gator/input-masked/input-masked.gator.js +1 -1
  28. package/dist/components/input/gator/input-phone/input-phone.gator.js +2 -2
  29. package/dist/components/input/gator/input-search/input-search.gator.js +2 -2
  30. package/dist/components/input/gator/input-text/input-text.gator.js +1 -1
  31. package/dist/components/input/gator/input-time/input-time.gator.js +2 -2
  32. package/dist/components/list/gator/list/list.gator.js +2 -2
  33. package/dist/components/list/gator/list-item/list-item.gator.js +6 -6
  34. package/dist/components/menu/base/gator/menu.gator.js +3 -3
  35. package/dist/components/menu/base/slds/menu.slds.js +2 -2
  36. package/dist/components/menu/menu-item/gator/menu-item.gator.js +2 -2
  37. package/dist/components/menu/menu-submenu/menu-submenu.js +1 -1
  38. package/dist/components/modal/gator/modal.gator.js +38 -39
  39. package/dist/components/page-header/gator/page-header.gator.js +2 -2
  40. package/dist/components/panel/gator/panel.gator.js +13 -13
  41. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  42. package/dist/components/pill/pill.slds.js +3 -3
  43. package/dist/components/popover/gator/popover.gator.js +10 -10
  44. package/dist/components/popover/popover.js +1 -1
  45. package/dist/components/radio/radio.gator.js +2 -2
  46. package/dist/components/radio-group/radio-group.gator.js +2 -2
  47. package/dist/components/selection-box-group/selection-box-group.gator.js +5 -5
  48. package/dist/components/selector/gator/selector.gator.js +2 -2
  49. package/dist/components/switch/gator/switch.gator.js +2 -2
  50. package/dist/components/tabs/gator/tabset/tabset.gator.js +3 -3
  51. package/dist/components/text-detail/gator/text-detail.gator.js +17 -18
  52. package/dist/components/time-picker/gator/time-picker.gator.js +19 -19
  53. package/dist/components/tooltip/tooltip.js +1 -1
  54. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-autosave@45.2.1/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +2 -2
  55. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@45.2.1/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +2 -2
  56. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@45.2.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +10 -10
  57. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-cloud-services@45.2.1/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +2 -2
  58. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-code-block@45.2.1/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +5 -5
  59. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2 -2
  60. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.2.1/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +2 -2
  61. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-engine@45.2.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +12 -12
  62. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-find-and-replace@45.2.1/node_modules/@ckeditor/ckeditor5-find-and-replace/dist/index.js +3 -3
  63. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@45.2.1/node_modules/@ckeditor/ckeditor5-font/dist/index.js +3 -3
  64. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-heading@45.2.1/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +3 -3
  65. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@45.2.1/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +2 -2
  66. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@45.2.1/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +6 -6
  67. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.2.1/node_modules/@ckeditor/ckeditor5-image/dist/index.js +4 -4
  68. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@45.2.1/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +4 -4
  69. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@45.2.1/node_modules/@ckeditor/ckeditor5-link/dist/index.js +2 -2
  70. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@45.2.1/node_modules/@ckeditor/ckeditor5-list/dist/index.js +5 -5
  71. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-markdown-gfm@45.2.1/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +4 -4
  72. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@45.2.1/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +2 -2
  73. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paragraph@45.2.1/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +2 -2
  74. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paste-from-office@45.2.1/node_modules/@ckeditor/ckeditor5-paste-from-office/dist/index.js +9 -9
  75. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.2.1/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +2 -2
  76. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@45.2.1/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +2 -2
  77. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-style@45.2.1/node_modules/@ckeditor/ckeditor5-style/dist/index.js +2 -2
  78. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.2.1/node_modules/@ckeditor/ckeditor5-table/dist/index.js +6 -6
  79. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.2.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +4 -4
  80. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.2.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +10 -10
  81. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-undo@45.2.1/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +2 -2
  82. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-upload@45.2.1/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +2 -2
  83. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +38 -38
  84. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-watchdog@45.2.1/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +3 -3
  85. package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.2.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +2 -2
  86. package/dist/node_modules/.pnpm/@deltablot_dropzone@7.3.1/node_modules/@deltablot/dropzone/dist/dropzone.js +1 -1
  87. package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js +1 -1
  88. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/dist/common/fetch.js +1 -0
  89. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +1 -0
  90. package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/connect/helpers.js +1 -1
  91. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/package.json.js +1 -0
  92. package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
  93. package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js +2 -2
  94. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/channels/index.js +9 -9
  95. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/csf/index.js +1 -1
  96. package/dist/node_modules/.pnpm/@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/preview-api/index.js +22 -22
  97. package/dist/node_modules/.pnpm/@storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/instrumenter/dist/index.js +36 -36
  98. package/dist/node_modules/.pnpm/@storybook_test@8.6.14_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/test/dist/index.js +111 -111
  99. package/dist/node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.53.2_77c47ac19cbe97978028e1e5ac862536/node_modules/@vitest/browser/context.js +1 -0
  100. package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js +8 -8
  101. package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +2 -2
  102. package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +5 -5
  103. package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +11 -11
  104. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js +21 -21
  105. package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +2 -2
  106. package/dist/node_modules/.pnpm/axe-core@4.10.3/node_modules/axe-core/axe.js +4 -4
  107. package/dist/node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js +3 -3
  108. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +1 -1
  109. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +1 -1
  110. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js +1 -1
  111. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/unset.js +1 -1
  112. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +1 -1
  113. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/debounce.js +1 -1
  114. package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/cloneDeepWith.js +1 -1
  115. package/dist/node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js +2 -2
  116. package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/async-directive.js +1 -1
  117. package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js +2 -2
  118. package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js +2 -2
  119. package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js +3 -3
  120. package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +1 -1
  121. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js +1 -1
  122. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js +1 -1
  123. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js +1 -1
  124. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js +1 -1
  125. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js +1 -1
  126. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js +1 -1
  127. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js +1 -1
  128. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js +1 -1
  129. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js +2 -2
  130. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js +1 -1
  131. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js +1 -1
  132. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js +1 -1
  133. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js +1 -1
  134. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js +1 -1
  135. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js +1 -1
  136. package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js +1 -1
  137. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.10_@vitest_browser@3.2.4_@vitest_ui@3_8c34ee540b1f52c214debce201d1e515/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +1 -1
  138. package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.10_@vitest_browser@3.2.4_@vitest_ui@3_8c34ee540b1f52c214debce201d1e515/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +8 -8
  139. package/dist/packages/web-components/src/components/button/gator/button.gator.scss.js +1 -1
  140. package/dist/packages/web-components/src/components/chip/gator/chip.gator.scss.js +1 -1
  141. package/dist/packages/web-components/src/components/modal/gator/modal.gator.scss.js +1 -1
  142. package/dist/packages/web-components/src/components/switch/gator/switch.gator.scss.js +1 -1
  143. package/dist/packages/web-components/src/components/text-detail/gator/text-detail.gator.scss.js +1 -1
  144. package/dist/packages/web-components/src/index.slds.scss.js +1 -1
  145. package/dist/types/components/modal/gator/modal.gator.d.ts +1 -1
  146. package/dist/types/components/text-detail/gator/text-detail.gator.d.ts +4 -2
  147. package/dist/utils/accessibility-utils.js +1 -1
  148. package/dist/utils/datatestid-utils.js +1 -1
  149. package/dist/utils/lightdom-utils.js +1 -1
  150. package/dist/utils/vitest-a11y-utils.js +1 -1
  151. package/dist/utils/vitest-utils.js +1 -1
  152. package/package.json +10 -10
  153. package/web-types.json +2 -3
  154. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/common/fetch.js +0 -1
  155. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +0 -1
  156. package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/package.json.js +0 -1
  157. package/dist/node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.10_typescript@5.8.3__playwright@1.53.1_5fd2997ee9a97429a51e07bc2023c338/node_modules/@vitest/browser/context.js +0 -1
  158. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/client/external.js +0 -0
  159. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/client/figma_client.js +0 -0
  160. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/common/logging.js +0 -0
  161. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/common/updates.js +0 -0
  162. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/connect/external_types.js +0 -0
  163. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/connect/index_common.js +0 -0
  164. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/html/external.js +0 -0
  165. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/html/index_html.js +0 -0
  166. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/html/template_literal.js +0 -0
  167. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/react/external.js +0 -0
  168. /package/dist/node_modules/.pnpm/{@figma_code-connect@1.3.3 → @figma_code-connect@1.3.4}/node_modules/@figma/code-connect/dist/react/index_react.js +0 -0
@@ -1,19 +1,19 @@
1
- import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as h}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as m}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as n}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as g,getElementId as u}from"../../utils/string-utils.js";import b from"../../packages/web-components/src/components/checkbox-group/checkbox-group.gator.scss.js";import x from"../../packages/web-components/src/tokens/primitive.tokens.scss.js";import f from"../../packages/web-components/src/tokens/semantic.tokens.scss.js";import"../checkbox/checkbox.gator.js";import"../input/gator/input-label/input-label.gator.js";import"../input/gator/help-text/help-text.gator.js";import{handleDataTestid as y}from"../../utils/datatestid-utils.js";import{TestableLitElement as v}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{ifDefined as c}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/if-defined.js";import{unsafeCSS as d}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var $=Object.defineProperty,E=Object.getOwnPropertyDescriptor,a=(e,t,s,r)=>{for(var i=r>1?void 0:r?E(t,s):t,l=e.length-1,p;l>=0;l--)(p=e[l])&&(i=(r?p(t,s,i):p(i))||i);return r&&i&&$(t,s,i),i};let o=class extends v{constructor(){super(...arguments),this.id="",this.label="",this.helpText="",this.value=void 0,this.disabled=!1,this.hasError=!1,this.errorMessage="",this.options=[],this._randomId=g()}render(){const e=this.elementId;return h`
1
+ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as m}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as l}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{generateRandomId as g,getElementId as u}from"../../utils/string-utils.js";import b from"../../packages/web-components/src/components/checkbox-group/checkbox-group.gator.scss.js";import x from"../../packages/web-components/src/tokens/primitive.tokens.scss.js";import f from"../../packages/web-components/src/tokens/semantic.tokens.scss.js";import"../checkbox/checkbox.gator.js";import"../input/gator/input-label/input-label.gator.js";import"../input/gator/help-text/help-text.gator.js";import{handleDataTestid as y}from"../../utils/datatestid-utils.js";import{TestableLitElement as v}from"../../utils/components/testable-lit-element/testable-lit-element.js";import{ifDefined as c}from"../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/if-defined.js";import{unsafeCSS as d}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var $=Object.defineProperty,E=Object.getOwnPropertyDescriptor,i=(e,s,o,n)=>{for(var t=n>1?void 0:n?E(s,o):s,h=e.length-1,p;h>=0;h--)(p=e[h])&&(t=(n?p(s,o,t):p(t))||t);return n&&t&&$(s,o,t),t};let r=class extends v{constructor(){super(...arguments),this.id="",this.label="",this.helpText="",this.value=void 0,this.disabled=!1,this.hasError=!1,this.errorMessage="",this.options=[],this._randomId=g()}render(){const e=this.elementId;return a`
2
2
  <div class="gator-checkbox-group-container">
3
- ${this.label?h`<ngc-input-label id="${e}-label" data-testid=${c(this.labelDataTestid)}>${this.label}</ngc-input-label>`:null}
3
+ ${this.label?a`<ngc-input-label id="${e}-label" data-testid=${c(this.labelDataTestid)}>${this.label}</ngc-input-label>`:null}
4
4
  <div id="${e}-group"
5
5
  role="group"
6
6
  class="gator-checkbox-group"
7
7
  aria-labelledby="${e}-label"
8
8
  aria-describedby=${this.describedBy}
9
9
  >
10
- ${this.options.length>0?this.checkboxesFromOptions:h`<slot @change=${this.handleCheckboxSelectionChange}></slot>`}
10
+ ${this.options.length>0?this.checkboxesFromOptions:a`<slot @change=${this.handleCheckboxSelectionChange}></slot>`}
11
11
  </div>
12
- ${this.hasError&&this.errorMessage!==""?h`<ngc-help-text id="${e}-error" data-testid=${c(this.errorMessageDataTestid)} icon error>${this.errorMessage}</ngc-help-text>`:null}
13
- ${this.helpText?h`<ngc-help-text id="${e}-help" data-testid=${c(this.helpTextDataTestid)}>${this.helpText}</ngc-help-text>`:null}
12
+ ${this.hasError&&this.errorMessage!==""?a`<ngc-help-text id="${e}-error" data-testid=${c(this.errorMessageDataTestid)} icon error>${this.errorMessage}</ngc-help-text>`:null}
13
+ ${this.helpText?a`<ngc-help-text id="${e}-help" data-testid=${c(this.helpTextDataTestid)}>${this.helpText}</ngc-help-text>`:null}
14
14
  </div>
15
- `}get elementId(){return u(this.id,this._randomId)}get describedBy(){const e=[];return this.errorMessage&&e.push(`${this.elementId}-error`),this.helpText&&e.push(`${this.elementId}-help`),e.join(" ")}get checkboxesFromOptions(){return h`
16
- ${this.options.map(e=>h`
15
+ `}get elementId(){return u(this.id,this._randomId)}get describedBy(){const e=[];return this.errorMessage&&e.push(`${this.elementId}-error`),this.helpText&&e.push(`${this.elementId}-help`),e.join(" ")}get checkboxesFromOptions(){return a`
16
+ ${this.options.map(e=>a`
17
17
  <ngc-checkbox
18
18
  value="${e.value}"
19
19
  @change=${this.handleCheckboxSelectionChange}
@@ -21,4 +21,4 @@ import"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/re
21
21
  >
22
22
  </ngc-checkbox>
23
23
  `)}
24
- `}handleCheckboxSelectionChange(e){var r;const t=e;e.stopImmediatePropagation();const s=new Set((r=this.value)==null?void 0:r.split(";"));t.detail.selected?s.add(t.detail.value):s.delete(t.detail.value),this.value=Array.from(s).join(";"),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.value}))}get checkboxElements(){var t,s,r;if(this.options.length>0)return(t=this.shadowRoot)==null?void 0:t.querySelectorAll("ngc-checkbox");const e=(r=(s=this.shadowRoot)==null?void 0:s.querySelector("slot"))==null?void 0:r.assignedElements();return e&&e.length===1&&e[0]instanceof HTMLSlotElement?e[0].assignedElements():e}updated(){var s;const e=new Set((s=this.value)==null?void 0:s.split(";")),t=this.checkboxElements;t&&t.length>0&&t.forEach((r,i)=>{const l=r;l.selected=e.has(l.value),l.disabled=this.disabled,l.hasError=this.hasError,y(l,this.dataTestid,`checkbox-${i}`)})}};o.styles=[d(x),d(f),d(b)];a([n({type:String})],o.prototype,"id",2);a([n({type:String})],o.prototype,"label",2);a([n({type:String,attribute:"help-text"})],o.prototype,"helpText",2);a([n({type:String})],o.prototype,"value",2);a([n({type:Boolean})],o.prototype,"disabled",2);a([n({type:Boolean,attribute:"has-error"})],o.prototype,"hasError",2);a([n({type:String,attribute:"error-message"})],o.prototype,"errorMessage",2);a([n({type:Array})],o.prototype,"options",2);o=a([m("ngc-checkbox-group")],o);export{o as NgcCheckboxGroup};
24
+ `}handleCheckboxSelectionChange(e){const s=e;e.stopImmediatePropagation();const o=new Set(this.value?.split(";"));s.detail.selected?o.add(s.detail.value):o.delete(s.detail.value),this.value=Array.from(o).join(";"),this.dispatchEvent(new CustomEvent("change",{bubbles:!0,composed:!0,detail:this.value}))}get checkboxElements(){if(this.options.length>0)return this.shadowRoot?.querySelectorAll("ngc-checkbox");const e=this.shadowRoot?.querySelector("slot")?.assignedElements();return e&&e.length===1&&e[0]instanceof HTMLSlotElement?e[0].assignedElements():e}updated(){const e=new Set(this.value?.split(";")),s=this.checkboxElements;s&&s.length>0&&s.forEach((o,n)=>{const t=o;t.selected=e.has(t.value),t.disabled=this.disabled,t.hasError=this.hasError,y(t,this.dataTestid,`checkbox-${n}`)})}};r.styles=[d(x),d(f),d(b)];i([l({type:String})],r.prototype,"id",2);i([l({type:String})],r.prototype,"label",2);i([l({type:String,attribute:"help-text"})],r.prototype,"helpText",2);i([l({type:String})],r.prototype,"value",2);i([l({type:Boolean})],r.prototype,"disabled",2);i([l({type:Boolean,attribute:"has-error"})],r.prototype,"hasError",2);i([l({type:String,attribute:"error-message"})],r.prototype,"errorMessage",2);i([l({type:Array})],r.prototype,"options",2);r=i([m("ngc-checkbox-group")],r);export{r as NgcCheckboxGroup};
@@ -1 +1 @@
1
- import{property as l}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as h}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import{createRef as c}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{TestableLitElement as p}from"../../../utils/components/testable-lit-element/testable-lit-element.js";var u=Object.defineProperty,r=(d,e,t,s)=>{for(var o=void 0,a=d.length-1,n;a>=0;a--)(n=d[a])&&(o=n(e,t,o)||o);return o&&u(e,t,o),o};class i extends p{constructor(){super(...arguments),this.options=[],this.value="",this.label="",this.placeholder="Search...",this.open=!1,this.required=!1,this.valid=!0,this.requiredErrorText="Select an option from the picklist or remove the search term.",this.displayedErrorText="",this._comboboxRef=c()}selectOption(e){this.open=!1,this.value=e.value,this.valid=!0,this.displayedErrorText="",this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0})),setTimeout(()=>{var s;let t=(s=this.shadowRoot)==null?void 0:s.querySelector('div[role="combobox"]');t==null||t.focus()})}setFocusClassForListItemAtIndex(e){var s,o,a,n;const t=(s=this.shadowRoot)==null?void 0:s.querySelectorAll('[role="option"]');(o=t[e])==null||o.classList.add("slds-has-focus"),(n=this._comboboxRef.value)==null||n.setAttribute("aria-activedescendant",(a=t[e])==null?void 0:a.id)}removeFocusClassForListItemAtIndex(e){var s,o;(o=((s=this.shadowRoot)==null?void 0:s.querySelectorAll('[role="option"]'))[e])==null||o.classList.remove("slds-has-focus")}getActiveIndexOfListItems(){var s,o;const e=(s=this.shadowRoot)==null?void 0:s.querySelectorAll('[role="option"]'),t=(o=this.shadowRoot)==null?void 0:o.querySelector(".slds-has-focus");return Array.from(e).indexOf(t)}getListItemNodes(){var e;return(e=this.shadowRoot)==null?void 0:e.querySelectorAll('[role="option"]')}scrollIntoView(){var t;const e=(t=this.shadowRoot)==null?void 0:t.querySelector(".slds-has-focus");e==null||e.scrollIntoView({block:"nearest"})}handleArrowDown(){this.open||(this.open=!0);let e=this.getActiveIndexOfListItems();e===-1&&this.setFocusClassForListItemAtIndex(0);let t=e+1;t>this.getListItemNodes().length-1&&(t=0),this.setFocusClassForListItemAtIndex(t),this.removeFocusClassForListItemAtIndex(e),this.scrollIntoView()}handleArrowUp(){this.open||(this.open=!0);let e=this.getActiveIndexOfListItems(),t=e-1;t<0&&(t=this.getListItemNodes().length-1),this.setFocusClassForListItemAtIndex(t),this.removeFocusClassForListItemAtIndex(e),this.scrollIntoView()}}r([l()],i.prototype,"options");r([l()],i.prototype,"value");r([l()],i.prototype,"label");r([l()],i.prototype,"placeholder");r([l({type:Boolean})],i.prototype,"open");r([l({type:Boolean})],i.prototype,"required");r([l({type:Boolean})],i.prototype,"valid");r([l({attribute:"required-error-text"})],i.prototype,"requiredErrorText");r([h()],i.prototype,"displayedErrorText");export{i as NjcCombobox};
1
+ import{property as r}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as d}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import{createRef as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{TestableLitElement as c}from"../../../utils/components/testable-lit-element/testable-lit-element.js";var p=Object.defineProperty,o=(l,e,t,u)=>{for(var i=void 0,n=l.length-1,a;n>=0;n--)(a=l[n])&&(i=a(e,t,i)||i);return i&&p(e,t,i),i};class s extends c{constructor(){super(...arguments),this.options=[],this.value="",this.label="",this.placeholder="Search...",this.open=!1,this.required=!1,this.valid=!0,this.requiredErrorText="Select an option from the picklist or remove the search term.",this.displayedErrorText="",this._comboboxRef=h()}selectOption(e){this.open=!1,this.value=e.value,this.valid=!0,this.displayedErrorText="",this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0})),setTimeout(()=>{this.shadowRoot?.querySelector('div[role="combobox"]')?.focus()})}setFocusClassForListItemAtIndex(e){const t=this.shadowRoot?.querySelectorAll('[role="option"]');t[e]?.classList.add("slds-has-focus"),this._comboboxRef.value?.setAttribute("aria-activedescendant",t[e]?.id)}removeFocusClassForListItemAtIndex(e){(this.shadowRoot?.querySelectorAll('[role="option"]'))[e]?.classList.remove("slds-has-focus")}getActiveIndexOfListItems(){const e=this.shadowRoot?.querySelectorAll('[role="option"]'),t=this.shadowRoot?.querySelector(".slds-has-focus");return Array.from(e).indexOf(t)}getListItemNodes(){return this.shadowRoot?.querySelectorAll('[role="option"]')}scrollIntoView(){this.shadowRoot?.querySelector(".slds-has-focus")?.scrollIntoView({block:"nearest"})}handleArrowDown(){this.open||(this.open=!0);let e=this.getActiveIndexOfListItems();e===-1&&this.setFocusClassForListItemAtIndex(0);let t=e+1;t>this.getListItemNodes().length-1&&(t=0),this.setFocusClassForListItemAtIndex(t),this.removeFocusClassForListItemAtIndex(e),this.scrollIntoView()}handleArrowUp(){this.open||(this.open=!0);let e=this.getActiveIndexOfListItems(),t=e-1;t<0&&(t=this.getListItemNodes().length-1),this.setFocusClassForListItemAtIndex(t),this.removeFocusClassForListItemAtIndex(e),this.scrollIntoView()}}o([r()],s.prototype,"options");o([r()],s.prototype,"value");o([r()],s.prototype,"label");o([r()],s.prototype,"placeholder");o([r({type:Boolean})],s.prototype,"open");o([r({type:Boolean})],s.prototype,"required");o([r({type:Boolean})],s.prototype,"valid");o([r({attribute:"required-error-text"})],s.prototype,"requiredErrorText");o([d()],s.prototype,"displayedErrorText");export{s as NjcCombobox};
@@ -1,4 +1,4 @@
1
- import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as r}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import y from"../../../packages/web-components/src/index.slds.scss.js";import{customElement as T}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as h}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as I}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import{NjcCombobox as g}from"./combobox.js";import{generateRandomId as C}from"../../../utils/string-utils.js";import"../../input/slds/input-label/input-label.slds.js";import"../../input/slds/input-error/input-error.slds.js";import{KEY_CONSTANTS as p}from"../../../consts/key-constants.js";import{ref as f}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{handleDataTestid as n}from"../../../utils/datatestid-utils.js";import"../combobox-item/combobox-item.slds.js";import"../../icon/slds/icon.slds.js";import{unsafeCSS as S,css as E}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var L=Object.defineProperty,A=Object.getOwnPropertyDescriptor,d=(s,e,t,a)=>{for(var o=a>1?void 0:a?A(e,t):e,c=s.length-1,l;c>=0;c--)(l=s[c])&&(o=(a?l(e,t,o):l(o))||o);return a&&o&&L(e,t,o),o},v=(s=>(s.FIVE="5",s.SEVEN="7",s.TEN="10",s.NOSCROLL="",s))(v||{});let i=class extends g{constructor(){super(...arguments),this.autocomplete=!1,this.clearAssistiveText="Clear",this.comboboxAriaLabel="Dropdown Items",this.dropdownLength="10",this._searchValue="",this._generatedId=C()}updated(){this.updateDataTestids()}render(){return r`
1
+ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import _ from"../../../packages/web-components/src/index.slds.scss.js";import{customElement as f}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as h}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as v}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import{NjcCombobox as b}from"./combobox.js";import{generateRandomId as g}from"../../../utils/string-utils.js";import"../../input/slds/input-label/input-label.slds.js";import"../../input/slds/input-error/input-error.slds.js";import{KEY_CONSTANTS as p}from"../../../consts/key-constants.js";import{ref as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{handleDataTestid as l}from"../../../utils/datatestid-utils.js";import"../combobox-item/combobox-item.slds.js";import"../../icon/slds/icon.slds.js";import{unsafeCSS as $,css as w}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var y=Object.defineProperty,T=Object.getOwnPropertyDescriptor,r=(e,t,n,i)=>{for(var s=i>1?void 0:i?T(t,n):t,d=e.length-1,c;d>=0;d--)(c=e[d])&&(s=(i?c(t,n,s):c(s))||s);return i&&s&&y(t,n,s),s},m=(e=>(e.FIVE="5",e.SEVEN="7",e.TEN="10",e.NOSCROLL="",e))(m||{});let o=class extends b{constructor(){super(...arguments),this.autocomplete=!1,this.clearAssistiveText="Clear",this.comboboxAriaLabel="Dropdown Items",this.dropdownLength="10",this._searchValue="",this._generatedId=g()}updated(){this.updateDataTestids()}render(){return a`
2
2
  <div class="slds-form-element${this.valid?"":" slds-has-error"}" @focusout=${this._topLevelFocusOut}>
3
3
  <nsc-input-label
4
4
  .required="${this.required}"
@@ -21,12 +21,12 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
21
21
  role="listbox"
22
22
  >
23
23
  <ul class="slds-listbox slds-listbox_vertical" role="presentation">
24
- ${this._filteredOptions.map(s=>r`
24
+ ${this._filteredOptions.map(e=>a`
25
25
  <nsc-combobox-item
26
26
  .searchValue="${this._searchValue}"
27
- label="${s.label}"
28
- value="${s.value}"
29
- @change=${()=>this.selectOption(s)}
27
+ label="${e.label}"
28
+ value="${e.value}"
29
+ @change=${()=>this.selectOption(e)}
30
30
  .selectedValue="${this.value}"
31
31
  ></nsc-combobox-item>
32
32
  `)}
@@ -36,13 +36,13 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
36
36
  </div>
37
37
  </div>
38
38
  </div>
39
- ${this.displayedErrorText?r`<nsc-input-error>${this.displayedErrorText}</nsc-input-error>`:null}
39
+ ${this.displayedErrorText?a`<nsc-input-error>${this.displayedErrorText}</nsc-input-error>`:null}
40
40
  </div>
41
- `}get dropdownLengthClass(){return this.dropdownLength!=""?`slds-dropdown_length-${this.dropdownLength}`:""}get optionLabel(){var s;return((s=this.options.find(e=>e.value===this.value))==null?void 0:s.label)??""}get dropdownTriggerMarkup(){return r`
41
+ `}get dropdownLengthClass(){return this.dropdownLength!=""?`slds-dropdown_length-${this.dropdownLength}`:""}get optionLabel(){return this.options.find(e=>e.value===this.value)?.label??""}get dropdownTriggerMarkup(){return a`
42
42
  <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none">
43
43
  <div
44
44
  role="combobox"
45
- ${f(this._comboboxRef)}
45
+ ${u(this._comboboxRef)}
46
46
  @keydown=${this.handleKeyDown}
47
47
  tabindex="0"
48
48
  class="${this._fauxInputClasses}"
@@ -59,7 +59,7 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
59
59
  <nsc-icon name="down" size="x-small" svg-classes="slds-icon-text-default"></nsc-icon>
60
60
  </span>
61
61
  </div>
62
- `}get _fauxInputClasses(){return`slds-input_faux slds-combobox__input ${this.value?"slds-combobox__input-value":""}`}handleDropdownClick(){this.open=!this.open}get autocompleteMarkup(){return this.value?r`
62
+ `}get _fauxInputClasses(){return`slds-input_faux slds-combobox__input ${this.value?"slds-combobox__input-value":""}`}handleDropdownClick(){this.open=!this.open}get autocompleteMarkup(){return this.value?a`
63
63
  <div role="combobox"
64
64
  tabindex="0"
65
65
  class="slds-input_faux slds-combobox__input slds-combobox__input-value"
@@ -74,10 +74,10 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
74
74
  <nsc-icon name="close" size="x-small" svg-classes="slds-icon-text-default"></nsc-icon>
75
75
  <span class="slds-assistive-text">${this.clearAssistiveText}</span>
76
76
  </button>
77
- `:r`
77
+ `:a`
78
78
  <div class="slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right" role="none">
79
79
  <input
80
- ${f(this._comboboxRef)}
80
+ ${u(this._comboboxRef)}
81
81
  type="text"
82
82
  class="slds-input slds-combobox__input"
83
83
  id="combobox-id-${this._generatedId}"
@@ -99,10 +99,10 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
99
99
  <nsc-icon name="search" size="x-small" svg-classes="slds-icon-text-default"></nsc-icon>
100
100
  </span>
101
101
  </div>
102
- `}handleKeyDown(s){var e;switch(s.key){case p.DOWN:this.handleArrowDown(),s.preventDefault();break;case p.UP:this.handleArrowUp(),s.preventDefault();break;case p.ENTER:let t=(e=this.shadowRoot)==null?void 0:e.querySelector(".slds-has-focus");t?t.click():this.open=!this.open,s.preventDefault();break;case p.ESCAPE:this.open&&s.stopPropagation(),this.open=!1,this.clearFocusClassFromOptions(),s.preventDefault();break}}_topLevelFocusOut(s){s.currentTarget&&s.relatedTarget&&s.currentTarget.contains(s.relatedTarget)||((this.required||this._searchValue)&&!this.value?(this.valid=!1,this.displayedErrorText=this.requiredErrorText):(this.valid=!0,this.displayedErrorText=""),this.open=!1,this.clearFocusClassFromOptions())}clearFocusClassFromOptions(){var e;((e=this.shadowRoot)==null?void 0:e.querySelectorAll('[role="option"]')).forEach(t=>t.classList.remove("slds-has-focus"))}clearValue(){this.value="",this._searchValue="",this.dispatchEvent(new CustomEvent("change",{detail:void 0,bubbles:!0})),setTimeout(()=>{var e;let s=(e=this.shadowRoot)==null?void 0:e.getElementById(`combobox-id-${this._generatedId}`);s==null||s.focus()})}_handleAutocompleteInput(s){var e;this.open||(this.open=!0),this._searchValue=((e=s==null?void 0:s.target)==null?void 0:e.value)??""}get _filteredOptions(){return this._searchValue?this.options.filter(s=>s.label.toLowerCase().includes(this._searchValue.toLowerCase())):this.options}updateDataTestids(){var l,u,b,m,x,_;const s=(l=this.shadowRoot)==null?void 0:l.querySelector('[role="combobox"]');n(s,this.dataTestid,"combobox");const e=(u=this.shadowRoot)==null?void 0:u.querySelector('[role="listbox"]');n(e,this.dataTestid,"listbox");const t=(b=this.shadowRoot)==null?void 0:b.querySelector('button[title="Clear"]');n(t,this.dataTestid,"clear-button");const a=(m=this.shadowRoot)==null?void 0:m.querySelector("nsc-input-label");n(a,this.dataTestid,"label");const o=(x=this.shadowRoot)==null?void 0:x.querySelector("nsc-input-error");n(o,this.dataTestid,"error");const c=(_=this.shadowRoot)==null?void 0:_.querySelectorAll("nsc-combobox-item");for(let[$,w]of c.entries())n(w,this.dataTestid,`option-${$}`)}};i.shadowRootOptions={...g.shadowRootOptions,delegatesFocus:!0};i.styles=[S(y),E`
102
+ `}handleKeyDown(e){switch(e.key){case p.DOWN:this.handleArrowDown(),e.preventDefault();break;case p.UP:this.handleArrowUp(),e.preventDefault();break;case p.ENTER:let t=this.shadowRoot?.querySelector(".slds-has-focus");t?t.click():this.open=!this.open,e.preventDefault();break;case p.ESCAPE:this.open&&e.stopPropagation(),this.open=!1,this.clearFocusClassFromOptions(),e.preventDefault();break}}_topLevelFocusOut(e){e.currentTarget&&e.relatedTarget&&e.currentTarget.contains(e.relatedTarget)||((this.required||this._searchValue)&&!this.value?(this.valid=!1,this.displayedErrorText=this.requiredErrorText):(this.valid=!0,this.displayedErrorText=""),this.open=!1,this.clearFocusClassFromOptions())}clearFocusClassFromOptions(){(this.shadowRoot?.querySelectorAll('[role="option"]')).forEach(t=>t.classList.remove("slds-has-focus"))}clearValue(){this.value="",this._searchValue="",this.dispatchEvent(new CustomEvent("change",{detail:void 0,bubbles:!0})),setTimeout(()=>{this.shadowRoot?.getElementById(`combobox-id-${this._generatedId}`)?.focus()})}_handleAutocompleteInput(e){this.open||(this.open=!0),this._searchValue=e?.target?.value??""}get _filteredOptions(){return this._searchValue?this.options.filter(e=>e.label.toLowerCase().includes(this._searchValue.toLowerCase())):this.options}updateDataTestids(){const e=this.shadowRoot?.querySelector('[role="combobox"]');l(e,this.dataTestid,"combobox");const t=this.shadowRoot?.querySelector('[role="listbox"]');l(t,this.dataTestid,"listbox");const n=this.shadowRoot?.querySelector('button[title="Clear"]');l(n,this.dataTestid,"clear-button");const i=this.shadowRoot?.querySelector("nsc-input-label");l(i,this.dataTestid,"label");const s=this.shadowRoot?.querySelector("nsc-input-error");l(s,this.dataTestid,"error");const d=this.shadowRoot?.querySelectorAll("nsc-combobox-item");for(let[c,x]of d.entries())l(x,this.dataTestid,`option-${c}`)}};o.shadowRootOptions={...b.shadowRootOptions,delegatesFocus:!0};o.styles=[$(_),w`
103
103
  .clear-icon {
104
104
  position: absolute;
105
105
  right: 0.5rem;
106
106
  top: 0.45rem;
107
107
  }
108
- `];d([h({type:Boolean})],i.prototype,"autocomplete",2);d([h({type:String,attribute:"clear-assistive-text"})],i.prototype,"clearAssistiveText",2);d([h({type:String,attribute:"combobox-aria-label"})],i.prototype,"comboboxAriaLabel",2);d([h({type:v,attribute:"dropdown-length"})],i.prototype,"dropdownLength",2);d([I()],i.prototype,"_searchValue",2);i=d([T("nsc-combobox")],i);export{v as COMBOBOX_DROPDOWN_LENGTH,i as NjcSldsCombobox};
108
+ `];r([h({type:Boolean})],o.prototype,"autocomplete",2);r([h({type:String,attribute:"clear-assistive-text"})],o.prototype,"clearAssistiveText",2);r([h({type:String,attribute:"combobox-aria-label"})],o.prototype,"comboboxAriaLabel",2);r([h({type:m,attribute:"dropdown-length"})],o.prototype,"dropdownLength",2);r([v()],o.prototype,"_searchValue",2);o=r([f("nsc-combobox")],o);export{m as COMBOBOX_DROPDOWN_LENGTH,o as NjcSldsCombobox};
@@ -1,4 +1,4 @@
1
- import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as i}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as b}from"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import y from"../../../../packages/web-components/src/components/date-picker/base/gator/datepicker.gator.scss.js";import f from"../../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import m from"../../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import D from"../../../../packages/web-components/src/components/button/gator/button.gator.scss.js";import{customElement as _}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{state as S}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import"../../../icon-button/gator/icon-button.gator.js";import"../../../button/gator/button.gator.js";import"../../../selector/gator/selector.gator.js";import{SELECTOR_TYPE as d}from"../../year-month-selector/year-month-selector.gator.js";import{NjcDatepicker as w}from"../datepicker.js";import{KEY_CONSTANTS as n}from"../../../../consts/key-constants.js";import{msg as c}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as k}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as u}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var M=Object.defineProperty,x=Object.getOwnPropertyDescriptor,p=(e,t,a,r)=>{for(var o=r>1?void 0:r?x(t,a):t,s=e.length-1,l;s>=0;s--)(l=e[s])&&(o=(r?l(t,a,o):l(o))||o);return r&&o&&M(t,a,o),o},Y=(e=>(e.CALENDAR="calendar",e.MONTHS="months",e.YEARS="years",e))(Y||{});let h=class extends w{constructor(){super(...arguments),this._currentView="calendar",this.previousScrollTop=0}render(){return i`
1
+ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as i}from"../../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as f}from"../../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import b from"../../../../packages/web-components/src/components/date-picker/base/gator/datepicker.gator.scss.js";import y from"../../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import m from"../../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import D from"../../../../packages/web-components/src/components/button/gator/button.gator.scss.js";import{customElement as _}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{state as S}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import"../../../icon-button/gator/icon-button.gator.js";import"../../../button/gator/button.gator.js";import"../../../selector/gator/selector.gator.js";import{SELECTOR_TYPE as d}from"../../year-month-selector/year-month-selector.gator.js";import{NjcDatepicker as w}from"../datepicker.js";import{KEY_CONSTANTS as n}from"../../../../consts/key-constants.js";import{msg as c}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import{localized as k}from"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/internal/localized-decorator.js";import"../../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as u}from"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var M=Object.defineProperty,x=Object.getOwnPropertyDescriptor,p=(e,t,r,a)=>{for(var o=a>1?void 0:a?x(t,r):t,s=e.length-1,l;s>=0;s--)(l=e[s])&&(o=(a?l(t,r,o):l(o))||o);return a&&o&&M(t,r,o),o},Y=(e=>(e.CALENDAR="calendar",e.MONTHS="months",e.YEARS="years",e))(Y||{});let h=class extends w{constructor(){super(...arguments),this._currentView="calendar",this.previousScrollTop=0}render(){return i`
2
2
  <div class="gator-datepicker"
3
3
  role="dialog"
4
4
  aria-modal="true"
@@ -8,7 +8,7 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
8
8
  ${this.headerMarkup}
9
9
  ${this.currentViewMarkup}
10
10
  </div>
11
- `}updated(e){super.updated(e),e.has("_contextMonth")&&this.shiftFocusToCalendarGrid()}shiftFocusToCalendarGrid(){setTimeout(()=>{var e;(e=this.renderRoot.querySelector('ngc-selector[tabindex="0"]'))==null||e.focus()},0)}handleDatepickerKeydown(e){this._currentView==="calendar"?this.handleCalendarViewKeydown(e):this.handleSelectionDialogKeydown(e)}get headerMarkup(){return i`
11
+ `}updated(e){super.updated(e),e.has("_contextMonth")&&this.shiftFocusToCalendarGrid()}shiftFocusToCalendarGrid(){setTimeout(()=>{this.renderRoot.querySelector('ngc-selector[tabindex="0"]')?.focus()},0)}handleDatepickerKeydown(e){this._currentView==="calendar"?this.handleCalendarViewKeydown(e):this.handleSelectionDialogKeydown(e)}get headerMarkup(){return i`
12
12
  <div class="gator-datepicker-header">
13
13
  <div class="gator-datepicker-header-title">
14
14
  <ngc-icon-button
@@ -55,7 +55,7 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
55
55
  </ngc-icon-button>
56
56
  </div>
57
57
  </div>
58
- `}handlePreviousMonthClicked(){this._contextDate=new Date(this._contextYear,this._contextMonth-1,1),this._currentView="calendar"}handleMonthClick(){this._currentView==="months"?this._currentView="calendar":this._currentView="months"}handleYearClick(){this._currentView==="years"?this._currentView="calendar":(this._currentView="years",this.scrollToSelectedYear())}handleNextMonthClicked(){this._contextDate=new Date(this._contextYear,this._contextMonth+1,1),this._currentView="calendar"}handleYearMonthComboboxKeydown(e){if(e.key===n.TAB&&!e.shiftKey&&this._currentView!=="calendar"){e.preventDefault();const a=this.renderRoot.querySelector('ngc-year-month-selector[tabindex="0"]');a==null||a.focus()}}get currentViewMarkup(){switch(this._currentView){case"calendar":return this.calendarMarkup;case"months":return this.getYearOrMonthSelectorGrid(d.MONTH);case"years":return this.getYearOrMonthSelectorGrid(d.YEAR);default:return null}}get calendarMarkup(){return i`
58
+ `}handlePreviousMonthClicked(){this._contextDate=new Date(this._contextYear,this._contextMonth-1,1),this._currentView="calendar"}handleMonthClick(){this._currentView==="months"?this._currentView="calendar":this._currentView="months"}handleYearClick(){this._currentView==="years"?this._currentView="calendar":(this._currentView="years",this.scrollToSelectedYear())}handleNextMonthClicked(){this._contextDate=new Date(this._contextYear,this._contextMonth+1,1),this._currentView="calendar"}handleYearMonthComboboxKeydown(e){e.key===n.TAB&&!e.shiftKey&&this._currentView!=="calendar"&&(e.preventDefault(),this.renderRoot.querySelector('ngc-year-month-selector[tabindex="0"]')?.focus())}get currentViewMarkup(){switch(this._currentView){case"calendar":return this.calendarMarkup;case"months":return this.getYearOrMonthSelectorGrid(d.MONTH);case"years":return this.getYearOrMonthSelectorGrid(d.YEAR);default:return null}}get calendarMarkup(){return i`
59
59
  <table class="gator-datepicker-table" role="grid">
60
60
  <thead role="rowgroup" class="gator-datepicker-table-header">
61
61
  <tr role="row">
@@ -73,28 +73,28 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
73
73
  <div role="columnheader">
74
74
  ${e}
75
75
  </div>`)}
76
- `}get getDatesMarkup(){const e=this._contextDays,t=[];for(let a=0;a<e.length;a+=7)t.push(e.slice(a,a+7));return i`
77
- ${t.map(a=>i`
76
+ `}get getDatesMarkup(){const e=this._contextDays,t=[];for(let r=0;r<e.length;r+=7)t.push(e.slice(r,r+7));return i`
77
+ ${t.map(r=>i`
78
78
  <tr role="row">
79
- ${a.map(({date:r})=>i`
79
+ ${r.map(({date:a})=>i`
80
80
  <ngc-selector
81
81
  role="gridcell"
82
- ?current=${this.isSameDate(r,this._todaysDate)}
83
- ?selected=${this.setSelectorSelected(r)}
84
- ?disabled=${this.isDateOutsideMinMax(r)}
85
- type=${this.setSelectorType(r)}
86
- tabindex='${this.isSameDate(r,this._contextDate)?0:-1}'
82
+ ?current=${this.isSameDate(a,this._todaysDate)}
83
+ ?selected=${this.setSelectorSelected(a)}
84
+ ?disabled=${this.isDateOutsideMinMax(a)}
85
+ type=${this.setSelectorType(a)}
86
+ tabindex='${this.isSameDate(a,this._contextDate)?0:-1}'
87
87
  @keydown=${this.handleDateKeydown}
88
- @select=${o=>this.handleDateClick(o,r)}
89
- data-value=${r.getDate()}
88
+ @select=${o=>this.handleDateClick(o,a)}
89
+ data-value=${a.getDate()}
90
90
  >
91
- ${r.getDate()}
91
+ ${a.getDate()}
92
92
  </ngc-selector>
93
93
  `)}
94
94
  </tr>
95
95
  `)}
96
96
  </div>
97
- `}handleDateKeydown(e){switch(e.key){case n.UP:e.preventDefault(),this.setNewContextDateAndShiftFocus(-7);break;case n.DOWN:e.preventDefault(),this.setNewContextDateAndShiftFocus(7);break;case n.LEFT:e.preventDefault(),this.setNewContextDateAndShiftFocus(-1);break;case n.RIGHT:e.preventDefault(),this.setNewContextDateAndShiftFocus(1);break}}handleDateClick(e,t){this._contextDate=t,this.range?this.handleRangeSelection(t):(e.target.selected?this.clearSelection():this.setSelectedDate(t),this.dispatchDateChangeEvent())}handleRangeSelection(e){this._startDate?this._startDate&&!this._endDate?e<this._startDate?this.setRangeStart(e):this.setRangeEnd(e):this._startDate&&this._endDate&&(e<this._startDate?this.setRangeStart(e):e>this._endDate?this.setRangeEnd(e):(this.clearSelection(),this.setRangeStart(e))):this.setRangeStart(e),this.dispatchDateRangeChangeEvent()}setSelectorType(e){if(this.range){if(this._startDate&&this._endDate&&this.isSameDate(this._startDate,this._endDate))return"base";if(this.isSameDate(e,this._startDate))return"range-start";if(this.isSameDate(e,this._endDate))return"range-end";if(this.isDateInRange(e))return"range-in-between"}return e.getMonth()===this._contextDate.getMonth()?"base":"inactive"}setSelectorSelected(e){return this.range?this.isDateInRange(e):this.isSameDate(e,this._selectedDate)}setNewContextDateAndShiftFocus(e){var t;this._contextDate=new Date(this._contextDate.getFullYear(),this._contextDate.getMonth(),this._contextDate.getDate()+e),(t=this.getSelectorByDate(this._contextDate))==null||t.focus()}getSelectorByDate(e){return this.renderRoot.querySelector(`ngc-selector[data-value="${e.getDate()}"]:not([type="inactive"])`)}handleCalendarViewKeydown(e){var t,a;if(e.key===n.TAB){const r=this.renderRoot.querySelector("#prev-month"),o=this.renderRoot.querySelector("#done-button");e.shiftKey?((t=this.shadowRoot)==null?void 0:t.activeElement)===r&&(o.focus(),e.preventDefault()):((a=this.shadowRoot)==null?void 0:a.activeElement)===o&&(r.focus(),e.preventDefault())}}getYearOrMonthSelectorGrid(e){const a=e===d.YEAR?this._years:this._localizedMonths,r=[];for(let o=0;o<a.length;o+=3)r.push(a.slice(o,o+3));return i`
97
+ `}handleDateKeydown(e){switch(e.key){case n.UP:e.preventDefault(),this.setNewContextDateAndShiftFocus(-7);break;case n.DOWN:e.preventDefault(),this.setNewContextDateAndShiftFocus(7);break;case n.LEFT:e.preventDefault(),this.setNewContextDateAndShiftFocus(-1);break;case n.RIGHT:e.preventDefault(),this.setNewContextDateAndShiftFocus(1);break}}handleDateClick(e,t){this._contextDate=t,this.range?this.handleRangeSelection(t):(e.target.selected?this.clearSelection():this.setSelectedDate(t),this.dispatchDateChangeEvent())}handleRangeSelection(e){this._startDate?this._startDate&&!this._endDate?e<this._startDate?this.setRangeStart(e):this.setRangeEnd(e):this._startDate&&this._endDate&&(e<this._startDate?this.setRangeStart(e):e>this._endDate?this.setRangeEnd(e):(this.clearSelection(),this.setRangeStart(e))):this.setRangeStart(e),this.dispatchDateRangeChangeEvent()}setSelectorType(e){if(this.range){if(this._startDate&&this._endDate&&this.isSameDate(this._startDate,this._endDate))return"base";if(this.isSameDate(e,this._startDate))return"range-start";if(this.isSameDate(e,this._endDate))return"range-end";if(this.isDateInRange(e))return"range-in-between"}return e.getMonth()===this._contextDate.getMonth()?"base":"inactive"}setSelectorSelected(e){return this.range?this.isDateInRange(e):this.isSameDate(e,this._selectedDate)}setNewContextDateAndShiftFocus(e){this._contextDate=new Date(this._contextDate.getFullYear(),this._contextDate.getMonth(),this._contextDate.getDate()+e),this.getSelectorByDate(this._contextDate)?.focus()}getSelectorByDate(e){return this.renderRoot.querySelector(`ngc-selector[data-value="${e.getDate()}"]:not([type="inactive"])`)}handleCalendarViewKeydown(e){if(e.key===n.TAB){const t=this.renderRoot.querySelector("#prev-month"),r=this.renderRoot.querySelector("#done-button");e.shiftKey?this.shadowRoot?.activeElement===t&&(r.focus(),e.preventDefault()):this.shadowRoot?.activeElement===r&&(t.focus(),e.preventDefault())}}getYearOrMonthSelectorGrid(e){const r=e===d.YEAR?this._years:this._localizedMonths,a=[];for(let o=0;o<r.length;o+=3)a.push(r.slice(o,o+3));return i`
98
98
  <div role="dialog"
99
99
  class="gator-datepicker-year-month-selectors"
100
100
  id="${e}-selectors"
@@ -102,7 +102,7 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
102
102
  @keydown=${this.handleSelectionDialogKeydown}>
103
103
  <table class="gator-datepicker-table" role="grid">
104
104
  <tbody class="gator-datepicker-table-body gator-datepicker-table-body-year-month" @scroll=${this.onYearSelectorScroll}>
105
- ${r.map(o=>i`
105
+ ${a.map(o=>i`
106
106
  <tr>
107
107
  ${o.map(({dataValue:s,selectorText:l})=>i`
108
108
  <ngc-year-month-selector
@@ -122,10 +122,10 @@ import"../../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@
122
122
  </table>
123
123
  ${this.footerMarkup}
124
124
  </div>
125
- `}handleSelectionDialogKeydown(e){var t,a;switch(e.key){case n.TAB:const r=this.renderRoot.querySelector('ngc-year-month-selector[tabindex="0"]'),o=this.renderRoot.querySelector("#done-button");e.shiftKey?((t=this.shadowRoot)==null?void 0:t.activeElement)===r&&(o.focus(),e.preventDefault()):((a=this.shadowRoot)==null?void 0:a.activeElement)===o&&(r.focus(),e.preventDefault());break;case n.ESCAPE:e.preventDefault(),e.stopPropagation();const s=this._currentView==="years"?this.renderRoot.querySelector("#year-combobox"):this.renderRoot.querySelector("#month-combobox");this._currentView="calendar",s.focus();break}}isYearMonthSelectorCurrent(e,t){return e==="year"?this._todaysDate.getFullYear()===t:this._todaysDate.getMonth()===t}isYearMonthSelectorSelected(e,t){return e==="year"?this._contextYear===t:this._contextMonth===t}yearMonthSelectorTabindex(e,t){if(e==="year"){const a=this._years.some(s=>s.dataValue===this._contextYear),r=this._years[0].dataValue===t,o=this._contextYear===t;return a?o?0:-1:r?0:-1}return this._contextMonth===t?0:-1}handleYearMonthSelectorClick(e,t){var a;t==="month"?this._contextDate=new Date(this._contextYear,e,1):this._contextDate=new Date(e,this._contextMonth,1),this._currentView="calendar",(a=this.renderRoot.querySelector(`#${t}-combobox`))==null||a.focus()}handleYearMonthSelectorKeyDown(e,t){switch(e.key){case n.UP:e.preventDefault(),this.shiftFocusToYearMonthSelector(t-3);break;case n.DOWN:e.preventDefault(),this.shiftFocusToYearMonthSelector(t+3);break;case n.LEFT:e.preventDefault(),this.shiftFocusToYearMonthSelector(t-1);break;case n.RIGHT:e.preventDefault(),this.shiftFocusToYearMonthSelector(t+1);break}}async shiftFocusToYearMonthSelector(e){const t=this.renderRoot.querySelector(`ngc-year-month-selector[data-value="${e}"]`);if(t)t.focus();else{const a=this._years.length?this._years[0].dataValue:new Date().getFullYear();e<a&&(this.loadMoreYearsBefore(),await this.updateComplete,this.shiftFocusToYearMonthSelector(e))}}async onYearSelectorScroll(e){var r,o;const t=e.target,a=t.scrollTop>this.previousScrollTop;if(this.previousScrollTop=t.scrollTop,a&&t.scrollHeight-t.scrollTop===t.clientHeight)this.loadMoreYearsAfter();else if(!a&&t.scrollTop===0&&((o=(r=this.shadowRoot)==null?void 0:r.activeElement)==null?void 0:o.tagName)!=="NGC-YEAR-MONTH-SELECTOR"){const s=t.scrollHeight;this.loadMoreYearsBefore(),await this.updateComplete;const l=t.scrollHeight;t.scrollTop=l-s}}loadMoreYearsAfter(){const e=this._years.length?this._years[this._years.length-1].dataValue:new Date().getFullYear(),t=this.loadMoreYearsBatch(e+1);this._years=[...this._years,...t],this.requestUpdate()}loadMoreYearsBefore(){const e=this._years.length?this._years[0].dataValue:new Date().getFullYear(),t=this.loadMoreYearsBatch(e-this._yearsBatchSize,e-1);this._years=[...t,...this._years],this.requestUpdate()}async scrollToSelectedYear(){await this.updateComplete;const e=this.renderRoot.querySelector("ngc-year-month-selector[selected]");e==null||e.scrollIntoView({behavior:"auto",block:"center"})}get footerMarkup(){return i`
125
+ `}handleSelectionDialogKeydown(e){switch(e.key){case n.TAB:const t=this.renderRoot.querySelector('ngc-year-month-selector[tabindex="0"]'),r=this.renderRoot.querySelector("#done-button");e.shiftKey?this.shadowRoot?.activeElement===t&&(r.focus(),e.preventDefault()):this.shadowRoot?.activeElement===r&&(t.focus(),e.preventDefault());break;case n.ESCAPE:e.preventDefault(),e.stopPropagation();const a=this._currentView==="years"?this.renderRoot.querySelector("#year-combobox"):this.renderRoot.querySelector("#month-combobox");this._currentView="calendar",a.focus();break}}isYearMonthSelectorCurrent(e,t){return e==="year"?this._todaysDate.getFullYear()===t:this._todaysDate.getMonth()===t}isYearMonthSelectorSelected(e,t){return e==="year"?this._contextYear===t:this._contextMonth===t}yearMonthSelectorTabindex(e,t){if(e==="year"){const r=this._years.some(s=>s.dataValue===this._contextYear),a=this._years[0].dataValue===t,o=this._contextYear===t;return r?o?0:-1:a?0:-1}return this._contextMonth===t?0:-1}handleYearMonthSelectorClick(e,t){t==="month"?this._contextDate=new Date(this._contextYear,e,1):this._contextDate=new Date(e,this._contextMonth,1),this._currentView="calendar",this.renderRoot.querySelector(`#${t}-combobox`)?.focus()}handleYearMonthSelectorKeyDown(e,t){switch(e.key){case n.UP:e.preventDefault(),this.shiftFocusToYearMonthSelector(t-3);break;case n.DOWN:e.preventDefault(),this.shiftFocusToYearMonthSelector(t+3);break;case n.LEFT:e.preventDefault(),this.shiftFocusToYearMonthSelector(t-1);break;case n.RIGHT:e.preventDefault(),this.shiftFocusToYearMonthSelector(t+1);break}}async shiftFocusToYearMonthSelector(e){const t=this.renderRoot.querySelector(`ngc-year-month-selector[data-value="${e}"]`);if(t)t.focus();else{const r=this._years.length?this._years[0].dataValue:new Date().getFullYear();e<r&&(this.loadMoreYearsBefore(),await this.updateComplete,this.shiftFocusToYearMonthSelector(e))}}async onYearSelectorScroll(e){const t=e.target,r=t.scrollTop>this.previousScrollTop;if(this.previousScrollTop=t.scrollTop,r&&t.scrollHeight-t.scrollTop===t.clientHeight)this.loadMoreYearsAfter();else if(!r&&t.scrollTop===0&&this.shadowRoot?.activeElement?.tagName!=="NGC-YEAR-MONTH-SELECTOR"){const a=t.scrollHeight;this.loadMoreYearsBefore(),await this.updateComplete;const o=t.scrollHeight;t.scrollTop=o-a}}loadMoreYearsAfter(){const e=this._years.length?this._years[this._years.length-1].dataValue:new Date().getFullYear(),t=this.loadMoreYearsBatch(e+1);this._years=[...this._years,...t],this.requestUpdate()}loadMoreYearsBefore(){const e=this._years.length?this._years[0].dataValue:new Date().getFullYear(),t=this.loadMoreYearsBatch(e-this._yearsBatchSize,e-1);this._years=[...t,...this._years],this.requestUpdate()}async scrollToSelectedYear(){await this.updateComplete,this.renderRoot.querySelector("ngc-year-month-selector[selected]")?.scrollIntoView({behavior:"auto",block:"center"})}get footerMarkup(){return i`
126
126
  <div class="gator-datepicker-footer">
127
127
  <ngc-button id="clear-button" variant='base' @click=${this.handleClearClick}>${c("Clear")}</ngc-button>
128
128
  <ngc-button id="today-button" variant='base' @click=${this.handleTodayClick} ?disabled=${this.isTodayDisabled()}>${c("Today")}</ngc-button>
129
129
  <ngc-button id="done-button" variant='base' @click=${this.handleDoneClick}>${c("Done")}</ngc-button>
130
130
  </div>
131
- `}handleClearClick(){this.clearSelection(),this._contextDate=this._todaysDate,this._currentView="calendar",this.dispatchChangeEvent(),this.dispatchEvent(new CustomEvent("done"))}handleTodayClick(){this._contextDate=this._todaysDate,this.range?(this.setRangeStart(this._todaysDate),this.setRangeEnd(this._todaysDate)):this.setSelectedDate(this._todaysDate),this._currentView="calendar",this.dispatchChangeEvent()}handleDoneClick(){this.dispatchEvent(new CustomEvent("done"))}handleClose(){this.range&&this._startDate&&(this._contextDate=this._startDate),!this.range&&this._selectedDate&&(this._contextDate=this._selectedDate)}};h.shadowRootOptions={...b.shadowRootOptions,delegatesFocus:!0};h.styles=[u(y),u(f),u(m),u(D)];p([S()],h.prototype,"_currentView",2);h=p([_("ngc-datepicker"),k()],h);export{Y as DATE_PICKER_VIEW,h as NgcDatepicker};
131
+ `}handleClearClick(){this.clearSelection(),this._contextDate=this._todaysDate,this._currentView="calendar",this.dispatchChangeEvent(),this.dispatchEvent(new CustomEvent("done"))}handleTodayClick(){this._contextDate=this._todaysDate,this.range?(this.setRangeStart(this._todaysDate),this.setRangeEnd(this._todaysDate)):this.setSelectedDate(this._todaysDate),this._currentView="calendar",this.dispatchChangeEvent()}handleDoneClick(){this.dispatchEvent(new CustomEvent("done"))}handleClose(){this.range&&this._startDate&&(this._contextDate=this._startDate),!this.range&&this._selectedDate&&(this._contextDate=this._selectedDate)}};h.shadowRootOptions={...f.shadowRootOptions,delegatesFocus:!0};h.styles=[u(b),u(y),u(m),u(D)];p([S()],h.prototype,"_currentView",2);h=p([_("ngc-datepicker"),k()],h);export{Y as DATE_PICKER_VIEW,h as NgcDatepicker};
@@ -1,4 +1,4 @@
1
- import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import u from"../../../packages/web-components/src/components/date-picker/year-month-selector/year-month-selector.gator.scss.js";import b from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import f from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{customElement as y}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as v}from"../../../utils/components/testable-lit-element/testable-lit-element.js";import{KEY_CONSTANTS as p}from"../../../consts/key-constants.js";import{unsafeCSS as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var C=Object.defineProperty,g=Object.getOwnPropertyDescriptor,o=(e,r,l,a)=>{for(var s=a>1?void 0:a?g(r,l):r,n=e.length-1,d;n>=0;n--)(d=e[n])&&(s=(a?d(r,l,s):d(s))||s);return a&&s&&C(r,l,s),s},x=(e=>(e.MONTH="month",e.YEAR="year",e))(x||{});let t=class extends v{constructor(){super(),this.selected=!1,this.disabled=!1,this.current=!1,this.tabindex=0,this.addEventListener("click",this.handleClick)}render(){return h`
1
+ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import u from"../../../packages/web-components/src/components/date-picker/year-month-selector/year-month-selector.gator.scss.js";import b from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import f from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{customElement as y}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as i}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as v}from"../../../utils/components/testable-lit-element/testable-lit-element.js";import{KEY_CONSTANTS as p}from"../../../consts/key-constants.js";import{unsafeCSS as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var C=Object.defineProperty,g=Object.getOwnPropertyDescriptor,s=(e,o,l,a)=>{for(var r=a>1?void 0:a?g(o,l):o,n=e.length-1,d;n>=0;n--)(d=e[n])&&(r=(a?d(o,l,r):d(r))||r);return a&&r&&C(o,l,r),r},x=(e=>(e.MONTH="month",e.YEAR="year",e))(x||{});let t=class extends v{constructor(){super(),this.selected=!1,this.disabled=!1,this.current=!1,this.tabindex=0,this.addEventListener("click",this.handleClick)}render(){return h`
2
2
  <div class="gator-year-month-selector ${this.selectedClass} ${this.disabledClass} ${this.currentClass}"
3
3
  tabindex=${this.disabled?"-1":this.tabindex}
4
4
  role="gridcell"
@@ -10,4 +10,4 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
10
10
  <slot></slot>
11
11
  </span>
12
12
  </div>
13
- `}get selectedClass(){return this.selected?"gator-year-month-selector_selected":""}get disabledClass(){return this.disabled?"gator-year-month-selector_disabled":""}get currentClass(){return this.current?"gator-year-month-selector_current":""}handleKeydown(e){if(e.key===p.ENTER||e.key===p.SPACE){e.preventDefault(),this.handleClick(e);return}}handleClick(e){var r;e.preventDefault(),e.stopPropagation(),!this.disabled&&this.dispatchEvent(new CustomEvent("select",{bubbles:!0,detail:{value:(r=this.textContent)==null?void 0:r.trim(),selected:this.selected}}))}};t.shadowRootOptions={...m.shadowRootOptions,delegatesFocus:!0};t.styles=[c(u),c(b),c(f)];o([i({type:Boolean,attribute:"selected"})],t.prototype,"selected",2);o([i({type:Boolean,attribute:"disabled"})],t.prototype,"disabled",2);o([i({type:Boolean,attribute:"current"})],t.prototype,"current",2);o([i({type:Number,attribute:"tabindex"})],t.prototype,"tabindex",2);t=o([y("ngc-year-month-selector")],t);export{t as NgcYearMonthSelector,x as SELECTOR_TYPE};
13
+ `}get selectedClass(){return this.selected?"gator-year-month-selector_selected":""}get disabledClass(){return this.disabled?"gator-year-month-selector_disabled":""}get currentClass(){return this.current?"gator-year-month-selector_current":""}handleKeydown(e){if(e.key===p.ENTER||e.key===p.SPACE){e.preventDefault(),this.handleClick(e);return}}handleClick(e){e.preventDefault(),e.stopPropagation(),!this.disabled&&this.dispatchEvent(new CustomEvent("select",{bubbles:!0,detail:{value:this.textContent?.trim(),selected:this.selected}}))}};t.shadowRootOptions={...m.shadowRootOptions,delegatesFocus:!0};t.styles=[c(u),c(b),c(f)];s([i({type:Boolean,attribute:"selected"})],t.prototype,"selected",2);s([i({type:Boolean,attribute:"disabled"})],t.prototype,"disabled",2);s([i({type:Boolean,attribute:"current"})],t.prototype,"current",2);s([i({type:Number,attribute:"tabindex"})],t.prototype,"tabindex",2);t=s([y("ngc-year-month-selector")],t);export{t as NgcYearMonthSelector,x as SELECTOR_TYPE};