@wonderflow/react-components 3.0.0-next.1 → 3.0.0-next.10
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/avatar/avatar.d.ts +3 -3
- package/avatar/avatar.js +4 -7
- package/avatar/avatar.module.css +1 -31
- package/button/button.d.ts +4 -4
- package/button/button.js +8 -12
- package/button/button.module.css +1 -151
- package/card/card.d.ts +1 -1
- package/card/card.js +4 -7
- package/card/card.module.css +1 -51
- package/chip/chip.d.ts +10 -3
- package/chip/chip.js +4 -6
- package/chip/chip.module.css +1 -60
- package/circular-progress/circular-progress.d.ts +3 -3
- package/circular-progress/circular-progress.js +4 -3
- package/circular-progress/circular-progress.module.css +1 -55
- package/clamp-text/clamp-text.d.ts +1 -1
- package/clamp-text/clamp-text.js +4 -4
- package/clamp-text/clamp-text.module.css +1 -7
- package/container/container.js +4 -4
- package/container/container.module.css +1 -35
- package/core/basic.css +1 -49
- package/core/elevations.css +1 -56
- package/core/typography.css +1 -122
- package/core/{media.css → utils/media.css} +0 -0
- package/core/{vibrancy.css → utils/vibrancy.css} +0 -0
- package/core.css +1 -1
- package/disclosure/disclosure.d.ts +3 -3
- package/disclosure/disclosure.js +5 -8
- package/disclosure/disclosure.module.css +1 -93
- package/dropdown/dropdown-item.d.ts +1 -1
- package/dropdown/dropdown-item.js +8 -9
- package/dropdown/dropdown-item.module.css +1 -63
- package/dropdown/dropdown-menu.d.ts +4 -4
- package/dropdown/dropdown-menu.js +8 -6
- package/dropdown/dropdown-menu.module.css +1 -13
- package/dropdown/dropdown.d.ts +9 -19
- package/dropdown/dropdown.js +17 -17
- package/dropdown/dropdown.module.css +1 -9
- package/elevator/elevator.d.ts +2 -2
- package/elevator/elevator.js +6 -5
- package/grid/grid-item.d.ts +6 -2
- package/grid/grid-item.js +6 -4
- package/grid/grid.d.ts +6 -22
- package/grid/grid.js +5 -4
- package/grid/grid.module.css +1 -29
- package/grid/index.d.ts +1 -1
- package/grid/index.js +1 -1
- package/icon/icon.d.ts +3 -3
- package/icon/icon.js +4 -4
- package/icon-button/icon-button.d.ts +1 -1
- package/icon-button/icon-button.js +3 -3
- package/icon-button/icon-button.module.css +1 -22
- package/icons/all.svg +15 -7
- package/icons/structure.json +2 -0
- package/icons/svgs/16/arrow-down-16.svg +3 -0
- package/icons/svgs/16/arrow-down-left-16.svg +3 -0
- package/icons/svgs/16/arrow-down-right-16.svg +3 -0
- package/icons/svgs/16/arrow-down-to-bracket-16.svg +3 -0
- package/icons/svgs/16/arrow-left-16.svg +3 -0
- package/icons/svgs/16/arrow-right-16.svg +3 -0
- package/icons/svgs/16/arrow-rotate-right-16.svg +3 -0
- package/icons/svgs/16/arrow-trend-down-16.svg +3 -0
- package/icons/svgs/16/arrow-trend-up-16.svg +3 -0
- package/icons/svgs/16/arrow-up-16.svg +3 -0
- package/icons/svgs/16/arrow-up-left-16.svg +3 -0
- package/icons/svgs/16/arrow-up-right-16.svg +3 -0
- package/icons/svgs/16/backward-step-16.svg +3 -0
- package/icons/svgs/16/ban-16.svg +3 -0
- package/icons/svgs/16/bars-16.svg +3 -0
- package/icons/svgs/16/bars-sort-down-16.svg +3 -0
- package/icons/svgs/16/bars-sort-up-16.svg +3 -0
- package/icons/svgs/16/bell-16.svg +3 -0
- package/icons/svgs/16/bookmark-16.svg +3 -0
- package/icons/svgs/16/calendar-16.svg +3 -0
- package/icons/svgs/16/calendar-plus-16.svg +3 -0
- package/icons/svgs/16/cart-shopping-16.svg +3 -0
- package/icons/svgs/16/check-16.svg +3 -0
- package/icons/svgs/16/chevron-down-16.svg +3 -0
- package/icons/svgs/16/chevron-left-16.svg +3 -0
- package/icons/svgs/16/chevron-right-16.svg +3 -0
- package/icons/svgs/16/chevron-up-16.svg +3 -0
- package/icons/svgs/16/circle-16.svg +3 -0
- package/icons/svgs/16/circle-check-16.svg +3 -0
- package/icons/svgs/16/circle-exclamation-16.svg +3 -0
- package/icons/svgs/16/circle-info-16.svg +3 -0
- package/icons/svgs/16/circle-question-16.svg +3 -0
- package/icons/svgs/16/circle-x-16.svg +3 -0
- package/icons/svgs/16/clock-rotate-left-16.svg +3 -0
- package/icons/svgs/16/code-16.svg +3 -0
- package/icons/svgs/16/comment-16.svg +3 -0
- package/icons/svgs/16/compass-16.svg +3 -0
- package/icons/svgs/16/crown-16.svg +3 -0
- package/icons/svgs/16/earth-europa-16.svg +3 -0
- package/icons/svgs/16/envelope-16.svg +3 -0
- package/icons/svgs/16/eye-16.svg +3 -0
- package/icons/svgs/16/eye-slash-16.svg +10 -0
- package/icons/svgs/16/facebook-16.svg +3 -0
- package/icons/svgs/16/file-16.svg +3 -0
- package/icons/svgs/16/file-alt-16.svg +3 -0
- package/icons/svgs/16/file-image-16.svg +3 -0
- package/icons/svgs/16/file-pdf-16.svg +3 -0
- package/icons/svgs/16/file-xmark-16.svg +3 -0
- package/icons/svgs/16/filter-16.svg +3 -0
- package/icons/svgs/16/forward-step-16.svg +3 -0
- package/icons/svgs/16/frown-16.svg +3 -0
- package/icons/svgs/16/gear-16.svg +3 -0
- package/icons/svgs/16/github-16.svg +3 -0
- package/icons/svgs/16/graduation-cap-16.svg +10 -0
- package/icons/svgs/16/grid-2-16.svg +3 -0
- package/icons/svgs/16/grip-vertical-16.svg +3 -0
- package/icons/svgs/16/hand-pointer-16.svg +3 -0
- package/icons/svgs/16/house-16.svg +3 -0
- package/icons/svgs/16/layer-group-16.svg +3 -0
- package/icons/svgs/16/link-16.svg +3 -0
- package/icons/svgs/16/linkedin-16.svg +3 -0
- package/icons/svgs/16/lock-16.svg +3 -0
- package/icons/svgs/16/lock-open-16.svg +10 -0
- package/icons/svgs/16/magnifying-glass-16.svg +3 -0
- package/icons/svgs/16/meh-16.svg +3 -0
- package/icons/svgs/16/message-16.svg +3 -0
- package/icons/svgs/16/minus-16.svg +3 -0
- package/icons/svgs/16/moon-16.svg +3 -0
- package/icons/svgs/16/nps-16.svg +3 -0
- package/icons/svgs/16/pause-16.svg +3 -0
- package/icons/svgs/16/pc-16.svg +3 -0
- package/icons/svgs/16/play-16.svg +3 -0
- package/icons/svgs/16/plus-16.svg +3 -0
- package/icons/svgs/16/rectangle-barcode-16.svg +3 -0
- package/icons/svgs/16/right-from-bracket-16.svg +3 -0
- package/icons/svgs/16/share-from-square-16.svg +10 -0
- package/icons/svgs/16/signal-stream-16.svg +3 -0
- package/icons/svgs/16/smile-16.svg +3 -0
- package/icons/svgs/16/smile-rotate-right-16.svg +10 -0
- package/icons/svgs/16/sort-16.svg +3 -0
- package/icons/svgs/16/sort-alt-16.svg +3 -0
- package/icons/svgs/16/sort-down-16.svg +3 -0
- package/icons/svgs/16/sort-left-16.svg +3 -0
- package/icons/svgs/16/sort-right-16.svg +3 -0
- package/icons/svgs/16/sort-up-16.svg +3 -0
- package/icons/svgs/16/star-16.svg +3 -0
- package/icons/svgs/16/stop-16.svg +3 -0
- package/icons/svgs/16/sun-bright-16.svg +3 -0
- package/icons/svgs/16/tags-16.svg +3 -0
- package/icons/svgs/16/text-slash-16.svg +10 -0
- package/icons/svgs/16/thumbs-down-16.svg +3 -0
- package/icons/svgs/16/thumbs-up-16.svg +3 -0
- package/icons/svgs/16/thumbtack-16.svg +3 -0
- package/icons/svgs/16/triangle-exclamation-16.svg +3 -0
- package/icons/svgs/16/turn-down-right-16.svg +3 -0
- package/icons/svgs/16/twitter-16.svg +10 -0
- package/icons/svgs/16/user-16.svg +3 -0
- package/icons/svgs/16/wave-sine-16.svg +3 -0
- package/icons/svgs/16/xmark-16.svg +3 -0
- package/icons/svgs/24/arrow-down-24.svg +3 -0
- package/icons/svgs/24/arrow-down-left-24.svg +3 -0
- package/icons/svgs/24/arrow-down-right-24.svg +3 -0
- package/icons/svgs/24/arrow-down-to-bracket-24.svg +3 -0
- package/icons/svgs/24/arrow-left-24.svg +3 -0
- package/icons/svgs/24/arrow-right-24.svg +3 -0
- package/icons/svgs/24/arrow-rotate-right-24.svg +3 -0
- package/icons/svgs/24/arrow-trend-down-24.svg +3 -0
- package/icons/svgs/24/arrow-trend-up-24.svg +3 -0
- package/icons/svgs/24/arrow-up-24.svg +3 -0
- package/icons/svgs/24/arrow-up-left-24.svg +3 -0
- package/icons/svgs/24/arrow-up-right-24.svg +3 -0
- package/icons/svgs/24/backward-step-24.svg +3 -0
- package/icons/svgs/24/ban-24.svg +3 -0
- package/icons/svgs/24/bars-24.svg +3 -0
- package/icons/svgs/24/bars-sort-down-24.svg +3 -0
- package/icons/svgs/24/bars-sort-up-24.svg +3 -0
- package/icons/svgs/24/bell-24.svg +3 -0
- package/icons/svgs/24/bookmark-24.svg +3 -0
- package/icons/svgs/24/calendar-24.svg +3 -0
- package/icons/svgs/24/calendar-plus-24.svg +3 -0
- package/icons/svgs/24/cart-shopping-24.svg +3 -0
- package/icons/svgs/24/check-24.svg +3 -0
- package/icons/svgs/24/chevron-down-24.svg +3 -0
- package/icons/svgs/24/chevron-left-24.svg +3 -0
- package/icons/svgs/24/chevron-right-24.svg +3 -0
- package/icons/svgs/24/chevron-up-24.svg +3 -0
- package/icons/svgs/24/circle-24.svg +3 -0
- package/icons/svgs/24/circle-check-24.svg +3 -0
- package/icons/svgs/24/circle-exclamation-24.svg +3 -0
- package/icons/svgs/24/circle-info-24.svg +3 -0
- package/icons/svgs/24/circle-question-24.svg +3 -0
- package/icons/svgs/24/circle-x-24.svg +3 -0
- package/icons/svgs/24/clock-rotate-left-24.svg +3 -0
- package/icons/svgs/24/code-24.svg +3 -0
- package/icons/svgs/24/comment-24.svg +3 -0
- package/icons/svgs/24/compass-24.svg +3 -0
- package/icons/svgs/24/crown-24.svg +3 -0
- package/icons/svgs/24/earth-europa-24.svg +3 -0
- package/icons/svgs/24/envelope-24.svg +3 -0
- package/icons/svgs/24/eye-24.svg +3 -0
- package/icons/svgs/24/eye-slash-24.svg +3 -0
- package/icons/svgs/24/facebook-24.svg +3 -0
- package/icons/svgs/24/file-24.svg +3 -0
- package/icons/svgs/24/file-alt-24.svg +3 -0
- package/icons/svgs/24/file-image-24.svg +3 -0
- package/icons/svgs/24/file-pdf-24.svg +3 -0
- package/icons/svgs/24/file-xmark-24.svg +3 -0
- package/icons/svgs/24/filter-24.svg +3 -0
- package/icons/svgs/24/forward-step-24.svg +3 -0
- package/icons/svgs/24/frown-24.svg +3 -0
- package/icons/svgs/24/gear-24.svg +3 -0
- package/icons/svgs/24/github-24.svg +3 -0
- package/icons/svgs/24/graduation-cap-24.svg +3 -0
- package/icons/svgs/24/grid-2-24.svg +3 -0
- package/icons/svgs/24/grip-vertical-24.svg +3 -0
- package/icons/svgs/24/hand-pointer-24.svg +3 -0
- package/icons/svgs/24/house-24.svg +3 -0
- package/icons/svgs/24/layer-group-24.svg +3 -0
- package/icons/svgs/24/link-24.svg +3 -0
- package/icons/svgs/24/linkedin-24.svg +3 -0
- package/icons/svgs/24/lock-24.svg +3 -0
- package/icons/svgs/24/lock-open-24.svg +3 -0
- package/icons/svgs/24/magnifying-glass-24.svg +3 -0
- package/icons/svgs/24/meh-24.svg +3 -0
- package/icons/svgs/24/message-24.svg +3 -0
- package/icons/svgs/24/minus-24.svg +3 -0
- package/icons/svgs/24/moon-24.svg +3 -0
- package/icons/svgs/24/nps-24.svg +3 -0
- package/icons/svgs/24/pause-24.svg +3 -0
- package/icons/svgs/24/pc-24.svg +3 -0
- package/icons/svgs/24/play-24.svg +3 -0
- package/icons/svgs/24/plus-24.svg +3 -0
- package/icons/svgs/24/rectangle-barcode-24.svg +3 -0
- package/icons/svgs/24/right-from-bracket-24.svg +3 -0
- package/icons/svgs/24/share-from-square-24.svg +3 -0
- package/icons/svgs/24/signal-stream-24.svg +3 -0
- package/icons/svgs/24/smile-24.svg +3 -0
- package/icons/svgs/24/smile-rotate-right-24.svg +3 -0
- package/icons/svgs/24/sort-24.svg +3 -0
- package/icons/svgs/24/sort-alt-24.svg +3 -0
- package/icons/svgs/24/sort-down-24.svg +3 -0
- package/icons/svgs/24/sort-left-24.svg +3 -0
- package/icons/svgs/24/sort-right-24.svg +3 -0
- package/icons/svgs/24/sort-up-24.svg +3 -0
- package/icons/svgs/24/star-24.svg +3 -0
- package/icons/svgs/24/stop-24.svg +3 -0
- package/icons/svgs/24/sun-bright-24.svg +3 -0
- package/icons/svgs/24/tags-24.svg +3 -0
- package/icons/svgs/24/text-slash-24.svg +3 -0
- package/icons/svgs/24/thumbs-down-24.svg +3 -0
- package/icons/svgs/24/thumbs-up-24.svg +3 -0
- package/icons/svgs/24/thumbtack-24.svg +3 -0
- package/icons/svgs/24/triangle-exclamation-24.svg +3 -0
- package/icons/svgs/24/turn-down-right-24.svg +3 -0
- package/icons/svgs/24/twitter-24.svg +3 -0
- package/icons/svgs/24/user-24.svg +3 -0
- package/icons/svgs/24/wave-sine-24.svg +3 -0
- package/icons/svgs/24/xmark-24.svg +3 -0
- package/icons/types.d.ts +4 -0
- package/index.d.ts +77 -39
- package/index.js +2 -3
- package/info-state/info-state.d.ts +12 -3
- package/info-state/info-state.js +4 -10
- package/info-state/info-state.module.css +1 -77
- package/input-group/input-group.d.ts +3 -3
- package/input-group/input-group.js +11 -15
- package/input-group/input-group.module.css +1 -36
- package/linear-progress/linear-progress.d.ts +4 -4
- package/linear-progress/linear-progress.js +7 -8
- package/linear-progress/linear-progress.module.css +1 -81
- package/list/list.d.ts +2 -1
- package/list/list.js +4 -6
- package/list/list.module.css +1 -48
- package/masonry/masonry.d.ts +2 -2
- package/masonry/masonry.js +6 -5
- package/masonry/masonry.module.css +1 -14
- package/modal/content/modal-content.d.ts +9 -0
- package/modal/content/modal-content.js +11 -0
- package/modal/content/modal-content.module.css +1 -0
- package/modal/index.d.ts +1 -1
- package/modal/index.js +1 -1
- package/modal/modal-context.d.ts +4 -4
- package/modal/modal-context.js +10 -0
- package/modal/modal.d.ts +6 -9
- package/modal/modal.js +8 -25
- package/modal/modal.module.css +1 -48
- package/overlay-container/index.d.ts +2 -0
- package/overlay-container/index.js +1 -0
- package/overlay-container/overlay-container.d.ts +7 -0
- package/overlay-container/overlay-container.js +13 -0
- package/package.json +47 -39
- package/pagination/pagination.d.ts +2 -4
- package/pagination/pagination.js +4 -3
- package/pagination/pagination.module.css +1 -31
- package/prose/prose.js +4 -4
- package/prose/prose.module.css +1 -23
- package/select/select.d.ts +3 -3
- package/select/select.js +4 -7
- package/select/select.module.css +1 -108
- package/selection-controls/checkbox.d.ts +3 -3
- package/selection-controls/checkbox.js +4 -3
- package/selection-controls/radio.d.ts +3 -3
- package/selection-controls/radio.js +4 -3
- package/selection-controls/selection-controls.module.css +1 -119
- package/selection-controls/toggle.d.ts +3 -3
- package/selection-controls/toggle.js +4 -3
- package/separator/index.d.ts +1 -0
- package/separator/separator.d.ts +3 -2
- package/separator/separator.js +4 -3
- package/separator/separator.module.css +1 -6
- package/skeleton-block/skeleton-block.d.ts +1 -1
- package/skeleton-block/skeleton-block.js +3 -3
- package/slider/slider.d.ts +3 -3
- package/slider/slider.js +4 -8
- package/slider/slider.module.css +1 -101
- package/snackbar/snackbar.js +4 -12
- package/snackbar/snackbar.module.css +1 -46
- package/spinner/spinner.d.ts +4 -1
- package/spinner/spinner.js +7 -9
- package/split-button/split-button.js +4 -6
- package/split-button/split-button.module.css +1 -28
- package/stack/stack.js +4 -4
- package/stack/stack.module.css +1 -27
- package/star-meter/star-meter.d.ts +1 -1
- package/star-meter/star-meter.js +5 -14
- package/star-meter/star-meter.module.css +1 -30
- package/tab/index.d.ts +1 -1
- package/tab/index.js +1 -1
- package/tab/primitive-tab.d.ts +1 -1
- package/tab/primitive-tab.js +3 -3
- package/tab/tab-item.d.ts +4 -2
- package/tab/tab-item.js +6 -7
- package/tab/tab-list.d.ts +3 -2
- package/tab/tab-list.js +4 -3
- package/tab/tab-panel.d.ts +5 -2
- package/tab/tab-panel.js +5 -3
- package/tab/tab.d.ts +11 -9
- package/tab/tab.js +11 -14
- package/tab/tab.module.css +1 -103
- package/table/table.d.ts +3 -3
- package/table/table.js +9 -12
- package/table/table.module.css +1 -32
- package/text/text.d.ts +1 -1
- package/text/text.js +4 -4
- package/text/text.module.css +1 -89
- package/textfield/base-field/base-field.d.ts +1 -0
- package/textfield/base-field/base-field.js +4 -3
- package/textfield/base-field/base-field.module.css +1 -119
- package/textfield/base-field/index.d.ts +1 -1
- package/textfield/textfield.d.ts +6 -6
- package/textfield/textfield.js +6 -10
- package/textfield/textfield.module.css +1 -103
- package/themes/dark.css +1 -1
- package/themes/light.css +1 -1
- package/themes.css +1 -143
- package/title/title.d.ts +1 -1
- package/title/title.js +4 -4
- package/title/title.module.css +1 -85
- package/toggle-button/toggle-button.js +7 -7
- package/toggle-button/toggle-button.module.css +1 -37
- package/tooltip/tooltip.d.ts +2 -2
- package/tooltip/tooltip.js +6 -10
- package/tooltip/tooltip.module.css +1 -72
- package/modal/modal-content.d.ts +0 -7
- package/modal/modal-content.js +0 -15
- package/modal/modal-content.module.css +0 -40
- package/theme-switch/index.d.ts +0 -2
- package/theme-switch/index.js +0 -1
- package/theme-switch/theme-switch.d.ts +0 -9
- package/theme-switch/theme-switch.js +0 -14
package/text/text.module.css
CHANGED
|
@@ -1,89 +1 @@
|
|
|
1
|
-
.Text {
|
|
2
|
-
line-height: 1.5;
|
|
3
|
-
min-block-size: 0.01vh;
|
|
4
|
-
font-size: var(--fluid-type-max);
|
|
5
|
-
max-inline-size: var(--maxW, initial);
|
|
6
|
-
text-align: var(--tAlign);
|
|
7
|
-
|
|
8
|
-
&[data-text-is-fluid='true'] {
|
|
9
|
-
font-size:
|
|
10
|
-
clamp(
|
|
11
|
-
var(--fluid-type-min, env(--font-size-16)),
|
|
12
|
-
var(--fluid-type-factor, calc(0.6rem + 0.92vw)),
|
|
13
|
-
var(--fluid-type-max, 1rem)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Colors */
|
|
18
|
-
|
|
19
|
-
&[data-text-dimmed='5'] {
|
|
20
|
-
color: var(--dimmed-5);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&[data-text-dimmed='6'] {
|
|
24
|
-
color: var(--dimmed-6);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&[data-text-dimmed='7'] {
|
|
28
|
-
color: var(--dimmed-7);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&[data-text-sentiment='positive'] {
|
|
32
|
-
color: var(--highlight-green-foreground);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&[data-text-sentiment='informative'] {
|
|
36
|
-
color: var(--highlight-blue-foreground);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
&[data-text-sentiment='danger'] {
|
|
40
|
-
color: var(--highlight-red-foreground);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&[data-text-sentiment='warning'] {
|
|
44
|
-
color: var(--highlight-yellow-foreground);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/* Sizes */
|
|
48
|
-
|
|
49
|
-
&[data-text-size='14'] {
|
|
50
|
-
font-size: env(--font-size-14);
|
|
51
|
-
line-height: 1.2;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&[data-text-size='16'] {
|
|
55
|
-
--fluid-type-min: env(--font-size-14);
|
|
56
|
-
--fluid-type-factor: calc(0.69rem + 0.44vw);
|
|
57
|
-
--fluid-type-max: env(--font-size-16);
|
|
58
|
-
|
|
59
|
-
line-height: 1.2;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&[data-text-size='18'] {
|
|
63
|
-
--fluid-type-min: env(--font-size-16);
|
|
64
|
-
--fluid-type-factor: calc(0.79rem + 0.48vw);
|
|
65
|
-
--fluid-type-max: env(--font-size-18);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&[data-text-size='22'] {
|
|
69
|
-
--fluid-type-min: env(--font-size-18);
|
|
70
|
-
--fluid-type-factor: calc(0.84rem + 0.88vw);
|
|
71
|
-
--fluid-type-max: env(--font-size-22);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&[data-text-size='28'] {
|
|
75
|
-
--fluid-type-min: env(--font-size-22);
|
|
76
|
-
--fluid-type-factor: calc(0.98rem + 1.32vw);
|
|
77
|
-
--fluid-type-max: env(--font-size-28);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/* Weights */
|
|
81
|
-
|
|
82
|
-
&[data-text-weight='thin'] {
|
|
83
|
-
font-weight: 100;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&[data-text-weight='bold'] {
|
|
87
|
-
font-weight: 600;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
.Text{font-size:var(--fs-max);line-height:1.5;max-inline-size:var(--maxW,initial);min-block-size:.01vh;text-align:var(--tAlign)}.Text[data-text-dimmed="5"]{color:var(--dimmed-5)}.Text[data-text-dimmed="6"]{color:var(--dimmed-6)}.Text[data-text-dimmed="7"]{color:var(--dimmed-7)}.Text[data-text-sentiment=positive]{color:var(--highlight-green-foreground)}.Text[data-text-sentiment=informative]{color:var(--highlight-blue-foreground)}.Text[data-text-sentiment=danger]{color:var(--highlight-red-foreground)}.Text[data-text-sentiment=warning]{color:var(--highlight-yellow-foreground)}.Text[data-text-size="14"]{font-size:.78rem;line-height:1.2}.Text[data-text-size="16"]{--fs-min:0.78rem;--fs-max:0.89rem;line-height:1.2}.Text[data-text-size="18"]{--fs-min:0.89rem;--fs-max:1.00rem}.Text[data-text-size="22"]{--fs-min:1.00rem;--fs-max:1.22rem}.Text[data-text-size="28"]{--fs-min:1.22rem;--fs-max:1.56rem}.Text[data-text-weight=thin]{font-weight:100}.Text[data-text-weight=bold]{font-weight:600}.Text[data-text-responsive=true]{font-size:var(--fs-min)}@media (min-width:48em){.Text[data-text-responsive=true]{font-size:var(--fs-max)}}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { Polymorphic } from '../../';
|
|
3
|
+
export declare type PrimitiveInputType = HTMLInputElement | HTMLTextAreaElement;
|
|
3
4
|
export declare type BaseFieldProps = InputHTMLAttributes<HTMLInputElement> & InputHTMLAttributes<HTMLTextAreaElement> & {
|
|
4
5
|
invalid?: boolean;
|
|
5
6
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import { BaseField as BaseFieldClass } from './base-field.module.css';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
|
-
export const BaseField = forwardRef(({ as: Wrapper = 'input', invalid, className, ...
|
|
5
|
-
return (
|
|
5
|
+
export const BaseField = forwardRef(({ as: Wrapper = 'input', invalid, className, ...otherProps }, forwardedRef) => {
|
|
6
|
+
return (_jsx(Wrapper, { ref: forwardedRef, "data-basefield-invalid": invalid, className: clsx(BaseFieldClass, className), ...otherProps }, void 0));
|
|
6
7
|
});
|
|
7
8
|
BaseField.displayName = 'BaseField';
|
|
@@ -1,119 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
.BaseField {
|
|
4
|
-
margin: 0;
|
|
5
|
-
text-overflow: ellipsis;
|
|
6
|
-
font-size: var(--font-size);
|
|
7
|
-
border-radius: env(--radius-4);
|
|
8
|
-
font-family: inherit;
|
|
9
|
-
line-height: 1;
|
|
10
|
-
appearance: none;
|
|
11
|
-
inline-size: 100%;
|
|
12
|
-
box-sizing: border-box;
|
|
13
|
-
overflow: hidden;
|
|
14
|
-
color: inherit;
|
|
15
|
-
background-color: var(--global-background);
|
|
16
|
-
border: 1px solid var(--dimmed-2);
|
|
17
|
-
block-size: var(--field-height);
|
|
18
|
-
padding: 0 var(--field-padding);
|
|
19
|
-
display: flex;
|
|
20
|
-
caret-color: var(--cta-default);
|
|
21
|
-
outline-offset: 2px;
|
|
22
|
-
|
|
23
|
-
@nest [data-textfield-has-icon='true'] &::-webkit-calendar-picker-indicator {
|
|
24
|
-
opacity: 0%;
|
|
25
|
-
position: absolute;
|
|
26
|
-
right: calc(var(--field-padding) / 2);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&:-moz-ui-invalid {
|
|
30
|
-
box-shadow: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&::placeholder {
|
|
34
|
-
color: var(--dimmed-5);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&:focus-visible {
|
|
38
|
-
border-color: var(--dimmed-5);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&:disabled {
|
|
42
|
-
|
|
43
|
-
@mixin vibrancy-disabled;
|
|
44
|
-
|
|
45
|
-
cursor: not-allowed;
|
|
46
|
-
border-color: transparent;
|
|
47
|
-
|
|
48
|
-
&::placeholder {
|
|
49
|
-
color: var(--dimmed-6);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&[readonly] {
|
|
54
|
-
border-style: dashed;
|
|
55
|
-
box-shadow: none;
|
|
56
|
-
cursor: default;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&:autofill,
|
|
60
|
-
&:autofill:hover,
|
|
61
|
-
&:autofill:focus,
|
|
62
|
-
&:autofill:active {
|
|
63
|
-
border: 1px solid var(--dimmed-2);
|
|
64
|
-
box-shadow: 0 0 0 100px var(--global-background) inset;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:is(:invalid, [data-basefield-invalid='true'], :out-of-range),
|
|
68
|
-
&:is(:invalid, [data-basefield-invalid='true'], :out-of-range):focus-visible {
|
|
69
|
-
border-color: var(--highlight-red-foreground);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
&[type='number'] {
|
|
74
|
-
appearance: textfield;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
&[type='number']::-webkit-inner-spin-button,
|
|
78
|
-
&[type='number']::-webkit-outer-spin-button {
|
|
79
|
-
display: none;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&[type='search'] {
|
|
83
|
-
appearance: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&[type='search']::-webkit-search-cancel-button,
|
|
87
|
-
&[type='search']::-webkit-search-decoration {
|
|
88
|
-
appearance: none;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
textarea.BaseField {
|
|
94
|
-
block-size: auto;
|
|
95
|
-
min-block-size: env(--space-32);
|
|
96
|
-
line-height: env(--font-lh-standard);
|
|
97
|
-
resize: vertical;
|
|
98
|
-
padding:
|
|
99
|
-
calc(var(--field-padding) / 2)
|
|
100
|
-
calc(var(--field-padding) + env(--space-16))
|
|
101
|
-
calc(var(--field-padding) / 2)
|
|
102
|
-
var(--field-padding);
|
|
103
|
-
|
|
104
|
-
&::-webkit-datetime-edit-text {
|
|
105
|
-
opacity: 30%;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&::-webkit-calendar-picker-indicator {
|
|
109
|
-
color: var(--global-foreground);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:-moz-ui-invalid {
|
|
113
|
-
box-shadow: none;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&::-webkit-calendar-picker-indicator:hover {
|
|
117
|
-
background-color: transparent;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
1
|
+
.BaseField{-webkit-appearance:none;appearance:none;background-color:var(--global-background);block-size:var(--field-height);border:1px solid var(--dimmed-2);border-radius:.22rem;box-sizing:border-box;caret-color:var(--cta-default);color:inherit;display:flex;font-family:inherit;font-size:var(--font-size);inline-size:100%;line-height:1;margin:0;outline-offset:2px;overflow:hidden;padding:0 var(--field-padding);text-overflow:ellipsis}[data-textfield-has-icon=true] .BaseField::-webkit-calendar-picker-indicator{opacity:0;position:absolute;right:calc(var(--field-padding)/2)}.BaseField:-moz-ui-invalid{box-shadow:none}.BaseField::placeholder{color:var(--dimmed-5)}.BaseField.focus-visible{border-color:var(--dimmed-5)}.BaseField:focus-visible{border-color:var(--dimmed-5)}.BaseField:disabled{-webkit-backdrop-filter:saturate(180%) blur(62px);backdrop-filter:saturate(180%) blur(62px);background:linear-gradient(to bottom,var(--global-disabled-background),var(--global-disabled-background));border-color:#0000;color:var(--global-disabled-foreground);cursor:not-allowed}.BaseField:disabled::placeholder{color:var(--dimmed-6)}.BaseField[readonly]{border-style:dashed;box-shadow:none;cursor:default}.BaseField:-webkit-autofill,.BaseField:-webkit-autofill:active,.BaseField:-webkit-autofill:focus,.BaseField:-webkit-autofill:hover{border:1px solid var(--dimmed-2);box-shadow:0 0 0 100px var(--global-background) inset}.BaseField:autofill,.BaseField:autofill:active,.BaseField:autofill:focus,.BaseField:autofill:hover{border:1px solid var(--dimmed-2);box-shadow:0 0 0 100px var(--global-background) inset}.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range),.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range).focus-visible{border-color:var(--highlight-red-foreground)}.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range),.BaseField:is(:invalid,[data-basefield-invalid=true],:out-of-range):focus-visible{border-color:var(--highlight-red-foreground)}.BaseField[type=number]{-webkit-appearance:textfield;appearance:textfield}.BaseField[type=number]::-webkit-inner-spin-button,.BaseField[type=number]::-webkit-outer-spin-button{display:none}.BaseField[type=search]{-webkit-appearance:none;appearance:none}.BaseField[type=search]::-webkit-search-cancel-button,.BaseField[type=search]::-webkit-search-decoration{-webkit-appearance:none;appearance:none}textarea.BaseField{block-size:auto;line-height:1.5;min-block-size:1.78rem;padding:calc(var(--field-padding)/2) calc(var(--field-padding) + .89rem) calc(var(--field-padding)/2) var(--field-padding);resize:vertical}textarea.BaseField::-webkit-datetime-edit-text{opacity:30%}textarea.BaseField::-webkit-calendar-picker-indicator{color:var(--global-foreground)}textarea.BaseField:-moz-ui-invalid{box-shadow:none}textarea.BaseField::-webkit-calendar-picker-indicator:hover{background-color:initial}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { BaseField } from './base-field';
|
|
2
|
-
export type { BaseFieldProps } from './base-field';
|
|
2
|
+
export type { BaseFieldProps, PrimitiveInputType } from './base-field';
|
package/textfield/textfield.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ChangeEvent } from 'react';
|
|
2
2
|
import { IconNames } from '../icons/types';
|
|
3
|
-
import { BaseFieldProps } from './base-field';
|
|
3
|
+
import { BaseFieldProps, PrimitiveInputType } from './base-field';
|
|
4
4
|
export declare type TextfieldProps = BaseFieldProps & {
|
|
5
5
|
icon?: IconNames;
|
|
6
6
|
label?: string;
|
|
@@ -10,9 +10,9 @@ export declare type TextfieldProps = BaseFieldProps & {
|
|
|
10
10
|
readOnly?: boolean;
|
|
11
11
|
iconPosition?: 'left' | 'right';
|
|
12
12
|
disabled?: boolean;
|
|
13
|
-
onChange?: (event: ChangeEvent<
|
|
13
|
+
onChange?: (event: ChangeEvent<PrimitiveInputType>) => void;
|
|
14
14
|
};
|
|
15
|
-
export declare const Textfield:
|
|
15
|
+
export declare const Textfield: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLTextAreaElement> & {
|
|
16
16
|
invalid?: boolean | undefined;
|
|
17
17
|
} & {
|
|
18
18
|
icon?: IconNames | undefined;
|
|
@@ -23,5 +23,5 @@ export declare const Textfield: React.ForwardRefExoticComponent<React.InputHTMLA
|
|
|
23
23
|
readOnly?: boolean | undefined;
|
|
24
24
|
iconPosition?: "left" | "right" | undefined;
|
|
25
25
|
disabled?: boolean | undefined;
|
|
26
|
-
onChange?: ((event: ChangeEvent<
|
|
27
|
-
} &
|
|
26
|
+
onChange?: ((event: ChangeEvent<PrimitiveInputType>) => void) | undefined;
|
|
27
|
+
} & import("react").RefAttributes<PrimitiveInputType>>;
|
package/textfield/textfield.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useCallback, useState } from 'react';
|
|
2
3
|
import { Text, Stack, Icon, IconButton } from '../';
|
|
3
4
|
import { BaseField } from './base-field';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
6
|
import { useUIDSeed } from 'react-uid';
|
|
6
7
|
import { Textfield as TextfieldClass, FieldContainer, InputField, Icon as IconClass, IconButton as IconButtonClass } from './textfield.module.css';
|
|
7
|
-
export const Textfield = forwardRef(({ children, className, disabled = false, icon, label, textarea, readOnly, invalid, iconPosition = 'right', dimension = 'regular', type, onChange, ...
|
|
8
|
+
export const Textfield = forwardRef(({ children, className, disabled = false, icon, label, textarea, readOnly, invalid, iconPosition = 'right', dimension = 'regular', type, onChange, ...otherProps }, forwardedRef) => {
|
|
8
9
|
const [passwordVisible, setPasswordVisible] = useState(false);
|
|
9
10
|
const uid = useUIDSeed();
|
|
10
11
|
const isPassword = type === 'password';
|
|
@@ -27,13 +28,8 @@ export const Textfield = forwardRef(({ children, className, disabled = false, ic
|
|
|
27
28
|
disabled,
|
|
28
29
|
onChange
|
|
29
30
|
};
|
|
30
|
-
return (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
textarea
|
|
34
|
-
? (React.createElement(BaseField, { ref: forwardedRef, as: "textarea", id: uid('field'), ...commonProps, ...props }))
|
|
35
|
-
: (React.createElement(BaseField, { className: InputField, id: uid('field'), ref: forwardedRef, type: passwordVisible ? 'text' : type, ...commonProps, ...props })),
|
|
36
|
-
isPassword && (React.createElement(IconButton, { className: IconButtonClass, dimension: actionSizes[dimension], onClick: handlePasswordVisibility, kind: "flat", "aria-label": "Reveal password", icon: passwordVisible ? 'eye-slash' : 'eye' })),
|
|
37
|
-
!textarea && icon && type !== 'password' && (React.createElement(Icon, { className: IconClass, name: icon, dimension: iconSizes[dimension] })))));
|
|
31
|
+
return (_jsxs(Stack, { as: "fieldset", rowGap: 4, className: clsx(TextfieldClass, className), "data-textfield-has-icon": isPassword || Boolean(icon), "data-textfield-icon-position": iconPosition, "data-textfield-dimension": dimension, "data-textfield-invalid": invalid, "aria-disabled": disabled, horizontalAlign: "stretch", verticalAlign: "start", tabIndex: disabled ? 0 : undefined, children: [label && _jsx(Text, { as: "label", size: dimension === 'small' ? 14 : 16, htmlFor: uid('field'), children: label }, void 0), _jsxs("div", { className: FieldContainer, children: [textarea
|
|
32
|
+
? (_jsx(BaseField, { ref: forwardedRef, as: "textarea", id: uid('field'), ...commonProps, ...otherProps }, void 0))
|
|
33
|
+
: (_jsx(BaseField, { className: InputField, id: uid('field'), ref: forwardedRef, type: passwordVisible ? 'text' : type, ...commonProps, ...otherProps }, void 0)), isPassword && (_jsx(IconButton, { className: IconButtonClass, dimension: actionSizes[dimension], onClick: handlePasswordVisibility, kind: "flat", "aria-label": "Reveal password", icon: passwordVisible ? 'eye-slash' : 'eye' }, void 0)), !textarea && icon && type !== 'password' && (_jsx(Icon, { className: IconClass, name: icon, dimension: iconSizes[dimension] }, void 0))] }, void 0)] }, void 0));
|
|
38
34
|
});
|
|
39
35
|
Textfield.displayName = 'Textfield';
|
|
@@ -1,103 +1 @@
|
|
|
1
|
-
.Textfield {
|
|
2
|
-
appearance: none;
|
|
3
|
-
position: relative;
|
|
4
|
-
padding: 0;
|
|
5
|
-
|
|
6
|
-
&[data-textfield-dimension='small'] {
|
|
7
|
-
--field-height: env(--space-24);
|
|
8
|
-
--field-padding: 0.33rem;
|
|
9
|
-
--font-size: env(--font-size-14);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&[data-textfield-dimension='regular'] {
|
|
13
|
-
--field-height: env(--space-40);
|
|
14
|
-
--field-padding: env(--space-16);
|
|
15
|
-
--font-size: env(--font-size-16);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&[data-textfield-dimension='big'] {
|
|
19
|
-
--field-height: env(--space-48);
|
|
20
|
-
--field-padding: env(--space-16);
|
|
21
|
-
--font-size: env(--font-size-18);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.FieldContainer {
|
|
26
|
-
position: relative;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.InputField {
|
|
30
|
-
--factor: 4;
|
|
31
|
-
|
|
32
|
-
@nest [data-textfield-has-icon='true'][data-textfield-icon-position='right'] & {
|
|
33
|
-
padding:
|
|
34
|
-
0
|
|
35
|
-
calc(var(--field-padding) * var(--factor))
|
|
36
|
-
0
|
|
37
|
-
var(--field-padding);
|
|
38
|
-
}
|
|
39
|
-
@nest [data-textfield-has-icon='true'][data-textfield-icon-position='left'] & {
|
|
40
|
-
padding:
|
|
41
|
-
0
|
|
42
|
-
var(--field-padding)
|
|
43
|
-
0
|
|
44
|
-
calc(var(--field-padding) * var(--factor));
|
|
45
|
-
}
|
|
46
|
-
@nest [data-textfield-dimension*='regular'] &,
|
|
47
|
-
[data-textfield-dimension*='big'] & {
|
|
48
|
-
--factor: 3;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.Icon {
|
|
53
|
-
border-radius: env(--radius-4);
|
|
54
|
-
pointer-events: none;
|
|
55
|
-
position: absolute;
|
|
56
|
-
top: 50%;
|
|
57
|
-
transform: translateY(-50%);
|
|
58
|
-
|
|
59
|
-
@nest [data-textfield-icon-position='left'] & {
|
|
60
|
-
right: auto;
|
|
61
|
-
left: var(--field-padding);
|
|
62
|
-
}
|
|
63
|
-
@nest [data-textfield-icon-position='right'] & {
|
|
64
|
-
left: auto;
|
|
65
|
-
right: var(--field-padding);
|
|
66
|
-
}
|
|
67
|
-
@nest .Textfield[data-textfield-invalid='true'] & {
|
|
68
|
-
fill: var(--highlight-red-foreground);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.IconButton.IconButton.IconButton {
|
|
73
|
-
--x: 19%;
|
|
74
|
-
|
|
75
|
-
position: absolute;
|
|
76
|
-
top: 50%;
|
|
77
|
-
transform: translateY(-50%) translateX(var(--x));
|
|
78
|
-
outline-offset: -0.25em;
|
|
79
|
-
|
|
80
|
-
&[data-button-kind='flat']:is(:hover, :active, :focus, [data-button-disabled='true']) {
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
backdrop-filter: none;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
@nest [data-textfield-icon-position='left'] & {
|
|
86
|
-
--x: -19%;
|
|
87
|
-
|
|
88
|
-
right: auto;
|
|
89
|
-
left: var(--field-padding);
|
|
90
|
-
}
|
|
91
|
-
@nest [data-textfield-icon-position='right'] & {
|
|
92
|
-
left: auto;
|
|
93
|
-
right: var(--field-padding);
|
|
94
|
-
}
|
|
95
|
-
@nest .Textfield[data-textfield-invalid='true'] & {
|
|
96
|
-
color: var(--highlight-red-foreground);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.InputField:invalid + .Icon {
|
|
101
|
-
fill: var(--highlight-red-foreground);
|
|
102
|
-
}
|
|
103
|
-
|
|
1
|
+
.Textfield{-webkit-appearance:none;appearance:none;padding:0;position:relative}.Textfield[data-textfield-dimension=small]{--field-height:1.33rem;--field-padding:0.33rem;--font-size:0.78rem}.Textfield[data-textfield-dimension=regular]{--field-height:2.22rem;--field-padding:0.89rem;--font-size:0.89rem}.Textfield[data-textfield-dimension=big]{--field-height:2.67rem;--field-padding:0.89rem;--font-size:1.00rem}.FieldContainer{position:relative}.InputField{--factor:4}[data-textfield-has-icon=true][data-textfield-icon-position=right] .InputField{padding:0 calc(var(--field-padding)*var(--factor)) 0 var(--field-padding)}[data-textfield-has-icon=true][data-textfield-icon-position=left] .InputField{padding:0 var(--field-padding) 0 calc(var(--field-padding)*var(--factor))}[data-textfield-dimension*=big] .InputField,[data-textfield-dimension*=regular] .InputField{--factor:3}.Icon{border-radius:.22rem;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%)}[data-textfield-icon-position=left] .Icon{left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .Icon{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .Icon{fill:var(--highlight-red-foreground)}.IconButton.IconButton.IconButton{--x:19%;outline-offset:-.25em;position:absolute;top:50%;transform:translateY(-50%) translateX(var(--x))}.IconButton.IconButton.IconButton[data-button-kind=flat]:is(:hover,:active,:focus,[data-button-disabled=true]){-webkit-backdrop-filter:none;backdrop-filter:none;background-color:initial}[data-textfield-icon-position=left] .IconButton.IconButton.IconButton{--x:-19%;left:var(--field-padding);right:auto}[data-textfield-icon-position=right] .IconButton.IconButton.IconButton{left:auto;right:var(--field-padding)}.Textfield[data-textfield-invalid=true] .IconButton.IconButton.IconButton{color:var(--highlight-red-foreground)}.InputField:invalid+.Icon{fill:var(--highlight-red-foreground)}
|
package/themes/dark.css
CHANGED
package/themes/light.css
CHANGED
package/themes.css
CHANGED
|
@@ -1,143 +1 @@
|
|
|
1
|
-
|
|
2
|
-
:root,
|
|
3
|
-
[data-theme='light'] {
|
|
4
|
-
color: var(--global-foreground);
|
|
5
|
-
/**
|
|
6
|
-
* Do not edit directly
|
|
7
|
-
* Generated on Mon, 29 Nov 2021 10:40:48 GMT
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
--global-foreground: hsl(221 10% 30%);
|
|
12
|
-
--global-background: hsl(0 0% 100%);
|
|
13
|
-
--global-interactive-text: hsl(214 66% 44%);
|
|
14
|
-
--global-interactive-text-hover: hsl(219 93% 27%);
|
|
15
|
-
--global-vibrancy-foreground: hsl(0 0% 0%);
|
|
16
|
-
--global-vibrancy-background: hsl(220 16% 85% / 40%);
|
|
17
|
-
--global-vibrancy-background-hover: hsl(221 9% 49% / 30%);
|
|
18
|
-
--global-disabled-background: hsl(225 11% 7% / 6%);
|
|
19
|
-
--global-disabled-foreground: hsl(0 0% 0% / 20%);
|
|
20
|
-
--cta-default: hsl(0 100% 47%);
|
|
21
|
-
--cta-dark: hsl(0 100% 41%);
|
|
22
|
-
--cta-foreground: hsl(0 0% 100%);
|
|
23
|
-
--dimmed-0: hsl(210 20% 98%);
|
|
24
|
-
--dimmed-1: hsl(220 19% 91%);
|
|
25
|
-
--dimmed-2: hsl(220 16% 85%);
|
|
26
|
-
--dimmed-3: hsl(219 14% 75%);
|
|
27
|
-
--dimmed-4: hsl(220 12% 66%);
|
|
28
|
-
--dimmed-5: hsl(221 9% 49%);
|
|
29
|
-
--dimmed-6: hsl(221 10% 39%);
|
|
30
|
-
--dimmed-7: hsl(221 10% 30%);
|
|
31
|
-
--highlight-gray-background: hsl(220 19% 91%);
|
|
32
|
-
--highlight-gray-foreground: hsl(221 10% 39%);
|
|
33
|
-
--highlight-yellow-background: hsl(60 100% 89%);
|
|
34
|
-
--highlight-yellow-foreground: hsl(25 100% 34%);
|
|
35
|
-
--highlight-green-background: hsl(149 100% 91%);
|
|
36
|
-
--highlight-green-foreground: hsl(156 100% 23%);
|
|
37
|
-
--highlight-blue-background: hsl(187 100% 89%);
|
|
38
|
-
--highlight-blue-foreground: hsl(214 66% 44%);
|
|
39
|
-
--highlight-red-background: hsl(343 100% 96%);
|
|
40
|
-
--highlight-red-foreground: hsl(351 92% 37%);
|
|
41
|
-
--highlight-cyan-background: hsl(186 100% 96%);
|
|
42
|
-
--highlight-cyan-foreground: hsl(187 64% 33%);
|
|
43
|
-
--highlight-purple-background: hsl(300 100% 98%);
|
|
44
|
-
--highlight-purple-foreground: hsl(298 32% 46%);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
@media (prefers-color-scheme: dark) {
|
|
50
|
-
:root:not([data-theme='light']) {
|
|
51
|
-
color: var(--global-foreground);
|
|
52
|
-
/**
|
|
53
|
-
* Do not edit directly
|
|
54
|
-
* Generated on Mon, 29 Nov 2021 10:40:48 GMT
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
--global-foreground: hsl(220 19% 91%);
|
|
59
|
-
--global-background: hsl(0 0% 0%);
|
|
60
|
-
--global-interactive-text: hsl(206 72% 67%);
|
|
61
|
-
--global-interactive-text-hover: hsl(200 100% 83%);
|
|
62
|
-
--global-vibrancy-foreground: hsl(0 0% 100%);
|
|
63
|
-
--global-vibrancy-background: hsl(218 11% 14% / 80%);
|
|
64
|
-
--global-vibrancy-background-hover: hsl(221 10% 30% / 60%);
|
|
65
|
-
--global-disabled-background: hsl(221 9% 49% / 35%);
|
|
66
|
-
--global-disabled-foreground: hsl(0 0% 100% / 20%);
|
|
67
|
-
--cta-default: hsl(0 100% 47%);
|
|
68
|
-
--cta-dark: hsl(0 100% 41%);
|
|
69
|
-
--cta-foreground: hsl(0 0% 100%);
|
|
70
|
-
--dimmed-0: hsl(225 11% 7%);
|
|
71
|
-
--dimmed-1: hsl(218 11% 14%);
|
|
72
|
-
--dimmed-2: hsl(219 13% 22%);
|
|
73
|
-
--dimmed-3: hsl(221 10% 30%);
|
|
74
|
-
--dimmed-4: hsl(221 10% 39%);
|
|
75
|
-
--dimmed-5: hsl(221 9% 49%);
|
|
76
|
-
--dimmed-6: hsl(220 12% 66%);
|
|
77
|
-
--dimmed-7: hsl(220 19% 91%);
|
|
78
|
-
--highlight-gray-background: hsl(218 11% 14%);
|
|
79
|
-
--highlight-gray-foreground: hsl(220 12% 66%);
|
|
80
|
-
--highlight-yellow-background: hsl(22 100% 19%);
|
|
81
|
-
--highlight-yellow-foreground: hsl(38 100% 77%);
|
|
82
|
-
--highlight-green-background: hsl(166 100% 13%);
|
|
83
|
-
--highlight-green-foreground: hsl(145 76% 75%);
|
|
84
|
-
--highlight-blue-background: hsl(222 100% 17%);
|
|
85
|
-
--highlight-blue-foreground: hsl(200 100% 83%);
|
|
86
|
-
--highlight-red-background: hsl(350 100% 15%);
|
|
87
|
-
--highlight-red-foreground: hsl(351 100% 81%);
|
|
88
|
-
--highlight-cyan-background: hsl(187 66% 16%);
|
|
89
|
-
--highlight-cyan-foreground: hsl(187 57% 58%);
|
|
90
|
-
--highlight-purple-background: hsl(298 41% 25%);
|
|
91
|
-
--highlight-purple-foreground: hsl(298 47% 75%);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
[data-theme='dark'],
|
|
98
|
-
:root[data-theme='dark'] {
|
|
99
|
-
color: var(--global-foreground);
|
|
100
|
-
/**
|
|
101
|
-
* Do not edit directly
|
|
102
|
-
* Generated on Mon, 29 Nov 2021 10:40:48 GMT
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
--global-foreground: hsl(220 19% 91%);
|
|
107
|
-
--global-background: hsl(0 0% 0%);
|
|
108
|
-
--global-interactive-text: hsl(206 72% 67%);
|
|
109
|
-
--global-interactive-text-hover: hsl(200 100% 83%);
|
|
110
|
-
--global-vibrancy-foreground: hsl(0 0% 100%);
|
|
111
|
-
--global-vibrancy-background: hsl(218 11% 14% / 80%);
|
|
112
|
-
--global-vibrancy-background-hover: hsl(221 10% 30% / 60%);
|
|
113
|
-
--global-disabled-background: hsl(221 9% 49% / 35%);
|
|
114
|
-
--global-disabled-foreground: hsl(0 0% 100% / 20%);
|
|
115
|
-
--cta-default: hsl(0 100% 47%);
|
|
116
|
-
--cta-dark: hsl(0 100% 41%);
|
|
117
|
-
--cta-foreground: hsl(0 0% 100%);
|
|
118
|
-
--dimmed-0: hsl(225 11% 7%);
|
|
119
|
-
--dimmed-1: hsl(218 11% 14%);
|
|
120
|
-
--dimmed-2: hsl(219 13% 22%);
|
|
121
|
-
--dimmed-3: hsl(221 10% 30%);
|
|
122
|
-
--dimmed-4: hsl(221 10% 39%);
|
|
123
|
-
--dimmed-5: hsl(221 9% 49%);
|
|
124
|
-
--dimmed-6: hsl(220 12% 66%);
|
|
125
|
-
--dimmed-7: hsl(220 19% 91%);
|
|
126
|
-
--highlight-gray-background: hsl(218 11% 14%);
|
|
127
|
-
--highlight-gray-foreground: hsl(220 12% 66%);
|
|
128
|
-
--highlight-yellow-background: hsl(22 100% 19%);
|
|
129
|
-
--highlight-yellow-foreground: hsl(38 100% 77%);
|
|
130
|
-
--highlight-green-background: hsl(166 100% 13%);
|
|
131
|
-
--highlight-green-foreground: hsl(145 76% 75%);
|
|
132
|
-
--highlight-blue-background: hsl(222 100% 17%);
|
|
133
|
-
--highlight-blue-foreground: hsl(200 100% 83%);
|
|
134
|
-
--highlight-red-background: hsl(350 100% 15%);
|
|
135
|
-
--highlight-red-foreground: hsl(351 100% 81%);
|
|
136
|
-
--highlight-cyan-background: hsl(187 66% 16%);
|
|
137
|
-
--highlight-cyan-foreground: hsl(187 57% 58%);
|
|
138
|
-
--highlight-purple-background: hsl(298 41% 25%);
|
|
139
|
-
--highlight-purple-foreground: hsl(298 47% 75%);
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
1
|
+
:root,[data-theme=light]{--global-foreground:#454a54;--global-background:#fff;--global-interactive-text:#2666ba;--global-interactive-text-hover:#053285;--global-vibrancy-foreground:#000;--global-vibrancy-background:#d3d7df66;--global-vibrancy-background-hover:#7279884d;--global-disabled-background:#1011140f;--global-disabled-foreground:#0003;--cta-default:#f00000;--cta-dark:#d10000;--cta-foreground:#fff;--dimmed-0:#f9fafb;--dimmed-1:#e4e7ec;--dimmed-2:#d3d7df;--dimmed-3:#b6bdc8;--dimmed-4:#9ea5b3;--dimmed-5:#727988;--dimmed-6:#5a606d;--dimmed-7:#454a54;--highlight-gray-background:#e4e7ec;--highlight-gray-foreground:#5a606d;--highlight-yellow-background:#ffffc7;--highlight-yellow-foreground:#ad4800;--highlight-green-background:#d1ffe7;--highlight-green-foreground:#007546;--highlight-blue-background:#c7f8ff;--highlight-blue-foreground:#2666ba;--highlight-red-background:#ffebf0;--highlight-red-foreground:#b50822;--highlight-cyan-background:#ebfdff;--highlight-cyan-foreground:#1e7d8a;--highlight-purple-background:#fff5ff;--highlight-purple-foreground:#98509b;color:var(--global-foreground)}@media (prefers-color-scheme:dark){:root:not([data-theme=light]){--global-foreground:#e4e7ec;--global-background:#000;--global-interactive-text:#6eb3e7;--global-interactive-text-hover:#a8e2ff;--global-vibrancy-foreground:#fff;--global-vibrancy-background:#202328cc;--global-vibrancy-background-hover:#454a5499;--global-disabled-background:#72798859;--global-disabled-foreground:#fff3;--cta-default:#f00000;--cta-dark:#d10000;--cta-foreground:#fff;--dimmed-0:#101114;--dimmed-1:#202328;--dimmed-2:#31363f;--dimmed-3:#454a54;--dimmed-4:#5a606d;--dimmed-5:#727988;--dimmed-6:#9ea5b3;--dimmed-7:#e4e7ec;--highlight-gray-background:#202328;--highlight-gray-foreground:#9ea5b3;--highlight-yellow-background:#612400;--highlight-yellow-foreground:#ffd48a;--highlight-green-background:#004233;--highlight-green-foreground:#8ff0b7;--highlight-blue-background:#001a57;--highlight-blue-foreground:#a8e2ff;--highlight-red-background:#4d000d;--highlight-red-foreground:#ff9ead;--highlight-cyan-background:#0e3d44;--highlight-cyan-foreground:#57c3d1;--highlight-purple-background:#58265a;--highlight-purple-foreground:#dba1dd;color:var(--global-foreground)}}:root[data-theme=dark],[data-theme=dark]{--global-foreground:#e4e7ec;--global-background:#000;--global-interactive-text:#6eb3e7;--global-interactive-text-hover:#a8e2ff;--global-vibrancy-foreground:#fff;--global-vibrancy-background:#202328cc;--global-vibrancy-background-hover:#454a5499;--global-disabled-background:#72798859;--global-disabled-foreground:#fff3;--cta-default:#f00000;--cta-dark:#d10000;--cta-foreground:#fff;--dimmed-0:#101114;--dimmed-1:#202328;--dimmed-2:#31363f;--dimmed-3:#454a54;--dimmed-4:#5a606d;--dimmed-5:#727988;--dimmed-6:#9ea5b3;--dimmed-7:#e4e7ec;--highlight-gray-background:#202328;--highlight-gray-foreground:#9ea5b3;--highlight-yellow-background:#612400;--highlight-yellow-foreground:#ffd48a;--highlight-green-background:#004233;--highlight-green-foreground:#8ff0b7;--highlight-blue-background:#001a57;--highlight-blue-foreground:#a8e2ff;--highlight-red-background:#4d000d;--highlight-red-foreground:#ff9ead;--highlight-cyan-background:#0e3d44;--highlight-cyan-foreground:#57c3d1;--highlight-purple-background:#58265a;--highlight-purple-foreground:#dba1dd;color:var(--global-foreground)}
|
package/title/title.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare type TitleProps = {
|
|
|
4
4
|
lineHeight?: 'none' | 'small' | 'large';
|
|
5
5
|
textAlign?: 'start' | 'center' | 'end';
|
|
6
6
|
maxWidth?: string;
|
|
7
|
-
|
|
7
|
+
responsive?: boolean;
|
|
8
8
|
};
|
|
9
9
|
declare type PolymorphicTitle = Polymorphic.ForwardRefComponent<'span', TitleProps>;
|
|
10
10
|
export declare const Title: PolymorphicTitle;
|
package/title/title.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
2
3
|
import * as styles from './title.module.css';
|
|
3
4
|
import clsx from 'clsx';
|
|
4
|
-
export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1',
|
|
5
|
+
export const Title = forwardRef(({ children, className, as: Wrapper = 'span', lineHeight = 'small', level = '1', textAlign = 'start', maxWidth, responsive = true, style, ...otherProps }, forwardedRef) => {
|
|
5
6
|
const computedLevel = level.match(/\d/g) ? `H${level}` : level.charAt(0).toUpperCase() + level.slice(1);
|
|
6
7
|
const dynamicStyle = {
|
|
7
8
|
'--maxW': maxWidth,
|
|
8
9
|
'--tAlign': textAlign
|
|
9
10
|
};
|
|
10
|
-
return (
|
|
11
|
+
return (_jsx(Wrapper, { ref: forwardedRef, "data-title-line-height": lineHeight, "data-title-responsive": responsive, className: clsx(styles.Title, styles[computedLevel], className), style: { ...dynamicStyle, ...style }, ...otherProps, children: children }, void 0));
|
|
11
12
|
});
|
|
12
|
-
Title.displayName = 'Title';
|