@helpdice/ui 2.1.5 → 2.1.9
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/dist/auto-complete/index.js +2158 -17
- package/dist/button/button.d.ts +1 -1
- package/dist/button/index.js +73 -16
- package/dist/button/styles.d.ts +1 -0
- package/dist/carousal/index.js +73 -16
- package/dist/container/box.d.ts +42 -0
- package/dist/container/index.d.ts +2 -0
- package/dist/container/index.js +948 -0
- package/dist/copy-to-clipboard/clipboard.d.ts +14 -0
- package/dist/copy-to-clipboard/copy.d.ts +2 -0
- package/dist/copy-to-clipboard/index.d.ts +2 -0
- package/dist/copy-to-clipboard/index.js +1702 -0
- package/dist/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/dist/grid/index.d.ts +2 -3
- package/dist/grid/index.js +0 -1
- package/dist/html-renderer/index.js +35 -12
- package/dist/index.d.ts +6 -6
- package/dist/index.js +15776 -15418
- package/dist/input/index.d.ts +4 -0
- package/dist/input/index.js +2162 -18
- package/dist/input/input-props.d.ts +1 -0
- package/dist/input/phone-input/phone.d.ts +13 -0
- package/dist/modal/index.js +73 -16
- package/dist/notetip/index.js +690 -0
- package/{esm/notetip/index.d.ts → dist/notetip/note-tip.d.ts} +2 -2
- package/dist/placeholder/index.js +643 -8
- package/dist/table/index.js +4370 -2163
- package/dist/text/child.d.ts +1 -0
- package/dist/text/index.js +686 -8
- package/dist/text/text.d.ts +1 -0
- package/esm/button/button.d.ts +1 -1
- package/esm/button/button.js +51 -5
- package/esm/button/styles.d.ts +1 -0
- package/esm/button/styles.js +22 -11
- package/esm/container/box.d.ts +42 -0
- package/esm/container/box.js +39 -0
- package/esm/container/index.d.ts +2 -0
- package/esm/container/index.js +2 -0
- package/esm/copy-to-clipboard/clipboard.d.ts +14 -0
- package/esm/copy-to-clipboard/clipboard.js +91 -0
- package/esm/copy-to-clipboard/copy.d.ts +2 -0
- package/esm/copy-to-clipboard/copy.js +105 -0
- package/esm/copy-to-clipboard/index.d.ts +2 -0
- package/esm/copy-to-clipboard/index.js +2 -0
- package/esm/copy-to-clipboard/toggle-selection.d.ts +1 -0
- package/esm/copy-to-clipboard/toggle-selection.js +31 -0
- package/esm/grid/index.d.ts +2 -3
- package/esm/grid/index.js +5 -3
- package/esm/index.d.ts +6 -6
- package/esm/index.js +7 -5
- package/esm/input/index.d.ts +4 -0
- package/esm/input/index.js +4 -0
- package/esm/input/input-field.js +12 -10
- package/esm/input/input-props.d.ts +1 -0
- package/esm/input/phone-input/phone.d.ts +13 -0
- package/esm/input/phone-input/phone.js +166 -0
- package/esm/notetip/index.js +2 -97
- package/{dist/notetip/index.d.ts → esm/notetip/note-tip.d.ts} +2 -2
- package/esm/notetip/note-tip.js +97 -0
- package/esm/table/table-body.js +2 -2
- package/esm/table/table-cell.js +1 -1
- package/esm/table/table-head.js +4 -2
- package/esm/table/table.js +0 -1
- package/esm/text/child.d.ts +1 -0
- package/esm/text/text.d.ts +1 -0
- package/esm/text/text.js +25 -3
- package/package.json +19 -19
- package/dist/currency-input/index.js +0 -862
- package/dist/phone-input/index.js +0 -2033
- package/dist/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.d.ts +0 -11
- package/esm/phone-input/phone.js +0 -161
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/dist/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/dist/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInput.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/CurrencyInputProps.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/addSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/cleanValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/escapeRegExp.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/fixedDecimalValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/formatValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getLocaleConfig.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/getSuffix.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/index.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/isNumber.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/padTrimValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/parseAbbrValue.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeInvalidChars.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/removeSeparators.js +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/components/utils/repositionCursor.js +0 -0
- /package/esm/{currency-input → input/currency-input}/index.d.ts +0 -0
- /package/esm/{currency-input → input/currency-input}/index.js +0 -0
- /package/esm/{phone-input → input/phone-input}/index.d.ts +0 -0
- /package/esm/{phone-input → input/phone-input}/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function _default(): () => void;
|
package/dist/grid/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import Grid from './grid-base';
|
|
2
|
-
import
|
|
2
|
+
import GridContainer from './grid-container';
|
|
3
3
|
export type GridComponentType = typeof Grid & {
|
|
4
|
-
Container: typeof
|
|
4
|
+
Container: typeof GridContainer;
|
|
5
5
|
};
|
|
6
6
|
export type { GridContainerProps } from './grid-container';
|
|
7
7
|
export type { GridProps } from './grid-base';
|
|
8
8
|
export type { GridBreakpointsValue } from './basic-item';
|
|
9
9
|
export type { GridAlignContent, GridAlignItems, GridDirection, GridJustify, GridWrap, } from './grid-types';
|
|
10
|
-
export { Container };
|
|
11
10
|
declare const _default: GridComponentType;
|
|
12
11
|
export default _default;
|
package/dist/grid/index.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
6
|
|
|
7
|
-
/*! @license DOMPurify 3.
|
|
7
|
+
/*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
|
|
8
8
|
|
|
9
9
|
const {
|
|
10
10
|
entries,
|
|
@@ -190,7 +190,7 @@ function lookupGetter(object, prop) {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'search', 'section', 'select', 'shadow', 'slot', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);
|
|
193
|
-
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', '
|
|
193
|
+
const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'enterkeyhint', 'exportparts', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'inputmode', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'part', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);
|
|
194
194
|
const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']);
|
|
195
195
|
// List of SVG elements that are disallowed by default.
|
|
196
196
|
// We still need to know them so that we can do namespace
|
|
@@ -204,7 +204,7 @@ const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongd
|
|
|
204
204
|
const text = freeze(['#text']);
|
|
205
205
|
|
|
206
206
|
const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'exportparts', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inert', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'part', 'pattern', 'placeholder', 'playsinline', 'popover', 'popovertarget', 'popovertargetaction', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'wrap', 'xmlns', 'slot']);
|
|
207
|
-
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
207
|
+
const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'amplitude', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'exponent', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'intercept', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'mask-type', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'slope', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'tablevalues', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);
|
|
208
208
|
const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);
|
|
209
209
|
const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);
|
|
210
210
|
|
|
@@ -302,7 +302,7 @@ const _createHooksMap = function _createHooksMap() {
|
|
|
302
302
|
function createDOMPurify() {
|
|
303
303
|
let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();
|
|
304
304
|
const DOMPurify = root => createDOMPurify(root);
|
|
305
|
-
DOMPurify.version = '3.
|
|
305
|
+
DOMPurify.version = '3.3.0';
|
|
306
306
|
DOMPurify.removed = [];
|
|
307
307
|
if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
|
|
308
308
|
// Not running in a browser, provide a factory function
|
|
@@ -413,6 +413,21 @@ function createDOMPurify() {
|
|
|
413
413
|
let FORBID_TAGS = null;
|
|
414
414
|
/* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */
|
|
415
415
|
let FORBID_ATTR = null;
|
|
416
|
+
/* Config object to store ADD_TAGS/ADD_ATTR functions (when used as functions) */
|
|
417
|
+
const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
|
|
418
|
+
tagCheck: {
|
|
419
|
+
writable: true,
|
|
420
|
+
configurable: false,
|
|
421
|
+
enumerable: true,
|
|
422
|
+
value: null
|
|
423
|
+
},
|
|
424
|
+
attributeCheck: {
|
|
425
|
+
writable: true,
|
|
426
|
+
configurable: false,
|
|
427
|
+
enumerable: true,
|
|
428
|
+
value: null
|
|
429
|
+
}
|
|
430
|
+
}));
|
|
416
431
|
/* Decide if ARIA attributes are okay */
|
|
417
432
|
let ALLOW_ARIA_ATTR = true;
|
|
418
433
|
/* Decide if custom data attributes are okay */
|
|
@@ -605,16 +620,24 @@ function createDOMPurify() {
|
|
|
605
620
|
}
|
|
606
621
|
/* Merge configuration parameters */
|
|
607
622
|
if (cfg.ADD_TAGS) {
|
|
608
|
-
if (
|
|
609
|
-
|
|
623
|
+
if (typeof cfg.ADD_TAGS === 'function') {
|
|
624
|
+
EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
|
|
625
|
+
} else {
|
|
626
|
+
if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {
|
|
627
|
+
ALLOWED_TAGS = clone(ALLOWED_TAGS);
|
|
628
|
+
}
|
|
629
|
+
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
610
630
|
}
|
|
611
|
-
addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
|
|
612
631
|
}
|
|
613
632
|
if (cfg.ADD_ATTR) {
|
|
614
|
-
if (
|
|
615
|
-
|
|
633
|
+
if (typeof cfg.ADD_ATTR === 'function') {
|
|
634
|
+
EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
|
|
635
|
+
} else {
|
|
636
|
+
if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {
|
|
637
|
+
ALLOWED_ATTR = clone(ALLOWED_ATTR);
|
|
638
|
+
}
|
|
639
|
+
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
616
640
|
}
|
|
617
|
-
addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
|
|
618
641
|
}
|
|
619
642
|
if (cfg.ADD_URI_SAFE_ATTR) {
|
|
620
643
|
addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);
|
|
@@ -922,7 +945,7 @@ function createDOMPurify() {
|
|
|
922
945
|
return true;
|
|
923
946
|
}
|
|
924
947
|
/* Remove element if anything forbids its presence */
|
|
925
|
-
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
948
|
+
if (!(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName])) {
|
|
926
949
|
/* Check if we have a custom element to handle */
|
|
927
950
|
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
928
951
|
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
@@ -994,7 +1017,7 @@ function createDOMPurify() {
|
|
|
994
1017
|
(https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)
|
|
995
1018
|
XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)
|
|
996
1019
|
We don't need to check the value; it's always URI safe. */
|
|
997
|
-
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
1020
|
+
if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {
|
|
998
1021
|
if (
|
|
999
1022
|
// First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1000
1023
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
package/dist/index.d.ts
CHANGED
|
@@ -36,8 +36,9 @@ export type { DrawerProps } from './drawer';
|
|
|
36
36
|
export { default as Fieldset } from './fieldset';
|
|
37
37
|
export type { FieldsetProps, FieldsetTitleProps, FieldsetSubtitleProps, FieldsetGroupProps, FieldsetFooterProps, FieldsetContentProps, } from './fieldset';
|
|
38
38
|
export * from './form';
|
|
39
|
-
export { default as Grid
|
|
39
|
+
export { default as Grid } from './grid';
|
|
40
40
|
export type { GridProps, GridContainerProps } from './grid';
|
|
41
|
+
export { default as Container } from './container';
|
|
41
42
|
export { default as HtmlRenderer } from './html-renderer';
|
|
42
43
|
export { default as Image } from './image';
|
|
43
44
|
export type { ImageProps, ImageBrowserProps } from './image';
|
|
@@ -61,7 +62,6 @@ export { default as Popover } from './popover';
|
|
|
61
62
|
export type { PopoverProps, PopoverItemProps } from './popover';
|
|
62
63
|
export { default as List } from './list';
|
|
63
64
|
export { default as Menu } from './menu';
|
|
64
|
-
export { default as PhoneInput } from './phone-input';
|
|
65
65
|
export { default as Progress } from './progress';
|
|
66
66
|
export type { ProgressProps } from './progress';
|
|
67
67
|
export { default as Radio } from './radio';
|
|
@@ -93,9 +93,9 @@ export type { HUIThemes, HUserTheme } from './themes';
|
|
|
93
93
|
export { default as Toggle } from './toggle';
|
|
94
94
|
export type { ToggleProps } from './toggle';
|
|
95
95
|
export { default as Tooltip } from './tooltip';
|
|
96
|
-
export { default as Notetip } from './notetip';
|
|
96
|
+
export { default as Notetip } from './notetip/note-tip';
|
|
97
97
|
export type { TooltipProps } from './tooltip';
|
|
98
|
-
export type { NotetipProps } from './notetip';
|
|
98
|
+
export type { NotetipProps } from './notetip/note-tip';
|
|
99
99
|
export { default as Tree } from './tree';
|
|
100
100
|
export type { TreeProps } from './tree';
|
|
101
101
|
export { useTime, useTimer, useStopwatch } from './timer';
|
|
@@ -125,7 +125,7 @@ export { default as Swipe } from './swipe';
|
|
|
125
125
|
export type { SwipeProps } from './swipe';
|
|
126
126
|
export { Carousel } from './carousal';
|
|
127
127
|
export type { CarouselProps } from './carousal';
|
|
128
|
-
export {
|
|
129
|
-
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './currency-input';
|
|
128
|
+
export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './input/currency-input';
|
|
130
129
|
export { default as useToasts } from './use-toasts';
|
|
131
130
|
export type { Toast, ToastInput, ToastAction, ToastLayout } from './use-toasts';
|
|
131
|
+
export { default as Clipboard } from './copy-to-clipboard';
|