@pluralsight/headless-styles
Advanced tools
Comparing version 0.7.1-next-5f9f4f to 0.7.1-next-6085c0
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -6,5 +5,4 @@ import "./actionMenu.css"; | ||
function getDefaultActionMenuOptions(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
@@ -22,3 +20,3 @@ } | ||
return { | ||
...createClassNameProp("".concat(ACTION_MENU, "-btn-group"), 'pando_actionMenuBtnGroup', ...defaultOptions.classNames) | ||
...createClassNameProp(`${ACTION_MENU}-btn-group`, 'pando_actionMenuBtnGroup', ...defaultOptions.classNames) | ||
}; | ||
@@ -35,3 +33,3 @@ } | ||
return { | ||
...createClassNameProp("".concat(ACTION_MENU, "-btn"), 'pando_actionMenuBtn', ...defaultOptions.classNames) | ||
...createClassNameProp(`${ACTION_MENU}-btn`, 'pando_actionMenuBtn', ...defaultOptions.classNames) | ||
}; | ||
@@ -49,5 +47,5 @@ } | ||
return { | ||
...createClassNameProp("".concat(ACTION_MENU, "-trigger"), 'pando_actionMenuTrigger', ...defaultOptions.classNames) | ||
...createClassNameProp(`${ACTION_MENU}-trigger`, 'pando_actionMenuTrigger', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=actionMenu.js.map |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -21,7 +20,7 @@ import { createPandoOptions } from '../shared/defaultOptions'; | ||
...props.iconWrapper, | ||
...createClassNameProp("".concat(ADMONITION, "-icon"), iconClass) | ||
...createClassNameProp(`${ADMONITION}-icon`, iconClass) | ||
}, | ||
textContainer: { | ||
...props.textContainer, | ||
...createClassNameProp("".concat(ADMONITION, "-text-container"), textClass) | ||
...createClassNameProp(`${ADMONITION}-text-container`, textClass) | ||
}, | ||
@@ -37,3 +36,3 @@ wrapper: { | ||
return { | ||
...createClassNameProp("".concat(ADMONITION, "-heading"), 'pando_admonitionTitle', ...classNames) | ||
...createClassNameProp(`${ADMONITION}-heading`, 'pando_admonitionTitle', ...classNames) | ||
}; | ||
@@ -44,3 +43,3 @@ } | ||
return { | ||
...createClassNameProp("".concat(ADMONITION, "-text"), 'pando_admonitionDescription', ...classNames) | ||
...createClassNameProp(`${ADMONITION}-text`, 'pando_admonitionDescription', ...classNames) | ||
}; | ||
@@ -47,0 +46,0 @@ } |
export function getDefaultAdmonitionOptions(options) { | ||
var _options$classNames, _options$sentiment; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'info' | ||
classNames: options?.classNames ?? [], | ||
sentiment: options?.sentiment ?? 'info' | ||
}; | ||
@@ -10,5 +9,5 @@ } | ||
return { | ||
sentimentClass: "pando_".concat(sentiment, "Admonition"), | ||
iconClass: "pando_".concat(sentiment, "IconWrapper"), | ||
textClass: "pando_".concat(sentiment, "TextContainer") | ||
sentimentClass: `pando_${sentiment}Admonition`, | ||
iconClass: `pando_${sentiment}IconWrapper`, | ||
textClass: `pando_${sentiment}TextContainer` | ||
}; | ||
@@ -15,0 +14,0 @@ } |
@@ -10,7 +10,7 @@ import { createClassNameProp } from '../../utils/helpers'; | ||
backdrop: { | ||
...createClassNameProp("".concat(ALERT, "-backdrop"), 'pando_alertDialogBackdrop') | ||
...createClassNameProp(`${ALERT}-backdrop`, 'pando_alertDialogBackdrop') | ||
}, | ||
focusGuard: { | ||
...a11yProps.focusGuard, | ||
...createClassNameProp("".concat(ALERT, "-focus-guard"), 'pando_alertDialogFocusGuard') | ||
...createClassNameProp(`${ALERT}-focus-guard`, 'pando_alertDialogFocusGuard') | ||
}, | ||
@@ -26,3 +26,3 @@ wrapper: { | ||
...getAlertA11yProps({}).section, | ||
...createClassNameProp("".concat(ALERT, "-section"), 'pando_alertDialogSection') | ||
...createClassNameProp(`${ALERT}-section`, 'pando_alertDialogSection') | ||
}; | ||
@@ -35,3 +35,3 @@ } | ||
iconWrapper: { | ||
...createClassNameProp("".concat(ALERT, "-icon"), 'pando_alertDialogTitleIcon') | ||
...createClassNameProp(`${ALERT}-icon`, 'pando_alertDialogTitleIcon') | ||
} | ||
@@ -42,3 +42,3 @@ }); | ||
header: { | ||
...createClassNameProp("".concat(ALERT, "-header"), 'pando_alertDialogHeader') | ||
...createClassNameProp(`${ALERT}-header`, 'pando_alertDialogHeader') | ||
} | ||
@@ -52,3 +52,3 @@ }; | ||
}).heading, | ||
...createClassNameProp("".concat(ALERT, "-heading")) | ||
...createClassNameProp(`${ALERT}-heading`) | ||
}; | ||
@@ -61,3 +61,3 @@ } | ||
}).body, | ||
...createClassNameProp("".concat(ALERT, "-body")) | ||
...createClassNameProp(`${ALERT}-body`) | ||
}; | ||
@@ -68,3 +68,3 @@ } | ||
htmlFor, | ||
...createClassNameProp("".concat(ALERT, "-label"), 'pando_alertDialogLabel') | ||
...createClassNameProp(`${ALERT}-label`, 'pando_alertDialogLabel') | ||
}; | ||
@@ -79,3 +79,3 @@ } | ||
inputWrapper: { | ||
...createClassNameProp("".concat(ALERT, "-input-wrapper"), 'pando_alertDialogInputWrapper') | ||
...createClassNameProp(`${ALERT}-input-wrapper`, 'pando_alertDialogInputWrapper') | ||
} | ||
@@ -86,3 +86,3 @@ }; | ||
return { | ||
...createClassNameProp("".concat(ALERT, "-footer"), 'pando_alertDialogFooter') | ||
...createClassNameProp(`${ALERT}-footer`, 'pando_alertDialogFooter') | ||
}; | ||
@@ -96,3 +96,3 @@ } | ||
button: { | ||
...createClassNameProp("".concat(ALERT, "-cancel")) | ||
...createClassNameProp(`${ALERT}-cancel`) | ||
} | ||
@@ -107,3 +107,3 @@ }; | ||
button: { | ||
...createClassNameProp("".concat(ALERT, "-confirm")) | ||
...createClassNameProp(`${ALERT}-confirm`) | ||
} | ||
@@ -110,0 +110,0 @@ }; |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -12,3 +11,3 @@ import { createDialogIconProps, createPandoOptions } from '../shared/defaultOptions'; | ||
return { | ||
...createClassNameProp("".concat(ALERT), pandoClass, ...props.classNames), | ||
...createClassNameProp(`${ALERT}`, pandoClass, ...props.classNames), | ||
'aria-describedby': props.bodyId, | ||
@@ -23,3 +22,3 @@ 'aria-labelledby': props.headingId | ||
iconWrapper: { | ||
...createClassNameProp("".concat(ALERT, "-icon"), 'pando_alertDialogTitleIcon') | ||
...createClassNameProp(`${ALERT}-icon`, 'pando_alertDialogTitleIcon') | ||
} | ||
@@ -30,3 +29,3 @@ }); | ||
header: { | ||
...createClassNameProp("".concat(ALERT, "-header"), 'pando_alertDialogHeader') | ||
...createClassNameProp(`${ALERT}-header`, 'pando_alertDialogHeader') | ||
} | ||
@@ -44,3 +43,3 @@ }; | ||
iconBtnWrapper: { | ||
...createClassNameProp("".concat(ALERT, "-icon-btn-wrapper"), 'pando_alertDialogIconButtonWrapper', ...(classNames !== null && classNames !== void 0 ? classNames : [])) | ||
...createClassNameProp(`${ALERT}-icon-btn-wrapper`, 'pando_alertDialogIconButtonWrapper', ...(classNames ?? [])) | ||
} | ||
@@ -52,3 +51,3 @@ }; | ||
id, | ||
...createClassNameProp("".concat(ALERT, "-heading")) | ||
...createClassNameProp(`${ALERT}-heading`) | ||
}; | ||
@@ -59,3 +58,3 @@ } | ||
id, | ||
...createClassNameProp("".concat(ALERT, "-body")) | ||
...createClassNameProp(`${ALERT}-body`) | ||
}; | ||
@@ -66,3 +65,3 @@ } | ||
htmlFor, | ||
...createClassNameProp("".concat(ALERT, "-label"), 'pando_alertDialogLabel') | ||
...createClassNameProp(`${ALERT}-label`, 'pando_alertDialogLabel') | ||
}; | ||
@@ -77,3 +76,3 @@ } | ||
inputWrapper: { | ||
...createClassNameProp("".concat(ALERT, "-input-wrapper"), 'pando_alertDialogInputWrapper') | ||
...createClassNameProp(`${ALERT}-input-wrapper`, 'pando_alertDialogInputWrapper') | ||
} | ||
@@ -84,5 +83,5 @@ }; | ||
return { | ||
...createClassNameProp("".concat(ALERT, "-footer"), 'pando_alertDialogFooter') | ||
...createClassNameProp(`${ALERT}-footer`, 'pando_alertDialogFooter') | ||
}; | ||
} | ||
//# sourceMappingURL=alertDialog.js.map |
export function getAlertDefaultProps(options) { | ||
var _options$bodyId, _options$classNames, _options$headingId, _options$kind, _options$usage; | ||
return { | ||
bodyId: (_options$bodyId = options === null || options === void 0 ? void 0 : options.bodyId) !== null && _options$bodyId !== void 0 ? _options$bodyId : '', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
headingId: (_options$headingId = options === null || options === void 0 ? void 0 : options.headingId) !== null && _options$headingId !== void 0 ? _options$headingId : '', | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'non-destructive', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'dialog' | ||
bodyId: options?.bodyId ?? '', | ||
classNames: options?.classNames ?? [], | ||
headingId: options?.headingId ?? '', | ||
kind: options?.kind ?? 'non-destructive', | ||
usage: options?.usage ?? 'dialog' | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -17,18 +16,16 @@ import { createAvatarSelectorClasses, getDefaultAvatarOptions, createAvatarIconOptions, createAvatarLabalProps } from './shared'; | ||
export function getAvatarImageProps(options) { | ||
var _options$classNames, _options$alt, _options$src; | ||
return { | ||
...createClassNameProp("".concat(AVATAR, "-image"), 'pando_avatarImage', ...((_options$classNames = options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [])), | ||
alt: (_options$alt = options.alt) !== null && _options$alt !== void 0 ? _options$alt : 'user avatar', | ||
src: (_options$src = options.src) !== null && _options$src !== void 0 ? _options$src : '' | ||
...createClassNameProp(`${AVATAR}-image`, 'pando_avatarImage', ...(options.classNames ?? [])), | ||
alt: options.alt ?? 'user avatar', | ||
src: options.src ?? '' | ||
}; | ||
} | ||
export function getAvatarLabelProps(options) { | ||
var _options$size, _options$classNames2; | ||
const props = createAvatarLabalProps(options); | ||
const { | ||
labelClass | ||
} = createAvatarSelectorClasses('default', (_options$size = options.size) !== null && _options$size !== void 0 ? _options$size : 'm'); | ||
} = createAvatarSelectorClasses('default', options.size ?? 'm'); | ||
return { | ||
...props, | ||
...createClassNameProp("".concat(AVATAR, "-label"), 'pando_avatarLabel', labelClass, ...((_options$classNames2 = options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [])) | ||
...createClassNameProp(`${AVATAR}-label`, 'pando_avatarLabel', labelClass, ...(options.classNames ?? [])) | ||
}; | ||
@@ -35,0 +32,0 @@ } |
import { createPandoOptions } from '../shared/defaultOptions'; | ||
export function getDefaultAvatarOptions(options) { | ||
var _options$classNames, _options$sentiment, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'default', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
classNames: options?.classNames ?? [], | ||
sentiment: options?.sentiment ?? 'default', | ||
size: options?.size ?? 'm' | ||
}; | ||
@@ -19,5 +18,5 @@ } | ||
return { | ||
labelClass: "pando_".concat(size, "AvatarLabel"), | ||
sentimentClass: "pando_".concat(sentiment, "Avatar"), | ||
sizeClass: "pando_".concat(size, "Avatar") | ||
labelClass: `pando_${size}AvatarLabel`, | ||
sentimentClass: `pando_${sentiment}Avatar`, | ||
sizeClass: `pando_${size}Avatar` | ||
}; | ||
@@ -35,4 +34,3 @@ } | ||
function formatLetter(word) { | ||
var _word$slice; | ||
return (_word$slice = word === null || word === void 0 ? void 0 : word.slice(0, 1)) !== null && _word$slice !== void 0 ? _word$slice : ''; | ||
return word?.slice(0, 1) ?? ''; | ||
} | ||
@@ -45,3 +43,3 @@ function displayInitials(initialsObj) { | ||
if (lastLetter) { | ||
return "".concat(firstLetter).concat(lastLetter); | ||
return `${firstLetter}${lastLetter}`; | ||
} | ||
@@ -59,4 +57,3 @@ return firstLetter; | ||
export function createAvatarLabalProps(options) { | ||
var _options$name; | ||
const initials = displayInitials(createInitials((_options$name = options.name) !== null && _options$name !== void 0 ? _options$name : '')); | ||
const initials = displayInitials(createInitials(options.name ?? '')); | ||
return { | ||
@@ -63,0 +60,0 @@ 'aria-label': options.name, |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -18,4 +17,4 @@ import { getDefaultBadgeOptions, getIconProps, createBadgeClasses } from './shared'; | ||
export function getBadgeIconProps(size) { | ||
return getIconProps(size, createClassNameProp("".concat(BADGE, "-icon"), 'pando_badgeIcon')); | ||
return getIconProps(size, createClassNameProp(`${BADGE}-icon`, 'pando_badgeIcon')); | ||
} | ||
//# sourceMappingURL=badgeCSS.js.map |
@@ -17,8 +17,7 @@ import { createPandoOptions } from '../shared/defaultOptions'; | ||
export function getDefaultBadgeOptions(options) { | ||
var _options$classNames, _options$sentiment, _options$usage, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'default', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'filled', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 's' | ||
classNames: options?.classNames ?? [], | ||
sentiment: options?.sentiment ?? 'default', | ||
usage: options?.usage ?? 'filled', | ||
size: options?.size ?? 's' | ||
}; | ||
@@ -29,5 +28,5 @@ } | ||
return { | ||
sentimentClass: "pando_".concat(options.sentiment).concat(BADGE), | ||
sizeClass: "pando_".concat(options.size).concat(BADGE), | ||
usageClass: "pando_".concat(options.usage).concat(BADGE) | ||
sentimentClass: `pando_${options.sentiment}${BADGE}`, | ||
sizeClass: `pando_${options.size}${BADGE}`, | ||
usageClass: `pando_${options.usage}${BADGE}` | ||
}; | ||
@@ -34,0 +33,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { createPandoOptions } from '../shared/defaultOptions'; |
function createBtnClass(name) { | ||
return "pando_".concat(name, "Button"); | ||
return `pando_${name}Button`; | ||
} | ||
@@ -18,9 +18,8 @@ | ||
export function getDefaultButtonOptions(options) { | ||
var _options$classNames, _options$disabled, _options$sentiment, _options$usage, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
disabled: (_options$disabled = options === null || options === void 0 ? void 0 : options.disabled) !== null && _options$disabled !== void 0 ? _options$disabled : false, | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'action', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'filled', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'l' | ||
classNames: options?.classNames ?? [], | ||
disabled: options?.disabled ?? false, | ||
sentiment: options?.sentiment ?? 'action', | ||
usage: options?.usage ?? 'filled', | ||
size: options?.size ?? 'l' | ||
}; | ||
@@ -27,0 +26,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -13,11 +12,11 @@ import { createCheckboxProps, getDefaultCheckboxOptions } from './shared'; | ||
...props.input, | ||
...createClassNameProp("".concat(CHECKBOX, "-input"), 'pando_checkboxInput') | ||
...createClassNameProp(`${CHECKBOX}-input`, 'pando_checkboxInput') | ||
}, | ||
checkboxContainer: { | ||
...props.checkboxContainer, | ||
...createClassNameProp("".concat(CHECKBOX, "-container"), 'pando_checkboxContainer', ...defaultOptions.classNames) | ||
...createClassNameProp(`${CHECKBOX}-container`, 'pando_checkboxContainer', ...defaultOptions.classNames) | ||
}, | ||
checkboxControl: { | ||
...props.checkboxControl, | ||
...createClassNameProp("".concat(CHECKBOX, "-control"), 'pando_checkboxControl') | ||
...createClassNameProp(`${CHECKBOX}-control`, 'pando_checkboxControl') | ||
} | ||
@@ -24,0 +23,0 @@ }; |
import { createInputA11yProps, createInputDataProps, getAriaChecked, getDefaultSharedInputOptions } from '../shared/helpers/input'; | ||
import { createPandoOptions } from '../shared/defaultOptions'; | ||
export function getDefaultCheckboxOptions(options) { | ||
var _options$classNames, _options$checked, _options$indeterminat; | ||
return { | ||
...getDefaultSharedInputOptions(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [''], | ||
checked: (_options$checked = options === null || options === void 0 ? void 0 : options.checked) !== null && _options$checked !== void 0 ? _options$checked : false, | ||
indeterminate: (_options$indeterminat = options === null || options === void 0 ? void 0 : options.indeterminate) !== null && _options$indeterminat !== void 0 ? _options$indeterminat : false | ||
classNames: options?.classNames ?? [''], | ||
checked: options?.checked ?? false, | ||
indeterminate: options?.indeterminate ?? false | ||
}; | ||
@@ -11,0 +10,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -19,3 +18,3 @@ import { createCircularProgressClasses, getA11yCircularProgressProps, getBaseCircleProps, getDefaultCircularProgressOptions, getStrokeProps, VIEWBOX } from './shared'; | ||
const now = a11y.now; | ||
const value = "".concat(now, "%"); | ||
const value = `${now}%`; | ||
return { | ||
@@ -27,3 +26,3 @@ containerProps: { | ||
svgBoxProps: { | ||
...createClassNameProp("".concat(CIRC_PROGRESS, "-box"), sizeClass, kindClass), | ||
...createClassNameProp(`${CIRC_PROGRESS}-box`, sizeClass, kindClass), | ||
viewBox: VIEWBOX | ||
@@ -33,11 +32,11 @@ }, | ||
...getBaseCircleProps(), | ||
...createClassNameProp("".concat(CIRC_PROGRESS, "-base"), 'pando_circularProgressCircle') | ||
...createClassNameProp(`${CIRC_PROGRESS}-base`, 'pando_circularProgressCircle') | ||
}, | ||
nowCircleProps: { | ||
...getBaseCircleProps(), | ||
...createClassNameProp("".concat(CIRC_PROGRESS, "-now"), 'pando_circularProgressCircleNow', kindClass), | ||
...createClassNameProp(`${CIRC_PROGRESS}-now`, 'pando_circularProgressCircleNow', kindClass), | ||
...getStrokeProps(now) | ||
}, | ||
labelProps: { | ||
...createClassNameProp("".concat(CIRC_PROGRESS, "-label"), 'pando_circularProgressText'), | ||
...createClassNameProp(`${CIRC_PROGRESS}-label`, 'pando_circularProgressText'), | ||
value | ||
@@ -44,0 +43,0 @@ } |
@@ -11,3 +11,3 @@ const a11yPropMap = { | ||
const gap = 264 - dash; | ||
return "".concat(dash, " ").concat(gap); | ||
return `${dash} ${gap}`; | ||
} | ||
@@ -35,16 +35,15 @@ | ||
return { | ||
sizeClass: "pando_".concat(size, "CircularProgress"), | ||
kindClass: "pando_".concat(kind, "CircularProgress") | ||
sizeClass: `pando_${size}CircularProgress`, | ||
kindClass: `pando_${kind}CircularProgress` | ||
}; | ||
} | ||
export function getDefaultCircularProgressOptions(options) { | ||
var _options$ariaLabel, _options$classNames, _options$kind, _options$max, _options$min, _options$now, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'circular progress indicator', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'determinate', | ||
max: (_options$max = options === null || options === void 0 ? void 0 : options.max) !== null && _options$max !== void 0 ? _options$max : 100, | ||
min: (_options$min = options === null || options === void 0 ? void 0 : options.min) !== null && _options$min !== void 0 ? _options$min : 0, | ||
now: (_options$now = options === null || options === void 0 ? void 0 : options.now) !== null && _options$now !== void 0 ? _options$now : 0, | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
ariaLabel: options?.ariaLabel ?? 'circular progress indicator', | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'determinate', | ||
max: options?.max ?? 100, | ||
min: options?.min ?? 0, | ||
now: options?.now ?? 0, | ||
size: options?.size ?? 'm' | ||
}; | ||
@@ -55,3 +54,3 @@ } | ||
return { | ||
[a11yPropMap.ariaLabel]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.ariaLabel, | ||
[a11yPropMap.ariaLabel]: a11yOptions?.ariaLabel, | ||
role: 'status' | ||
@@ -61,6 +60,6 @@ }; | ||
return { | ||
[a11yPropMap.ariaLabel]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.max, | ||
[a11yPropMap.valueMin]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.min, | ||
[a11yPropMap.valueNow]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.now, | ||
[a11yPropMap.ariaLabel]: a11yOptions?.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions?.max, | ||
[a11yPropMap.valueMin]: a11yOptions?.min, | ||
[a11yPropMap.valueNow]: a11yOptions?.now, | ||
role: 'progressbar' | ||
@@ -67,0 +66,0 @@ }; |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { getDefaultErrorMessageOptions, createErrorMessageProps } from './shared'; |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { getDefaultFieldMessageOptions, createFieldMessageProps } from './shared'; |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -15,5 +14,5 @@ import { getDefaultFieldsetOptions, getDefaultLegendOptions } from './shared'; | ||
return { | ||
...createClassNameProp("".concat(FIELDSET, "-legend"), 'pando_legend', ...defaultOptions.classNames) | ||
...createClassNameProp(`${FIELDSET}-legend`, 'pando_legend', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=fieldset.js.map |
function createDefaultFieldsetOptions(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
@@ -6,0 +5,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -19,5 +18,5 @@ import { getDefaultFlexOptions, getDefaultFlexItemOptions, createFlexProps, createFlexItemProps } from './shared'; | ||
...props, | ||
...createClassNameProp("".concat(FLEX, "-item"), 'pando_flexItem', ...defaultOptions.classNames) | ||
...createClassNameProp(`${FLEX}-item`, 'pando_flexItem', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=flexCSS.js.map |
@@ -11,11 +11,10 @@ function getGapProp(direction) { | ||
export function getDefaultFlexOptions(options) { | ||
var _options$align, _options$classNames, _options$direction, _options$gap, _options$justify, _options$style, _options$wrap; | ||
return { | ||
align: (_options$align = options === null || options === void 0 ? void 0 : options.align) !== null && _options$align !== void 0 ? _options$align : 'initial', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
direction: (_options$direction = options === null || options === void 0 ? void 0 : options.direction) !== null && _options$direction !== void 0 ? _options$direction : 'initial', | ||
gap: (_options$gap = options === null || options === void 0 ? void 0 : options.gap) !== null && _options$gap !== void 0 ? _options$gap : 16, | ||
justify: (_options$justify = options === null || options === void 0 ? void 0 : options.justify) !== null && _options$justify !== void 0 ? _options$justify : 'initial', | ||
style: (_options$style = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style !== void 0 ? _options$style : {}, | ||
wrap: (_options$wrap = options === null || options === void 0 ? void 0 : options.wrap) !== null && _options$wrap !== void 0 ? _options$wrap : 'initial' | ||
align: options?.align ?? 'initial', | ||
classNames: options?.classNames ?? [], | ||
direction: options?.direction ?? 'initial', | ||
gap: options?.gap ?? 16, | ||
justify: options?.justify ?? 'initial', | ||
style: options?.style ?? {}, | ||
wrap: options?.wrap ?? 'initial' | ||
}; | ||
@@ -35,3 +34,3 @@ } | ||
justifyContent: options.justify, | ||
[getGapProp(direction)]: "".concat(gap / 16, "rem") | ||
[getGapProp(direction)]: `${gap / 16}rem` | ||
} | ||
@@ -41,9 +40,8 @@ }; | ||
export function getDefaultFlexItemOptions(options) { | ||
var _options$basis, _options$classNames2, _options$grow, _options$shrink, _options$style2; | ||
return { | ||
basis: (_options$basis = options === null || options === void 0 ? void 0 : options.basis) !== null && _options$basis !== void 0 ? _options$basis : 'auto', | ||
classNames: (_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [], | ||
grow: (_options$grow = options === null || options === void 0 ? void 0 : options.grow) !== null && _options$grow !== void 0 ? _options$grow : 0, | ||
shrink: (_options$shrink = options === null || options === void 0 ? void 0 : options.shrink) !== null && _options$shrink !== void 0 ? _options$shrink : 0, | ||
style: (_options$style2 = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style2 !== void 0 ? _options$style2 : {} | ||
basis: options?.basis ?? 'auto', | ||
classNames: options?.classNames ?? [], | ||
grow: options?.grow ?? 0, | ||
shrink: options?.shrink ?? 0, | ||
style: options?.style ?? {} | ||
}; | ||
@@ -50,0 +48,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { getDefaultFormLabelOptions, getFormLabelClasses, getFormValue } from './shared'; |
export function getFormLabelClasses(kind) { | ||
return { | ||
labelClass: "pando_".concat(kind, "FormLabel") | ||
labelClass: `pando_${kind}FormLabel` | ||
}; | ||
} | ||
export function getDefaultFormLabelOptions(options) { | ||
var _options$classNames, _options$htmlFor, _options$kind, _options$required, _options$value; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
htmlFor: (_options$htmlFor = options === null || options === void 0 ? void 0 : options.htmlFor) !== null && _options$htmlFor !== void 0 ? _options$htmlFor : '', | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'default', | ||
required: (_options$required = options === null || options === void 0 ? void 0 : options.required) !== null && _options$required !== void 0 ? _options$required : false, | ||
value: (_options$value = options === null || options === void 0 ? void 0 : options.value) !== null && _options$value !== void 0 ? _options$value : 'Form label' | ||
classNames: options?.classNames ?? [], | ||
htmlFor: options?.htmlFor ?? '', | ||
kind: options?.kind ?? 'default', | ||
required: options?.required ?? false, | ||
value: options?.value ?? 'Form label' | ||
}; | ||
@@ -19,3 +18,3 @@ } | ||
if (required) { | ||
label = "".concat(value, " (required)"); | ||
label = `${value} (required)`; | ||
} | ||
@@ -22,0 +21,0 @@ return { |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -19,5 +18,5 @@ import { getDefaultGridOptions, getDefaultGridItemOptions, createGridProps, createGridItemProps } from './shared'; | ||
...props, | ||
...createClassNameProp("".concat(GRID, "-item"), 'pando_gridItem', ...defaultOptions.classNames) | ||
...createClassNameProp(`${GRID}-item`, 'pando_gridItem', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=gridCSS.js.map |
@@ -1,4 +0,3 @@ | ||
import "core-js/modules/es.string.replace.js"; | ||
function getFormattedAreas(areas) { | ||
return "'".concat(areas.toString().replace(/,/g, "' '"), "'"); | ||
return `'${areas.toString().replace(/,/g, "' '")}'`; | ||
} | ||
@@ -12,10 +11,9 @@ function isIntegerString(value) { | ||
export function getDefaultGridOptions(options) { | ||
var _options$areas, _options$classNames, _options$cols, _options$gap, _options$rows, _options$style; | ||
return { | ||
areas: (_options$areas = options === null || options === void 0 ? void 0 : options.areas) !== null && _options$areas !== void 0 ? _options$areas : [], | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
cols: (_options$cols = options === null || options === void 0 ? void 0 : options.cols) !== null && _options$cols !== void 0 ? _options$cols : '12', | ||
gap: (_options$gap = options === null || options === void 0 ? void 0 : options.gap) !== null && _options$gap !== void 0 ? _options$gap : 16, | ||
rows: (_options$rows = options === null || options === void 0 ? void 0 : options.rows) !== null && _options$rows !== void 0 ? _options$rows : '1', | ||
style: (_options$style = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style !== void 0 ? _options$style : {} | ||
areas: options?.areas ?? [], | ||
classNames: options?.classNames ?? [], | ||
cols: options?.cols ?? '12', | ||
gap: options?.gap ?? 16, | ||
rows: options?.rows ?? '1', | ||
style: options?.style ?? {} | ||
}; | ||
@@ -37,5 +35,5 @@ } | ||
...gridTemplateAreas, | ||
gridTemplateRows: isIntegerString(rows) ? "repeat(".concat(rows, ", 1fr)") : rows, | ||
gridTemplateColumns: isIntegerString(cols) ? "repeat(".concat(cols, ", 1fr)") : cols, | ||
gap: "".concat(gap / 16, "rem") | ||
gridTemplateRows: isIntegerString(rows) ? `repeat(${rows}, 1fr)` : rows, | ||
gridTemplateColumns: isIntegerString(cols) ? `repeat(${cols}, 1fr)` : cols, | ||
gap: `${gap / 16}rem` | ||
} | ||
@@ -45,9 +43,8 @@ }; | ||
export function getDefaultGridItemOptions(options) { | ||
var _options$area, _options$classNames2, _options$col, _options$row, _options$style2; | ||
return { | ||
area: (_options$area = options === null || options === void 0 ? void 0 : options.area) !== null && _options$area !== void 0 ? _options$area : '', | ||
classNames: (_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [], | ||
col: (_options$col = options === null || options === void 0 ? void 0 : options.col) !== null && _options$col !== void 0 ? _options$col : '', | ||
row: (_options$row = options === null || options === void 0 ? void 0 : options.row) !== null && _options$row !== void 0 ? _options$row : '', | ||
style: (_options$style2 = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style2 !== void 0 ? _options$style2 : {} | ||
area: options?.area ?? '', | ||
classNames: options?.classNames ?? [], | ||
col: options?.col ?? '', | ||
row: options?.row ?? '', | ||
style: options?.style ?? {} | ||
}; | ||
@@ -54,0 +51,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -15,3 +14,3 @@ import { createIconSelectorClasses, getDefaultIconOptions, getA11yIconProps } from './shared'; | ||
...createClassNameProp(ICON, sizeClass, ...defaultOptions.classNames), | ||
...((options === null || options === void 0 ? void 0 : options.customSize) && { | ||
...(options?.customSize && { | ||
height: options.customSize, | ||
@@ -18,0 +17,0 @@ width: options.customSize |
@@ -6,5 +6,4 @@ const WARNING = 'You have set ariaHidden to false, but have not provided an ariaLabel'; | ||
} else if (options.ariaHidden === false && options.ariaLabel) { | ||
var _options$ariaLabel; | ||
return { | ||
'aria-label': (_options$ariaLabel = options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : '' | ||
'aria-label': options.ariaLabel ?? '' | ||
}; | ||
@@ -20,9 +19,8 @@ } else { | ||
}; | ||
if (options !== null && options !== void 0 && options.ariaHidden) { | ||
if (options?.ariaHidden) { | ||
return defaultResult; | ||
} else if ((options === null || options === void 0 ? void 0 : options.ariaHidden) === false && options.ariaLabel) { | ||
var _options$ariaLabel2; | ||
} else if (options?.ariaHidden === false && options.ariaLabel) { | ||
return { | ||
ariaHidden: false, | ||
ariaLabel: (_options$ariaLabel2 = options.ariaLabel) !== null && _options$ariaLabel2 !== void 0 ? _options$ariaLabel2 : '' | ||
ariaLabel: options.ariaLabel ?? '' | ||
}; | ||
@@ -38,8 +36,7 @@ } else { | ||
export function getDefaultIconOptions(options) { | ||
var _options$classNames, _options$size; | ||
return { | ||
...getIconAriaOptions(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
customSize: options === null || options === void 0 ? void 0 : options.customSize, | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
classNames: options?.classNames ?? [], | ||
customSize: options?.customSize, | ||
size: options?.size ?? 'm' | ||
}; | ||
@@ -50,3 +47,3 @@ } | ||
return { | ||
sizeClass: customSize ? "pando_custom".concat(sizeSuffix) : "pando_".concat(size).concat(sizeSuffix) | ||
sizeClass: customSize ? `pando_custom${sizeSuffix}` : `pando_${size}${sizeSuffix}` | ||
}; | ||
@@ -53,0 +50,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { createIconButtonProps, getDefaultIconButtonOptions, getIconButtonClasses } from './shared'; |
@@ -13,3 +13,3 @@ import { createPandoOptions } from '../shared/defaultOptions'; | ||
function createIconBtnClass(name) { | ||
return "pando_".concat(name, "IconButton"); | ||
return `pando_${name}IconButton`; | ||
} | ||
@@ -20,10 +20,9 @@ | ||
export function getDefaultIconButtonOptions(options) { | ||
var _options$ariaLabel, _options$classNames, _options$disabled, _options$sentiment, _options$usage, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'button with icon', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
disabled: (_options$disabled = options === null || options === void 0 ? void 0 : options.disabled) !== null && _options$disabled !== void 0 ? _options$disabled : false, | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'action', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'square', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'l' | ||
ariaLabel: options?.ariaLabel ?? 'button with icon', | ||
classNames: options?.classNames ?? [], | ||
disabled: options?.disabled ?? false, | ||
sentiment: options?.sentiment ?? 'action', | ||
usage: options?.usage ?? 'square', | ||
size: options?.size ?? 'l' | ||
}; | ||
@@ -30,0 +29,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -9,3 +8,3 @@ import { createInputProps } from '../shared/helpers/input'; | ||
return { | ||
...createClassNameProp("".concat(INPUT, "-wrapper"), 'pando_inputWrapper') | ||
...createClassNameProp(`${INPUT}-wrapper`, 'pando_inputWrapper') | ||
}; | ||
@@ -28,3 +27,3 @@ } | ||
iconWrapper: { | ||
...createClassNameProp("".concat(INPUT, "-leading-icon"), 'pando_inputLeadingIcon') | ||
...createClassNameProp(`${INPUT}-leading-icon`, 'pando_inputLeadingIcon') | ||
} | ||
@@ -38,3 +37,3 @@ }) | ||
invalidIconWrapper: { | ||
...createClassNameProp("".concat(INPUT, "-invalid-icon"), 'pando_inputIcon') | ||
...createClassNameProp(`${INPUT}-invalid-icon`, 'pando_inputIcon') | ||
} | ||
@@ -41,0 +40,0 @@ }) |
@@ -11,8 +11,7 @@ import { getDefaultSharedInputOptions } from '../shared/helpers/input'; | ||
export function getDefaultInputOptions(options) { | ||
var _options$classNames, _options$kind, _options$pandoSize; | ||
return { | ||
...getDefaultSharedInputOptions(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'default', | ||
pandoSize: (_options$pandoSize = options === null || options === void 0 ? void 0 : options.pandoSize) !== null && _options$pandoSize !== void 0 ? _options$pandoSize : 'l' | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'default', | ||
pandoSize: options?.pandoSize ?? 'l' | ||
}; | ||
@@ -25,4 +24,4 @@ } | ||
return { | ||
kindClass: "pando_".concat(options.kind, "Input"), | ||
baseSizeClass: "pando_".concat(pandoSize, "InputBase") | ||
kindClass: `pando_${options.kind}Input`, | ||
baseSizeClass: `pando_${pandoSize}InputBase` | ||
}; | ||
@@ -40,7 +39,7 @@ } | ||
...createDefaultIconInputOptions(size), | ||
...(additions === null || additions === void 0 ? void 0 : additions.invalidIconOptions) | ||
...additions?.invalidIconOptions | ||
}), | ||
invalidIconWrapper: { | ||
['data-invalid']: true, | ||
...(additions === null || additions === void 0 ? void 0 : additions.invalidIconWrapper) | ||
...additions?.invalidIconWrapper | ||
} | ||
@@ -54,6 +53,6 @@ }; | ||
...createDefaultIconInputOptions(size), | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconOptions) | ||
...additions?.iconOptions | ||
}), | ||
iconWrapper: { | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconWrapper) | ||
...additions?.iconWrapper | ||
} | ||
@@ -60,0 +59,0 @@ }; |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -12,5 +11,4 @@ import "./menu.css"; | ||
export function getMenuButtonStyles(options) { | ||
var _options$classNames; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-btn"), 'pando_menuBtn', ...((_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [])) | ||
...createClassNameProp(`${MENU}-btn`, 'pando_menuBtn', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -25,5 +23,4 @@ } | ||
export function getMenuDescriptionStyles(options) { | ||
var _options$classNames2; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-description"), 'pando_menuDescription', ...((_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [])) | ||
...createClassNameProp(`${MENU}-description`, 'pando_menuDescription', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -38,5 +35,4 @@ } | ||
export function getMenuListContainerStyles(options) { | ||
var _options$classNames3; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-list-container"), 'pando_menuListContainer', ...((_options$classNames3 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames3 !== void 0 ? _options$classNames3 : [])) | ||
...createClassNameProp(`${MENU}-list-container`, 'pando_menuListContainer', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -51,5 +47,4 @@ } | ||
export function getMenuListStyles(options) { | ||
var _options$classNames4; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-list"), 'pando_menu', ...((_options$classNames4 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames4 !== void 0 ? _options$classNames4 : [])) | ||
...createClassNameProp(`${MENU}-list`, 'pando_menu', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -64,5 +59,4 @@ } | ||
export function getMenuListItemStyles(options) { | ||
var _options$classNames5; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-list-item"), 'pando_menuListItem', ...((_options$classNames5 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames5 !== void 0 ? _options$classNames5 : [])) | ||
...createClassNameProp(`${MENU}-list-item`, 'pando_menuListItem', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -77,5 +71,4 @@ } | ||
export function getMenuListItemContentStyles(options) { | ||
var _options$classNames6; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-list-item-content"), 'pando_menuListItemContent', ...((_options$classNames6 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames6 !== void 0 ? _options$classNames6 : [])) | ||
...createClassNameProp(`${MENU}-list-item-content`, 'pando_menuListItemContent', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -90,5 +83,4 @@ } | ||
export function getMenuListItemLinkStyles(options) { | ||
var _options$classNames7; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-list-item-link"), 'pando_menuListItemLink', ...((_options$classNames7 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames7 !== void 0 ? _options$classNames7 : [])) | ||
...createClassNameProp(`${MENU}-list-item-link`, 'pando_menuListItemLink', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -103,7 +95,6 @@ } | ||
export function getMenuDividerStyles(options) { | ||
var _options$classNames8; | ||
return { | ||
...createClassNameProp("".concat(MENU, "-list-item-divider"), 'pando_menuListItemDivider', ...((_options$classNames8 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames8 !== void 0 ? _options$classNames8 : [])) | ||
...createClassNameProp(`${MENU}-list-item-divider`, 'pando_menuListItemDivider', ...(options?.classNames ?? [])) | ||
}; | ||
} | ||
//# sourceMappingURL=menu.js.map |
@@ -13,3 +13,3 @@ import { createClassNameProp } from '../../utils/helpers'; | ||
...props.buttonGroup, | ||
...createClassNameProp("".concat(PAGINATION, "-buttonGroup"), classes.buttonGroupClass) | ||
...createClassNameProp(`${PAGINATION}-buttonGroup`, classes.buttonGroupClass) | ||
}, | ||
@@ -22,3 +22,3 @@ container: { | ||
...props.text, | ||
...createClassNameProp("".concat(PAGINATION, "-text"), classes.textClass) | ||
...createClassNameProp(`${PAGINATION}-text`, classes.textClass) | ||
} | ||
@@ -25,0 +25,0 @@ }; |
import { createPandoOptions } from '../shared/defaultOptions'; | ||
export function getDefaultPaginationOptions(options) { | ||
var _options$ariaLabel, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'Pagination', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'l' | ||
ariaLabel: options?.ariaLabel ?? 'Pagination', | ||
size: options?.size ?? 'l' | ||
}; | ||
@@ -14,5 +13,5 @@ } | ||
return { | ||
buttonGroupClass: "pando_".concat(size, "PaginationButtonGroup"), | ||
containerClass: "pando_".concat(size, "PaginationContainer"), | ||
textClass: "pando_".concat(size, "PaginationText") | ||
buttonGroupClass: `pando_${size}PaginationButtonGroup`, | ||
containerClass: `pando_${size}PaginationContainer`, | ||
textClass: `pando_${size}PaginationText` | ||
}; | ||
@@ -19,0 +18,0 @@ } |
@@ -18,7 +18,7 @@ import { createClassNameProp } from '../../utils/helpers'; | ||
...props.wrapper, | ||
...createClassNameProp("".concat(POPOVER, "-wrapper"), 'pando_popoverWrapper') | ||
...createClassNameProp(`${POPOVER}-wrapper`, 'pando_popoverWrapper') | ||
}, | ||
trigger: { | ||
...props.trigger, | ||
...createClassNameProp("".concat(POPOVER, "-trigger"), 'pando_popoverTrigger') | ||
...createClassNameProp(`${POPOVER}-trigger`, 'pando_popoverTrigger') | ||
}, | ||
@@ -31,11 +31,11 @@ popover: { | ||
...props.content, | ||
...createClassNameProp("".concat(POPOVER, "-content"), popoverContentClass, contentPositionClass) | ||
...createClassNameProp(`${POPOVER}-content`, popoverContentClass, contentPositionClass) | ||
}, | ||
header: { | ||
...props.header, | ||
...createClassNameProp("".concat(POPOVER, "-header"), 'pando_popoverHeader') | ||
...createClassNameProp(`${POPOVER}-header`, 'pando_popoverHeader') | ||
}, | ||
closeButtonWrapper: { | ||
...props.closeButtonWrapper, | ||
...createClassNameProp("".concat(POPOVER, "-closeButtonWrapper"), 'pando_popoverCloseButtonWrapper') | ||
...createClassNameProp(`${POPOVER}-closeButtonWrapper`, 'pando_popoverCloseButtonWrapper') | ||
} | ||
@@ -42,0 +42,0 @@ }; |
@@ -5,10 +5,9 @@ import { getDialogA11yLabel } from '../../utils/a11yHelpers'; | ||
export function getDefaultPopoverOptions(options) { | ||
var _options$ariaLabel, _options$bodyId, _options$headerId, _options$id, _options$isExpanded, _options$position; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : '', | ||
bodyId: (_options$bodyId = options === null || options === void 0 ? void 0 : options.bodyId) !== null && _options$bodyId !== void 0 ? _options$bodyId : 'popover-body', | ||
headerId: (_options$headerId = options === null || options === void 0 ? void 0 : options.headerId) !== null && _options$headerId !== void 0 ? _options$headerId : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : 'popover', | ||
isExpanded: (_options$isExpanded = options === null || options === void 0 ? void 0 : options.isExpanded) !== null && _options$isExpanded !== void 0 ? _options$isExpanded : false, | ||
position: (_options$position = options === null || options === void 0 ? void 0 : options.position) !== null && _options$position !== void 0 ? _options$position : 'top' | ||
ariaLabel: options?.ariaLabel ?? '', | ||
bodyId: options?.bodyId ?? 'popover-body', | ||
headerId: options?.headerId ?? '', | ||
id: options?.id ?? 'popover', | ||
isExpanded: options?.isExpanded ?? false, | ||
position: options?.position ?? 'top' | ||
}; | ||
@@ -15,0 +14,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -22,3 +21,3 @@ import { createProgressClasses, getA11yProgressProps, getDefaultProgressOptions } from './shared'; | ||
const style = { | ||
width: "".concat(a11y.now, "%") | ||
width: `${a11y.now}%` | ||
}; | ||
@@ -28,3 +27,3 @@ return { | ||
...a11yProps, | ||
...createClassNameProp("".concat(PROGRESS, "-bar"), 'pando_progressBar', sizeClass, kindClass), | ||
...createClassNameProp(`${PROGRESS}-bar`, 'pando_progressBar', sizeClass, kindClass), | ||
style | ||
@@ -31,0 +30,0 @@ }, |
@@ -9,11 +9,10 @@ const a11yRole = 'progressbar'; | ||
export function getDefaultProgressOptions(options) { | ||
var _options$ariaLabel, _options$classNames, _options$kind, _options$max, _options$min, _options$now, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'progress indicator', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'linear', | ||
max: (_options$max = options === null || options === void 0 ? void 0 : options.max) !== null && _options$max !== void 0 ? _options$max : 100, | ||
min: (_options$min = options === null || options === void 0 ? void 0 : options.min) !== null && _options$min !== void 0 ? _options$min : 0, | ||
now: (_options$now = options === null || options === void 0 ? void 0 : options.now) !== null && _options$now !== void 0 ? _options$now : 0, | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 's' | ||
ariaLabel: options?.ariaLabel ?? 'progress indicator', | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'linear', | ||
max: options?.max ?? 100, | ||
min: options?.min ?? 0, | ||
now: options?.now ?? 0, | ||
size: options?.size ?? 's' | ||
}; | ||
@@ -23,4 +22,4 @@ } | ||
return { | ||
kindClass: "pando_".concat(options.kind, "Progress"), | ||
sizeClass: "pando_".concat(options.size, "Progress") | ||
kindClass: `pando_${options.kind}Progress`, | ||
sizeClass: `pando_${options.size}Progress` | ||
}; | ||
@@ -30,6 +29,6 @@ } | ||
return { | ||
[a11yPropMap.ariaLabel]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.max, | ||
[a11yPropMap.valueMin]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.min, | ||
[a11yPropMap.valueNow]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.now, | ||
[a11yPropMap.ariaLabel]: a11yOptions?.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions?.max, | ||
[a11yPropMap.valueMin]: a11yOptions?.min, | ||
[a11yPropMap.valueNow]: a11yOptions?.now, | ||
role: a11yRole | ||
@@ -36,0 +35,0 @@ }; |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -12,11 +11,11 @@ import { getDefaultRadioOptions, createRadioProps } from './shared'; | ||
...props.input, | ||
...createClassNameProp("".concat(RADIO, "-input"), 'pando_radioInput') | ||
...createClassNameProp(`${RADIO}-input`, 'pando_radioInput') | ||
}, | ||
radioContainer: { | ||
...props.container, | ||
...createClassNameProp("".concat(RADIO, "-container"), 'pando_radioContainer', ...defaultOptions.classNames) | ||
...createClassNameProp(`${RADIO}-container`, 'pando_radioContainer', ...defaultOptions.classNames) | ||
}, | ||
radioControl: { | ||
...props.control, | ||
...createClassNameProp("".concat(RADIO, "-control"), 'pando_radioControl') | ||
...createClassNameProp(`${RADIO}-control`, 'pando_radioControl') | ||
} | ||
@@ -23,0 +22,0 @@ }; |
import { createInputA11yProps, createInputDataProps, getAriaChecked, getDefaultSharedInputOptions } from '../shared/helpers/input'; | ||
export function getDefaultRadioOptions(options) { | ||
var _options$classNames, _options$checked; | ||
return { | ||
...getDefaultSharedInputOptions(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [''], | ||
checked: (_options$checked = options === null || options === void 0 ? void 0 : options.checked) !== null && _options$checked !== void 0 ? _options$checked : false | ||
classNames: options?.classNames ?? [''], | ||
checked: options?.checked ?? false | ||
}; | ||
@@ -9,0 +8,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -19,3 +18,3 @@ import { createSelectClasses, createSelectProps, createSelectOptionProps, getDefaultSelectOptions, getDefaultSelectOptionOptions } from './shared'; | ||
...props.fieldWrapper, | ||
...createClassNameProp("".concat(SELECT, "-fieldWrapper"), 'pando_selectFieldWrapper') | ||
...createClassNameProp(`${SELECT}-fieldWrapper`, 'pando_selectFieldWrapper') | ||
}, | ||
@@ -28,7 +27,7 @@ select: { | ||
...props.selectWrapper, | ||
...createClassNameProp("".concat(SELECT, "-wrapper"), 'pando_selectWrapper') | ||
...createClassNameProp(`${SELECT}-wrapper`, 'pando_selectWrapper') | ||
}, | ||
iconWrapper: { | ||
...props.iconWrapper, | ||
...createClassNameProp("".concat(SELECT, "-icon"), 'pando_selectIcon') | ||
...createClassNameProp(`${SELECT}-icon`, 'pando_selectIcon') | ||
} | ||
@@ -42,5 +41,5 @@ }; | ||
...props, | ||
...createClassNameProp("".concat(SELECT, "-option"), 'pando_selectOption', ...defaultOptions.classNames) | ||
...createClassNameProp(`${SELECT}-option`, 'pando_selectOption', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=selectCSS.js.map |
import { createA11yProps } from '../../utils/helpers'; | ||
import { createPandoOptions, getDefaultFieldStates } from '../shared/defaultOptions'; | ||
export function getDefaultSelectOptions(options) { | ||
var _options$classNames, _options$describedBy, _options$id, _options$name, _options$pandoSize; | ||
return { | ||
...getDefaultFieldStates(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
describedBy: (_options$describedBy = options === null || options === void 0 ? void 0 : options.describedBy) !== null && _options$describedBy !== void 0 ? _options$describedBy : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '', | ||
pandoSize: (_options$pandoSize = options === null || options === void 0 ? void 0 : options.pandoSize) !== null && _options$pandoSize !== void 0 ? _options$pandoSize : 'l' | ||
classNames: options?.classNames ?? [], | ||
describedBy: options?.describedBy ?? '', | ||
id: options?.id ?? '', | ||
name: options?.name ?? '', | ||
pandoSize: options?.pandoSize ?? 'l' | ||
}; | ||
@@ -16,3 +15,3 @@ } | ||
return { | ||
baseSizeClass: "pando_".concat(size, "SelectBase") | ||
baseSizeClass: `pando_${size}SelectBase` | ||
}; | ||
@@ -52,6 +51,5 @@ } | ||
export function getDefaultSelectOptionOptions(options) { | ||
var _options$classNames2, _options$value; | ||
return { | ||
classNames: (_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [], | ||
value: (_options$value = options === null || options === void 0 ? void 0 : options.value) !== null && _options$value !== void 0 ? _options$value : '' | ||
classNames: options?.classNames ?? [], | ||
value: options?.value ?? '' | ||
}; | ||
@@ -58,0 +56,0 @@ } |
@@ -7,6 +7,6 @@ export function createDialogIconProps(options, additions) { | ||
size: 'm', | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconOptions) | ||
...additions?.iconOptions | ||
}), | ||
iconWrapper: { | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconWrapper) | ||
...additions?.iconWrapper | ||
} | ||
@@ -23,23 +23,20 @@ }; | ||
export function getDefaultFieldOptions(options) { | ||
var _options$id, _options$name; | ||
return { | ||
...getDefaultFieldStates(options), | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '' | ||
id: options?.id ?? '', | ||
name: options?.name ?? '' | ||
}; | ||
} | ||
export function getDefaultFieldStates(options) { | ||
var _options$disabled, _options$invalid, _options$readOnly, _options$required; | ||
return { | ||
disabled: (_options$disabled = options === null || options === void 0 ? void 0 : options.disabled) !== null && _options$disabled !== void 0 ? _options$disabled : false, | ||
invalid: (_options$invalid = options === null || options === void 0 ? void 0 : options.invalid) !== null && _options$invalid !== void 0 ? _options$invalid : false, | ||
readOnly: (_options$readOnly = options === null || options === void 0 ? void 0 : options.readOnly) !== null && _options$readOnly !== void 0 ? _options$readOnly : false, | ||
required: (_options$required = options === null || options === void 0 ? void 0 : options.required) !== null && _options$required !== void 0 ? _options$required : false | ||
disabled: options?.disabled ?? false, | ||
invalid: options?.invalid ?? false, | ||
readOnly: options?.readOnly ?? false, | ||
required: options?.required ?? false | ||
}; | ||
} | ||
export function getDefaultMessageOptions(options) { | ||
var _options$classNames, _options$id2; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
id: (_options$id2 = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id2 !== void 0 ? _options$id2 : '' | ||
classNames: options?.classNames ?? [], | ||
id: options?.id ?? '' | ||
}; | ||
@@ -53,4 +50,4 @@ } | ||
export function getDefaultPlaceholder(value) { | ||
return value !== null && value !== void 0 ? value : 'Enter text'; | ||
return value ?? 'Enter text'; | ||
} | ||
//# sourceMappingURL=defaultOptions.js.map |
import { createA11yProps } from '../../../utils/helpers'; | ||
import { getDefaultFieldStates, getDefaultPlaceholder } from '../defaultOptions'; | ||
function getDefaultDisabledOptions(options) { | ||
var _options$value; | ||
const { | ||
@@ -9,4 +8,4 @@ disabled | ||
return { | ||
placeholder: disabled ? '' : getDefaultPlaceholder(options === null || options === void 0 ? void 0 : options.placeholder), | ||
value: disabled ? '' : (_options$value = options === null || options === void 0 ? void 0 : options.value) !== null && _options$value !== void 0 ? _options$value : '' | ||
placeholder: disabled ? '' : getDefaultPlaceholder(options?.placeholder), | ||
value: disabled ? '' : options?.value ?? '' | ||
}; | ||
@@ -52,4 +51,3 @@ } | ||
export function getAriaChecked(options) { | ||
var _options$checked; | ||
const checked = (_options$checked = options.checked) !== null && _options$checked !== void 0 ? _options$checked : false; | ||
const checked = options.checked ?? false; | ||
if (options.indeterminate) { | ||
@@ -61,3 +59,2 @@ return 'mixed'; | ||
export function getDefaultSharedInputOptions(options) { | ||
var _options$describedBy, _options$id, _options$name; | ||
const internalState = getDefaultFieldStates(options); | ||
@@ -70,7 +67,7 @@ return { | ||
}), | ||
describedBy: (_options$describedBy = options === null || options === void 0 ? void 0 : options.describedBy) !== null && _options$describedBy !== void 0 ? _options$describedBy : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '' | ||
describedBy: options?.describedBy ?? '', | ||
id: options?.id ?? '', | ||
name: options?.name ?? '' | ||
}; | ||
} | ||
//# sourceMappingURL=input.js.map |
export function getTooltipClasses(options) { | ||
return { | ||
contentPositionClass: "pando_".concat(options.position, "PositionContent"), | ||
positionClass: "pando_".concat(options.position, "Position") | ||
contentPositionClass: `pando_${options.position}PositionContent`, | ||
positionClass: `pando_${options.position}Position` | ||
}; | ||
} | ||
//# sourceMappingURL=tooltipHelpers.js.map |
export function getDefaultSkeletonOptions(options) { | ||
var _options$classNames, _options$kind; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'content' | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'content' | ||
}; | ||
@@ -10,5 +9,5 @@ } | ||
return { | ||
kindClass: "pando_".concat(kind, "Skeleton") | ||
kindClass: `pando_${kind}Skeleton` | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { getDefaultSkeletonOptions, getSkeletonClasses } from './shared'; |
import { createInputA11yProps, createInputDataProps, getAriaChecked, getDefaultSharedInputOptions } from '../shared/helpers/input'; | ||
export function getDefaultSwitchOptions(options) { | ||
var _options$classNames, _options$checked, _options$pandoSize; | ||
return { | ||
...getDefaultSharedInputOptions(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [''], | ||
checked: (_options$checked = options === null || options === void 0 ? void 0 : options.checked) !== null && _options$checked !== void 0 ? _options$checked : false, | ||
pandoSize: (_options$pandoSize = options === null || options === void 0 ? void 0 : options.pandoSize) !== null && _options$pandoSize !== void 0 ? _options$pandoSize : 'm' | ||
classNames: options?.classNames ?? [''], | ||
checked: options?.checked ?? false, | ||
pandoSize: options?.pandoSize ?? 'm' | ||
}; | ||
@@ -13,4 +12,4 @@ } | ||
return { | ||
thumbClass: "pando_".concat(size, "SwitchThumb"), | ||
trackClass: "pando_".concat(size, "SwitchTrack") | ||
thumbClass: `pando_${size}SwitchThumb`, | ||
trackClass: `pando_${size}SwitchTrack` | ||
}; | ||
@@ -17,0 +16,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -20,12 +19,12 @@ import { createSwitchProps, getDefaultSwitchOptions, getSwitchClasses } from './shared'; | ||
...props.input, | ||
...createClassNameProp("".concat(SWITCH, "-input"), 'pando_switchInput', ...defaultOptions.classNames) | ||
...createClassNameProp(`${SWITCH}-input`, 'pando_switchInput', ...defaultOptions.classNames) | ||
}, | ||
switchContainer: createClassNameProp("".concat(SWITCH, "-container"), 'pando_switchContainer'), | ||
switchContainer: createClassNameProp(`${SWITCH}-container`, 'pando_switchContainer'), | ||
switchTrack: { | ||
...props.switchTrack, | ||
...createClassNameProp("".concat(SWITCH, "-track"), trackClass) | ||
...createClassNameProp(`${SWITCH}-track`, trackClass) | ||
}, | ||
switchThumb: { | ||
...props.switchThumb, | ||
...createClassNameProp("".concat(SWITCH, "-thumb"), thumbClass) | ||
...createClassNameProp(`${SWITCH}-thumb`, thumbClass) | ||
} | ||
@@ -41,5 +40,5 @@ }; | ||
return { | ||
...createClassNameProp("".concat(SWITCH, "-wrapper"), 'pando_switchWrapper', ...defaultOptions.classNames) | ||
...createClassNameProp(`${SWITCH}-wrapper`, 'pando_switchWrapper', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=switchCSS.js.map |
export function createTableDefaultProps(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -16,3 +15,3 @@ import { createTableDefaultProps } from './shared'; | ||
scope: 'col', | ||
...createClassNameProp("".concat(TABLE, "-head-cell"), 'pando_headCell', ...props.classNames) | ||
...createClassNameProp(`${TABLE}-head-cell`, 'pando_headCell', ...props.classNames) | ||
}; | ||
@@ -23,3 +22,3 @@ } | ||
return { | ||
...createClassNameProp("".concat(TABLE, "-body-cell"), 'pando_bodyCell', ...props.classNames) | ||
...createClassNameProp(`${TABLE}-body-cell`, 'pando_bodyCell', ...props.classNames) | ||
}; | ||
@@ -30,3 +29,3 @@ } | ||
return { | ||
...createClassNameProp("".concat(TABLE, "-row"), 'pando_tableRow', ...props.classNames) | ||
...createClassNameProp(`${TABLE}-row`, 'pando_tableRow', ...props.classNames) | ||
}; | ||
@@ -37,5 +36,5 @@ } | ||
return { | ||
...createClassNameProp("".concat(TABLE, "-caption"), 'pando_caption', ...props.classNames) | ||
...createClassNameProp(`${TABLE}-caption`, 'pando_caption', ...props.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=tableCSS.js.map |
export function getDefaultTabsOptions(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -15,3 +14,3 @@ import { getDefaultTabsOptions } from './shared'; | ||
return { | ||
...createClassNameProp("".concat(TAB, "-wrapper"), 'pando_tabWrapper', ...defaultOptions.classNames) | ||
...createClassNameProp(`${TAB}-wrapper`, 'pando_tabWrapper', ...defaultOptions.classNames) | ||
}; | ||
@@ -28,3 +27,3 @@ } | ||
return { | ||
...createClassNameProp("".concat(TAB, "-list"), 'pando_tabList', ...defaultOptions.classNames) | ||
...createClassNameProp(`${TAB}-list`, 'pando_tabList', ...defaultOptions.classNames) | ||
}; | ||
@@ -41,3 +40,3 @@ } | ||
return { | ||
...createClassNameProp("".concat(TAB, "-tab"), 'pando_tab', ...defaultOptions.classNames) | ||
...createClassNameProp(`${TAB}-tab`, 'pando_tab', ...defaultOptions.classNames) | ||
}; | ||
@@ -54,5 +53,5 @@ } | ||
return { | ||
...createClassNameProp("".concat(TAB, "-panel"), 'pando_tabPanel', ...defaultOptions.classNames) | ||
...createClassNameProp(`${TAB}-panel`, 'pando_tabPanel', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=tabs.js.map |
import { createPandoOptions } from '../shared/defaultOptions'; | ||
export function getDefaultTagOptions(options) { | ||
var _options$classNames, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
classNames: options?.classNames ?? [], | ||
size: options?.size ?? 'm' | ||
}; | ||
@@ -11,3 +10,3 @@ } | ||
return { | ||
sizeClass: "pando_".concat(size, "Tag") | ||
sizeClass: `pando_${size}Tag` | ||
}; | ||
@@ -14,0 +13,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { createTagSelectorClasses, getDefaultTagOptions, createTagProps } from './shared'; |
@@ -8,3 +8,3 @@ import { createA11yProps } from '../../utils/helpers'; | ||
return { | ||
placeholder: disabled ? '' : getDefaultPlaceholder(options === null || options === void 0 ? void 0 : options.placeholder) | ||
placeholder: disabled ? '' : getDefaultPlaceholder(options?.placeholder) | ||
}; | ||
@@ -23,3 +23,2 @@ } | ||
export function getDefaultTextareaOptions(options) { | ||
var _options$classNames, _options$describedBy, _options$id, _options$name, _options$resize; | ||
const internalState = getDefaultFieldStates(options); | ||
@@ -32,7 +31,7 @@ return { | ||
}), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
describedBy: (_options$describedBy = options === null || options === void 0 ? void 0 : options.describedBy) !== null && _options$describedBy !== void 0 ? _options$describedBy : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '', | ||
resize: (_options$resize = options === null || options === void 0 ? void 0 : options.resize) !== null && _options$resize !== void 0 ? _options$resize : 'initial' | ||
classNames: options?.classNames ?? [], | ||
describedBy: options?.describedBy ?? '', | ||
id: options?.id ?? '', | ||
name: options?.name ?? '', | ||
resize: options?.resize ?? 'initial' | ||
}; | ||
@@ -42,3 +41,3 @@ } | ||
return { | ||
resizeClass: "pando_".concat(resize, "Textarea") | ||
resizeClass: `pando_${resize}Textarea` | ||
}; | ||
@@ -45,0 +44,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { getDefaultTextareaOptions, getTextareaClasses, createTextareaProps } from './shared'; |
@@ -22,6 +22,5 @@ import { createPandoOptions } from '../shared/defaultOptions'; | ||
export function getDefaultTextLinkOptions(options) { | ||
var _options$classNames, _options$href; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
href: (_options$href = options === null || options === void 0 ? void 0 : options.href) !== null && _options$href !== void 0 ? _options$href : '' | ||
classNames: options?.classNames ?? [], | ||
href: options?.href ?? '' | ||
}; | ||
@@ -28,0 +27,0 @@ } |
@@ -1,2 +0,1 @@ | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
import { createClassNameProp } from '../../utils/helpers'; | ||
@@ -3,0 +2,0 @@ import { getDefaultTextLinkOptions, createTextLinkProps } from './shared'; |
import { createPandoOptions } from '../shared/defaultOptions'; | ||
export function getToastDefaultProps(options) { | ||
var _options$sentiment; | ||
return { | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'info' | ||
sentiment: options?.sentiment ?? 'info' | ||
}; | ||
@@ -20,3 +19,3 @@ } | ||
return { | ||
sentimentClass: "pando_".concat(options.sentiment, "Toast") | ||
sentimentClass: `pando_${options.sentiment}Toast` | ||
}; | ||
@@ -23,0 +22,0 @@ } |
@@ -11,3 +11,3 @@ import { createClassNameProp } from '../../utils/helpers'; | ||
closeIconWrapper: { | ||
...createClassNameProp("".concat(TOAST, "-close-icon-wrapper"), 'pando_toastCloseIconWrapper') | ||
...createClassNameProp(`${TOAST}-close-icon-wrapper`, 'pando_toastCloseIconWrapper') | ||
}, | ||
@@ -18,10 +18,10 @@ container: { | ||
iconWrapper: { | ||
...createClassNameProp("".concat(TOAST, "-icon-wrapper"), 'pando_toastIconWrapper') | ||
...createClassNameProp(`${TOAST}-icon-wrapper`, 'pando_toastIconWrapper') | ||
}, | ||
section: { | ||
...createClassNameProp("".concat(TOAST, "-section"), 'pando_toastSection') | ||
...createClassNameProp(`${TOAST}-section`, 'pando_toastSection') | ||
}, | ||
wrapper: { | ||
...a11yProps.wrapper, | ||
...createClassNameProp("".concat(TOAST, "-wrapper"), 'pando_toastWrapper') | ||
...createClassNameProp(`${TOAST}-wrapper`, 'pando_toastWrapper') | ||
} | ||
@@ -32,3 +32,3 @@ }; | ||
return { | ||
...createClassNameProp("".concat(TOAST, "-heading"), 'pando_toastHeading') | ||
...createClassNameProp(`${TOAST}-heading`, 'pando_toastHeading') | ||
}; | ||
@@ -38,5 +38,5 @@ } | ||
return { | ||
...createClassNameProp("".concat(TOAST, "-button"), 'pando_toastButton') | ||
...createClassNameProp(`${TOAST}-button`, 'pando_toastButton') | ||
}; | ||
} | ||
//# sourceMappingURL=toastCSS.js.map |
@@ -40,2 +40,3 @@ export * from './components/ActionMenu/actionMenu'; | ||
export * from './types'; | ||
export * from './styles'; | ||
//# sourceMappingURL=index.js.map |
export function getDialogA11yLabel(options) { | ||
var _options$ariaLabel; | ||
if (options !== null && options !== void 0 && options.headingId) { | ||
var _options$headingId; | ||
if (options?.headingId) { | ||
return { | ||
'aria-labelledby': (_options$headingId = options.headingId) !== null && _options$headingId !== void 0 ? _options$headingId : '' | ||
'aria-labelledby': options.headingId ?? '' | ||
}; | ||
} | ||
return { | ||
'aria-label': (_options$ariaLabel = options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : '' | ||
'aria-label': options.ariaLabel ?? '' | ||
}; | ||
} | ||
//# sourceMappingURL=a11yHelpers.js.map |
@@ -1,3 +0,1 @@ | ||
import "core-js/modules/es.string.replace.js"; | ||
import "core-js/modules/web.dom-collections.iterator.js"; | ||
function createMirrorObject(list) { | ||
@@ -15,3 +13,3 @@ return list.reduce((prev, current) => { | ||
} | ||
return "".concat(kebabCase(propName), ":"); | ||
return `${kebabCase(propName)}:`; | ||
} | ||
@@ -26,9 +24,12 @@ function kebabCase(input) { | ||
if (typeof style === 'string') { | ||
return "".concat(style.trim(), ";"); | ||
return `${style.trim()};`; | ||
} | ||
const psuedoStyles = Object.entries(style).reduce((prev, _ref) => { | ||
let [current, currentValue] = _ref; | ||
return "\n ".concat(prev.trim(), "\n ").concat(kebabCase(current), ": ").concat(currentValue, ";\n "); | ||
}, ""); | ||
return "{".concat(psuedoStyles, "}"); | ||
return ` | ||
${prev.trim()} | ||
${kebabCase(current)}: ${currentValue}; | ||
`; | ||
}, ``); | ||
return `{${psuedoStyles}}`; | ||
} | ||
@@ -75,4 +76,3 @@ | ||
export function splitClassNameProp(classNameProp) { | ||
var _classNameProp$split$; | ||
return (_classNameProp$split$ = classNameProp === null || classNameProp === void 0 ? void 0 : classNameProp.split(' ').filter(Boolean)) !== null && _classNameProp$split$ !== void 0 ? _classNameProp$split$ : []; | ||
return classNameProp?.split(' ').filter(Boolean) ?? []; | ||
} | ||
@@ -86,3 +86,6 @@ export function transformCasing(jsxProp, syntax) { | ||
const propName = formatCSSPropName(currentKey); | ||
return "\n ".concat(prev.trim(), "\n ").concat(propName, " ").concat(transformValue(currentValue), "\n "); | ||
return ` | ||
${prev.trim()} | ||
${propName} ${transformValue(currentValue)} | ||
`; | ||
}, '').trim().replace(/^ {2,12}/gm, ''); | ||
@@ -89,0 +92,0 @@ } |
@@ -13,5 +13,4 @@ "use strict"; | ||
function getDefaultActionMenuOptions(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
@@ -29,3 +28,3 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ACTION_MENU, "-btn-group"), 'pando_actionMenuBtnGroup', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${ACTION_MENU}-btn-group`, 'pando_actionMenuBtnGroup', ...defaultOptions.classNames) | ||
}; | ||
@@ -42,3 +41,3 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ACTION_MENU, "-btn"), 'pando_actionMenuBtn', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${ACTION_MENU}-btn`, 'pando_actionMenuBtn', ...defaultOptions.classNames) | ||
}; | ||
@@ -56,5 +55,5 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ACTION_MENU, "-trigger"), 'pando_actionMenuTrigger', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${ACTION_MENU}-trigger`, 'pando_actionMenuTrigger', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=actionMenu.js.map |
@@ -30,7 +30,7 @@ "use strict"; | ||
...props.iconWrapper, | ||
...(0, _helpers.createClassNameProp)("".concat(ADMONITION, "-icon"), iconClass) | ||
...(0, _helpers.createClassNameProp)(`${ADMONITION}-icon`, iconClass) | ||
}, | ||
textContainer: { | ||
...props.textContainer, | ||
...(0, _helpers.createClassNameProp)("".concat(ADMONITION, "-text-container"), textClass) | ||
...(0, _helpers.createClassNameProp)(`${ADMONITION}-text-container`, textClass) | ||
}, | ||
@@ -46,3 +46,3 @@ wrapper: { | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ADMONITION, "-heading"), 'pando_admonitionTitle', ...classNames) | ||
...(0, _helpers.createClassNameProp)(`${ADMONITION}-heading`, 'pando_admonitionTitle', ...classNames) | ||
}; | ||
@@ -53,3 +53,3 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ADMONITION, "-text"), 'pando_admonitionDescription', ...classNames) | ||
...(0, _helpers.createClassNameProp)(`${ADMONITION}-text`, 'pando_admonitionDescription', ...classNames) | ||
}; | ||
@@ -56,0 +56,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_dangerAdmonition: { | ||
@@ -188,3 +188,2 @@ alignItems: 'flex-start', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=admonitionCSS.js.map |
@@ -10,6 +10,5 @@ "use strict"; | ||
function getDefaultAdmonitionOptions(options) { | ||
var _options$classNames, _options$sentiment; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'info' | ||
classNames: options?.classNames ?? [], | ||
sentiment: options?.sentiment ?? 'info' | ||
}; | ||
@@ -19,5 +18,5 @@ } | ||
return { | ||
sentimentClass: "pando_".concat(sentiment, "Admonition"), | ||
iconClass: "pando_".concat(sentiment, "IconWrapper"), | ||
textClass: "pando_".concat(sentiment, "TextContainer") | ||
sentimentClass: `pando_${sentiment}Admonition`, | ||
iconClass: `pando_${sentiment}IconWrapper`, | ||
textClass: `pando_${sentiment}TextContainer` | ||
}; | ||
@@ -24,0 +23,0 @@ } |
@@ -25,7 +25,7 @@ "use strict"; | ||
backdrop: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-backdrop"), 'pando_alertDialogBackdrop') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-backdrop`, 'pando_alertDialogBackdrop') | ||
}, | ||
focusGuard: { | ||
...a11yProps.focusGuard, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-focus-guard"), 'pando_alertDialogFocusGuard') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-focus-guard`, 'pando_alertDialogFocusGuard') | ||
}, | ||
@@ -41,3 +41,3 @@ wrapper: { | ||
...(0, _shared.getAlertA11yProps)({}).section, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-section"), 'pando_alertDialogSection') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-section`, 'pando_alertDialogSection') | ||
}; | ||
@@ -50,3 +50,3 @@ } | ||
iconWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-icon"), 'pando_alertDialogTitleIcon') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-icon`, 'pando_alertDialogTitleIcon') | ||
} | ||
@@ -57,3 +57,3 @@ }); | ||
header: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-header"), 'pando_alertDialogHeader') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-header`, 'pando_alertDialogHeader') | ||
} | ||
@@ -67,3 +67,3 @@ }; | ||
}).heading, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-heading")) | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-heading`) | ||
}; | ||
@@ -76,3 +76,3 @@ } | ||
}).body, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-body")) | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-body`) | ||
}; | ||
@@ -83,3 +83,3 @@ } | ||
htmlFor, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-label"), 'pando_alertDialogLabel') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-label`, 'pando_alertDialogLabel') | ||
}; | ||
@@ -94,3 +94,3 @@ } | ||
inputWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-input-wrapper"), 'pando_alertDialogInputWrapper') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-input-wrapper`, 'pando_alertDialogInputWrapper') | ||
} | ||
@@ -101,3 +101,3 @@ }; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-footer"), 'pando_alertDialogFooter') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-footer`, 'pando_alertDialogFooter') | ||
}; | ||
@@ -111,3 +111,3 @@ } | ||
button: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-cancel")) | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-cancel`) | ||
} | ||
@@ -122,3 +122,3 @@ }; | ||
button: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-confirm")) | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-confirm`) | ||
} | ||
@@ -125,0 +125,0 @@ }; |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
root: { | ||
@@ -142,3 +142,2 @@ '--ps-backdrop': 'rgba(0 0 0 / 65%)' | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=alertCSS.js.map |
@@ -24,3 +24,3 @@ "use strict"; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT), pandoClass, ...props.classNames), | ||
...(0, _helpers.createClassNameProp)(`${ALERT}`, pandoClass, ...props.classNames), | ||
'aria-describedby': props.bodyId, | ||
@@ -35,3 +35,3 @@ 'aria-labelledby': props.headingId | ||
iconWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-icon"), 'pando_alertDialogTitleIcon') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-icon`, 'pando_alertDialogTitleIcon') | ||
} | ||
@@ -42,3 +42,3 @@ }); | ||
header: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-header"), 'pando_alertDialogHeader') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-header`, 'pando_alertDialogHeader') | ||
} | ||
@@ -56,3 +56,3 @@ }; | ||
iconBtnWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-icon-btn-wrapper"), 'pando_alertDialogIconButtonWrapper', ...(classNames !== null && classNames !== void 0 ? classNames : [])) | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-icon-btn-wrapper`, 'pando_alertDialogIconButtonWrapper', ...(classNames ?? [])) | ||
} | ||
@@ -64,3 +64,3 @@ }; | ||
id, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-heading")) | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-heading`) | ||
}; | ||
@@ -71,3 +71,3 @@ } | ||
id, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-body")) | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-body`) | ||
}; | ||
@@ -78,3 +78,3 @@ } | ||
htmlFor, | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-label"), 'pando_alertDialogLabel') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-label`, 'pando_alertDialogLabel') | ||
}; | ||
@@ -89,3 +89,3 @@ } | ||
inputWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-input-wrapper"), 'pando_alertDialogInputWrapper') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-input-wrapper`, 'pando_alertDialogInputWrapper') | ||
} | ||
@@ -96,5 +96,5 @@ }; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(ALERT, "-footer"), 'pando_alertDialogFooter') | ||
...(0, _helpers.createClassNameProp)(`${ALERT}-footer`, 'pando_alertDialogFooter') | ||
}; | ||
} | ||
//# sourceMappingURL=alertDialog.js.map |
@@ -8,11 +8,10 @@ "use strict"; | ||
function getAlertDefaultProps(options) { | ||
var _options$bodyId, _options$classNames, _options$headingId, _options$kind, _options$usage; | ||
return { | ||
bodyId: (_options$bodyId = options === null || options === void 0 ? void 0 : options.bodyId) !== null && _options$bodyId !== void 0 ? _options$bodyId : '', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
headingId: (_options$headingId = options === null || options === void 0 ? void 0 : options.headingId) !== null && _options$headingId !== void 0 ? _options$headingId : '', | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'non-destructive', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'dialog' | ||
bodyId: options?.bodyId ?? '', | ||
classNames: options?.classNames ?? [], | ||
headingId: options?.headingId ?? '', | ||
kind: options?.kind ?? 'non-destructive', | ||
usage: options?.usage ?? 'dialog' | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -25,18 +25,16 @@ "use strict"; | ||
function getAvatarImageProps(options) { | ||
var _options$classNames, _options$alt, _options$src; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(AVATAR, "-image"), 'pando_avatarImage', ...((_options$classNames = options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [])), | ||
alt: (_options$alt = options.alt) !== null && _options$alt !== void 0 ? _options$alt : 'user avatar', | ||
src: (_options$src = options.src) !== null && _options$src !== void 0 ? _options$src : '' | ||
...(0, _helpers.createClassNameProp)(`${AVATAR}-image`, 'pando_avatarImage', ...(options.classNames ?? [])), | ||
alt: options.alt ?? 'user avatar', | ||
src: options.src ?? '' | ||
}; | ||
} | ||
function getAvatarLabelProps(options) { | ||
var _options$size, _options$classNames2; | ||
const props = (0, _shared.createAvatarLabalProps)(options); | ||
const { | ||
labelClass | ||
} = (0, _shared.createAvatarSelectorClasses)('default', (_options$size = options.size) !== null && _options$size !== void 0 ? _options$size : 'm'); | ||
} = (0, _shared.createAvatarSelectorClasses)('default', options.size ?? 'm'); | ||
return { | ||
...props, | ||
...(0, _helpers.createClassNameProp)("".concat(AVATAR, "-label"), 'pando_avatarLabel', labelClass, ...((_options$classNames2 = options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [])) | ||
...(0, _helpers.createClassNameProp)(`${AVATAR}-label`, 'pando_avatarLabel', labelClass, ...(options.classNames ?? [])) | ||
}; | ||
@@ -43,0 +41,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
keyframesFadeInAnimation: { | ||
@@ -162,3 +162,2 @@ '@keyframes fadeInAnimation': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=avatarCSS.js.map |
@@ -13,10 +13,9 @@ "use strict"; | ||
function getDefaultAvatarOptions(options) { | ||
var _options$classNames, _options$sentiment, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'default', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
classNames: options?.classNames ?? [], | ||
sentiment: options?.sentiment ?? 'default', | ||
size: options?.size ?? 'm' | ||
}; | ||
} | ||
const iconSizeMap = { | ||
const iconSizeMap = exports.iconSizeMap = { | ||
xs: '1.5rem', | ||
@@ -28,8 +27,7 @@ s: '2.5rem', | ||
}; | ||
exports.iconSizeMap = iconSizeMap; | ||
function createAvatarSelectorClasses(sentiment, size) { | ||
return { | ||
labelClass: "pando_".concat(size, "AvatarLabel"), | ||
sentimentClass: "pando_".concat(sentiment, "Avatar"), | ||
sizeClass: "pando_".concat(size, "Avatar") | ||
labelClass: `pando_${size}AvatarLabel`, | ||
sentimentClass: `pando_${sentiment}Avatar`, | ||
sizeClass: `pando_${size}Avatar` | ||
}; | ||
@@ -47,4 +45,3 @@ } | ||
function formatLetter(word) { | ||
var _word$slice; | ||
return (_word$slice = word === null || word === void 0 ? void 0 : word.slice(0, 1)) !== null && _word$slice !== void 0 ? _word$slice : ''; | ||
return word?.slice(0, 1) ?? ''; | ||
} | ||
@@ -57,3 +54,3 @@ function displayInitials(initialsObj) { | ||
if (lastLetter) { | ||
return "".concat(firstLetter).concat(lastLetter); | ||
return `${firstLetter}${lastLetter}`; | ||
} | ||
@@ -71,4 +68,3 @@ return firstLetter; | ||
function createAvatarLabalProps(options) { | ||
var _options$name; | ||
const initials = displayInitials(createInitials((_options$name = options.name) !== null && _options$name !== void 0 ? _options$name : '')); | ||
const initials = displayInitials(createInitials(options.name ?? '')); | ||
return { | ||
@@ -75,0 +71,0 @@ 'aria-label': options.name, |
@@ -24,4 +24,4 @@ "use strict"; | ||
function getBadgeIconProps(size) { | ||
return (0, _shared.getIconProps)(size, (0, _helpers.createClassNameProp)("".concat(BADGE, "-icon"), 'pando_badgeIcon')); | ||
return (0, _shared.getIconProps)(size, (0, _helpers.createClassNameProp)(`${BADGE}-icon`, 'pando_badgeIcon')); | ||
} | ||
//# sourceMappingURL=badgeCSS.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_outlineBadge: { | ||
@@ -95,3 +95,2 @@ alignItems: 'center', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=badgeCSS.js.map |
@@ -26,8 +26,7 @@ "use strict"; | ||
function getDefaultBadgeOptions(options) { | ||
var _options$classNames, _options$sentiment, _options$usage, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'default', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'filled', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 's' | ||
classNames: options?.classNames ?? [], | ||
sentiment: options?.sentiment ?? 'default', | ||
usage: options?.usage ?? 'filled', | ||
size: options?.size ?? 's' | ||
}; | ||
@@ -38,5 +37,5 @@ } | ||
return { | ||
sentimentClass: "pando_".concat(options.sentiment).concat(BADGE), | ||
sizeClass: "pando_".concat(options.size).concat(BADGE), | ||
usageClass: "pando_".concat(options.usage).concat(BADGE) | ||
sentimentClass: `pando_${options.sentiment}${BADGE}`, | ||
sizeClass: `pando_${options.size}${BADGE}`, | ||
usageClass: `pando_${options.usage}${BADGE}` | ||
}; | ||
@@ -43,0 +42,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_filledButton: { | ||
@@ -218,3 +218,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=buttonCSS.js.map |
@@ -10,3 +10,3 @@ "use strict"; | ||
function createBtnClass(name) { | ||
return "pando_".concat(name, "Button"); | ||
return `pando_${name}Button`; | ||
} | ||
@@ -27,9 +27,8 @@ | ||
function getDefaultButtonOptions(options) { | ||
var _options$classNames, _options$disabled, _options$sentiment, _options$usage, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
disabled: (_options$disabled = options === null || options === void 0 ? void 0 : options.disabled) !== null && _options$disabled !== void 0 ? _options$disabled : false, | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'action', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'filled', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'l' | ||
classNames: options?.classNames ?? [], | ||
disabled: options?.disabled ?? false, | ||
sentiment: options?.sentiment ?? 'action', | ||
usage: options?.usage ?? 'filled', | ||
size: options?.size ?? 'l' | ||
}; | ||
@@ -36,0 +35,0 @@ } |
@@ -18,11 +18,11 @@ "use strict"; | ||
...props.input, | ||
...(0, _helpers.createClassNameProp)("".concat(CHECKBOX, "-input"), 'pando_checkboxInput') | ||
...(0, _helpers.createClassNameProp)(`${CHECKBOX}-input`, 'pando_checkboxInput') | ||
}, | ||
checkboxContainer: { | ||
...props.checkboxContainer, | ||
...(0, _helpers.createClassNameProp)("".concat(CHECKBOX, "-container"), 'pando_checkboxContainer', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${CHECKBOX}-container`, 'pando_checkboxContainer', ...defaultOptions.classNames) | ||
}, | ||
checkboxControl: { | ||
...props.checkboxControl, | ||
...(0, _helpers.createClassNameProp)("".concat(CHECKBOX, "-control"), 'pando_checkboxControl') | ||
...(0, _helpers.createClassNameProp)(`${CHECKBOX}-control`, 'pando_checkboxControl') | ||
} | ||
@@ -29,0 +29,0 @@ }; |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_checkboxContainer: { | ||
@@ -96,3 +96,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=checkboxCSS.js.map |
@@ -11,8 +11,7 @@ "use strict"; | ||
function getDefaultCheckboxOptions(options) { | ||
var _options$classNames, _options$checked, _options$indeterminat; | ||
return { | ||
...(0, _input.getDefaultSharedInputOptions)(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [''], | ||
checked: (_options$checked = options === null || options === void 0 ? void 0 : options.checked) !== null && _options$checked !== void 0 ? _options$checked : false, | ||
indeterminate: (_options$indeterminat = options === null || options === void 0 ? void 0 : options.indeterminate) !== null && _options$indeterminat !== void 0 ? _options$indeterminat : false | ||
classNames: options?.classNames ?? [''], | ||
checked: options?.checked ?? false, | ||
indeterminate: options?.indeterminate ?? false | ||
}; | ||
@@ -19,0 +18,0 @@ } |
@@ -24,3 +24,3 @@ "use strict"; | ||
const now = a11y.now; | ||
const value = "".concat(now, "%"); | ||
const value = `${now}%`; | ||
return { | ||
@@ -32,3 +32,3 @@ containerProps: { | ||
svgBoxProps: { | ||
...(0, _helpers.createClassNameProp)("".concat(CIRC_PROGRESS, "-box"), sizeClass, kindClass), | ||
...(0, _helpers.createClassNameProp)(`${CIRC_PROGRESS}-box`, sizeClass, kindClass), | ||
viewBox: _shared.VIEWBOX | ||
@@ -38,11 +38,11 @@ }, | ||
...(0, _shared.getBaseCircleProps)(), | ||
...(0, _helpers.createClassNameProp)("".concat(CIRC_PROGRESS, "-base"), 'pando_circularProgressCircle') | ||
...(0, _helpers.createClassNameProp)(`${CIRC_PROGRESS}-base`, 'pando_circularProgressCircle') | ||
}, | ||
nowCircleProps: { | ||
...(0, _shared.getBaseCircleProps)(), | ||
...(0, _helpers.createClassNameProp)("".concat(CIRC_PROGRESS, "-now"), 'pando_circularProgressCircleNow', kindClass), | ||
...(0, _helpers.createClassNameProp)(`${CIRC_PROGRESS}-now`, 'pando_circularProgressCircleNow', kindClass), | ||
...(0, _shared.getStrokeProps)(now) | ||
}, | ||
labelProps: { | ||
...(0, _helpers.createClassNameProp)("".concat(CIRC_PROGRESS, "-label"), 'pando_circularProgressText'), | ||
...(0, _helpers.createClassNameProp)(`${CIRC_PROGRESS}-label`, 'pando_circularProgressText'), | ||
value | ||
@@ -49,0 +49,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
keyframesLoading: { | ||
@@ -103,3 +103,2 @@ '@keyframes loading': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=circularProgressCSS.js.map |
@@ -22,3 +22,3 @@ "use strict"; | ||
const gap = 264 - dash; | ||
return "".concat(dash, " ").concat(gap); | ||
return `${dash} ${gap}`; | ||
} | ||
@@ -28,4 +28,3 @@ | ||
const VIEWBOX = '0 0 100 100'; | ||
exports.VIEWBOX = VIEWBOX; | ||
const VIEWBOX = exports.VIEWBOX = '0 0 100 100'; | ||
function getBaseCircleProps() { | ||
@@ -48,16 +47,15 @@ return { | ||
return { | ||
sizeClass: "pando_".concat(size, "CircularProgress"), | ||
kindClass: "pando_".concat(kind, "CircularProgress") | ||
sizeClass: `pando_${size}CircularProgress`, | ||
kindClass: `pando_${kind}CircularProgress` | ||
}; | ||
} | ||
function getDefaultCircularProgressOptions(options) { | ||
var _options$ariaLabel, _options$classNames, _options$kind, _options$max, _options$min, _options$now, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'circular progress indicator', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'determinate', | ||
max: (_options$max = options === null || options === void 0 ? void 0 : options.max) !== null && _options$max !== void 0 ? _options$max : 100, | ||
min: (_options$min = options === null || options === void 0 ? void 0 : options.min) !== null && _options$min !== void 0 ? _options$min : 0, | ||
now: (_options$now = options === null || options === void 0 ? void 0 : options.now) !== null && _options$now !== void 0 ? _options$now : 0, | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
ariaLabel: options?.ariaLabel ?? 'circular progress indicator', | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'determinate', | ||
max: options?.max ?? 100, | ||
min: options?.min ?? 0, | ||
now: options?.now ?? 0, | ||
size: options?.size ?? 'm' | ||
}; | ||
@@ -68,3 +66,3 @@ } | ||
return { | ||
[a11yPropMap.ariaLabel]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.ariaLabel, | ||
[a11yPropMap.ariaLabel]: a11yOptions?.ariaLabel, | ||
role: 'status' | ||
@@ -74,6 +72,6 @@ }; | ||
return { | ||
[a11yPropMap.ariaLabel]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.max, | ||
[a11yPropMap.valueMin]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.min, | ||
[a11yPropMap.valueNow]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.now, | ||
[a11yPropMap.ariaLabel]: a11yOptions?.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions?.max, | ||
[a11yPropMap.valueMin]: a11yOptions?.min, | ||
[a11yPropMap.valueNow]: a11yOptions?.now, | ||
role: 'progressbar' | ||
@@ -80,0 +78,0 @@ }; |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_errorMessage: { | ||
@@ -21,3 +21,2 @@ display: 'block', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=errorMessageCSS.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_fieldMessage: { | ||
@@ -21,3 +21,2 @@ display: 'block', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=fieldMessageCSS.js.map |
@@ -21,5 +21,5 @@ "use strict"; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(FIELDSET, "-legend"), 'pando_legend', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${FIELDSET}-legend`, 'pando_legend', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=fieldset.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_colFormGroup: { | ||
@@ -35,3 +35,2 @@ alignItems: 'flex-start', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=formGroup.js.map |
@@ -9,5 +9,4 @@ "use strict"; | ||
function createDefaultFieldsetOptions(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
@@ -14,0 +13,0 @@ } |
@@ -25,5 +25,5 @@ "use strict"; | ||
...props, | ||
...(0, _helpers.createClassNameProp)("".concat(FLEX, "-item"), 'pando_flexItem', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${FLEX}-item`, 'pando_flexItem', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=flexCSS.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_flexContainer: { | ||
@@ -21,3 +21,2 @@ display: 'flex', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=flexCSS.js.map |
@@ -20,11 +20,10 @@ "use strict"; | ||
function getDefaultFlexOptions(options) { | ||
var _options$align, _options$classNames, _options$direction, _options$gap, _options$justify, _options$style, _options$wrap; | ||
return { | ||
align: (_options$align = options === null || options === void 0 ? void 0 : options.align) !== null && _options$align !== void 0 ? _options$align : 'initial', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
direction: (_options$direction = options === null || options === void 0 ? void 0 : options.direction) !== null && _options$direction !== void 0 ? _options$direction : 'initial', | ||
gap: (_options$gap = options === null || options === void 0 ? void 0 : options.gap) !== null && _options$gap !== void 0 ? _options$gap : 16, | ||
justify: (_options$justify = options === null || options === void 0 ? void 0 : options.justify) !== null && _options$justify !== void 0 ? _options$justify : 'initial', | ||
style: (_options$style = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style !== void 0 ? _options$style : {}, | ||
wrap: (_options$wrap = options === null || options === void 0 ? void 0 : options.wrap) !== null && _options$wrap !== void 0 ? _options$wrap : 'initial' | ||
align: options?.align ?? 'initial', | ||
classNames: options?.classNames ?? [], | ||
direction: options?.direction ?? 'initial', | ||
gap: options?.gap ?? 16, | ||
justify: options?.justify ?? 'initial', | ||
style: options?.style ?? {}, | ||
wrap: options?.wrap ?? 'initial' | ||
}; | ||
@@ -44,3 +43,3 @@ } | ||
justifyContent: options.justify, | ||
[getGapProp(direction)]: "".concat(gap / 16, "rem") | ||
[getGapProp(direction)]: `${gap / 16}rem` | ||
} | ||
@@ -50,9 +49,8 @@ }; | ||
function getDefaultFlexItemOptions(options) { | ||
var _options$basis, _options$classNames2, _options$grow, _options$shrink, _options$style2; | ||
return { | ||
basis: (_options$basis = options === null || options === void 0 ? void 0 : options.basis) !== null && _options$basis !== void 0 ? _options$basis : 'auto', | ||
classNames: (_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [], | ||
grow: (_options$grow = options === null || options === void 0 ? void 0 : options.grow) !== null && _options$grow !== void 0 ? _options$grow : 0, | ||
shrink: (_options$shrink = options === null || options === void 0 ? void 0 : options.shrink) !== null && _options$shrink !== void 0 ? _options$shrink : 0, | ||
style: (_options$style2 = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style2 !== void 0 ? _options$style2 : {} | ||
basis: options?.basis ?? 'auto', | ||
classNames: options?.classNames ?? [], | ||
grow: options?.grow ?? 0, | ||
shrink: options?.shrink ?? 0, | ||
style: options?.style ?? {} | ||
}; | ||
@@ -59,0 +57,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_defaultFormLabel: { | ||
@@ -38,3 +38,2 @@ alignItems: 'center', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=formLabelCSS.js.map |
@@ -11,13 +11,12 @@ "use strict"; | ||
return { | ||
labelClass: "pando_".concat(kind, "FormLabel") | ||
labelClass: `pando_${kind}FormLabel` | ||
}; | ||
} | ||
function getDefaultFormLabelOptions(options) { | ||
var _options$classNames, _options$htmlFor, _options$kind, _options$required, _options$value; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
htmlFor: (_options$htmlFor = options === null || options === void 0 ? void 0 : options.htmlFor) !== null && _options$htmlFor !== void 0 ? _options$htmlFor : '', | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'default', | ||
required: (_options$required = options === null || options === void 0 ? void 0 : options.required) !== null && _options$required !== void 0 ? _options$required : false, | ||
value: (_options$value = options === null || options === void 0 ? void 0 : options.value) !== null && _options$value !== void 0 ? _options$value : 'Form label' | ||
classNames: options?.classNames ?? [], | ||
htmlFor: options?.htmlFor ?? '', | ||
kind: options?.kind ?? 'default', | ||
required: options?.required ?? false, | ||
value: options?.value ?? 'Form label' | ||
}; | ||
@@ -28,3 +27,3 @@ } | ||
if (required) { | ||
label = "".concat(value, " (required)"); | ||
label = `${value} (required)`; | ||
} | ||
@@ -31,0 +30,0 @@ return { |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_gridContainer: { | ||
@@ -21,3 +21,2 @@ display: 'grid', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=gridCSS.js.map |
@@ -25,5 +25,5 @@ "use strict"; | ||
...props, | ||
...(0, _helpers.createClassNameProp)("".concat(GRID, "-item"), 'pando_gridItem', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${GRID}-item`, 'pando_gridItem', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=gridCSS.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
function getFormattedAreas(areas) { | ||
return "'".concat(areas.toString().replace(/,/g, "' '"), "'"); | ||
return `'${areas.toString().replace(/,/g, "' '")}'`; | ||
} | ||
@@ -21,10 +21,9 @@ function isIntegerString(value) { | ||
function getDefaultGridOptions(options) { | ||
var _options$areas, _options$classNames, _options$cols, _options$gap, _options$rows, _options$style; | ||
return { | ||
areas: (_options$areas = options === null || options === void 0 ? void 0 : options.areas) !== null && _options$areas !== void 0 ? _options$areas : [], | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
cols: (_options$cols = options === null || options === void 0 ? void 0 : options.cols) !== null && _options$cols !== void 0 ? _options$cols : '12', | ||
gap: (_options$gap = options === null || options === void 0 ? void 0 : options.gap) !== null && _options$gap !== void 0 ? _options$gap : 16, | ||
rows: (_options$rows = options === null || options === void 0 ? void 0 : options.rows) !== null && _options$rows !== void 0 ? _options$rows : '1', | ||
style: (_options$style = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style !== void 0 ? _options$style : {} | ||
areas: options?.areas ?? [], | ||
classNames: options?.classNames ?? [], | ||
cols: options?.cols ?? '12', | ||
gap: options?.gap ?? 16, | ||
rows: options?.rows ?? '1', | ||
style: options?.style ?? {} | ||
}; | ||
@@ -46,5 +45,5 @@ } | ||
...gridTemplateAreas, | ||
gridTemplateRows: isIntegerString(rows) ? "repeat(".concat(rows, ", 1fr)") : rows, | ||
gridTemplateColumns: isIntegerString(cols) ? "repeat(".concat(cols, ", 1fr)") : cols, | ||
gap: "".concat(gap / 16, "rem") | ||
gridTemplateRows: isIntegerString(rows) ? `repeat(${rows}, 1fr)` : rows, | ||
gridTemplateColumns: isIntegerString(cols) ? `repeat(${cols}, 1fr)` : cols, | ||
gap: `${gap / 16}rem` | ||
} | ||
@@ -54,9 +53,8 @@ }; | ||
function getDefaultGridItemOptions(options) { | ||
var _options$area, _options$classNames2, _options$col, _options$row, _options$style2; | ||
return { | ||
area: (_options$area = options === null || options === void 0 ? void 0 : options.area) !== null && _options$area !== void 0 ? _options$area : '', | ||
classNames: (_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [], | ||
col: (_options$col = options === null || options === void 0 ? void 0 : options.col) !== null && _options$col !== void 0 ? _options$col : '', | ||
row: (_options$row = options === null || options === void 0 ? void 0 : options.row) !== null && _options$row !== void 0 ? _options$row : '', | ||
style: (_options$style2 = options === null || options === void 0 ? void 0 : options.style) !== null && _options$style2 !== void 0 ? _options$style2 : {} | ||
area: options?.area ?? '', | ||
classNames: options?.classNames ?? [], | ||
col: options?.col ?? '', | ||
row: options?.row ?? '', | ||
style: options?.style ?? {} | ||
}; | ||
@@ -63,0 +61,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_sIconSize: { | ||
@@ -32,3 +32,2 @@ display: 'inline-block', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=iconCSS.js.map |
@@ -20,3 +20,3 @@ "use strict"; | ||
...(0, _helpers.createClassNameProp)(ICON, sizeClass, ...defaultOptions.classNames), | ||
...((options === null || options === void 0 ? void 0 : options.customSize) && { | ||
...(options?.customSize && { | ||
height: options.customSize, | ||
@@ -23,0 +23,0 @@ width: options.customSize |
@@ -14,5 +14,4 @@ "use strict"; | ||
} else if (options.ariaHidden === false && options.ariaLabel) { | ||
var _options$ariaLabel; | ||
return { | ||
'aria-label': (_options$ariaLabel = options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : '' | ||
'aria-label': options.ariaLabel ?? '' | ||
}; | ||
@@ -28,9 +27,8 @@ } else { | ||
}; | ||
if (options !== null && options !== void 0 && options.ariaHidden) { | ||
if (options?.ariaHidden) { | ||
return defaultResult; | ||
} else if ((options === null || options === void 0 ? void 0 : options.ariaHidden) === false && options.ariaLabel) { | ||
var _options$ariaLabel2; | ||
} else if (options?.ariaHidden === false && options.ariaLabel) { | ||
return { | ||
ariaHidden: false, | ||
ariaLabel: (_options$ariaLabel2 = options.ariaLabel) !== null && _options$ariaLabel2 !== void 0 ? _options$ariaLabel2 : '' | ||
ariaLabel: options.ariaLabel ?? '' | ||
}; | ||
@@ -46,8 +44,7 @@ } else { | ||
function getDefaultIconOptions(options) { | ||
var _options$classNames, _options$size; | ||
return { | ||
...getIconAriaOptions(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
customSize: options === null || options === void 0 ? void 0 : options.customSize, | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
classNames: options?.classNames ?? [], | ||
customSize: options?.customSize, | ||
size: options?.size ?? 'm' | ||
}; | ||
@@ -58,3 +55,3 @@ } | ||
return { | ||
sizeClass: customSize ? "pando_custom".concat(sizeSuffix) : "pando_".concat(size).concat(sizeSuffix) | ||
sizeClass: customSize ? `pando_custom${sizeSuffix}` : `pando_${size}${sizeSuffix}` | ||
}; | ||
@@ -61,0 +58,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_squareIconButton: { | ||
@@ -186,3 +186,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=iconButtonCSS.js.map |
@@ -21,3 +21,3 @@ "use strict"; | ||
function createIconBtnClass(name) { | ||
return "pando_".concat(name, "IconButton"); | ||
return `pando_${name}IconButton`; | ||
} | ||
@@ -28,10 +28,9 @@ | ||
function getDefaultIconButtonOptions(options) { | ||
var _options$ariaLabel, _options$classNames, _options$disabled, _options$sentiment, _options$usage, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'button with icon', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
disabled: (_options$disabled = options === null || options === void 0 ? void 0 : options.disabled) !== null && _options$disabled !== void 0 ? _options$disabled : false, | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'action', | ||
usage: (_options$usage = options === null || options === void 0 ? void 0 : options.usage) !== null && _options$usage !== void 0 ? _options$usage : 'square', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'l' | ||
ariaLabel: options?.ariaLabel ?? 'button with icon', | ||
classNames: options?.classNames ?? [], | ||
disabled: options?.disabled ?? false, | ||
sentiment: options?.sentiment ?? 'action', | ||
usage: options?.usage ?? 'square', | ||
size: options?.size ?? 'l' | ||
}; | ||
@@ -38,0 +37,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_defaultInput: { | ||
@@ -169,3 +169,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=inputCSS.js.map |
@@ -17,3 +17,3 @@ "use strict"; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(INPUT, "-wrapper"), 'pando_inputWrapper') | ||
...(0, _helpers.createClassNameProp)(`${INPUT}-wrapper`, 'pando_inputWrapper') | ||
}; | ||
@@ -36,3 +36,3 @@ } | ||
iconWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(INPUT, "-leading-icon"), 'pando_inputLeadingIcon') | ||
...(0, _helpers.createClassNameProp)(`${INPUT}-leading-icon`, 'pando_inputLeadingIcon') | ||
} | ||
@@ -46,3 +46,3 @@ }) | ||
invalidIconWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(INPUT, "-invalid-icon"), 'pando_inputIcon') | ||
...(0, _helpers.createClassNameProp)(`${INPUT}-invalid-icon`, 'pando_inputIcon') | ||
} | ||
@@ -49,0 +49,0 @@ }) |
@@ -20,8 +20,7 @@ "use strict"; | ||
function getDefaultInputOptions(options) { | ||
var _options$classNames, _options$kind, _options$pandoSize; | ||
return { | ||
...(0, _input.getDefaultSharedInputOptions)(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'default', | ||
pandoSize: (_options$pandoSize = options === null || options === void 0 ? void 0 : options.pandoSize) !== null && _options$pandoSize !== void 0 ? _options$pandoSize : 'l' | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'default', | ||
pandoSize: options?.pandoSize ?? 'l' | ||
}; | ||
@@ -34,4 +33,4 @@ } | ||
return { | ||
kindClass: "pando_".concat(options.kind, "Input"), | ||
baseSizeClass: "pando_".concat(pandoSize, "InputBase") | ||
kindClass: `pando_${options.kind}Input`, | ||
baseSizeClass: `pando_${pandoSize}InputBase` | ||
}; | ||
@@ -49,7 +48,7 @@ } | ||
...createDefaultIconInputOptions(size), | ||
...(additions === null || additions === void 0 ? void 0 : additions.invalidIconOptions) | ||
...additions?.invalidIconOptions | ||
}), | ||
invalidIconWrapper: { | ||
['data-invalid']: true, | ||
...(additions === null || additions === void 0 ? void 0 : additions.invalidIconWrapper) | ||
...additions?.invalidIconWrapper | ||
} | ||
@@ -63,6 +62,6 @@ }; | ||
...createDefaultIconInputOptions(size), | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconOptions) | ||
...additions?.iconOptions | ||
}), | ||
iconWrapper: { | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconWrapper) | ||
...additions?.iconWrapper | ||
} | ||
@@ -69,0 +68,0 @@ }; |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_menuItem: { | ||
@@ -162,3 +162,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=menuCSS.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_topMenu: { | ||
@@ -78,3 +78,2 @@ bottom: '100%', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=menuPositioning.js.map |
@@ -24,5 +24,4 @@ "use strict"; | ||
function getMenuButtonStyles(options) { | ||
var _options$classNames; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-btn"), 'pando_menuBtn', ...((_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-btn`, 'pando_menuBtn', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -37,5 +36,4 @@ } | ||
function getMenuDescriptionStyles(options) { | ||
var _options$classNames2; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-description"), 'pando_menuDescription', ...((_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-description`, 'pando_menuDescription', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -50,5 +48,4 @@ } | ||
function getMenuListContainerStyles(options) { | ||
var _options$classNames3; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-list-container"), 'pando_menuListContainer', ...((_options$classNames3 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames3 !== void 0 ? _options$classNames3 : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-list-container`, 'pando_menuListContainer', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -63,5 +60,4 @@ } | ||
function getMenuListStyles(options) { | ||
var _options$classNames4; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-list"), 'pando_menu', ...((_options$classNames4 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames4 !== void 0 ? _options$classNames4 : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-list`, 'pando_menu', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -76,5 +72,4 @@ } | ||
function getMenuListItemStyles(options) { | ||
var _options$classNames5; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-list-item"), 'pando_menuListItem', ...((_options$classNames5 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames5 !== void 0 ? _options$classNames5 : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-list-item`, 'pando_menuListItem', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -89,5 +84,4 @@ } | ||
function getMenuListItemContentStyles(options) { | ||
var _options$classNames6; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-list-item-content"), 'pando_menuListItemContent', ...((_options$classNames6 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames6 !== void 0 ? _options$classNames6 : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-list-item-content`, 'pando_menuListItemContent', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -102,5 +96,4 @@ } | ||
function getMenuListItemLinkStyles(options) { | ||
var _options$classNames7; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-list-item-link"), 'pando_menuListItemLink', ...((_options$classNames7 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames7 !== void 0 ? _options$classNames7 : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-list-item-link`, 'pando_menuListItemLink', ...(options?.classNames ?? [])) | ||
}; | ||
@@ -115,7 +108,6 @@ } | ||
function getMenuDividerStyles(options) { | ||
var _options$classNames8; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(MENU, "-list-item-divider"), 'pando_menuListItemDivider', ...((_options$classNames8 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames8 !== void 0 ? _options$classNames8 : [])) | ||
...(0, _helpers.createClassNameProp)(`${MENU}-list-item-divider`, 'pando_menuListItemDivider', ...(options?.classNames ?? [])) | ||
}; | ||
} | ||
//# sourceMappingURL=menu.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_lPaginationContainer: { | ||
@@ -63,3 +63,2 @@ alignItems: 'baseline', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=paginationCSS.js.map |
@@ -19,3 +19,3 @@ "use strict"; | ||
...props.buttonGroup, | ||
...(0, _helpers.createClassNameProp)("".concat(PAGINATION, "-buttonGroup"), classes.buttonGroupClass) | ||
...(0, _helpers.createClassNameProp)(`${PAGINATION}-buttonGroup`, classes.buttonGroupClass) | ||
}, | ||
@@ -28,3 +28,3 @@ container: { | ||
...props.text, | ||
...(0, _helpers.createClassNameProp)("".concat(PAGINATION, "-text"), classes.textClass) | ||
...(0, _helpers.createClassNameProp)(`${PAGINATION}-text`, classes.textClass) | ||
} | ||
@@ -31,0 +31,0 @@ }; |
@@ -11,6 +11,5 @@ "use strict"; | ||
function getDefaultPaginationOptions(options) { | ||
var _options$ariaLabel, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'Pagination', | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'l' | ||
ariaLabel: options?.ariaLabel ?? 'Pagination', | ||
size: options?.size ?? 'l' | ||
}; | ||
@@ -23,5 +22,5 @@ } | ||
return { | ||
buttonGroupClass: "pando_".concat(size, "PaginationButtonGroup"), | ||
containerClass: "pando_".concat(size, "PaginationContainer"), | ||
textClass: "pando_".concat(size, "PaginationText") | ||
buttonGroupClass: `pando_${size}PaginationButtonGroup`, | ||
containerClass: `pando_${size}PaginationContainer`, | ||
textClass: `pando_${size}PaginationText` | ||
}; | ||
@@ -28,0 +27,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
keyframesFadeInAnimation: { | ||
@@ -178,3 +178,2 @@ '@keyframes fadeInAnimation': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=popoverCSS.js.map |
@@ -24,7 +24,7 @@ "use strict"; | ||
...props.wrapper, | ||
...(0, _helpers.createClassNameProp)("".concat(POPOVER, "-wrapper"), 'pando_popoverWrapper') | ||
...(0, _helpers.createClassNameProp)(`${POPOVER}-wrapper`, 'pando_popoverWrapper') | ||
}, | ||
trigger: { | ||
...props.trigger, | ||
...(0, _helpers.createClassNameProp)("".concat(POPOVER, "-trigger"), 'pando_popoverTrigger') | ||
...(0, _helpers.createClassNameProp)(`${POPOVER}-trigger`, 'pando_popoverTrigger') | ||
}, | ||
@@ -37,11 +37,11 @@ popover: { | ||
...props.content, | ||
...(0, _helpers.createClassNameProp)("".concat(POPOVER, "-content"), popoverContentClass, contentPositionClass) | ||
...(0, _helpers.createClassNameProp)(`${POPOVER}-content`, popoverContentClass, contentPositionClass) | ||
}, | ||
header: { | ||
...props.header, | ||
...(0, _helpers.createClassNameProp)("".concat(POPOVER, "-header"), 'pando_popoverHeader') | ||
...(0, _helpers.createClassNameProp)(`${POPOVER}-header`, 'pando_popoverHeader') | ||
}, | ||
closeButtonWrapper: { | ||
...props.closeButtonWrapper, | ||
...(0, _helpers.createClassNameProp)("".concat(POPOVER, "-closeButtonWrapper"), 'pando_popoverCloseButtonWrapper') | ||
...(0, _helpers.createClassNameProp)(`${POPOVER}-closeButtonWrapper`, 'pando_popoverCloseButtonWrapper') | ||
} | ||
@@ -48,0 +48,0 @@ }; |
@@ -13,10 +13,9 @@ "use strict"; | ||
function getDefaultPopoverOptions(options) { | ||
var _options$ariaLabel, _options$bodyId, _options$headerId, _options$id, _options$isExpanded, _options$position; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : '', | ||
bodyId: (_options$bodyId = options === null || options === void 0 ? void 0 : options.bodyId) !== null && _options$bodyId !== void 0 ? _options$bodyId : 'popover-body', | ||
headerId: (_options$headerId = options === null || options === void 0 ? void 0 : options.headerId) !== null && _options$headerId !== void 0 ? _options$headerId : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : 'popover', | ||
isExpanded: (_options$isExpanded = options === null || options === void 0 ? void 0 : options.isExpanded) !== null && _options$isExpanded !== void 0 ? _options$isExpanded : false, | ||
position: (_options$position = options === null || options === void 0 ? void 0 : options.position) !== null && _options$position !== void 0 ? _options$position : 'top' | ||
ariaLabel: options?.ariaLabel ?? '', | ||
bodyId: options?.bodyId ?? 'popover-body', | ||
headerId: options?.headerId ?? '', | ||
id: options?.id ?? 'popover', | ||
isExpanded: options?.isExpanded ?? false, | ||
position: options?.position ?? 'top' | ||
}; | ||
@@ -23,0 +22,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_progressBar: { | ||
@@ -38,3 +38,2 @@ backgroundColor: 'var(--ps-text-strong)', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=progressCSS.js.map |
@@ -27,3 +27,3 @@ "use strict"; | ||
const style = { | ||
width: "".concat(a11y.now, "%") | ||
width: `${a11y.now}%` | ||
}; | ||
@@ -33,3 +33,3 @@ return { | ||
...a11yProps, | ||
...(0, _helpers.createClassNameProp)("".concat(PROGRESS, "-bar"), 'pando_progressBar', sizeClass, kindClass), | ||
...(0, _helpers.createClassNameProp)(`${PROGRESS}-bar`, 'pando_progressBar', sizeClass, kindClass), | ||
style | ||
@@ -36,0 +36,0 @@ }, |
@@ -17,11 +17,10 @@ "use strict"; | ||
function getDefaultProgressOptions(options) { | ||
var _options$ariaLabel, _options$classNames, _options$kind, _options$max, _options$min, _options$now, _options$size; | ||
return { | ||
ariaLabel: (_options$ariaLabel = options === null || options === void 0 ? void 0 : options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : 'progress indicator', | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'linear', | ||
max: (_options$max = options === null || options === void 0 ? void 0 : options.max) !== null && _options$max !== void 0 ? _options$max : 100, | ||
min: (_options$min = options === null || options === void 0 ? void 0 : options.min) !== null && _options$min !== void 0 ? _options$min : 0, | ||
now: (_options$now = options === null || options === void 0 ? void 0 : options.now) !== null && _options$now !== void 0 ? _options$now : 0, | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 's' | ||
ariaLabel: options?.ariaLabel ?? 'progress indicator', | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'linear', | ||
max: options?.max ?? 100, | ||
min: options?.min ?? 0, | ||
now: options?.now ?? 0, | ||
size: options?.size ?? 's' | ||
}; | ||
@@ -31,4 +30,4 @@ } | ||
return { | ||
kindClass: "pando_".concat(options.kind, "Progress"), | ||
sizeClass: "pando_".concat(options.size, "Progress") | ||
kindClass: `pando_${options.kind}Progress`, | ||
sizeClass: `pando_${options.size}Progress` | ||
}; | ||
@@ -38,6 +37,6 @@ } | ||
return { | ||
[a11yPropMap.ariaLabel]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.max, | ||
[a11yPropMap.valueMin]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.min, | ||
[a11yPropMap.valueNow]: a11yOptions === null || a11yOptions === void 0 ? void 0 : a11yOptions.now, | ||
[a11yPropMap.ariaLabel]: a11yOptions?.ariaLabel, | ||
[a11yPropMap.valueMax]: a11yOptions?.max, | ||
[a11yPropMap.valueMin]: a11yOptions?.min, | ||
[a11yPropMap.valueNow]: a11yOptions?.now, | ||
role: a11yRole | ||
@@ -44,0 +43,0 @@ }; |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_radioContainer: { | ||
@@ -107,3 +107,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=radioCSS.js.map |
@@ -17,11 +17,11 @@ "use strict"; | ||
...props.input, | ||
...(0, _helpers.createClassNameProp)("".concat(RADIO, "-input"), 'pando_radioInput') | ||
...(0, _helpers.createClassNameProp)(`${RADIO}-input`, 'pando_radioInput') | ||
}, | ||
radioContainer: { | ||
...props.container, | ||
...(0, _helpers.createClassNameProp)("".concat(RADIO, "-container"), 'pando_radioContainer', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${RADIO}-container`, 'pando_radioContainer', ...defaultOptions.classNames) | ||
}, | ||
radioControl: { | ||
...props.control, | ||
...(0, _helpers.createClassNameProp)("".concat(RADIO, "-control"), 'pando_radioControl') | ||
...(0, _helpers.createClassNameProp)(`${RADIO}-control`, 'pando_radioControl') | ||
} | ||
@@ -28,0 +28,0 @@ }; |
@@ -10,7 +10,6 @@ "use strict"; | ||
function getDefaultRadioOptions(options) { | ||
var _options$classNames, _options$checked; | ||
return { | ||
...(0, _input.getDefaultSharedInputOptions)(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [''], | ||
checked: (_options$checked = options === null || options === void 0 ? void 0 : options.checked) !== null && _options$checked !== void 0 ? _options$checked : false | ||
classNames: options?.classNames ?? [''], | ||
checked: options?.checked ?? false | ||
}; | ||
@@ -17,0 +16,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_selectBase: { | ||
@@ -106,3 +106,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=selectCSS.js.map |
@@ -25,3 +25,3 @@ "use strict"; | ||
...props.fieldWrapper, | ||
...(0, _helpers.createClassNameProp)("".concat(SELECT, "-fieldWrapper"), 'pando_selectFieldWrapper') | ||
...(0, _helpers.createClassNameProp)(`${SELECT}-fieldWrapper`, 'pando_selectFieldWrapper') | ||
}, | ||
@@ -34,7 +34,7 @@ select: { | ||
...props.selectWrapper, | ||
...(0, _helpers.createClassNameProp)("".concat(SELECT, "-wrapper"), 'pando_selectWrapper') | ||
...(0, _helpers.createClassNameProp)(`${SELECT}-wrapper`, 'pando_selectWrapper') | ||
}, | ||
iconWrapper: { | ||
...props.iconWrapper, | ||
...(0, _helpers.createClassNameProp)("".concat(SELECT, "-icon"), 'pando_selectIcon') | ||
...(0, _helpers.createClassNameProp)(`${SELECT}-icon`, 'pando_selectIcon') | ||
} | ||
@@ -48,5 +48,5 @@ }; | ||
...props, | ||
...(0, _helpers.createClassNameProp)("".concat(SELECT, "-option"), 'pando_selectOption', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${SELECT}-option`, 'pando_selectOption', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=selectCSS.js.map |
@@ -14,10 +14,9 @@ "use strict"; | ||
function getDefaultSelectOptions(options) { | ||
var _options$classNames, _options$describedBy, _options$id, _options$name, _options$pandoSize; | ||
return { | ||
...(0, _defaultOptions.getDefaultFieldStates)(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
describedBy: (_options$describedBy = options === null || options === void 0 ? void 0 : options.describedBy) !== null && _options$describedBy !== void 0 ? _options$describedBy : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '', | ||
pandoSize: (_options$pandoSize = options === null || options === void 0 ? void 0 : options.pandoSize) !== null && _options$pandoSize !== void 0 ? _options$pandoSize : 'l' | ||
classNames: options?.classNames ?? [], | ||
describedBy: options?.describedBy ?? '', | ||
id: options?.id ?? '', | ||
name: options?.name ?? '', | ||
pandoSize: options?.pandoSize ?? 'l' | ||
}; | ||
@@ -27,3 +26,3 @@ } | ||
return { | ||
baseSizeClass: "pando_".concat(size, "SelectBase") | ||
baseSizeClass: `pando_${size}SelectBase` | ||
}; | ||
@@ -63,6 +62,5 @@ } | ||
function getDefaultSelectOptionOptions(options) { | ||
var _options$classNames2, _options$value; | ||
return { | ||
classNames: (_options$classNames2 = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames2 !== void 0 ? _options$classNames2 : [], | ||
value: (_options$value = options === null || options === void 0 ? void 0 : options.value) !== null && _options$value !== void 0 ? _options$value : '' | ||
classNames: options?.classNames ?? [], | ||
value: options?.value ?? '' | ||
}; | ||
@@ -69,0 +67,0 @@ } |
@@ -19,6 +19,6 @@ "use strict"; | ||
size: 'm', | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconOptions) | ||
...additions?.iconOptions | ||
}), | ||
iconWrapper: { | ||
...(additions === null || additions === void 0 ? void 0 : additions.iconWrapper) | ||
...additions?.iconWrapper | ||
} | ||
@@ -35,23 +35,20 @@ }; | ||
function getDefaultFieldOptions(options) { | ||
var _options$id, _options$name; | ||
return { | ||
...getDefaultFieldStates(options), | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '' | ||
id: options?.id ?? '', | ||
name: options?.name ?? '' | ||
}; | ||
} | ||
function getDefaultFieldStates(options) { | ||
var _options$disabled, _options$invalid, _options$readOnly, _options$required; | ||
return { | ||
disabled: (_options$disabled = options === null || options === void 0 ? void 0 : options.disabled) !== null && _options$disabled !== void 0 ? _options$disabled : false, | ||
invalid: (_options$invalid = options === null || options === void 0 ? void 0 : options.invalid) !== null && _options$invalid !== void 0 ? _options$invalid : false, | ||
readOnly: (_options$readOnly = options === null || options === void 0 ? void 0 : options.readOnly) !== null && _options$readOnly !== void 0 ? _options$readOnly : false, | ||
required: (_options$required = options === null || options === void 0 ? void 0 : options.required) !== null && _options$required !== void 0 ? _options$required : false | ||
disabled: options?.disabled ?? false, | ||
invalid: options?.invalid ?? false, | ||
readOnly: options?.readOnly ?? false, | ||
required: options?.required ?? false | ||
}; | ||
} | ||
function getDefaultMessageOptions(options) { | ||
var _options$classNames, _options$id2; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
id: (_options$id2 = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id2 !== void 0 ? _options$id2 : '' | ||
classNames: options?.classNames ?? [], | ||
id: options?.id ?? '' | ||
}; | ||
@@ -65,4 +62,4 @@ } | ||
function getDefaultPlaceholder(value) { | ||
return value !== null && value !== void 0 ? value : 'Enter text'; | ||
return value ?? 'Enter text'; | ||
} | ||
//# sourceMappingURL=defaultOptions.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
root: { | ||
@@ -25,3 +25,2 @@ '--ps-backdrop': 'rgba(0 0 0 / 65%)' | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=dialog.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
keyframesFadeInAnimation: { | ||
@@ -38,3 +38,2 @@ '@keyframes fadeInAnimation': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=keyframes.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_bottomEndPosition: { | ||
@@ -178,3 +178,2 @@ paddingTop: '1em', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=position.js.map |
@@ -14,3 +14,2 @@ "use strict"; | ||
function getDefaultDisabledOptions(options) { | ||
var _options$value; | ||
const { | ||
@@ -20,4 +19,4 @@ disabled | ||
return { | ||
placeholder: disabled ? '' : (0, _defaultOptions.getDefaultPlaceholder)(options === null || options === void 0 ? void 0 : options.placeholder), | ||
value: disabled ? '' : (_options$value = options === null || options === void 0 ? void 0 : options.value) !== null && _options$value !== void 0 ? _options$value : '' | ||
placeholder: disabled ? '' : (0, _defaultOptions.getDefaultPlaceholder)(options?.placeholder), | ||
value: disabled ? '' : options?.value ?? '' | ||
}; | ||
@@ -63,4 +62,3 @@ } | ||
function getAriaChecked(options) { | ||
var _options$checked; | ||
const checked = (_options$checked = options.checked) !== null && _options$checked !== void 0 ? _options$checked : false; | ||
const checked = options.checked ?? false; | ||
if (options.indeterminate) { | ||
@@ -72,3 +70,2 @@ return 'mixed'; | ||
function getDefaultSharedInputOptions(options) { | ||
var _options$describedBy, _options$id, _options$name; | ||
const internalState = (0, _defaultOptions.getDefaultFieldStates)(options); | ||
@@ -81,7 +78,7 @@ return { | ||
}), | ||
describedBy: (_options$describedBy = options === null || options === void 0 ? void 0 : options.describedBy) !== null && _options$describedBy !== void 0 ? _options$describedBy : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '' | ||
describedBy: options?.describedBy ?? '', | ||
id: options?.id ?? '', | ||
name: options?.name ?? '' | ||
}; | ||
} | ||
//# sourceMappingURL=input.js.map |
@@ -9,6 +9,6 @@ "use strict"; | ||
return { | ||
contentPositionClass: "pando_".concat(options.position, "PositionContent"), | ||
positionClass: "pando_".concat(options.position, "Position") | ||
contentPositionClass: `pando_${options.position}PositionContent`, | ||
positionClass: `pando_${options.position}Position` | ||
}; | ||
} | ||
//# sourceMappingURL=tooltipHelpers.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
keyframesFadeInOut: { | ||
@@ -105,3 +105,2 @@ '@keyframes fadeInOut': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=skeletonCSS.js.map |
@@ -9,6 +9,5 @@ "use strict"; | ||
function getDefaultSkeletonOptions(options) { | ||
var _options$classNames, _options$kind; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
kind: (_options$kind = options === null || options === void 0 ? void 0 : options.kind) !== null && _options$kind !== void 0 ? _options$kind : 'content' | ||
classNames: options?.classNames ?? [], | ||
kind: options?.kind ?? 'content' | ||
}; | ||
@@ -18,5 +17,5 @@ } | ||
return { | ||
kindClass: "pando_".concat(kind, "Skeleton") | ||
kindClass: `pando_${kind}Skeleton` | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_mSwitchTrack: { | ||
@@ -218,3 +218,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=switchCSS.js.map |
@@ -11,8 +11,7 @@ "use strict"; | ||
function getDefaultSwitchOptions(options) { | ||
var _options$classNames, _options$checked, _options$pandoSize; | ||
return { | ||
...(0, _input.getDefaultSharedInputOptions)(options), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [''], | ||
checked: (_options$checked = options === null || options === void 0 ? void 0 : options.checked) !== null && _options$checked !== void 0 ? _options$checked : false, | ||
pandoSize: (_options$pandoSize = options === null || options === void 0 ? void 0 : options.pandoSize) !== null && _options$pandoSize !== void 0 ? _options$pandoSize : 'm' | ||
classNames: options?.classNames ?? [''], | ||
checked: options?.checked ?? false, | ||
pandoSize: options?.pandoSize ?? 'm' | ||
}; | ||
@@ -22,4 +21,4 @@ } | ||
return { | ||
thumbClass: "pando_".concat(size, "SwitchThumb"), | ||
trackClass: "pando_".concat(size, "SwitchTrack") | ||
thumbClass: `pando_${size}SwitchThumb`, | ||
trackClass: `pando_${size}SwitchTrack` | ||
}; | ||
@@ -26,0 +25,0 @@ } |
@@ -26,12 +26,12 @@ "use strict"; | ||
...props.input, | ||
...(0, _helpers.createClassNameProp)("".concat(SWITCH, "-input"), 'pando_switchInput', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${SWITCH}-input`, 'pando_switchInput', ...defaultOptions.classNames) | ||
}, | ||
switchContainer: (0, _helpers.createClassNameProp)("".concat(SWITCH, "-container"), 'pando_switchContainer'), | ||
switchContainer: (0, _helpers.createClassNameProp)(`${SWITCH}-container`, 'pando_switchContainer'), | ||
switchTrack: { | ||
...props.switchTrack, | ||
...(0, _helpers.createClassNameProp)("".concat(SWITCH, "-track"), trackClass) | ||
...(0, _helpers.createClassNameProp)(`${SWITCH}-track`, trackClass) | ||
}, | ||
switchThumb: { | ||
...props.switchThumb, | ||
...(0, _helpers.createClassNameProp)("".concat(SWITCH, "-thumb"), thumbClass) | ||
...(0, _helpers.createClassNameProp)(`${SWITCH}-thumb`, thumbClass) | ||
} | ||
@@ -47,5 +47,5 @@ }; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(SWITCH, "-wrapper"), 'pando_switchWrapper', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${SWITCH}-wrapper`, 'pando_switchWrapper', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=switchCSS.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_table: { | ||
@@ -60,3 +60,2 @@ borderCollapse: 'collapse', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=tableCSS.js.map |
@@ -8,7 +8,6 @@ "use strict"; | ||
function createTableDefaultProps(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -25,3 +25,3 @@ "use strict"; | ||
scope: 'col', | ||
...(0, _helpers.createClassNameProp)("".concat(TABLE, "-head-cell"), 'pando_headCell', ...props.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TABLE}-head-cell`, 'pando_headCell', ...props.classNames) | ||
}; | ||
@@ -32,3 +32,3 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TABLE, "-body-cell"), 'pando_bodyCell', ...props.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TABLE}-body-cell`, 'pando_bodyCell', ...props.classNames) | ||
}; | ||
@@ -39,3 +39,3 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TABLE, "-row"), 'pando_tableRow', ...props.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TABLE}-row`, 'pando_tableRow', ...props.classNames) | ||
}; | ||
@@ -46,5 +46,5 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TABLE, "-caption"), 'pando_caption', ...props.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TABLE}-caption`, 'pando_caption', ...props.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=tableCSS.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_tabList: { | ||
@@ -156,3 +156,2 @@ '&:focus': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=tabsCSS.js.map |
@@ -8,7 +8,6 @@ "use strict"; | ||
function getDefaultTabsOptions(options) { | ||
var _options$classNames; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [] | ||
classNames: options?.classNames ?? [] | ||
}; | ||
} | ||
//# sourceMappingURL=shared.js.map |
@@ -23,3 +23,3 @@ "use strict"; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TAB, "-wrapper"), 'pando_tabWrapper', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TAB}-wrapper`, 'pando_tabWrapper', ...defaultOptions.classNames) | ||
}; | ||
@@ -36,3 +36,3 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TAB, "-list"), 'pando_tabList', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TAB}-list`, 'pando_tabList', ...defaultOptions.classNames) | ||
}; | ||
@@ -49,3 +49,3 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TAB, "-tab"), 'pando_tab', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TAB}-tab`, 'pando_tab', ...defaultOptions.classNames) | ||
}; | ||
@@ -62,5 +62,5 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TAB, "-panel"), 'pando_tabPanel', ...defaultOptions.classNames) | ||
...(0, _helpers.createClassNameProp)(`${TAB}-panel`, 'pando_tabPanel', ...defaultOptions.classNames) | ||
}; | ||
} | ||
//# sourceMappingURL=tabs.js.map |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_sTag: { | ||
@@ -108,3 +108,2 @@ color: 'var(--ps-action-navigation)', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=tagCSS.js.map |
@@ -11,6 +11,5 @@ "use strict"; | ||
function getDefaultTagOptions(options) { | ||
var _options$classNames, _options$size; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
size: (_options$size = options === null || options === void 0 ? void 0 : options.size) !== null && _options$size !== void 0 ? _options$size : 'm' | ||
classNames: options?.classNames ?? [], | ||
size: options?.size ?? 'm' | ||
}; | ||
@@ -20,3 +19,3 @@ } | ||
return { | ||
sizeClass: "pando_".concat(size, "Tag") | ||
sizeClass: `pando_${size}Tag` | ||
}; | ||
@@ -23,0 +22,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_initialTextarea: { | ||
@@ -273,3 +273,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=textareaCSS.js.map |
@@ -16,3 +16,3 @@ "use strict"; | ||
return { | ||
placeholder: disabled ? '' : (0, _defaultOptions.getDefaultPlaceholder)(options === null || options === void 0 ? void 0 : options.placeholder) | ||
placeholder: disabled ? '' : (0, _defaultOptions.getDefaultPlaceholder)(options?.placeholder) | ||
}; | ||
@@ -31,3 +31,2 @@ } | ||
function getDefaultTextareaOptions(options) { | ||
var _options$classNames, _options$describedBy, _options$id, _options$name, _options$resize; | ||
const internalState = (0, _defaultOptions.getDefaultFieldStates)(options); | ||
@@ -40,7 +39,7 @@ return { | ||
}), | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
describedBy: (_options$describedBy = options === null || options === void 0 ? void 0 : options.describedBy) !== null && _options$describedBy !== void 0 ? _options$describedBy : '', | ||
id: (_options$id = options === null || options === void 0 ? void 0 : options.id) !== null && _options$id !== void 0 ? _options$id : '', | ||
name: (_options$name = options === null || options === void 0 ? void 0 : options.name) !== null && _options$name !== void 0 ? _options$name : '', | ||
resize: (_options$resize = options === null || options === void 0 ? void 0 : options.resize) !== null && _options$resize !== void 0 ? _options$resize : 'initial' | ||
classNames: options?.classNames ?? [], | ||
describedBy: options?.describedBy ?? '', | ||
id: options?.id ?? '', | ||
name: options?.name ?? '', | ||
resize: options?.resize ?? 'initial' | ||
}; | ||
@@ -50,3 +49,3 @@ } | ||
return { | ||
resizeClass: "pando_".concat(resize, "Textarea") | ||
resizeClass: `pando_${resize}Textarea` | ||
}; | ||
@@ -53,0 +52,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_textLink: { | ||
@@ -44,3 +44,2 @@ color: 'var(--ps-action-navigation)', | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=textLinkCSS.js.map |
@@ -10,4 +10,3 @@ "use strict"; | ||
var _defaultOptions = require("../shared/defaultOptions"); | ||
const textLinkIconSize = '1em'; | ||
exports.textLinkIconSize = textLinkIconSize; | ||
const textLinkIconSize = exports.textLinkIconSize = '1em'; | ||
function isExternalHref(href) { | ||
@@ -32,6 +31,5 @@ return /^https?:\/\//.test(href); | ||
function getDefaultTextLinkOptions(options) { | ||
var _options$classNames, _options$href; | ||
return { | ||
classNames: (_options$classNames = options === null || options === void 0 ? void 0 : options.classNames) !== null && _options$classNames !== void 0 ? _options$classNames : [], | ||
href: (_options$href = options === null || options === void 0 ? void 0 : options.href) !== null && _options$href !== void 0 ? _options$href : '' | ||
classNames: options?.classNames ?? [], | ||
href: options?.href ?? '' | ||
}; | ||
@@ -38,0 +36,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
// Manual changes will be lost - proceed with caution! | ||
var _default = { | ||
var _default = exports.default = { | ||
pando_toastButton: { | ||
@@ -205,3 +205,2 @@ '&:is([aria-disabled=true], :disabled, [disabled], [data-readonly=true])': { | ||
}; | ||
exports.default = _default; | ||
//# sourceMappingURL=toastCSS.js.map |
@@ -12,5 +12,4 @@ "use strict"; | ||
function getToastDefaultProps(options) { | ||
var _options$sentiment; | ||
return { | ||
sentiment: (_options$sentiment = options === null || options === void 0 ? void 0 : options.sentiment) !== null && _options$sentiment !== void 0 ? _options$sentiment : 'info' | ||
sentiment: options?.sentiment ?? 'info' | ||
}; | ||
@@ -30,3 +29,3 @@ } | ||
return { | ||
sentimentClass: "pando_".concat(options.sentiment, "Toast") | ||
sentimentClass: `pando_${options.sentiment}Toast` | ||
}; | ||
@@ -33,0 +32,0 @@ } |
@@ -19,3 +19,3 @@ "use strict"; | ||
closeIconWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(TOAST, "-close-icon-wrapper"), 'pando_toastCloseIconWrapper') | ||
...(0, _helpers.createClassNameProp)(`${TOAST}-close-icon-wrapper`, 'pando_toastCloseIconWrapper') | ||
}, | ||
@@ -26,10 +26,10 @@ container: { | ||
iconWrapper: { | ||
...(0, _helpers.createClassNameProp)("".concat(TOAST, "-icon-wrapper"), 'pando_toastIconWrapper') | ||
...(0, _helpers.createClassNameProp)(`${TOAST}-icon-wrapper`, 'pando_toastIconWrapper') | ||
}, | ||
section: { | ||
...(0, _helpers.createClassNameProp)("".concat(TOAST, "-section"), 'pando_toastSection') | ||
...(0, _helpers.createClassNameProp)(`${TOAST}-section`, 'pando_toastSection') | ||
}, | ||
wrapper: { | ||
...a11yProps.wrapper, | ||
...(0, _helpers.createClassNameProp)("".concat(TOAST, "-wrapper"), 'pando_toastWrapper') | ||
...(0, _helpers.createClassNameProp)(`${TOAST}-wrapper`, 'pando_toastWrapper') | ||
} | ||
@@ -40,3 +40,3 @@ }; | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TOAST, "-heading"), 'pando_toastHeading') | ||
...(0, _helpers.createClassNameProp)(`${TOAST}-heading`, 'pando_toastHeading') | ||
}; | ||
@@ -46,5 +46,5 @@ } | ||
return { | ||
...(0, _helpers.createClassNameProp)("".concat(TOAST, "-button"), 'pando_toastButton') | ||
...(0, _helpers.createClassNameProp)(`${TOAST}-button`, 'pando_toastButton') | ||
}; | ||
} | ||
//# sourceMappingURL=toastCSS.js.map |
@@ -512,2 +512,14 @@ "use strict"; | ||
}); | ||
var _styles = require("./styles"); | ||
Object.keys(_styles).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; | ||
if (key in exports && exports[key] === _styles[key]) return; | ||
Object.defineProperty(exports, key, { | ||
enumerable: true, | ||
get: function () { | ||
return _styles[key]; | ||
} | ||
}); | ||
}); | ||
//# sourceMappingURL=index.js.map |
@@ -8,13 +8,11 @@ "use strict"; | ||
function getDialogA11yLabel(options) { | ||
var _options$ariaLabel; | ||
if (options !== null && options !== void 0 && options.headingId) { | ||
var _options$headingId; | ||
if (options?.headingId) { | ||
return { | ||
'aria-labelledby': (_options$headingId = options.headingId) !== null && _options$headingId !== void 0 ? _options$headingId : '' | ||
'aria-labelledby': options.headingId ?? '' | ||
}; | ||
} | ||
return { | ||
'aria-label': (_options$ariaLabel = options.ariaLabel) !== null && _options$ariaLabel !== void 0 ? _options$ariaLabel : '' | ||
'aria-label': options.ariaLabel ?? '' | ||
}; | ||
} | ||
//# sourceMappingURL=a11yHelpers.js.map |
@@ -27,3 +27,3 @@ "use strict"; | ||
} | ||
return "".concat(kebabCase(propName), ":"); | ||
return `${kebabCase(propName)}:`; | ||
} | ||
@@ -38,9 +38,12 @@ function kebabCase(input) { | ||
if (typeof style === 'string') { | ||
return "".concat(style.trim(), ";"); | ||
return `${style.trim()};`; | ||
} | ||
const psuedoStyles = Object.entries(style).reduce((prev, _ref) => { | ||
let [current, currentValue] = _ref; | ||
return "\n ".concat(prev.trim(), "\n ").concat(kebabCase(current), ": ").concat(currentValue, ";\n "); | ||
}, ""); | ||
return "{".concat(psuedoStyles, "}"); | ||
return ` | ||
${prev.trim()} | ||
${kebabCase(current)}: ${currentValue}; | ||
`; | ||
}, ``); | ||
return `{${psuedoStyles}}`; | ||
} | ||
@@ -87,4 +90,3 @@ | ||
function splitClassNameProp(classNameProp) { | ||
var _classNameProp$split$; | ||
return (_classNameProp$split$ = classNameProp === null || classNameProp === void 0 ? void 0 : classNameProp.split(' ').filter(Boolean)) !== null && _classNameProp$split$ !== void 0 ? _classNameProp$split$ : []; | ||
return classNameProp?.split(' ').filter(Boolean) ?? []; | ||
} | ||
@@ -98,3 +100,6 @@ function transformCasing(jsxProp, syntax) { | ||
const propName = formatCSSPropName(currentKey); | ||
return "\n ".concat(prev.trim(), "\n ").concat(propName, " ").concat(transformValue(currentValue), "\n "); | ||
return ` | ||
${prev.trim()} | ||
${propName} ${transformValue(currentValue)} | ||
`; | ||
}, '').trim().replace(/^ {2,12}/gm, ''); | ||
@@ -101,0 +106,0 @@ } |
@@ -34,1 +34,2 @@ export * from './components/ActionMenu/actionMenu'; | ||
export * from './types'; | ||
export * from './styles'; |
262
package.json
{ | ||
"name": "@pluralsight/headless-styles", | ||
"version": "0.7.1-next-5f9f4f", | ||
"description": "Javascript library of accessibility and style helpers for the Pando Design System.", | ||
"author": "Design System Team", | ||
"bugs": { | ||
"url": "https://github.com/pluralsight/pando/issues" | ||
}, | ||
"homepage": "https://design.pluralsight.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pluralsight/pando.git", | ||
"directory": "packages/headless-styles" | ||
}, | ||
"license": "Apache 2.0", | ||
"main": "npm/node/index.js", | ||
"module": "npm/browser/index.js", | ||
"sideEffects": "**/*.css", | ||
"browserslist": [ | ||
"> 0.25%", | ||
"not dead" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./npm/browser/index.js", | ||
"require": "./npm/node/index.js", | ||
"types": "./npm/types/src/index.d.ts" | ||
}, | ||
"./types": { | ||
"types": "./npm/types/src/types.d.ts" | ||
}, | ||
"./styles": { | ||
"import": "./npm/browser/src/styles.js", | ||
"require": "./npm/node/src/styles.js", | ||
"types": "./npm/types/src/styles.d.ts" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"styles": [ | ||
"npm/types/src/styles.d.ts" | ||
], | ||
"types": [ | ||
"npm/types/src/types.d.ts" | ||
] | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"files": [ | ||
"npm/**/*", | ||
"src/**/*" | ||
], | ||
"dependencies": { | ||
"tslib": "latest" | ||
}, | ||
"peerDependencies": { | ||
"core-js": "^3.30.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.21.5", | ||
"@babel/plugin-transform-modules-commonjs": "^7.21.5", | ||
"@pluralsight/design-tokens": "next", | ||
"@rollup/plugin-alias": "^5.0.0", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-node-resolve": "^15.0.0", | ||
"@rollup/plugin-replace": "^5.0.0", | ||
"@types/react": "latest", | ||
"autoprefixer": "^10.4.12", | ||
"babel-plugin-transform-rename-import": "^2.3.0", | ||
"css": "latest", | ||
"csstype": "^3.1.2", | ||
"glob": "^10.2.5", | ||
"jest-environment-node-single-context": "^29.0.0", | ||
"postcss": "^8.4.18", | ||
"postcss-cli": "^10.1.0", | ||
"rollup": "^3.2.2", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"sass": "^1.62.1", | ||
"sass-true": "^7.0.0", | ||
"stylelint": "^15.10.1", | ||
"stylelint-config-prettier": "^9.0.5", | ||
"stylelint-config-standard": "^34.0.0", | ||
"stylelint-config-standard-scss": "^11.0.0", | ||
"stylelint-order": "^6.0.3", | ||
"stylelint-prettier": "^4.0.0" | ||
}, | ||
"keywords": [ | ||
"pluralsight", | ||
"pluralsight design", | ||
"pluralsight headless styles", | ||
"headless", | ||
"styles", | ||
"headless-styles" | ||
], | ||
"packageManager": "pnpm@8.6.11", | ||
"scripts": { | ||
"build": "pnpm clean && pnpm compile:types && pnpm compile:css && pnpm compile:js && pnpm clean:allUnused", | ||
"clean": "pnpm clean:bundles && pnpm clean:types", | ||
"clean:bundles": "rm -rf ./npm/browser && rm -rf ./npm/node", | ||
"clean:types": "rm -rf ./npm/types", | ||
"clean:allUnused": "pnpm clean:unusedFiles && pnpm clean:unusedDirs", | ||
"clean:unusedFiles": "rm -rf npm/types/index.js", | ||
"clean:unusedDirs": "pnpm clean:unusedDirs:hs && pnpm clean:unusedDirs:shared", | ||
"clean:unusedDirs:hs": "rm -rf npm/types/headless-styles", | ||
"clean:unusedDirs:shared": "rm -rf npm/types/shared", | ||
"compile:css": "pnpm compile:css:browser && pnpm compile:css:node && pnpm compile:css:postcss", | ||
"compile:css:browser": "sass src:npm/browser", | ||
"compile:css:node": "sass src:npm/node", | ||
"compile:css:postcss": "postcss npm/**/*.css --replace", | ||
"compile:js": "pnpm compile:es:src && pnpm compile:cjs:src", | ||
"compile:es:src": "babel src -x .js,.ts -d npm/browser --config-file ./babel.es.mjs", | ||
"compile:cjs:src": "babel src -x .js,.ts -d npm/node --config-file ./babel.common.mjs", | ||
"compile:types": "tsc --project types.tsconfig.json", | ||
"fix:css": "stylelint --fix \"./**/*.@(css|scss)\"", | ||
"lint:css": "stylelint \"./**/*.@(css|scss)\" --max-warnings 0", | ||
"lint:js": "eslint --max-warnings 0 \"./**/*.@(js|ts)\"", | ||
"lint:ts": "tsc --project tsconfig.json --noEmit", | ||
"test": "jest --passWithNoTests" | ||
}, | ||
"types": "npm/types/src/index.d.ts" | ||
} | ||
"name": "@pluralsight/headless-styles", | ||
"version": "0.7.1-next-6085c0", | ||
"description": "Javascript library of accessibility and style helpers for the Pando Design System.", | ||
"author": "Design System Team", | ||
"bugs": { | ||
"url": "https://github.com/pluralsight/pando/issues" | ||
}, | ||
"homepage": "https://design.pluralsight.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/pluralsight/pando.git", | ||
"directory": "packages/headless-styles" | ||
}, | ||
"license": "Apache 2.0", | ||
"main": "src/index.ts", | ||
"module": "src/index.ts", | ||
"sideEffects": "**/*.css", | ||
"browserslist": [ | ||
"> 0.25%", | ||
"not dead" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./src/index.ts", | ||
"require": "./src/index.ts" | ||
}, | ||
"./types": { | ||
"types": "./src/types.ts" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"types": [ | ||
"src/types.ts" | ||
] | ||
} | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"main": "npm/node/index.js", | ||
"module": "npm/browser/index.js", | ||
"types": "npm/types/src/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./npm/browser/index.js", | ||
"require": "./npm/node/index.js", | ||
"types": "./npm/types/src/index.d.ts" | ||
}, | ||
"./types": { | ||
"types": "./npm/types/src/types.d.ts" | ||
}, | ||
"./styles": { | ||
"import": "./npm/browser/src/styles.js", | ||
"require": "./npm/node/src/styles.js", | ||
"types": "./npm/types/src/styles.d.ts" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"styles": [ | ||
"npm/types/src/styles.d.ts" | ||
], | ||
"types": [ | ||
"npm/types/src/types.d.ts" | ||
] | ||
} | ||
} | ||
}, | ||
"files": [ | ||
"npm/**/*", | ||
"src/**/*" | ||
], | ||
"scripts": { | ||
"build": "bun run clean && bun run compile:types && bun run compile:css && bun run compile:js && bun run clean:allUnused", | ||
"clean": "bun run clean:bundles && bun run clean:types", | ||
"clean:bundles": "rm -rf ./npm/browser && rm -rf ./npm/node", | ||
"clean:types": "rm -rf ./npm/types", | ||
"clean:allUnused": "bun run clean:unusedFiles && bun run clean:unusedDirs", | ||
"clean:unusedFiles": "rm -rf npm/types/index.js", | ||
"clean:unusedDirs": "bun run clean:unusedDirs:hs && bun run clean:unusedDirs:shared", | ||
"clean:unusedDirs:hs": "rm -rf npm/types/headless-styles", | ||
"clean:unusedDirs:shared": "rm -rf npm/types/shared", | ||
"compile:css": "bun run compile:css:browser && bun run compile:css:node && bun run compile:css:postcss", | ||
"compile:css:browser": "sass src:npm/browser", | ||
"compile:css:node": "sass src:npm/node", | ||
"compile:css:postcss": "postcss npm/**/*.css --replace", | ||
"compile:js": "bun run compile:es:src && bun run compile:cjs:src", | ||
"compile:es:src": "babel src -x .js,.ts -d npm/browser --config-file ./babel.es.mjs", | ||
"compile:cjs:src": "babel src -x .js,.ts -d npm/node --config-file ./babel.common.mjs", | ||
"compile:types": "tsc --project types.tsconfig.json", | ||
"fix:css": "stylelint --fix \"./**/*.@(css|scss)\"", | ||
"lint:css": "stylelint \"./**/*.@(css|scss)\" --max-warnings 0", | ||
"lint:js": "eslint --max-warnings 0 \"./**/*.@(js|ts)\"", | ||
"lint:ts": "tsc --project tsconfig.json --noEmit", | ||
"test": "jest --passWithNoTests" | ||
}, | ||
"dependencies": { | ||
"tslib": "latest" | ||
}, | ||
"peerDependencies": { | ||
"core-js": "^3.30.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.21.5", | ||
"@babel/plugin-transform-modules-commonjs": "^7.21.5", | ||
"@pluralsight/design-tokens": "next", | ||
"@rollup/plugin-alias": "^5.0.0", | ||
"@rollup/plugin-babel": "^6.0.3", | ||
"@rollup/plugin-node-resolve": "^15.0.0", | ||
"@rollup/plugin-replace": "^5.0.0", | ||
"@types/react": "latest", | ||
"autoprefixer": "^10.4.12", | ||
"babel-plugin-transform-rename-import": "^2.3.0", | ||
"css": "latest", | ||
"csstype": "^3.1.2", | ||
"glob": "^10.2.5", | ||
"jest-environment-node-single-context": "^29.0.0", | ||
"postcss": "^8.4.18", | ||
"postcss-cli": "^10.1.0", | ||
"rollup": "^4.0.2", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"sass": "^1.62.1", | ||
"sass-true": "^7.0.0", | ||
"stylelint": "^15.10.1", | ||
"stylelint-config-prettier": "^9.0.5", | ||
"stylelint-config-standard": "^34.0.0", | ||
"stylelint-config-standard-scss": "^11.0.0", | ||
"stylelint-order": "^6.0.3", | ||
"stylelint-prettier": "^4.0.0" | ||
}, | ||
"keywords": [ | ||
"pluralsight", | ||
"pluralsight design", | ||
"pluralsight headless styles", | ||
"headless", | ||
"styles", | ||
"headless-styles" | ||
], | ||
"packageManager": "bun@1.0.6" | ||
} |
@@ -106,1 +106,2 @@ export * from './components/ActionMenu/actionMenu' | ||
export * from './types' | ||
export * from './styles' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
1875329
1010
30227