@aquera/nile-elements 0.0.118 → 0.0.119
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/demo/variables.css +2 -2
- package/demo/variables_v2.css +2 -2
- package/dist/nile-calendar/nile-calendar.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
- package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
- package/dist/nile-calendar/nile-calendar.css.esm.js +7 -11
- package/dist/nile-calendar/nile-calendar.esm.js +4 -3
- package/dist/nile-input/nile-input.cjs.js +1 -1
- package/dist/nile-input/nile-input.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.esm.js +4 -3
- package/dist/nile-link/index.cjs.js +1 -1
- package/dist/nile-link/index.esm.js +1 -1
- package/dist/nile-link/nile-link.cjs.js +1 -1
- package/dist/nile-link/nile-link.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.css.cjs.js +1 -1
- package/dist/nile-link/nile-link.css.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.css.esm.js +1 -0
- package/dist/nile-link/nile-link.esm.js +6 -5
- package/dist/nile-link/nile-link.test.cjs.js +1 -1
- package/dist/nile-link/nile-link.test.cjs.js.map +1 -1
- package/dist/nile-link/nile-link.test.esm.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js +1 -1
- package/dist/nile-select/nile-select.css.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.css.esm.js +2 -2
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.cjs.js.map +1 -1
- package/dist/nile-slide-toggle/nile-slide-toggle.css.esm.js +26 -5
- package/dist/nile-slide-toggle/nile-slide-toggle.esm.js +8 -6
- package/dist/src/nile-calendar/nile-calendar.css.js +5 -9
- package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.d.ts +1 -1
- package/dist/src/nile-calendar/nile-calendar.js +10 -3
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-input/nile-input.js +4 -3
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-link/nile-link.css.js +1 -0
- package/dist/src/nile-link/nile-link.css.js.map +1 -1
- package/dist/src/nile-link/nile-link.d.ts +1 -0
- package/dist/src/nile-link/nile-link.js +7 -2
- package/dist/src/nile-link/nile-link.js.map +1 -1
- package/dist/src/nile-select/nile-select.css.js +2 -2
- package/dist/src/nile-select/nile-select.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js +26 -5
- package/dist/src/nile-slide-toggle/nile-slide-toggle.css.js.map +1 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.d.ts +2 -0
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js +17 -1
- package/dist/src/nile-slide-toggle/nile-slide-toggle.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-calendar/nile-calendar.css.ts +5 -9
- package/src/nile-calendar/nile-calendar.ts +10 -4
- package/src/nile-input/nile-input.ts +5 -4
- package/src/nile-link/nile-link.css.ts +1 -0
- package/src/nile-link/nile-link.ts +5 -2
- package/src/nile-select/nile-select.css.ts +2 -2
- package/src/nile-slide-toggle/nile-slide-toggle.css.ts +26 -5
- package/src/nile-slide-toggle/nile-slide-toggle.ts +15 -2
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-select.css.js","sourceRoot":"","sources":["../../../src/nile-select/nile-select.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6bxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 * Select_2 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 .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: 12px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 14px;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: inherit;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: #666666;\n margin-top: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif);\n font-weight: 400;\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: #333333;\n cursor: inherit;\n overflow: hidden;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif);\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif);\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: #333333;\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: no-wrap;\n margin-inline-start: 0.5rem;\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: #005ea6;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n margin: 6px;\n }\n\n .select__tags-count-clearable {\n margin-right: 50px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: #ffffff;\n border: solid 1px #cccccc;\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid #000;\n background: #fff;\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: #f4f4f4;\n border-color: #cccccc;\n color: #999999;\n opacity: 0.5;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .select--error .select__combobox {\n border-color: #e5434d;\n }\n\n .select--success {\n border-color: #43e5c0;\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: #f4f4f4;\n color: #333333;\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: #f4f4f4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: 4px;\n font-size: 14px;\n padding: 12px;\n height: 40px;\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: 0;\n }\n\n .select--medium .select__tags {\n gap: 3px;\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: 2.5rem;\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: #005ea6;\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: #999999;\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: 0.25rem;\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 400;\n background: #ffffff;\n border: solid 1px #cccccc;\n border-radius: 0.25rem;\n padding-block: 0;\n padding-inline: 0;\n overflow: auto;\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n }\n\n .select__options__search-enabled {\n padding-top: 10px;\n }\n\n .select__options {\n font-size: 14px;\n color: rgb(133, 129, 129);\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: 0.25rem;\n }\n\n .select__listbox::slotted(small) {\n font-size: 0.875rem;\n font-weight: 600;\n color: #888888;\n padding-block: 0.25rem;\n padding-inline: 1rem;\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: 8px;\n background-color: white;\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: #fafafa;\n border: 1px solid #e5e9eb;\n display: flex;\n height: 15px;\n /* Auto layout */\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 8px 12px 16px;\n gap: 12px;\n justify-content: space-between;\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: 20px;\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: 10px;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible{\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: 12px;\n }\n \n .select__hide-default{\n display: none;\n }\n`;\n\nexport default [styles];\n"]}
|
1
|
+
{"version":3,"file":"nile-select.css.js","sourceRoot":"","sources":["../../../src/nile-select/nile-select.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,GAAG,EAAC,MAAM,aAAa,CAAC;AAEhC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6bxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 * Select_2 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 .form-control .form-control__label {\n display: none;\n }\n\n .form-control .form-control__help-text {\n display: none;\n }\n\n /* Label */\n .form-control--has-label .form-control__label {\n display: block;\n margin-bottom: 6px;\n color: var(--nile-colors-dark-900);\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0.2px;\n }\n\n .form-control--has-label.form-control--medium .form-control__label {\n font-size: 14px;\n }\n\n :host([required]) .form-control--has-label .form-control__label::after {\n content: '*';\n margin-inline-start: -2px;\n color: inherit;\n }\n\n /* Help text */\n .form-control--has-help-text .form-control__help-text {\n display: block;\n color: #666666;\n margin-top: 0.75rem;\n }\n\n .form-control--has-help-text.form-control--medium .form-control__help-text {\n font-size: 0.875rem;\n }\n\n .form-control--has-help-text.form-control--radio-group\n .form-control__help-text {\n margin-top: 0.25rem;\n }\n\n :host {\n display: block;\n }\n\n /** The popup */\n .select {\n flex: 1 1 auto;\n display: inline-flex;\n width: 100%;\n position: relative;\n vertical-align: middle;\n }\n\n .select::part(popup) {\n z-index: 9999;\n }\n\n .select[data-current-placement^='top']::part(popup) {\n transform-origin: bottom;\n }\n\n .select[data-current-placement^='bottom']::part(popup) {\n transform-origin: top;\n }\n\n /* Combobox */\n .select__combobox {\n flex: 1;\n display: flex;\n width: 100%;\n min-width: 0;\n position: relative;\n align-items: center;\n justify-content: start;\n font-family: var(--nile-font-family-sans-serif);\n font-weight: 400;\n letter-spacing: normal;\n vertical-align: middle;\n overflow: hidden;\n cursor: pointer;\n transition: 150ms color, 150ms border, 150ms box-shadow,\n 150ms background-color;\n }\n\n .select__display-input {\n position: relative;\n width: 100%;\n font: inherit;\n border: none;\n background: none;\n color: #333333;\n cursor: inherit;\n overflow: hidden;\n padding: 0;\n margin: 0;\n -webkit-appearance: none;\n font-family: var(--nile-font-family-serif);\n }\n\n .select__display-input::placeholder {\n font-family: var(--nile-font-family-serif);\n }\n\n .select:not(.select--disabled):hover .select__display-input {\n color: #333333;\n }\n\n .select__display-input:focus {\n outline: none;\n }\n\n /* Visually hide the display input when multiple is enabled */\n .select--multiple:not(.select--placeholder-visible) .select__display-input {\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0;\n }\n\n .select__value-input {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n opacity: 0;\n z-index: -1;\n }\n\n .select__tags {\n display: flex;\n flex: 1;\n align-items: center;\n flex-wrap: no-wrap;\n margin-inline-start: 0.5rem;\n width: 100%;\n overflow: hidden;\n }\n\n .select__tags-count {\n color: #005ea6;\n font-family: Colfax-regular;\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 14px;\n letter-spacing: 0.2px;\n margin: 6px;\n }\n\n .select__tags-count-clearable {\n margin-right: 50px;\n }\n\n .select__tags::slotted(nile-tag) {\n cursor: pointer !important;\n }\n\n .select--disabled .select__tags,\n .select--disabled .select__tags::slotted(nile-tag) {\n cursor: not-allowed !important;\n }\n\n /* Standard selects */\n .select--standard .select__combobox {\n background-color: #ffffff;\n border: solid 1px #cccccc;\n }\n\n .select--standard .select__combobox:hover {\n border: 1px solid #000;\n background: #fff;\n }\n\n .select--standard.select--disabled .select__combobox {\n background-color: #f4f4f4;\n border-color: #cccccc;\n color: #999999;\n opacity: 0.5;\n cursor: not-allowed;\n outline: none;\n }\n\n .select--standard:not(.select--disabled).select--open .select__combobox,\n .select--standard:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--warning .select__combobox {\n border-color: var(--nile-colors-yellow-500);\n }\n\n .select--error .select__combobox {\n border-color: #e5434d;\n }\n\n .select--success {\n border-color: #43e5c0;\n }\n\n /* Filled selects */\n .select--filled .select__combobox {\n border: none;\n background-color: #f4f4f4;\n color: #333333;\n }\n\n .select--filled:hover:not(.select--disabled) .select__combobox {\n background-color: #f4f4f4;\n }\n\n .select--filled.select--disabled .select__combobox {\n background-color: #f4f4f4;\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .select--filled:not(.select--disabled).select--open .select__combobox,\n .select--filled:not(.select--disabled).select--focused .select__combobox {\n background-color: #f4f4f4;\n outline: 3px solid rgba(0, 89, 255, 0.4);\n }\n\n .select--medium .select__combobox {\n border-radius: 4px;\n font-size: 14px;\n padding: 12px;\n height: 40px;\n box-sizing: border-box;\n }\n\n .select--medium .select__clear {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium .select__prefix::slotted(*) {\n margin-inline-end: 0.75rem;\n }\n\n .select--medium .select__prefix.multiple::slotted(*) {\n margin-inline-start: 0.75rem;\n }\n\n .select--medium.select--multiple:not(.select--placeholder-visible)\n .select__combobox {\n padding-inline-start: 0;\n }\n\n .select--medium .select__tags {\n gap: 3px;\n }\n\n /* Pills */\n .select--pill.select--medium .select__combobox {\n border-radius: 2.5rem;\n }\n\n /* Prefix */\n .select__prefix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n .select__suffix {\n flex: 0;\n display: inline-flex;\n align-items: center;\n color: #aaaaaa;\n }\n\n /* Clear button */\n .select__clear {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: inherit;\n color: #005ea6;\n border: none;\n background: none;\n padding: 0;\n transition: 150ms color;\n cursor: pointer;\n }\n\n .select__clear:hover {\n color: #999999;\n }\n\n .select__clear:focus {\n outline: none;\n }\n\n /* Expand icon */\n .select__expand-icon {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n transition: 250ms rotate ease;\n rotate: 0;\n margin-inline-start: 0.25rem;\n }\n\n .select--open .select__expand-icon {\n rotate: -180deg;\n }\n\n /* Listbox */\n .select__listbox {\n display: block;\n position: relative;\n font-size: 1rem;\n font-weight: 400;\n background: #ffffff;\n border: solid 1px #cccccc;\n border-radius: 0.25rem;\n padding-block: 0;\n padding-inline: 0;\n overflow: auto;\n overscroll-behavior: none;\n /* Make sure it adheres to the popup's auto size */\n max-width: var(--auto-size-available-width);\n max-height: var(--auto-size-available-height);\n }\n\n .select__options__search-enabled {\n padding-top: 10px;\n }\n\n .select__options {\n font-size: 14px;\n color: rgb(133, 129, 129);\n }\n\n .select__listbox::slotted(nile-divider) {\n --spacing: 0.25rem;\n }\n\n .select__listbox::slotted(small) {\n font-size: 0.875rem;\n font-weight: 600;\n color: #888888;\n padding-block: 0.25rem;\n padding-inline: 1rem;\n }\n\n .select__search {\n position: sticky;\n top: 0px;\n z-index: 1;\n width: calc(100% - 16px);\n padding: 8px;\n background-color: white;\n margin-bottom: -8px;\n }\n\n .select__footer {\n position: sticky;\n bottom: 0px;\n background: #fafafa;\n border: 1px solid #e5e9eb;\n display: flex;\n height: 15px;\n /* Auto layout */\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n padding: 8px 12px 16px;\n gap: 12px;\n justify-content: space-between;\n }\n\n .tag__prefix[slot='prefix'] {\n height: 14px;\n display: inline-block;\n overflow: hidden;\n }\n\n .tag__prefix[slot='prefix'] img {\n max-height: 100%;\n }\n\n .select__loader {\n width: 100%;\n text-align: center;\n display: block;\n }\n\n .select__loader--icon {\n margin-top: 20px;\n animation: spin 0.6s linear infinite;\n }\n\n .select__no-results {\n padding: 10px;\n }\n\n @keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .select__invisible{\n opacity: 0;\n }\n\n .select__prefix--from-options {\n margin-inline-end: 12px;\n }\n \n .select__hide-default{\n display: none;\n }\n`;\n\nexport default [styles];\n"]}
|
@@ -1,8 +1,20 @@
|
|
1
1
|
import { css } from 'lit';
|
2
2
|
export default css `
|
3
|
+
:host{
|
4
|
+
--slide-toggle-width:auto;
|
5
|
+
display:inline-block;
|
6
|
+
width:var(--slide-toggle-width);
|
7
|
+
}
|
8
|
+
|
3
9
|
.nile-slide-toggle {
|
4
10
|
display: inline-flex;
|
5
11
|
align-items: baseline;
|
12
|
+
justify-content:space-between;
|
13
|
+
width:100%;
|
14
|
+
}
|
15
|
+
|
16
|
+
.nile-slide-toggle--reverse{
|
17
|
+
flex-direction:row-reverse;
|
6
18
|
}
|
7
19
|
|
8
20
|
.nile-slide-toggle__switch {
|
@@ -12,24 +24,33 @@ export default css `
|
|
12
24
|
width: 36px;
|
13
25
|
height: 20px;
|
14
26
|
line-height: 22px;
|
27
|
+
}
|
28
|
+
|
29
|
+
.nile-slide-toggle__switch--left{
|
15
30
|
margin-right: 8px;
|
16
31
|
}
|
17
32
|
|
33
|
+
.nile-slide-toggle__switch--right{
|
34
|
+
margin-left: 8px;
|
35
|
+
}
|
36
|
+
|
18
37
|
.nile-slide-toggle__label {
|
19
38
|
display: flex;
|
20
39
|
flex-direction: column;
|
21
|
-
|
22
|
-
color: var(--nile-colors-gray-light-mode-700);
|
40
|
+
gap: 2px;
|
23
41
|
font-family: var(--nile-font-family-serif);
|
24
|
-
|
42
|
+
letter-spacing: 0.2px;
|
25
43
|
font-style: normal;
|
44
|
+
color: var(--nile-colors-dark-900);
|
45
|
+
font-size: 14px;
|
26
46
|
font-weight: 500;
|
27
47
|
line-height: 20px;
|
28
|
-
letter-spacing: 0.2px;
|
29
|
-
gap: 2px;
|
30
48
|
}
|
31
49
|
|
32
50
|
.nile-slide-toggle__sublabel {
|
51
|
+
font-family: var(--nile-font-family-serif);
|
52
|
+
letter-spacing: 0.2px;
|
53
|
+
font-style: normal;
|
33
54
|
color: var(--nile-colors-gray-light-mode-600);
|
34
55
|
font-size: 12px;
|
35
56
|
font-weight: 400;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-slide-toggle.css.js","sourceRoot":"","sources":["../../../src/nile-slide-toggle/nile-slide-toggle.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,eAAe,GAAG,CAAA
|
1
|
+
{"version":3,"file":"nile-slide-toggle.css.js","sourceRoot":"","sources":["../../../src/nile-slide-toggle/nile-slide-toggle.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmIjB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport default css`\n :host{\n --slide-toggle-width:auto;\n display:inline-block;\n width:var(--slide-toggle-width);\n }\n\n .nile-slide-toggle {\n display: inline-flex;\n align-items: baseline;\n justify-content:space-between;\n width:100%;\n }\n\n .nile-slide-toggle--reverse{\n flex-direction:row-reverse;\n }\n\n .nile-slide-toggle__switch {\n flex: 0 0 auto;\n position: relative;\n display: inline-block;\n width: 36px;\n height: 20px;\n line-height: 22px;\n }\n\n .nile-slide-toggle__switch--left{\n margin-right: 8px;\n }\n\n .nile-slide-toggle__switch--right{\n margin-left: 8px;\n }\n\n .nile-slide-toggle__label {\n display: flex;\n flex-direction: column;\n gap: 2px;\n font-family: var(--nile-font-family-serif);\n letter-spacing: 0.2px;\n font-style: normal;\n color: var(--nile-colors-dark-900);\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n }\n\n .nile-slide-toggle__sublabel {\n font-family: var(--nile-font-family-serif);\n letter-spacing: 0.2px;\n font-style: normal;\n color: var(--nile-colors-gray-light-mode-600);\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n }\n\n .nile-slide-toggle__switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n\n .nile-slide-toggle__slider {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: var(--nile-slide-toggle-color-background-inactive);\n transition: 0.4s;\n border-radius: 34px;\n }\n\n .nile-slide-toggle__slider:active {\n box-shadow: 0px 0px 0px 1px rgba(133, 170, 209, 0.54);\n }\n\n .nile-slide-toggle__slider:focus {\n box-shadow: 0px 0px 0px 1px rgba(133, 170, 209, 0.54);\n }\n\n .nile-slide-toggle__slider:before {\n position: absolute;\n content: '';\n height: 16px;\n width: 16px;\n bottom: 2px;\n left: 2px;\n background-color: var(--nile-slide-toggle-color-indicator);\n transition: 0.4s;\n border-radius: 50%;\n }\n\n .nile-slide-toggle__switch input:checked + .nile-slide-toggle__slider {\n background-color: var(--nile-slide-toggle-color-background-active);\n }\n\n .nile-slide-toggle__switch input:focus + .nile-slide-toggle__slider {\n box-shadow: 0 0 1px var(--nile-slide-toggle-color-background-active);\n }\n\n .nile-slide-toggle__switch input:checked + .nile-slide-toggle__slider:before {\n transform: translateX(16px);\n }\n\n .nile-slide-toggle__slider.round {\n border-radius: 20px;\n }\n\n .nile-slide-toggle__slider.round:before {\n border-radius: 50%;\n }\n\n .nile-slide--disabled .nile-slide-toggle__slider {\n background-color: #f2f4f7;\n }\n\n .nile-slide--disabled .nile-slide-toggle__switch {\n pointer-events: none;\n cursor: not-allowed;\n }\n\n .nile-slide--disabled\n .nile-slide-toggle__switch\n input:checked\n + .nile-slide-toggle__slider {\n background-color: #f2f4f7;\n }\n`;\n"]}
|
@@ -4,7 +4,9 @@ export declare class NileSlideToggle extends NileElement {
|
|
4
4
|
static styles: CSSResultGroup;
|
5
5
|
label: string;
|
6
6
|
sublabel: string;
|
7
|
+
textPosition: 'left' | 'right';
|
7
8
|
isChecked: boolean;
|
9
|
+
fullWidth: boolean;
|
8
10
|
disabled: boolean;
|
9
11
|
helpText: string;
|
10
12
|
errorMessage: string;
|
@@ -8,7 +8,9 @@ let NileSlideToggle = class NileSlideToggle extends NileElement {
|
|
8
8
|
super(...arguments);
|
9
9
|
this.label = '';
|
10
10
|
this.sublabel = '';
|
11
|
+
this.textPosition = 'right';
|
11
12
|
this.isChecked = false;
|
13
|
+
this.fullWidth = false;
|
12
14
|
this.disabled = false;
|
13
15
|
this.helpText = '';
|
14
16
|
this.errorMessage = '';
|
@@ -16,6 +18,7 @@ let NileSlideToggle = class NileSlideToggle extends NileElement {
|
|
16
18
|
connectedCallback() {
|
17
19
|
super.connectedCallback();
|
18
20
|
this.emit('nile-init');
|
21
|
+
this.style.setProperty('--slide-toggle-width', this.fullWidth ? '100%' : 'auto');
|
19
22
|
}
|
20
23
|
disconnectedCallback() {
|
21
24
|
super.disconnectedCallback();
|
@@ -34,9 +37,16 @@ let NileSlideToggle = class NileSlideToggle extends NileElement {
|
|
34
37
|
class=${classMap({
|
35
38
|
'nile-slide-toggle': true,
|
36
39
|
'nile-slide--disabled': this.disabled,
|
40
|
+
'nile-slide-toggle--reverse': this.textPosition == 'left'
|
37
41
|
})}
|
38
42
|
>
|
39
|
-
<label
|
43
|
+
<label
|
44
|
+
class="${classMap({
|
45
|
+
'nile-slide-toggle__switch': true,
|
46
|
+
'nile-slide-toggle__switch--left': this.textPosition == 'right',
|
47
|
+
'nile-slide-toggle__switch--right': this.textPosition == 'left',
|
48
|
+
})}"
|
49
|
+
class="nile-slide-toggle__switch">
|
40
50
|
<input
|
41
51
|
type="checkbox"
|
42
52
|
.checked=${this.isChecked}
|
@@ -69,9 +79,15 @@ __decorate([
|
|
69
79
|
__decorate([
|
70
80
|
property({ type: String })
|
71
81
|
], NileSlideToggle.prototype, "sublabel", void 0);
|
82
|
+
__decorate([
|
83
|
+
property({ type: String, attribute: 'text-position' })
|
84
|
+
], NileSlideToggle.prototype, "textPosition", void 0);
|
72
85
|
__decorate([
|
73
86
|
property({ type: Boolean, reflect: true })
|
74
87
|
], NileSlideToggle.prototype, "isChecked", void 0);
|
88
|
+
__decorate([
|
89
|
+
property({ type: Boolean, reflect: true, attribute: 'full-width' })
|
90
|
+
], NileSlideToggle.prototype, "fullWidth", void 0);
|
75
91
|
__decorate([
|
76
92
|
property({ type: Boolean, reflect: true })
|
77
93
|
], NileSlideToggle.prototype, "disabled", void 0);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-slide-toggle.js","sourceRoot":"","sources":["../../../src/nile-slide-toggle/nile-slide-toggle.ts"],"names":[],"mappings":";AACA,OAAO,EAAc,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGhD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,WAAW;IAAzC;;QAGuB,UAAK,GAAG,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"nile-slide-toggle.js","sourceRoot":"","sources":["../../../src/nile-slide-toggle/nile-slide-toggle.ts"],"names":[],"mappings":";AACA,OAAO,EAAc,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGhD,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,WAAW;IAAzC;;QAGuB,UAAK,GAAG,EAAE,CAAC;QAEX,aAAQ,GAAG,EAAE,CAAC;QAEa,iBAAY,GAAoB,OAAO,CAAC;QAEnD,cAAS,GAAG,KAAK,CAAC;QAEM,cAAS,GAAG,KAAK,CAAC;QAE1C,aAAQ,GAAG,KAAK,CAAC;QAER,aAAQ,GAAG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 'lit';\nimport { LitElement, html, property, customElement } from 'lit-element';\nimport styles from './nile-slide-toggle.css';\nimport NileElement from '../internal/nile-element';\nimport { classMap } from 'lit/directives/class-map.js';\n\n@customElement('nile-slide-toggle')\nexport class NileSlideToggle extends NileElement {\n public static styles: CSSResultGroup = styles;\n\n @property({ type: String }) label = '';\n\n @property({ type: String }) sublabel = '';\n\n @property({ type: String, attribute:'text-position' }) textPosition:'left' | 'right' = 'right';\n\n @property({ type: Boolean, reflect: true }) isChecked = false;\n\n @property({ type: Boolean, reflect: true, attribute:'full-width' }) fullWidth = false;\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ attribute: 'help-text', reflect: true }) helpText = '';\n\n @property({ attribute: 'error-message', reflect: true }) errorMessage = '';\n\n connectedCallback() {\n super.connectedCallback();\n this.emit('nile-init');\n this.style.setProperty('--slide-toggle-width',this.fullWidth?'100%':'auto')\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.emit('nile-destroy');\n }\n\n toggleValue() {\n this.isChecked = !this.isChecked;\n this.emit('change',{ checked: this.isChecked });\n this.emit('nile-change',{ checked: this.isChecked });\n }\n\n public render() {\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n class=${classMap({\n 'nile-slide-toggle': true,\n 'nile-slide--disabled': this.disabled,\n 'nile-slide-toggle--reverse':this.textPosition=='left'\n })}\n >\n <label \n class=\"${classMap({\n 'nile-slide-toggle__switch':true,\n 'nile-slide-toggle__switch--left':this.textPosition=='right',\n 'nile-slide-toggle__switch--right':this.textPosition=='left',\n })}\"\n class=\"nile-slide-toggle__switch\">\n <input\n type=\"checkbox\"\n .checked=${this.isChecked}\n @change=${this.toggleValue}\n />\n <span class=\"nile-slide-toggle__slider\"></span>\n </label>\n <span class=\"nile-slide-toggle__label\">\n <span>${this.label}</span>\n <span class=\"nile-slide-toggle__sublabel\">${this.sublabel}</span>\n </span>\n </div>\n ${hasHelpText\n ? html` <nile-form-help-text>${this.helpText}</nile-form-help-text> `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n `;\n }\n}\n"]}
|