@aquera/nile-elements 0.0.73 → 0.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +12 -0
  2. package/dist/index.iife.js +159 -208
  3. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  4. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  5. package/dist/nile-calendar/nile-calendar.css.esm.js +8 -0
  6. package/dist/nile-card/nile-card.css.cjs.js +1 -1
  7. package/dist/nile-card/nile-card.css.cjs.js.map +1 -1
  8. package/dist/nile-card/nile-card.css.esm.js +4 -4
  9. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  10. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  11. package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
  12. package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
  13. package/dist/nile-checkbox/nile-checkbox.css.esm.js +30 -47
  14. package/dist/nile-checkbox/nile-checkbox.esm.js +56 -54
  15. package/dist/nile-input/nile-input.css.cjs.js +1 -1
  16. package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
  17. package/dist/nile-input/nile-input.css.esm.js +2 -2
  18. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  19. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  20. package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
  21. package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
  22. package/dist/nile-tag/nile-tag.css.esm.js +50 -91
  23. package/dist/nile-tag/nile-tag.esm.js +13 -14
  24. package/dist/src/nile-calendar/nile-calendar.css.js +8 -0
  25. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  26. package/dist/src/nile-card/nile-card.css.js +2 -2
  27. package/dist/src/nile-card/nile-card.css.js.map +1 -1
  28. package/dist/src/nile-checkbox/nile-checkbox.css.js +30 -47
  29. package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
  30. package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -4
  31. package/dist/src/nile-checkbox/nile-checkbox.js +63 -67
  32. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  33. package/dist/src/nile-input/nile-input.css.js +2 -2
  34. package/dist/src/nile-input/nile-input.css.js.map +1 -1
  35. package/dist/src/nile-tag/nile-tag.css.js +48 -89
  36. package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
  37. package/dist/src/nile-tag/nile-tag.d.ts +2 -1
  38. package/dist/src/nile-tag/nile-tag.js +30 -13
  39. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  40. package/dist/tsconfig.tsbuildinfo +1 -1
  41. package/package.json +1 -1
  42. package/src/nile-calendar/nile-calendar.css.ts +8 -0
  43. package/src/nile-card/nile-card.css.ts +2 -2
  44. package/src/nile-checkbox/nile-checkbox.css.ts +34 -51
  45. package/src/nile-checkbox/nile-checkbox.ts +111 -108
  46. package/src/nile-input/nile-input.css.ts +2 -2
  47. package/src/nile-tag/nile-tag.css.ts +48 -89
  48. package/src/nile-tag/nile-tag.ts +34 -15
@@ -1,2 +1,2 @@
1
- System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,t;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function execute(){_export("s",t=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .calendar-container {\n font-family: var(--nile-font-family-serif);\n width: 290px;\n height: auto;\n text-align: center;\n background: white;\n border-radius: 8px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .header-divider {\n background: #c7ced4;\n height: 1px;\n width: 100%;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n padding: 0 12px 0 12px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n gap: 4px 7px;\n }\n\n .days {\n height: auto;\n padding: 0 12px 12px 12px;\n }\n\n .day {\n flex-basis: auto;\n min-width: 32px;\n min-height: 32px;\n flex-grow: 0;\n flex-shrink: 0;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .current-date {\n border: 1px solid #1978b8;\n }\n\n .day:hover {\n background-color: #e5e9eb;\n }\n\n .filler {\n color: #7f7f7f;\n pointer-events: none;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .selected-date:hover {\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 290px;\n border-radius: 8px;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date:hover,\n .range-start:hover,\n .range-end:hover {\n background: #a5d3f3;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 8px;\n width: 290px;\n }\n\n .base__relative {\n width: 352px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding: 0 16px;\n width: 290px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .calender-input--relative {\n width: 352px;\n padding: 0;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n width: auto;\n }\n\n .manual-input {\n width: 125px;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-container {\n width: 100%;\n text-align: right;\n padding: 12px 16px 16px 16px;\n box-sizing: border-box;\n }\n\n .calendar-config {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n }\n\n .calendar-switcher {\n width: 100%;\n margin-right: 24px;\n margin-top: 16px;\n }\n\n .calendar-switch {\n padding-bottom: 12px;\n cursor: pointer;\n }\n\n .calendar-switch__active {\n padding-bottom: 12px;\n border-bottom: 4px solid #005ea6;\n }\n\n .unit-container {\n display: flex;\n flex-direction: column;\n width: 352px;\n gap: 10px;\n padding: 24px 24px 0 24px;\n }\n\n .time-unit-group {\n display: flex;\n flex-direction: column;\n align-items: start;\n justify-content: center;\n gap: 12px;\n }\n\n .time-unit-name {\n width: 54px;\n }\n\n .time-unit-name span {\n margin-right: 24px;\n color: var(--color-text-default, #000);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .time-unit-value {\n display: flex;\n gap: 3px;\n }\n\n .time-value {\n display: inline-flex;\n width: 48px;\n height: 32px;\n box-sizing: border-box;\n padding: 5px;\n border: 1px solid #ddd;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n /* margin-right: 16px; */\n border-radius: 4px;\n border: 1px solid #c7ced4;\n background: rgba(255, 255, 255, 0.2);\n }\n\n .time-value--selected {\n background: #a5d3f3;\n }\n\n .time-value:last-child {\n margin-right: 0;\n }\n\n .time-value:hover {\n background: #e5e9eb;\n }\n\n .time-value--selected:hover {\n background-color: #a5d3f3;\n }\n\n .hidden {\n display: none !important;\n }\n\n .calendar-timezone {\n padding: 0 16px;\n }\n\n .unit-input-container {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n padding: 0px 24px;\n }\n\n .button-container--relative {\n width: 100%;\n text-align: right;\n padding: 24px;\n box-sizing: border-box;\n }\n\n .duration-input {\n width: 140px;\n }\n\n .time-input {\n width: 140px;\n }\n\n .minute-values {\n gap: 16px;\n }\n\n .weeks-values {\n gap: 16px;\n }\n\n .months-values {\n gap: 16px;\n }\n\n .not-allowed {\n pointer-events: none;\n color: var(--nile-colors-dark-500);\n }\n"]))));}};});
1
+ System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,t;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function execute(){_export("s",t=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n }\n\n .calendar-container {\n font-family: var(--nile-font-family-serif);\n width: 290px;\n height: auto;\n text-align: center;\n background: white;\n border-radius: 8px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .header-divider {\n background: #c7ced4;\n height: 1px;\n width: 100%;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n padding: 0 12px 0 12px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n gap: 4px 7px;\n }\n \n @media not all and (min-resolution: .001dpcm) { \n @supports (-webkit-appearance:none) \n { .day-names, .days {\n column-gap: 6px; \n } \n } \n }\n\n .days {\n height: auto;\n padding: 0 12px 12px 12px;\n }\n\n .day {\n flex-basis: auto;\n min-width: 32px;\n min-height: 32px;\n flex-grow: 0;\n flex-shrink: 0;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .current-date {\n border: 1px solid #1978b8;\n }\n\n .day:hover {\n background-color: #e5e9eb;\n }\n\n .filler {\n color: #7f7f7f;\n pointer-events: none;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .selected-date:hover {\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 290px;\n border-radius: 8px;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date:hover,\n .range-start:hover,\n .range-end:hover {\n background: #a5d3f3;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 8px;\n width: 290px;\n }\n\n .base__relative {\n width: 352px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding: 0 16px;\n width: 290px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .calender-input--relative {\n width: 352px;\n padding: 0;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n width: auto;\n }\n\n .manual-input {\n width: 125px;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-container {\n width: 100%;\n text-align: right;\n padding: 12px 16px 16px 16px;\n box-sizing: border-box;\n }\n\n .calendar-config {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n }\n\n .calendar-switcher {\n width: 100%;\n margin-right: 24px;\n margin-top: 16px;\n }\n\n .calendar-switch {\n padding-bottom: 12px;\n cursor: pointer;\n }\n\n .calendar-switch__active {\n padding-bottom: 12px;\n border-bottom: 4px solid #005ea6;\n }\n\n .unit-container {\n display: flex;\n flex-direction: column;\n width: 352px;\n gap: 10px;\n padding: 24px 24px 0 24px;\n }\n\n .time-unit-group {\n display: flex;\n flex-direction: column;\n align-items: start;\n justify-content: center;\n gap: 12px;\n }\n\n .time-unit-name {\n width: 54px;\n }\n\n .time-unit-name span {\n margin-right: 24px;\n color: var(--color-text-default, #000);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .time-unit-value {\n display: flex;\n gap: 3px;\n }\n\n .time-value {\n display: inline-flex;\n width: 48px;\n height: 32px;\n box-sizing: border-box;\n padding: 5px;\n border: 1px solid #ddd;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n /* margin-right: 16px; */\n border-radius: 4px;\n border: 1px solid #c7ced4;\n background: rgba(255, 255, 255, 0.2);\n }\n\n .time-value--selected {\n background: #a5d3f3;\n }\n\n .time-value:last-child {\n margin-right: 0;\n }\n\n .time-value:hover {\n background: #e5e9eb;\n }\n\n .time-value--selected:hover {\n background-color: #a5d3f3;\n }\n\n .hidden {\n display: none !important;\n }\n\n .calendar-timezone {\n padding: 0 16px;\n }\n\n .unit-input-container {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n padding: 0px 24px;\n }\n\n .button-container--relative {\n width: 100%;\n text-align: right;\n padding: 24px;\n box-sizing: border-box;\n }\n\n .duration-input {\n width: 140px;\n }\n\n .time-input {\n width: 140px;\n }\n\n .minute-values {\n gap: 16px;\n }\n\n .weeks-values {\n gap: 16px;\n }\n\n .months-values {\n gap: 16px;\n }\n\n .not-allowed {\n pointer-events: none;\n color: var(--nile-colors-dark-500);\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-calendar.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-calendar.css.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: var(--nile-font-family-serif);\n width: 290px;\n height: auto;\n text-align: center;\n background: white;\n border-radius: 8px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .header-divider {\n background: #c7ced4;\n height: 1px;\n width: 100%;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n padding: 0 12px 0 12px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n gap: 4px 7px;\n }\n\n .days {\n height: auto;\n padding: 0 12px 12px 12px;\n }\n\n .day {\n flex-basis: auto;\n min-width: 32px;\n min-height: 32px;\n flex-grow: 0;\n flex-shrink: 0;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .current-date {\n border: 1px solid #1978b8;\n }\n\n .day:hover {\n background-color: #e5e9eb;\n }\n\n .filler {\n color: #7f7f7f;\n pointer-events: none;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .selected-date:hover {\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 290px;\n border-radius: 8px;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date:hover,\n .range-start:hover,\n .range-end:hover {\n background: #a5d3f3;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 8px;\n width: 290px;\n }\n\n .base__relative {\n width: 352px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding: 0 16px;\n width: 290px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .calender-input--relative {\n width: 352px;\n padding: 0;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n width: auto;\n }\n\n .manual-input {\n width: 125px;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-container {\n width: 100%;\n text-align: right;\n padding: 12px 16px 16px 16px;\n box-sizing: border-box;\n }\n\n .calendar-config {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n }\n\n .calendar-switcher {\n width: 100%;\n margin-right: 24px;\n margin-top: 16px;\n }\n\n .calendar-switch {\n padding-bottom: 12px;\n cursor: pointer;\n }\n\n .calendar-switch__active {\n padding-bottom: 12px;\n border-bottom: 4px solid #005ea6;\n }\n\n .unit-container {\n display: flex;\n flex-direction: column;\n width: 352px;\n gap: 10px;\n padding: 24px 24px 0 24px;\n }\n\n .time-unit-group {\n display: flex;\n flex-direction: column;\n align-items: start;\n justify-content: center;\n gap: 12px;\n }\n\n .time-unit-name {\n width: 54px;\n }\n\n .time-unit-name span {\n margin-right: 24px;\n color: var(--color-text-default, #000);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .time-unit-value {\n display: flex;\n gap: 3px;\n }\n\n .time-value {\n display: inline-flex;\n width: 48px;\n height: 32px;\n box-sizing: border-box;\n padding: 5px;\n border: 1px solid #ddd;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n /* margin-right: 16px; */\n border-radius: 4px;\n border: 1px solid #c7ced4;\n background: rgba(255, 255, 255, 0.2);\n }\n\n .time-value--selected {\n background: #a5d3f3;\n }\n\n .time-value:last-child {\n margin-right: 0;\n }\n\n .time-value:hover {\n background: #e5e9eb;\n }\n\n .time-value--selected:hover {\n background-color: #a5d3f3;\n }\n\n .hidden {\n display: none !important;\n }\n\n .calendar-timezone {\n padding: 0 16px;\n }\n\n .unit-input-container {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n padding: 0px 24px;\n }\n\n .button-container--relative {\n width: 100%;\n text-align: right;\n padding: 24px;\n box-sizing: border-box;\n }\n\n .duration-input {\n width: 140px;\n }\n\n .time-input {\n width: 140px;\n }\n\n .minute-values {\n gap: 16px;\n }\n\n .weeks-values {\n gap: 16px;\n }\n\n .months-values {\n gap: 16px;\n }\n\n .not-allowed {\n pointer-events: none;\n color: var(--nile-colors-dark-500);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-calendar.css.cjs.js","sources":["../../../src/nile-calendar/nile-calendar.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * DatePicker CSS\n */\nexport const styles = css`\n :host {\n }\n\n .calendar-container {\n font-family: var(--nile-font-family-serif);\n width: 290px;\n height: auto;\n text-align: center;\n background: white;\n border-radius: 8px;\n }\n\n .calendar-header {\n display: flex;\n justify-content: space-between;\n padding: 10px;\n padding: 22px 20px;\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .header-divider {\n background: #c7ced4;\n height: 1px;\n width: 100%;\n }\n\n .calendar-header__month-navigation {\n cursor: pointer;\n }\n\n .divider {\n width: 100%;\n height: 1px;\n background: #c7ced4;\n }\n\n .day-names {\n font-size: 14px;\n font-weight: 600;\n line-height: 14px;\n letter-spacing: 0.2px;\n height: 50px;\n padding: 0 12px 0 12px;\n }\n\n .day-names,\n .days {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n gap: 4px 7px;\n }\n \n @media not all and (min-resolution: .001dpcm) { \n @supports (-webkit-appearance:none) \n { .day-names, .days {\n column-gap: 6px; \n } \n } \n }\n\n .days {\n height: auto;\n padding: 0 12px 12px 12px;\n }\n\n .day {\n flex-basis: auto;\n min-width: 32px;\n min-height: 32px;\n flex-grow: 0;\n flex-shrink: 0;\n box-sizing: border-box;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n }\n\n .current-date {\n border: 1px solid #1978b8;\n }\n\n .day:hover {\n background-color: #e5e9eb;\n }\n\n .filler {\n color: #7f7f7f;\n pointer-events: none;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .selected-date:hover {\n background: #a5d3f3;\n }\n\n .calendar-wrapper {\n background: white;\n display: flex;\n justify-content: space-between;\n width: 290px;\n border-radius: 8px;\n }\n\n .selected-date,\n .range-start,\n .range-end {\n border-radius: 4px;\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date:hover,\n .range-start:hover,\n .range-end:hover {\n background: #a5d3f3;\n }\n\n .range-start {\n background: #a5d3f3;\n border-radius: 4px 0 0 4px;\n color: white;\n }\n\n .range-end {\n background: #a5d3f3;\n border-radius: 0 4px 4px 0;\n color: white;\n }\n\n .range-middle {\n background: #a5d3f3;\n color: white;\n border-radius: 0;\n }\n\n .day.selected {\n background: #a5d3f3;\n color: white;\n border-radius: 4px;\n }\n\n .day.in-range {\n background: #a5d3f3;\n color: white;\n }\n\n .selected-date {\n color: white;\n border-radius: 4px;\n background: #a5d3f3;\n }\n\n .base {\n background-color: white;\n border-radius: 8px;\n width: 290px;\n }\n\n .base__relative {\n width: 352px;\n }\n\n .calender-input {\n margin-top: 6px;\n padding: 0 16px;\n width: 290px;\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n }\n\n .calender-input--relative {\n width: 352px;\n padding: 0;\n }\n\n .from {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n margin-top: 12px;\n width: auto;\n }\n\n .manual-input {\n width: 125px;\n }\n\n .manual-input-label {\n color: #7f7f7f;\n font-family: Colfax-regular;\n font-size: 12px;\n font-weight: 500;\n line-height: 12px;\n letter-spacing: 0.2px;\n }\n\n .button-container {\n width: 100%;\n text-align: right;\n padding: 12px 16px 16px 16px;\n box-sizing: border-box;\n }\n\n .calendar-config {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 12px;\n }\n\n .calendar-switcher {\n width: 100%;\n margin-right: 24px;\n margin-top: 16px;\n }\n\n .calendar-switch {\n padding-bottom: 12px;\n cursor: pointer;\n }\n\n .calendar-switch__active {\n padding-bottom: 12px;\n border-bottom: 4px solid #005ea6;\n }\n\n .unit-container {\n display: flex;\n flex-direction: column;\n width: 352px;\n gap: 10px;\n padding: 24px 24px 0 24px;\n }\n\n .time-unit-group {\n display: flex;\n flex-direction: column;\n align-items: start;\n justify-content: center;\n gap: 12px;\n }\n\n .time-unit-name {\n width: 54px;\n }\n\n .time-unit-name span {\n margin-right: 24px;\n color: var(--color-text-default, #000);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .time-unit-value {\n display: flex;\n gap: 3px;\n }\n\n .time-value {\n display: inline-flex;\n width: 48px;\n height: 32px;\n box-sizing: border-box;\n padding: 5px;\n border: 1px solid #ddd;\n cursor: pointer;\n justify-content: center;\n align-items: center;\n /* margin-right: 16px; */\n border-radius: 4px;\n border: 1px solid #c7ced4;\n background: rgba(255, 255, 255, 0.2);\n }\n\n .time-value--selected {\n background: #a5d3f3;\n }\n\n .time-value:last-child {\n margin-right: 0;\n }\n\n .time-value:hover {\n background: #e5e9eb;\n }\n\n .time-value--selected:hover {\n background-color: #a5d3f3;\n }\n\n .hidden {\n display: none !important;\n }\n\n .calendar-timezone {\n padding: 0 16px;\n }\n\n .unit-input-container {\n display: flex;\n justify-content: space-between;\n gap: 8px;\n padding: 0px 24px;\n }\n\n .button-container--relative {\n width: 100%;\n text-align: right;\n padding: 24px;\n box-sizing: border-box;\n }\n\n .duration-input {\n width: 140px;\n }\n\n .time-input {\n width: 140px;\n }\n\n .minute-values {\n gap: 16px;\n }\n\n .weeks-values {\n gap: 16px;\n }\n\n .months-values {\n gap: 16px;\n }\n\n .not-allowed {\n pointer-events: none;\n color: var(--nile-colors-dark-500);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -55,6 +55,14 @@ import{i as e}from"../index-0a3007c5.esm.js";const t=e`
55
55
  align-items: center;
56
56
  gap: 4px 7px;
57
57
  }
58
+
59
+ @media not all and (min-resolution: .001dpcm) {
60
+ @supports (-webkit-appearance:none)
61
+ { .day-names, .days {
62
+ column-gap: 6px;
63
+ }
64
+ }
65
+ }
58
66
 
59
67
  .days {
60
68
  height: auto;
@@ -1,2 +1,2 @@
1
- System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var r,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){r=_index001CjsJs.i;}],execute:function execute(){_export("s",o=r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --border-color: var(--nile-card-color-border);\n --border-radius: 8px;\n --border-width: 0.5px;\n --padding: 18px;\n display: inline-block;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n justify-items: strecth;\n background-color: var(--nile-colors-white-base);\n border: solid var(--border-width) var(--border-color);\n border-radius: var(--border-radius);\n min-width: 273px;\n max-width: 350px;\n overflow: hidden;\n }\n\n .body__wrapper {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px 0 16px;\n }\n\n .body__wrapper_nf {\n padding: 12px 16px 16px 16px;\n }\n .card__header {\n display: block;\n }\n\n .card__body {\n display: block;\n }\n\n .card__footer {\n margin-top: 12px;\n display: block;\n box-sizing: border-box;\n align-content: center;\n align-items: center;\n padding: 8px 16px;\n background-color: #f9fafb;\n height: 40px;\n }\n\n .card:not(.card--has-footer) .card__footer {\n display: none;\n }\n\n .card:hover {\n box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),\n 0px 2px 4px -2px rgba(16, 24, 40, 0.06);\n border: solid 1px var(--border-color);\n }\n"]))));}};});
1
+ System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,r;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function execute(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --border-color: var(--nile-card-color-border);\n --border-radius: 8px;\n --border-width: 0.5px;\n --padding: 18px;\n display: inline-block;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n justify-items: strecth;\n background-color: var(--nile-colors-white-base);\n outline: solid var(--border-width) var(--border-color);\n border-radius: var(--border-radius);\n min-width: 273px;\n max-width: 350px;\n overflow: hidden;\n }\n\n .body__wrapper {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px 0 16px;\n }\n\n .body__wrapper_nf {\n padding: 12px 16px 16px 16px;\n }\n .card__header {\n display: block;\n }\n\n .card__body {\n display: block;\n }\n\n .card__footer {\n margin-top: 12px;\n display: block;\n box-sizing: border-box;\n align-content: center;\n align-items: center;\n padding: 8px 16px;\n background-color: #f9fafb;\n height: 40px;\n }\n\n .card:not(.card--has-footer) .card__footer {\n display: none;\n }\n\n .card:hover {\n box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),\n 0px 2px 4px -2px rgba(16, 24, 40, 0.06);\n outline: solid 1px var(--border-color);\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-card.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-card.css.cjs.js","sources":["../../../src/nile-card/nile-card.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Card CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --border-color: var(--nile-card-color-border);\n --border-radius: 8px;\n --border-width: 0.5px;\n --padding: 18px;\n display: inline-block;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n justify-items: strecth;\n background-color: var(--nile-colors-white-base);\n border: solid var(--border-width) var(--border-color);\n border-radius: var(--border-radius);\n min-width: 273px;\n max-width: 350px;\n overflow: hidden;\n }\n\n .body__wrapper {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px 0 16px;\n }\n\n .body__wrapper_nf {\n padding: 12px 16px 16px 16px;\n }\n .card__header {\n display: block;\n }\n\n .card__body {\n display: block;\n }\n\n .card__footer {\n margin-top: 12px;\n display: block;\n box-sizing: border-box;\n align-content: center;\n align-items: center;\n padding: 8px 16px;\n background-color: #f9fafb;\n height: 40px;\n }\n\n .card:not(.card--has-footer) .card__footer {\n display: none;\n }\n\n .card:hover {\n box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),\n 0px 2px 4px -2px rgba(16, 24, 40, 0.06);\n border: solid 1px var(--border-color);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-card.css.cjs.js","sources":["../../../src/nile-card/nile-card.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Card CSS\n */\nexport const styles = css`\n :host {\n box-sizing: border-box;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n --border-color: var(--nile-card-color-border);\n --border-radius: 8px;\n --border-width: 0.5px;\n --padding: 18px;\n display: inline-block;\n }\n\n .card {\n display: flex;\n flex-direction: column;\n justify-items: strecth;\n background-color: var(--nile-colors-white-base);\n outline: solid var(--border-width) var(--border-color);\n border-radius: var(--border-radius);\n min-width: 273px;\n max-width: 350px;\n overflow: hidden;\n }\n\n .body__wrapper {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px 0 16px;\n }\n\n .body__wrapper_nf {\n padding: 12px 16px 16px 16px;\n }\n .card__header {\n display: block;\n }\n\n .card__body {\n display: block;\n }\n\n .card__footer {\n margin-top: 12px;\n display: block;\n box-sizing: border-box;\n align-content: center;\n align-items: center;\n padding: 8px 16px;\n background-color: #f9fafb;\n height: 40px;\n }\n\n .card:not(.card--has-footer) .card__footer {\n display: none;\n }\n\n .card:hover {\n box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),\n 0px 2px 4px -2px rgba(16, 24, 40, 0.06);\n outline: solid 1px var(--border-color);\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{i as r}from"../index-0a3007c5.esm.js";const o=r`
1
+ import{i as o}from"../index-0a3007c5.esm.js";const r=o`
2
2
  :host {
3
3
  box-sizing: border-box;
4
4
  }
@@ -26,7 +26,7 @@ import{i as r}from"../index-0a3007c5.esm.js";const o=r`
26
26
  flex-direction: column;
27
27
  justify-items: strecth;
28
28
  background-color: var(--nile-colors-white-base);
29
- border: solid var(--border-width) var(--border-color);
29
+ outline: solid var(--border-width) var(--border-color);
30
30
  border-radius: var(--border-radius);
31
31
  min-width: 273px;
32
32
  max-width: 350px;
@@ -69,6 +69,6 @@ import{i as r}from"../index-0a3007c5.esm.js";const o=r`
69
69
  .card:hover {
70
70
  box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),
71
71
  0px 2px 4px -2px rgba(16, 24, 40, 0.06);
72
- border: solid 1px var(--border-color);
72
+ outline: solid 1px var(--border-color);
73
73
  }
74
- `;export{o as s};
74
+ `;export{r as s};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,o,c,l,h,n,r,a,d,p,b,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,m;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;i=_index001CjsJs.A;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;o=_litDecoratorsJs.state;c=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){l=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){n=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){a=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){d=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){p=_internalNileElementCjsJs.N;},function(_property002CjsJs){b=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",m=/*#__PURE__*/function(_p){function m(){var _this;_classCallCheck(this,m);_this=_callSuper(this,m),_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.subLabel="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(m,_p);return _createClass(m,[{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("valueChange",{composed:!0,bubbles:!0,detail:{checked:this.checked}}));}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(m.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(m.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(m.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass(),this.checkboxIconContainer.style.height=this.labelContainer.scrollHeight+"px";}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,s=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class="," \n >\n <div class=\"checkbox__icon__container\">\n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n <!-- An empty title prevents browser validation tooltips from appearing on hover -->\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n ","\n ","\n </span>\n </div>\n\n <div part=\"label\" class=\"checkbox__label\" style=\"","\">\n ","\n ","\n <slot></slot>\n </div>\n </label>\n\n ","\n ","\n "])),h({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate}),this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.title,this.name,r(this.value),a(this.indeterminate),a(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"",this.label||this.subLabel?"":"margin-left:0;",this.label?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<span class=\"checkbox__label__text\">","</span>"])),this.label):"",this.subLabel?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<span class=\"checkbox__sublabel__text\">","</span>"])),this.subLabel):"",e?t(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):i,s?t(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["<nile-form-error-message>","</nile-form-error-message>"])),this.errorMessage):i);}}]);}(p));m.styles=l,e([s('input[type="checkbox"]')],m.prototype,"input",void 0),e([o()],m.prototype,"hasFocus",void 0),e([b()],m.prototype,"title",void 0),e([b()],m.prototype,"name",void 0),e([b()],m.prototype,"value",void 0),e([b({reflect:!0})],m.prototype,"size",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"disabled",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"checked",void 0),e([b({type:String,reflect:!0})],m.prototype,"label",void 0),e([b({type:String,reflect:!0,attribute:"sub-label"})],m.prototype,"subLabel",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"indeterminate",void 0),e([n("checked")],m.prototype,"defaultChecked",void 0),e([b({attribute:"help-text",reflect:!0})],m.prototype,"helpText",void 0),e([b({attribute:"error-message",reflect:!0})],m.prototype,"errorMessage",void 0),e([b({type:Boolean})],m.prototype,"showHelpText",void 0),e([b({reflect:!0})],m.prototype,"form",void 0),e([b({type:Boolean,reflect:!0})],m.prototype,"required",void 0),e([s(".checkbox__label__text")],m.prototype,"labelContainer",void 0),e([s("div.checkbox__icon__container")],m.prototype,"checkboxIconContainer",void 0),e([d(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],m.prototype,"handleStateChange",null),_export("N",m=e([c("nile-checkbox")],m));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-checkbox.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var e,t,i,s,o,c,l,h,r,n,a,d,m,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,p;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){e=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.query;s=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileCheckboxCssCjsJs){c=_nileCheckboxCssCjsJs.s;},function(_litDirectivesClassMapJs){l=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){h=_internalDefaultValueCjsJs.d;},function(_litDirectivesIfDefinedJs){r=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){n=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){d=_internalNileElementCjsJs.N;},function(_property002CjsJs){m=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",p=/*#__PURE__*/function(_d){function p(){var _this;_classCallCheck(this,p);_this=_callSuper(this,p),_this.hasFocus=!1,_this.title="",_this.name="",_this.size="medium",_this.disabled=!1,_this.checked=!1,_this.label="",_this.indeterminate=!1,_this.defaultChecked=!1,_this.helpText="",_this.errorMessage="",_this.showHelpText=!1,_this.form="",_this.required=!1;return _this;}_inherits(p,_d);return _createClass(p,[{key:"toggleHelpText",value:function toggleHelpText(){this.showHelpText=!this.showHelpText;}},{key:"handleClick",value:function handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("valueChange",{composed:!0,bubbles:!0,detail:{checked:this.checked}}));}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("blur");}},{key:"handleInput",value:function handleInput(){this.emit("input");}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("focus");}},{key:"handleStateChange",value:function handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate;}},{key:"click",value:function click(){this.input.click();}},{key:"focus",value:function focus(e){this.input.focus(e);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"connectedCallback",value:function connectedCallback(){_get(_getPrototypeOf(p.prototype),"connectedCallback",this).call(this),this.updateHostClass(),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(p.prototype),"disconnectedCallback",this).call(this),this.emit("nile-destroy");}},{key:"updated",value:function updated(e){_get(_getPrototypeOf(p.prototype),"updated",this).call(this,e),e.has("helpText")&&this.updateHostClass();}},{key:"updateHostClass",value:function updateHostClass(){this.helpText?this.classList.add("full-width"):this.classList.remove("full-width");}},{key:"render",value:function render(){var e=!!this.helpText,i=!!this.errorMessage;return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <label\n part=\"base\"\n class=","\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=","\n name=","\n value=","\n .indeterminate=","\n .checked=","\n .disabled=","\n .required=","\n aria-checked=","\n @click=","\n @input=","\n @blur=","\n @focus=","\n />\n \n <span\n part=\"control","","\"\n class=\"checkbox__control\"\n >\n ","\n ","\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ","\n <slot></slot>\n </div>\n </label>\n \n ","\n \n ","\n "])),l({checkbox:!0,"checkbox--checked":this.checked,"checkbox--disabled":this.disabled,"checkbox--focused":this.hasFocus,"checkbox--indeterminate":this.indeterminate,"checkbox--medium":"medium"===this.size}),this.title,this.name,r(this.value),n(this.indeterminate),n(this.checked),this.disabled,this.required,this.checked?"true":"false",this.handleClick,this.handleInput,this.handleBlur,this.handleFocus,this.checked?" control--checked":"",this.indeterminate?" control--indeterminate":"",this.checked?t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n "]))):"",!this.checked&&this.indeterminate?t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n "]))):"","boolean"==typeof this.label?"":this.label,e?t(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["\n <nile-tooltip content=\"","\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n "])),this.helpText):"",i?t(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"");}}]);}(d));p.styles=c,e([i('input[type="checkbox"]')],p.prototype,"input",void 0),e([s()],p.prototype,"hasFocus",void 0),e([m()],p.prototype,"title",void 0),e([m()],p.prototype,"name",void 0),e([m()],p.prototype,"value",void 0),e([m({reflect:!0})],p.prototype,"size",void 0),e([m({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),e([m({type:Boolean,reflect:!0})],p.prototype,"checked",void 0),e([m({type:String,reflect:!0})],p.prototype,"label",void 0),e([m({type:Boolean,reflect:!0})],p.prototype,"indeterminate",void 0),e([h("checked")],p.prototype,"defaultChecked",void 0),e([m({attribute:"help-text",reflect:!0})],p.prototype,"helpText",void 0),e([m({attribute:"error-message",reflect:!0})],p.prototype,"errorMessage",void 0),e([m({type:Boolean})],p.prototype,"showHelpText",void 0),e([m({reflect:!0})],p.prototype,"form",void 0),e([m({type:Boolean,reflect:!0})],p.prototype,"required",void 0),e([a(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],p.prototype,"handleStateChange",null),_export("N",p=e([o("nile-checkbox")],p));}};});
2
2
  //# sourceMappingURL=nile-checkbox.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n LitElement,\n html,\n property,\n nothing,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n\n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n\n static styles: CSSResultGroup = styles;\n\n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n\n @state() private hasFocus = false;\n\n @property() title = ''; // make reactive to pass through\n\n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n\n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n\n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n\n /** Sublabel, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true, attribute: 'sub-label' }) subLabel = '';\n\n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n @property({ type: Boolean }) showHelpText = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n @query('.checkbox__label__text') labelContainer:HTMLElement;\n\n @query('div.checkbox__icon__container') checkboxIconContainer:HTMLElement;\n\n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.dispatchEvent(\n new CustomEvent('valueChange', {\n composed: true,\n bubbles: true,\n detail: {\n checked: this.checked,\n },\n })\n );\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n\n private handleInput() {\n this.emit('input');\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n\n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n\n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n\n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n this.checkboxIconContainer.style.height=this.labelContainer.scrollHeight+'px';\n }\n\n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n\n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate\n })} \n >\n <div class=\"checkbox__icon__container\">\n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n <!-- An empty title prevents browser validation tooltips from appearing on hover -->\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${ this.title }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n </div>\n\n <div part=\"label\" class=\"checkbox__label\" style=\"${!this.label && !this.subLabel?'margin-left:0;':''}\">\n ${this.label ? html`<span class=\"checkbox__label__text\">${this.label}</span>` : ``}\n ${this.subLabel ? html`<span class=\"checkbox__sublabel__text\">${this.subLabel}</span>` : ``}\n <slot></slot>\n </div>\n </label>\n\n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : nothing}\n ${hasErrorMessage\n ? html`<nile-form-error-message>${this.errorMessage}</nile-form-error-message>`\n : nothing}\n `;\n }\n}\n\nexport default NileCheckbox;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}\n"],"names":["NileCheckbox","m","constructor","super","this","hasFocus","title","name","size","disabled","checked","label","subLabel","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_p","_createClass","key","value","handleClick","dispatchEvent","CustomEvent","composed","bubbles","detail","handleBlur","emit","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","checkboxIconContainer","style","height","labelContainer","scrollHeight","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_templateObject6","nothing","_templateObject7","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","attribute","defaultValue","watch","waitUntilFirstUpdate","_export","customElement"],"mappings":"64JAuDaA,4BACX,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EACEC,KAAAA,CAAAA,UAAAA,MAAAA,CAAAA,EAOeC,KAAAA,CAAQC,UAAG,CAEhBD,CAAAA,KAAAA,CAAAE,KAAQ,CAAA,EAAA,CAGRF,KAAAA,CAAIG,IAAAA,CAAG,GAMUH,KAAAA,CAAII,IAAAA,CAAiC,QAGtBJ,CAAAA,KAAAA,CAAQK,QAAG,CAAA,CAAA,CAAA,CAGXL,KAAAA,CAAOM,OAAG,CAAA,CAAA,CAAA,CAGXN,KAAAA,CAAKO,KAAAA,CAAG,EAGgBP,CAAAA,KAAAA,CAAQQ,SAAG,EAMlCR,CAAAA,KAAAA,CAAaS,aAAG,CAAA,CAAA,CAAA,CAGnCT,KAAAA,CAAcU,cAAAA,CAAAA,CAAG,EAEWV,KAAAA,CAAQW,QAAAA,CAAG,EAEPX,CAAAA,KAAAA,CAAYY,YAAG,CAAA,EAAA,CAE3CZ,KAAAA,CAAYa,YAAG,CAAA,CAAA,CAAA,CAOfb,KAAAA,CAAIc,IAAAA,CAAG,EAGQd,CAAAA,KAAAA,CAAQe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F,CAAA6E,CAAAA,SAAAA,CAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAE9CF,EAAA,CAA5BI,CAAAA,CAAS,CAAEE,IAAAA,CAAMC,OAAgClF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6E,UAAA,cAAA,CAAA,IAAA,EAAA,CAAA,CAOrBF,CAAA,CAAA,CAA5BI,CAAS,CAAA,CAAEC,SAAS,CAAkBhF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6E,UAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAGKF,EAAA,CAA3CI,CAAAA,CAAS,CAAEE,IAAAA,CAAMC,OAASF,CAAAA,OAAAA,CAAAA,CAAS,KAAyBhF,CAAA6E,CAAAA,SAAAA,CAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CAE5BF,CAAA,CAAA,CAAhCC,EAAM,wBAAqD5E,CAAAA,CAAAA,CAAAA,CAAAA,CAAA6E,SAAA,CAAA,gBAAA,CAAA,IAAA,EAEpBF,CAAAA,CAAAA,CAAAA,CAAA,CAAvCC,CAAM,CAAA,+BAAA,CAAA,CAAA,CAAmE5E,EAAA6E,SAAA,CAAA,uBAAA,CAAA,IAAA,IA+B1EF,CAAA,CAAA,CADCW,CAAM,CAAA,CAAC,SAAW,CAAA,eAAA,CAAA,CAAkB,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAI5DvF,CAAA6E,CAAAA,SAAAA,CAAA,mBAAA,CAAA,IAAA,CAAA,CAAAW,OAAA,KA/FUxF,EAAY2E,CAAA,CAAA,CADxBc,CAAc,CAAA,eAAA,CAAA,CAAA,CACFzF"}
1
+ {"version":3,"file":"nile-checkbox.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-checkbox.css';\n \nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n \n/**\n * @summary Checkboxes allow the user to toggle an option on or off.\n *\n * @dependency nile-icon\n *\n * @slot - The checkbox's label.\n *\n * @event nile-blur - Emitted when the checkbox loses focus.\n * @event nile-change - Emitted when the checked state changes.\n * @event nile-focus - Emitted when the checkbox gains focus.\n * @event nile-input - Emitted when the checkbox receives input.\n * @event nile-invalid - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n *\n * @csspart base - The component's base wrapper.\n * @csspart control - The square container that wraps the checkbox's checked state.\n * @csspart control--checked - Matches the control part when the checkbox is checked.\n * @csspart control--indeterminate - Matches the control part when the checkbox is indeterminate.\n * @csspart checked-icon - The checked icon, an `<nile-icon>` element.\n * @csspart indeterminate-icon - The indeterminate icon, an `<nile-icon>` element.\n * @csspart label - The container that wraps the checkbox's label.\n */\n \n/**\n * Nile icon component.\n *\n * @tag nile-checkbox\n *\n */\n@customElement('nile-checkbox')\nexport class NileCheckbox extends NileElement {\n constructor() {\n super();\n }\n \n static styles: CSSResultGroup = styles;\n \n @query('input[type=\"checkbox\"]') input: HTMLInputElement;\n \n @state() private hasFocus = false;\n \n @property() title = ''; // make reactive to pass through\n \n /** The name of the checkbox, submitted as a name/value pair with form data. */\n @property() name = '';\n \n /** The current value of the checkbox, submitted as a name/value pair with form data. */\n @property() value: boolean;\n \n /** The checkbox's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n \n /** Disables the checkbox. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n \n /** Draws the checkbox in a checked state. */\n @property({ type: Boolean, reflect: true }) checked = false;\n \n /** Label, declared this property for backward compatibility of old component */\n @property({ type: String, reflect: true }) label = '';\n \n /**\n * Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\n * all/none\" behavior when associated checkboxes have a mix of checked and unchecked states.\n */\n @property({ type: Boolean, reflect: true }) indeterminate = false;\n \n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue('checked') defaultChecked = false;\n \n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n \n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n \n @property({ type: Boolean }) showHelpText = false;\n \n \n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n \n /** Makes the checkbox a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n \n private toggleHelpText() {\n this.showHelpText = !this.showHelpText;\n }\n \n private handleClick() {\n this.checked = !this.checked;\n this.indeterminate = false;\n this.dispatchEvent(\n new CustomEvent('valueChange', {\n composed: true,\n bubbles: true,\n detail: {\n checked: this.checked,\n },\n })\n );\n }\n \n private handleBlur() {\n this.hasFocus = false;\n this.emit('blur');\n }\n \n private handleInput() {\n this.emit('input');\n }\n \n private handleFocus() {\n this.hasFocus = true;\n this.emit('focus');\n }\n \n @watch(['checked', 'indeterminate'], { waitUntilFirstUpdate: true })\n handleStateChange() {\n this.input.checked = this.checked; // force a sync update\n this.input.indeterminate = this.indeterminate; // force a sync update\n }\n \n /** Simulates a click on the checkbox. */\n click() {\n this.input.click();\n }\n \n /** Sets focus on the checkbox. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n \n /** Removes focus from the checkbox. */\n blur() {\n this.input.blur();\n }\n \n connectedCallback() {\n super.connectedCallback();\n this.updateHostClass();\n this.emit('nile-init');\n }\n \n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n \n updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated(changedProperties);\n if (changedProperties.has('helpText')) {\n this.updateHostClass();\n }\n }\n \n private updateHostClass() {\n if (this.helpText) {\n this.classList.add('full-width');\n } else {\n this.classList.remove('full-width');\n }\n }\n \n render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n \n return html`\n <label\n part=\"base\"\n class=${classMap({\n checkbox: true,\n 'checkbox--checked': this.checked,\n 'checkbox--disabled': this.disabled,\n 'checkbox--focused': this.hasFocus,\n 'checkbox--indeterminate': this.indeterminate,\n 'checkbox--medium': this.size === 'medium',\n })}\n >\n <input\n class=\"checkbox__input\"\n type=\"checkbox\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${this.name}\n value=${ifDefined(this.value)}\n .indeterminate=${live(this.indeterminate)}\n .checked=${live(this.checked)}\n .disabled=${this.disabled}\n .required=${this.required}\n aria-checked=${this.checked ? 'true' : 'false'}\n @click=${this.handleClick}\n @input=${this.handleInput}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n />\n \n <span\n part=\"control${this.checked ? ' control--checked' : ''}${this\n .indeterminate\n ? ' control--indeterminate'\n : ''}\"\n class=\"checkbox__control\"\n >\n ${this.checked\n ? html`\n <nile-icon\n part=\"checked-icon\"\n class=\"checkbox__checked-icon\"\n color=\"white\"\n library=\"system\"\n name=\"tick\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n ${!this.checked && this.indeterminate\n ? html`\n <nile-icon\n part=\"indeterminate-icon\"\n class=\"checkbox__indeterminate-icon\"\n library=\"system\"\n color=\"white\"\n name=\"minus\"\n size=\"12\"\n ></nile-icon>\n `\n : ''}\n </span>\n \n <div part=\"label\" class=\"checkbox__label\">\n ${typeof this.label === 'boolean' ? '' : this.label}\n <slot></slot>\n </div>\n </label>\n \n ${hasHelpText\n ? html`\n <nile-tooltip content=\"${this.helpText}\" placement=\"bottom\">\n <nile-icon\n name=\"question\"\n class=\"checkbox__helptext-icon\"\n ></nile-icon>\n </nile-tooltip>\n `\n : ``}\n \n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n \nexport default NileCheckbox;\n \ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-checkbox': NileCheckbox;\n }\n}"],"names":["NileCheckbox","p","constructor","super","this","hasFocus","title","name","size","disabled","checked","label","indeterminate","defaultChecked","helpText","errorMessage","showHelpText","form","required","_this","_inherits","_d","_createClass","key","value","toggleHelpText","handleClick","dispatchEvent","CustomEvent","composed","bubbles","detail","handleBlur","emit","handleInput","handleFocus","handleStateChange","input","click","focus","options","blur","connectedCallback","updateHostClass","disconnectedCallback","updated","changedProperties","has","classList","add","remove","render","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","checkbox","ifDefined","live","_templateObject2","_templateObject3","_templateObject4","_templateObject5","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","String","defaultValue","attribute","watch","waitUntilFirstUpdate","customElement"],"mappings":"s1JAuDaA,4BACX,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,EACEC,KAAAA,CAAAA,UAAAA,MAAAA,CAAAA,EAOeC,KAAAA,CAAQC,UAAG,CAEhBD,CAAAA,KAAAA,CAAAE,KAAQ,CAAA,EAAA,CAGRF,KAAAA,CAAIG,IAAAA,CAAG,GAMUH,KAAAA,CAAII,IAAAA,CAAiC,QAGtBJ,CAAAA,KAAAA,CAAQK,QAAG,CAAA,CAAA,CAAA,CAGXL,KAAAA,CAAOM,OAAG,CAAA,CAAA,CAAA,CAGXN,KAAAA,CAAKO,KAAAA,CAAG,EAMPP,CAAAA,KAAAA,CAAaQ,eAAG,CAGnCR,CAAAA,KAAAA,CAAcS,gBAAG,CAEWT,CAAAA,KAAAA,CAAQU,SAAG,EAEPV,CAAAA,KAAAA,CAAYW,YAAG,CAAA,E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C,CAAAA,OAAAA,CAASF,SAAS,CAAyBxE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqE,SAAA,CAAA,UAAA,CAAA,IAAA,IAmC7DF,CAAA,CAAA,CADCW,EAAM,CAAC,SAAA,CAAW,iBAAkB,CAAEC,oBAAAA,CAAAA,CAAsB,KAI5D/E,CAAAqE,CAAAA,SAAAA,CAAA,oBAAA,IA7FUrE,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYmE,EAAA,CADxBa,CAAAA,CAAc,kBACFhF"}
@@ -1,2 +1,2 @@
1
- System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function execute(){_export("s",o=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: inline-block;\n }\n\n :host(.full-width) {\n width: 100%;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: stretch;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--only__subtitle{\n align-items: center;\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 3px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-family: var(--nile-font-family-serif);\n margin-left: 8px;\n user-select: none;\n color: var(--nile-colors-dark-900);\n font-style: normal;\n letter-spacing: 0.2px;\n box-sizing: border-box;\n }\n\n .checkbox__icon__container{\n display:flex;\n align-items:center;\n }\n\n .checkbox__label__text {\n display: block;\n font-size: 14px;\n font-weight: 500;\n color: #344054;\n }\n\n .checkbox__sublabel__text {\n display: block;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #475467;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n"]))));}};});
1
+ System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var e,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){e=_index001CjsJs.i;}],execute:function execute(){_export("s",o=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: inline-block;\n }\n \n :host(.full-width) {\n width: 100%;\n }\n \n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: top;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n \n .checkbox--medium {\n --toggle-size: var(--nile-type-scale-3);\n font-size: var(--nile-type-scale-3);\n }\n \n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 4px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n \n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n \n /* svg {\n display:none !important;\n } */\n \n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n \n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n \n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n \n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n \n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n \n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n \n \n .checkbox__label {\n display: inline-block;\n line-height: 14px;\n font-size: 14px;\n margin-inline-start: 0.5em;\n user-select: none;\n margin-top: 2px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-style: normal;\n font-weight: 400;\n letter-spacing: 0.2px;\n }\n \n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n \n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n \n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n \n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-checkbox.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-checkbox.css.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Checkbox CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n\n :host(.full-width) {\n width: 100%;\n }\n\n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: stretch;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n\n .checkbox--only__subtitle{\n align-items: center;\n }\n\n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 3px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n\n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n\n /* svg {\n display:none !important;\n } */\n\n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n\n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n\n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n\n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n\n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n\n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n\n .checkbox__label {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n font-family: var(--nile-font-family-serif);\n margin-left: 8px;\n user-select: none;\n color: var(--nile-colors-dark-900);\n font-style: normal;\n letter-spacing: 0.2px;\n box-sizing: border-box;\n }\n\n .checkbox__icon__container{\n display:flex;\n align-items:center;\n }\n\n .checkbox__label__text {\n display: block;\n font-size: 14px;\n font-weight: 500;\n color: #344054;\n }\n\n .checkbox__sublabel__text {\n display: block;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n color: #475467;\n }\n\n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n\n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n\n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-checkbox.css.cjs.js","sources":["../../../src/nile-checkbox/nile-checkbox.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n \nimport { css } from 'lit-element';\n \n/**\n * Checkbox CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n \n :host(.full-width) {\n width: 100%;\n }\n \n .checkbox {\n position: relative;\n display: inline-flex;\n align-items: top;\n font-weight: 400;\n color: var(--nile-colors-dark-900);\n vertical-align: middle;\n cursor: pointer;\n }\n \n .checkbox--medium {\n --toggle-size: var(--nile-type-scale-3);\n font-size: var(--nile-type-scale-3);\n }\n \n .checkbox__control {\n flex: 0 0 auto;\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--nile-type-scale-3);\n height: var(--nile-type-scale-3);\n border: solid 1px var(--nile-checkbox-color-border-standard);\n background-color: var(--nile-checkbox-color-background-standard);\n border-radius: 4px;\n transition: var(--nile-transition-duration-default border-color),\n var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default box-shadow);\n }\n \n .checkbox__input {\n position: absolute;\n opacity: 0;\n padding: 0;\n margin: 0;\n pointer-events: none;\n }\n \n /* svg {\n display:none !important;\n } */\n \n /* Hover */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-hover);\n border: 1px solid var(--nile-checkbox-color-border-hover);\n border-radius: 4px;\n }\n \n /* Focus */\n .checkbox:not(.checkbox--checked):not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);\n outline-offset: 1px;\n }\n \n /* Checked/indeterminate */\n .checkbox--checked .checkbox__control,\n .checkbox--indeterminate .checkbox__control {\n border-color: var(--nile-checkbox-color-border-checked-standard);\n background-color: var(--nile-checkbox-color-background-checked-standard);\n }\n \n /* Checked/indeterminate + hover */\n .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__control:hover {\n background: var(--nile-checkbox-color-background-checked-hover);\n border: 1px solid var(--nile-checkbox-color-border-checked-hover);\n }\n \n /* Checked/indeterminate + focus */\n .checkbox.checkbox--checked:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control,\n .checkbox.checkbox--indeterminate:not(.checkbox--disabled)\n .checkbox__input:focus-visible\n ~ .checkbox__control {\n outline: solid 3px var(--nile-checkbox-color-outline-standard);\n outline-offset: 1px;\n }\n \n /* Disabled */\n .checkbox--disabled {\n opacity: 0.3;\n cursor: not-allowed;\n }\n \n \n .checkbox__label {\n display: inline-block;\n line-height: 14px;\n font-size: 14px;\n margin-inline-start: 0.5em;\n user-select: none;\n margin-top: 2px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-style: normal;\n font-weight: 400;\n letter-spacing: 0.2px;\n }\n \n :host([required]) .checkbox__label::after {\n content: '*';\n margin-inline-start: -2px;\n }\n \n .checkbox__checked-icon {\n --nile-svg-stroke: white;\n }\n \n .checkbox__indeterminate-icon {\n --nile-svg-stroke: white;\n }\n \n .checkbox__helptext-icon {\n float: right;\n cursor: pointer;\n margin-right: 12px;\n }\n`;\n \nexport default [styles];"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -2,25 +2,26 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
2
2
  :host {
3
3
  display: inline-block;
4
4
  }
5
-
5
+
6
6
  :host(.full-width) {
7
7
  width: 100%;
8
8
  }
9
-
9
+
10
10
  .checkbox {
11
11
  position: relative;
12
12
  display: inline-flex;
13
- align-items: stretch;
13
+ align-items: top;
14
14
  font-weight: 400;
15
15
  color: var(--nile-colors-dark-900);
16
16
  vertical-align: middle;
17
17
  cursor: pointer;
18
18
  }
19
-
20
- .checkbox--only__subtitle{
21
- align-items: center;
19
+
20
+ .checkbox--medium {
21
+ --toggle-size: var(--nile-type-scale-3);
22
+ font-size: var(--nile-type-scale-3);
22
23
  }
23
-
24
+
24
25
  .checkbox__control {
25
26
  flex: 0 0 auto;
26
27
  position: relative;
@@ -31,13 +32,13 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
31
32
  height: var(--nile-type-scale-3);
32
33
  border: solid 1px var(--nile-checkbox-color-border-standard);
33
34
  background-color: var(--nile-checkbox-color-background-standard);
34
- border-radius: 3px;
35
+ border-radius: 4px;
35
36
  transition: var(--nile-transition-duration-default border-color),
36
37
  var(--nile-transition-duration-default) background-color,
37
38
  var(--nile-transition-duration-default) color,
38
39
  var(--nile-transition-duration-default box-shadow);
39
40
  }
40
-
41
+
41
42
  .checkbox__input {
42
43
  position: absolute;
43
44
  opacity: 0;
@@ -45,11 +46,11 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
45
46
  margin: 0;
46
47
  pointer-events: none;
47
48
  }
48
-
49
+
49
50
  /* svg {
50
51
  display:none !important;
51
52
  } */
52
-
53
+
53
54
  /* Hover */
54
55
  .checkbox:not(.checkbox--checked):not(.checkbox--disabled)
55
56
  .checkbox__control:hover {
@@ -57,7 +58,7 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
57
58
  border: 1px solid var(--nile-checkbox-color-border-hover);
58
59
  border-radius: 4px;
59
60
  }
60
-
61
+
61
62
  /* Focus */
62
63
  .checkbox:not(.checkbox--checked):not(.checkbox--disabled)
63
64
  .checkbox__input:focus-visible
@@ -65,14 +66,14 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
65
66
  outline: solid 3px hsl(198.6 88.7% 48.4% / 40%);
66
67
  outline-offset: 1px;
67
68
  }
68
-
69
+
69
70
  /* Checked/indeterminate */
70
71
  .checkbox--checked .checkbox__control,
71
72
  .checkbox--indeterminate .checkbox__control {
72
73
  border-color: var(--nile-checkbox-color-border-checked-standard);
73
74
  background-color: var(--nile-checkbox-color-background-checked-standard);
74
75
  }
75
-
76
+
76
77
  /* Checked/indeterminate + hover */
77
78
  .checkbox.checkbox--checked:not(.checkbox--disabled) .checkbox__control:hover,
78
79
  .checkbox.checkbox--indeterminate:not(.checkbox--disabled)
@@ -80,7 +81,7 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
80
81
  background: var(--nile-checkbox-color-background-checked-hover);
81
82
  border: 1px solid var(--nile-checkbox-color-border-checked-hover);
82
83
  }
83
-
84
+
84
85
  /* Checked/indeterminate + focus */
85
86
  .checkbox.checkbox--checked:not(.checkbox--disabled)
86
87
  .checkbox__input:focus-visible
@@ -91,59 +92,41 @@ import{i as e}from"../index-0a3007c5.esm.js";const o=e`
91
92
  outline: solid 3px var(--nile-checkbox-color-outline-standard);
92
93
  outline-offset: 1px;
93
94
  }
94
-
95
+
95
96
  /* Disabled */
96
97
  .checkbox--disabled {
97
98
  opacity: 0.3;
98
99
  cursor: not-allowed;
99
100
  }
100
-
101
+
102
+
101
103
  .checkbox__label {
102
- display: flex;
103
- flex-direction: column;
104
- justify-content: flex-start;
105
- font-family: var(--nile-font-family-serif);
106
- margin-left: 8px;
104
+ display: inline-block;
105
+ line-height: 14px;
106
+ font-size: 14px;
107
+ margin-inline-start: 0.5em;
107
108
  user-select: none;
109
+ margin-top: 2px;
108
110
  color: var(--nile-colors-dark-900);
111
+ font-family: Colfax-regular;
109
112
  font-style: normal;
110
- letter-spacing: 0.2px;
111
- box-sizing: border-box;
112
- }
113
-
114
- .checkbox__icon__container{
115
- display:flex;
116
- align-items:center;
117
- }
118
-
119
- .checkbox__label__text {
120
- display: block;
121
- font-size: 14px;
122
- font-weight: 500;
123
- color: #344054;
124
- }
125
-
126
- .checkbox__sublabel__text {
127
- display: block;
128
- font-size: 14px;
129
113
  font-weight: 400;
130
- line-height: 20px;
131
- color: #475467;
114
+ letter-spacing: 0.2px;
132
115
  }
133
-
116
+
134
117
  :host([required]) .checkbox__label::after {
135
118
  content: '*';
136
119
  margin-inline-start: -2px;
137
120
  }
138
-
121
+
139
122
  .checkbox__checked-icon {
140
123
  --nile-svg-stroke: white;
141
124
  }
142
-
125
+
143
126
  .checkbox__indeterminate-icon {
144
127
  --nile-svg-stroke: white;
145
128
  }
146
-
129
+
147
130
  .checkbox__helptext-icon {
148
131
  float: right;
149
132
  cursor: pointer;