snice 7.0.2 → 7.0.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.
- package/adapters/react/SniceProvider.js +1 -1
- package/adapters/react/SniceRouter.js +1 -1
- package/adapters/react/matchRoute.js +1 -1
- package/adapters/react/useRequestHandler.js +1 -1
- package/dist/cdn/accordion/snice-accordion.js +1 -1
- package/dist/cdn/action-bar/snice-action-bar.js +1 -1
- package/dist/cdn/activity-feed/snice-activity-feed.js +1 -1
- package/dist/cdn/alert/snice-alert.js +1 -1
- package/dist/cdn/app-tiles/snice-app-tiles.js +1 -1
- package/dist/cdn/approval-flow/snice-approval-flow.js +1 -1
- package/dist/cdn/audio-recorder/snice-audio-recorder.js +1 -1
- package/dist/cdn/availability/snice-availability.js +1 -1
- package/dist/cdn/avatar/snice-avatar.js +1 -1
- package/dist/cdn/avatar-group/snice-avatar-group.js +1 -1
- package/dist/cdn/badge/snice-badge.js +1 -1
- package/dist/cdn/banner/snice-banner.js +1 -1
- package/dist/cdn/binpack/snice-binpack.js +1 -1
- package/dist/cdn/book/snice-book.js +1 -1
- package/dist/cdn/booking/snice-booking.js +1 -1
- package/dist/cdn/breadcrumbs/snice-breadcrumbs.js +1 -1
- package/dist/cdn/button/snice-button.js +1 -1
- package/dist/cdn/calendar/snice-calendar.js +1 -1
- package/dist/cdn/camera/snice-camera.js +1 -1
- package/dist/cdn/camera-annotate/snice-camera-annotate.js +1 -1
- package/dist/cdn/candlestick/snice-candlestick.js +1 -1
- package/dist/cdn/card/snice-card.js +1 -1
- package/dist/cdn/carousel/snice-carousel.js +1 -1
- package/dist/cdn/cart/snice-cart.js +1 -1
- package/dist/cdn/chart/snice-chart.js +1 -1
- package/dist/cdn/chat/snice-chat.js +1 -1
- package/dist/cdn/checkbox/snice-checkbox.js +1 -1
- package/dist/cdn/chip/snice-chip.js +1 -1
- package/dist/cdn/code-block/snice-code-block.js +1 -1
- package/dist/cdn/color-display/snice-color-display.js +1 -1
- package/dist/cdn/color-picker/snice-color-picker.js +1 -1
- package/dist/cdn/command-palette/snice-command-palette.js +1 -1
- package/dist/cdn/comments/snice-comments.js +1 -1
- package/dist/cdn/countdown/snice-countdown.js +1 -1
- package/dist/cdn/cropper/snice-cropper.js +1 -1
- package/dist/cdn/data-card/snice-data-card.js +1 -1
- package/dist/cdn/date-picker/snice-date-picker.js +1 -1
- package/dist/cdn/date-range-picker/snice-date-range-picker.js +1 -1
- package/dist/cdn/date-time-picker/snice-date-time-picker.js +1 -1
- package/dist/cdn/diff/snice-diff.js +1 -1
- package/dist/cdn/divider/snice-divider.js +1 -1
- package/dist/cdn/doc/snice-doc.js +1 -1
- package/dist/cdn/draw/snice-draw.js +1 -1
- package/dist/cdn/drawer/snice-drawer.js +1 -1
- package/dist/cdn/empty-state/snice-empty-state.js +1 -1
- package/dist/cdn/estimate/snice-estimate.js +1 -1
- package/dist/cdn/file-gallery/snice-file-gallery.js +1 -1
- package/dist/cdn/file-upload/snice-file-upload.js +1 -1
- package/dist/cdn/flip-card/snice-flip-card.js +1 -1
- package/dist/cdn/flow/snice-flow.js +1 -1
- package/dist/cdn/form-layout/snice-form-layout.js +1 -1
- package/dist/cdn/funnel/snice-funnel.js +1 -1
- package/dist/cdn/gantt/snice-gantt.js +1 -1
- package/dist/cdn/gauge/snice-gauge.js +1 -1
- package/dist/cdn/grid/snice-grid.js +1 -1
- package/dist/cdn/heatmap/snice-heatmap.js +1 -1
- package/dist/cdn/image/snice-image.js +1 -1
- package/dist/cdn/input/snice-input.js +1 -1
- package/dist/cdn/invoice/snice-invoice.js +1 -1
- package/dist/cdn/kanban/snice-kanban.js +1 -1
- package/dist/cdn/key-value/snice-key-value.js +1 -1
- package/dist/cdn/kpi/snice-kpi.js +1 -1
- package/dist/cdn/layout/snice-layout.js +1 -1
- package/dist/cdn/leaderboard/snice-leaderboard.js +1 -1
- package/dist/cdn/link/snice-link.js +1 -1
- package/dist/cdn/link-preview/snice-link-preview.js +1 -1
- package/dist/cdn/list/snice-list.js +1 -1
- package/dist/cdn/location/snice-location.js +1 -1
- package/dist/cdn/login/snice-login.js +1 -1
- package/dist/cdn/map/snice-map.js +1 -1
- package/dist/cdn/markdown/snice-markdown.js +1 -1
- package/dist/cdn/masonry/snice-masonry.js +1 -1
- package/dist/cdn/menu/snice-menu.js +1 -1
- package/dist/cdn/message-strip/snice-message-strip.js +1 -1
- package/dist/cdn/modal/snice-modal.js +1 -1
- package/dist/cdn/music-player/snice-music-player.js +1 -1
- package/dist/cdn/nav/snice-nav.js +1 -1
- package/dist/cdn/network-graph/snice-network-graph.js +1 -1
- package/dist/cdn/notification-center/snice-notification-center.js +1 -1
- package/dist/cdn/order-tracker/snice-order-tracker.js +1 -1
- package/dist/cdn/org-chart/snice-org-chart.js +1 -1
- package/dist/cdn/pagination/snice-pagination.js +1 -1
- package/dist/cdn/paint/snice-paint.js +1 -1
- package/dist/cdn/pdf-viewer/snice-pdf-viewer.js +1 -1
- package/dist/cdn/permission-matrix/snice-permission-matrix.js +1 -1
- package/dist/cdn/podcast-player/snice-podcast-player.js +1 -1
- package/dist/cdn/popover/snice-popover.js +1 -1
- package/dist/cdn/pricing-table/snice-pricing-table.js +1 -1
- package/dist/cdn/product-card/snice-product-card.js +1 -1
- package/dist/cdn/progress/snice-progress.js +1 -1
- package/dist/cdn/progress-ring/snice-progress-ring.js +1 -1
- package/dist/cdn/qr-code/snice-qr-code.js +1 -1
- package/dist/cdn/qr-reader/snice-qr-reader.js +1 -1
- package/dist/cdn/radio/snice-radio.js +1 -1
- package/dist/cdn/range-slider/snice-range-slider.js +1 -1
- package/dist/cdn/rating/snice-rating.js +1 -1
- package/dist/cdn/receipt/snice-receipt.js +1 -1
- package/dist/cdn/recipe/snice-recipe.js +2 -2
- package/dist/cdn/recipe/snice-recipe.js.map +1 -1
- package/dist/cdn/recipe/snice-recipe.min.js +1 -1
- package/dist/cdn/recipe/snice-recipe.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.js +4 -4
- package/dist/cdn/runtime/snice-runtime.esm.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.esm.min.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.js +4 -4
- package/dist/cdn/runtime/snice-runtime.js.map +1 -1
- package/dist/cdn/runtime/snice-runtime.min.js.map +1 -1
- package/dist/cdn/sankey/snice-sankey.js +1 -1
- package/dist/cdn/segmented-control/snice-segmented-control.js +1 -1
- package/dist/cdn/select/snice-select.js +1 -1
- package/dist/cdn/skeleton/snice-skeleton.js +1 -1
- package/dist/cdn/slider/snice-slider.js +1 -1
- package/dist/cdn/sortable/snice-sortable.js +1 -1
- package/dist/cdn/sparkline/snice-sparkline.js +1 -1
- package/dist/cdn/spinner/snice-spinner.js +1 -1
- package/dist/cdn/split-button/snice-split-button.js +1 -1
- package/dist/cdn/split-pane/snice-split-pane.js +1 -1
- package/dist/cdn/spotlight/snice-spotlight.js +1 -1
- package/dist/cdn/stat-group/snice-stat-group.js +1 -1
- package/dist/cdn/step-input/snice-step-input.js +1 -1
- package/dist/cdn/stepper/snice-stepper.js +1 -1
- package/dist/cdn/switch/snice-switch.js +1 -1
- package/dist/cdn/table/README.md +2 -2
- package/dist/cdn/table/snice-table.esm.js +20 -3
- package/dist/cdn/table/snice-table.esm.js.map +1 -1
- package/dist/cdn/table/snice-table.esm.min.js +35 -35
- package/dist/cdn/table/snice-table.esm.min.js.map +1 -1
- package/dist/cdn/table/snice-table.js +20 -3
- package/dist/cdn/table/snice-table.js.map +1 -1
- package/dist/cdn/table/snice-table.min.js +29 -29
- package/dist/cdn/table/snice-table.min.js.map +1 -1
- package/dist/cdn/tabs/snice-tabs.js +1 -1
- package/dist/cdn/tag/snice-tag.js +1 -1
- package/dist/cdn/tag-input/snice-tag-input.js +1 -1
- package/dist/cdn/terminal/snice-terminal.js +2 -1
- package/dist/cdn/terminal/snice-terminal.js.map +1 -1
- package/dist/cdn/terminal/snice-terminal.min.js +1 -0
- package/dist/cdn/terminal/snice-terminal.min.js.map +1 -1
- package/dist/cdn/testimonial/snice-testimonial.js +1 -1
- package/dist/cdn/textarea/snice-textarea.js +1 -1
- package/dist/cdn/time-picker/snice-time-picker.js +1 -1
- package/dist/cdn/time-range-picker/snice-time-range-picker.js +1 -1
- package/dist/cdn/timeline/snice-timeline.js +1 -1
- package/dist/cdn/timer/snice-timer.js +1 -1
- package/dist/cdn/toast/snice-toast.js +1 -1
- package/dist/cdn/tooltip/snice-tooltip.js +1 -1
- package/dist/cdn/tree/snice-tree.js +1 -1
- package/dist/cdn/treemap/snice-treemap.js +1 -1
- package/dist/cdn/user-card/snice-user-card.js +1 -1
- package/dist/cdn/video-player/README.md +1 -1
- package/dist/cdn/video-player/snice-video-player.js +2 -1
- package/dist/cdn/video-player/snice-video-player.js.map +1 -1
- package/dist/cdn/video-player/snice-video-player.min.js +1 -0
- package/dist/cdn/video-player/snice-video-player.min.js.map +1 -1
- package/dist/cdn/virtual-scroller/snice-virtual-scroller.js +1 -1
- package/dist/cdn/waterfall/snice-waterfall.js +1 -1
- package/dist/cdn/weather/snice-weather.js +1 -1
- package/dist/cdn/work-order/snice-work-order.js +1 -1
- package/dist/components/recipe/snice-recipe.js +1 -1
- package/dist/components/recipe/snice-recipe.js.map +1 -1
- package/dist/components/table/snice-table.d.ts +1 -0
- package/dist/components/table/snice-table.js +18 -2
- package/dist/components/table/snice-table.js.map +1 -1
- package/dist/components/table/table-tree-data.js +1 -0
- package/dist/components/table/table-tree-data.js.map +1 -1
- package/dist/components/terminal/snice-terminal.js +1 -0
- package/dist/components/terminal/snice-terminal.js.map +1 -1
- package/dist/components/video-player/snice-video-player.js +1 -0
- package/dist/components/video-player/snice-video-player.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +1 -1
- package/dist/react/SniceProvider.js +1 -1
- package/dist/react/SniceRouter.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/matchRoute.js +1 -1
- package/dist/react/useRequestHandler.js +1 -1
- package/dist/symbols.cjs +1 -1
- package/dist/symbols.esm.js +1 -1
- package/dist/transitions.cjs +1 -1
- package/dist/transitions.esm.js +1 -1
- package/docs/ai/components/avatar.md +8 -8
- package/docs/ai/components/breadcrumbs.md +2 -1
- package/docs/ai/components/button.md +2 -7
- package/docs/ai/components/calendar.md +1 -1
- package/docs/ai/components/camera.md +1 -1
- package/docs/ai/components/chart.md +3 -1
- package/docs/ai/components/code-block.md +2 -2
- package/docs/ai/components/date-picker.md +5 -19
- package/docs/ai/components/date-range-picker.md +4 -12
- package/docs/ai/components/draw.md +5 -5
- package/docs/ai/components/drawer.md +4 -4
- package/docs/ai/components/form-layout.md +2 -0
- package/docs/ai/components/icons.md +7 -16
- package/docs/ai/components/key-value.md +3 -22
- package/docs/ai/components/layout.md +8 -12
- package/docs/ai/components/leaderboard.md +2 -2
- package/docs/ai/components/link-preview.md +4 -3
- package/docs/ai/components/login.md +11 -0
- package/docs/ai/components/markdown.md +7 -0
- package/docs/ai/components/masonry.md +6 -0
- package/docs/ai/components/menu.md +1 -1
- package/docs/ai/components/modal.md +7 -0
- package/docs/ai/components/notification-center.md +5 -4
- package/docs/ai/components/radio.md +7 -0
- package/docs/ai/components/rating.md +3 -3
- package/docs/ai/components/select.md +4 -13
- package/docs/ai/components/spotlight.md +2 -0
- package/docs/ai/components/table.md +1 -4
- package/docs/ai/components/tag-input.md +6 -0
- package/docs/ai/components/terminal.md +6 -0
- package/docs/ai/components/tooltip.md +10 -16
- package/docs/ai/components/tree.md +2 -2
- package/docs/ai/components/video-player.md +5 -0
- package/docs/ai/components/waterfall.md +7 -0
- package/docs/ai/events.md +29 -0
- package/docs/components/breadcrumbs.md +2 -1
- package/docs/components/calendar.md +1 -1
- package/docs/components/camera.md +1 -1
- package/docs/components/chart.md +1 -1
- package/docs/components/code-block.md +13 -4
- package/docs/components/color-picker.md +6 -5
- package/docs/components/date-time-picker.md +14 -0
- package/docs/components/diff.md +2 -1
- package/docs/components/draw.md +5 -5
- package/docs/components/drawer.md +4 -4
- package/docs/components/input.md +1 -0
- package/docs/components/layout.md +20 -22
- package/docs/components/leaderboard.md +10 -3
- package/docs/components/link-preview.md +11 -9
- package/docs/components/login.md +4 -0
- package/docs/components/menu.md +1 -1
- package/docs/components/modal.md +1 -0
- package/docs/components/nav.md +1 -0
- package/docs/components/network-graph.md +1 -0
- package/docs/components/notification-center.md +2 -1
- package/docs/components/product-card.md +1 -0
- package/docs/components/qr-reader.md +1 -0
- package/docs/components/rating.md +4 -4
- package/docs/components/select.md +1 -0
- package/docs/components/spotlight.md +2 -0
- package/docs/components/tabs.md +1 -0
- package/docs/components/terminal.md +3 -0
- package/docs/components/textarea.md +1 -1
- package/docs/components/time-picker.md +14 -0
- package/docs/components/tooltip.md +2 -0
- package/docs/components/tree.md +2 -2
- package/docs/events.md +73 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* snice v7.0.
|
|
2
|
+
* snice v7.0.3
|
|
3
3
|
* A decorator-driven web component library with differential rendering, routing, controllers, and 130+ ready-made UI components. Use as much or as little as you want. Zero dependencies, works anywhere.
|
|
4
4
|
* (c) 2024
|
|
5
5
|
* Released under the MIT License.
|
|
@@ -12366,6 +12366,7 @@ var SniceTable = (function (exports, snice) {
|
|
|
12366
12366
|
btn.className = `tree-toggle${treeRow.expanded ? ' tree-toggle--expanded' : ''}`;
|
|
12367
12367
|
btn.innerHTML = `<svg class="tree-toggle-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>`;
|
|
12368
12368
|
btn.setAttribute('aria-expanded', String(treeRow.expanded));
|
|
12369
|
+
btn.setAttribute('aria-label', `${treeRow.expanded ? 'Collapse' : 'Expand'} row`);
|
|
12369
12370
|
btn.addEventListener('click', (e) => {
|
|
12370
12371
|
e.stopPropagation();
|
|
12371
12372
|
this.toggle(treeRow.key);
|
|
@@ -13416,6 +13417,18 @@ var SniceTable = (function (exports, snice) {
|
|
|
13416
13417
|
document.addEventListener('fullscreenchange', this.fsExitHandler);
|
|
13417
13418
|
}
|
|
13418
13419
|
};
|
|
13420
|
+
this.handleKeydown = (e) => {
|
|
13421
|
+
if (e.key !== 'Enter' && e.key !== ' ')
|
|
13422
|
+
return;
|
|
13423
|
+
const th = e.target.closest('th.sortable');
|
|
13424
|
+
if (!th)
|
|
13425
|
+
return;
|
|
13426
|
+
const columnKey = th.getAttribute('data-key');
|
|
13427
|
+
if (!columnKey)
|
|
13428
|
+
return;
|
|
13429
|
+
e.preventDefault();
|
|
13430
|
+
this.toggleSort(columnKey, true);
|
|
13431
|
+
};
|
|
13419
13432
|
this.handleClick = (e) => {
|
|
13420
13433
|
const target = e.target;
|
|
13421
13434
|
// Handle sortable header click — every click adds/cycles in multi-sort.
|
|
@@ -14942,7 +14955,7 @@ var SniceTable = (function (exports, snice) {
|
|
|
14942
14955
|
if (hasSlottedRows) {
|
|
14943
14956
|
// Use slotted rows layout
|
|
14944
14957
|
return snice.html /*html*/ `
|
|
14945
|
-
<div class="snice-table snice-table--slotted" @click=${this.handleClick} @change=${this.handleChange} @checkbox-change=${this.handleChange}>
|
|
14958
|
+
<div class="snice-table snice-table--slotted" @click=${this.handleClick} @keydown=${this.handleKeydown} @change=${this.handleChange} @checkbox-change=${this.handleChange}>
|
|
14946
14959
|
<div class="table-controls-container"></div>
|
|
14947
14960
|
<div class="table-header" id="slotted-header"></div>
|
|
14948
14961
|
<div class="table-body">
|
|
@@ -14955,7 +14968,7 @@ var SniceTable = (function (exports, snice) {
|
|
|
14955
14968
|
else {
|
|
14956
14969
|
// Use traditional table layout
|
|
14957
14970
|
return snice.html /*html*/ `
|
|
14958
|
-
<div class="snice-table" @click=${this.handleClick} @change=${this.handleChange} @checkbox-change=${this.handleChange}>
|
|
14971
|
+
<div class="snice-table" @click=${this.handleClick} @keydown=${this.handleKeydown} @change=${this.handleChange} @checkbox-change=${this.handleChange}>
|
|
14959
14972
|
<div class="table-controls-container"></div>
|
|
14960
14973
|
<div class="table-frame">
|
|
14961
14974
|
<div class="table-superheader" part="superheader">
|
|
@@ -15571,6 +15584,10 @@ var SniceTable = (function (exports, snice) {
|
|
|
15571
15584
|
if (this.sortable && column.sortable !== false) {
|
|
15572
15585
|
th.classList.add('sortable');
|
|
15573
15586
|
th.setAttribute('role', 'button');
|
|
15587
|
+
// A role=button must be focusable and named, or the keyboard cannot
|
|
15588
|
+
// sort at all. Matches the declarative header in snice-header.ts.
|
|
15589
|
+
th.setAttribute('tabindex', '0');
|
|
15590
|
+
th.setAttribute('aria-label', `Sort by ${column.label}`);
|
|
15574
15591
|
th.innerHTML = this.renderSortableHeader(column);
|
|
15575
15592
|
}
|
|
15576
15593
|
else {
|