@aquera/nile-elements 0.0.30 → 0.0.32
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/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.d.ts +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/index.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js +2 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.js +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js +1 -3
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/extensionSetup.d.ts +33 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/extensionSetup.js +63 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/extensionSetup.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.js +42 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.d.ts +43 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js +114 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-code-editor/nile-code-editor.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js +0 -6
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-dialog/nile-dialog.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.css.js +5 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.js +5 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-error-message/nile-error-message.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.d.ts +4 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js +16 -2
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.css.js +4 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js +4 -4
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-input/nile-input.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js +9 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-select/nile-select.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js +11 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +11 -5
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +55 -7
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.css.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.js +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-tab/nile-tab.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.css.js +4 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.js +5 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/index.d.ts +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/index.js +2 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/index.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.css.d.ts +12 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.css.js +174 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.css.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.d.ts +88 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.js +350 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-toast/nile-toast.js.map +1 -0
- package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.iife.js +672 -351
- package/dist/nile-button/nile-button.css.cjs.js +1 -1
- package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
- package/dist/nile-button/nile-button.css.esm.js +2 -2
- package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.css.cjs.js.map +1 -1
- package/dist/nile-button-toggle/nile-button-toggle.css.esm.js +12 -0
- package/dist/nile-calendar/index.cjs.js +1 -1
- package/dist/nile-calendar/index.esm.js +1 -1
- 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.esm.js +4 -6
- package/dist/nile-calendar/timezones.cjs.js +1 -1
- package/dist/nile-calendar/timezones.cjs.js.map +1 -1
- package/dist/nile-calendar/timezones.esm.js +1 -1
- package/dist/nile-code-editor/extensionSetup.cjs.js +7 -0
- package/dist/nile-code-editor/extensionSetup.cjs.js.map +1 -0
- package/dist/nile-code-editor/extensionSetup.esm.js +1 -0
- package/dist/nile-code-editor/index.cjs.js +2 -0
- package/dist/nile-code-editor/index.cjs.js.map +1 -0
- package/dist/nile-code-editor/index.esm.js +1 -0
- package/dist/nile-code-editor/nile-code-editor.cjs.js +3 -0
- package/dist/nile-code-editor/nile-code-editor.cjs.js.map +1 -0
- package/dist/nile-code-editor/nile-code-editor.css.cjs.js +2 -0
- package/dist/nile-code-editor/nile-code-editor.css.cjs.js.map +1 -0
- package/dist/nile-code-editor/nile-code-editor.css.esm.js +30 -0
- package/dist/nile-code-editor/nile-code-editor.esm.js +9 -0
- package/dist/nile-dialog/nile-dialog.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js +1 -1
- package/dist/nile-error-message/nile-error-message.css.cjs.js.map +1 -1
- package/dist/nile-error-message/nile-error-message.css.esm.js +5 -0
- package/dist/nile-error-message/nile-error-message.esm.js +6 -4
- package/dist/nile-icon-button/nile-icon-button.cjs.js +1 -1
- package/dist/nile-icon-button/nile-icon-button.cjs.js.map +1 -1
- package/dist/nile-icon-button/nile-icon-button.esm.js +5 -2
- 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.css.cjs.js +1 -1
- package/dist/nile-input/nile-input.css.cjs.js.map +1 -1
- package/dist/nile-input/nile-input.css.esm.js +4 -0
- package/dist/nile-input/nile-input.esm.js +2 -2
- package/dist/nile-select/nile-select.cjs.js +1 -1
- package/dist/nile-select/nile-select.cjs.js.map +1 -1
- package/dist/nile-select/nile-select.esm.js +2 -2
- package/dist/nile-switcher/index.cjs.js +1 -1
- package/dist/nile-switcher/index.esm.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.css.cjs.js +1 -1
- package/dist/nile-switcher/nile-switcher.css.cjs.js.map +1 -1
- package/dist/nile-switcher/nile-switcher.css.esm.js +13 -2
- package/dist/nile-switcher/nile-switcher.esm.js +38 -30
- package/dist/nile-tab/nile-tab.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.css.cjs.js +1 -1
- package/dist/nile-tab/nile-tab.css.cjs.js.map +1 -1
- package/dist/nile-tab/nile-tab.css.esm.js +1 -0
- package/dist/nile-tab/nile-tab.esm.js +1 -0
- package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.css.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.css.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.css.esm.js +4 -1
- package/dist/nile-textarea/nile-textarea.esm.js +3 -1
- package/dist/nile-toast/index.cjs.js +2 -0
- package/dist/nile-toast/index.cjs.js.map +1 -0
- package/dist/nile-toast/index.esm.js +1 -0
- package/dist/nile-toast/nile-toast.cjs.js +2 -0
- package/dist/nile-toast/nile-toast.cjs.js.map +1 -0
- package/dist/nile-toast/nile-toast.css.cjs.js +2 -0
- package/dist/nile-toast/nile-toast.css.cjs.js.map +1 -0
- package/dist/nile-toast/nile-toast.css.esm.js +162 -0
- package/dist/nile-toast/nile-toast.esm.js +74 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/nile-button/nile-button.css.js +2 -2
- package/dist/src/nile-button/nile-button.css.js.map +1 -1
- package/dist/src/nile-button-toggle/nile-button-toggle.css.js +12 -0
- package/dist/src/nile-button-toggle/nile-button-toggle.css.js.map +1 -1
- package/dist/src/nile-calendar/nile-calendar.js +1 -3
- package/dist/src/nile-calendar/nile-calendar.js.map +1 -1
- package/dist/src/nile-code-editor/extensionSetup.d.ts +33 -0
- package/dist/src/nile-code-editor/extensionSetup.js +63 -0
- package/dist/src/nile-code-editor/extensionSetup.js.map +1 -0
- package/dist/src/nile-code-editor/index.d.ts +1 -0
- package/dist/src/nile-code-editor/index.js +2 -0
- package/dist/src/nile-code-editor/index.js.map +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.css.d.ts +12 -0
- package/dist/src/nile-code-editor/nile-code-editor.css.js +42 -0
- package/dist/src/nile-code-editor/nile-code-editor.css.js.map +1 -0
- package/dist/src/nile-code-editor/nile-code-editor.d.ts +43 -0
- package/dist/src/nile-code-editor/nile-code-editor.js +114 -0
- package/dist/src/nile-code-editor/nile-code-editor.js.map +1 -0
- package/dist/src/nile-dialog/nile-dialog.js +0 -6
- package/dist/src/nile-dialog/nile-dialog.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.css.js +5 -0
- package/dist/src/nile-error-message/nile-error-message.css.js.map +1 -1
- package/dist/src/nile-error-message/nile-error-message.js +5 -2
- package/dist/src/nile-error-message/nile-error-message.js.map +1 -1
- package/dist/src/nile-icon-button/nile-icon-button.d.ts +4 -0
- package/dist/src/nile-icon-button/nile-icon-button.js +16 -2
- package/dist/src/nile-icon-button/nile-icon-button.js.map +1 -1
- package/dist/src/nile-input/nile-input.css.js +4 -0
- package/dist/src/nile-input/nile-input.css.js.map +1 -1
- package/dist/src/nile-input/nile-input.js +4 -4
- package/dist/src/nile-input/nile-input.js.map +1 -1
- package/dist/src/nile-select/nile-select.d.ts +1 -0
- package/dist/src/nile-select/nile-select.js +9 -0
- package/dist/src/nile-select/nile-select.js.map +1 -1
- package/dist/src/nile-switcher/nile-switcher.css.js +11 -0
- package/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
- package/dist/src/nile-switcher/nile-switcher.d.ts +11 -5
- package/dist/src/nile-switcher/nile-switcher.js +55 -7
- package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
- package/dist/src/nile-tab/nile-tab.css.js +1 -0
- package/dist/src/nile-tab/nile-tab.css.js.map +1 -1
- package/dist/src/nile-tab/nile-tab.js +1 -0
- package/dist/src/nile-tab/nile-tab.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.css.js +4 -1
- package/dist/src/nile-textarea/nile-textarea.css.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.js +5 -0
- package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/dist/src/nile-toast/index.d.ts +1 -0
- package/dist/src/nile-toast/index.js +2 -0
- package/dist/src/nile-toast/index.js.map +1 -0
- package/dist/src/nile-toast/nile-toast.css.d.ts +12 -0
- package/dist/src/nile-toast/nile-toast.css.js +174 -0
- package/dist/src/nile-toast/nile-toast.css.js.map +1 -0
- package/dist/src/nile-toast/nile-toast.d.ts +88 -0
- package/dist/src/nile-toast/nile-toast.js +350 -0
- package/dist/src/nile-toast/nile-toast.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.ts +3 -1
- package/src/nile-button/nile-button.css.ts +2 -2
- package/src/nile-button-toggle/nile-button-toggle.css.ts +12 -0
- package/src/nile-calendar/nile-calendar.ts +1 -5
- package/src/nile-code-editor/extensionSetup.ts +125 -0
- package/src/nile-code-editor/index.ts +1 -0
- package/src/nile-code-editor/nile-code-editor.css.ts +44 -0
- package/src/nile-code-editor/nile-code-editor.ts +127 -0
- package/src/nile-dialog/nile-dialog.ts +0 -6
- package/src/nile-error-message/nile-error-message.css.ts +5 -0
- package/src/nile-error-message/nile-error-message.ts +6 -2
- package/src/nile-icon-button/nile-icon-button.ts +24 -5
- package/src/nile-input/nile-input.css.ts +4 -0
- package/src/nile-input/nile-input.ts +6 -6
- package/src/nile-select/nile-select.ts +9 -0
- package/src/nile-switcher/nile-switcher.css.ts +11 -0
- package/src/nile-switcher/nile-switcher.ts +70 -10
- package/src/nile-tab/nile-tab.css.ts +1 -0
- package/src/nile-tab/nile-tab.ts +1 -0
- package/src/nile-textarea/nile-textarea.css.ts +4 -1
- package/src/nile-textarea/nile-textarea.ts +6 -1
- package/src/nile-toast/index.ts +1 -0
- package/src/nile-toast/nile-toast.css.ts +176 -0
- package/src/nile-toast/nile-toast.ts +381 -0
package/package.json
CHANGED
package/src/index.ts
CHANGED
@@ -29,7 +29,7 @@ export { NileErrorMessage } from './nile-error-message';
|
|
29
29
|
export { NileFormErrorMessage } from './nile-form-error-message';
|
30
30
|
export { NileFormHelpText } from './nile-form-help-text';
|
31
31
|
export { NileCalendar } from './nile-calendar';
|
32
|
-
export { NileLink} from './nile-link';
|
32
|
+
export { NileLink } from './nile-link';
|
33
33
|
export { NileButtonToggleGroup } from './nile-button-toggle-group';
|
34
34
|
export { NileButtonToggle } from './nile-button-toggle';
|
35
35
|
export { NileSwitcher } from './nile-switcher';
|
@@ -39,3 +39,5 @@ export { NileErrorNotification } from './nile-error-notification';
|
|
39
39
|
export { NileTabGroup } from './nile-tab-group';
|
40
40
|
export { NileTab } from './nile-tab';
|
41
41
|
export { NileTabPanel } from './nile-tab-panel';
|
42
|
+
export { NileCodeEditor } from './nile-code-editor';
|
43
|
+
export { NileToast } from './nile-toast';
|
@@ -121,7 +121,7 @@ export const styles = css`
|
|
121
121
|
|
122
122
|
.button--standard.button--primary:active:not(.button--disabled) {
|
123
123
|
background-color: var(--nile-colors-button-primary-pressed);
|
124
|
-
border-color: var(--nile-colors-button-primary-pressed);
|
124
|
+
border-color: var(--nile-colors-button-primary-pressed-border);
|
125
125
|
color: var(--nile-colors-button-primary-text);
|
126
126
|
}
|
127
127
|
|
@@ -184,7 +184,7 @@ export const styles = css`
|
|
184
184
|
|
185
185
|
.button--standard.button--caution:active:not(.button--disabled) {
|
186
186
|
background-color: var(--nile-colors-button-caution-pressed);
|
187
|
-
border-color: var(--nile-colors-button-caution-pressed);
|
187
|
+
border-color: var(--nile-colors-button-caution-pressed-border);
|
188
188
|
color: var(--nile-colors-button-caution-text);
|
189
189
|
}
|
190
190
|
|
@@ -31,6 +31,14 @@ export const styles = css`
|
|
31
31
|
gap: 10px;
|
32
32
|
}
|
33
33
|
|
34
|
+
.nile-button-toggle:hover {
|
35
|
+
background: var(--nile-colors-neutral-100);
|
36
|
+
}
|
37
|
+
|
38
|
+
.nile-button-toggle:active {
|
39
|
+
background: #E5E9EB;
|
40
|
+
}
|
41
|
+
|
34
42
|
.nile-button-toggle__initial {
|
35
43
|
border-radius: 4px 0 0 4px;
|
36
44
|
}
|
@@ -50,6 +58,10 @@ export const styles = css`
|
|
50
58
|
background-color: #c7ced4;
|
51
59
|
}
|
52
60
|
|
61
|
+
.nile-button-toggle__active:hover {
|
62
|
+
background-color: #c7ced4;
|
63
|
+
}
|
64
|
+
|
53
65
|
.nile-button-toggle__disabled {
|
54
66
|
cursor: not-allowed;
|
55
67
|
}
|
@@ -660,11 +660,7 @@ export class NileCalendar extends NileElement {
|
|
660
660
|
@nile-change=${this.handleTimeZoneChange}
|
661
661
|
>
|
662
662
|
<nile-option value="local">Local Time Zone</nile-option>
|
663
|
-
|
664
|
-
timeZone => html`
|
665
|
-
<nile-option value="${timeZone}">${timeZone}</nile-option>
|
666
|
-
`
|
667
|
-
)}
|
663
|
+
<nile-option value="UTC">UTC</nile-option>
|
668
664
|
</nile-select>
|
669
665
|
</div>
|
670
666
|
</div>
|
@@ -0,0 +1,125 @@
|
|
1
|
+
import {
|
2
|
+
KeyBinding,
|
3
|
+
lineNumbers,
|
4
|
+
highlightActiveLineGutter,
|
5
|
+
highlightSpecialChars,
|
6
|
+
drawSelection,
|
7
|
+
dropCursor,
|
8
|
+
rectangularSelection,
|
9
|
+
crosshairCursor,
|
10
|
+
highlightActiveLine,
|
11
|
+
keymap,
|
12
|
+
} from '@codemirror/view';
|
13
|
+
import { EditorState, Extension } from '@codemirror/state';
|
14
|
+
import { history, defaultKeymap, historyKeymap } from '@codemirror/commands';
|
15
|
+
import { highlightSelectionMatches, searchKeymap } from '@codemirror/search';
|
16
|
+
import {
|
17
|
+
closeBrackets,
|
18
|
+
autocompletion,
|
19
|
+
closeBracketsKeymap,
|
20
|
+
completionKeymap,
|
21
|
+
} from '@codemirror/autocomplete';
|
22
|
+
import {
|
23
|
+
foldGutter,
|
24
|
+
indentOnInput,
|
25
|
+
syntaxHighlighting,
|
26
|
+
defaultHighlightStyle,
|
27
|
+
bracketMatching,
|
28
|
+
indentUnit,
|
29
|
+
foldKeymap,
|
30
|
+
} from '@codemirror/language';
|
31
|
+
|
32
|
+
import { lintKeymap } from '@codemirror/lint';
|
33
|
+
|
34
|
+
export interface BasicSetupOptions extends MinimalSetupOptions {
|
35
|
+
lineNumbers?: boolean;
|
36
|
+
highlightActiveLineGutter?: boolean;
|
37
|
+
foldGutter?: boolean;
|
38
|
+
dropCursor?: boolean;
|
39
|
+
allowMultipleSelections?: boolean;
|
40
|
+
indentOnInput?: boolean;
|
41
|
+
bracketMatching?: boolean;
|
42
|
+
closeBrackets?: boolean;
|
43
|
+
autocompletion?: boolean;
|
44
|
+
rectangularSelection?: boolean;
|
45
|
+
crosshairCursor?: boolean;
|
46
|
+
highlightActiveLine?: boolean;
|
47
|
+
highlightSelectionMatches?: boolean;
|
48
|
+
closeBracketsKeymap?: boolean;
|
49
|
+
searchKeymap?: boolean;
|
50
|
+
foldKeymap?: boolean;
|
51
|
+
completionKeymap?: boolean;
|
52
|
+
lintKeymap?: boolean;
|
53
|
+
tabSize?: number;
|
54
|
+
}
|
55
|
+
|
56
|
+
export const isValidSetup = (item: any) => {
|
57
|
+
return typeof item === 'undefined' || item;
|
58
|
+
};
|
59
|
+
|
60
|
+
export const basicSetup = (options: BasicSetupOptions = {}): Extension[] => {
|
61
|
+
const { crosshairCursor: initCrosshairCursor = false } = options;
|
62
|
+
let keymaps: KeyBinding[] = [];
|
63
|
+
isValidSetup(options.defaultKeymap) && keymaps.push(...defaultKeymap);
|
64
|
+
isValidSetup(options.closeBracketsKeymap) &&
|
65
|
+
keymaps.push(...closeBracketsKeymap);
|
66
|
+
isValidSetup(options.searchKeymap) && keymaps.push(...searchKeymap);
|
67
|
+
isValidSetup(options.historyKeymap) && keymaps.push(...historyKeymap);
|
68
|
+
isValidSetup(options.foldKeymap) && keymaps.push(...foldKeymap);
|
69
|
+
isValidSetup(options.lintKeymap) && keymaps.push(...lintKeymap);
|
70
|
+
const extensions: Extension[] = [];
|
71
|
+
isValidSetup(options.lineNumbers) && extensions.push(lineNumbers());
|
72
|
+
isValidSetup(options.highlightActiveLineGutter) &&
|
73
|
+
extensions.push(highlightActiveLineGutter());
|
74
|
+
isValidSetup(options.highlightSpecialChars) &&
|
75
|
+
extensions.push(highlightSpecialChars());
|
76
|
+
isValidSetup(options.history) && extensions.push(history());
|
77
|
+
isValidSetup(options.foldGutter) && extensions.push(foldGutter());
|
78
|
+
isValidSetup(options.drawSelection) && extensions.push(drawSelection());
|
79
|
+
isValidSetup(options.dropCursor) && extensions.push(dropCursor());
|
80
|
+
isValidSetup(options.allowMultipleSelections) &&
|
81
|
+
extensions.push(EditorState.allowMultipleSelections.of(true));
|
82
|
+
isValidSetup(options.indentOnInput) && extensions.push(indentOnInput());
|
83
|
+
isValidSetup(options.syntaxHighlighting) &&
|
84
|
+
extensions.push(
|
85
|
+
syntaxHighlighting(defaultHighlightStyle, { fallback: true })
|
86
|
+
);
|
87
|
+
isValidSetup(options.bracketMatching) && extensions.push(bracketMatching());
|
88
|
+
isValidSetup(options.closeBrackets) && extensions.push(closeBrackets());
|
89
|
+
isValidSetup(options.autocompletion) && extensions.push(autocompletion());
|
90
|
+
isValidSetup(options.rectangularSelection) &&
|
91
|
+
extensions.push(rectangularSelection());
|
92
|
+
isValidSetup(options.crosshairCursor) && extensions.push(crosshairCursor());
|
93
|
+
isValidSetup(options.highlightActiveLine) &&
|
94
|
+
extensions.push(highlightActiveLine());
|
95
|
+
isValidSetup(options.highlightSelectionMatches) &&
|
96
|
+
extensions.push(highlightSelectionMatches());
|
97
|
+
if (options.tabSize && typeof options.tabSize === 'number')
|
98
|
+
extensions.push(indentUnit.of(' '.repeat(options.tabSize)));
|
99
|
+
return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);
|
100
|
+
};
|
101
|
+
|
102
|
+
export interface MinimalSetupOptions {
|
103
|
+
highlightSpecialChars?: boolean;
|
104
|
+
history?: boolean;
|
105
|
+
drawSelection?: boolean;
|
106
|
+
syntaxHighlighting?: boolean;
|
107
|
+
defaultKeymap?: boolean;
|
108
|
+
historyKeymap?: boolean;
|
109
|
+
}
|
110
|
+
|
111
|
+
export const minimalSetup = (options: MinimalSetupOptions = {}) => {
|
112
|
+
let keymaps: KeyBinding[] = [];
|
113
|
+
isValidSetup(options.defaultKeymap) && keymaps.push(...defaultKeymap);
|
114
|
+
isValidSetup(options.historyKeymap) && keymaps.push(...historyKeymap);
|
115
|
+
const extensions: Extension[] = [];
|
116
|
+
isValidSetup(options.highlightSpecialChars) &&
|
117
|
+
extensions.push(highlightSpecialChars());
|
118
|
+
isValidSetup(options.history) && extensions.push(history());
|
119
|
+
isValidSetup(options.drawSelection) && extensions.push(drawSelection());
|
120
|
+
isValidSetup(options.syntaxHighlighting) &&
|
121
|
+
extensions.push(
|
122
|
+
syntaxHighlighting(defaultHighlightStyle, { fallback: true })
|
123
|
+
);
|
124
|
+
return extensions.concat([keymap.of(keymaps.flat())]).filter(Boolean);
|
125
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
export { NileCodeEditor } from './nile-code-editor';
|
@@ -0,0 +1,44 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { css } from 'lit-element';
|
9
|
+
|
10
|
+
/**
|
11
|
+
* CodeEditor CSS
|
12
|
+
*/
|
13
|
+
export const styles = css`
|
14
|
+
:host {
|
15
|
+
display: block;
|
16
|
+
}
|
17
|
+
|
18
|
+
.code-mirror {
|
19
|
+
display: flex;
|
20
|
+
justify-content: flex-end;
|
21
|
+
flex-direction: row-reverse;
|
22
|
+
gap: 0.6rem;
|
23
|
+
}
|
24
|
+
|
25
|
+
.cm-editor {
|
26
|
+
overflow: hidden;
|
27
|
+
width: 100%;
|
28
|
+
height: 100%;
|
29
|
+
}
|
30
|
+
|
31
|
+
.ͼ1.cm-focused {
|
32
|
+
outline: none;
|
33
|
+
}
|
34
|
+
|
35
|
+
.code-editor__icon__container {
|
36
|
+
cursor: pointer;
|
37
|
+
}
|
38
|
+
|
39
|
+
.code-editor__icon__container {
|
40
|
+
padding-right: 5px;
|
41
|
+
}
|
42
|
+
`;
|
43
|
+
|
44
|
+
export default [styles];
|
@@ -0,0 +1,127 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright Aquera Inc 2023
|
3
|
+
*
|
4
|
+
* This source code is licensed under the BSD-3-Clause license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import {
|
9
|
+
LitElement,
|
10
|
+
html,
|
11
|
+
property,
|
12
|
+
CSSResultArray,
|
13
|
+
TemplateResult,
|
14
|
+
} from 'lit-element';
|
15
|
+
import { customElement, query } from 'lit/decorators.js';
|
16
|
+
import { styles } from './nile-code-editor.css';
|
17
|
+
import { EditorView } from 'codemirror';
|
18
|
+
import { ViewUpdate } from '@codemirror/view';
|
19
|
+
import { EditorState, Compartment } from '@codemirror/state';
|
20
|
+
import { javascript, javascriptLanguage } from '@codemirror/lang-javascript';
|
21
|
+
import { autocompletion } from '@codemirror/autocomplete';
|
22
|
+
import { CompletionContext } from '@codemirror/autocomplete';
|
23
|
+
import NileElement from '../internal/nile-element';
|
24
|
+
import { basicSetup } from './extensionSetup';
|
25
|
+
|
26
|
+
// Choose the appropriate mode for your use case
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Nile icon component.
|
30
|
+
*
|
31
|
+
* @tag nile-code-editor
|
32
|
+
*
|
33
|
+
*/
|
34
|
+
@customElement('nile-code-editor')
|
35
|
+
export class NileCodeEditor extends NileElement {
|
36
|
+
@query('.code-mirror') codeEditor: HTMLInputElement;
|
37
|
+
@property({ type: Boolean }) multiline: true;
|
38
|
+
@property({ type: String }) value: true;
|
39
|
+
@property({ type: String }) customOptions: any;
|
40
|
+
@property({ type: String }) showLineNumbers: any;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* The styles for CodeEditor
|
44
|
+
* @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`
|
45
|
+
*/
|
46
|
+
public static get styles(): CSSResultArray {
|
47
|
+
return [styles];
|
48
|
+
}
|
49
|
+
|
50
|
+
connectedCallback(): void {
|
51
|
+
super.connectedCallback();
|
52
|
+
}
|
53
|
+
|
54
|
+
view: EditorView;
|
55
|
+
|
56
|
+
convertToSingleLine(code: any) {
|
57
|
+
// Remove line breaks and unnecessary whitespace
|
58
|
+
return code.replace(/\s+/g, ' ').trim();
|
59
|
+
}
|
60
|
+
lineNumbersComp = new Compartment();
|
61
|
+
|
62
|
+
updated() {
|
63
|
+
const customAutoCompletions = javascriptLanguage.data.of({
|
64
|
+
autocomplete: this.customOptions,
|
65
|
+
});
|
66
|
+
let startState = EditorState.create({
|
67
|
+
doc: !this.multiline ? this.convertToSingleLine(this.value) : this.value,
|
68
|
+
extensions: [
|
69
|
+
basicSetup({
|
70
|
+
lineNumbers: !!this.showLineNumbers,
|
71
|
+
foldGutter: !this.multiline ? false : true,
|
72
|
+
}),
|
73
|
+
customAutoCompletions,
|
74
|
+
autocompletion(),
|
75
|
+
javascript(),
|
76
|
+
!this.multiline ? this.restrictSingleLine() : [],
|
77
|
+
EditorView.updateListener.of((v: ViewUpdate) => {
|
78
|
+
if (v.docChanged) {
|
79
|
+
this.emitValues(this.view.state.doc.toString());
|
80
|
+
}
|
81
|
+
}),
|
82
|
+
],
|
83
|
+
});
|
84
|
+
|
85
|
+
this.view = new EditorView({
|
86
|
+
state: startState,
|
87
|
+
parent: this.codeEditor,
|
88
|
+
});
|
89
|
+
}
|
90
|
+
|
91
|
+
emitValues(value: string) {
|
92
|
+
this.emit('nile-change', { value: value });
|
93
|
+
}
|
94
|
+
|
95
|
+
expandCodeEditor() {
|
96
|
+
this.emit('nile-expand', { expand: true });
|
97
|
+
}
|
98
|
+
|
99
|
+
restrictSingleLine() {
|
100
|
+
return EditorState.transactionFilter.of(tr =>
|
101
|
+
tr.newDoc.lines > 1 ? [] : tr
|
102
|
+
);
|
103
|
+
}
|
104
|
+
public render(): TemplateResult {
|
105
|
+
return html`<div class="code-mirror">
|
106
|
+
${!this.multiline
|
107
|
+
? html`<nile-icon
|
108
|
+
name="fullscreenshrink"
|
109
|
+
class="code-editor__icon__container"
|
110
|
+
size="16"
|
111
|
+
color="black"
|
112
|
+
@click="${(e: CustomEvent) => this.expandCodeEditor()}"
|
113
|
+
></nile-icon>`
|
114
|
+
: ''}
|
115
|
+
</div>`;
|
116
|
+
}
|
117
|
+
|
118
|
+
/* #endregion */
|
119
|
+
}
|
120
|
+
|
121
|
+
export default NileCodeEditor;
|
122
|
+
|
123
|
+
declare global {
|
124
|
+
interface HTMLElementTagNameMap {
|
125
|
+
'nile-code-editor': NileCodeEditor;
|
126
|
+
}
|
127
|
+
}
|
@@ -139,12 +139,6 @@ export class NileDialog extends NileElement {
|
|
139
139
|
document.head.insertAdjacentHTML('beforeend', this.drawerStyle);
|
140
140
|
lockBodyScrolling(this);
|
141
141
|
|
142
|
-
// When the dialog is shown, Safari will attempt to set focus on whatever element has autofocus. This can cause
|
143
|
-
// the dialogs's animation to jitter (if it starts offscreen), so we'll temporarily remove the attribute, call
|
144
|
-
// `focus({ preventScroll: true })` ourselves, and add the attribute back afterwards.
|
145
|
-
//
|
146
|
-
// Related: https://github.com/shoelace-style/shoelace/issues/693
|
147
|
-
//
|
148
142
|
const autoFocusTarget = this.querySelector('[autofocus]');
|
149
143
|
if (autoFocusTarget) {
|
150
144
|
autoFocusTarget.removeAttribute('autofocus');
|
@@ -31,6 +31,7 @@ export const styles = css`
|
|
31
31
|
.nile-error-message__response {
|
32
32
|
color: var(--nile-colors-dark-500);
|
33
33
|
margin-top:6px;
|
34
|
+
line-height: 16px;
|
34
35
|
}
|
35
36
|
|
36
37
|
.nile-error-message__icon {
|
@@ -42,9 +43,13 @@ export const styles = css`
|
|
42
43
|
color: var(--nile-colors-primary-600);
|
43
44
|
cursor: pointer;
|
44
45
|
white-space: nowrap;
|
46
|
+
display: inline-flex;
|
47
|
+
gap: 4px;
|
48
|
+
align-items: center
|
45
49
|
}
|
46
50
|
|
47
51
|
.nile-error-message__response-expanded {
|
52
|
+
line-height: 18px;
|
48
53
|
height: auto;
|
49
54
|
border: 1px solid var(--nile-colors-red-500);
|
50
55
|
border-left: 6px solid var(--nile-colors-red-500);
|
@@ -55,6 +55,8 @@ export class NileErrorMessage extends LitElement {
|
|
55
55
|
}
|
56
56
|
|
57
57
|
public render(): TemplateResult {
|
58
|
+
const iconName = this.isExpanded ? 'arrowup' : 'arrowdown';
|
59
|
+
|
58
60
|
return html`
|
59
61
|
<div class="nile-error-message" part="base">
|
60
62
|
<nile-icon
|
@@ -76,8 +78,10 @@ export class NileErrorMessage extends LitElement {
|
|
76
78
|
<span
|
77
79
|
class="nile-error-message__more-button"
|
78
80
|
@click=${this.toggleExpanded}
|
79
|
-
>${this.isExpanded ? 'View Less' : 'View More'}
|
80
|
-
|
81
|
+
>${this.isExpanded ? 'View Less' : 'View More'}
|
82
|
+
<nile-icon color="#005EA6" part="icon" size="14" name="${iconName}"></nile-icon>
|
83
|
+
</span
|
84
|
+
> `:``}
|
81
85
|
</div>
|
82
86
|
`
|
83
87
|
: ``}
|
@@ -5,9 +5,14 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import {
|
8
|
+
import {
|
9
|
+
LitElement,
|
10
|
+
property,
|
11
|
+
CSSResultArray,
|
12
|
+
TemplateResult,
|
13
|
+
} from 'lit-element';
|
9
14
|
import { customElement } from 'lit/decorators.js';
|
10
|
-
import {styles} from './nile-icon-button.css';
|
15
|
+
import { styles } from './nile-icon-button.css';
|
11
16
|
|
12
17
|
import '../nile-icon';
|
13
18
|
import { classMap } from 'lit/directives/class-map.js';
|
@@ -73,6 +78,9 @@ export class NileIconButton extends NileElement {
|
|
73
78
|
/** Disables the button. */
|
74
79
|
@property({ type: Boolean, reflect: true }) disabled = false;
|
75
80
|
|
81
|
+
/**Default color to icon */
|
82
|
+
@property({ type: String, reflect: true }) color = '#7F7F7F';
|
83
|
+
|
76
84
|
private handleBlur() {
|
77
85
|
this.hasFocus = false;
|
78
86
|
this.emit('nile-blur');
|
@@ -105,6 +113,13 @@ export class NileIconButton extends NileElement {
|
|
105
113
|
this.button.blur();
|
106
114
|
}
|
107
115
|
|
116
|
+
private handleMouseOver(e: any) {
|
117
|
+
this.color = 'black';
|
118
|
+
}
|
119
|
+
private handleMouseLeave() {
|
120
|
+
this.color = '#7F7F7F';
|
121
|
+
}
|
122
|
+
|
108
123
|
render(): TemplateResult {
|
109
124
|
const isLink = this.href ? true : false;
|
110
125
|
const tag = isLink ? literal`a` : literal`button`;
|
@@ -116,14 +131,16 @@ export class NileIconButton extends NileElement {
|
|
116
131
|
class=${classMap({
|
117
132
|
'icon-button': true,
|
118
133
|
'icon-button--disabled': !isLink && this.disabled,
|
119
|
-
'icon-button--focused': this.hasFocus
|
134
|
+
'icon-button--focused': this.hasFocus,
|
120
135
|
})}
|
121
136
|
?disabled=${ifDefined(isLink ? undefined : this.disabled)}
|
122
137
|
type=${ifDefined(isLink ? undefined : 'button')}
|
123
138
|
href=${ifDefined(isLink ? this.href : undefined)}
|
124
139
|
target=${ifDefined(isLink ? this.target : undefined)}
|
125
140
|
download=${ifDefined(isLink ? this.download : undefined)}
|
126
|
-
rel=${ifDefined(
|
141
|
+
rel=${ifDefined(
|
142
|
+
isLink && this.target ? 'noreferrer noopener' : undefined
|
143
|
+
)}
|
127
144
|
role=${ifDefined(isLink ? undefined : 'button')}
|
128
145
|
aria-disabled=${this.disabled ? 'true' : 'false'}
|
129
146
|
aria-label="${this.label}"
|
@@ -131,12 +148,15 @@ export class NileIconButton extends NileElement {
|
|
131
148
|
@blur=${this.handleBlur}
|
132
149
|
@focus=${this.handleFocus}
|
133
150
|
@click=${this.handleClick}
|
151
|
+
@mouseover=${this.handleMouseOver}
|
152
|
+
@mouseleave=${this.handleMouseLeave}
|
134
153
|
>
|
135
154
|
<nile-icon
|
136
155
|
class="icon-button__icon"
|
137
156
|
name=${ifDefined(this.name)}
|
138
157
|
library=${ifDefined(this.library)}
|
139
158
|
src=${ifDefined(this.src)}
|
159
|
+
color=${ifDefined(this.color)}
|
140
160
|
aria-hidden="true"
|
141
161
|
size="14"
|
142
162
|
></nile-icon>
|
@@ -145,7 +165,6 @@ export class NileIconButton extends NileElement {
|
|
145
165
|
}
|
146
166
|
}
|
147
167
|
|
148
|
-
|
149
168
|
export default NileIconButton;
|
150
169
|
|
151
170
|
declare global {
|
@@ -505,12 +505,12 @@ export class NileInput extends NileElement implements NileFormControl {
|
|
505
505
|
<input
|
506
506
|
part="input"
|
507
507
|
id="input"
|
508
|
-
class="input__control
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
}
|
508
|
+
class="input__control ${
|
509
|
+
this.type === 'password' && !this.passwordVisible
|
510
|
+
? 'input__password'
|
511
|
+
: ''
|
512
|
+
}"
|
513
|
+
type=${this.type === 'password' ? 'text' : this.type}
|
514
514
|
title=${
|
515
515
|
this
|
516
516
|
.title /* An empty title prevents browser validation tooltips from appearing on hover */
|
@@ -148,6 +148,8 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
148
148
|
|
149
149
|
@property({ type: Boolean, reflect: true }) searchEnabled = false;
|
150
150
|
|
151
|
+
@property({ type: Boolean, reflect: true }) blockValueChange = false;
|
152
|
+
|
151
153
|
@property({ type: Boolean, reflect: true }) optionsLoading = false;
|
152
154
|
|
153
155
|
/** Allows more than one option to be selected. */
|
@@ -525,6 +527,13 @@ export class NileSelect extends NileElement implements NileFormControl {
|
|
525
527
|
private handleOptionClick(event: MouseEvent) {
|
526
528
|
const target = event.target as HTMLElement;
|
527
529
|
const option = target.closest('nile-option');
|
530
|
+
|
531
|
+
if(this.blockValueChange){
|
532
|
+
this.emit('nile-block-change', { value: option?.value, name: this.name });
|
533
|
+
this.hide();
|
534
|
+
return;
|
535
|
+
}
|
536
|
+
|
528
537
|
const oldValue = this.value;
|
529
538
|
this.oldValue = oldValue;
|
530
539
|
|
@@ -63,6 +63,17 @@ export const styles = css`
|
|
63
63
|
padding-right: 10px;
|
64
64
|
}
|
65
65
|
|
66
|
+
nile-code-editor {
|
67
|
+
overflow: hidden;
|
68
|
+
padding-top: 2px;
|
69
|
+
border-radius: 5px;
|
70
|
+
border: 1px solid rgb(204, 204, 204);
|
71
|
+
}
|
72
|
+
|
73
|
+
.code-editor__no-border {
|
74
|
+
border: none;
|
75
|
+
}
|
76
|
+
|
66
77
|
.switcher-object-mapper::part(input) {
|
67
78
|
color: var(--nile-colors-primary-600);
|
68
79
|
cursor: pointer;
|