@blueprintui/cli 0.0.7 → 0.0.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/README.md +22 -2
- package/package.json +21 -21
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/.tsbuildinfo +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/alert/element.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/alert/element.js +11 -10
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/breadcrumb/element.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/breadcrumb/element.js +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/button-icon/element.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/datalist/element.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/datalist/element.js +0 -6
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/date/element.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/date/element.js +1 -6
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/drawer/element.d.ts +1 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/drawer/element.js +4 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/file/element.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/file/element.js +4 -7
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control/element.d.ts +7 -27
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control/element.js +39 -134
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-group/element.d.ts +5 -17
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-group/element.js +17 -36
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-inline/element.d.ts +0 -9
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-inline/element.js +6 -39
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-label/element.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-label/element.js +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-message/element.d.ts +3 -18
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/control-message/element.js +4 -13
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/form-group/element.d.ts +0 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/form-group/element.js +5 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/utils/context.d.ts +2 -7
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/utils/utils.d.ts +3 -7
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/utils/utils.js +28 -20
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/utils/validate.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/forms/utils/validate.js +19 -17
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/alert.d.ts +7 -7
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/alert.js +7 -7
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/all.d.ts +1 -4
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/all.js +1 -4
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-expand.d.ts +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-expand.js +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-handle.d.ts +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-handle.js +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-icon.d.ts +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-icon.js +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-sort.d.ts +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/button-sort.js +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/color.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/color.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/date.d.ts +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/date.js +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/drawer.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/drawer.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/file.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/file.js +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/forms.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/forms.js +5 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/lazy.d.ts +1 -4
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/lazy.js +1 -4
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/modal.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/modal.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/month.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/month.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/nav.d.ts +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/nav.js +2 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/pagination.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/pagination.js +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/password.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/password.js +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/search.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/search.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/time.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/time.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/{base → components}/button.d.ts +5 -4
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/{base → components}/button.js +5 -9
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-active.controller.d.ts +1 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-active.controller.js +8 -5
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-control.controller.d.ts +17 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-control.controller.js +67 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-disabled.controller.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-pressed.controller.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-readonly.controller.d.ts +12 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-readonly.controller.js +22 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-selected.controller.d.ts +13 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/state-selected.controller.js +29 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-anchor.controller.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-button.controller.d.ts +10 -5
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-button.controller.js +51 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-closable.controller.d.ts +14 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-closable.controller.js +30 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-dialog.controller.js +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-form.controller.d.ts +27 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-form.controller.js +34 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-popup.controller.js +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/index.d.ts +6 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/index.js +6 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/services/global.service.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/services/global.service.js +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/utils/a11y.d.ts +1 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/utils/a11y.js +7 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/utils/dom.d.ts +1 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/utils/dom.js +8 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/utils/events.d.ts +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/utils/events.js +1 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/month/element.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/month/element.js +1 -6
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/nav/element.d.ts +28 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/nav/element.js +13 -10
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/nav/item/element.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/nav/item/element.js +11 -16
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/popup/element.d.ts +4 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/popup/element.js +4 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/radio/element.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/radio/element.js +4 -13
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/radio/group/element.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/radio/group/element.js +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/range/element.d.ts +0 -4
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/range/element.js +0 -15
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/select/element.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/select/element.js +1 -15
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/test/index.d.ts +3 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/test/index.js +6 -36
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/textarea/element.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/textarea/element.js +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/time/element.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/time/element.js +1 -6
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/tooltip/element.js +1 -1
- package/src/index.mjs +31 -1
- package/src/rollup.config.mjs +14 -18
- package/src/utils.mjs +26 -0
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icon/element.d.ts +0 -35
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icon/element.js +0 -91
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icon/index.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icon/index.js +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/angle.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/angle.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/calendar.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/calendar.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/check-circle.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/check-circle.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/clock.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/clock.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/close.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/close.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/cloud.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/cloud.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/color-picker.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/color-picker.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/drag-handle.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/drag-handle.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/ellipsis-vertical.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/ellipsis-vertical.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/exclamation-circle.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/exclamation-circle.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/eye-hide.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/eye-hide.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/eye.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/eye.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/filter.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/filter.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/folder.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/folder.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/home.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/home.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/icon.service.d.ts +0 -5
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/icon.service.js +0 -17
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/image.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/image.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/index.d.ts +0 -25
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/index.js +0 -25
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/info-circle.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/info-circle.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/interfaces.d.ts +0 -10
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/interfaces.js +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/menu.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/menu.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/search.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/search.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/step-forward-two.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/step-forward-two.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/times.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/times.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/unknown.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/unknown.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/user.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/user.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/warning.d.ts +0 -12
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/icons/warning.js +0 -8
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/icon.d.ts +0 -6
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/icon.js +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/link.d.ts +0 -6
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/link.js +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/list.d.ts +0 -7
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/list.js +0 -3
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/text.d.ts +0 -6
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/include/text.js +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-submit.controller.d.ts +0 -15
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/internals/controllers/type-submit.controller.js +0 -64
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/link/element.d.ts +0 -22
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/link/element.js +0 -40
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/link/index.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/link/index.js +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/list/element.d.ts +0 -19
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/list/element.js +0 -32
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/list/index.d.ts +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/list/index.js +0 -2
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/list/item/element.d.ts +0 -18
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/list/item/element.js +0 -26
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/text/element.d.ts +0 -25
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/text/element.js +0 -60
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/text/index.d.ts +0 -1
- package/src/.rollup.cache/@blueprintui/components/Users/coryrylan/Repos/blueprintui/components/dist/lib/text/index.js +0 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import { attachRootNodeStyles, indicatorStyles } from '@blueprintui/components/internals';
|
|
3
2
|
import { BpControl } from '@blueprintui/components/forms';
|
|
4
3
|
import { styles as inputStyles } from '@blueprintui/components/input';
|
|
5
4
|
import styles from './element.css' assert { type: 'css' };
|
|
@@ -23,13 +22,9 @@ import styles from './element.css' assert { type: 'css' };
|
|
|
23
22
|
*/
|
|
24
23
|
export class BpDate extends BpControl {
|
|
25
24
|
get suffixTemplate() {
|
|
26
|
-
return html `<bp-button-icon shape="calendar"
|
|
25
|
+
return html `<bp-button-icon shape="calendar" @click=${() => this.inputControl.showPicker()}></bp-button-icon>`;
|
|
27
26
|
}
|
|
28
27
|
static get styles() {
|
|
29
28
|
return [...super.styles, inputStyles, styles];
|
|
30
29
|
}
|
|
31
|
-
firstUpdated(props) {
|
|
32
|
-
super.firstUpdated(props);
|
|
33
|
-
attachRootNodeStyles(this, [indicatorStyles]);
|
|
34
|
-
}
|
|
35
30
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { TypeDialogController } from '@blueprintui/components/internals';
|
|
3
2
|
/**
|
|
4
3
|
* ```typescript
|
|
5
4
|
* import '@blueprintui/components/include/drawer.js';
|
|
@@ -20,7 +19,7 @@ export declare class BpDrawer extends LitElement {
|
|
|
20
19
|
position: 'left' | 'right' | 'top' | 'bottom';
|
|
21
20
|
elevation: 'raised' | 'flat';
|
|
22
21
|
get dialog(): HTMLElement;
|
|
23
|
-
|
|
22
|
+
private typeClosableController;
|
|
24
23
|
static get styles(): CSSStyleSheet[];
|
|
25
24
|
render(): import("lit-html").TemplateResult<1>;
|
|
26
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, LitElement } from 'lit';
|
|
3
|
-
import { baseStyles, typeDialog, elevationStyles } from '@blueprintui/components/internals';
|
|
3
|
+
import { baseStyles, typeDialog, elevationStyles, typeClosable } from '@blueprintui/components/internals';
|
|
4
4
|
import styles from './element.css' assert { type: 'css' };
|
|
5
5
|
/**
|
|
6
6
|
* ```typescript
|
|
@@ -39,7 +39,7 @@ let BpDrawer = class BpDrawer extends LitElement {
|
|
|
39
39
|
get #contentTemplate() {
|
|
40
40
|
return html `
|
|
41
41
|
<div class="focus-wrap"></div>
|
|
42
|
-
${this.closable ? html `<bp-button-icon @click=${() => this.
|
|
42
|
+
${this.closable ? html `<bp-button-icon @click=${() => this.typeClosableController.close()} aria-label="close modal" shape="close" type="button"></bp-button-icon>` : ''}
|
|
43
43
|
<slot></slot>`;
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
@@ -49,6 +49,7 @@ let BpDrawer = class BpDrawer extends LitElement {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
BpDrawer = __decorate([
|
|
52
|
-
typeDialog()
|
|
52
|
+
typeDialog(),
|
|
53
|
+
typeClosable()
|
|
53
54
|
], BpDrawer);
|
|
54
55
|
export { BpDrawer };
|
|
@@ -48,7 +48,6 @@ export declare class BpFile extends BpControl {
|
|
|
48
48
|
pageSize: string;
|
|
49
49
|
};
|
|
50
50
|
private buttonLabel;
|
|
51
|
-
protected supportsPrefixSuffixActions: boolean;
|
|
52
51
|
static get styles(): CSSStyleSheet[];
|
|
53
52
|
protected get inputTemplate(): import("lit-html").TemplateResult<1>;
|
|
54
53
|
firstUpdated(props: PropertyValues<this>): void;
|
|
@@ -23,14 +23,12 @@ import styles from './element.css' assert { type: 'css' };
|
|
|
23
23
|
let BpFile = class BpFile extends BpControl {
|
|
24
24
|
static properties = {
|
|
25
25
|
i18n: { type: Object },
|
|
26
|
-
buttonLabel: { state: true }
|
|
27
|
-
supportsPrefixSuffixActions: { state: true }
|
|
26
|
+
buttonLabel: { state: true }
|
|
28
27
|
};
|
|
29
28
|
constructor() {
|
|
30
29
|
super(...arguments);
|
|
31
30
|
this.i18n = I18nService.keys.actions;
|
|
32
31
|
this.buttonLabel = this.i18n.browse;
|
|
33
|
-
this.supportsPrefixSuffixActions = false;
|
|
34
32
|
}
|
|
35
33
|
static get styles() {
|
|
36
34
|
return [...super.styles, styles];
|
|
@@ -38,12 +36,11 @@ let BpFile = class BpFile extends BpControl {
|
|
|
38
36
|
get inputTemplate() {
|
|
39
37
|
return html `
|
|
40
38
|
<div class="file-input">
|
|
41
|
-
<bp-button size="sm" action="outline" @click=${() => this.
|
|
42
|
-
<bp-icon shape="folder" size="sm"
|
|
39
|
+
<bp-button size="sm" action="outline" @click=${() => this.inputControl.showPicker()} ?disabled=${this.matches(':--disabled')}>
|
|
40
|
+
<bp-icon shape="folder" size="sm"></bp-icon>
|
|
43
41
|
<span>${this.buttonLabel}</span>
|
|
44
42
|
</bp-button>
|
|
45
|
-
${this.inputControl.files?.length && !this.disabled ? html
|
|
46
|
-
<bp-button-icon shape="times" @click=${() => this.#clearFiles()} aria-label="${this.i18n.removeFile}"></bp-button-icon>` : ''}
|
|
43
|
+
${this.inputControl.files?.length && !this.matches(':--disabled') ? html `<bp-button-icon shape="times" @click=${() => this.#clearFiles()} aria-label=${this.i18n.removeFile}></bp-button-icon>` : ''}
|
|
47
44
|
</div>
|
|
48
45
|
`;
|
|
49
46
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ContextConsumer
|
|
1
|
+
import { ContextConsumer } from '@lit-labs/context';
|
|
2
2
|
import { LitElement, TemplateResult, PropertyValues } from 'lit';
|
|
3
|
-
import {
|
|
3
|
+
import { ControlLayout, ControlWidth } from './../utils/interfaces.js';
|
|
4
4
|
import { BpControlMessage } from '../control-message/element.js';
|
|
5
5
|
import { BpInternalControlLabel } from '../control-label/element.js';
|
|
6
6
|
export declare const enum ControlLabelLayout {
|
|
@@ -27,10 +27,6 @@ export declare const enum ControlLabelLayout {
|
|
|
27
27
|
*/
|
|
28
28
|
export declare class BpControl extends LitElement {
|
|
29
29
|
#private;
|
|
30
|
-
/** status of form control validation */
|
|
31
|
-
status: ControlStatus;
|
|
32
|
-
/** https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation */
|
|
33
|
-
validate: boolean;
|
|
34
30
|
/** forms automatically collapse to layout that prevents overflow */
|
|
35
31
|
responsive: boolean;
|
|
36
32
|
/** default full width or the browser default width */
|
|
@@ -47,45 +43,29 @@ export declare class BpControl extends LitElement {
|
|
|
47
43
|
reflect: boolean;
|
|
48
44
|
};
|
|
49
45
|
};
|
|
50
|
-
|
|
51
|
-
protected disabled: boolean;
|
|
52
|
-
protected readonly: boolean;
|
|
53
|
-
protected supportsPrefixSuffixActions: boolean;
|
|
46
|
+
/** @private */
|
|
54
47
|
labelLayout: ControlLabelLayout;
|
|
55
48
|
/** @private */
|
|
56
49
|
controlLabel: BpInternalControlLabel;
|
|
57
50
|
private inputContainer;
|
|
58
|
-
private prefixAction;
|
|
59
|
-
private suffixAction;
|
|
60
|
-
private messageSlot;
|
|
61
51
|
/** @private */
|
|
62
52
|
get inputControl(): HTMLInputElement;
|
|
63
|
-
get
|
|
64
|
-
get messages(): NodeListOf<BpControlMessage>;
|
|
65
|
-
protected observers: (MutationObserver | ResizeObserver)[];
|
|
53
|
+
protected get messages(): NodeListOf<BpControlMessage>;
|
|
66
54
|
static styles: CSSStyleSheet[];
|
|
67
|
-
|
|
55
|
+
/** @private */
|
|
56
|
+
_internals: ElementInternals;
|
|
68
57
|
render(): TemplateResult<1>;
|
|
69
58
|
protected get inputTemplate(): TemplateResult<1>;
|
|
70
59
|
protected get prefixTemplate(): TemplateResult | null;
|
|
71
60
|
protected get suffixTemplate(): TemplateResult | null;
|
|
72
|
-
protected get messagesTemplate(): TemplateResult<1> | "";
|
|
73
61
|
protected formContext: ContextConsumer<{
|
|
74
62
|
__context__: import("../utils/context.js").FormContext;
|
|
75
63
|
}, this>;
|
|
76
64
|
protected controlGroupContext: ContextConsumer<{
|
|
77
|
-
__context__: import("../utils/context.js").FormContext & {
|
|
78
|
-
isControlGroup?: boolean;
|
|
79
|
-
};
|
|
80
|
-
}, this>;
|
|
81
|
-
protected controlContext: ContextProvider<{
|
|
82
65
|
__context__: import("../utils/context.js").FormContext;
|
|
83
|
-
}>;
|
|
66
|
+
}, this>;
|
|
84
67
|
connectedCallback(): void;
|
|
85
68
|
firstUpdated(props: PropertyValues<this>): void;
|
|
86
|
-
updated(props: PropertyValues<any>): void;
|
|
87
|
-
disconnectedCallback(): void;
|
|
88
|
-
protected associateInputAndLabel(): void;
|
|
89
69
|
/** @private */
|
|
90
70
|
get layoutStable(): boolean;
|
|
91
71
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { ContextConsumer
|
|
2
|
+
import { ContextConsumer } from '@lit-labs/context';
|
|
3
3
|
import { html, LitElement } from 'lit';
|
|
4
|
-
import { baseStyles, interactionResponsive,
|
|
4
|
+
import { baseStyles, interactionResponsive, calculateOptimalLayout, syncUpdatedProps, attachInternals, stateControl, associateAriaDescribedBy } from '@blueprintui/components/internals';
|
|
5
5
|
import { syncHTML5Validation } from '../utils/validate.js';
|
|
6
|
-
import { associateInputToDatalist, formLayouts, defaultFormLayout, getStatusIcon, associateInputAndLabel, defaultControlWidth,
|
|
7
|
-
import {
|
|
6
|
+
import { associateInputToDatalist, formLayouts, defaultFormLayout, getStatusIcon, associateInputAndLabel, defaultControlWidth, setupControlMessageStatusUpdates } from '../utils/utils.js';
|
|
7
|
+
import { controlGroupContext, formContext } from '../utils/context.js';
|
|
8
8
|
import styles from './element.css' assert { type: 'css' };
|
|
9
9
|
export var ControlLabelLayout;
|
|
10
10
|
(function (ControlLabelLayout) {
|
|
@@ -32,18 +32,11 @@ export var ControlLabelLayout;
|
|
|
32
32
|
let BpControl = class BpControl extends LitElement {
|
|
33
33
|
constructor() {
|
|
34
34
|
super(...arguments);
|
|
35
|
-
/** status of form control validation */
|
|
36
|
-
this.status = 'neutral';
|
|
37
|
-
/** https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation */
|
|
38
|
-
this.validate = false;
|
|
39
35
|
/** forms automatically collapse to layout that prevents overflow */
|
|
40
36
|
this.responsive = true;
|
|
41
37
|
/** default full width or the browser default width */
|
|
42
38
|
this.controlWidth = defaultControlWidth;
|
|
43
|
-
|
|
44
|
-
this.disabled = false;
|
|
45
|
-
this.readonly = false;
|
|
46
|
-
this.supportsPrefixSuffixActions = true;
|
|
39
|
+
/** @private */
|
|
47
40
|
this.labelLayout = ControlLabelLayout.default;
|
|
48
41
|
}
|
|
49
42
|
/**
|
|
@@ -64,14 +57,8 @@ let BpControl = class BpControl extends LitElement {
|
|
|
64
57
|
static get properties() {
|
|
65
58
|
return {
|
|
66
59
|
layout: { type: String, reflect: true },
|
|
67
|
-
status: { type: String, reflect: true },
|
|
68
|
-
validate: { type: Boolean, reflect: true },
|
|
69
60
|
responsive: { type: Boolean, reflect: true },
|
|
70
61
|
controlWidth: { type: String, reflect: true, attribute: 'control-width' },
|
|
71
|
-
focused: { type: Boolean, reflect: true, attribute: '_focused' },
|
|
72
|
-
disabled: { type: Boolean, reflect: true, attribute: '_disabled' },
|
|
73
|
-
readonly: { type: Boolean, reflect: true, attribute: '_readonly' },
|
|
74
|
-
supportsPrefixSuffixActions: { state: true },
|
|
75
62
|
labelLayout: { state: true }
|
|
76
63
|
};
|
|
77
64
|
}
|
|
@@ -84,54 +71,43 @@ let BpControl = class BpControl extends LitElement {
|
|
|
84
71
|
get inputContainer() {
|
|
85
72
|
return this.renderRoot?.querySelector(".input-container") ?? null;
|
|
86
73
|
}
|
|
87
|
-
get prefixAction() {
|
|
88
|
-
return this.renderRoot?.querySelector(".prefix") ?? null;
|
|
89
|
-
}
|
|
90
|
-
get suffixAction() {
|
|
91
|
-
return this.renderRoot?.querySelector(".suffix") ?? null;
|
|
92
|
-
}
|
|
93
|
-
get messageSlot() {
|
|
94
|
-
return this.renderRoot?.querySelector(".messages") ?? null;
|
|
95
|
-
}
|
|
96
74
|
/** @private */
|
|
97
75
|
get inputControl() {
|
|
98
76
|
return this.querySelector('input, select, textarea, [bp-control]');
|
|
99
77
|
}
|
|
100
|
-
get label() {
|
|
78
|
+
get #label() {
|
|
101
79
|
return this.querySelector('label');
|
|
102
80
|
}
|
|
103
|
-
get #
|
|
81
|
+
get #datalist() {
|
|
104
82
|
return this.querySelector('datalist');
|
|
105
83
|
}
|
|
106
|
-
get #controlActions() {
|
|
107
|
-
return this.querySelectorAll('[bp-button-icon]');
|
|
108
|
-
}
|
|
109
84
|
get messages() {
|
|
110
85
|
return this.querySelectorAll('bp-control-message');
|
|
111
86
|
}
|
|
112
|
-
observers = [];
|
|
113
87
|
static styles = [baseStyles, styles];
|
|
114
|
-
get isRTL() {
|
|
115
|
-
return getElementLanguageDirection(this) === 'rtl';
|
|
116
|
-
}
|
|
117
|
-
get #hasStatusIcon() {
|
|
118
|
-
return this.labelLayout !== ControlLabelLayout.inputGroup && (this.status === 'error' || this.status === 'success');
|
|
119
|
-
}
|
|
120
88
|
render() {
|
|
121
89
|
return html `
|
|
122
|
-
<div class="private-host ${this.layout}
|
|
123
|
-
${this
|
|
90
|
+
<div class="private-host ${this.layout}">
|
|
91
|
+
${this.labelLayout === ControlLabelLayout.default ? html `
|
|
92
|
+
<div class="input-label-container">
|
|
93
|
+
<bp-internal-control-label>
|
|
94
|
+
<slot name="label"></slot>
|
|
95
|
+
</bp-internal-control-label>
|
|
96
|
+
</div>` : ''}
|
|
124
97
|
<div class="input-message-container">
|
|
125
98
|
<div class="input-status-icon-container">
|
|
126
99
|
<div class="input-container">
|
|
127
|
-
${this.
|
|
100
|
+
${this.prefixTemplate}
|
|
101
|
+
<slot name="prefix"></slot>
|
|
102
|
+
${this.inputTemplate}
|
|
128
103
|
<slot name="input"></slot>
|
|
129
|
-
|
|
104
|
+
<slot name="suffix"></slot>
|
|
105
|
+
${this.suffixTemplate}
|
|
130
106
|
</div>
|
|
131
|
-
${
|
|
107
|
+
${getStatusIcon()}
|
|
132
108
|
</div>
|
|
133
|
-
${this.
|
|
134
|
-
|
|
109
|
+
${this.messages?.length ? html `<slot name="message"></slot>` : ''}
|
|
110
|
+
${this.#datalist ? html `<slot name="datalist"></slot>` : ''}
|
|
135
111
|
</div>
|
|
136
112
|
</div>
|
|
137
113
|
`;
|
|
@@ -145,102 +121,35 @@ let BpControl = class BpControl extends LitElement {
|
|
|
145
121
|
get suffixTemplate() {
|
|
146
122
|
return null;
|
|
147
123
|
}
|
|
148
|
-
get #primaryLabelTemplate() {
|
|
149
|
-
return this.labelLayout === ControlLabelLayout.default ? html `
|
|
150
|
-
<bp-internal-control-label .disabled=${this.disabled}>
|
|
151
|
-
<slot name="label" @slotchange=${() => this.associateInputAndLabel()}></slot>
|
|
152
|
-
</bp-internal-control-label>` : '';
|
|
153
|
-
}
|
|
154
|
-
get messagesTemplate() {
|
|
155
|
-
return this.messages?.length ? html `
|
|
156
|
-
<div class="messages">
|
|
157
|
-
<slot name="message"></slot>
|
|
158
|
-
</div>
|
|
159
|
-
` : '';
|
|
160
|
-
}
|
|
161
|
-
get #prefixTemplate() {
|
|
162
|
-
return html `
|
|
163
|
-
<div class="prefix">
|
|
164
|
-
${this.prefixTemplate}
|
|
165
|
-
<slot name="prefix"></slot>
|
|
166
|
-
</div>
|
|
167
|
-
`;
|
|
168
|
-
}
|
|
169
|
-
get #suffixTemplate() {
|
|
170
|
-
return html `
|
|
171
|
-
<div class="suffix">
|
|
172
|
-
<slot name="suffix"></slot>
|
|
173
|
-
${this.suffixTemplate}
|
|
174
|
-
</div>
|
|
175
|
-
`;
|
|
176
|
-
}
|
|
177
124
|
formContext = new ContextConsumer(this, formContext, (value) => syncUpdatedProps(this, value), true);
|
|
178
125
|
controlGroupContext = new ContextConsumer(this, controlGroupContext, (value) => syncUpdatedProps(this, value), true);
|
|
179
|
-
controlContext = new ContextProvider(this, controlContext, {});
|
|
180
126
|
connectedCallback() {
|
|
181
127
|
super.connectedCallback();
|
|
182
128
|
this.setAttribute('bp-control', '');
|
|
129
|
+
attachInternals(this);
|
|
183
130
|
}
|
|
184
131
|
firstUpdated(props) {
|
|
185
132
|
super.firstUpdated(props);
|
|
186
133
|
this.inputControl.slot = 'input';
|
|
187
|
-
this
|
|
188
|
-
this.#
|
|
189
|
-
this.#setupHostAttributes();
|
|
190
|
-
this.#setupHTML5Validation();
|
|
191
|
-
this.#setActionOffsetPadding();
|
|
134
|
+
this.#label ? this.#label.slot = 'label' : null;
|
|
135
|
+
this.#datalist ? this.#datalist.slot = 'datalist' : null;
|
|
192
136
|
this.#setupResponsive();
|
|
193
|
-
this.#setupDescribedByUpdates();
|
|
194
137
|
this.#setupLabelLayout();
|
|
195
|
-
this
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
#associateInputToDatalist() {
|
|
210
|
-
associateInputToDatalist(this.inputControl, this.#datalistControl);
|
|
211
|
-
}
|
|
212
|
-
#setupDescribedByUpdates() {
|
|
213
|
-
this.messageSlot?.addEventListener('slotchange', async () => {
|
|
214
|
-
const messages = Array.from(this.messages);
|
|
215
|
-
this.inputControl.setAttribute('aria-describedby', messages.length ? messages.map(m => (m.id = createId())).join(' ') : '');
|
|
216
|
-
getCurrentMessageStatus(messages).then(s => this.status = s);
|
|
138
|
+
setupControlMessageStatusUpdates(Array.from(this.messages), this);
|
|
139
|
+
syncHTML5Validation(this, Array.from(this.messages));
|
|
140
|
+
this.shadowRoot.addEventListener('slotchange', (e) => {
|
|
141
|
+
const slotName = e.target.name;
|
|
142
|
+
if (slotName === 'label') {
|
|
143
|
+
associateInputAndLabel(this.inputControl, this.#label);
|
|
144
|
+
}
|
|
145
|
+
else if (slotName === 'datalist') {
|
|
146
|
+
associateInputToDatalist(this.inputControl, this.#datalist);
|
|
147
|
+
}
|
|
148
|
+
else if (slotName === 'message') {
|
|
149
|
+
associateAriaDescribedBy(this.inputControl, Array.from(this.messages));
|
|
150
|
+
}
|
|
217
151
|
});
|
|
218
152
|
}
|
|
219
|
-
#setupHostAttributes() {
|
|
220
|
-
this.inputControl.addEventListener('focusin', () => (this.focused = true));
|
|
221
|
-
this.inputControl.addEventListener('focusout', () => (this.focused = false));
|
|
222
|
-
this.observers.push(getElementUpdates(this.inputControl, 'disabled', (value) => (this.disabled = value === '' ? true : value)), getElementUpdates(this.inputControl, 'aria-disabled', (value) => (this.disabled = value === 'true' ? true : false)), getElementUpdates(this.inputControl, 'readonly', (value) => (this.readonly = value === '' ? true : value)));
|
|
223
|
-
}
|
|
224
|
-
#setupHTML5Validation() {
|
|
225
|
-
if (!this.inputControl?.form?.noValidate && this.validate) {
|
|
226
|
-
syncHTML5Validation(this, Array.from(this.messages));
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
async #setActionOffsetPadding() {
|
|
230
|
-
const prefix = this.prefixAction?.updateComplete;
|
|
231
|
-
const suffix = this.suffixAction?.updateComplete;
|
|
232
|
-
(await prefix) ? prefix : Promise.resolve(true);
|
|
233
|
-
(await suffix) ? suffix : Promise.resolve(true);
|
|
234
|
-
await childrenUpdateComplete(this.#controlActions);
|
|
235
|
-
const hasControlActions = this.#controlActions.length > 0 || this.prefixTemplate || this.suffixTemplate;
|
|
236
|
-
const isGenericControl = this.tagName.toLowerCase() === 'bp-control';
|
|
237
|
-
if (this.supportsPrefixSuffixActions && !isGenericControl && hasControlActions) {
|
|
238
|
-
const start = `${this.prefixAction.getBoundingClientRect().width + 6}px`;
|
|
239
|
-
const end = `${this.suffixAction.getBoundingClientRect().width + 6}px`;
|
|
240
|
-
this.inputControl.style.setProperty('padding-left', this.isRTL ? end : start, 'important');
|
|
241
|
-
this.inputControl.style.setProperty('padding-right', this.isRTL ? start : end, 'important');
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
153
|
/** @private */
|
|
245
154
|
get layoutStable() {
|
|
246
155
|
const messageBelowInput = this.shadowRoot.querySelector('.messages')?.getBoundingClientRect().top > this.inputContainer?.getBoundingClientRect().top;
|
|
@@ -270,13 +179,9 @@ let BpControl = class BpControl extends LitElement {
|
|
|
270
179
|
this.labelLayout = ControlLabelLayout.ariaLabel;
|
|
271
180
|
}
|
|
272
181
|
}
|
|
273
|
-
#assignSlotIfInControlGroup() {
|
|
274
|
-
if (this.parentElement?.hasAttribute('bp-control-group')) {
|
|
275
|
-
this.setAttribute('slot', 'controls');
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
182
|
};
|
|
279
183
|
BpControl = __decorate([
|
|
184
|
+
stateControl(),
|
|
280
185
|
interactionResponsive()
|
|
281
186
|
], BpControl);
|
|
282
187
|
export { BpControl };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ContextConsumer, ContextProvider } from '@lit-labs/context';
|
|
2
2
|
import { LitElement, PropertyValues } from 'lit';
|
|
3
3
|
import { BpControl } from '../control/element.js';
|
|
4
|
-
import {
|
|
5
|
-
import { BpControlMessage } from '../control-message/element.js';
|
|
4
|
+
import { FormLayout, ControlWidth } from '../utils/interfaces.js';
|
|
6
5
|
import { BpInternalControlLabel } from '../control-label/element.js';
|
|
7
|
-
import { BpInternalControlInline } from './../control-inline/element.js';
|
|
8
6
|
/**
|
|
9
7
|
* Internal Control Group
|
|
10
8
|
*
|
|
@@ -32,33 +30,23 @@ import { BpInternalControlInline } from './../control-inline/element.js';
|
|
|
32
30
|
*/
|
|
33
31
|
export declare class BpInternalControlGroup extends LitElement {
|
|
34
32
|
#private;
|
|
35
|
-
/** Set the status of control group validation */
|
|
36
|
-
status: ControlStatus;
|
|
37
33
|
/** @type {horizontal | horizontal-inline | vertical | vertical-inline | compact} */
|
|
38
34
|
layout: FormLayout;
|
|
39
|
-
/** Align the labels of controls within group left or right */
|
|
40
|
-
controlAlign: 'left' | 'right';
|
|
41
|
-
/** Disable all controls within a control group or omit and disable controls individually */
|
|
42
|
-
disabled: boolean;
|
|
43
35
|
/** Adjust the control from the default full width or the browser default width */
|
|
44
36
|
controlWidth: ControlWidth;
|
|
45
37
|
responsive: boolean;
|
|
46
|
-
protected get
|
|
47
|
-
protected get controls(): NodeListOf<BpControl | BpInternalControlInline>;
|
|
48
|
-
protected get messages(): NodeListOf<BpControlMessage>;
|
|
38
|
+
protected get controls(): NodeListOf<BpControl>;
|
|
49
39
|
/** @private */
|
|
50
40
|
controlLabel: BpInternalControlLabel;
|
|
51
41
|
protected formContext: ContextConsumer<{
|
|
52
42
|
__context__: import("../utils/context.js").FormContext;
|
|
53
43
|
}, this>;
|
|
54
44
|
protected controlGroupContext: ContextProvider<{
|
|
55
|
-
__context__: import("../utils/context.js").FormContext
|
|
56
|
-
isControlGroup?: boolean;
|
|
57
|
-
};
|
|
45
|
+
__context__: import("../utils/context.js").FormContext;
|
|
58
46
|
}>;
|
|
59
47
|
protected isInlineControlGroup: boolean;
|
|
60
|
-
|
|
61
|
-
|
|
48
|
+
/** @private */
|
|
49
|
+
_internals: ElementInternals;
|
|
62
50
|
static styles: CSSStyleSheet[];
|
|
63
51
|
render(): import("lit-html").TemplateResult<1>;
|
|
64
52
|
connectedCallback(): void;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { ContextConsumer, ContextProvider } from '@lit-labs/context';
|
|
3
3
|
import { html, LitElement } from 'lit';
|
|
4
|
-
import { baseStyles, calculateOptimalLayout, interactionResponsive, createId, syncUpdatedProps } from '@blueprintui/components/internals';
|
|
5
|
-
import { getStatusIcon, formLayouts, defaultFormLayout,
|
|
4
|
+
import { baseStyles, calculateOptimalLayout, interactionResponsive, createId, syncUpdatedProps, associateAriaDescribedBy } from '@blueprintui/components/internals';
|
|
5
|
+
import { getStatusIcon, formLayouts, defaultFormLayout, inlineControlListIsWrapped, setupControlMessageStatusUpdates } from '../utils/utils.js';
|
|
6
6
|
import { controlGroupContext, formContext } from '../utils/context.js';
|
|
7
7
|
import styles from './element.css' assert { type: 'css' };
|
|
8
8
|
/**
|
|
@@ -32,32 +32,23 @@ import styles from './element.css' assert { type: 'css' };
|
|
|
32
32
|
*/
|
|
33
33
|
let BpInternalControlGroup = class BpInternalControlGroup extends LitElement {
|
|
34
34
|
static properties = {
|
|
35
|
-
status: { type: String, reflect: true },
|
|
36
35
|
layout: { type: String, reflect: true },
|
|
37
|
-
controlAlign: { type: String, reflect: true, attribute: 'control-align' },
|
|
38
|
-
disabled: { type: Boolean, reflect: true },
|
|
39
36
|
controlWidth: { type: String, reflect: true, attribute: 'control-width' },
|
|
40
37
|
responsive: { type: Boolean, reflect: true }
|
|
41
38
|
};
|
|
42
39
|
constructor() {
|
|
43
40
|
super(...arguments);
|
|
44
|
-
/** Set the status of control group validation */
|
|
45
|
-
this.status = 'neutral';
|
|
46
41
|
/** @type {horizontal | horizontal-inline | vertical | vertical-inline | compact} */
|
|
47
42
|
this.layout = defaultFormLayout;
|
|
48
|
-
/** Align the labels of controls within group left or right */
|
|
49
|
-
this.controlAlign = 'left';
|
|
50
|
-
/** Disable all controls within a control group or omit and disable controls individually */
|
|
51
|
-
this.disabled = false;
|
|
52
43
|
this.responsive = true;
|
|
53
44
|
}
|
|
54
|
-
get label() {
|
|
55
|
-
return this.querySelector('label');
|
|
56
|
-
}
|
|
57
45
|
get controls() {
|
|
58
46
|
return this.querySelectorAll('bp-control, [bp-control]');
|
|
59
47
|
}
|
|
60
|
-
get
|
|
48
|
+
get #label() {
|
|
49
|
+
return this.querySelector('label');
|
|
50
|
+
}
|
|
51
|
+
get #messages() {
|
|
61
52
|
return this.querySelectorAll('bp-control-message');
|
|
62
53
|
}
|
|
63
54
|
/** @private */
|
|
@@ -67,29 +58,27 @@ let BpInternalControlGroup = class BpInternalControlGroup extends LitElement {
|
|
|
67
58
|
formContext = new ContextConsumer(this, formContext, (value) => syncUpdatedProps(this, value), true);
|
|
68
59
|
controlGroupContext = new ContextProvider(this, controlGroupContext, {});
|
|
69
60
|
isInlineControlGroup = false;
|
|
70
|
-
|
|
71
|
-
#groupLabelId = createId();
|
|
61
|
+
/** @private */
|
|
72
62
|
_internals = this.attachInternals();
|
|
73
63
|
static styles = [baseStyles, styles];
|
|
74
64
|
render() {
|
|
75
65
|
return html `
|
|
76
66
|
<div class="private-host ${this.isInlineControlGroup ? 'inline-control-group' : ''}">
|
|
77
67
|
<div class="control-label-container">
|
|
78
|
-
<bp-internal-control-label
|
|
68
|
+
<bp-internal-control-label action="primary">
|
|
79
69
|
<slot name="label"></slot>
|
|
80
70
|
</bp-internal-control-label>
|
|
81
71
|
</div>
|
|
82
72
|
<div class="control-message-container">
|
|
83
73
|
<div class="input-container">
|
|
84
74
|
<div class="controls">
|
|
85
|
-
<slot
|
|
75
|
+
<slot></slot>
|
|
86
76
|
</div>
|
|
87
|
-
${this.isInlineControlGroup ? getStatusIcon(this.status) : ''}
|
|
88
77
|
</div>
|
|
89
|
-
<div ?hidden=${this
|
|
90
|
-
${
|
|
78
|
+
<div ?hidden=${this.#messages.length === 0} class="messages-container">
|
|
79
|
+
${getStatusIcon()}
|
|
91
80
|
<div class="messages">
|
|
92
|
-
<slot name="message" @slotchange=${this.#
|
|
81
|
+
<slot name="message" @slotchange=${() => associateAriaDescribedBy(this, Array.from(this.#messages))}></slot>
|
|
93
82
|
</div>
|
|
94
83
|
</div>
|
|
95
84
|
</div>
|
|
@@ -103,13 +92,14 @@ let BpInternalControlGroup = class BpInternalControlGroup extends LitElement {
|
|
|
103
92
|
}
|
|
104
93
|
firstUpdated(props) {
|
|
105
94
|
super.firstUpdated(props);
|
|
106
|
-
this
|
|
95
|
+
this.#label ? this.#label.slot = 'label' : null;
|
|
107
96
|
this.#associateLabelAndGroup();
|
|
108
97
|
this.#setupResponsive();
|
|
98
|
+
setupControlMessageStatusUpdates(Array.from(this.#messages), this);
|
|
109
99
|
}
|
|
110
100
|
updated(props) {
|
|
111
101
|
super.updated(props);
|
|
112
|
-
this.controlGroupContext.setValue({ layout: this.layout, responsive: this.responsive, controlWidth: this.controlWidth
|
|
102
|
+
this.controlGroupContext.setValue({ layout: this.layout, responsive: this.responsive, controlWidth: this.controlWidth });
|
|
113
103
|
}
|
|
114
104
|
get layoutStable() {
|
|
115
105
|
const messageBelowInput = this.shadowRoot.querySelector('.messages-container')?.getBoundingClientRect().top > this.shadowRoot.querySelector('.controls').getBoundingClientRect().top;
|
|
@@ -129,17 +119,8 @@ let BpInternalControlGroup = class BpInternalControlGroup extends LitElement {
|
|
|
129
119
|
return true;
|
|
130
120
|
}
|
|
131
121
|
#associateLabelAndGroup() {
|
|
132
|
-
this.
|
|
133
|
-
|
|
134
|
-
this.label.id = this.#groupLabelId;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
async #updateControlMessages() {
|
|
138
|
-
const messages = Array.from(this.messages);
|
|
139
|
-
this.status = await getCurrentMessageStatus(messages);
|
|
140
|
-
if (this.messages.length) {
|
|
141
|
-
this.setAttribute('aria-describedby', messages.map(m => (m.id = createId())).join(' '));
|
|
142
|
-
}
|
|
122
|
+
this.#label.id = this.#label.id?.length ? this.#label.id : createId();
|
|
123
|
+
this.setAttribute('aria-labelledby', this.#label.id);
|
|
143
124
|
}
|
|
144
125
|
#setupResponsive() {
|
|
145
126
|
if (this.responsive) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { PropertyValues } from 'lit';
|
|
2
1
|
import { BpControl } from '../control/element.js';
|
|
3
2
|
/**
|
|
4
3
|
* Internal Control Inline
|
|
@@ -18,14 +17,6 @@ import { BpControl } from '../control/element.js';
|
|
|
18
17
|
* @slot - For projecting inline input and label
|
|
19
18
|
*/
|
|
20
19
|
export declare class BpInternalControlInline extends BpControl {
|
|
21
|
-
/** Align the labels of controls within group left or right */
|
|
22
|
-
controlAlign: 'left' | 'right';
|
|
23
|
-
isControlGroup: boolean;
|
|
24
|
-
protected checked: boolean;
|
|
25
|
-
protected indeterminate: boolean;
|
|
26
|
-
protected supportsPrefixSuffixActions: boolean;
|
|
27
20
|
static get styles(): CSSStyleSheet[];
|
|
28
21
|
render(): import("lit-html").TemplateResult<1>;
|
|
29
|
-
firstUpdated(props: PropertyValues<this>): void;
|
|
30
|
-
updated(props: PropertyValues<any>): void;
|
|
31
22
|
}
|