@ncino/web-components 4.3.0-preview.9 → 5.0.0-preview.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_commonjsHelpers.js +1 -1
- package/dist/_virtual/index_html.js +1 -1
- package/dist/_virtual/index_react.js +1 -1
- package/dist/_virtual/preload-helper.js +1 -1
- package/dist/assets/node_modules/.pnpm/ckeditor5@45.2.1/node_modules/ckeditor5/dist/ckeditor5.css +1 -1
- package/dist/components/accordion/gator/base/accordion.gator.figma.js +10 -0
- package/dist/components/accordion/gator/base/accordion.gator.js +11 -9
- package/dist/components/accordion/gator/group/accordion-group.gator.figma.js +3 -0
- package/dist/components/accordion/gator/group/accordion-group.gator.js +2 -2
- package/dist/components/alert/gator/base/alert.gator.js +2 -2
- package/dist/components/alert/gator/subtitle/alert-subtitle.gator.js +2 -2
- package/dist/components/alert/gator/title/alert-title.gator.js +2 -2
- package/dist/components/avatar/gator/avatar.gator.js +5 -5
- package/dist/components/badge/gator/badge.gator.js +2 -2
- package/dist/components/banner/gator/banner.gator.figma.js +8 -0
- package/dist/components/banner/gator/banner.gator.js +6 -5
- package/dist/components/boolean/boolean.gator.figma.js +11 -0
- package/dist/components/boolean/boolean.gator.js +6 -6
- package/dist/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.figma.js +3 -0
- package/dist/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.js +2 -2
- package/dist/components/breadcrumbs/gator/container/breadcrumbs.gator.figma.js +5 -0
- package/dist/components/button/gator/button.gator.js +4 -4
- package/dist/components/button-group/gator/button-group.gator.js +2 -2
- package/dist/components/card/gator/footer/card-footer.gator.js +2 -2
- package/dist/components/card/gator/header/card-header.gator.js +2 -2
- package/dist/components/checkbox/checkbox.gator.js +5 -5
- package/dist/components/checkbox-group/checkbox-group.gator.js +8 -8
- package/dist/components/chip/chip.js +1 -1
- package/dist/components/chip/gator/chip.gator.js +15 -5
- package/dist/components/combobox/base/combobox.js +1 -1
- package/dist/components/combobox/base/combobox.slds.js +13 -13
- package/dist/components/date-picker/base/gator/datepicker.gator.js +18 -18
- package/dist/components/date-picker/year-month-selector/year-month-selector.gator.js +2 -2
- package/dist/components/headline-card/gator/headline-card.gator.js +2 -2
- package/dist/components/icon/gator/icon.gator.js +2 -2
- package/dist/components/illustration/gator/illustration.gator.js +2 -2
- package/dist/components/input/base/input-base.gator.js +1 -1
- package/dist/components/input/gator/dropdown/input-dropdown.gator.js +11 -11
- package/dist/components/input/gator/input-currency/input-currency.gator.js +2 -2
- package/dist/components/input/gator/input-date/input-date.gator.js +15 -15
- package/dist/components/input/gator/input-file/input-file.gator.js +3 -3
- package/dist/components/input/gator/input-masked/input-masked.gator.js +1 -1
- package/dist/components/input/gator/input-phone/input-phone.gator.js +2 -2
- package/dist/components/input/gator/input-search/input-search.gator.js +2 -2
- package/dist/components/input/gator/input-text/input-text.gator.js +1 -1
- package/dist/components/input/gator/input-time/input-time.gator.js +2 -2
- package/dist/components/list/gator/list/list.gator.js +2 -2
- package/dist/components/list/gator/list-item/list-item.gator.js +6 -6
- package/dist/components/menu/base/gator/menu.gator.js +3 -3
- package/dist/components/menu/base/slds/menu.slds.js +2 -2
- package/dist/components/menu/menu-item/gator/menu-item.gator.js +2 -2
- package/dist/components/menu/menu-submenu/menu-submenu.js +1 -1
- package/dist/components/modal/gator/modal.gator.js +38 -39
- package/dist/components/page-header/gator/page-header.gator.js +2 -2
- package/dist/components/panel/gator/panel.gator.js +13 -13
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/components/pill/pill.slds.js +3 -3
- package/dist/components/popover/gator/popover.gator.js +10 -10
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/radio/radio.gator.js +2 -2
- package/dist/components/radio-group/radio-group.gator.js +2 -2
- package/dist/components/selection-box-group/selection-box-group.gator.js +5 -5
- package/dist/components/selector/gator/selector.gator.js +2 -2
- package/dist/components/switch/gator/switch.gator.js +2 -2
- package/dist/components/table/gator/table-bulk-controls/table-bulk-controls.gator.js +16 -0
- package/dist/components/table/gator/table.gator.js +55 -36
- package/dist/components/tabs/gator/tabset/tabset.gator.js +3 -3
- package/dist/components/text-detail/gator/text-detail.gator.figma.js +30 -0
- package/dist/components/text-detail/gator/text-detail.gator.js +17 -18
- package/dist/components/time-picker/gator/time-picker.gator.js +19 -19
- package/dist/components/toast/gator/base/toast.gator.js +8 -9
- package/dist/components/toast/gator/subtitle/toast-subtitle.gator.js +2 -2
- package/dist/components/toast/gator/title/toast-title.gator.js +2 -2
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/toast-container/gator/toast-container.gator.js +18 -0
- package/dist/components/toast-container/index.js +1 -0
- package/dist/components/toaster/gator/toaster.gator.js +5 -0
- package/dist/components/toaster/index.js +1 -0
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/index.gator.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.services.js +1 -0
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-autosave@45.2.1/node_modules/@ckeditor/ckeditor5-autosave/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-basic-styles@45.2.1/node_modules/@ckeditor/ckeditor5-basic-styles/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-clipboard@45.2.1/node_modules/@ckeditor/ckeditor5-clipboard/dist/index.js +10 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-cloud-services@45.2.1/node_modules/@ckeditor/ckeditor5-cloud-services/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-code-block@45.2.1/node_modules/@ckeditor/ckeditor5-code-block/dist/index.js +5 -5
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-core@45.2.1/node_modules/@ckeditor/ckeditor5-core/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-editor-classic@45.2.1/node_modules/@ckeditor/ckeditor5-editor-classic/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-engine@45.2.1/node_modules/@ckeditor/ckeditor5-engine/dist/index.js +12 -12
- 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
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-font@45.2.1/node_modules/@ckeditor/ckeditor5-font/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-heading@45.2.1/node_modules/@ckeditor/ckeditor5-heading/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-embed@45.2.1/node_modules/@ckeditor/ckeditor5-html-embed/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-html-support@45.2.1/node_modules/@ckeditor/ckeditor5-html-support/dist/index.js +6 -6
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-image@45.2.1/node_modules/@ckeditor/ckeditor5-image/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-indent@45.2.1/node_modules/@ckeditor/ckeditor5-indent/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-link@45.2.1/node_modules/@ckeditor/ckeditor5-link/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-list@45.2.1/node_modules/@ckeditor/ckeditor5-list/dist/index.js +5 -5
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-markdown-gfm@45.2.1/node_modules/@ckeditor/ckeditor5-markdown-gfm/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-media-embed@45.2.1/node_modules/@ckeditor/ckeditor5-media-embed/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-paragraph@45.2.1/node_modules/@ckeditor/ckeditor5-paragraph/dist/index.js +2 -2
- 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
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-source-editing@45.2.1/node_modules/@ckeditor/ckeditor5-source-editing/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-special-characters@45.2.1/node_modules/@ckeditor/ckeditor5-special-characters/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-style@45.2.1/node_modules/@ckeditor/ckeditor5-style/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-table@45.2.1/node_modules/@ckeditor/ckeditor5-table/dist/index.js +6 -6
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-typing@45.2.1/node_modules/@ckeditor/ckeditor5-typing/dist/index.js +4 -4
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-ui@45.2.1/node_modules/@ckeditor/ckeditor5-ui/dist/index.js +10 -10
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-undo@45.2.1/node_modules/@ckeditor/ckeditor5-undo/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-upload@45.2.1/node_modules/@ckeditor/ckeditor5-upload/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-utils@45.2.1/node_modules/@ckeditor/ckeditor5-utils/dist/index.js +38 -38
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-watchdog@45.2.1/node_modules/@ckeditor/ckeditor5-watchdog/dist/index.js +3 -3
- package/dist/node_modules/.pnpm/@ckeditor_ckeditor5-widget@45.2.1/node_modules/@ckeditor/ckeditor5-widget/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@deltablot_dropzone@7.3.1/node_modules/@deltablot/dropzone/dist/dropzone.js +1 -1
- package/dist/node_modules/.pnpm/@fastify_busboy@2.1.1/node_modules/@fastify/busboy/lib/main.js +1 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/dist/common/fetch.js +1 -0
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +1 -0
- 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
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.4/node_modules/@figma/code-connect/package.json.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.4/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +1 -0
- package/dist/node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js +2 -2
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/node_modules/.pnpm/@vitest_expect@3.2.4/node_modules/@vitest/expect/dist/index.js +8 -8
- package/dist/node_modules/.pnpm/@vitest_pretty-format@3.2.4/node_modules/@vitest/pretty-format/dist/index.js +2 -2
- package/dist/node_modules/.pnpm/@vitest_runner@3.2.4/node_modules/@vitest/runner/dist/chunk-hooks.js +5 -5
- package/dist/node_modules/.pnpm/@vitest_snapshot@3.2.4/node_modules/@vitest/snapshot/dist/index.js +12 -12
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/diff.js +21 -21
- package/dist/node_modules/.pnpm/@vitest_utils@3.2.4/node_modules/@vitest/utils/dist/error.js +2 -2
- package/dist/node_modules/.pnpm/axe-core@4.10.3/node_modules/axe-core/axe.js +4 -4
- package/dist/node_modules/.pnpm/chai@5.2.0/node_modules/chai/chai.js +3 -3
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/_internal/isPrototype.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/cloneDeepWith.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/get.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/object/unset.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/function/debounce.js +1 -1
- package/dist/node_modules/.pnpm/es-toolkit@1.32.0/node_modules/es-toolkit/dist/object/cloneDeepWith.js +1 -1
- package/dist/node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/async-directive.js +1 -1
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directive-helpers.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js +2 -2
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/repeat.js +5 -0
- package/dist/node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js +3 -3
- package/dist/node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.js +1 -1
- package/dist/node_modules/.pnpm/tinyrainbow@2.0.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cache.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cache/cachestorage.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/cookies/parse.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/constants.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/headers.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/index.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/request.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/response.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/util.js +2 -2
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/fetch/webidl.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/connection.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/events.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/frame.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/receiver.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/util.js +1 -1
- package/dist/node_modules/.pnpm/undici@5.29.0/node_modules/undici/lib/websocket/websocket.js +1 -1
- 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 +8 -0
- 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 +12 -0
- package/dist/packages/web-components/src/components/accordion/gator/base/accordion.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/accordion/gator/group/accordion-group.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/banner/gator/banner.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/button/gator/button.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/button-card/gator/button-card.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/card/gator/base/card.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/chip/gator/chip.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/modal/gator/modal.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/switch/gator/switch.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table-bulk-controls/table-bulk-controls.gator.scss.js +1 -0
- package/dist/packages/web-components/src/components/text-detail/gator/text-detail.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/toast/gator/base/toast.gator.scss.js +1 -1
- package/dist/packages/web-components/src/components/toast-container/gator/toast-container.gator.scss.js +1 -0
- package/dist/packages/web-components/src/components/toaster/gator/toaster.gator.scss.js +1 -0
- package/dist/packages/web-components/src/index.slds.scss.js +1 -1
- package/dist/services/toaster-service.js +1 -0
- package/dist/types/components/accordion/gator/base/accordion.gator.d.ts +13 -3
- package/dist/types/components/accordion/gator/base/accordion.gator.figma.d.ts +1 -0
- package/dist/types/components/accordion/gator/group/accordion-group.gator.d.ts +5 -0
- package/dist/types/components/accordion/gator/group/accordion-group.gator.figma.d.ts +1 -0
- package/dist/types/components/avatar/gator/avatar.gator.d.ts +1 -0
- package/dist/types/components/banner/gator/banner.gator.d.ts +5 -0
- package/dist/types/components/banner/gator/banner.gator.figma.d.ts +1 -0
- package/dist/types/components/boolean/boolean.gator.figma.d.ts +1 -0
- package/dist/types/components/breadcrumbs/gator/breadcrumb/breadcrumb.gator.figma.d.ts +1 -0
- package/dist/types/components/breadcrumbs/gator/container/breadcrumbs.gator.figma.d.ts +1 -0
- package/dist/types/components/chip/chip.d.ts +10 -0
- package/dist/types/components/chip/gator/chip.gator.d.ts +1 -0
- package/dist/types/components/modal/gator/modal.gator.d.ts +1 -1
- package/dist/types/components/table/gator/table-bulk-controls/table-bulk-controls.gator.d.ts +29 -0
- package/dist/types/components/table/gator/table-bulk-controls/table-bulk-controls.gator.test.d.ts +0 -0
- package/dist/types/components/table/gator/table.gator.d.ts +9 -0
- package/dist/types/components/text-detail/gator/text-detail.gator.d.ts +4 -2
- package/dist/types/components/text-detail/gator/text-detail.gator.figma.d.ts +1 -0
- package/dist/types/components/toast/toast.d.ts +14 -0
- package/dist/types/components/toast-container/gator/toast-container.gator.d.ts +15 -0
- package/dist/types/components/toast-container/gator/toast-container.gator.test.d.ts +0 -0
- package/dist/types/components/toast-container/index.d.ts +1 -0
- package/dist/types/components/toaster/gator/toaster.gator.d.ts +32 -0
- package/dist/types/components/toaster/gator/toaster.gator.test.d.ts +0 -0
- package/dist/types/components/toaster/index.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.gator.d.ts +2 -0
- package/dist/types/index.services.d.ts +1 -0
- package/dist/types/services/toaster-service.d.ts +117 -0
- package/dist/types/services/toaster-service.test.d.ts +1 -0
- package/dist/utils/accessibility-utils.js +1 -1
- package/dist/utils/datatestid-utils.js +1 -1
- package/dist/utils/lightdom-utils.js +1 -1
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/dist/utils/vitest-utils.js +1 -1
- package/package.json +16 -12
- package/web-types.json +293 -114
- package/dist/_virtual/sourcemap-codec.umd.js +0 -1
- package/dist/_virtual/sourcemap-codec.umd2.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/common/fetch.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/dist/connect/figma_rest_api.js +0 -1
- package/dist/node_modules/.pnpm/@figma_code-connect@1.3.3/node_modules/@figma/code-connect/package.json.js +0 -1
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +0 -1
- package/dist/node_modules/.pnpm/@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.7_typescript@5.8.3__playwright@1.53.1__894c207534f0ba223b8299d9f5ff1049/node_modules/@vitest/browser/context.js +0 -1
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +0 -8
- package/dist/node_modules/.pnpm/vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +0 -12
- package/dist/packages/web-components/src/components/accordion/gator/base/accordion.gator.tokens.scss.js +0 -1
- package/dist/packages/web-components/src/components/accordion/gator/group/accordion-group.gator.tokens.scss.js +0 -1
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5 → 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/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5 → 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/date.Bq6ZW5rf.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
|
|
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?
|
|
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:
|
|
10
|
+
${this.options.length>0?this.checkboxesFromOptions:a`<slot @change=${this.handleCheckboxSelectionChange}></slot>`}
|
|
11
11
|
</div>
|
|
12
|
-
${this.hasError&&this.errorMessage!==""?
|
|
13
|
-
${this.helpText?
|
|
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
|
|
16
|
-
${this.options.map(e=>
|
|
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){
|
|
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 t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as
|
|
1
|
+
import{property as t}from"../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{TestableLitElement as n}from"../../utils/components/testable-lit-element/testable-lit-element.js";var d=Object.defineProperty,e=(s,p,a,y)=>{for(var o=void 0,i=s.length-1,l;i>=0;i--)(l=s[i])&&(o=l(p,a,o)||o);return o&&d(p,a,o),o};class r extends n{constructor(){super(...arguments),this.disabled=!1,this.readonly=!1,this.type=null,this.size=null,this.hideBorder=!1,this.startIcon="",this.dismissible=!1}}e([t({type:Boolean})],r.prototype,"disabled");e([t({type:Boolean})],r.prototype,"readonly");e([t()],r.prototype,"type");e([t()],r.prototype,"size");e([t({type:Boolean,attribute:"hide-border"})],r.prototype,"hideBorder");e([t({type:String,attribute:"start-icon"})],r.prototype,"startIcon");e([t({type:Boolean,attribute:"dismissible"})],r.prototype,"dismissible");export{r as NjcChip};
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as
|
|
1
|
+
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as r,html as i}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 b from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import u from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import g from"../../../packages/web-components/src/components/chip/gator/chip.gator.scss.js";import{NjcChip as d}from"../chip.js";import{classMap as h}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/class-map.js";import{unsafeCSS as l}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var v=Object.getOwnPropertyDescriptor,f=(s,o,p,n)=>{for(var t=n>1?void 0:n?v(o,p):o,a=s.length-1,c;a>=0;a--)(c=s[a])&&(t=c(t)||t);return t};let e=class extends d{render(){return this.readonly||this.dismissible?this.readonlyChipMarkup:this.chipMarkup}get chipMarkup(){return i`
|
|
2
2
|
<button
|
|
3
3
|
class=${h(this.classes)}
|
|
4
4
|
?disabled="${this.disabled}"
|
|
5
5
|
@click=${this.handleClick}
|
|
6
6
|
>
|
|
7
|
-
|
|
7
|
+
${this.startIcon?i`<ngc-icon name="${this.startIcon}" size="x-small"></ngc-icon>`:r}
|
|
8
|
+
<div class="chip-label"><slot></slot></div>
|
|
8
9
|
</button>
|
|
9
|
-
`}get readonlyChipMarkup(){return
|
|
10
|
+
`}get readonlyChipMarkup(){return i`
|
|
10
11
|
<div
|
|
11
12
|
class="gator-chip__read-only ${h(this.classes)}"
|
|
12
13
|
aria-disabled="${this.disabled}"
|
|
13
14
|
@click=${this.handleClick}
|
|
14
15
|
>
|
|
15
|
-
|
|
16
|
+
${this.startIcon?i`<ngc-icon name="${this.startIcon}" size="x-small"></ngc-icon>`:r}
|
|
17
|
+
<div class="chip-label"><slot></slot></div>
|
|
18
|
+
${this.dismissible?i`
|
|
19
|
+
<ngc-icon-button
|
|
20
|
+
icon-name="exit-circle"
|
|
21
|
+
size="small"
|
|
22
|
+
@click=${this.handleDismiss}
|
|
23
|
+
?disabled="${this.disabled}"
|
|
24
|
+
.ariaLabel="Remove ${this.textContent?.trim()}"
|
|
25
|
+
></ngc-icon-button>`:r}
|
|
16
26
|
</div>
|
|
17
|
-
`}handleClick(
|
|
27
|
+
`}handleClick(s){s.stopPropagation(),s.preventDefault(),!(this.disabled||this.readonly||this.dismissible)&&this.dispatchEvent(new Event("click",{bubbles:!0}))}handleDismiss(s){s.stopPropagation(),s.preventDefault(),!this.disabled&&this.dispatchEvent(new Event("dismiss",{bubbles:!0}))}get classes(){return{"gator-chip":!0,"gator-chip_small":this.size==="small","gator-chip_disabled":this.disabled,"hide-border":this.hideBorder,[`gator-chip_${this.type}`]:this.type!==null}}};e.shadowRootOptions={...d.shadowRootOptions,delegatesFocus:!0};e.styles=[l(g),l(b),l(u)];e=f([m("ngc-chip")],e);export{e as NgcChip};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{property as
|
|
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
|
|
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(
|
|
24
|
+
${this._filteredOptions.map(e=>a`
|
|
25
25
|
<nsc-combobox-item
|
|
26
26
|
.searchValue="${this._searchValue}"
|
|
27
|
-
label="${
|
|
28
|
-
value="${
|
|
29
|
-
@change=${()=>this.selectOption(
|
|
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?
|
|
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(){
|
|
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
|
-
${
|
|
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?
|
|
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
|
-
`:
|
|
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
|
-
${
|
|
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(
|
|
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
|
-
`];
|
|
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
|
|
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(()=>{
|
|
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){
|
|
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
|
|
77
|
-
${t.map(
|
|
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
|
-
${
|
|
79
|
+
${r.map(({date:a})=>i`
|
|
80
80
|
<ngc-selector
|
|
81
81
|
role="gridcell"
|
|
82
|
-
?current=${this.isSameDate(
|
|
83
|
-
?selected=${this.setSelectorSelected(
|
|
84
|
-
?disabled=${this.isDateOutsideMinMax(
|
|
85
|
-
type=${this.setSelectorType(
|
|
86
|
-
tabindex='${this.isSameDate(
|
|
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,
|
|
89
|
-
data-value=${
|
|
88
|
+
@select=${o=>this.handleDateClick(o,a)}
|
|
89
|
+
data-value=${a.getDate()}
|
|
90
90
|
>
|
|
91
|
-
${
|
|
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){
|
|
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
|
-
${
|
|
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){
|
|
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={...
|
|
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,
|
|
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){
|
|
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};
|