material-plus-ui 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +28 -18
- package/dist/a2ui/catalog.d.ts +104 -0
- package/dist/a2ui/catalog.js +1 -0
- package/dist/a2ui/components/MPA2uiAudioPlayer.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiAudioPlayer.js +2 -0
- package/dist/a2ui/components/MPA2uiButton.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiButton.js +2 -0
- package/dist/a2ui/components/MPA2uiCard.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiCard.js +2 -0
- package/dist/a2ui/components/MPA2uiCheckBox.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiCheckBox.js +2 -0
- package/dist/a2ui/components/MPA2uiChoicePicker.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiChoicePicker.js +2 -0
- package/dist/a2ui/components/MPA2uiColumn.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiColumn.js +2 -0
- package/dist/a2ui/components/MPA2uiDateTimeInput.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiDateTimeInput.js +2 -0
- package/dist/a2ui/components/MPA2uiDivider.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiDivider.js +2 -0
- package/dist/a2ui/components/MPA2uiIcon.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiIcon.js +2 -0
- package/dist/a2ui/components/MPA2uiImage.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiImage.js +2 -0
- package/dist/a2ui/components/MPA2uiList.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiList.js +2 -0
- package/dist/a2ui/components/MPA2uiModal.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiModal.js +2 -0
- package/dist/a2ui/components/MPA2uiRow.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiRow.js +2 -0
- package/dist/a2ui/components/MPA2uiSlider.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiSlider.js +2 -0
- package/dist/a2ui/components/MPA2uiTabs.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiTabs.js +2 -0
- package/dist/a2ui/components/MPA2uiText.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiText.js +2 -0
- package/dist/a2ui/components/MPA2uiTextField.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiTextField.js +2 -0
- package/dist/a2ui/components/MPA2uiVideo.d.ts +1 -0
- package/dist/a2ui/components/MPA2uiVideo.js +2 -0
- package/dist/a2ui/extended/MPA2uiBarChart.d.ts +1 -0
- package/dist/a2ui/extended/MPA2uiBarChart.js +2 -0
- package/dist/a2ui/extended/MPA2uiDataTable.d.ts +1 -0
- package/dist/a2ui/extended/MPA2uiDataTable.js +2 -0
- package/dist/a2ui/extended/MPA2uiLineChart.d.ts +1 -0
- package/dist/a2ui/extended/MPA2uiLineChart.js +2 -0
- package/dist/a2ui/extended/MPA2uiPieChart.d.ts +1 -0
- package/dist/a2ui/extended/MPA2uiPieChart.js +2 -0
- package/dist/a2ui/extended/MPA2uiStatistic.d.ts +1 -0
- package/dist/a2ui/extended/MPA2uiStatistic.js +2 -0
- package/dist/a2ui/extended/api.d.ts +1436 -0
- package/dist/a2ui/extended/api.js +1 -0
- package/dist/a2ui/extended/chart.d.ts +26 -0
- package/dist/a2ui/extended/chart.js +1 -0
- package/dist/a2ui/index.d.ts +103 -0
- package/dist/a2ui/index.js +1 -0
- package/dist/a2ui/internal/children.d.ts +28 -0
- package/dist/a2ui/internal/children.js +1 -0
- package/dist/a2ui/internal/common.d.ts +113 -0
- package/dist/a2ui/internal/common.js +1 -0
- package/dist/a2ui/internal/icons.d.ts +3 -0
- package/dist/a2ui/internal/icons.js +1 -0
- package/dist/components/alert/MPAlert.d.ts +2 -2
- package/dist/components/alert/MPAlert.js +1 -1
- package/dist/components/anchor/MPAnchor.js +1 -1
- package/dist/components/animate-counter/MPAnimateCounter.js +1 -1
- package/dist/components/animate-grow/MPAnimateGrow.d.ts +1 -1
- package/dist/components/animate-slide/MPAnimateSlide.d.ts +1 -1
- package/dist/components/animate-zoom/MPAnimateZoom.d.ts +2 -2
- package/dist/components/app-logo/MPAppLogo.d.ts +16 -1
- package/dist/components/app-logo/MPAppLogo.js +1 -1
- package/dist/components/area-chart/MPAreaChart.d.ts +18 -3
- package/dist/components/area-chart/MPAreaChart.js +1 -1
- package/dist/components/aspect-ratio/MPAspectRatio.d.ts +1 -1
- package/dist/components/aspect-ratio/MPAspectRatio.js +1 -1
- package/dist/components/avatar/MPAvatar.d.ts +1 -1
- package/dist/components/bar-chart/MPBarChart.d.ts +15 -5
- package/dist/components/bar-chart/MPBarChart.js +1 -1
- package/dist/components/blockquote/MPBlockquote.d.ts +9 -1
- package/dist/components/blockquote/MPBlockquote.js +1 -1
- package/dist/components/bottom-navigation/MPBottomNavigation.js +1 -1
- package/dist/components/box/MPBox.d.ts +1 -1
- package/dist/components/breadcrumb/MPBreadcrumb.js +1 -1
- package/dist/components/button/MPButton.js +1 -1
- package/dist/components/calendar/MPCalendar.js +1 -1
- package/dist/components/carousel/MPCarousel.js +1 -1
- package/dist/components/checkbox/MPCheckbox.js +1 -1
- package/dist/components/chip/MPChip.d.ts +2 -2
- package/dist/components/chip/MPChip.js +1 -1
- package/dist/components/color-picker/MPColorPicker.js +1 -1
- package/dist/components/combobox/MPCombobox.js +1 -1
- package/dist/components/confirm/MPConfirmProvider.js +1 -1
- package/dist/components/data-table/MPDataTable.d.ts +20 -1
- package/dist/components/data-table/MPDataTable.js +1 -1
- package/dist/components/date-picker/MPDatePicker.js +1 -1
- package/dist/components/empty/MPEmpty.d.ts +1 -1
- package/dist/components/floating-action-button/MPFloatingActionButton.js +1 -1
- package/dist/components/grid/MPGrid.d.ts +25 -8
- package/dist/components/grid/MPGrid.js +1 -1
- package/dist/components/heatmap-chart/MPHeatmapChart.d.ts +12 -3
- package/dist/components/heatmap-chart/MPHeatmapChart.js +1 -1
- package/dist/components/hover-card/MPHoverCard.d.ts +1 -0
- package/dist/components/hover-card/MPHoverCard.js +1 -1
- package/dist/components/icon/MPIcon.js +1 -1
- package/dist/components/image/MPImage.d.ts +112 -4
- package/dist/components/image/MPImage.js +1 -1
- package/dist/components/image/index.d.ts +1 -1
- package/dist/components/line-chart/MPLineChart.d.ts +20 -2
- package/dist/components/line-chart/MPLineChart.js +1 -1
- package/dist/components/list/MPList.js +1 -1
- package/dist/components/menu/MPMenu.d.ts +1 -1
- package/dist/components/menubar/MPMenubar.js +1 -1
- package/dist/components/navigation-menu/MPNavigationMenu.js +1 -1
- package/dist/components/number-field/MPNumberField.js +1 -1
- package/dist/components/pie-chart/MPPieChart.d.ts +23 -1
- package/dist/components/pie-chart/MPPieChart.js +1 -1
- package/dist/components/pill/MPPill.js +1 -1
- package/dist/components/popconfirm/MPPopconfirm.d.ts +2 -2
- package/dist/components/popover/MPPopover.d.ts +1 -0
- package/dist/components/popover/MPPopover.js +1 -1
- package/dist/components/portal/MPPortal.d.ts +1 -1
- package/dist/components/radio-group/MPRadioGroup.js +1 -1
- package/dist/components/rating/MPRating.js +1 -1
- package/dist/components/scatter-chart/MPScatterChart.d.ts +5 -1
- package/dist/components/segmented-button/MPSegmentedButton.js +1 -1
- package/dist/components/select/MPSelect.js +1 -1
- package/dist/components/sparkline/MPSparkline.d.ts +14 -1
- package/dist/components/sparkline/MPSparkline.js +1 -1
- package/dist/components/statistic/MPStatistic.js +1 -1
- package/dist/components/stepper/MPStepper.js +1 -1
- package/dist/components/table/MPTable.d.ts +1 -1
- package/dist/components/tabs/MPTabs.js +1 -1
- package/dist/components/timeline/MPTimeline.js +1 -1
- package/dist/components/timeline-chart/MPTimelineChart.d.ts +6 -2
- package/dist/components/toggle/MPToggle.js +1 -1
- package/dist/components/tooltip/MPTooltip.js +1 -1
- package/dist/components/tour/MPTour.js +1 -1
- package/dist/components/transfer/MPTransfer.js +1 -1
- package/dist/components/typography/MPTypography.d.ts +1 -1
- package/dist/constants/glyphs.d.ts +32 -32
- package/dist/constants/icons.d.ts +32 -32
- package/dist/internal/Calendar.js +1 -1
- package/dist/internal/ChartChrome.d.ts +63 -19
- package/dist/internal/ChartChrome.js +1 -1
- package/dist/internal/ChartFrame.d.ts +24 -4
- package/dist/internal/ChartFrame.js +1 -1
- package/dist/internal/FieldOutline.js +1 -1
- package/dist/internal/Picker.js +1 -1
- package/dist/internal/PopupArrow.d.ts +60 -0
- package/dist/internal/PopupArrow.js +2 -0
- package/dist/internal/SupportingText.js +1 -1
- package/dist/internal/chart.d.ts +91 -13
- package/dist/internal/chart.js +1 -1
- package/dist/internal/color-scheme.d.ts +0 -9
- package/dist/internal/color-scheme.js +1 -1
- package/dist/internal/data-table.d.ts +35 -2
- package/dist/internal/data-table.js +1 -1
- package/dist/internal/date.d.ts +22 -18
- package/dist/internal/date.js +1 -1
- package/dist/internal/i18n.d.ts +14 -0
- package/dist/internal/intl.d.ts +64 -0
- package/dist/internal/intl.js +1 -0
- package/dist/internal/messages/chart.d.ts +1 -1
- package/dist/internal/messages/chart.js +1 -1
- package/dist/internal/messages/transfer.d.ts +1 -1
- package/dist/internal/messages/transfer.js +1 -1
- package/dist/internal/text.js +1 -1
- package/dist/internal/time-scale.js +1 -1
- package/dist/locales/ar.js +1 -1
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/id.js +1 -1
- package/dist/locales/it.js +1 -1
- package/dist/locales/ja.js +1 -1
- package/dist/locales/ko.js +1 -1
- package/dist/locales/nl.js +1 -1
- package/dist/locales/pl.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/th.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/locales/vi.js +1 -1
- package/dist/locales/zh-hans.js +1 -1
- package/dist/locales/zh-hant.js +1 -1
- package/dist/styles/accordion.css +1 -1
- package/dist/styles/alert.css +1 -1
- package/dist/styles/app-logo.css +1 -1
- package/dist/styles/area-chart.css +1 -1
- package/dist/styles/aspect-ratio.css +1 -1
- package/dist/styles/bar-chart.css +1 -1
- package/dist/styles/blockquote.css +1 -1
- package/dist/styles/bottom-navigation.css +1 -1
- package/dist/styles/breadcrumb.css +1 -1
- package/dist/styles/button.css +1 -1
- package/dist/styles/calendar.css +1 -1
- package/dist/styles/carousel.css +1 -1
- package/dist/styles/chat-bubble.css +1 -1
- package/dist/styles/checkbox.css +1 -1
- package/dist/styles/chip.css +1 -1
- package/dist/styles/code-block.css +1 -1
- package/dist/styles/collapsible.css +1 -1
- package/dist/styles/color-picker.css +1 -1
- package/dist/styles/combobox.css +1 -1
- package/dist/styles/confirm.css +1 -1
- package/dist/styles/data-table.css +1 -1
- package/dist/styles/date-picker.css +1 -1
- package/dist/styles/date-range-picker.css +1 -1
- package/dist/styles/date-time-picker.css +1 -1
- package/dist/styles/dialog.css +1 -1
- package/dist/styles/drawer.css +1 -1
- package/dist/styles/file-picker.css +1 -1
- package/dist/styles/flex.css +1 -1
- package/dist/styles/floating-action-button.css +1 -1
- package/dist/styles/gauge-chart.css +1 -1
- package/dist/styles/grid.css +1 -1
- package/dist/styles/heatmap-chart.css +1 -1
- package/dist/styles/icon-button.css +1 -1
- package/dist/styles/icon.css +1 -1
- package/dist/styles/image.css +1 -1
- package/dist/styles/line-chart.css +1 -1
- package/dist/styles/list.css +1 -1
- package/dist/styles/menu.css +1 -1
- package/dist/styles/menubar.css +1 -1
- package/dist/styles/navigation-menu.css +1 -1
- package/dist/styles/number-field.css +1 -1
- package/dist/styles/otp-field.css +1 -1
- package/dist/styles/pagination.css +1 -1
- package/dist/styles/pie-chart.css +1 -1
- package/dist/styles/pill.css +1 -1
- package/dist/styles/popconfirm.css +1 -1
- package/dist/styles/popover.css +1 -1
- package/dist/styles/radio-group.css +1 -1
- package/dist/styles/rating.css +1 -1
- package/dist/styles/scatter-chart.css +1 -1
- package/dist/styles/scroll-zone.css +1 -1
- package/dist/styles/segmented-button.css +1 -1
- package/dist/styles/select.css +1 -1
- package/dist/styles/sidebar.css +1 -1
- package/dist/styles/snackbar.css +1 -1
- package/dist/styles/sparkline.css +1 -1
- package/dist/styles/spoiler.css +1 -1
- package/dist/styles/statistic.css +1 -1
- package/dist/styles/stepper.css +1 -1
- package/dist/styles/switch.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/text-field.css +1 -1
- package/dist/styles/text-link.css +1 -1
- package/dist/styles/time-picker.css +1 -1
- package/dist/styles/timeline-chart.css +1 -1
- package/dist/styles/timeline.css +1 -1
- package/dist/styles/toggle.css +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/styles/tour.css +1 -1
- package/dist/styles/transfer.css +1 -1
- package/dist/styles/tree-select.css +1 -1
- package/dist/styles/tree-view.css +1 -1
- package/dist/styles.css +1 -1
- package/dist/tailwind.css +1253 -55
- package/dist/types.d.ts +210 -3
- package/package.json +47 -26
- package/.fix.py +0 -92
package/dist/types.d.ts
CHANGED
|
@@ -309,8 +309,70 @@ export interface MPTimelineSeries {
|
|
|
309
309
|
/** Overrides the palette slot this row would otherwise take. */
|
|
310
310
|
color?: MPColor | (string & {});
|
|
311
311
|
}
|
|
312
|
+
/**
|
|
313
|
+
* How the series of a stacking chart are piled up.
|
|
314
|
+
*
|
|
315
|
+
* - `false` — side by side, or overlapping. The parts are compared with each
|
|
316
|
+
* other.
|
|
317
|
+
* - `true` — on each other, so the far edge is the total. The totals are
|
|
318
|
+
* compared and the parts make them up.
|
|
319
|
+
* - `'percent'` — on each other and normalised, so every column is full. The
|
|
320
|
+
* **composition** is compared and the totals are gone from the picture.
|
|
321
|
+
*
|
|
322
|
+
* A percent stack answers "what is this made of" and refuses to answer "how
|
|
323
|
+
* much of it is there", which is the trade it makes and the reason it is a
|
|
324
|
+
* third setting rather than a flag on the second. Two columns of wildly
|
|
325
|
+
* different size are drawn identically, so the total belongs somewhere else on
|
|
326
|
+
* the page — a figure beside the chart, or a second chart.
|
|
327
|
+
*
|
|
328
|
+
* A negative has no share of a whole, so a percent stack leaves it out the way
|
|
329
|
+
* `MPPieChart` does. The table behind the chart still has the number.
|
|
330
|
+
*/
|
|
331
|
+
export type MPChartStack = boolean | 'percent';
|
|
312
332
|
/** How a line gets from one point to the next. */
|
|
313
333
|
export type MPChartCurve = 'linear' | 'smooth' | 'step';
|
|
334
|
+
/**
|
|
335
|
+
* What a line or an area does where a series has no value.
|
|
336
|
+
*
|
|
337
|
+
* - `break` — the line stops and starts again on the far side. The default,
|
|
338
|
+
* because a straight run through values nobody has is the one kind of
|
|
339
|
+
* invented data a reader never questions: it looks exactly like the rest of
|
|
340
|
+
* the line.
|
|
341
|
+
* - `connect` — the two sides are joined, and the joining run is drawn
|
|
342
|
+
* **dashed** so the picture still says which part of it was measured. An
|
|
343
|
+
* area's fill closes across the gap as well.
|
|
344
|
+
* - `zero` — the missing reading is drawn at zero, and the value axis is
|
|
345
|
+
* widened to hold it. Right where a gap really does mean "none of it
|
|
346
|
+
* happened", and wrong where it means "nobody was counting".
|
|
347
|
+
*
|
|
348
|
+
* Only the drawing changes. The hover panel and the table behind the chart
|
|
349
|
+
* still report a gap as a gap, whichever of the three is chosen, because they
|
|
350
|
+
* are the copy of the data a reader gets when they need the number itself.
|
|
351
|
+
*/
|
|
352
|
+
export type MPChartGaps = 'break' | 'connect' | 'zero';
|
|
353
|
+
/**
|
|
354
|
+
* What an axis does with a tick label too wide for the room it has.
|
|
355
|
+
*
|
|
356
|
+
* - `auto` — leaves the labels flat while they fit and turns them when they do
|
|
357
|
+
* not. The default, because flat labels are what a reader takes in fastest
|
|
358
|
+
* and a name cut to "Onbo…" has lost the thing it was there to say.
|
|
359
|
+
* - `truncate` — cuts a long label with an ellipsis and never turns anything.
|
|
360
|
+
* - `rotate` — turns every label 45°.
|
|
361
|
+
* - `vertical` — stands every label on end.
|
|
362
|
+
*
|
|
363
|
+
* The last two turn **all** of the labels rather than only the long ones: a row
|
|
364
|
+
* at two different angles is a row a reader has to scan twice.
|
|
365
|
+
*
|
|
366
|
+
* Only the axis along the **bottom** reads it. Labels stacked up the side
|
|
367
|
+
* already have a row each, which is the room a turn would be buying them.
|
|
368
|
+
*
|
|
369
|
+
* And `auto` turns names rather than ticks. A value axis is a ruler, so showing
|
|
370
|
+
* every nth of its labels loses nothing a reader cannot interpolate; where the
|
|
371
|
+
* bottom of a chart is one — a bar chart on its side, a scatter — `auto` leaves
|
|
372
|
+
* it striding. `rotate` and `vertical` still apply there when they are asked
|
|
373
|
+
* for by name.
|
|
374
|
+
*/
|
|
375
|
+
export type MPChartTickLabels = 'auto' | 'truncate' | 'rotate' | 'vertical';
|
|
314
376
|
/**
|
|
315
377
|
* Which values are written onto the marks themselves.
|
|
316
378
|
*
|
|
@@ -320,6 +382,20 @@ export type MPChartCurve = 'linear' | 'smooth' | 'step';
|
|
|
320
382
|
* `all` is there for the eight-bar chart where it genuinely is the answer.
|
|
321
383
|
*/
|
|
322
384
|
export type MPChartValueLabels = 'none' | 'last' | 'extremes' | 'all';
|
|
385
|
+
/**
|
|
386
|
+
* What ink a chart writes the text naming a series in.
|
|
387
|
+
*
|
|
388
|
+
* `'ink'` is `on-surface-variant` — one colour for every name, whichever mark
|
|
389
|
+
* it belongs to. `'series'` matches the name to its mark, which pairs a long
|
|
390
|
+
* legend with a crowded plot faster than a swatch alone can.
|
|
391
|
+
*
|
|
392
|
+
* The trade is contrast. The eight palette slots are fitted to 3:1 against the
|
|
393
|
+
* surface, which is the bar a **mark** has to clear; small text is held to
|
|
394
|
+
* 4.5:1, and a series colour does not reach it. So the swatch carries the
|
|
395
|
+
* colour by default and the word stays legible, and this is the caller saying
|
|
396
|
+
* their chart is better off the other way round.
|
|
397
|
+
*/
|
|
398
|
+
export type MPChartLabelColor = 'ink' | 'series';
|
|
323
399
|
/**
|
|
324
400
|
* What the pointer uncovers.
|
|
325
401
|
*
|
|
@@ -348,13 +424,42 @@ export interface MPChartTooltipItem {
|
|
|
348
424
|
export interface MPChartTooltipContext {
|
|
349
425
|
index: number;
|
|
350
426
|
category: MPChartCategory;
|
|
351
|
-
/** Only the series that are visible and have a value here. */
|
|
427
|
+
/** Only the series that are visible and have a value here, in `sort`'s order. */
|
|
352
428
|
items: readonly MPChartTooltipItem[];
|
|
429
|
+
/** What they add up to, where the chart is a picture of that sum. */
|
|
430
|
+
total?: string;
|
|
353
431
|
}
|
|
432
|
+
/**
|
|
433
|
+
* What order the rows of a hover panel come in.
|
|
434
|
+
*
|
|
435
|
+
* - `series` — the order they were passed, which is the order the legend lists
|
|
436
|
+
* them in and the order the colours were handed out in. A reader who has
|
|
437
|
+
* learned the legend can find a row without reading it.
|
|
438
|
+
* - `value` — largest first. What a chart of eight series wants: the row a
|
|
439
|
+
* reader is looking for is usually the big one, and hunting for it down a
|
|
440
|
+
* list in a fixed order is the work the panel exists to save.
|
|
441
|
+
*
|
|
442
|
+
* Neither is right for every chart, which is why there is a prop. Ties keep
|
|
443
|
+
* their series order, so a panel never reorders itself over nothing.
|
|
444
|
+
*/
|
|
445
|
+
export type MPChartTooltipSort = 'series' | 'value';
|
|
354
446
|
/** The hover layer, where `true` and `false` are not enough. */
|
|
355
447
|
export interface MPChartTooltip {
|
|
356
448
|
/** @default 'index', or 'item' where the marks are not arranged in columns */
|
|
357
449
|
mode?: MPChartTooltipMode;
|
|
450
|
+
/** @default 'series' */
|
|
451
|
+
sort?: MPChartTooltipSort;
|
|
452
|
+
/**
|
|
453
|
+
* Adds a row for what the column adds up to.
|
|
454
|
+
*
|
|
455
|
+
* On by default where the chart **is** that total — a stack, whose whole
|
|
456
|
+
* point is the height of the column — and off everywhere else. A percent
|
|
457
|
+
* stack is left out of that: its total is 100% at every category, and a row
|
|
458
|
+
* that says the same thing four times is a row nobody reads. An unstacked
|
|
459
|
+
* chart is off because its series are not parts of anything, and adding them
|
|
460
|
+
* up would be the panel inventing a quantity.
|
|
461
|
+
*/
|
|
462
|
+
total?: boolean;
|
|
358
463
|
/**
|
|
359
464
|
* The line dropped through the plot at the active category. On in `index`
|
|
360
465
|
* mode and never drawn in `item` mode: a crosshair says "these numbers all
|
|
@@ -402,12 +507,114 @@ export interface MPChartAxis {
|
|
|
402
507
|
tickCount?: number;
|
|
403
508
|
/** How a tick is written, overriding the chart's own `format`. */
|
|
404
509
|
tickFormat?: (value: MPChartCategory, index: number) => React.ReactNode;
|
|
510
|
+
/**
|
|
511
|
+
* What to do with a label too wide for the room it has: cut it, or turn it.
|
|
512
|
+
*
|
|
513
|
+
* Read by the axis along the **bottom** only — the category axis on an
|
|
514
|
+
* upright chart, and the value axis on one turned on its side. Labels down
|
|
515
|
+
* the left already have a row each.
|
|
516
|
+
* @default 'auto'
|
|
517
|
+
*/
|
|
518
|
+
tickLabels?: MPChartTickLabels;
|
|
405
519
|
/**
|
|
406
520
|
* How much room it keeps for its ticks and its label, in pixels. Measured off
|
|
407
521
|
* the ticks themselves otherwise. Set it when a long category name needs
|
|
408
522
|
* more, or when two charts stacked on a dashboard have to line their plots up.
|
|
409
523
|
*/
|
|
410
524
|
thickness?: number;
|
|
525
|
+
/**
|
|
526
|
+
* Lines and bands drawn across the plot at places on **this** axis' scale — a
|
|
527
|
+
* target, a threshold, the range a reading should stay inside.
|
|
528
|
+
*
|
|
529
|
+
* The scale is widened to hold them, because a target the plot is cropped
|
|
530
|
+
* above is a target nobody can see. Pin `min` or `max` to stop that.
|
|
531
|
+
*
|
|
532
|
+
* Read by an axis that has a scale: the value axis always, and the category
|
|
533
|
+
* axis where it runs on numbers rather than on names. A row of categories has
|
|
534
|
+
* no place between two of them for a line to be at.
|
|
535
|
+
*/
|
|
536
|
+
references?: readonly MPChartReference[];
|
|
537
|
+
}
|
|
538
|
+
/**
|
|
539
|
+
* A line drawn across the plot at a place on one of its scales, or a band where
|
|
540
|
+
* it has two ends.
|
|
541
|
+
*
|
|
542
|
+
* A target, a service level, the day a release went out, the range a reading is
|
|
543
|
+
* meant to stay inside. It is **not** data: it is a fact the reader brought
|
|
544
|
+
* with them, so it is drawn in the chrome's ink rather than out of the series
|
|
545
|
+
* palette, and a chart is never asked to invent one.
|
|
546
|
+
*
|
|
547
|
+
* The axis it is given to is the scale its `value` is on, which is also the
|
|
548
|
+
* axis it is drawn perpendicular to — a reference on the value axis of an
|
|
549
|
+
* upright chart is a horizontal line, and the same reference on a chart turned
|
|
550
|
+
* on its side is a vertical one.
|
|
551
|
+
*/
|
|
552
|
+
export interface MPChartReference {
|
|
553
|
+
/**
|
|
554
|
+
* Where it sits, on that axis' own scale. A `Date` on an axis of dates, which
|
|
555
|
+
* is the one place a reference is most often asked for — today, a release, a
|
|
556
|
+
* deadline.
|
|
557
|
+
*/
|
|
558
|
+
value: number | Date;
|
|
559
|
+
/**
|
|
560
|
+
* And where it ends, which makes it a **band** rather than a line: the range
|
|
561
|
+
* a reading should stay inside, the window something was down for.
|
|
562
|
+
*/
|
|
563
|
+
to?: number | Date;
|
|
564
|
+
/**
|
|
565
|
+
* What it is called, written at its own end of the line and read out with the
|
|
566
|
+
* chart. A line nobody can name is a line nobody can use.
|
|
567
|
+
*/
|
|
568
|
+
label?: React.ReactNode;
|
|
569
|
+
/**
|
|
570
|
+
* Which family it wears. An `MPColor`, or any CSS colour.
|
|
571
|
+
*
|
|
572
|
+
* The outline role by default, which is what keeps a reference reading as
|
|
573
|
+
* chrome rather than as another series. `error` is the one worth reaching
|
|
574
|
+
* for: a threshold somebody is watching is exactly what that role is for.
|
|
575
|
+
*/
|
|
576
|
+
color?: MPColor | (string & {});
|
|
577
|
+
/**
|
|
578
|
+
* Draws it dashed, so it cannot be mistaken for a gridline or a baseline.
|
|
579
|
+
* @default true
|
|
580
|
+
*/
|
|
581
|
+
dashed?: boolean;
|
|
582
|
+
}
|
|
583
|
+
/**
|
|
584
|
+
* Dragging a range out of a long category axis.
|
|
585
|
+
*
|
|
586
|
+
* What it is for is the chart with ninety points on it, where the shape of one
|
|
587
|
+
* week is inside a picture of a quarter. A reader drags across the plot, the
|
|
588
|
+
* chart redraws to what they picked, and the scale re-fits to it — so the
|
|
589
|
+
* window is a *chart of that range* rather than a magnified picture of the
|
|
590
|
+
* whole one.
|
|
591
|
+
*
|
|
592
|
+
* Everything follows the window: the value scale, the hover panel, the spoken
|
|
593
|
+
* readout and the table behind the picture. The table is what a reader who
|
|
594
|
+
* cannot see the plot is given **instead** of it, so a table still listing
|
|
595
|
+
* ninety points would be describing a chart that is not on the page.
|
|
596
|
+
*
|
|
597
|
+
* Only a chart whose categories are a row of slots takes it. A scatter has two
|
|
598
|
+
* value axes and no row to cut, and a pie has no axis at all.
|
|
599
|
+
*/
|
|
600
|
+
export interface MPChartZoom {
|
|
601
|
+
/**
|
|
602
|
+
* The range drawn, as a first and last **category index**, or `null` for all
|
|
603
|
+
* of them. Use with `onRangeChange` for a controlled window.
|
|
604
|
+
*/
|
|
605
|
+
range?: readonly [number, number] | null;
|
|
606
|
+
/** Where the window starts out. Ignored once `range` is given. */
|
|
607
|
+
defaultRange?: readonly [number, number] | null;
|
|
608
|
+
/** Called with what the reader dragged, and with `null` when they reset it. */
|
|
609
|
+
onRangeChange?: (range: readonly [number, number] | null) => void;
|
|
610
|
+
/**
|
|
611
|
+
* The fewest categories a drag may leave.
|
|
612
|
+
*
|
|
613
|
+
* Two, because a window of one category is not a chart of anything — there is
|
|
614
|
+
* no distance left in it for a line to have travelled.
|
|
615
|
+
* @default 2
|
|
616
|
+
*/
|
|
617
|
+
min?: number;
|
|
411
618
|
}
|
|
412
619
|
/** Where the legend sits, and what it does when it is used. */
|
|
413
620
|
export interface MPChartLegend {
|
|
@@ -590,8 +797,8 @@ export interface MPStyleProps {
|
|
|
590
797
|
export interface MPControlEventProps<Element extends HTMLElement = HTMLElement> {
|
|
591
798
|
/**
|
|
592
799
|
* Every keystroke that reaches the control, modifiers included — which makes
|
|
593
|
-
* this the one to reach for
|
|
594
|
-
* these where `preventDefault` still means anything.
|
|
800
|
+
* this the one to reach for when a combination matters. It is also the only
|
|
801
|
+
* one of these where `preventDefault` still means anything.
|
|
595
802
|
*/
|
|
596
803
|
onKeyDown?: React.KeyboardEventHandler<Element>;
|
|
597
804
|
/** The same keystroke released. */
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "material-plus-ui",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "A React component library
|
|
3
|
+
"version": "1.9.0",
|
|
4
|
+
"description": "A React component library written from the Material Design 3 specification and extended past it — wider versions of the components it names, and the charts, data table and command palette it does not. Built on Base UI and Tailwind CSS v4, themed with CSS custom properties so it coexists with an existing Material setup. ESM only, types included.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"**/*.css"
|
|
8
8
|
],
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
10
|
-
"author": "CDGet
|
|
10
|
+
"author": "CDGet (https://cdget.com)",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"homepage": "https://material-plus.cdget.com",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/jooy2/material-plus.git"
|
|
15
|
+
"url": "git+https://github.com/jooy2/material-plus-ui.git"
|
|
16
16
|
},
|
|
17
17
|
"bugs": {
|
|
18
|
-
"url": "https://github.com/jooy2/material-plus/issues"
|
|
18
|
+
"url": "https://github.com/jooy2/material-plus-ui/issues"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"build": "npm run format:fix && node scripts/clean-dist.mjs && tsc --project tsconfig.prod.json && node scripts/specify-imports.mjs && node scripts/annotate-pure.mjs && npm run minify && node scripts/mark-client.mjs && node scripts/build-styles.mjs && node scripts/build-split-styles.mjs && node scripts/measure-bundle.mjs",
|
|
21
|
+
"build": "npm run format:fix && node scripts/clean-dist.mjs && tsc --project tsconfig.prod.json && node scripts/specify-imports.mjs && node scripts/annotate-pure.mjs && npm run minify && node scripts/mark-client.mjs && node scripts/build-styles.mjs && node scripts/build-split-styles.mjs && node scripts/build-a2ui-catalog.mjs && node scripts/measure-bundle.mjs",
|
|
22
22
|
"lint": "eslint . --ext .js,.ts .",
|
|
23
23
|
"lint:fix": "eslint . --ext .js,.ts --fix .",
|
|
24
24
|
"minify": "terser-glob 'dist/**/*.js' --config-file terser.config.json",
|
|
@@ -59,6 +59,11 @@
|
|
|
59
59
|
"module": "./dist/hooks/index.js",
|
|
60
60
|
"default": "./dist/hooks/index.js"
|
|
61
61
|
},
|
|
62
|
+
"./a2ui": {
|
|
63
|
+
"types": "./dist/a2ui/index.d.ts",
|
|
64
|
+
"module": "./dist/a2ui/index.js",
|
|
65
|
+
"default": "./dist/a2ui/index.js"
|
|
66
|
+
},
|
|
62
67
|
"./components/*": {
|
|
63
68
|
"types": "./dist/components/*/index.d.ts",
|
|
64
69
|
"module": "./dist/components/*/index.js",
|
|
@@ -124,53 +129,69 @@
|
|
|
124
129
|
"composition"
|
|
125
130
|
],
|
|
126
131
|
"devDependencies": {
|
|
127
|
-
"@
|
|
132
|
+
"@a2ui/react": "^0.11.1",
|
|
133
|
+
"@a2ui/web_core": "^0.11.0",
|
|
134
|
+
"@base-ui/react": "^1.8.0",
|
|
128
135
|
"@eslint/js": "^9.39.1",
|
|
129
136
|
"@tailwindcss/postcss": "^4.3.3",
|
|
130
|
-
"@types/node": "^26.
|
|
131
|
-
"@types/react": "^19.
|
|
132
|
-
"@types/react-dom": "^19.
|
|
133
|
-
"@typescript-eslint/parser": "^8.
|
|
137
|
+
"@types/node": "^26.6.1",
|
|
138
|
+
"@types/react": "^19.3.0",
|
|
139
|
+
"@types/react-dom": "^19.3.0",
|
|
140
|
+
"@typescript-eslint/parser": "^8.70.0",
|
|
134
141
|
"@vitejs/plugin-react": "^6.1.1",
|
|
135
|
-
"@vitest/browser": "^
|
|
136
|
-
"@vitest/browser-playwright": "^
|
|
142
|
+
"@vitest/browser": "^5.0.1",
|
|
143
|
+
"@vitest/browser-playwright": "^5.0.1",
|
|
137
144
|
"esbuild": "^0.28.2",
|
|
138
145
|
"eslint": "^9.39.1",
|
|
139
146
|
"eslint-config-prettier": "^10.1.8",
|
|
140
147
|
"eslint-plugin-n": "^18.3.0",
|
|
141
|
-
"globals": "^17.
|
|
148
|
+
"globals": "^17.12.0",
|
|
142
149
|
"jiti": "^2.7.0",
|
|
143
|
-
"playwright": "^1.
|
|
144
|
-
"postcss": "^8.5.
|
|
145
|
-
"prettier": "^3.9.
|
|
150
|
+
"playwright": "^1.63.0",
|
|
151
|
+
"postcss": "^8.5.28",
|
|
152
|
+
"prettier": "^3.9.7",
|
|
146
153
|
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
147
|
-
"react": "^19.
|
|
148
|
-
"react-dom": "^19.
|
|
154
|
+
"react": "^19.3.0",
|
|
155
|
+
"react-dom": "^19.3.0",
|
|
149
156
|
"tailwindcss": "^4.3.3",
|
|
150
157
|
"terser-glob": "^1.2.1",
|
|
151
158
|
"tsx": "^4.23.13",
|
|
152
159
|
"typescript": "^6.0.3",
|
|
153
|
-
"typescript-eslint": "^8.
|
|
154
|
-
"vite": "^8.
|
|
160
|
+
"typescript-eslint": "^8.70.0",
|
|
161
|
+
"vite": "^8.3.0",
|
|
155
162
|
"vitepress": "^1.6.4",
|
|
156
163
|
"vitepress-i18n": "^1.4.0",
|
|
157
|
-
"vitepress-sidebar": "^1.
|
|
158
|
-
"vitest": "^
|
|
159
|
-
"vitest-browser-react": "^2.
|
|
164
|
+
"vitepress-sidebar": "^1.40.0",
|
|
165
|
+
"vitest": "^5.0.1",
|
|
166
|
+
"vitest-browser-react": "^2.3.0",
|
|
167
|
+
"zod": "^3.25.76",
|
|
168
|
+
"zod-to-json-schema": "^3.25.2"
|
|
160
169
|
},
|
|
161
170
|
"dependencies": {
|
|
162
171
|
"highlight.js": "^11.12.0",
|
|
163
|
-
"lucide-react": "^1.
|
|
172
|
+
"lucide-react": "^1.47.0"
|
|
164
173
|
},
|
|
165
174
|
"peerDependencies": {
|
|
175
|
+
"@a2ui/react": "^0.11.0",
|
|
176
|
+
"@a2ui/web_core": "^0.11.0",
|
|
166
177
|
"@base-ui/react": "^1.7.0",
|
|
167
178
|
"@types/react": "^18.0.0 || ^19.0.0",
|
|
168
179
|
"react": "^18.0.0 || ^19.0.0",
|
|
169
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
180
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
181
|
+
"zod": "^3.25.76"
|
|
170
182
|
},
|
|
171
183
|
"peerDependenciesMeta": {
|
|
184
|
+
"@a2ui/react": {
|
|
185
|
+
"optional": true
|
|
186
|
+
},
|
|
187
|
+
"@a2ui/web_core": {
|
|
188
|
+
"optional": true
|
|
189
|
+
},
|
|
172
190
|
"@types/react": {
|
|
173
191
|
"optional": true
|
|
192
|
+
},
|
|
193
|
+
"zod": {
|
|
194
|
+
"optional": true
|
|
174
195
|
}
|
|
175
196
|
}
|
|
176
197
|
}
|
package/.fix.py
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import pathlib, sys
|
|
2
|
-
def rep(path, old, new):
|
|
3
|
-
p = pathlib.Path(path); s = p.read_text(encoding='utf-8')
|
|
4
|
-
if s.count(old) != 1: print(f'FAIL {path}: {s.count(old)}'); sys.exit(1)
|
|
5
|
-
p.write_text(s.replace(old, new, 1), encoding='utf-8'); print('ok ', path)
|
|
6
|
-
|
|
7
|
-
EN_OLD = """Yours is appended to the component's own, and nothing is removed to make room for it. So **two utilities setting the same property are resolved by the stylesheet rather than by which of them you wrote.**
|
|
8
|
-
|
|
9
|
-
Which one that is depends on how the styles were wired up. On the precompiled path it is whichever sheet the application imported second. On the Tailwind path both are generated in one pass, and Tailwind's own ordering decides — which is per property, and not something to work out at the call site:
|
|
10
|
-
|
|
11
|
-
| You pass | The component sets | Which one wins |
|
|
12
|
-
| ------------ | --------------------- | -------------- |
|
|
13
|
-
| `p-8` | `px-6` | the component |
|
|
14
|
-
| `rounded-lg` | `rounded-mp-full` | the component |
|
|
15
|
-
| `shadow-lg` | `shadow-mp-1` | the component |
|
|
16
|
-
| `text-lg` | `text-mp-label-large` | yours |
|
|
17
|
-
| `bg-red-500` | `bg-mp-primary` | yours |
|
|
18
|
-
| `h-20` | `h-14` | yours |
|
|
19
|
-
|
|
20
|
-
Read the column, not the rows: the answers are what one version of Tailwind happens to emit, and the point is that there is no rule connecting them. `className` is the right tool for what a component does **not** already set — margin, width, grid placement, position, an animation — and the wrong one for taking something over."""
|
|
21
|
-
|
|
22
|
-
EN_NEW = """Yours is appended to the component's own, and nothing is removed to make room for it. Two classes setting the same property both end up on the element, at equal specificity, and **the one that wins is the one the stylesheet happens to put last** — not the one you wrote.
|
|
23
|
-
|
|
24
|
-
A class for something the component does not already set always works. That is most of what a class is for, and there is nothing more to know about it:
|
|
25
|
-
|
|
26
|
-
```tsx
|
|
27
|
-
<MPButton className="mt-4 w-full">Save</MPButton>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
Past that it depends on the pair. On the precompiled path it depends on which sheet the application imported second; on the Tailwind path both are generated in one pass and Tailwind's own ordering decides. Measured against this repository's own stylesheet, on an `MPButton` at the default size:
|
|
31
|
-
|
|
32
|
-
| You pass | It sets | Result |
|
|
33
|
-
| ---------------------------- | ------------------------ | ------- |
|
|
34
|
-
| `px-8` | `px-6` | applies |
|
|
35
|
-
| `px-2` | `px-6` | ignored |
|
|
36
|
-
| `h-20` | `h-14` | applies |
|
|
37
|
-
| `h-8` | `h-14` | ignored |
|
|
38
|
-
| `text-lg`, `text-xs` | `text-mp-title-medium` | applies |
|
|
39
|
-
| `bg-red-500` | `bg-(--_mp-accent)` | applies |
|
|
40
|
-
| `rounded-lg` | `rounded-mp-full` | ignored |
|
|
41
|
-
| `shadow-lg` | `shadow-mp-1` | ignored |
|
|
42
|
-
| `p-8` | `px-6` | ignored |
|
|
43
|
-
| any of the above with a `!` | — | applies |
|
|
44
|
-
|
|
45
|
-
The first four rows are the ones worth staring at. `px-8` works and `px-2` does not, on the same component and the same property, because Tailwind emits a scale in scale order and the larger step is therefore later — so *making a control bigger tends to work and making it smaller tends not to*. The rest is which of two theme keys Tailwind happened to sort first: the library's `--text-mp-*` land before Tailwind's own, so any `text-*` you pass wins, while `--radius-mp-*` and `--shadow-mp-*` land after, so `rounded-*` and `shadow-*` do not.
|
|
46
|
-
|
|
47
|
-
None of that is a promise. It is what one version of Tailwind emits, it is per pair rather than per property, and it can move under you when either side adds a token. Treat `className` as the tool for what the component leaves alone."""
|
|
48
|
-
|
|
49
|
-
KO_OLD = """넘긴 클래스는 컴포넌트 자신의 클래스 뒤에 붙고, 자리를 내주기 위해 지워지는 것은 없습니다. 그래서 **같은 속성을 지정하는 두 유틸리티는 어느 쪽을 썼는지가 아니라 스타일시트가 결정합니다.**
|
|
50
|
-
|
|
51
|
-
어느 쪽이 되는지는 스타일을 어떻게 연결했는지에 달려 있습니다. 컴파일된 시트를 쓰는 경우에는 애플리케이션이 나중에 import한 시트가 이깁니다. Tailwind를 쓰는 경우에는 둘이 한 번의 패스에서 생성되고 Tailwind 자신의 정렬이 결정하는데, 그 정렬은 속성마다 다르고 호출부에서 따져볼 만한 것이 아닙니다.
|
|
52
|
-
|
|
53
|
-
| 넘긴 것 | 컴포넌트가 지정한 것 | 이기는 쪽 |
|
|
54
|
-
| --- | --- | --- |
|
|
55
|
-
| `p-8` | `px-6` | 컴포넌트 |
|
|
56
|
-
| `rounded-lg` | `rounded-mp-full` | 컴포넌트 |
|
|
57
|
-
| `shadow-lg` | `shadow-mp-1` | 컴포넌트 |
|
|
58
|
-
| `text-lg` | `text-mp-label-large` | 넘긴 쪽 |
|
|
59
|
-
| `bg-red-500` | `bg-mp-primary` | 넘긴 쪽 |
|
|
60
|
-
| `h-20` | `h-14` | 넘긴 쪽 |
|
|
61
|
-
|
|
62
|
-
행이 아니라 열을 보세요. 이 답들은 어떤 한 버전의 Tailwind가 그렇게 내놓은 것일 뿐이고, 요점은 이들을 이어 주는 규칙이 없다는 것입니다. `className`은 컴포넌트가 **지정하지 않은** 것 — 마진, 너비, 그리드 배치, 위치, 애니메이션 — 에 쓰는 도구이고, 이미 지정된 것을 가져오는 데 쓰는 도구가 아닙니다."""
|
|
63
|
-
|
|
64
|
-
KO_NEW = """넘긴 클래스는 컴포넌트 자신의 클래스 뒤에 붙고, 자리를 내주기 위해 지워지는 것은 없습니다. 같은 속성을 지정하는 두 클래스가 같은 명시도로 엘리먼트에 함께 올라가고, **이기는 쪽은 스타일시트가 뒤에 놓은 쪽입니다.** 어느 쪽을 썼는지가 아닙니다.
|
|
65
|
-
|
|
66
|
-
컴포넌트가 지정하지 않은 것에 대한 클래스는 언제나 적용됩니다. 클래스로 하려는 일의 대부분이 이것이고, 여기에 더 알아야 할 것은 없습니다.
|
|
67
|
-
|
|
68
|
-
```tsx
|
|
69
|
-
<MPButton className="mt-4 w-full">저장</MPButton>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
그 너머는 짝에 따라 다릅니다. 컴파일된 시트를 쓰는 경우에는 애플리케이션이 나중에 import한 시트가 이기고, Tailwind를 쓰는 경우에는 둘이 한 번의 패스에서 생성되어 Tailwind 자신의 정렬이 결정합니다. 이 저장소의 시트로, 기본 크기의 `MPButton`에 대고 실제로 측정한 결과입니다.
|
|
73
|
-
|
|
74
|
-
| 넘긴 것 | 컴포넌트가 지정한 것 | 결과 |
|
|
75
|
-
| --- | --- | --- |
|
|
76
|
-
| `px-8` | `px-6` | 적용됨 |
|
|
77
|
-
| `px-2` | `px-6` | 무시됨 |
|
|
78
|
-
| `h-20` | `h-14` | 적용됨 |
|
|
79
|
-
| `h-8` | `h-14` | 무시됨 |
|
|
80
|
-
| `text-lg`, `text-xs` | `text-mp-title-medium` | 적용됨 |
|
|
81
|
-
| `bg-red-500` | `bg-(--_mp-accent)` | 적용됨 |
|
|
82
|
-
| `rounded-lg` | `rounded-mp-full` | 무시됨 |
|
|
83
|
-
| `shadow-lg` | `shadow-mp-1` | 무시됨 |
|
|
84
|
-
| `p-8` | `px-6` | 무시됨 |
|
|
85
|
-
| 위의 어느 것이든 `!`를 붙이면 | — | 적용됨 |
|
|
86
|
-
|
|
87
|
-
들여다볼 만한 것은 처음 네 줄입니다. 같은 컴포넌트, 같은 속성인데 `px-8`은 되고 `px-2`는 안 됩니다. Tailwind가 스케일을 스케일 순서로 내놓기 때문에 더 큰 단계가 더 뒤에 오고, 그래서 *컨트롤을 키우는 쪽은 대체로 되고 줄이는 쪽은 대체로 안 됩니다*. 나머지는 두 테마 키 중 어느 쪽을 Tailwind가 먼저 정렬했는가의 문제입니다. 이 라이브러리의 `--text-mp-*`는 Tailwind 자신의 것보다 앞에 놓이므로 넘긴 `text-*`가 이기고, `--radius-mp-*`와 `--shadow-mp-*`는 뒤에 놓이므로 `rounded-*`와 `shadow-*`는 지지 않고 집니다.
|
|
88
|
-
|
|
89
|
-
이 중 무엇도 약속이 아닙니다. 어떤 한 버전의 Tailwind가 내놓은 결과이고, 속성 단위가 아니라 짝 단위이며, 양쪽 중 어느 한쪽이 토큰을 추가하면 발밑에서 움직일 수 있습니다. `className`은 컴포넌트가 건드리지 않는 것에 쓰는 도구로 두세요."""
|
|
90
|
-
|
|
91
|
-
rep('docs/en/guide/getting-started.md', EN_OLD, EN_NEW)
|
|
92
|
-
rep('docs/ko/guide/getting-started.md', KO_OLD, KO_NEW)
|