@nectary/components 2.0.0 → 2.1.1
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/accordion/index.js +0 -4
- package/action-menu/index.js +5 -1
- package/action-menu-option/index.js +2 -4
- package/alert/index.js +2 -9
- package/alert/utils.d.ts +0 -3
- package/alert/utils.js +1 -6
- package/avatar/index.js +4 -20
- package/avatar/utils.d.ts +0 -4
- package/avatar/utils.js +0 -13
- package/badge/index.js +2 -8
- package/badge/utils.d.ts +0 -3
- package/badge/utils.js +1 -6
- package/button/index.js +25 -27
- package/button/utils.d.ts +0 -3
- package/button/utils.js +1 -9
- package/chat-bubble/index.d.ts +0 -1
- package/chat-bubble/index.js +1 -2
- package/checkbox/index.js +6 -9
- package/chip/index.js +22 -19
- package/chip/utils.d.ts +0 -1
- package/chip/utils.js +0 -5
- package/color-menu/index.js +6 -3
- package/color-swatch/index.js +1 -4
- package/color-swatch/utils.d.ts +0 -1
- package/color-swatch/utils.js +0 -5
- package/date-picker/index.js +1 -27
- package/date-picker/utils.d.ts +0 -8
- package/date-picker/utils.js +0 -20
- package/dialog/index.js +1 -2
- package/emoji-picker/index.js +7 -14
- package/file-picker/index.js +11 -9
- package/file-status/index.js +2 -9
- package/file-status/utils.d.ts +0 -3
- package/file-status/utils.js +1 -6
- package/help-tooltip/index.d.ts +0 -1
- package/help-tooltip/index.js +1 -2
- package/icon/index.js +1 -1
- package/icon-button/index.js +23 -27
- package/icon-button/utils.d.ts +0 -3
- package/icon-button/utils.js +1 -9
- package/inline-alert/index.js +2 -9
- package/inline-alert/utils.d.ts +0 -3
- package/inline-alert/utils.js +1 -6
- package/input/index.js +10 -16
- package/input/utils.d.ts +0 -3
- package/input/utils.js +1 -6
- package/package.json +2 -3
- package/pagination/index.js +0 -4
- package/pagination/types.d.ts +0 -1
- package/pop/index.js +23 -25
- package/pop/utils.d.ts +0 -3
- package/pop/utils.js +0 -5
- package/popover/index.js +1 -4
- package/popover/utils.d.ts +0 -3
- package/popover/utils.js +0 -5
- package/radio/index.js +0 -4
- package/radio/types.d.ts +0 -1
- package/rich-text/index.js +2 -9
- package/rich-text/utils.d.ts +0 -3
- package/rich-text/utils.js +1 -6
- package/segment/index.js +1 -4
- package/segment-collapse/index.js +0 -4
- package/segment-collapse/types.d.ts +0 -1
- package/segmented-control/index.js +0 -4
- package/segmented-icon-control/index.js +0 -4
- package/select-button/index.js +23 -20
- package/select-menu/index.js +6 -3
- package/skeleton/index.js +45 -9
- package/skeleton-item/index.js +1 -28
- package/spinner/index.js +2 -9
- package/tabs/index.js +0 -4
- package/tag/index.js +1 -4
- package/tag/utils.d.ts +0 -1
- package/tag/utils.js +0 -5
- package/text/index.js +2 -9
- package/text/utils.d.ts +0 -3
- package/text/utils.js +1 -6
- package/textarea/index.js +0 -4
- package/tile-control/index.js +0 -4
- package/time-picker/index.js +1 -9
- package/time-picker/utils.d.ts +1 -1
- package/time-picker/utils.js +17 -5
- package/title/index.js +2 -12
- package/title/utils.d.ts +0 -7
- package/title/utils.js +1 -29
- package/toast/index.js +2 -9
- package/toast/utils.d.ts +0 -3
- package/toast/utils.js +1 -6
- package/toggle/index.js +0 -4
- package/toggle/types.d.ts +0 -1
- package/tooltip/index.js +1 -7
- package/tooltip/utils.d.ts +0 -5
- package/tooltip/utils.js +0 -10
- package/utils/dom.js +0 -5
- package/utils/element.js +2 -2
- package/utils/size.d.ts +0 -5
- package/utils/size.js +1 -17
package/utils/size.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
1
|
export const DEFAULT_SIZE = 'm';
|
|
2
2
|
export const sizeValues = ['l', 'm', 's'];
|
|
3
|
-
export const sizeExValues = [...sizeValues, 'xs'];
|
|
4
|
-
export const assertSize = (value, name) => {
|
|
5
|
-
if (value === null || value.length === 0) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
if (!sizeValues.includes(value)) {
|
|
9
|
-
throw new Error(`Invalid size attribute for ${name}: ${value}`);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
export const assertSizeEx = (value, name) => {
|
|
13
|
-
if (value === null || value.length === 0) {
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (!sizeExValues.includes(value)) {
|
|
17
|
-
throw new Error(`Invalid size attribute for ${name}: ${value}`);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
3
|
+
export const sizeExValues = [...sizeValues, 'xs'];
|