kemet-ui 3.0.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +995 -220
- package/dist/components/kemet-accordion/docs/stories.d.ts +12 -0
- package/dist/components/kemet-accordion/docs/stories.js +99 -0
- package/dist/components/kemet-accordion/docs/stories.js.map +1 -0
- package/dist/components/kemet-accordion/kemet-accordion-panel.js.map +1 -1
- package/dist/components/kemet-accordion/kemet-accordion.js.map +1 -1
- package/dist/components/kemet-accordion/spec.d.ts +2 -0
- package/dist/components/kemet-accordion/spec.js +132 -0
- package/dist/components/kemet-accordion/spec.js.map +1 -0
- package/dist/components/kemet-alert/docs/stories.d.ts +1 -1
- package/dist/components/kemet-alert/docs/stories.js +20 -19
- package/dist/components/kemet-alert/docs/stories.js.map +1 -1
- package/dist/components/kemet-alert/kemet-alert.js.map +1 -1
- package/dist/components/kemet-alert/spec.d.ts +1 -0
- package/dist/components/kemet-alert/spec.js +35 -0
- package/dist/components/kemet-alert/spec.js.map +1 -0
- package/dist/components/kemet-alert/types.d.ts +1 -1
- package/dist/components/kemet-avatar/docs/stories.d.ts +1 -1
- package/dist/components/kemet-avatar/docs/stories.js.map +1 -1
- package/dist/components/kemet-avatar/kemet-avatar.js.map +1 -1
- package/dist/components/kemet-avatar/kemet-avatars.js.map +1 -1
- package/dist/components/kemet-avatar/spec.d.ts +1 -0
- package/dist/components/kemet-avatar/spec.js +26 -0
- package/dist/components/kemet-avatar/spec.js.map +1 -0
- package/dist/components/kemet-badge/docs/stories.d.ts +1 -1
- package/dist/components/kemet-badge/kemet-badge.js.map +1 -1
- package/dist/components/kemet-badge/spec.d.ts +1 -0
- package/dist/components/kemet-badge/spec.js +21 -0
- package/dist/components/kemet-badge/spec.js.map +1 -0
- package/dist/components/kemet-badge/types.d.ts +1 -1
- package/dist/components/kemet-button/docs/stories.d.ts +1 -1
- package/dist/components/kemet-button/kemet-button.js +9 -7
- package/dist/components/kemet-button/kemet-button.js.map +1 -1
- package/dist/components/kemet-button/spec.d.ts +1 -0
- package/dist/components/kemet-button/spec.js +49 -0
- package/dist/components/kemet-button/spec.js.map +1 -0
- package/dist/components/kemet-button/types.d.ts +1 -1
- package/dist/components/kemet-card/docs/stories.d.ts +1 -1
- package/dist/components/kemet-card/docs/stories.js.map +1 -1
- package/dist/components/kemet-card/kemet-card.js.map +1 -1
- package/dist/components/kemet-card/spec.d.ts +1 -0
- package/dist/components/kemet-card/spec.js +31 -0
- package/dist/components/kemet-card/spec.js.map +1 -0
- package/dist/components/kemet-carousel/docs/stories.d.ts +1 -1
- package/dist/components/kemet-carousel/docs/stories.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-current.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-first.d.ts +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-first.js +11 -4
- package/dist/components/kemet-carousel/kemet-carousel-first.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-last.d.ts +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-last.js +11 -4
- package/dist/components/kemet-carousel/kemet-carousel-last.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-link.d.ts +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-link.js +14 -4
- package/dist/components/kemet-carousel/kemet-carousel-link.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-next.d.ts +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-next.js +11 -4
- package/dist/components/kemet-carousel/kemet-carousel-next.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-prev.d.ts +1 -0
- package/dist/components/kemet-carousel/kemet-carousel-prev.js +11 -4
- package/dist/components/kemet-carousel/kemet-carousel-prev.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-slide.js +5 -5
- package/dist/components/kemet-carousel/kemet-carousel-slide.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel-total.js.map +1 -1
- package/dist/components/kemet-carousel/kemet-carousel.js.map +1 -1
- package/dist/components/kemet-carousel/spec.d.ts +10 -0
- package/dist/components/kemet-carousel/spec.js +168 -0
- package/dist/components/kemet-carousel/spec.js.map +1 -0
- package/dist/components/kemet-checkbox/docs/stories.d.ts +1 -1
- package/dist/components/kemet-checkbox/kemet-checkbox.js.map +1 -1
- package/dist/components/kemet-checkbox/spec.d.ts +1 -0
- package/dist/components/kemet-checkbox/spec.js +33 -0
- package/dist/components/kemet-checkbox/spec.js.map +1 -0
- package/dist/components/kemet-checkbox/types.d.ts +1 -1
- package/dist/components/kemet-combo/docs/stories.d.ts +1 -1
- package/dist/components/kemet-combo/kemet-combo.d.ts +1 -0
- package/dist/components/kemet-combo/kemet-combo.js +5 -0
- package/dist/components/kemet-combo/kemet-combo.js.map +1 -1
- package/dist/components/kemet-combo/spec.d.ts +3 -0
- package/dist/components/kemet-combo/spec.js +46 -0
- package/dist/components/kemet-combo/spec.js.map +1 -0
- package/dist/components/kemet-count/docs/stories.d.ts +1 -1
- package/dist/components/kemet-count/kemet-count.js.map +1 -1
- package/dist/components/kemet-count/spec.d.ts +4 -0
- package/dist/components/kemet-count/spec.js +45 -0
- package/dist/components/kemet-count/spec.js.map +1 -0
- package/dist/components/kemet-draggable/docs/stories.d.ts +1 -1
- package/dist/components/kemet-draggable/kemet-draggable.js.map +1 -1
- package/dist/components/kemet-draggable/spec.d.ts +1 -0
- package/dist/components/kemet-draggable/spec.js +30 -0
- package/dist/components/kemet-draggable/spec.js.map +1 -0
- package/dist/components/kemet-drawer/docs/stories.d.ts +1 -1
- package/dist/components/kemet-drawer/kemet-drawer.js.map +1 -1
- package/dist/components/kemet-drawer/spec.d.ts +1 -0
- package/dist/components/kemet-drawer/spec.js +21 -0
- package/dist/components/kemet-drawer/spec.js.map +1 -0
- package/dist/components/kemet-drawer/types.d.ts +2 -2
- package/dist/components/kemet-fab/docs/stories.d.ts +1 -1
- package/dist/components/kemet-fab/kemet-fab.js +3 -9
- package/dist/components/kemet-fab/kemet-fab.js.map +1 -1
- package/dist/components/kemet-fab/spec.d.ts +2 -0
- package/dist/components/kemet-fab/spec.js +43 -0
- package/dist/components/kemet-fab/spec.js.map +1 -0
- package/dist/components/kemet-field/docs/stories.d.ts +1 -1
- package/dist/components/kemet-field/kemet-field.js.map +1 -1
- package/dist/components/kemet-field/spec.d.ts +2 -0
- package/dist/components/kemet-field/spec.js +38 -0
- package/dist/components/kemet-field/spec.js.map +1 -0
- package/dist/components/kemet-field/types.d.ts +1 -1
- package/dist/components/kemet-flipcard/docs/stories.d.ts +1 -1
- package/dist/components/kemet-flipcard/kemet-flipcard-trigger.js.map +1 -1
- package/dist/components/kemet-flipcard/kemet-flipcard.js.map +1 -1
- package/dist/components/kemet-flipcard/spec.d.ts +3 -0
- package/dist/components/kemet-flipcard/spec.js +38 -0
- package/dist/components/kemet-flipcard/spec.js.map +1 -0
- package/dist/components/kemet-icon/docs/stories.d.ts +1 -1
- package/dist/components/kemet-icon/kemet-icon.js +1 -1
- package/dist/components/kemet-icon/kemet-icon.js.map +1 -1
- package/dist/components/kemet-icon/spec.d.ts +1 -0
- package/dist/components/kemet-icon/spec.js +69 -0
- package/dist/components/kemet-icon/spec.js.map +1 -0
- package/dist/components/kemet-input/docs/stories.d.ts +1 -1
- package/dist/components/kemet-input/kemet-input.js +1 -1
- package/dist/components/kemet-input/kemet-input.js.map +1 -1
- package/dist/components/kemet-input/spec.d.ts +1 -0
- package/dist/components/kemet-input/spec.js +83 -0
- package/dist/components/kemet-input/spec.js.map +1 -0
- package/dist/components/kemet-input/types.d.ts +3 -3
- package/dist/components/kemet-modal/docs/stories.d.ts +1 -1
- package/dist/components/kemet-modal/docs/stories.js.map +1 -1
- package/dist/components/kemet-modal/kemet-modal-close.js.map +1 -1
- package/dist/components/kemet-modal/kemet-modal.js.map +1 -1
- package/dist/components/kemet-modal/types.d.ts +1 -1
- package/dist/components/kemet-multi-input/docs/stories.d.ts +8 -0
- package/dist/components/kemet-multi-input/docs/stories.js +33 -0
- package/dist/components/kemet-multi-input/docs/stories.js.map +1 -0
- package/dist/components/kemet-multi-input/kemet-multi-input.d.ts +116 -0
- package/dist/components/kemet-multi-input/kemet-multi-input.js +193 -0
- package/dist/components/kemet-multi-input/kemet-multi-input.js.map +1 -0
- package/dist/components/kemet-multi-input/styles.d.ts +1 -0
- package/dist/components/kemet-multi-input/styles.js +87 -0
- package/dist/components/kemet-multi-input/styles.js.map +1 -0
- package/dist/components/kemet-multi-input/types.d.ts +5 -0
- package/dist/components/kemet-multi-input/types.js +2 -0
- package/dist/components/kemet-multi-input/types.js.map +1 -0
- package/dist/components/kemet-password/docs/stories.d.ts +1 -1
- package/dist/components/kemet-password/kemet-password.js.map +1 -1
- package/dist/components/kemet-password/types.d.ts +1 -1
- package/dist/components/kemet-popper/docs/stories.d.ts +1 -1
- package/dist/components/kemet-popper/kemet-popper-close.js.map +1 -1
- package/dist/components/kemet-popper/kemet-popper.js.map +1 -1
- package/dist/components/kemet-popper/types.d.ts +3 -3
- package/dist/components/kemet-radio/docs/stories.d.ts +1 -1
- package/dist/components/kemet-radio/kemet-radio.js.map +1 -1
- package/dist/components/kemet-radio/kemet-radios.js.map +1 -1
- package/dist/components/kemet-radio/spec.d.ts +3 -0
- package/dist/components/kemet-radio/spec.js +67 -0
- package/dist/components/kemet-radio/spec.js.map +1 -0
- package/dist/components/kemet-radio/types.d.ts +2 -2
- package/dist/components/kemet-rotator/docs/stories.d.ts +1 -1
- package/dist/components/kemet-rotator/kemet-rotator.js.map +1 -1
- package/dist/components/kemet-rotator/types.d.ts +1 -1
- package/dist/components/kemet-scroll-link/docs/stories.d.ts +1 -1
- package/dist/components/kemet-scroll-link/kemet-scroll-link.js.map +1 -1
- package/dist/components/kemet-scroll-nav/docs/stories.d.ts +1 -1
- package/dist/components/kemet-scroll-nav/kemet-scroll-nav.js.map +1 -1
- package/dist/components/kemet-scroll-nav/types.d.ts +1 -1
- package/dist/components/kemet-scroll-snap/docs/stories.d.ts +1 -1
- package/dist/components/kemet-scroll-snap/docs/stories.js.map +1 -1
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js.map +1 -1
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap-slide.js.map +1 -1
- package/dist/components/kemet-scroll-snap/kemet-scroll-snap.js.map +1 -1
- package/dist/components/kemet-scroll-snap/types.d.ts +2 -2
- package/dist/components/kemet-select/docs/stories.d.ts +1 -1
- package/dist/components/kemet-select/kemet-option.js.map +1 -1
- package/dist/components/kemet-select/kemet-select.js.map +1 -1
- package/dist/components/kemet-select/spec.d.ts +3 -0
- package/dist/components/kemet-select/spec.js +53 -0
- package/dist/components/kemet-select/spec.js.map +1 -0
- package/dist/components/kemet-sortable/docs/stories.d.ts +1 -1
- package/dist/components/kemet-sortable/docs/stories.js.map +1 -1
- package/dist/components/kemet-sortable/kemet-sortable-item.js.map +1 -1
- package/dist/components/kemet-sortable/kemet-sortable.js.map +1 -1
- package/dist/components/kemet-svgs/docs/stories.d.ts +1 -1
- package/dist/components/kemet-svgs/docs/stories.js.map +1 -1
- package/dist/components/kemet-svgs/kemet-svg.js.map +1 -1
- package/dist/components/kemet-svgs/kemet-svgs.js.map +1 -1
- package/dist/components/kemet-tabs/docs/stories.d.ts +1 -1
- package/dist/components/kemet-tabs/docs/stories.js.map +1 -1
- package/dist/components/kemet-tabs/kemet-tab-panel.js.map +1 -1
- package/dist/components/kemet-tabs/kemet-tab.js.map +1 -1
- package/dist/components/kemet-tabs/kemet-tabs.js.map +1 -1
- package/dist/components/kemet-tabs/types.d.ts +3 -3
- package/dist/components/kemet-textarea/docs/stories.d.ts +1 -1
- package/dist/components/kemet-textarea/kemet-textarea.js.map +1 -1
- package/dist/components/kemet-textarea/spec.d.ts +3 -0
- package/dist/components/kemet-textarea/spec.js +69 -0
- package/dist/components/kemet-textarea/spec.js.map +1 -0
- package/dist/components/kemet-textarea/types.d.ts +1 -1
- package/dist/components/kemet-timer/docs/stories.d.ts +10 -0
- package/dist/components/kemet-timer/docs/stories.js +40 -0
- package/dist/components/kemet-timer/docs/stories.js.map +1 -0
- package/dist/components/kemet-timer/kemet-timer-display.d.ts +25 -0
- package/dist/components/kemet-timer/kemet-timer-display.js +65 -0
- package/dist/components/kemet-timer/kemet-timer-display.js.map +1 -0
- package/dist/components/kemet-timer/kemet-timer.d.ts +36 -0
- package/dist/components/kemet-timer/kemet-timer.js +103 -0
- package/dist/components/kemet-timer/kemet-timer.js.map +1 -0
- package/dist/components/kemet-timer/styles.d.ts +2 -0
- package/dist/components/kemet-timer/styles.js +12 -0
- package/dist/components/kemet-timer/styles.js.map +1 -0
- package/dist/components/kemet-timer/types.d.ts +1 -0
- package/dist/components/kemet-timer/types.js +2 -0
- package/dist/components/kemet-timer/types.js.map +1 -0
- package/dist/components/kemet-toggle/docs/stories.d.ts +1 -1
- package/dist/components/kemet-toggle/kemet-toggle.js.map +1 -1
- package/dist/components/kemet-toggle/spec.d.ts +1 -0
- package/dist/components/kemet-toggle/spec.js +46 -0
- package/dist/components/kemet-toggle/spec.js.map +1 -0
- package/dist/components/kemet-tooltip/docs/stories.d.ts +1 -1
- package/dist/components/kemet-tooltip/kemet-tooltip.js.map +1 -1
- package/dist/components/kemet-tooltip/types.d.ts +3 -3
- package/dist/components/kemet-tracker/docs/stories.d.ts +1 -1
- package/dist/components/kemet-tracker/docs/stories.js.map +1 -1
- package/dist/components/kemet-tracker/kemet-tracker-step.js.map +1 -1
- package/dist/components/kemet-tracker/kemet-tracker.js.map +1 -1
- package/dist/components/kemet-upload/docs/stories.d.ts +1 -1
- package/dist/components/kemet-upload/kemet-upload-file.js.map +1 -1
- package/dist/components/kemet-upload/kemet-upload.js.map +1 -1
- package/dist/kemet-components.bundle.js +16 -32
- package/dist/kemet-components.bundle.js.map +1 -1
- package/dist/kemet-components.cjs +3721 -3263
- package/dist/kemet-components.js +3721 -3263
- package/dist/styles/kemet.base.css +24 -2
- package/dist/styles/kemet.base.css.map +1 -1
- package/dist/styles/kemet.core.css +266 -2
- package/dist/styles/kemet.core.css.map +1 -1
- package/dist/styles/shared/_config.scss +25 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utilities/controllers/forms.js +16 -18
- package/dist/utilities/controllers/forms.js.map +1 -1
- package/dist/utilities/controllers/forms.spec.d.ts +2 -0
- package/dist/utilities/controllers/forms.spec.js +36 -0
- package/dist/utilities/controllers/forms.spec.js.map +1 -0
- package/dist/utilities/misc/drag.d.ts +6 -0
- package/dist/utilities/misc/drag.js +63 -0
- package/dist/utilities/misc/drag.js.map +1 -0
- package/package.json +46 -33
- package/dist/components/kemet-accordion/stories.d.ts +0 -12
- package/dist/components/kemet-accordion/stories.js +0 -47
- package/dist/components/kemet-accordion/stories.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kemet-upload-file.js","sourceRoot":"","sources":["../../../src/components/kemet-upload/kemet-upload-file.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,WAAW,GAAG,CAAC,KAAa,EAAE,QAAQ,GAAG,CAAC,EAAE,EAAE;IAClD,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAElC,MAAM,CAAC,GAAG,IAAI,CAAC;IACf,MAAM,EAAE,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;IACvC,MAAM,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAExE,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAA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,OAAO,IAAI,CAAA,+DAA+D,CAAC;QAC7E,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;;AA9DM,sBAAM,GAAG,CAAC,gBAAgB,EAAE,aAAa,CAAC,AAApC,CAAqC;AAGlD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+CACR;AAGnB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACV;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6CACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CAC3B;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACP;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDACX;AAtBG,eAAe;IADnC,aAAa,CAAC,mBAAmB,CAAC;GACd,eAAe,CAgEnC;eAhEoB,eAAe","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { stylesUploadFile, stylesLoaders } from './styles';\n\nconst formatBytes = (bytes: number, decimals = 2) => {\n if (bytes === 0) return '0 Bytes';\n\n const k = 1024;\n const dm = decimals < 0 ? 0 : decimals;\n const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n // eslint-disable-next-line no-restricted-properties\n return `${parseFloat((bytes / k ** i).toFixed(dm))} ${sizes[i]}`;\n};\n\n/**\n * @since 1.3.0\n * @status stable\n *\n * @tagname kemet-upload-file\n * @summary A file in the upload.\n *\n * @prop {string} name - The name of the file\n * @prop {number} loaded - The number of bytes loaded\n * @prop {number} size - The file size in bytes\n * @prop {string} type - The file type\n * @prop {string} status - The status of the file. Values are complete | uploading | error.\n * @prop {number} percent - Percentage of file completion that's calculated by the loaded property.\n * @prop {string} message - An error message to give to users\n *\n * @cssproperty --kemet-upload-file-color - The default text color.\n * @cssproperty --kemet-upload-file-padding - The padding around the file.\n * @cssproperty --kemet-upload-file-border - The border around the file.\n *\n * @csspart percentage - Area that displays the percentage.\n * @csspart filename - Area that displays file name.\n * @csspart loaded - Area that displays how much has uploaded.\n * @csspart message - Area for the error message.\n * @csspart indicator - Area for status icon.\n *\n */\n\n@customElement('kemet-upload-file')\nexport default class KemetUploadFile extends LitElement {\n static styles = [stylesUploadFile, stylesLoaders];\n\n @property({ type: String })\n name: string;\n\n @property({ type: Number })\n loaded: number = 0;\n\n @property({ type: Number })\n size: number = 0;\n\n @property({ type: String })\n type: string;\n\n @property({ type: String, reflect: true })\n status: string;\n\n @property({ type: Number })\n percent: number = 0;\n\n @property({ type: String })\n message: string;\n\n updated() {\n this.percent = this.calculatePercent();\n }\n\n render() {\n return html`\n <div class=\"percentage\" part=\"percentage\">\n <span>${this.percent}%</span>\n </div>\n <div>\n <h3 part=\"filename\">${this.name}</h3>\n <span part=\"loaded\">${formatBytes(this.loaded)} / ${formatBytes(this.size)}</span>\n ${this.message ? html`<div class=\"message\" part=\"message\">${this.message}</div>` : null}\n </div>\n <div class=\"indicator\" part=\"indicator\">\n ${this.getStatusIcon()}\n </div>\n `;\n }\n\n calculatePercent() {\n const percent = Math.round((this.loaded * 100.0) / this.size);\n return percent > 100 ? 100 : percent;\n }\n\n getStatusIcon() {\n if (this.status === 'uploading') {\n return html`<div class=\"lds-ripple\"><div></div><div></div></div>`;\n }\n\n if (this.status === 'complete') {\n return html`<kemet-icon icon=\"check-circle\" size=\"48\"></kemet-icon>`;\n }\n\n if (this.status === 'error') {\n return html`<kemet-icon icon=\"exclamation-circle\" size=\"48\"></kemet-icon>`;\n }\n\n return null;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-upload-file': KemetUploadFile\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kemet-upload.js","sourceRoot":"","sources":["../../../src/components/kemet-upload/kemet-upload.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,KAAY,EAAE,EAAE;IACvC,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AAC1B,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;
|
|
1
|
+
{"version":3,"file":"kemet-upload.js","sourceRoot":"","sources":["../../../src/components/kemet-upload/kemet-upload.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,MAAM,eAAe,GAAG,CAAC,KAAY,EAAE,EAAE;IACvC,KAAK,CAAC,cAAc,EAAE,CAAC;IACvB,KAAK,CAAC,eAAe,EAAE,CAAC;AAC1B,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGY,IAAM,WAAW,GAAjB,MAAM,WAAY,SAA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,CAAC,CAAC,WAAW,IAAI,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IACrE,CAAC;;AAxGM,kBAAM,GAAG,CAAC,YAAY,CAAC,AAAjB,CAAkB;AAG/B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACH;AAGxB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;6CACV;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAC7B;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4CACW;AAGtC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;+CACb;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;+CAClD;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;4CAClC;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;gDACjB;AAGrC;IADC,KAAK,EAAE;qDAC2B;AAGnC;IADC,KAAK,EAAE;2CACY;AArCD,WAAW;IAD/B,aAAa,CAAC,cAAc,CAAC;GACT,WAAW,CA0G/B;eA1GoB,WAAW","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { emitEvent } from '../../utilities/misc/events';\nimport { stylesUpload } from './styles';\n\nconst preventDefaults = (event: Event) => {\n event.preventDefault();\n event.stopPropagation();\n};\n\n/**\n * @since 1.3.0\n * @status stable\n *\n * @tagname kemet-upload\n * @summary An interface for uploading files.\n *\n * @prop {string} slug - A unique identifier for the component\n * @prop {string} accept - Determines what file types are accepted\n * @prop {boolean} multiple - Allows for multiple files\n * @prop {boolean} over - Automatically is true when a file is being dragged over the upload area\n * @prop {string} heading - Descriptive text for the upload area\n * @prop {boolean} mobile - Displays the component in a mobile context\n * @prop {string} breakpoint - Controls the point at which the component is considered mobile\n * @prop {boolean} noDragDrop - Is true if drag and drop support is not detected\n * @prop {number} maxSize - The maximum file size for uploads\n * @prop {string} buttonLabel - The browse files button text\n *\n * @event kemet-upload-change - Fires when files have been added\n *\n * @csspart upload - The area where files are dropped.\n * @csspart heading - The description in the upload area.\n * @csspart button - The button in the upload area.\n * @csspart files - The area where uploaded files are listed.\n *\n * @cssproperty --kemet-upload-color - The default text color.\n * @cssproperty --kemet-upload-height - The height.\n * @cssproperty --kemet-upload-border - The border.\n * @cssproperty --kemet-upload-background-color - The background color.\n *\n */\n\n@customElement('kemet-upload')\nexport default class KemetUpload extends LitElement {\n static styles = [stylesUpload];\n\n @property({ type: String })\n slug: string = 'upload';\n\n @property({ type: String })\n accept: string;\n\n @property({ type: Boolean })\n multiple: boolean;\n\n @property({ type: Boolean, reflect: true })\n over: boolean;\n\n @property({ type: String })\n heading: string = 'Drag & Drop Files';\n\n @property({ type: Boolean, reflect: true })\n mobile: boolean;\n\n @property({ type: String, reflect: true })\n breakpoint: string = '600px';\n\n @property({ type: Boolean, reflect: true, attribute: 'no-drag-drop' })\n noDragDrop: boolean;\n\n @property({ type: Number, attribute: 'max-size' })\n maxSize: number;\n\n @property({ type: String, attribute: 'button-label' })\n buttonLabel: string = 'Browse Files';\n\n @state()\n fileInputElement: HTMLInputElement;\n\n @state()\n upload: HTMLElement;\n\n firstUpdated() {\n this.fileInputElement = this.shadowRoot.querySelector('[type=\"file\"]');\n this.upload = this.shadowRoot.querySelector('.upload');\n\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.upload.addEventListener(eventName, event => preventDefaults(event), false);\n });\n\n ['dragenter', 'dragover'].forEach((eventName) => {\n this.upload.addEventListener(eventName, () => { this.over = true; }, false);\n });\n\n ['dragleave', 'drop'].forEach((eventName) => {\n this.upload.addEventListener(eventName, () => { this.over = false; }, false);\n });\n\n this.isMobile();\n this.hasDragDrop();\n\n window.addEventListener('resize', () => { this.isMobile(); });\n this.upload.addEventListener('drop', event => this.handleDrop(event), false);\n }\n\n render() {\n return html`\n <div class=\"upload\" part=\"upload\">\n <kemet-icon icon=\"cloud-arrow-up\" size=\"128\"></kemet-icon>\n <input\n type=\"file\"\n id=${this.slug}\n ?multiple=${this.multiple}\n accept=${ifDefined(this.accept) ? this.accept : null}\n @change=${(event: Event) => this.handleChange(event)}\n />\n <h3 class=\"heading\" part=\"heading\">${this.heading}</h3>\n <label class=\"button\" part=\"button\" for=${this.slug}>${this.buttonLabel}</label>\n </div>\n <div class=\"files\" part=\"files\">\n <slot></slot>\n </div>\n `;\n }\n\n handleChange(event: Event) {\n emitEvent(this, 'kemet-upload-change', {\n event,\n files: this.fileInputElement.files,\n fileElement: this.fileInputElement,\n });\n }\n\n handleDrop(event: DragEvent) {\n emitEvent(this, 'kemet-upload-change', {\n event,\n files: event?.dataTransfer.files || [],\n fileElement: this.fileInputElement,\n });\n }\n\n isMobile() {\n const mediaQuery = window.matchMedia(`(max-width: ${this.breakpoint})`);\n this.mobile = mediaQuery.matches;\n }\n\n hasDragDrop() {\n this.noDragDrop = !('draggable' in document.createElement('span'));\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-upload': KemetUpload\n }\n}\n"]}
|