@ind-ds/core 0.1.0
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/README.md +41 -0
- package/dist/cjs/ind-alarm.cjs.entry.js +35 -0
- package/dist/cjs/ind-alarm.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-app-header.cjs.entry.js +42 -0
- package/dist/cjs/ind-app-header.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-button.cjs.entry.js +79 -0
- package/dist/cjs/ind-button.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-checkbox.cjs.entry.js +49 -0
- package/dist/cjs/ind-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-dialog.cjs.entry.js +101 -0
- package/dist/cjs/ind-dialog.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-divider.cjs.entry.js +21 -0
- package/dist/cjs/ind-divider.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-ds.cjs.js +27 -0
- package/dist/cjs/ind-ds.cjs.js.map +1 -0
- package/dist/cjs/ind-fill-row.cjs.entry.js +34 -0
- package/dist/cjs/ind-fill-row.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-health-card.cjs.entry.js +38 -0
- package/dist/cjs/ind-health-card.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-input.cjs.entry.js +57 -0
- package/dist/cjs/ind-input.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-led.cjs.entry.js +29 -0
- package/dist/cjs/ind-led.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-mqtt-monitor.cjs.entry.js +75 -0
- package/dist/cjs/ind-mqtt-monitor.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-nav-item.cjs.entry.js +48 -0
- package/dist/cjs/ind-nav-item.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-progress.cjs.entry.js +48 -0
- package/dist/cjs/ind-progress.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-scara-canvas.cjs.entry.js +57 -0
- package/dist/cjs/ind-scara-canvas.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-select.cjs.entry.js +55 -0
- package/dist/cjs/ind-select.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-shelf-canvas.cjs.entry.js +88 -0
- package/dist/cjs/ind-shelf-canvas.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-sidebar-nav.cjs.entry.js +20 -0
- package/dist/cjs/ind-sidebar-nav.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-status-bar.cjs.entry.js +22 -0
- package/dist/cjs/ind-status-bar.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-status-dot.cjs.entry.js +31 -0
- package/dist/cjs/ind-status-dot.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-textarea.cjs.entry.js +66 -0
- package/dist/cjs/ind-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-toolbar-action.cjs.entry.js +23 -0
- package/dist/cjs/ind-toolbar-action.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-value.cjs.entry.js +47 -0
- package/dist/cjs/ind-value.cjs.entry.js.map +1 -0
- package/dist/cjs/ind-valve.cjs.entry.js +31 -0
- package/dist/cjs/ind-valve.cjs.entry.js.map +1 -0
- package/dist/cjs/index-ph7ZTjuY.js +1638 -0
- package/dist/cjs/index-ph7ZTjuY.js.map +1 -0
- package/dist/cjs/index.cjs.js +5 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/collection/collection-manifest.json +35 -0
- package/dist/collection/components/atoms/alarm/alarm.css +87 -0
- package/dist/collection/components/atoms/alarm/alarm.js +122 -0
- package/dist/collection/components/atoms/alarm/alarm.js.map +1 -0
- package/dist/collection/components/atoms/button/button.css +110 -0
- package/dist/collection/components/atoms/button/button.js +215 -0
- package/dist/collection/components/atoms/button/button.js.map +1 -0
- package/dist/collection/components/atoms/checkbox/checkbox.css +92 -0
- package/dist/collection/components/atoms/checkbox/checkbox.js +214 -0
- package/dist/collection/components/atoms/checkbox/checkbox.js.map +1 -0
- package/dist/collection/components/atoms/dialog/dialog.css +85 -0
- package/dist/collection/components/atoms/dialog/dialog.js +265 -0
- package/dist/collection/components/atoms/dialog/dialog.js.map +1 -0
- package/dist/collection/components/atoms/divider/divider.css +16 -0
- package/dist/collection/components/atoms/divider/divider.js +50 -0
- package/dist/collection/components/atoms/divider/divider.js.map +1 -0
- package/dist/collection/components/atoms/input/input.css +92 -0
- package/dist/collection/components/atoms/input/input.js +427 -0
- package/dist/collection/components/atoms/input/input.js.map +1 -0
- package/dist/collection/components/atoms/led/led.css +91 -0
- package/dist/collection/components/atoms/led/led.js +123 -0
- package/dist/collection/components/atoms/led/led.js.map +1 -0
- package/dist/collection/components/atoms/progress/progress.css +69 -0
- package/dist/collection/components/atoms/progress/progress.js +221 -0
- package/dist/collection/components/atoms/progress/progress.js.map +1 -0
- package/dist/collection/components/atoms/scara-canvas/scara-canvas.css +100 -0
- package/dist/collection/components/atoms/scara-canvas/scara-canvas.js +138 -0
- package/dist/collection/components/atoms/scara-canvas/scara-canvas.js.map +1 -0
- package/dist/collection/components/atoms/select/select.css +88 -0
- package/dist/collection/components/atoms/select/select.js +244 -0
- package/dist/collection/components/atoms/select/select.js.map +1 -0
- package/dist/collection/components/atoms/shelf-canvas/shelf-canvas.css +67 -0
- package/dist/collection/components/atoms/shelf-canvas/shelf-canvas.js +184 -0
- package/dist/collection/components/atoms/shelf-canvas/shelf-canvas.js.map +1 -0
- package/dist/collection/components/atoms/status-dot/status-dot.css +69 -0
- package/dist/collection/components/atoms/status-dot/status-dot.js +125 -0
- package/dist/collection/components/atoms/status-dot/status-dot.js.map +1 -0
- package/dist/collection/components/atoms/textarea/textarea.css +74 -0
- package/dist/collection/components/atoms/textarea/textarea.js +331 -0
- package/dist/collection/components/atoms/textarea/textarea.js.map +1 -0
- package/dist/collection/components/atoms/value/value.css +115 -0
- package/dist/collection/components/atoms/value/value.js +223 -0
- package/dist/collection/components/atoms/value/value.js.map +1 -0
- package/dist/collection/components/atoms/valve/valve.css +101 -0
- package/dist/collection/components/atoms/valve/valve.js +150 -0
- package/dist/collection/components/atoms/valve/valve.js.map +1 -0
- package/dist/collection/components/molecules/fill-row/fill-row.css +70 -0
- package/dist/collection/components/molecules/fill-row/fill-row.js +181 -0
- package/dist/collection/components/molecules/fill-row/fill-row.js.map +1 -0
- package/dist/collection/components/molecules/health-card/health-card.css +53 -0
- package/dist/collection/components/molecules/health-card/health-card.js +124 -0
- package/dist/collection/components/molecules/health-card/health-card.js.map +1 -0
- package/dist/collection/components/molecules/nav-item/nav-item.css +82 -0
- package/dist/collection/components/molecules/nav-item/nav-item.js +165 -0
- package/dist/collection/components/molecules/nav-item/nav-item.js.map +1 -0
- package/dist/collection/components/molecules/toolbar-action/toolbar-action.css +36 -0
- package/dist/collection/components/molecules/toolbar-action/toolbar-action.js +45 -0
- package/dist/collection/components/molecules/toolbar-action/toolbar-action.js.map +1 -0
- package/dist/collection/components/organisms/app-header/app-header.css +127 -0
- package/dist/collection/components/organisms/app-header/app-header.js +256 -0
- package/dist/collection/components/organisms/app-header/app-header.js.map +1 -0
- package/dist/collection/components/organisms/mqtt-monitor/mqtt-monitor.css +96 -0
- package/dist/collection/components/organisms/mqtt-monitor/mqtt-monitor.js +205 -0
- package/dist/collection/components/organisms/mqtt-monitor/mqtt-monitor.js.map +1 -0
- package/dist/collection/components/organisms/sidebar-nav/sidebar-nav.css +39 -0
- package/dist/collection/components/organisms/sidebar-nav/sidebar-nav.js +26 -0
- package/dist/collection/components/organisms/sidebar-nav/sidebar-nav.js.map +1 -0
- package/dist/collection/components/organisms/status-bar/status-bar.css +34 -0
- package/dist/collection/components/organisms/status-bar/status-bar.js +76 -0
- package/dist/collection/components/organisms/status-bar/status-bar.js.map +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/components/ind-alarm.d.ts +11 -0
- package/dist/components/ind-alarm.js +2 -0
- package/dist/components/ind-alarm.js.map +1 -0
- package/dist/components/ind-app-header.d.ts +11 -0
- package/dist/components/ind-app-header.js +2 -0
- package/dist/components/ind-app-header.js.map +1 -0
- package/dist/components/ind-button.d.ts +11 -0
- package/dist/components/ind-button.js +2 -0
- package/dist/components/ind-button.js.map +1 -0
- package/dist/components/ind-checkbox.d.ts +11 -0
- package/dist/components/ind-checkbox.js +2 -0
- package/dist/components/ind-checkbox.js.map +1 -0
- package/dist/components/ind-dialog.d.ts +11 -0
- package/dist/components/ind-dialog.js +2 -0
- package/dist/components/ind-dialog.js.map +1 -0
- package/dist/components/ind-divider.d.ts +11 -0
- package/dist/components/ind-divider.js +2 -0
- package/dist/components/ind-divider.js.map +1 -0
- package/dist/components/ind-fill-row.d.ts +11 -0
- package/dist/components/ind-fill-row.js +2 -0
- package/dist/components/ind-fill-row.js.map +1 -0
- package/dist/components/ind-health-card.d.ts +11 -0
- package/dist/components/ind-health-card.js +2 -0
- package/dist/components/ind-health-card.js.map +1 -0
- package/dist/components/ind-input.d.ts +11 -0
- package/dist/components/ind-input.js +2 -0
- package/dist/components/ind-input.js.map +1 -0
- package/dist/components/ind-led.d.ts +11 -0
- package/dist/components/ind-led.js +2 -0
- package/dist/components/ind-led.js.map +1 -0
- package/dist/components/ind-mqtt-monitor.d.ts +11 -0
- package/dist/components/ind-mqtt-monitor.js +2 -0
- package/dist/components/ind-mqtt-monitor.js.map +1 -0
- package/dist/components/ind-nav-item.d.ts +11 -0
- package/dist/components/ind-nav-item.js +2 -0
- package/dist/components/ind-nav-item.js.map +1 -0
- package/dist/components/ind-progress.d.ts +11 -0
- package/dist/components/ind-progress.js +2 -0
- package/dist/components/ind-progress.js.map +1 -0
- package/dist/components/ind-scara-canvas.d.ts +11 -0
- package/dist/components/ind-scara-canvas.js +2 -0
- package/dist/components/ind-scara-canvas.js.map +1 -0
- package/dist/components/ind-select.d.ts +11 -0
- package/dist/components/ind-select.js +2 -0
- package/dist/components/ind-select.js.map +1 -0
- package/dist/components/ind-shelf-canvas.d.ts +11 -0
- package/dist/components/ind-shelf-canvas.js +2 -0
- package/dist/components/ind-shelf-canvas.js.map +1 -0
- package/dist/components/ind-sidebar-nav.d.ts +11 -0
- package/dist/components/ind-sidebar-nav.js +2 -0
- package/dist/components/ind-sidebar-nav.js.map +1 -0
- package/dist/components/ind-status-bar.d.ts +11 -0
- package/dist/components/ind-status-bar.js +2 -0
- package/dist/components/ind-status-bar.js.map +1 -0
- package/dist/components/ind-status-dot.d.ts +11 -0
- package/dist/components/ind-status-dot.js +2 -0
- package/dist/components/ind-status-dot.js.map +1 -0
- package/dist/components/ind-textarea.d.ts +11 -0
- package/dist/components/ind-textarea.js +2 -0
- package/dist/components/ind-textarea.js.map +1 -0
- package/dist/components/ind-toolbar-action.d.ts +11 -0
- package/dist/components/ind-toolbar-action.js +2 -0
- package/dist/components/ind-toolbar-action.js.map +1 -0
- package/dist/components/ind-value.d.ts +11 -0
- package/dist/components/ind-value.js +2 -0
- package/dist/components/ind-value.js.map +1 -0
- package/dist/components/ind-valve.d.ts +11 -0
- package/dist/components/ind-valve.js +2 -0
- package/dist/components/ind-valve.js.map +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +2 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/p-D-FsSjAC.js +2 -0
- package/dist/components/p-D-FsSjAC.js.map +1 -0
- package/dist/components/p-acsAzrRn.js +2 -0
- package/dist/components/p-acsAzrRn.js.map +1 -0
- package/dist/docs.d.ts +480 -0
- package/dist/docs.json +5360 -0
- package/dist/esm/ind-alarm.entry.js +33 -0
- package/dist/esm/ind-alarm.entry.js.map +1 -0
- package/dist/esm/ind-app-header.entry.js +40 -0
- package/dist/esm/ind-app-header.entry.js.map +1 -0
- package/dist/esm/ind-button.entry.js +77 -0
- package/dist/esm/ind-button.entry.js.map +1 -0
- package/dist/esm/ind-checkbox.entry.js +47 -0
- package/dist/esm/ind-checkbox.entry.js.map +1 -0
- package/dist/esm/ind-dialog.entry.js +99 -0
- package/dist/esm/ind-dialog.entry.js.map +1 -0
- package/dist/esm/ind-divider.entry.js +19 -0
- package/dist/esm/ind-divider.entry.js.map +1 -0
- package/dist/esm/ind-ds.js +23 -0
- package/dist/esm/ind-ds.js.map +1 -0
- package/dist/esm/ind-fill-row.entry.js +32 -0
- package/dist/esm/ind-fill-row.entry.js.map +1 -0
- package/dist/esm/ind-health-card.entry.js +36 -0
- package/dist/esm/ind-health-card.entry.js.map +1 -0
- package/dist/esm/ind-input.entry.js +55 -0
- package/dist/esm/ind-input.entry.js.map +1 -0
- package/dist/esm/ind-led.entry.js +27 -0
- package/dist/esm/ind-led.entry.js.map +1 -0
- package/dist/esm/ind-mqtt-monitor.entry.js +73 -0
- package/dist/esm/ind-mqtt-monitor.entry.js.map +1 -0
- package/dist/esm/ind-nav-item.entry.js +46 -0
- package/dist/esm/ind-nav-item.entry.js.map +1 -0
- package/dist/esm/ind-progress.entry.js +46 -0
- package/dist/esm/ind-progress.entry.js.map +1 -0
- package/dist/esm/ind-scara-canvas.entry.js +55 -0
- package/dist/esm/ind-scara-canvas.entry.js.map +1 -0
- package/dist/esm/ind-select.entry.js +53 -0
- package/dist/esm/ind-select.entry.js.map +1 -0
- package/dist/esm/ind-shelf-canvas.entry.js +86 -0
- package/dist/esm/ind-shelf-canvas.entry.js.map +1 -0
- package/dist/esm/ind-sidebar-nav.entry.js +18 -0
- package/dist/esm/ind-sidebar-nav.entry.js.map +1 -0
- package/dist/esm/ind-status-bar.entry.js +20 -0
- package/dist/esm/ind-status-bar.entry.js.map +1 -0
- package/dist/esm/ind-status-dot.entry.js +29 -0
- package/dist/esm/ind-status-dot.entry.js.map +1 -0
- package/dist/esm/ind-textarea.entry.js +64 -0
- package/dist/esm/ind-textarea.entry.js.map +1 -0
- package/dist/esm/ind-toolbar-action.entry.js +21 -0
- package/dist/esm/ind-toolbar-action.entry.js.map +1 -0
- package/dist/esm/ind-value.entry.js +45 -0
- package/dist/esm/ind-value.entry.js.map +1 -0
- package/dist/esm/ind-valve.entry.js +29 -0
- package/dist/esm/ind-valve.entry.js.map +1 -0
- package/dist/esm/index-D2yNiL0d.js +1628 -0
- package/dist/esm/index-D2yNiL0d.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/ind-ds/ind-ds.css +1 -0
- package/dist/ind-ds/ind-ds.esm.js +2 -0
- package/dist/ind-ds/ind-ds.esm.js.map +1 -0
- package/dist/ind-ds/index.esm.js +2 -0
- package/dist/ind-ds/index.esm.js.map +1 -0
- package/dist/ind-ds/p-0840007d.entry.js +2 -0
- package/dist/ind-ds/p-0840007d.entry.js.map +1 -0
- package/dist/ind-ds/p-1727b403.entry.js +2 -0
- package/dist/ind-ds/p-1727b403.entry.js.map +1 -0
- package/dist/ind-ds/p-1d871f3f.entry.js +2 -0
- package/dist/ind-ds/p-1d871f3f.entry.js.map +1 -0
- package/dist/ind-ds/p-296b0c55.entry.js +2 -0
- package/dist/ind-ds/p-296b0c55.entry.js.map +1 -0
- package/dist/ind-ds/p-459405b6.entry.js +2 -0
- package/dist/ind-ds/p-459405b6.entry.js.map +1 -0
- package/dist/ind-ds/p-4a4811ab.entry.js +2 -0
- package/dist/ind-ds/p-4a4811ab.entry.js.map +1 -0
- package/dist/ind-ds/p-52b18003.entry.js +2 -0
- package/dist/ind-ds/p-52b18003.entry.js.map +1 -0
- package/dist/ind-ds/p-5369d63a.entry.js +2 -0
- package/dist/ind-ds/p-5369d63a.entry.js.map +1 -0
- package/dist/ind-ds/p-595ccdce.entry.js +2 -0
- package/dist/ind-ds/p-595ccdce.entry.js.map +1 -0
- package/dist/ind-ds/p-6c5c8053.entry.js +2 -0
- package/dist/ind-ds/p-6c5c8053.entry.js.map +1 -0
- package/dist/ind-ds/p-6c8f4bbd.entry.js +2 -0
- package/dist/ind-ds/p-6c8f4bbd.entry.js.map +1 -0
- package/dist/ind-ds/p-781e21df.entry.js +2 -0
- package/dist/ind-ds/p-781e21df.entry.js.map +1 -0
- package/dist/ind-ds/p-8817625a.entry.js +2 -0
- package/dist/ind-ds/p-8817625a.entry.js.map +1 -0
- package/dist/ind-ds/p-99f55d2a.entry.js +2 -0
- package/dist/ind-ds/p-99f55d2a.entry.js.map +1 -0
- package/dist/ind-ds/p-9b93fb09.entry.js +2 -0
- package/dist/ind-ds/p-9b93fb09.entry.js.map +1 -0
- package/dist/ind-ds/p-D2yNiL0d.js +3 -0
- package/dist/ind-ds/p-D2yNiL0d.js.map +1 -0
- package/dist/ind-ds/p-c8de42e9.entry.js +2 -0
- package/dist/ind-ds/p-c8de42e9.entry.js.map +1 -0
- package/dist/ind-ds/p-c9f752e6.entry.js +2 -0
- package/dist/ind-ds/p-c9f752e6.entry.js.map +1 -0
- package/dist/ind-ds/p-cee8bf2b.entry.js +2 -0
- package/dist/ind-ds/p-cee8bf2b.entry.js.map +1 -0
- package/dist/ind-ds/p-cf07b580.entry.js +2 -0
- package/dist/ind-ds/p-cf07b580.entry.js.map +1 -0
- package/dist/ind-ds/p-d1edc052.entry.js +2 -0
- package/dist/ind-ds/p-d1edc052.entry.js.map +1 -0
- package/dist/ind-ds/p-ea24a59d.entry.js +2 -0
- package/dist/ind-ds/p-ea24a59d.entry.js.map +1 -0
- package/dist/ind-ds/p-ec0b3785.entry.js +2 -0
- package/dist/ind-ds/p-ec0b3785.entry.js.map +1 -0
- package/dist/ind-ds/p-ee453874.entry.js +2 -0
- package/dist/ind-ds/p-ee453874.entry.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/atoms/alarm/alarm.d.ts +13 -0
- package/dist/types/components/atoms/button/button.d.ts +31 -0
- package/dist/types/components/atoms/checkbox/checkbox.d.ts +18 -0
- package/dist/types/components/atoms/dialog/dialog.d.ts +29 -0
- package/dist/types/components/atoms/divider/divider.d.ts +6 -0
- package/dist/types/components/atoms/input/input.d.ts +34 -0
- package/dist/types/components/atoms/led/led.d.ts +14 -0
- package/dist/types/components/atoms/progress/progress.d.ts +24 -0
- package/dist/types/components/atoms/scara-canvas/scara-canvas.d.ts +21 -0
- package/dist/types/components/atoms/select/select.d.ts +27 -0
- package/dist/types/components/atoms/shelf-canvas/shelf-canvas.d.ts +29 -0
- package/dist/types/components/atoms/status-dot/status-dot.d.ts +14 -0
- package/dist/types/components/atoms/textarea/textarea.d.ts +28 -0
- package/dist/types/components/atoms/value/value.d.ts +24 -0
- package/dist/types/components/atoms/valve/valve.d.ts +17 -0
- package/dist/types/components/molecules/fill-row/fill-row.d.ts +19 -0
- package/dist/types/components/molecules/health-card/health-card.d.ts +13 -0
- package/dist/types/components/molecules/nav-item/nav-item.d.ts +17 -0
- package/dist/types/components/molecules/toolbar-action/toolbar-action.d.ts +6 -0
- package/dist/types/components/organisms/app-header/app-header.d.ts +26 -0
- package/dist/types/components/organisms/mqtt-monitor/mqtt-monitor.d.ts +23 -0
- package/dist/types/components/organisms/sidebar-nav/sidebar-nav.d.ts +11 -0
- package/dist/types/components/organisms/status-bar/status-bar.d.ts +13 -0
- package/dist/types/components.d.ts +1775 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +87 -0
- package/utilities.css +324 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
font-family: var(--ind-font-family-sans);
|
|
4
|
+
font-size: var(--ind-font-size-base, 12px);
|
|
5
|
+
color: var(--ind-surface-text-primary, light-dark(#11161c, #eef1f5));
|
|
6
|
+
--_size: 16px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host([size="sm"]) { --_size: 12px; }
|
|
10
|
+
:host([size="md"]) { --_size: 16px; }
|
|
11
|
+
:host([size="lg"]) { --_size: 20px; }
|
|
12
|
+
|
|
13
|
+
.wrap {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: var(--ind-spacing-3, 6px);
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
user-select: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.box {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: inline-block;
|
|
24
|
+
width: var(--_size);
|
|
25
|
+
height: var(--_size);
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.native {
|
|
30
|
+
position: absolute;
|
|
31
|
+
inset: 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
opacity: 0;
|
|
34
|
+
cursor: inherit;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mark {
|
|
38
|
+
position: relative;
|
|
39
|
+
display: block;
|
|
40
|
+
width: 100%;
|
|
41
|
+
height: 100%;
|
|
42
|
+
background: var(--ind-surface-sunken, light-dark(#ffffff, #000000));
|
|
43
|
+
border: 1px solid var(--ind-surface-border-default, #2a3340);
|
|
44
|
+
border-radius: var(--ind-radius-sm, 2px);
|
|
45
|
+
transition:
|
|
46
|
+
background var(--ind-motion-duration-fast, 120ms),
|
|
47
|
+
border-color var(--ind-motion-duration-fast, 120ms);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.mark::after {
|
|
51
|
+
content: "";
|
|
52
|
+
position: absolute;
|
|
53
|
+
inset: 0;
|
|
54
|
+
display: block;
|
|
55
|
+
background-position: center;
|
|
56
|
+
background-repeat: no-repeat;
|
|
57
|
+
background-size: 70%;
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transition: opacity var(--ind-motion-duration-fast, 120ms);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host([checked]) .mark,
|
|
63
|
+
:host([indeterminate]) .mark {
|
|
64
|
+
background: var(--ind-button-primary-bg, #2563eb);
|
|
65
|
+
border-color: var(--ind-button-primary-border, #60a5fa);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:host([checked]) .mark::after {
|
|
69
|
+
opacity: 1;
|
|
70
|
+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.5 3.5L13 5'/></svg>");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
:host([indeterminate]) .mark::after {
|
|
74
|
+
opacity: 1;
|
|
75
|
+
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' d='M3 8h10'/></svg>");
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.native:focus-visible + .mark {
|
|
79
|
+
outline: 2px solid var(--ind-surface-focus-ring, #22d3ee);
|
|
80
|
+
outline-offset: 2px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:host([disabled]) {
|
|
84
|
+
opacity: 0.5;
|
|
85
|
+
}
|
|
86
|
+
:host([disabled]) .wrap {
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.label {
|
|
91
|
+
line-height: 1.2;
|
|
92
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
export class IndCheckbox {
|
|
3
|
+
host;
|
|
4
|
+
checked = false;
|
|
5
|
+
indeterminate = false;
|
|
6
|
+
disabled = false;
|
|
7
|
+
size = 'md';
|
|
8
|
+
label;
|
|
9
|
+
name;
|
|
10
|
+
value;
|
|
11
|
+
indChange;
|
|
12
|
+
componentDidLoad() {
|
|
13
|
+
this.syncIndeterminate();
|
|
14
|
+
}
|
|
15
|
+
syncIndeterminate() {
|
|
16
|
+
const input = this.host.shadowRoot?.querySelector('input');
|
|
17
|
+
if (input)
|
|
18
|
+
input.indeterminate = this.indeterminate;
|
|
19
|
+
}
|
|
20
|
+
onChange = (e) => {
|
|
21
|
+
const next = e.target.checked;
|
|
22
|
+
this.checked = next;
|
|
23
|
+
this.indChange.emit(next);
|
|
24
|
+
};
|
|
25
|
+
render() {
|
|
26
|
+
const ariaChecked = this.indeterminate ? 'mixed' : this.checked ? 'true' : 'false';
|
|
27
|
+
return (h(Host, { key: 'd4b48a80703ea584c4db306d26fcaebd990f9d87' }, h("label", { key: 'd101498325e34b2d4ce87189aaf82930f81fd831', class: "wrap", part: "wrap" }, h("span", { key: '8363b37e0c6a9a082dbab4e0bb26b09506cb4b00', class: "box", part: "box" }, h("input", { key: '2c2a0d2e10c70a97aa2c983941f14bd3c6bc30dd', type: "checkbox", class: "native", part: "native", checked: this.checked, disabled: this.disabled, name: this.name, value: this.value, "aria-checked": ariaChecked, onChange: this.onChange }), h("span", { key: '41f5ba40d9c2e27e899366e9de111d3aa4a3817c', class: "mark", part: "mark", "aria-hidden": "true" })), this.label && h("span", { key: 'c9955a662691ac94a2be379edc332f550f09b53e', class: "label", part: "label" }, this.label))));
|
|
28
|
+
}
|
|
29
|
+
static get is() { return "ind-checkbox"; }
|
|
30
|
+
static get encapsulation() { return "shadow"; }
|
|
31
|
+
static get originalStyleUrls() {
|
|
32
|
+
return {
|
|
33
|
+
"$": ["checkbox.css"]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
static get styleUrls() {
|
|
37
|
+
return {
|
|
38
|
+
"$": ["checkbox.css"]
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
static get properties() {
|
|
42
|
+
return {
|
|
43
|
+
"checked": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"mutable": true,
|
|
46
|
+
"complexType": {
|
|
47
|
+
"original": "boolean",
|
|
48
|
+
"resolved": "boolean",
|
|
49
|
+
"references": {}
|
|
50
|
+
},
|
|
51
|
+
"required": false,
|
|
52
|
+
"optional": false,
|
|
53
|
+
"docs": {
|
|
54
|
+
"tags": [],
|
|
55
|
+
"text": ""
|
|
56
|
+
},
|
|
57
|
+
"getter": false,
|
|
58
|
+
"setter": false,
|
|
59
|
+
"reflect": true,
|
|
60
|
+
"attribute": "checked",
|
|
61
|
+
"defaultValue": "false"
|
|
62
|
+
},
|
|
63
|
+
"indeterminate": {
|
|
64
|
+
"type": "boolean",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "boolean",
|
|
68
|
+
"resolved": "boolean",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": false,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": ""
|
|
76
|
+
},
|
|
77
|
+
"getter": false,
|
|
78
|
+
"setter": false,
|
|
79
|
+
"reflect": true,
|
|
80
|
+
"attribute": "indeterminate",
|
|
81
|
+
"defaultValue": "false"
|
|
82
|
+
},
|
|
83
|
+
"disabled": {
|
|
84
|
+
"type": "boolean",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "boolean",
|
|
88
|
+
"resolved": "boolean",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": ""
|
|
96
|
+
},
|
|
97
|
+
"getter": false,
|
|
98
|
+
"setter": false,
|
|
99
|
+
"reflect": true,
|
|
100
|
+
"attribute": "disabled",
|
|
101
|
+
"defaultValue": "false"
|
|
102
|
+
},
|
|
103
|
+
"size": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"mutable": false,
|
|
106
|
+
"complexType": {
|
|
107
|
+
"original": "CheckboxSize",
|
|
108
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
109
|
+
"references": {
|
|
110
|
+
"CheckboxSize": {
|
|
111
|
+
"location": "local",
|
|
112
|
+
"path": "C:/www/ind-ds/packages/core/src/components/atoms/checkbox/checkbox.tsx",
|
|
113
|
+
"id": "src/components/atoms/checkbox/checkbox.tsx::CheckboxSize"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": ""
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"reflect": true,
|
|
126
|
+
"attribute": "size",
|
|
127
|
+
"defaultValue": "'md'"
|
|
128
|
+
},
|
|
129
|
+
"label": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"mutable": false,
|
|
132
|
+
"complexType": {
|
|
133
|
+
"original": "string",
|
|
134
|
+
"resolved": "string | undefined",
|
|
135
|
+
"references": {}
|
|
136
|
+
},
|
|
137
|
+
"required": false,
|
|
138
|
+
"optional": true,
|
|
139
|
+
"docs": {
|
|
140
|
+
"tags": [],
|
|
141
|
+
"text": ""
|
|
142
|
+
},
|
|
143
|
+
"getter": false,
|
|
144
|
+
"setter": false,
|
|
145
|
+
"reflect": false,
|
|
146
|
+
"attribute": "label"
|
|
147
|
+
},
|
|
148
|
+
"name": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"mutable": false,
|
|
151
|
+
"complexType": {
|
|
152
|
+
"original": "string",
|
|
153
|
+
"resolved": "string | undefined",
|
|
154
|
+
"references": {}
|
|
155
|
+
},
|
|
156
|
+
"required": false,
|
|
157
|
+
"optional": true,
|
|
158
|
+
"docs": {
|
|
159
|
+
"tags": [],
|
|
160
|
+
"text": ""
|
|
161
|
+
},
|
|
162
|
+
"getter": false,
|
|
163
|
+
"setter": false,
|
|
164
|
+
"reflect": false,
|
|
165
|
+
"attribute": "name"
|
|
166
|
+
},
|
|
167
|
+
"value": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"mutable": false,
|
|
170
|
+
"complexType": {
|
|
171
|
+
"original": "string",
|
|
172
|
+
"resolved": "string | undefined",
|
|
173
|
+
"references": {}
|
|
174
|
+
},
|
|
175
|
+
"required": false,
|
|
176
|
+
"optional": true,
|
|
177
|
+
"docs": {
|
|
178
|
+
"tags": [],
|
|
179
|
+
"text": ""
|
|
180
|
+
},
|
|
181
|
+
"getter": false,
|
|
182
|
+
"setter": false,
|
|
183
|
+
"reflect": false,
|
|
184
|
+
"attribute": "value"
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
static get events() {
|
|
189
|
+
return [{
|
|
190
|
+
"method": "indChange",
|
|
191
|
+
"name": "indChange",
|
|
192
|
+
"bubbles": true,
|
|
193
|
+
"cancelable": true,
|
|
194
|
+
"composed": true,
|
|
195
|
+
"docs": {
|
|
196
|
+
"tags": [],
|
|
197
|
+
"text": ""
|
|
198
|
+
},
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "boolean",
|
|
201
|
+
"resolved": "boolean",
|
|
202
|
+
"references": {}
|
|
203
|
+
}
|
|
204
|
+
}];
|
|
205
|
+
}
|
|
206
|
+
static get elementRef() { return "host"; }
|
|
207
|
+
static get watchers() {
|
|
208
|
+
return [{
|
|
209
|
+
"propName": "indeterminate",
|
|
210
|
+
"methodName": "syncIndeterminate"
|
|
211
|
+
}];
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/components/atoms/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,KAAK,EAEL,OAAO,EACP,KAAK,EACL,CAAC,EACD,IAAI,GACL,MAAM,eAAe,CAAC;AASvB,MAAM,OAAO,WAAW;IACX,IAAI,CAAe;IAEU,OAAO,GAAY,KAAK,CAAC;IACxC,aAAa,GAAY,KAAK,CAAC;IAC/B,QAAQ,GAAY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AI,EAAC,MAAM,iBAAa,MAAM,GAAG,CAC/C;gBACN,IAAI,CAAC,KAAK,IAAI,6DAAM,KAAK,EAAC,OAAO,EAAC,IAAI,EAAC,OAAO,IAAE,IAAI,CAAC,KAAK,CAAQ,CAC7D,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n Event,\n EventEmitter,\n Element,\n Watch,\n h,\n Host,\n} from '@stencil/core';\n\nexport type CheckboxSize = 'sm' | 'md' | 'lg';\n\n@Component({\n tag: 'ind-checkbox',\n styleUrl: 'checkbox.css',\n shadow: true,\n})\nexport class IndCheckbox {\n @Element() host!: HTMLElement;\n\n @Prop({ mutable: true, reflect: true }) checked: boolean = false;\n @Prop({ reflect: true }) indeterminate: boolean = false;\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) size: CheckboxSize = 'md';\n @Prop() label?: string;\n @Prop() name?: string;\n @Prop() value?: string;\n\n @Event() indChange!: EventEmitter<boolean>;\n\n componentDidLoad() {\n this.syncIndeterminate();\n }\n\n @Watch('indeterminate')\n syncIndeterminate() {\n const input = this.host.shadowRoot?.querySelector('input');\n if (input) input.indeterminate = this.indeterminate;\n }\n\n private onChange = (e: Event) => {\n const next = (e.target as HTMLInputElement).checked;\n this.checked = next;\n this.indChange.emit(next);\n };\n\n render() {\n const ariaChecked = this.indeterminate ? 'mixed' : this.checked ? 'true' : 'false';\n return (\n <Host>\n <label class=\"wrap\" part=\"wrap\">\n <span class=\"box\" part=\"box\">\n <input\n type=\"checkbox\"\n class=\"native\"\n part=\"native\"\n checked={this.checked}\n disabled={this.disabled}\n name={this.name}\n value={this.value}\n aria-checked={ariaChecked}\n onChange={this.onChange}\n />\n <span class=\"mark\" part=\"mark\" aria-hidden=\"true\" />\n </span>\n {this.label && <span class=\"label\" part=\"label\">{this.label}</span>}\n </label>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: contents;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dialog {
|
|
6
|
+
padding: 0;
|
|
7
|
+
border: none;
|
|
8
|
+
background: transparent;
|
|
9
|
+
color: inherit;
|
|
10
|
+
max-width: 90vw;
|
|
11
|
+
max-height: 90vh;
|
|
12
|
+
overflow: visible;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dialog::backdrop {
|
|
16
|
+
background: rgba(0, 0, 0, 0.55);
|
|
17
|
+
backdrop-filter: blur(2px);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.content {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
background: var(--ind-surface-raised, light-dark(#ffffff, #1a2129));
|
|
24
|
+
border: 1px solid var(--ind-surface-border-default, #2a3340);
|
|
25
|
+
border-radius: var(--ind-radius-md, 3px);
|
|
26
|
+
color: var(--ind-surface-text-primary, light-dark(#11161c, #eef1f5));
|
|
27
|
+
font-family: var(--ind-font-family-sans);
|
|
28
|
+
font-size: var(--ind-font-size-base, 12px);
|
|
29
|
+
max-height: 90vh;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host([size="sm"]) .content { width: 320px; }
|
|
34
|
+
:host([size="md"]) .content { width: 480px; }
|
|
35
|
+
:host([size="lg"]) .content { width: 720px; }
|
|
36
|
+
|
|
37
|
+
.header {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
gap: var(--ind-spacing-4, 8px);
|
|
42
|
+
padding: var(--ind-spacing-5, 12px) var(--ind-spacing-6, 16px);
|
|
43
|
+
border-bottom: 1px solid var(--ind-surface-border-subtle);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.heading {
|
|
47
|
+
font-size: var(--ind-font-size-lg, 14px);
|
|
48
|
+
font-weight: var(--ind-font-weight-semibold, 600);
|
|
49
|
+
margin: 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.close {
|
|
53
|
+
background: transparent;
|
|
54
|
+
border: none;
|
|
55
|
+
color: inherit;
|
|
56
|
+
font-size: 20px;
|
|
57
|
+
line-height: 1;
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
padding: 2px 8px;
|
|
60
|
+
border-radius: var(--ind-radius-sm, 2px);
|
|
61
|
+
}
|
|
62
|
+
.close:hover { background: var(--ind-surface-panel); }
|
|
63
|
+
.close:focus-visible {
|
|
64
|
+
outline: 2px solid var(--ind-surface-focus-ring, #22d3ee);
|
|
65
|
+
outline-offset: 2px;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.body {
|
|
69
|
+
flex: 1;
|
|
70
|
+
overflow: auto;
|
|
71
|
+
padding: var(--ind-spacing-6, 16px);
|
|
72
|
+
line-height: var(--ind-font-line-height-normal, 1.4);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.footer {
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: flex-end;
|
|
78
|
+
gap: var(--ind-spacing-3, 6px);
|
|
79
|
+
padding: var(--ind-spacing-4, 8px) var(--ind-spacing-6, 16px);
|
|
80
|
+
border-top: 1px solid var(--ind-surface-border-subtle);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.footer.is-empty {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { h, Host, } from "@stencil/core";
|
|
2
|
+
export class IndDialog {
|
|
3
|
+
host;
|
|
4
|
+
/** Open state. Two-way reflectable. */
|
|
5
|
+
open = false;
|
|
6
|
+
/** Heading rendered in the header bar. Becomes the accessible name. */
|
|
7
|
+
heading;
|
|
8
|
+
/** Size of the dialog content. */
|
|
9
|
+
size = 'md';
|
|
10
|
+
/** Close when the operator clicks outside the dialog content. */
|
|
11
|
+
closeOnBackdrop = true;
|
|
12
|
+
hasFooter = false;
|
|
13
|
+
indOpen;
|
|
14
|
+
/** Fires when the dialog closes — for any reason (ESC, backdrop, close button, .close()). */
|
|
15
|
+
indClose;
|
|
16
|
+
componentDidLoad() {
|
|
17
|
+
this.syncOpen();
|
|
18
|
+
this.watchFooter();
|
|
19
|
+
}
|
|
20
|
+
onOpenChange() {
|
|
21
|
+
this.syncOpen();
|
|
22
|
+
}
|
|
23
|
+
syncOpen() {
|
|
24
|
+
const dlg = this.host.shadowRoot?.querySelector('dialog');
|
|
25
|
+
if (!dlg)
|
|
26
|
+
return;
|
|
27
|
+
if (this.open && !dlg.open) {
|
|
28
|
+
dlg.showModal();
|
|
29
|
+
this.indOpen.emit();
|
|
30
|
+
}
|
|
31
|
+
else if (!this.open && dlg.open) {
|
|
32
|
+
dlg.close();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
watchFooter() {
|
|
36
|
+
const slot = this.host.shadowRoot?.querySelector('slot[name="footer"]');
|
|
37
|
+
if (!slot)
|
|
38
|
+
return;
|
|
39
|
+
const update = () => {
|
|
40
|
+
this.hasFooter = slot.assignedNodes({ flatten: true }).some((n) => {
|
|
41
|
+
if (n.nodeType === Node.ELEMENT_NODE)
|
|
42
|
+
return true;
|
|
43
|
+
return n.nodeType === Node.TEXT_NODE && (n.textContent ?? '').trim().length > 0;
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
update();
|
|
47
|
+
slot.addEventListener('slotchange', update);
|
|
48
|
+
}
|
|
49
|
+
/** Programmatically open. */
|
|
50
|
+
async show() {
|
|
51
|
+
this.open = true;
|
|
52
|
+
}
|
|
53
|
+
/** Programmatically close. */
|
|
54
|
+
async close() {
|
|
55
|
+
this.open = false;
|
|
56
|
+
}
|
|
57
|
+
onNativeClose = () => {
|
|
58
|
+
if (this.open) {
|
|
59
|
+
this.open = false;
|
|
60
|
+
this.indClose.emit();
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
onClick = (e) => {
|
|
64
|
+
if (!this.closeOnBackdrop)
|
|
65
|
+
return;
|
|
66
|
+
// The native <dialog> covers the whole viewport when open via showModal(),
|
|
67
|
+
// but its bounding box is the content. Clicks outside that box are on the backdrop.
|
|
68
|
+
const dlg = e.currentTarget;
|
|
69
|
+
if (e.target !== dlg)
|
|
70
|
+
return; // ignore clicks bubbling from inside .content
|
|
71
|
+
const r = dlg.getBoundingClientRect();
|
|
72
|
+
const inside = e.clientX >= r.left && e.clientX <= r.right &&
|
|
73
|
+
e.clientY >= r.top && e.clientY <= r.bottom;
|
|
74
|
+
if (!inside)
|
|
75
|
+
this.close();
|
|
76
|
+
};
|
|
77
|
+
render() {
|
|
78
|
+
return (h(Host, { key: '2fc6c8608a86b696f04a42989f9fa89e90c815ca' }, h("dialog", { key: '2ace88391803eeacc9ab918906db7ff01f96af05', class: "dialog", part: "dialog", "aria-label": this.heading, onClose: this.onNativeClose, onClick: this.onClick }, h("div", { key: '01d6bcd48e243524bf657559407e58ec70995752', class: "content", part: "content" }, this.heading && (h("header", { key: '930017b49c0ea7056eb5ec71efd30090bf5d2ef1', class: "header", part: "header" }, h("h2", { key: 'be329505ab6c8d2ae4b94ea399c1426c9bb2ca23', class: "heading", part: "heading" }, this.heading), h("button", { key: '6943d296514bb4035bc44f292fd9a3be42b96bd7', type: "button", class: "close", part: "close", "aria-label": "Close", onClick: () => this.close() }, "\u00D7"))), h("div", { key: '79277205e3a87957a9f4885a80ff2d88ff250615', class: "body", part: "body" }, h("slot", { key: 'c1bf7607910c5d5dff0bdaa14f9285be09aecbce' })), h("footer", { key: '102f2ea37b063d77f4874c619e134abad87161c9', class: { footer: true, 'is-empty': !this.hasFooter }, part: "footer" }, h("slot", { key: 'd6068ca633c113c5a9bf6bd87e793a96928ae95e', name: "footer" }))))));
|
|
79
|
+
}
|
|
80
|
+
static get is() { return "ind-dialog"; }
|
|
81
|
+
static get encapsulation() { return "shadow"; }
|
|
82
|
+
static get originalStyleUrls() {
|
|
83
|
+
return {
|
|
84
|
+
"$": ["dialog.css"]
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
static get styleUrls() {
|
|
88
|
+
return {
|
|
89
|
+
"$": ["dialog.css"]
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
static get properties() {
|
|
93
|
+
return {
|
|
94
|
+
"open": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"mutable": true,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "boolean",
|
|
99
|
+
"resolved": "boolean",
|
|
100
|
+
"references": {}
|
|
101
|
+
},
|
|
102
|
+
"required": false,
|
|
103
|
+
"optional": false,
|
|
104
|
+
"docs": {
|
|
105
|
+
"tags": [],
|
|
106
|
+
"text": "Open state. Two-way reflectable."
|
|
107
|
+
},
|
|
108
|
+
"getter": false,
|
|
109
|
+
"setter": false,
|
|
110
|
+
"reflect": true,
|
|
111
|
+
"attribute": "open",
|
|
112
|
+
"defaultValue": "false"
|
|
113
|
+
},
|
|
114
|
+
"heading": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"mutable": false,
|
|
117
|
+
"complexType": {
|
|
118
|
+
"original": "string",
|
|
119
|
+
"resolved": "string | undefined",
|
|
120
|
+
"references": {}
|
|
121
|
+
},
|
|
122
|
+
"required": false,
|
|
123
|
+
"optional": true,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": "Heading rendered in the header bar. Becomes the accessible name."
|
|
127
|
+
},
|
|
128
|
+
"getter": false,
|
|
129
|
+
"setter": false,
|
|
130
|
+
"reflect": false,
|
|
131
|
+
"attribute": "heading"
|
|
132
|
+
},
|
|
133
|
+
"size": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"mutable": false,
|
|
136
|
+
"complexType": {
|
|
137
|
+
"original": "DialogSize",
|
|
138
|
+
"resolved": "\"lg\" | \"md\" | \"sm\"",
|
|
139
|
+
"references": {
|
|
140
|
+
"DialogSize": {
|
|
141
|
+
"location": "local",
|
|
142
|
+
"path": "C:/www/ind-ds/packages/core/src/components/atoms/dialog/dialog.tsx",
|
|
143
|
+
"id": "src/components/atoms/dialog/dialog.tsx::DialogSize"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": false,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Size of the dialog content."
|
|
152
|
+
},
|
|
153
|
+
"getter": false,
|
|
154
|
+
"setter": false,
|
|
155
|
+
"reflect": true,
|
|
156
|
+
"attribute": "size",
|
|
157
|
+
"defaultValue": "'md'"
|
|
158
|
+
},
|
|
159
|
+
"closeOnBackdrop": {
|
|
160
|
+
"type": "boolean",
|
|
161
|
+
"mutable": false,
|
|
162
|
+
"complexType": {
|
|
163
|
+
"original": "boolean",
|
|
164
|
+
"resolved": "boolean",
|
|
165
|
+
"references": {}
|
|
166
|
+
},
|
|
167
|
+
"required": false,
|
|
168
|
+
"optional": false,
|
|
169
|
+
"docs": {
|
|
170
|
+
"tags": [],
|
|
171
|
+
"text": "Close when the operator clicks outside the dialog content."
|
|
172
|
+
},
|
|
173
|
+
"getter": false,
|
|
174
|
+
"setter": false,
|
|
175
|
+
"reflect": false,
|
|
176
|
+
"attribute": "close-on-backdrop",
|
|
177
|
+
"defaultValue": "true"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
static get states() {
|
|
182
|
+
return {
|
|
183
|
+
"hasFooter": {}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
static get events() {
|
|
187
|
+
return [{
|
|
188
|
+
"method": "indOpen",
|
|
189
|
+
"name": "indOpen",
|
|
190
|
+
"bubbles": true,
|
|
191
|
+
"cancelable": true,
|
|
192
|
+
"composed": true,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": ""
|
|
196
|
+
},
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "void",
|
|
199
|
+
"resolved": "void",
|
|
200
|
+
"references": {}
|
|
201
|
+
}
|
|
202
|
+
}, {
|
|
203
|
+
"method": "indClose",
|
|
204
|
+
"name": "indClose",
|
|
205
|
+
"bubbles": true,
|
|
206
|
+
"cancelable": true,
|
|
207
|
+
"composed": true,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [],
|
|
210
|
+
"text": "Fires when the dialog closes \u2014 for any reason (ESC, backdrop, close button, .close())."
|
|
211
|
+
},
|
|
212
|
+
"complexType": {
|
|
213
|
+
"original": "void",
|
|
214
|
+
"resolved": "void",
|
|
215
|
+
"references": {}
|
|
216
|
+
}
|
|
217
|
+
}];
|
|
218
|
+
}
|
|
219
|
+
static get methods() {
|
|
220
|
+
return {
|
|
221
|
+
"show": {
|
|
222
|
+
"complexType": {
|
|
223
|
+
"signature": "() => Promise<void>",
|
|
224
|
+
"parameters": [],
|
|
225
|
+
"references": {
|
|
226
|
+
"Promise": {
|
|
227
|
+
"location": "global",
|
|
228
|
+
"id": "global::Promise"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"return": "Promise<void>"
|
|
232
|
+
},
|
|
233
|
+
"docs": {
|
|
234
|
+
"text": "Programmatically open.",
|
|
235
|
+
"tags": []
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"close": {
|
|
239
|
+
"complexType": {
|
|
240
|
+
"signature": "() => Promise<void>",
|
|
241
|
+
"parameters": [],
|
|
242
|
+
"references": {
|
|
243
|
+
"Promise": {
|
|
244
|
+
"location": "global",
|
|
245
|
+
"id": "global::Promise"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"return": "Promise<void>"
|
|
249
|
+
},
|
|
250
|
+
"docs": {
|
|
251
|
+
"text": "Programmatically close.",
|
|
252
|
+
"tags": []
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
static get elementRef() { return "host"; }
|
|
258
|
+
static get watchers() {
|
|
259
|
+
return [{
|
|
260
|
+
"propName": "open",
|
|
261
|
+
"methodName": "onOpenChange"
|
|
262
|
+
}];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../../src/components/atoms/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,IAAI,EACJ,MAAM,EACN,KAAK,EAEL,OAAO,EACP,KAAK,EACL,KAAK,EACL,CAAC,EACD,IAAI,GACL,MAAM,eAAe,CAAC;AASvB,MAAM,OAAO,SAAS;IACT,IAAI,CAAe;IAE9B,uCAAuC;IACC,IAAI,GAAY,KAAK,CAAC;IAC9D,uEAAuE;IAC/D,OAAO,CAAU;IACzB,kCAAkC;IACT,IAAI,GAAe,IAAI,CAAC;IACjD,iEAAiE;IACzD,eAAe,GAAY,IAAI,CAAC;IAEvB,SAAS,GAAY,KAAK,CAAC;IAEnC,OAAO,CAAsB;IACtC,6FAA6F;IACpF,QAAQ,CAAsB;IAEvC,gBAAgB;QACd,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,WAAW,EAAE,CAAC;IACrB,CAAC;IAGD,YAAY;QACV,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAEO,QAAQ;QACd,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC1D,IAAI,CAAC,GAAG;YAAE,OAAO;QACjB,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;YAC3B,GAAG,CAAC,SAAS,EAAE,CAAC;YAChB,IAAI,CAAC,OAAO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M;wBAC3B,8DAAQ,CACJ;oBACN,+DAAQ,KAAK,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,IAAI,EAAC,QAAQ;wBACzE,6DAAM,IAAI,EAAC,QAAQ,GAAG,CACf,CACL,CACC,CACJ,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n Component,\n Prop,\n Method,\n Event,\n EventEmitter,\n Element,\n State,\n Watch,\n h,\n Host,\n} from '@stencil/core';\n\nexport type DialogSize = 'sm' | 'md' | 'lg';\n\n@Component({\n tag: 'ind-dialog',\n styleUrl: 'dialog.css',\n shadow: true,\n})\nexport class IndDialog {\n @Element() host!: HTMLElement;\n\n /** Open state. Two-way reflectable. */\n @Prop({ mutable: true, reflect: true }) open: boolean = false;\n /** Heading rendered in the header bar. Becomes the accessible name. */\n @Prop() heading?: string;\n /** Size of the dialog content. */\n @Prop({ reflect: true }) size: DialogSize = 'md';\n /** Close when the operator clicks outside the dialog content. */\n @Prop() closeOnBackdrop: boolean = true;\n\n @State() private hasFooter: boolean = false;\n\n @Event() indOpen!: EventEmitter<void>;\n /** Fires when the dialog closes — for any reason (ESC, backdrop, close button, .close()). */\n @Event() indClose!: EventEmitter<void>;\n\n componentDidLoad() {\n this.syncOpen();\n this.watchFooter();\n }\n\n @Watch('open')\n onOpenChange() {\n this.syncOpen();\n }\n\n private syncOpen() {\n const dlg = this.host.shadowRoot?.querySelector('dialog');\n if (!dlg) return;\n if (this.open && !dlg.open) {\n dlg.showModal();\n this.indOpen.emit();\n } else if (!this.open && dlg.open) {\n dlg.close();\n }\n }\n\n private watchFooter() {\n const slot = this.host.shadowRoot?.querySelector('slot[name=\"footer\"]') as HTMLSlotElement | null;\n if (!slot) return;\n const update = () => {\n this.hasFooter = slot.assignedNodes({ flatten: true }).some((n) => {\n if (n.nodeType === Node.ELEMENT_NODE) return true;\n return n.nodeType === Node.TEXT_NODE && (n.textContent ?? '').trim().length > 0;\n });\n };\n update();\n slot.addEventListener('slotchange', update);\n }\n\n /** Programmatically open. */\n @Method()\n async show(): Promise<void> {\n this.open = true;\n }\n\n /** Programmatically close. */\n @Method()\n async close(): Promise<void> {\n this.open = false;\n }\n\n private onNativeClose = () => {\n if (this.open) {\n this.open = false;\n this.indClose.emit();\n }\n };\n\n private onClick = (e: MouseEvent) => {\n if (!this.closeOnBackdrop) return;\n // The native <dialog> covers the whole viewport when open via showModal(),\n // but its bounding box is the content. Clicks outside that box are on the backdrop.\n const dlg = e.currentTarget as HTMLDialogElement;\n if (e.target !== dlg) return; // ignore clicks bubbling from inside .content\n const r = dlg.getBoundingClientRect();\n const inside =\n e.clientX >= r.left && e.clientX <= r.right &&\n e.clientY >= r.top && e.clientY <= r.bottom;\n if (!inside) this.close();\n };\n\n render() {\n return (\n <Host>\n <dialog\n class=\"dialog\"\n part=\"dialog\"\n aria-label={this.heading}\n onClose={this.onNativeClose}\n onClick={this.onClick}\n >\n <div class=\"content\" part=\"content\">\n {this.heading && (\n <header class=\"header\" part=\"header\">\n <h2 class=\"heading\" part=\"heading\">{this.heading}</h2>\n <button\n type=\"button\"\n class=\"close\"\n part=\"close\"\n aria-label=\"Close\"\n onClick={() => this.close()}\n >×</button>\n </header>\n )}\n <div class=\"body\" part=\"body\">\n <slot />\n </div>\n <footer class={{ footer: true, 'is-empty': !this.hasFooter }} part=\"footer\">\n <slot name=\"footer\" />\n </footer>\n </div>\n </dialog>\n </Host>\n );\n }\n}\n"]}
|