@yahoo/uds 3.152.1 → 3.153.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/automated-config/dist/generated/autoVariants.cjs +25 -0
- package/dist/automated-config/dist/generated/autoVariants.d.cts +6 -0
- package/dist/automated-config/dist/generated/autoVariants.d.ts +6 -0
- package/dist/automated-config/dist/generated/autoVariants.js +25 -0
- package/dist/automated-config/dist/generated/generatedConfigs.cjs +1368 -0
- package/dist/automated-config/dist/generated/generatedConfigs.d.cts +169 -1
- package/dist/automated-config/dist/generated/generatedConfigs.d.ts +169 -1
- package/dist/automated-config/dist/generated/generatedConfigs.js +1368 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.cjs +198 -0
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.cts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.d.ts +2 -1
- package/dist/automated-config/dist/generated/universalTokensConfigAuto.js +198 -0
- package/dist/automated-config/dist/types/ComponentConfig.d.cts +2 -0
- package/dist/automated-config/dist/types/ComponentConfig.d.ts +2 -0
- package/dist/automated-config/dist/utils/buildConfigSchema.cjs +13 -20
- package/dist/automated-config/dist/utils/buildConfigSchema.d.cts +14 -2
- package/dist/automated-config/dist/utils/buildConfigSchema.d.ts +14 -2
- package/dist/automated-config/dist/utils/buildConfigSchema.js +13 -20
- package/dist/automated-config/dist/utils/componentStatePseudoStates.cjs +15 -0
- package/dist/automated-config/dist/utils/componentStatePseudoStates.js +14 -0
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.cjs +4 -2
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.d.cts +1 -1
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.d.ts +1 -1
- package/dist/automated-config/dist/utils/getConfigVariantPseudoStates.js +4 -2
- package/dist/automated-config/dist/utils/index.cjs +114 -48
- package/dist/automated-config/dist/utils/index.d.cts +25 -2
- package/dist/automated-config/dist/utils/index.d.ts +25 -2
- package/dist/automated-config/dist/utils/index.js +114 -49
- package/dist/components/client/IconButton.cjs +1 -1
- package/dist/components/client/IconButton.js +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +1 -1
- package/dist/components/client/Menu/Menu.ItemCheckbox.d.ts +1 -1
- package/dist/components/client/Pagination/Pagination.cjs +62 -0
- package/dist/components/client/Pagination/Pagination.d.cts +28 -0
- package/dist/components/client/Pagination/Pagination.d.ts +29 -0
- package/dist/components/client/Pagination/Pagination.js +60 -0
- package/dist/components/client/Pagination/PaginationEllipsis.cjs +24 -0
- package/dist/components/client/Pagination/PaginationEllipsis.d.cts +10 -0
- package/dist/components/client/Pagination/PaginationEllipsis.d.ts +11 -0
- package/dist/components/client/Pagination/PaginationEllipsis.js +22 -0
- package/dist/components/client/Pagination/PaginationItem.cjs +52 -0
- package/dist/components/client/Pagination/PaginationItem.d.cts +10 -0
- package/dist/components/client/Pagination/PaginationItem.d.ts +11 -0
- package/dist/components/client/Pagination/PaginationItem.js +50 -0
- package/dist/components/client/Pagination/PaginationLink.cjs +53 -0
- package/dist/components/client/Pagination/PaginationLink.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationLink.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationLink.js +51 -0
- package/dist/components/client/Pagination/PaginationNext.cjs +56 -0
- package/dist/components/client/Pagination/PaginationNext.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationNext.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationNext.js +54 -0
- package/dist/components/client/Pagination/PaginationNumbers.cjs +52 -0
- package/dist/components/client/Pagination/PaginationNumbers.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationNumbers.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationNumbers.js +50 -0
- package/dist/components/client/Pagination/PaginationPrev.cjs +56 -0
- package/dist/components/client/Pagination/PaginationPrev.d.cts +9 -0
- package/dist/components/client/Pagination/PaginationPrev.d.ts +10 -0
- package/dist/components/client/Pagination/PaginationPrev.js +54 -0
- package/dist/components/client/Pagination/computeVisiblePages.cjs +22 -0
- package/dist/components/client/Pagination/computeVisiblePages.d.cts +18 -0
- package/dist/components/client/Pagination/computeVisiblePages.d.ts +19 -0
- package/dist/components/client/Pagination/computeVisiblePages.js +21 -0
- package/dist/components/client/Pagination/ellipsisDefault.cjs +33 -0
- package/dist/components/client/Pagination/ellipsisDefault.d.cts +10 -0
- package/dist/components/client/Pagination/ellipsisDefault.d.ts +11 -0
- package/dist/components/client/Pagination/ellipsisDefault.js +32 -0
- package/dist/components/client/Pagination/ellipsisNone.cjs +29 -0
- package/dist/components/client/Pagination/ellipsisNone.d.cts +10 -0
- package/dist/components/client/Pagination/ellipsisNone.d.ts +11 -0
- package/dist/components/client/Pagination/ellipsisNone.js +28 -0
- package/dist/components/client/Pagination/index.cjs +19 -0
- package/dist/components/client/Pagination/index.d.cts +10 -0
- package/dist/components/client/Pagination/index.d.ts +11 -0
- package/dist/components/client/Pagination/index.js +11 -0
- package/dist/components/client/Pagination/paginationContext.cjs +44 -0
- package/dist/components/client/Pagination/paginationContext.d.cts +34 -0
- package/dist/components/client/Pagination/paginationContext.d.ts +35 -0
- package/dist/components/client/Pagination/paginationContext.js +38 -0
- package/dist/components/client/Pagination/paginationStyles.cjs +72 -0
- package/dist/components/client/Pagination/paginationStyles.d.cts +14 -0
- package/dist/components/client/Pagination/paginationStyles.d.ts +15 -0
- package/dist/components/client/Pagination/paginationStyles.js +63 -0
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.cts +1 -1
- package/dist/components/client/Popover/UDSPopoverConfigProvider.d.ts +1 -1
- package/dist/components/client/index.cjs +14 -0
- package/dist/components/client/index.d.cts +8 -1
- package/dist/components/client/index.d.ts +8 -1
- package/dist/components/client/index.js +8 -1
- package/dist/components/index.cjs +14 -0
- package/dist/components/index.d.cts +8 -1
- package/dist/components/index.d.ts +8 -1
- package/dist/components/index.js +8 -1
- package/dist/config/dist/index.cjs +272 -2
- package/dist/config/dist/index.js +272 -2
- package/dist/css/dist/css/utils.cjs +5 -1
- package/dist/css/dist/css/utils.js +5 -1
- package/dist/css/dist/packages/config/dist/index.cjs +272 -2
- package/dist/css/dist/packages/config/dist/index.js +272 -2
- package/dist/css/dist/purger/optimized/utils/safelist.cjs +7 -0
- package/dist/css/dist/purger/optimized/utils/safelist.js +7 -0
- package/dist/index.cjs +16 -0
- package/dist/index.d.cts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.js +10 -3
- package/dist/styles/styler.d.cts +65 -59
- package/dist/styles/styler.d.ts +65 -59
- package/dist/styles/variants.d.cts +27 -0
- package/dist/styles/variants.d.ts +27 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.cjs +1368 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/generated/generatedConfigs.js +1368 -1
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.cjs +16 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/componentStatePseudoStates.js +15 -0
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.cjs +113 -48
- package/dist/tailwind-internal/dist/packages/automated-config/dist/utils/index.js +113 -48
- package/dist/tailwind-internal/dist/packages/config/dist/index.cjs +272 -2
- package/dist/tailwind-internal/dist/packages/config/dist/index.js +272 -2
- package/dist/tailwind-internal/dist/plugins/components.cjs +1 -0
- package/dist/tailwind-internal/dist/plugins/components.js +2 -1
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.cts +2 -2
- package/dist/tailwind-internal/dist/utils/getShadowStyles.d.ts +2 -2
- package/dist/tokens/automation/configs/index.cjs +1 -0
- package/dist/tokens/automation/configs/index.d.cts +2 -2
- package/dist/tokens/automation/configs/index.d.ts +2 -2
- package/dist/tokens/automation/configs/index.js +2 -2
- package/dist/tokens/automation/index.cjs +2 -0
- package/dist/tokens/automation/index.d.cts +3 -3
- package/dist/tokens/automation/index.d.ts +3 -3
- package/dist/tokens/automation/index.js +3 -3
- package/dist/tokens/index.cjs +2 -0
- package/dist/tokens/index.d.cts +4 -4
- package/dist/tokens/index.d.ts +4 -4
- package/dist/tokens/index.js +3 -3
- package/dist/tokens/types.d.cts +2 -2
- package/dist/tokens/types.d.ts +2 -2
- package/dist/types/dist/index.d.cts +83 -1
- package/dist/types/dist/index.d.ts +83 -1
- package/dist/uds/generated/componentData.cjs +1069 -690
- package/dist/uds/generated/componentData.js +1069 -690
- package/dist/uds/generated/tailwindPurge.cjs +115 -84
- package/dist/uds/generated/tailwindPurge.js +115 -84
- package/dist/uds/package.cjs +1 -0
- package/dist/uds/package.js +1 -0
- package/generated/componentData.json +1323 -864
- package/generated/tailwindPurge.ts +4 -4
- package/package.json +2 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
2
|
import { BUTTON_GAP_VAR, BUTTON_SCALE_EFFECT_HOVER, BUTTON_SCALE_EFFECT_PRESSED, BUTTON_SCALE_EFFECT_REST } from "../../../css-tokens/dist/index.js";
|
|
3
3
|
import { configurableProperties } from "../properties.js";
|
|
4
|
+
import { filterPseudoStatesByExclusion, getExcludedPseudoStatesForComponentStateOption } from "./componentStatePseudoStates.js";
|
|
4
5
|
import { generateSchemaKey } from "./generateSchemaKey.js";
|
|
5
6
|
import { isVariantConfigWithComponentStates, isVariantConfigWithProperties } from "./variantConfigGuards.js";
|
|
6
7
|
import { findFixtureTypeForValue } from "./buildConfigSchema.js";
|
|
@@ -18,7 +19,9 @@ import { isFunction, mergeWith } from "lodash-es";
|
|
|
18
19
|
//#region ../automated-config/dist/utils/index.js
|
|
19
20
|
/*! © 2026 Yahoo, Inc. UDS Default Config v0.0.0-development */
|
|
20
21
|
const CSS_GAP = "gap";
|
|
22
|
+
const CSS_PADDING = "padding";
|
|
21
23
|
const CSS_LINE_HEIGHT = "line-height";
|
|
24
|
+
const PAGINATION_CONTROL_SIZE_VAR = "--uds-pagination-control-size";
|
|
22
25
|
const CSS_BORDER_WIDTH = "border-width";
|
|
23
26
|
const CSS_BORDER_RADIUS = "border-radius";
|
|
24
27
|
const CSS_BORDER_COLOR = "border-color";
|
|
@@ -58,6 +61,10 @@ const COMPONENTS_WITH_SHADOW_BORDERS = [
|
|
|
58
61
|
{
|
|
59
62
|
componentName: "tabs",
|
|
60
63
|
layer: "root"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
componentName: "pagination",
|
|
67
|
+
layer: "root"
|
|
61
68
|
}
|
|
62
69
|
];
|
|
63
70
|
/**
|
|
@@ -103,6 +110,15 @@ function getButtonLineHeightWithIconMinimum({ lineHeight, schema, iconLayerKey,
|
|
|
103
110
|
return lineHeight;
|
|
104
111
|
}
|
|
105
112
|
/**
|
|
113
|
+
* Shared pagination control height: padding on all sides plus icon size.
|
|
114
|
+
* Keeps page circles, prev/next, and ellipsis vertically aligned when spacing changes.
|
|
115
|
+
*/
|
|
116
|
+
function getPaginationControlSize({ padding, schema, iconLayerKey, state, theme }) {
|
|
117
|
+
const iconSizeValue = schema.variables?.[iconLayerKey]?.size?.[state]?.value;
|
|
118
|
+
if (iconSizeValue) return `calc(2 * ${padding} + ${theme(configurableProperties.iconSize.twThemePath("iconSizes", iconSizeValue))})`;
|
|
119
|
+
return `calc(2 * ${padding} + 1em)`;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
106
122
|
* Forces button borders to use box-shadow instead of border properties.
|
|
107
123
|
* Converts border-width and border-color into an inset box-shadow layer.
|
|
108
124
|
*
|
|
@@ -141,11 +157,37 @@ function applyBoxShadowBorder(classStyles) {
|
|
|
141
157
|
const bottomColor = classStyles[CSS_BORDER_BOTTOM_COLOR] ?? borderColor;
|
|
142
158
|
const leftColor = classStyles[CSS_BORDER_LEFT_COLOR] ?? borderColor;
|
|
143
159
|
const borderLayers = [];
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
160
|
+
const sidesWithBorder = [
|
|
161
|
+
topWidth,
|
|
162
|
+
rightWidth,
|
|
163
|
+
bottomWidth,
|
|
164
|
+
leftWidth
|
|
165
|
+
].map((width, index) => {
|
|
166
|
+
const color = [
|
|
167
|
+
topColor,
|
|
168
|
+
rightColor,
|
|
169
|
+
bottomColor,
|
|
170
|
+
leftColor
|
|
171
|
+
][index];
|
|
172
|
+
return {
|
|
173
|
+
width: stripImportant(width ?? "").trim(),
|
|
174
|
+
color: stripImportant(color ?? "").trim()
|
|
175
|
+
};
|
|
176
|
+
}).filter(({ width }) => !isZeroWidth(width));
|
|
177
|
+
if (sidesWithBorder.length === 0) return classStyles;
|
|
178
|
+
const uniformWidth = sidesWithBorder.every(({ width }) => width === sidesWithBorder[0].width);
|
|
179
|
+
const uniformColor = sidesWithBorder.every(({ color }) => color && color === sidesWithBorder[0].color);
|
|
180
|
+
const hasBorderWidthShorthand = borderWidth !== void 0 && !isZeroWidth(borderWidth);
|
|
181
|
+
const allSidesBordered = sidesWithBorder.length === 4;
|
|
182
|
+
if ((hasBorderWidthShorthand || allSidesBordered) && uniformWidth && uniformColor) {
|
|
183
|
+
const { width, color } = sidesWithBorder[0];
|
|
184
|
+
borderLayers.push(`inset 0 0 0 ${width} ${color}`);
|
|
185
|
+
} else {
|
|
186
|
+
if (!isZeroWidth(topWidth) && topColor) borderLayers.push(`inset 0 ${stripImportant(topWidth)} 0 0 ${stripImportant(topColor)}`);
|
|
187
|
+
if (!isZeroWidth(rightWidth) && rightColor) borderLayers.push(`inset ${negateLength(rightWidth)} 0 0 0 ${stripImportant(rightColor)}`);
|
|
188
|
+
if (!isZeroWidth(bottomWidth) && bottomColor) borderLayers.push(`inset 0 ${negateLength(bottomWidth)} 0 0 ${stripImportant(bottomColor)}`);
|
|
189
|
+
if (!isZeroWidth(leftWidth) && leftColor) borderLayers.push(`inset ${stripImportant(leftWidth)} 0 0 0 ${stripImportant(leftColor)}`);
|
|
190
|
+
}
|
|
149
191
|
const layers = [...borderLayers, classStyles[CSS_BOX_SHADOW] && stripImportant(classStyles[CSS_BOX_SHADOW])].filter(Boolean);
|
|
150
192
|
const needsImportant = hasImportant(topWidth) || hasImportant(rightWidth) || hasImportant(bottomWidth) || hasImportant(leftWidth) || hasImportant(topColor) || hasImportant(rightColor) || hasImportant(bottomColor) || hasImportant(leftColor) || hasImportant(borderWidth) || hasImportant(borderColor) || hasImportant(classStyles[CSS_BOX_SHADOW]);
|
|
151
193
|
const newStyles = { ...classStyles };
|
|
@@ -184,7 +226,7 @@ const getTheCssPropertyValue = (schema, theme, propertyName, schemaStateValue, e
|
|
|
184
226
|
if (propertyConfig.concatenate && existingValue) return `${existingValue}${propertyConfig.concatenationDelimiter || ", "}${newValue}`;
|
|
185
227
|
return newValue;
|
|
186
228
|
};
|
|
187
|
-
function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions }) {
|
|
229
|
+
function generateDeclaration({ componentName, subComponentName, variantKey, variantValue, layer, layerOptionalPseudoSelector, componentStateKey, componentStateValue, schema, propertyKey, originalPropertyDefinition, theme, currentStyles, previewOptions, excludedPseudoStates = [] }) {
|
|
188
230
|
const schemaKey = generateSchemaKey({
|
|
189
231
|
variantKey,
|
|
190
232
|
variantValue,
|
|
@@ -206,7 +248,7 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
206
248
|
if (!propertyStateMap) throw new Error(`Prop definition (${componentName} - ${schemaKey} - ${propertyKey}) not found, this is not expected, please report the bug to the UDS team`);
|
|
207
249
|
const styles = {};
|
|
208
250
|
const skipRestForProperty = originalPropertyDefinition.skipRestState === true;
|
|
209
|
-
const declaredPseudoStates = originalPropertyDefinition.pseudoStates
|
|
251
|
+
const declaredPseudoStates = filterPseudoStatesByExclusion(originalPropertyDefinition.pseudoStates, excludedPseudoStates);
|
|
210
252
|
const declaredPropertyStates = new Set([...skipRestForProperty ? [] : ["rest"], ...declaredPseudoStates]);
|
|
211
253
|
for (const propStateStr in propertyStateMap) {
|
|
212
254
|
if (!declaredPropertyStates.has(propStateStr)) continue;
|
|
@@ -318,6 +360,21 @@ function generateDeclaration({ componentName, subComponentName, variantKey, vari
|
|
|
318
360
|
});
|
|
319
361
|
}
|
|
320
362
|
}
|
|
363
|
+
if (componentName === "pagination" && layer === "item" && propertyKey === "spacing") {
|
|
364
|
+
const padding = cssDeclarations[CSS_PADDING];
|
|
365
|
+
if (padding) cssDeclarations[PAGINATION_CONTROL_SIZE_VAR] = getPaginationControlSize({
|
|
366
|
+
padding,
|
|
367
|
+
schema,
|
|
368
|
+
iconLayerKey: generateSchemaKey({
|
|
369
|
+
variantKey,
|
|
370
|
+
variantValue,
|
|
371
|
+
layer: "icon",
|
|
372
|
+
subComponentName
|
|
373
|
+
}),
|
|
374
|
+
state: propertyState,
|
|
375
|
+
theme
|
|
376
|
+
});
|
|
377
|
+
}
|
|
321
378
|
if (componentName === "paddlenav" && layer === "root") {
|
|
322
379
|
if (propertyKey === "borderRadius" && cssDeclarations[CSS_BORDER_RADIUS]) cssDeclarations[NESTED_BORDER_RADIUS_SIZE_VAR] = cssDeclarations[CSS_BORDER_RADIUS];
|
|
323
380
|
if (propertyKey === "borderWidth" && cssDeclarations[CSS_BORDER_WIDTH]) cssDeclarations[NESTED_BORDER_RADIUS_WIDTH_VAR] = cssDeclarations[CSS_BORDER_WIDTH];
|
|
@@ -389,26 +446,30 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
|
|
|
389
446
|
const componentStates = variantConfig.componentStates;
|
|
390
447
|
for (const componentStateKey in componentStates) {
|
|
391
448
|
const componentState = componentStates[componentStateKey];
|
|
392
|
-
for (const componentStateOption of componentState.options)
|
|
393
|
-
const
|
|
394
|
-
for (const
|
|
395
|
-
const
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
449
|
+
for (const componentStateOption of componentState.options) {
|
|
450
|
+
const excludedPseudoStates = getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
|
|
451
|
+
for (const layerKey in componentState.layers) {
|
|
452
|
+
const layer = componentState.layers[layerKey];
|
|
453
|
+
for (const propertyKey in layer.properties) {
|
|
454
|
+
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
455
|
+
const declarations = generateDeclaration({
|
|
456
|
+
componentName,
|
|
457
|
+
variantKey,
|
|
458
|
+
variantValue: variantOption,
|
|
459
|
+
componentStateKey,
|
|
460
|
+
componentStateValue: componentStateOption,
|
|
461
|
+
layer: layerKey,
|
|
462
|
+
layerOptionalPseudoSelector: layer.pseudoSelector,
|
|
463
|
+
propertyKey,
|
|
464
|
+
originalPropertyDefinition,
|
|
465
|
+
theme,
|
|
466
|
+
schema,
|
|
467
|
+
currentStyles: styles,
|
|
468
|
+
previewOptions,
|
|
469
|
+
excludedPseudoStates
|
|
470
|
+
});
|
|
471
|
+
styles = deepMerge(styles, declarations);
|
|
472
|
+
}
|
|
412
473
|
}
|
|
413
474
|
}
|
|
414
475
|
}
|
|
@@ -444,27 +505,31 @@ function generateConfigStyles(config, schema, theme, previewOptions) {
|
|
|
444
505
|
const componentStates = variantConfig.componentStates;
|
|
445
506
|
for (const componentStateKey in componentStates) {
|
|
446
507
|
const componentState = componentStates[componentStateKey];
|
|
447
|
-
for (const componentStateOption of componentState.options)
|
|
448
|
-
const
|
|
449
|
-
for (const
|
|
450
|
-
const
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
508
|
+
for (const componentStateOption of componentState.options) {
|
|
509
|
+
const excludedPseudoStates = getExcludedPseudoStatesForComponentStateOption(componentState, componentStateOption);
|
|
510
|
+
for (const layerKey in componentState.layers) {
|
|
511
|
+
const layer = componentState.layers[layerKey];
|
|
512
|
+
for (const propertyKey in layer.properties) {
|
|
513
|
+
const originalPropertyDefinition = layer.properties[propertyKey];
|
|
514
|
+
const declarations = generateDeclaration({
|
|
515
|
+
componentName,
|
|
516
|
+
variantKey,
|
|
517
|
+
variantValue: variantOption,
|
|
518
|
+
componentStateKey,
|
|
519
|
+
componentStateValue: componentStateOption,
|
|
520
|
+
subComponentName: subComponentKey,
|
|
521
|
+
layer: layerKey,
|
|
522
|
+
layerOptionalPseudoSelector: layer.pseudoSelector,
|
|
523
|
+
propertyKey,
|
|
524
|
+
originalPropertyDefinition,
|
|
525
|
+
theme,
|
|
526
|
+
schema,
|
|
527
|
+
currentStyles: styles,
|
|
528
|
+
previewOptions,
|
|
529
|
+
excludedPseudoStates
|
|
530
|
+
});
|
|
531
|
+
styles = deepMerge(styles, declarations);
|
|
532
|
+
}
|
|
468
533
|
}
|
|
469
534
|
}
|
|
470
535
|
}
|
|
@@ -612,4 +677,4 @@ function createSubComponentConfig(config) {
|
|
|
612
677
|
return config;
|
|
613
678
|
}
|
|
614
679
|
//#endregion
|
|
615
|
-
export { createComponentStates, createConfigurableProperty, createLayerConfig, createSubComponentConfig, createVariantConfig, createVariantConfigWithComponentStates, createVariantConfigWithProperties, generateClassName, generateConfigStyles, generateDeclaration, generateStyles, statePseudoMapDocsMode };
|
|
680
|
+
export { applyBoxShadowBorder, createComponentStates, createConfigurableProperty, createLayerConfig, createSubComponentConfig, createVariantConfig, createVariantConfigWithComponentStates, createVariantConfigWithProperties, generateClassName, generateConfigStyles, generateDeclaration, generateStyles, statePseudoMapDocsMode };
|
|
@@ -64,7 +64,7 @@ const IconButton = (0, react.forwardRef)(function IconButton({ variant, size, ic
|
|
|
64
64
|
const iconSizeClass = (0, react.useMemo)(() => size ? require_styles_styler.getStyles({ iconbuttonSizeIcon: size }) : defaultSizeIconClass, [size]);
|
|
65
65
|
const iconVariantClass = (0, react.useMemo)(() => variant ? require_styles_styler.getStyles({ buttonVariantIcon: variant }) : defaultVariantIconClass, [variant]);
|
|
66
66
|
const styles = (0, react.useMemo)(() => ({
|
|
67
|
-
root: require_styles_styler.cx("uds-ring", "uds-hit-target", "inline-flex overflow-hidden justify-center items-center", "[transform-origin:center]", "[backface-visibility:hidden]", "[transition-property:color,background-color,border-color,
|
|
67
|
+
root: require_styles_styler.cx("uds-ring", "uds-hit-target", "inline-flex overflow-hidden justify-center items-center", "[transform-origin:center]", "[backface-visibility:hidden]", "[transition-property:color,background-color,border-color,box-shadow,text-decoration-color,fill,stroke]", "[transition-timing-function:cubic-bezier(0,0,0.2,1)]", "[transition-duration:220ms]", rootSizeClass, rootVariantClass, rest?.disabled && "cursor-not-allowed", loading && "uds-button-loading", disableEffects && "uds-button-without-effects", className),
|
|
68
68
|
icon: require_styles_styler.getStyles({ className: require_styles_styler.cx(iconSizeClass, iconVariantClass) }),
|
|
69
69
|
loadingIcon: require_styles_styler.getStyles({ className: require_styles_styler.cx([
|
|
70
70
|
"animate-spin",
|
|
@@ -62,7 +62,7 @@ const IconButton = forwardRef(function IconButton({ variant, size, iconVariant,
|
|
|
62
62
|
const iconSizeClass = useMemo(() => size ? getStyles({ iconbuttonSizeIcon: size }) : defaultSizeIconClass, [size]);
|
|
63
63
|
const iconVariantClass = useMemo(() => variant ? getStyles({ buttonVariantIcon: variant }) : defaultVariantIconClass, [variant]);
|
|
64
64
|
const styles = useMemo(() => ({
|
|
65
|
-
root: cx("uds-ring", "uds-hit-target", "inline-flex overflow-hidden justify-center items-center", "[transform-origin:center]", "[backface-visibility:hidden]", "[transition-property:color,background-color,border-color,
|
|
65
|
+
root: cx("uds-ring", "uds-hit-target", "inline-flex overflow-hidden justify-center items-center", "[transform-origin:center]", "[backface-visibility:hidden]", "[transition-property:color,background-color,border-color,box-shadow,text-decoration-color,fill,stroke]", "[transition-timing-function:cubic-bezier(0,0,0.2,1)]", "[transition-duration:220ms]", rootSizeClass, rootVariantClass, rest?.disabled && "cursor-not-allowed", loading && "uds-button-loading", disableEffects && "uds-button-without-effects", className),
|
|
66
66
|
icon: getStyles({ className: cx(iconSizeClass, iconVariantClass) }),
|
|
67
67
|
loadingIcon: getStyles({ className: cx([
|
|
68
68
|
"animate-spin",
|
|
@@ -87,6 +87,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
|
|
|
87
87
|
*
|
|
88
88
|
* @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
|
|
89
89
|
**/
|
|
90
|
-
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "
|
|
90
|
+
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "rootProps" | "hideEndIcon"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
91
91
|
//#endregion
|
|
92
92
|
export { MenuItemCheckbox, type MenuItemCheckboxProps };
|
|
@@ -88,6 +88,6 @@ interface MenuItemCheckboxProps extends Omit<PressableProps, 'asChild'>, HtmlBut
|
|
|
88
88
|
*
|
|
89
89
|
* @related [Menu](https://uds.build/docs/components/menu), [Menu.Item](https://uds.build/docs/components/menu-item)
|
|
90
90
|
**/
|
|
91
|
-
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "
|
|
91
|
+
declare const MenuItemCheckbox: _$react.ForwardRefExoticComponent<Omit<MenuItemCheckboxProps, "active" | "rootProps" | "hideEndIcon"> & _$react.RefAttributes<HTMLDivElement>>;
|
|
92
92
|
//#endregion
|
|
93
93
|
export { MenuItemCheckbox, type MenuItemCheckboxProps };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_components_client_Pagination_paginationContext = require("./paginationContext.cjs");
|
|
6
|
+
const require_components_client_Pagination_paginationStyles = require("./paginationStyles.cjs");
|
|
7
|
+
let react = require("react");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
//#region src/components/client/Pagination/Pagination.tsx
|
|
10
|
+
/**
|
|
11
|
+
* **Pagination — numbered page navigation component**
|
|
12
|
+
*
|
|
13
|
+
* @componentType Client component
|
|
14
|
+
*
|
|
15
|
+
* @description Compose with `PaginationPrev`, `PaginationNumbers`, and `PaginationNext`.
|
|
16
|
+
* The consumer owns `activePage` state.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Pagination activePage={page} totalPages={10} onPageChange={setPage} aria-label="Results">
|
|
21
|
+
* <PaginationPrev />
|
|
22
|
+
* <PaginationNumbers />
|
|
23
|
+
* <PaginationNext />
|
|
24
|
+
* </Pagination>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
const Pagination = (0, react.forwardRef)(function Pagination({ activePage, totalPages, maxVisiblePageNumbers = 7, ellipsisPlacement = "default", size = "md", variant = "default", getPageHref, getItemAriaLabel = require_components_client_Pagination_paginationContext.defaultGetItemAriaLabel, onPageChange, children, className, "aria-label": ariaLabel = "Pagination", ...rest }, ref) {
|
|
28
|
+
const rootClass = require_components_client_Pagination_paginationStyles.usePaginationRootClassName(size, className);
|
|
29
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_client_Pagination_paginationContext.PaginationProvider, {
|
|
30
|
+
value: (0, react.useMemo)(() => ({
|
|
31
|
+
activePage,
|
|
32
|
+
totalPages,
|
|
33
|
+
maxVisiblePageNumbers,
|
|
34
|
+
ellipsisPlacement,
|
|
35
|
+
size,
|
|
36
|
+
variant,
|
|
37
|
+
getPageHref,
|
|
38
|
+
getItemAriaLabel,
|
|
39
|
+
onPageChange
|
|
40
|
+
}), [
|
|
41
|
+
activePage,
|
|
42
|
+
totalPages,
|
|
43
|
+
maxVisiblePageNumbers,
|
|
44
|
+
ellipsisPlacement,
|
|
45
|
+
size,
|
|
46
|
+
variant,
|
|
47
|
+
getPageHref,
|
|
48
|
+
getItemAriaLabel,
|
|
49
|
+
onPageChange
|
|
50
|
+
]),
|
|
51
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
52
|
+
ref,
|
|
53
|
+
"aria-label": ariaLabel,
|
|
54
|
+
className: rootClass,
|
|
55
|
+
...rest,
|
|
56
|
+
children
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
Pagination.displayName = "Pagination";
|
|
61
|
+
//#endregion
|
|
62
|
+
exports.Pagination = Pagination;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalPaginationProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
import { HTMLAttributes } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/Pagination/Pagination.d.ts
|
|
7
|
+
type HtmlNavProps = Omit<HTMLAttributes<HTMLElement>, 'color'>;
|
|
8
|
+
type PaginationProps = UniversalPaginationProps & HtmlNavProps;
|
|
9
|
+
/**
|
|
10
|
+
* **Pagination — numbered page navigation component**
|
|
11
|
+
*
|
|
12
|
+
* @componentType Client component
|
|
13
|
+
*
|
|
14
|
+
* @description Compose with `PaginationPrev`, `PaginationNumbers`, and `PaginationNext`.
|
|
15
|
+
* The consumer owns `activePage` state.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Pagination activePage={page} totalPages={10} onPageChange={setPage} aria-label="Results">
|
|
20
|
+
* <PaginationPrev />
|
|
21
|
+
* <PaginationNumbers />
|
|
22
|
+
* <PaginationNext />
|
|
23
|
+
* </Pagination>
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
declare const Pagination: _$react.ForwardRefExoticComponent<UniversalPaginationProps & HtmlNavProps & _$react.RefAttributes<HTMLElement>>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { Pagination, type PaginationProps };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalPaginationProps } from "../../../types/dist/index.js";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
import { HTMLAttributes } from "react";
|
|
6
|
+
|
|
7
|
+
//#region src/components/client/Pagination/Pagination.d.ts
|
|
8
|
+
type HtmlNavProps = Omit<HTMLAttributes<HTMLElement>, 'color'>;
|
|
9
|
+
type PaginationProps = UniversalPaginationProps & HtmlNavProps;
|
|
10
|
+
/**
|
|
11
|
+
* **Pagination — numbered page navigation component**
|
|
12
|
+
*
|
|
13
|
+
* @componentType Client component
|
|
14
|
+
*
|
|
15
|
+
* @description Compose with `PaginationPrev`, `PaginationNumbers`, and `PaginationNext`.
|
|
16
|
+
* The consumer owns `activePage` state.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Pagination activePage={page} totalPages={10} onPageChange={setPage} aria-label="Results">
|
|
21
|
+
* <PaginationPrev />
|
|
22
|
+
* <PaginationNumbers />
|
|
23
|
+
* <PaginationNext />
|
|
24
|
+
* </Pagination>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare const Pagination: _$react.ForwardRefExoticComponent<UniversalPaginationProps & HtmlNavProps & _$react.RefAttributes<HTMLElement>>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Pagination, type PaginationProps };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { PaginationProvider, defaultGetItemAriaLabel } from "./paginationContext.js";
|
|
4
|
+
import { usePaginationRootClassName } from "./paginationStyles.js";
|
|
5
|
+
import { forwardRef, useMemo } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/client/Pagination/Pagination.tsx
|
|
8
|
+
/**
|
|
9
|
+
* **Pagination — numbered page navigation component**
|
|
10
|
+
*
|
|
11
|
+
* @componentType Client component
|
|
12
|
+
*
|
|
13
|
+
* @description Compose with `PaginationPrev`, `PaginationNumbers`, and `PaginationNext`.
|
|
14
|
+
* The consumer owns `activePage` state.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Pagination activePage={page} totalPages={10} onPageChange={setPage} aria-label="Results">
|
|
19
|
+
* <PaginationPrev />
|
|
20
|
+
* <PaginationNumbers />
|
|
21
|
+
* <PaginationNext />
|
|
22
|
+
* </Pagination>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
const Pagination = forwardRef(function Pagination({ activePage, totalPages, maxVisiblePageNumbers = 7, ellipsisPlacement = "default", size = "md", variant = "default", getPageHref, getItemAriaLabel = defaultGetItemAriaLabel, onPageChange, children, className, "aria-label": ariaLabel = "Pagination", ...rest }, ref) {
|
|
26
|
+
const rootClass = usePaginationRootClassName(size, className);
|
|
27
|
+
return /* @__PURE__ */ jsx(PaginationProvider, {
|
|
28
|
+
value: useMemo(() => ({
|
|
29
|
+
activePage,
|
|
30
|
+
totalPages,
|
|
31
|
+
maxVisiblePageNumbers,
|
|
32
|
+
ellipsisPlacement,
|
|
33
|
+
size,
|
|
34
|
+
variant,
|
|
35
|
+
getPageHref,
|
|
36
|
+
getItemAriaLabel,
|
|
37
|
+
onPageChange
|
|
38
|
+
}), [
|
|
39
|
+
activePage,
|
|
40
|
+
totalPages,
|
|
41
|
+
maxVisiblePageNumbers,
|
|
42
|
+
ellipsisPlacement,
|
|
43
|
+
size,
|
|
44
|
+
variant,
|
|
45
|
+
getPageHref,
|
|
46
|
+
getItemAriaLabel,
|
|
47
|
+
onPageChange
|
|
48
|
+
]),
|
|
49
|
+
children: /* @__PURE__ */ jsx("nav", {
|
|
50
|
+
ref,
|
|
51
|
+
"aria-label": ariaLabel,
|
|
52
|
+
className: rootClass,
|
|
53
|
+
...rest,
|
|
54
|
+
children
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
Pagination.displayName = "Pagination";
|
|
59
|
+
//#endregion
|
|
60
|
+
export { Pagination };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_components_client_Pagination_paginationContext = require("./paginationContext.cjs");
|
|
6
|
+
const require_components_client_Pagination_paginationStyles = require("./paginationStyles.cjs");
|
|
7
|
+
let react = require("react");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
//#region src/components/client/Pagination/PaginationEllipsis.tsx
|
|
10
|
+
const PaginationEllipsis = (0, react.forwardRef)(function PaginationEllipsis({ className }, ref) {
|
|
11
|
+
const { size, variant } = require_components_client_Pagination_paginationContext.usePaginationContext();
|
|
12
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
13
|
+
ref,
|
|
14
|
+
"aria-hidden": true,
|
|
15
|
+
className: require_components_client_Pagination_paginationStyles.usePaginationEllipsisClassName(size, variant, className),
|
|
16
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
17
|
+
className: require_components_client_Pagination_paginationStyles.usePaginationItemLabelClassName(size),
|
|
18
|
+
children: "…"
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.PaginationEllipsis = PaginationEllipsis;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/client/Pagination/PaginationEllipsis.d.ts
|
|
5
|
+
type PaginationEllipsisProps = {
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const PaginationEllipsis: _$react.ForwardRefExoticComponent<PaginationEllipsisProps & _$react.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { PaginationEllipsis, type PaginationEllipsisProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Pagination/PaginationEllipsis.d.ts
|
|
6
|
+
type PaginationEllipsisProps = {
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const PaginationEllipsis: _$react.ForwardRefExoticComponent<PaginationEllipsisProps & _$react.RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PaginationEllipsis, type PaginationEllipsisProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
import { usePaginationContext } from "./paginationContext.js";
|
|
4
|
+
import { usePaginationEllipsisClassName, usePaginationItemLabelClassName } from "./paginationStyles.js";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region src/components/client/Pagination/PaginationEllipsis.tsx
|
|
8
|
+
const PaginationEllipsis = forwardRef(function PaginationEllipsis({ className }, ref) {
|
|
9
|
+
const { size, variant } = usePaginationContext();
|
|
10
|
+
return /* @__PURE__ */ jsx("span", {
|
|
11
|
+
ref,
|
|
12
|
+
"aria-hidden": true,
|
|
13
|
+
className: usePaginationEllipsisClassName(size, variant, className),
|
|
14
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
15
|
+
className: usePaginationItemLabelClassName(size),
|
|
16
|
+
children: "…"
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
21
|
+
//#endregion
|
|
22
|
+
export { PaginationEllipsis };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
require("../../../_virtual/_rolldown/runtime.cjs");
|
|
5
|
+
const require_utils_createSlot = require("../../../utils/createSlot.cjs");
|
|
6
|
+
const require_components_client_Pagination_paginationContext = require("./paginationContext.cjs");
|
|
7
|
+
const require_components_client_Pagination_paginationStyles = require("./paginationStyles.cjs");
|
|
8
|
+
let react = require("react");
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
//#region src/components/client/Pagination/PaginationItem.tsx
|
|
11
|
+
const Slot = require_utils_createSlot.createSlot();
|
|
12
|
+
const PaginationItem = (0, react.forwardRef)(function PaginationItem({ page, asChild = false, children, className, onClick, ...rest }, ref) {
|
|
13
|
+
const { activePage, size, variant, getItemAriaLabel, onPageChange } = require_components_client_Pagination_paginationContext.usePaginationContext();
|
|
14
|
+
const isActive = page === activePage;
|
|
15
|
+
const itemClass = require_components_client_Pagination_paginationStyles.usePaginationItemClassName(size, variant, isActive, className);
|
|
16
|
+
const labelClass = require_components_client_Pagination_paginationStyles.usePaginationItemLabelClassName(size);
|
|
17
|
+
const ariaLabel = getItemAriaLabel(page, isActive);
|
|
18
|
+
const handleClick = (event) => {
|
|
19
|
+
onClick?.(event);
|
|
20
|
+
if (!event.defaultPrevented && !isActive) onPageChange?.(page);
|
|
21
|
+
};
|
|
22
|
+
const label = children ?? page;
|
|
23
|
+
const Comp = asChild ? Slot : "button";
|
|
24
|
+
if (asChild && (0, react.isValidElement)(children)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Comp, {
|
|
25
|
+
ref,
|
|
26
|
+
type: "button",
|
|
27
|
+
className: itemClass,
|
|
28
|
+
"aria-current": isActive ? "page" : void 0,
|
|
29
|
+
"aria-label": ariaLabel,
|
|
30
|
+
onClick: isActive ? void 0 : handleClick,
|
|
31
|
+
disabled: isActive,
|
|
32
|
+
...rest,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Comp, {
|
|
36
|
+
ref,
|
|
37
|
+
type: "button",
|
|
38
|
+
className: itemClass,
|
|
39
|
+
"aria-current": isActive ? "page" : void 0,
|
|
40
|
+
"aria-label": ariaLabel,
|
|
41
|
+
onClick: isActive ? void 0 : handleClick,
|
|
42
|
+
disabled: isActive,
|
|
43
|
+
...rest,
|
|
44
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
45
|
+
className: labelClass,
|
|
46
|
+
children: label
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
PaginationItem.displayName = "PaginationItem";
|
|
51
|
+
//#endregion
|
|
52
|
+
exports.PaginationItem = PaginationItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalPaginationItemProps } from "../../../types/dist/index.cjs";
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/client/Pagination/PaginationItem.d.ts
|
|
6
|
+
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
7
|
+
type PaginationItemProps = UniversalPaginationItemProps & HtmlButtonProps;
|
|
8
|
+
declare const PaginationItem: _$react.ForwardRefExoticComponent<UniversalPaginationItemProps & HtmlButtonProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { PaginationItem, type PaginationItemProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
"use client";
|
|
3
|
+
import { UniversalPaginationItemProps } from "../../../types/dist/index.js";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/components/client/Pagination/PaginationItem.d.ts
|
|
7
|
+
type HtmlButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'>;
|
|
8
|
+
type PaginationItemProps = UniversalPaginationItemProps & HtmlButtonProps;
|
|
9
|
+
declare const PaginationItem: _$react.ForwardRefExoticComponent<UniversalPaginationItemProps & HtmlButtonProps & _$react.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { PaginationItem, type PaginationItemProps };
|