@lolmath/ui 3.2.5 → 4.0.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/dist/es/assets/active.4113e6b2.png +0 -0
- package/dist/es/assets/checked-disabled.b5430cf5.png +0 -0
- package/dist/es/assets/checked-hover.d13cb1b3.png +0 -0
- package/dist/es/assets/checked-hovered.67390091.png +0 -0
- package/dist/es/assets/checked-pressed.cffd963b.png +0 -0
- package/dist/es/assets/checked.3258b858.png +0 -0
- package/dist/es/assets/checked.b9e4b215.png +0 -0
- package/dist/es/assets/closed.484c8084.png +0 -0
- package/dist/es/assets/disabled.87ad565d.png +0 -0
- package/dist/es/assets/hover.404fa456.png +0 -0
- package/dist/es/assets/indeterminate-hover.68fcbcda.png +0 -0
- package/dist/es/assets/indeterminate.90d6dc3e.png +0 -0
- package/dist/es/assets/normal.e4c594a1.png +0 -0
- package/dist/es/assets/open.a8643ee6.png +0 -0
- package/dist/es/assets/search.c15f1e1d.png +0 -0
- package/dist/es/assets/spinner.a69432f7.png +0 -0
- package/dist/es/assets/unchecked-disabled.702505e2.png +0 -0
- package/dist/es/assets/unchecked-hover.c8e5f2d0.png +0 -0
- package/dist/es/assets/unchecked-hovered.e26c4420.png +0 -0
- package/dist/es/assets/unchecked-pressed.161ab6f8.png +0 -0
- package/dist/es/assets/unchecked.ad8e0a95.png +0 -0
- package/dist/es/assets/unchecked.cc033abe.png +0 -0
- package/dist/es/components/accordion.d.ts +56 -4
- package/dist/es/components/accordion.js +13 -40
- package/dist/es/components/accordion.js.map +1 -1
- package/dist/es/components/accordion.module.js +7 -0
- package/dist/es/components/accordion.module.js.map +1 -0
- package/dist/es/components/accordion_module.css +37 -0
- package/dist/es/components/breadcrumbs.js +16 -8
- package/dist/es/components/breadcrumbs.js.map +1 -1
- package/dist/es/components/breadcrumbs.module.js +7 -0
- package/dist/es/components/breadcrumbs.module.js.map +1 -0
- package/dist/es/components/breadcrumbs_module.css +23 -0
- package/dist/es/components/button-link.d.ts +11 -0
- package/dist/es/components/button-link.js +39 -0
- package/dist/es/components/button-link.js.map +1 -0
- package/dist/es/components/button.d.ts +67 -2
- package/dist/es/components/button.js +25 -167
- package/dist/es/components/button.js.map +1 -1
- package/dist/es/components/button.module.js +7 -0
- package/dist/es/components/button.module.js.map +1 -0
- package/dist/es/components/button_module.css +158 -0
- package/dist/es/components/card.d.ts +3 -3
- package/dist/es/components/card.js +18 -37
- package/dist/es/components/card.js.map +1 -1
- package/dist/es/components/card.module.js +7 -0
- package/dist/es/components/card.module.js.map +1 -0
- package/dist/es/components/card_module.css +16 -0
- package/dist/es/components/checkbox/checkbox.js +55 -0
- package/dist/es/components/checkbox/checkbox.js.map +1 -0
- package/dist/es/components/checkbox/checkbox.module.js +7 -0
- package/dist/es/components/checkbox/checkbox.module.js.map +1 -0
- package/dist/es/components/checkbox/checkbox_module.css +17 -0
- package/dist/es/components/divider.d.ts +1 -20
- package/dist/es/components/divider.js +10 -9
- package/dist/es/components/divider.js.map +1 -1
- package/dist/es/components/divider.module.js +7 -0
- package/dist/es/components/divider.module.js.map +1 -0
- package/dist/es/components/divider_module.css +29 -0
- package/dist/es/components/modal.js +14 -25
- package/dist/es/components/modal.js.map +1 -1
- package/dist/es/components/modal.module.js +7 -0
- package/dist/es/components/modal.module.js.map +1 -0
- package/dist/es/components/modal_module.css +80 -0
- package/dist/es/components/number-field.js +16 -23
- package/dist/es/components/number-field.js.map +1 -1
- package/dist/es/components/number-field.module.js +7 -0
- package/dist/es/components/number-field.module.js.map +1 -0
- package/dist/es/components/number-field_module.css +54 -0
- package/dist/es/components/popover.module.css +0 -0
- package/dist/es/components/progress-bar.js +6 -21
- package/dist/es/components/progress-bar.js.map +1 -1
- package/dist/es/components/progress-bar.module.js +7 -0
- package/dist/es/components/progress-bar.module.js.map +1 -0
- package/dist/es/components/progress-bar_module.css +33 -0
- package/dist/es/components/radio-group/radio-group.js +46 -0
- package/dist/es/components/radio-group/radio-group.js.map +1 -0
- package/dist/es/components/radio-group/radio-group.module.js +7 -0
- package/dist/es/components/radio-group/radio-group.module.js.map +1 -0
- package/dist/es/components/radio-group/radio-group_module.css +53 -0
- package/dist/es/components/{search-field.d.ts → search-field/search-field.d.ts} +1 -1
- package/dist/es/components/search-field/search-field.js +67 -0
- package/dist/es/components/search-field/search-field.js.map +1 -0
- package/dist/es/components/search-field/search-field.module.js +7 -0
- package/dist/es/components/search-field/search-field.module.js.map +1 -0
- package/dist/es/components/search-field/search-field_module.css +76 -0
- package/dist/es/components/select/select.js +76 -0
- package/dist/es/components/select/select.js.map +1 -0
- package/dist/es/components/select/select.module.js +7 -0
- package/dist/es/components/select/select.module.js.map +1 -0
- package/dist/es/components/select/select_module.css +75 -0
- package/dist/es/components/slider/slider.js +32 -55
- package/dist/es/components/slider/slider.js.map +1 -1
- package/dist/es/components/slider/slider.module.js +7 -0
- package/dist/es/components/slider/slider.module.js.map +1 -0
- package/dist/es/components/slider/slider_module.css +60 -0
- package/dist/es/components/spinner/spinner.js +4 -6
- package/dist/es/components/spinner/spinner.js.map +1 -1
- package/dist/es/components/spinner/spinner.module.js +7 -0
- package/dist/es/components/spinner/spinner.module.js.map +1 -0
- package/dist/es/components/spinner/spinner_module.css +16 -0
- package/dist/es/components/switch.js +16 -51
- package/dist/es/components/switch.js.map +1 -1
- package/dist/es/components/switch.module.js +7 -0
- package/dist/es/components/switch.module.js.map +1 -0
- package/dist/es/components/switch_module.css +69 -0
- package/dist/es/components/tabs.d.ts +2 -2
- package/dist/es/components/tabs.js +14 -51
- package/dist/es/components/tabs.js.map +1 -1
- package/dist/es/components/tabs.module.js +7 -0
- package/dist/es/components/tabs.module.js.map +1 -0
- package/dist/es/components/tabs_module.css +50 -0
- package/dist/es/components/text-area.d.ts +1 -3
- package/dist/es/components/text-area.js +7 -43
- package/dist/es/components/text-area.js.map +1 -1
- package/dist/es/components/text-field.d.ts +58 -0
- package/dist/es/components/text-field.js +17 -39
- package/dist/es/components/text-field.js.map +1 -1
- package/dist/es/components/text-field.module.js +7 -0
- package/dist/es/components/text-field.module.js.map +1 -0
- package/dist/es/components/text-field_module.css +33 -0
- package/dist/es/components/toggle-button.d.ts +2 -4
- package/dist/es/components/toggle-button.js +21 -161
- package/dist/es/components/toggle-button.js.map +1 -1
- package/dist/es/components/tooltip.js +22 -28
- package/dist/es/components/tooltip.js.map +1 -1
- package/dist/es/components/tooltip.module.js +7 -0
- package/dist/es/components/tooltip.module.js.map +1 -0
- package/dist/es/components/tooltip_module.css +66 -0
- package/dist/es/components/typography/heading.d.ts +59 -44
- package/dist/es/components/typography/heading.js +14 -13
- package/dist/es/components/typography/heading.js.map +1 -1
- package/dist/es/components/typography/heading.module.js +7 -0
- package/dist/es/components/typography/heading.module.js.map +1 -0
- package/dist/es/components/typography/heading_module.css +56 -0
- package/dist/es/components/typography/text.d.ts +2 -2
- package/dist/es/components/typography/text.js +17 -16
- package/dist/es/components/typography/text.js.map +1 -1
- package/dist/es/components/typography/text.module.js +7 -0
- package/dist/es/components/typography/text.module.js.map +1 -0
- package/dist/es/components/typography/text_module.css +64 -0
- package/dist/es/index.d.ts +6 -7
- package/dist/es/index.js +6 -7
- package/dist/es/index.js.map +1 -1
- package/dist/es/plugin.js +138 -2
- package/dist/es/plugin.js.map +1 -1
- package/dist/es/style.css +109 -0
- package/dist/lib/assets/active.4113e6b2.png +0 -0
- package/dist/lib/assets/checked-disabled.b5430cf5.png +0 -0
- package/dist/lib/assets/checked-hover.d13cb1b3.png +0 -0
- package/dist/lib/assets/checked-hovered.67390091.png +0 -0
- package/dist/lib/assets/checked-pressed.cffd963b.png +0 -0
- package/dist/lib/assets/checked.3258b858.png +0 -0
- package/dist/lib/assets/checked.b9e4b215.png +0 -0
- package/dist/lib/assets/closed.484c8084.png +0 -0
- package/dist/lib/assets/disabled.87ad565d.png +0 -0
- package/dist/lib/assets/hover.404fa456.png +0 -0
- package/dist/lib/assets/indeterminate-hover.68fcbcda.png +0 -0
- package/dist/lib/assets/indeterminate.90d6dc3e.png +0 -0
- package/dist/lib/assets/normal.e4c594a1.png +0 -0
- package/dist/lib/assets/open.a8643ee6.png +0 -0
- package/dist/lib/assets/search.c15f1e1d.png +0 -0
- package/dist/lib/assets/spinner.a69432f7.png +0 -0
- package/dist/lib/assets/unchecked-disabled.702505e2.png +0 -0
- package/dist/lib/assets/unchecked-hover.c8e5f2d0.png +0 -0
- package/dist/lib/assets/unchecked-hovered.e26c4420.png +0 -0
- package/dist/lib/assets/unchecked-pressed.161ab6f8.png +0 -0
- package/dist/lib/assets/unchecked.ad8e0a95.png +0 -0
- package/dist/lib/assets/unchecked.cc033abe.png +0 -0
- package/dist/lib/components/accordion.d.ts +56 -4
- package/dist/lib/components/accordion.js +24 -42
- package/dist/lib/components/accordion.js.map +1 -1
- package/dist/lib/{utilities/view-transition.js → components/accordion.module.js} +7 -19
- package/dist/lib/components/accordion.module.js.map +1 -0
- package/dist/lib/components/accordion_module.css +37 -0
- package/dist/lib/components/breadcrumbs.js +26 -8
- package/dist/lib/components/breadcrumbs.js.map +1 -1
- package/dist/lib/{utilities/tv.js → components/breadcrumbs.module.js} +7 -25
- package/dist/lib/components/breadcrumbs.module.js.map +1 -0
- package/dist/lib/components/breadcrumbs_module.css +23 -0
- package/dist/lib/components/button-link.d.ts +11 -0
- package/dist/lib/components/button-link.js +64 -0
- package/dist/lib/components/button-link.js.map +1 -0
- package/dist/lib/components/button.d.ts +67 -2
- package/dist/lib/components/button.js +38 -159
- package/dist/lib/components/button.js.map +1 -1
- package/dist/lib/components/button.module.js +27 -0
- package/dist/lib/components/button.module.js.map +1 -0
- package/dist/lib/components/button_module.css +158 -0
- package/dist/lib/components/card.d.ts +3 -3
- package/dist/lib/components/card.js +29 -39
- package/dist/lib/components/card.js.map +1 -1
- package/dist/lib/{utilities/outline.js → components/card.module.js} +7 -10
- package/dist/lib/components/card.module.js.map +1 -0
- package/dist/lib/components/card_module.css +16 -0
- package/dist/lib/components/checkbox/checkbox.js +87 -0
- package/dist/lib/components/checkbox/checkbox.js.map +1 -0
- package/dist/lib/{utilities/css-id.js → components/checkbox/checkbox.module.js} +7 -13
- package/dist/lib/components/checkbox/checkbox.module.js.map +1 -0
- package/dist/lib/components/checkbox/checkbox_module.css +17 -0
- package/dist/lib/components/divider.d.ts +1 -20
- package/dist/lib/components/divider.js +20 -9
- package/dist/lib/components/divider.js.map +1 -1
- package/dist/lib/components/divider.module.js +27 -0
- package/dist/lib/components/divider.module.js.map +1 -0
- package/dist/lib/components/divider_module.css +29 -0
- package/dist/lib/components/modal.js +23 -24
- package/dist/lib/components/modal.js.map +1 -1
- package/dist/lib/components/modal.module.js +27 -0
- package/dist/lib/components/modal.module.js.map +1 -0
- package/dist/lib/components/modal_module.css +80 -0
- package/dist/lib/components/number-field.js +26 -18
- package/dist/lib/components/number-field.js.map +1 -1
- package/dist/lib/components/number-field.module.js +27 -0
- package/dist/lib/components/number-field.module.js.map +1 -0
- package/dist/lib/components/number-field_module.css +54 -0
- package/dist/lib/components/popover.module.css +0 -0
- package/dist/lib/components/progress-bar.js +16 -21
- package/dist/lib/components/progress-bar.js.map +1 -1
- package/dist/lib/components/progress-bar.module.js +27 -0
- package/dist/lib/components/progress-bar.module.js.map +1 -0
- package/dist/lib/components/progress-bar_module.css +33 -0
- package/dist/lib/components/radio-group/radio-group.js +78 -0
- package/dist/lib/components/radio-group/radio-group.js.map +1 -0
- package/dist/lib/components/radio-group/radio-group.module.js +27 -0
- package/dist/lib/components/radio-group/radio-group.module.js.map +1 -0
- package/dist/lib/components/radio-group/radio-group_module.css +53 -0
- package/dist/lib/components/{search-field.d.ts → search-field/search-field.d.ts} +1 -1
- package/dist/lib/components/search-field/search-field.js +97 -0
- package/dist/lib/components/search-field/search-field.js.map +1 -0
- package/dist/lib/components/search-field/search-field.module.js +27 -0
- package/dist/lib/components/search-field/search-field.module.js.map +1 -0
- package/dist/lib/components/search-field/search-field_module.css +76 -0
- package/dist/lib/components/select/select.js +103 -0
- package/dist/lib/components/select/select.js.map +1 -0
- package/dist/lib/components/select/select.module.js +27 -0
- package/dist/lib/components/select/select.module.js.map +1 -0
- package/dist/lib/components/select/select_module.css +75 -0
- package/dist/lib/components/slider/slider.js +42 -50
- package/dist/lib/components/slider/slider.js.map +1 -1
- package/dist/lib/components/slider/slider.module.js +27 -0
- package/dist/lib/components/slider/slider.module.js.map +1 -0
- package/dist/lib/components/slider/slider_module.css +60 -0
- package/dist/lib/components/spinner/spinner.js +15 -7
- package/dist/lib/components/spinner/spinner.js.map +1 -1
- package/dist/lib/components/spinner/spinner.module.js +27 -0
- package/dist/lib/components/spinner/spinner.module.js.map +1 -0
- package/dist/lib/components/spinner/spinner_module.css +16 -0
- package/dist/lib/components/switch.js +26 -46
- package/dist/lib/components/switch.js.map +1 -1
- package/dist/lib/components/switch.module.js +27 -0
- package/dist/lib/components/switch.module.js.map +1 -0
- package/dist/lib/components/switch_module.css +69 -0
- package/dist/lib/components/tabs.d.ts +2 -2
- package/dist/lib/components/tabs.js +24 -51
- package/dist/lib/components/tabs.js.map +1 -1
- package/dist/lib/components/tabs.module.js +27 -0
- package/dist/lib/components/tabs.module.js.map +1 -0
- package/dist/lib/components/tabs_module.css +50 -0
- package/dist/lib/components/text-area.d.ts +1 -3
- package/dist/lib/components/text-area.js +7 -43
- package/dist/lib/components/text-area.js.map +1 -1
- package/dist/lib/components/text-field.d.ts +58 -0
- package/dist/lib/components/text-field.js +29 -40
- package/dist/lib/components/text-field.js.map +1 -1
- package/dist/lib/components/text-field.module.js +27 -0
- package/dist/lib/components/text-field.module.js.map +1 -0
- package/dist/lib/components/text-field_module.css +33 -0
- package/dist/lib/components/toggle-button.d.ts +2 -4
- package/dist/lib/components/toggle-button.js +31 -152
- package/dist/lib/components/toggle-button.js.map +1 -1
- package/dist/lib/components/tooltip.js +32 -28
- package/dist/lib/components/tooltip.js.map +1 -1
- package/dist/lib/components/tooltip.module.js +27 -0
- package/dist/lib/components/tooltip.module.js.map +1 -0
- package/dist/lib/components/tooltip_module.css +66 -0
- package/dist/lib/components/typography/heading.d.ts +59 -44
- package/dist/lib/components/typography/heading.js +24 -13
- package/dist/lib/components/typography/heading.js.map +1 -1
- package/dist/lib/components/typography/heading.module.js +27 -0
- package/dist/lib/components/typography/heading.module.js.map +1 -0
- package/dist/lib/components/typography/heading_module.css +56 -0
- package/dist/lib/components/typography/text.d.ts +2 -2
- package/dist/lib/components/typography/text.js +27 -16
- package/dist/lib/components/typography/text.js.map +1 -1
- package/dist/lib/components/typography/text.module.js +27 -0
- package/dist/lib/components/typography/text.module.js.map +1 -0
- package/dist/lib/components/typography/text_module.css +64 -0
- package/dist/lib/index.d.ts +6 -7
- package/dist/lib/index.js +13 -15
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/plugin.js +138 -2
- package/dist/lib/plugin.js.map +1 -1
- package/dist/lib/style.css +109 -0
- package/package.json +21 -9
- package/readme.md +45 -0
- package/README.md +0 -9
- package/dist/es/components/checkbox.js +0 -54
- package/dist/es/components/checkbox.js.map +0 -1
- package/dist/es/components/radio-group.js +0 -82
- package/dist/es/components/radio-group.js.map +0 -1
- package/dist/es/components/search-field.js +0 -95
- package/dist/es/components/search-field.js.map +0 -1
- package/dist/es/components/select.js +0 -116
- package/dist/es/components/select.js.map +0 -1
- package/dist/es/components/slider/images.d.ts +0 -4
- package/dist/es/components/slider/images.js +0 -12
- package/dist/es/components/slider/images.js.map +0 -1
- package/dist/es/components/spinner/images.d.ts +0 -1
- package/dist/es/components/spinner/images.js +0 -6
- package/dist/es/components/spinner/images.js.map +0 -1
- package/dist/es/utilities/css-id.d.ts +0 -1
- package/dist/es/utilities/css-id.js +0 -9
- package/dist/es/utilities/css-id.js.map +0 -1
- package/dist/es/utilities/gradient.d.ts +0 -8
- package/dist/es/utilities/gradient.js +0 -20
- package/dist/es/utilities/gradient.js.map +0 -1
- package/dist/es/utilities/outline.d.ts +0 -1
- package/dist/es/utilities/outline.js +0 -6
- package/dist/es/utilities/outline.js.map +0 -1
- package/dist/es/utilities/theme.d.ts +0 -98
- package/dist/es/utilities/theme.js +0 -113
- package/dist/es/utilities/theme.js.map +0 -1
- package/dist/es/utilities/tv.d.ts +0 -1
- package/dist/es/utilities/tv.js +0 -21
- package/dist/es/utilities/tv.js.map +0 -1
- package/dist/es/utilities/view-transition.d.ts +0 -1
- package/dist/es/utilities/view-transition.js +0 -15
- package/dist/es/utilities/view-transition.js.map +0 -1
- package/dist/lib/components/checkbox.js +0 -76
- package/dist/lib/components/checkbox.js.map +0 -1
- package/dist/lib/components/radio-group.js +0 -104
- package/dist/lib/components/radio-group.js.map +0 -1
- package/dist/lib/components/search-field.js +0 -115
- package/dist/lib/components/search-field.js.map +0 -1
- package/dist/lib/components/select.js +0 -128
- package/dist/lib/components/select.js.map +0 -1
- package/dist/lib/components/slider/images.d.ts +0 -4
- package/dist/lib/components/slider/images.js +0 -39
- package/dist/lib/components/slider/images.js.map +0 -1
- package/dist/lib/components/spinner/images.d.ts +0 -1
- package/dist/lib/components/spinner/images.js +0 -30
- package/dist/lib/components/spinner/images.js.map +0 -1
- package/dist/lib/utilities/css-id.d.ts +0 -1
- package/dist/lib/utilities/css-id.js.map +0 -1
- package/dist/lib/utilities/gradient.d.ts +0 -8
- package/dist/lib/utilities/gradient.js +0 -51
- package/dist/lib/utilities/gradient.js.map +0 -1
- package/dist/lib/utilities/outline.d.ts +0 -1
- package/dist/lib/utilities/outline.js.map +0 -1
- package/dist/lib/utilities/theme.d.ts +0 -98
- package/dist/lib/utilities/theme.js +0 -137
- package/dist/lib/utilities/theme.js.map +0 -1
- package/dist/lib/utilities/tv.d.ts +0 -1
- package/dist/lib/utilities/tv.js.map +0 -1
- package/dist/lib/utilities/view-transition.d.ts +0 -1
- package/dist/lib/utilities/view-transition.js.map +0 -1
- /package/dist/es/components/{checkbox.d.ts → checkbox/checkbox.d.ts} +0 -0
- /package/dist/es/components/{radio-group.d.ts → radio-group/radio-group.d.ts} +0 -0
- /package/dist/es/components/{select.d.ts → select/select.d.ts} +0 -0
- /package/dist/lib/components/{checkbox.d.ts → checkbox/checkbox.d.ts} +0 -0
- /package/dist/lib/components/{radio-group.d.ts → radio-group/radio-group.d.ts} +0 -0
- /package/dist/lib/components/{select.d.ts → select/select.d.ts} +0 -0
|
@@ -3,59 +3,23 @@ import {
|
|
|
3
3
|
TextArea as AriaTextArea,
|
|
4
4
|
TextField as AriaTextField
|
|
5
5
|
} from "react-aria-components";
|
|
6
|
-
import { disabledGradient, goldGradient } from "../utilities/gradient.js";
|
|
7
6
|
import { resolveClassName } from "../utilities/resolve-class-name.js";
|
|
8
|
-
import {
|
|
9
|
-
const textAreaBorder = tv({
|
|
10
|
-
base: [
|
|
11
|
-
"flex bg-gradient-to-t p-px outline-none",
|
|
12
|
-
goldGradient,
|
|
13
|
-
"focus-within:from-lol-gold-400 focus-within:via-lol-gold-200 focus-within:to-lol-gold-100"
|
|
14
|
-
],
|
|
15
|
-
variants: {
|
|
16
|
-
isDisabled: {
|
|
17
|
-
true: [disabledGradient]
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
const textArea = tv({
|
|
22
|
-
base: [
|
|
23
|
-
"bg-lol-grey-hextech-black min-h-full w-full px-3 py-2 outline-none",
|
|
24
|
-
"text-lol-gold-100 font-spiegel text-xs tracking-wide",
|
|
25
|
-
"focus-within:from-lol-grey-200 focus-within:via-lol-grey-300 focus-within:to-lol-grey-300 focus-within:bg-gradient-to-t"
|
|
26
|
-
],
|
|
27
|
-
variants: {
|
|
28
|
-
isDisabled: {
|
|
29
|
-
true: ["text-lol-grey-150"]
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
});
|
|
7
|
+
import { textField } from "./text-field.js";
|
|
33
8
|
function TextArea({
|
|
34
9
|
textAreaProps = {},
|
|
35
|
-
borderProps = {},
|
|
36
10
|
children,
|
|
37
11
|
...props
|
|
38
12
|
}) {
|
|
39
13
|
return /* @__PURE__ */ jsx(AriaTextField, { ...props, children: (values) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
14
|
typeof children === "function" ? children(values) : children,
|
|
41
15
|
/* @__PURE__ */ jsx(
|
|
42
|
-
|
|
16
|
+
AriaTextArea,
|
|
43
17
|
{
|
|
44
|
-
...
|
|
45
|
-
className:
|
|
46
|
-
...
|
|
47
|
-
className: resolveClassName(
|
|
48
|
-
})
|
|
49
|
-
children: /* @__PURE__ */ jsx(
|
|
50
|
-
AriaTextArea,
|
|
51
|
-
{
|
|
52
|
-
...textAreaProps,
|
|
53
|
-
className: (values2) => textArea({
|
|
54
|
-
...values2,
|
|
55
|
-
className: resolveClassName(textAreaProps?.className, values2)
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
)
|
|
18
|
+
...textAreaProps,
|
|
19
|
+
className: (values2) => textField({
|
|
20
|
+
...values2,
|
|
21
|
+
className: resolveClassName(textAreaProps?.className, values2)
|
|
22
|
+
})
|
|
59
23
|
}
|
|
60
24
|
)
|
|
61
25
|
] }) });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"
|
|
1
|
+
{"version":3,"mappings":"AAqBI,mBAEC,KAFD;AAjBJ;AAAA,EACC,YAAY;AAAA,EACZ,aAAa;AAAA,OACP;AACP,SAAS,wBAAwB;AACjC,SAAS,iBAAiB;AAEnB,SAAS,SAAS;AAAA,EACxB,gBAAgB,CAAC;AAAA,EACjB;AAAA,EACA,GAAG;AACJ,GAEG;AACF,SACC,oBAAC,iBAAe,GAAG,OACjB,WAAC,WACD,iCACE;AAAA,WAAO,aAAa,aAAa,SAAS,MAAM,IAAI;AAAA,IACrD;AAAA,MAAC;AAAA;AAAA,QACC,GAAG;AAAA,QACJ,WAAW,CAACA,YACX,UAAU;AAAA,UACT,GAAGA;AAAA,UACH,WAAW,iBAAiB,eAAe,WAAWA,OAAM;AAAA,QAC7D,CAAC;AAAA;AAAA,IAEH;AAAA,KACD,GAEF;AAEF","names":["values"],"ignoreList":[],"sources":["../../../src/components/text-area.tsx"],"sourcesContent":["import type {\n\tTextFieldProps as AriaTextFieldProps,\n\tTextAreaProps,\n} from \"react-aria-components\";\nimport {\n\tTextArea as AriaTextArea,\n\tTextField as AriaTextField,\n} from \"react-aria-components\";\nimport { resolveClassName } from \"../utilities/resolve-class-name.js\";\nimport { textField } from \"./text-field.js\";\n\nexport function TextArea({\n\ttextAreaProps = {},\n\tchildren,\n\t...props\n}: AriaTextFieldProps & {\n\ttextAreaProps?: TextAreaProps;\n}) {\n\treturn (\n\t\t<AriaTextField {...props}>\n\t\t\t{(values) => (\n\t\t\t\t<>\n\t\t\t\t\t{typeof children === \"function\" ? children(values) : children}\n\t\t\t\t\t<AriaTextArea\n\t\t\t\t\t\t{...textAreaProps}\n\t\t\t\t\t\tclassName={(values) =>\n\t\t\t\t\t\t\ttextField({\n\t\t\t\t\t\t\t\t...values,\n\t\t\t\t\t\t\t\tclassName: resolveClassName(textAreaProps?.className, values),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</AriaTextField>\n\t);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6IiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W119"]}
|
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
import type { ComponentProps } from "react";
|
|
2
2
|
import type { TextFieldProps as AriaTextFieldProps, InputProps } from "react-aria-components";
|
|
3
|
+
export declare const textField: (props?: ({
|
|
4
|
+
isDisabled?: boolean | undefined;
|
|
5
|
+
isFocused?: boolean | undefined;
|
|
6
|
+
} & ({
|
|
7
|
+
class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
} | null | undefined)[] | {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
} | null | undefined)[] | {
|
|
12
|
+
[x: string]: any;
|
|
13
|
+
} | null | undefined)[] | {
|
|
14
|
+
[x: string]: any;
|
|
15
|
+
} | null | undefined)[] | {
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
} | null | undefined)[] | {
|
|
18
|
+
[x: string]: any;
|
|
19
|
+
} | null | undefined)[] | {
|
|
20
|
+
[x: string]: any;
|
|
21
|
+
} | null | undefined)[] | {
|
|
22
|
+
[x: string]: any;
|
|
23
|
+
} | null | undefined)[] | {
|
|
24
|
+
[x: string]: any;
|
|
25
|
+
} | null | undefined)[] | {
|
|
26
|
+
[x: string]: any;
|
|
27
|
+
} | null | undefined)[] | {
|
|
28
|
+
[x: string]: any;
|
|
29
|
+
} | null | undefined)[] | {
|
|
30
|
+
[x: string]: any;
|
|
31
|
+
} | null | undefined;
|
|
32
|
+
className?: never;
|
|
33
|
+
} | {
|
|
34
|
+
class?: never;
|
|
35
|
+
className?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any | {
|
|
36
|
+
[x: string]: any;
|
|
37
|
+
} | null | undefined)[] | {
|
|
38
|
+
[x: string]: any;
|
|
39
|
+
} | null | undefined)[] | {
|
|
40
|
+
[x: string]: any;
|
|
41
|
+
} | null | undefined)[] | {
|
|
42
|
+
[x: string]: any;
|
|
43
|
+
} | null | undefined)[] | {
|
|
44
|
+
[x: string]: any;
|
|
45
|
+
} | null | undefined)[] | {
|
|
46
|
+
[x: string]: any;
|
|
47
|
+
} | null | undefined)[] | {
|
|
48
|
+
[x: string]: any;
|
|
49
|
+
} | null | undefined)[] | {
|
|
50
|
+
[x: string]: any;
|
|
51
|
+
} | null | undefined)[] | {
|
|
52
|
+
[x: string]: any;
|
|
53
|
+
} | null | undefined)[] | {
|
|
54
|
+
[x: string]: any;
|
|
55
|
+
} | null | undefined)[] | {
|
|
56
|
+
[x: string]: any;
|
|
57
|
+
} | null | undefined)[] | {
|
|
58
|
+
[x: string]: any;
|
|
59
|
+
} | null | undefined;
|
|
60
|
+
})) | undefined) => string;
|
|
3
61
|
export declare function TextField({ inputProps, borderProps, children, ...props }: AriaTextFieldProps & {
|
|
4
62
|
inputProps?: InputProps;
|
|
5
63
|
borderProps?: ComponentProps<"div">;
|
|
@@ -3,30 +3,17 @@ import {
|
|
|
3
3
|
Input as AriaInput,
|
|
4
4
|
TextField as AriaTextField
|
|
5
5
|
} from "react-aria-components";
|
|
6
|
-
import { disabledGradient, goldGradient } from "../utilities/gradient.js";
|
|
7
6
|
import { resolveClassName } from "../utilities/resolve-class-name.js";
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
goldGradient,
|
|
13
|
-
"focus-within:from-lol-gold-400 focus-within:via-lol-gold-200 focus-within:to-lol-gold-100"
|
|
14
|
-
],
|
|
7
|
+
import { cva } from "cva";
|
|
8
|
+
import classes from "./text-field.module";
|
|
9
|
+
const textField = cva({
|
|
10
|
+
base: classes.textField,
|
|
15
11
|
variants: {
|
|
16
12
|
isDisabled: {
|
|
17
|
-
true:
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const textField = tv({
|
|
22
|
-
base: [
|
|
23
|
-
"bg-lol-grey-hextech-black min-h-full w-full px-3 py-2 outline-none",
|
|
24
|
-
"text-lol-gold-100 font-spiegel text-xs tracking-wide",
|
|
25
|
-
"focus-within:from-lol-grey-200 focus-within:via-lol-grey-300 focus-within:to-lol-grey-300 focus-within:bg-gradient-to-t"
|
|
26
|
-
],
|
|
27
|
-
variants: {
|
|
28
|
-
isDisabled: {
|
|
29
|
-
true: ["text-lol-grey-150"]
|
|
13
|
+
true: classes.disabled
|
|
14
|
+
},
|
|
15
|
+
isFocused: {
|
|
16
|
+
true: classes.focus
|
|
30
17
|
}
|
|
31
18
|
}
|
|
32
19
|
});
|
|
@@ -39,30 +26,21 @@ function TextField({
|
|
|
39
26
|
return /* @__PURE__ */ jsx(AriaTextField, { ...props, children: (values) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40
27
|
typeof children === "function" ? children(values) : children,
|
|
41
28
|
/* @__PURE__ */ jsx(
|
|
42
|
-
|
|
29
|
+
AriaInput,
|
|
43
30
|
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
AriaInput,
|
|
51
|
-
{
|
|
52
|
-
type: "text",
|
|
53
|
-
...inputProps,
|
|
54
|
-
className: (values2) => textField({
|
|
55
|
-
...values2,
|
|
56
|
-
className: resolveClassName(inputProps?.className, values2)
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
)
|
|
31
|
+
type: "text",
|
|
32
|
+
...inputProps,
|
|
33
|
+
className: (values2) => textField({
|
|
34
|
+
...values2,
|
|
35
|
+
className: resolveClassName(inputProps?.className, values2)
|
|
36
|
+
})
|
|
60
37
|
}
|
|
61
38
|
)
|
|
62
39
|
] }) });
|
|
63
40
|
}
|
|
64
41
|
export {
|
|
65
|
-
TextField
|
|
42
|
+
TextField,
|
|
43
|
+
textField
|
|
66
44
|
};
|
|
67
45
|
|
|
68
46
|
//# sourceMappingURL=text-field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"
|
|
1
|
+
{"version":3,"mappings":"AAsCI,mBAGC,KAHD;AAjCJ;AAAA,EACC,SAAS;AAAA,EACT,aAAa;AAAA,OACP;AACP,SAAS,wBAAwB;AAEjC,SAAS,WAAW;AACpB,OAAO,aAAa;AAEb,MAAM,YAAY,IAAI;AAAA,EAC5B,MAAM,QAAQ;AAAA,EACd,UAAU;AAAA,IACT,YAAY;AAAA,MACX,MAAM,QAAQ;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACV,MAAM,QAAQ;AAAA,IACf;AAAA,EACD;AACD,CAAC;AAEM,SAAS,UAAU;AAAA,EACzB,aAAa,CAAC;AAAA,EACd,cAAc,CAAC;AAAA,EACf;AAAA,EACA,GAAG;AACJ,GAGG;AACF,SACC,oBAAC,iBAAe,GAAG,OACjB,WAAC,WACD,iCACE;AAAA,WAAO,aAAa,aAAa,SAAS,MAAM,IAAI;AAAA,IAErD;AAAA,MAAC;AAAA;AAAA,QACA,MAAK;AAAA,QACJ,GAAG;AAAA,QACJ,WAAW,CAACA,YACX,UAAU;AAAA,UACT,GAAGA;AAAA,UACH,WAAW,iBAAiB,YAAY,WAAWA,OAAM;AAAA,QAC1D,CAAC;AAAA;AAAA,IAEH;AAAA,KACD,GAEF;AAEF","names":["values"],"ignoreList":[],"sources":["../../../src/components/text-field.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport type {\n\tTextFieldProps as AriaTextFieldProps,\n\tInputProps,\n} from \"react-aria-components\";\nimport {\n\tInput as AriaInput,\n\tTextField as AriaTextField,\n} from \"react-aria-components\";\nimport { resolveClassName } from \"../utilities/resolve-class-name.js\";\n\nimport { cva } from \"cva\";\nimport classes from \"./text-field.module\";\n\nexport const textField = cva({\n\tbase: classes.textField,\n\tvariants: {\n\t\tisDisabled: {\n\t\t\ttrue: classes.disabled,\n\t\t},\n\t\tisFocused: {\n\t\t\ttrue: classes.focus,\n\t\t},\n\t},\n});\n\nexport function TextField({\n\tinputProps = {},\n\tborderProps = {},\n\tchildren,\n\t...props\n}: AriaTextFieldProps & {\n\tinputProps?: InputProps;\n\tborderProps?: ComponentProps<\"div\">;\n}) {\n\treturn (\n\t\t<AriaTextField {...props}>\n\t\t\t{(values) => (\n\t\t\t\t<>\n\t\t\t\t\t{typeof children === \"function\" ? children(values) : children}\n\n\t\t\t\t\t<AriaInput\n\t\t\t\t\t\ttype=\"text\"\n\t\t\t\t\t\t{...inputProps}\n\t\t\t\t\t\tclassName={(values) =>\n\t\t\t\t\t\t\ttextField({\n\t\t\t\t\t\t\t\t...values,\n\t\t\t\t\t\t\t\tclassName: resolveClassName(inputProps?.className, values),\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</AriaTextField>\n\t);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6IiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W119"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":"AAAA,OAAO;AAA0B,IAAO,qBAAQ,EAAC,aAAY,mBAAkB,YAAW,kBAAiB,SAAQ,cAAa","names":[],"ignoreList":[],"sources":["../../../src/components/text-field.module.css"],"sourcesContent":["import \"./text-field_module.css\";export default {\"textField\":\"textField_32558\",\"disabled\":\"disabled_32558\",\"focus\":\"focus_32558\"}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6IiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W119"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.textField_32558 {
|
|
2
|
+
background:
|
|
3
|
+
var(--lol-input-background-gradient) padding-box,
|
|
4
|
+
var(--lol-input-border-gradient) border-box;
|
|
5
|
+
|
|
6
|
+
--lol-input-border-gradient: var(--lol-gradient-gold);
|
|
7
|
+
--lol-input-background-gradient: var(--lol-gradient-hextech-black);
|
|
8
|
+
|
|
9
|
+
border: 1px solid transparent;
|
|
10
|
+
grid-area: input;
|
|
11
|
+
padding: 0.5rem 0.75rem;
|
|
12
|
+
margin: 0;
|
|
13
|
+
font-size: 0.75rem;
|
|
14
|
+
line-height: 1rem;
|
|
15
|
+
color: var(--field-text-color);
|
|
16
|
+
outline: none;
|
|
17
|
+
font-family: var(--lol-font-family-spiegel);
|
|
18
|
+
font-weight: 500;
|
|
19
|
+
letter-spacing: 0.025em;
|
|
20
|
+
|
|
21
|
+
color: var(--lol-color-gold-100);
|
|
22
|
+
|
|
23
|
+
display: flex;
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
.textField_32558.disabled_32558 {
|
|
27
|
+
--lol-input-border-gradient: var(--lol-gradient-disabled);
|
|
28
|
+
color: var(--lol-color-grey-150);
|
|
29
|
+
}
|
|
30
|
+
.textField_32558.focus_32558 {
|
|
31
|
+
--lol-input-border-gradient: var(--lol-gradient-gold-hover);
|
|
32
|
+
--lol-input-background-gradient: var(--lol-gradient-grey-focus);
|
|
33
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type { ComponentProps } from "react";
|
|
2
1
|
import { type ToggleButtonProps as AriaToggleButtonProps } from "react-aria-components";
|
|
3
2
|
export type ToggleButtonShape = "round" | "square" | "normal";
|
|
4
|
-
export type ToggleButtonPreset = "
|
|
3
|
+
export type ToggleButtonPreset = "secondary" | "hextech" | "dimmed";
|
|
5
4
|
interface ToggleButtonProps extends AriaToggleButtonProps {
|
|
6
|
-
innerProps?: ComponentProps<"span">;
|
|
7
5
|
preset?: ToggleButtonPreset;
|
|
8
6
|
thin?: boolean;
|
|
9
7
|
shape?: ToggleButtonShape;
|
|
10
8
|
}
|
|
11
|
-
export declare function ToggleButton({ children, className,
|
|
9
|
+
export declare function ToggleButton({ children, className, preset, shape, thin, ...props }: ToggleButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -1,171 +1,47 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "cva";
|
|
2
3
|
import {
|
|
3
4
|
ToggleButton as AriaToggleButton
|
|
4
5
|
} from "react-aria-components";
|
|
5
|
-
import {
|
|
6
|
-
dimmedGradient,
|
|
7
|
-
disabledGradient,
|
|
8
|
-
goldGradient,
|
|
9
|
-
goldGradientHover,
|
|
10
|
-
goldGradientPressed,
|
|
11
|
-
hextechGradient,
|
|
12
|
-
hextechGradientHover,
|
|
13
|
-
hextechGradientPressed
|
|
14
|
-
} from "../utilities/gradient.js";
|
|
15
6
|
import { resolveClassName } from "../utilities/resolve-class-name.js";
|
|
16
|
-
import
|
|
17
|
-
const
|
|
18
|
-
base:
|
|
7
|
+
import classes from "./button.module";
|
|
8
|
+
const button = cva({
|
|
9
|
+
base: classes.button,
|
|
19
10
|
variants: {
|
|
20
11
|
preset: {
|
|
21
|
-
|
|
22
|
-
hextech:
|
|
23
|
-
dimmed:
|
|
24
|
-
},
|
|
25
|
-
shape: {
|
|
26
|
-
round: "aspect-square rounded-full",
|
|
27
|
-
square: "aspect-square",
|
|
28
|
-
normal: ""
|
|
12
|
+
secondary: classes.secondary,
|
|
13
|
+
hextech: classes.hextech,
|
|
14
|
+
dimmed: classes.dimmed
|
|
29
15
|
},
|
|
30
16
|
isHovered: {
|
|
31
|
-
true:
|
|
17
|
+
true: classes.hover
|
|
32
18
|
},
|
|
33
19
|
isPressed: {
|
|
34
|
-
true:
|
|
20
|
+
true: classes.press
|
|
35
21
|
},
|
|
36
22
|
isDisabled: {
|
|
37
|
-
true:
|
|
38
|
-
},
|
|
39
|
-
isFocused: {
|
|
40
|
-
true: ""
|
|
23
|
+
true: classes.disabled
|
|
41
24
|
},
|
|
42
25
|
isFocusVisible: {
|
|
43
|
-
true:
|
|
26
|
+
true: classes.focusVisible
|
|
44
27
|
},
|
|
45
|
-
|
|
46
|
-
|
|
28
|
+
shape: {
|
|
29
|
+
round: classes.round,
|
|
30
|
+
square: classes.square,
|
|
31
|
+
normal: classes.normal
|
|
47
32
|
},
|
|
48
33
|
thin: {
|
|
49
|
-
true:
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
compoundVariants: [
|
|
53
|
-
{
|
|
54
|
-
preset: ["dimmed"],
|
|
55
|
-
isSelected: true,
|
|
56
|
-
class: [goldGradient]
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
preset: ["gold"],
|
|
60
|
-
class: goldGradient
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
preset: ["gold", "dimmed"],
|
|
64
|
-
isHovered: true,
|
|
65
|
-
class: goldGradientHover
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
preset: ["gold", "dimmed"],
|
|
69
|
-
isPressed: true,
|
|
70
|
-
class: goldGradientPressed
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
preset: ["gold", "dimmed"],
|
|
74
|
-
isDisabled: true,
|
|
75
|
-
class: disabledGradient
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
preset: ["gold"],
|
|
79
|
-
isFocusVisible: true,
|
|
80
|
-
class: "outline outline-offset-2 outline-yellow-50"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
preset: ["hextech"],
|
|
84
|
-
class: hextechGradient
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
preset: ["hextech"],
|
|
88
|
-
isHovered: true,
|
|
89
|
-
class: hextechGradientHover
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
preset: ["hextech"],
|
|
93
|
-
isPressed: true,
|
|
94
|
-
class: hextechGradientPressed
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
preset: ["hextech"],
|
|
98
|
-
isDisabled: true,
|
|
99
|
-
class: disabledGradient
|
|
100
|
-
}
|
|
101
|
-
]
|
|
102
|
-
});
|
|
103
|
-
const toggleButton = tv({
|
|
104
|
-
base: "text-lol-gold-300 font-beaufort block font-bold uppercase tracking-wide transition-colors duration-200",
|
|
105
|
-
variants: {
|
|
106
|
-
preset: {
|
|
107
|
-
gold: "bg-lol-grey-300",
|
|
108
|
-
hextech: "text-lol-blue-100 bg-lol-grey-300",
|
|
109
|
-
dimmed: "bg-lol-grey-hextech-black"
|
|
110
|
-
},
|
|
111
|
-
isHovered: {
|
|
112
|
-
true: "text-lol-gold-100"
|
|
113
|
-
},
|
|
114
|
-
isPressed: {
|
|
115
|
-
true: "text-lol-grey-150"
|
|
116
|
-
},
|
|
117
|
-
isDisabled: {
|
|
118
|
-
true: "text-lol-grey-150"
|
|
119
|
-
},
|
|
120
|
-
isFocused: {
|
|
121
|
-
true: ""
|
|
34
|
+
true: classes.thin
|
|
122
35
|
},
|
|
123
36
|
isSelected: {
|
|
124
|
-
true:
|
|
125
|
-
hextechGradient,
|
|
126
|
-
"text-lol-blue-100 shadow-lol-grey-300 bg-gradient-to-t shadow shadow-inner"
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
isFocusVisible: {
|
|
130
|
-
true: ""
|
|
131
|
-
},
|
|
132
|
-
shape: {
|
|
133
|
-
round: "rounded-full",
|
|
134
|
-
square: "",
|
|
135
|
-
normal: ""
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
compoundVariants: [
|
|
139
|
-
{
|
|
140
|
-
preset: ["gold", "hextech", "dimmed"],
|
|
141
|
-
class: "px-4 py-2"
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
preset: ["hextech"],
|
|
145
|
-
isHovered: true,
|
|
146
|
-
class: "text-lol-blue-100"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
preset: ["hextech"],
|
|
150
|
-
isPressed: true,
|
|
151
|
-
class: "text-lol-blue-400"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
preset: ["hextech"],
|
|
155
|
-
isSelected: true,
|
|
156
|
-
class: ""
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
shape: ["round", "square"],
|
|
160
|
-
class: "flex aspect-square h-7 items-center justify-center p-0 font-black leading-none"
|
|
37
|
+
true: classes.selected
|
|
161
38
|
}
|
|
162
|
-
|
|
39
|
+
}
|
|
163
40
|
});
|
|
164
41
|
function ToggleButton({
|
|
165
42
|
children,
|
|
166
43
|
className,
|
|
167
|
-
|
|
168
|
-
preset = "gold",
|
|
44
|
+
preset = "secondary",
|
|
169
45
|
shape = "normal",
|
|
170
46
|
thin = preset === "dimmed",
|
|
171
47
|
...props
|
|
@@ -174,30 +50,14 @@ function ToggleButton({
|
|
|
174
50
|
AriaToggleButton,
|
|
175
51
|
{
|
|
176
52
|
...props,
|
|
177
|
-
className: (values) =>
|
|
53
|
+
className: (values) => button({
|
|
178
54
|
...values,
|
|
179
55
|
preset,
|
|
180
56
|
shape,
|
|
181
57
|
thin,
|
|
182
58
|
className: resolveClassName(className, values)
|
|
183
59
|
}),
|
|
184
|
-
children
|
|
185
|
-
"span",
|
|
186
|
-
{
|
|
187
|
-
...innerProps,
|
|
188
|
-
className: toggleButton({
|
|
189
|
-
...values,
|
|
190
|
-
preset,
|
|
191
|
-
shape,
|
|
192
|
-
className: resolveClassName(innerProps.className, values)
|
|
193
|
-
}),
|
|
194
|
-
style: {
|
|
195
|
-
// backgroundImage: hextechMagic,
|
|
196
|
-
// backgroundPosition: "center",
|
|
197
|
-
},
|
|
198
|
-
children: typeof children === "function" ? children(values) : children
|
|
199
|
-
}
|
|
200
|
-
)
|
|
60
|
+
children
|
|
201
61
|
}
|
|
202
62
|
);
|
|
203
63
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"mappings":"
|
|
1
|
+
{"version":3,"mappings":"AA2DE;AA3DF,SAAS,WAAW;AACpB;AAAA,EACC,gBAAgB;AAAA,OAEV;AACP,SAAS,wBAAwB;AACjC,OAAO,aAAa;AAKpB,MAAM,SAAS,IAAI;AAAA,EAClB,MAAM,QAAQ;AAAA,EACd,UAAU;AAAA,IACT,QAAQ;AAAA,MACP,WAAW,QAAQ;AAAA,MACnB,SAAS,QAAQ;AAAA,MACjB,QAAQ,QAAQ;AAAA,IACjB;AAAA,IACA,WAAW;AAAA,MACV,MAAM,QAAQ;AAAA,IACf;AAAA,IACA,WAAW;AAAA,MACV,MAAM,QAAQ;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACX,MAAM,QAAQ;AAAA,IACf;AAAA,IACA,gBAAgB;AAAA,MACf,MAAM,QAAQ;AAAA,IACf;AAAA,IACA,OAAO;AAAA,MACN,OAAO,QAAQ;AAAA,MACf,QAAQ,QAAQ;AAAA,MAChB,QAAQ,QAAQ;AAAA,IACjB;AAAA,IACA,MAAM;AAAA,MACL,MAAM,QAAQ;AAAA,IACf;AAAA,IACA,YAAY;AAAA,MACX,MAAM,QAAQ;AAAA,IACf;AAAA,EACD;AACD,CAAC;AAOM,SAAS,aAAa;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO,WAAW;AAAA,EAClB,GAAG;AACJ,GAAsB;AACrB,SACC;AAAA,IAAC;AAAA;AAAA,MACC,GAAG;AAAA,MACJ,WAAW,CAAC,WACX,OAAO;AAAA,QACN,GAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,iBAAiB,WAAW,MAAM;AAAA,MAC9C,CAAC;AAAA,MAGD;AAAA;AAAA,EACF;AAEF","names":[],"ignoreList":[],"sources":["../../../src/components/toggle-button.tsx"],"sourcesContent":["import { cva } from \"cva\";\nimport {\n\tToggleButton as AriaToggleButton,\n\ttype ToggleButtonProps as AriaToggleButtonProps,\n} from \"react-aria-components\";\nimport { resolveClassName } from \"../utilities/resolve-class-name.js\";\nimport classes from \"./button.module\";\n\nexport type ToggleButtonShape = \"round\" | \"square\" | \"normal\";\nexport type ToggleButtonPreset = \"secondary\" | \"hextech\" | \"dimmed\";\n\nconst button = cva({\n\tbase: classes.button,\n\tvariants: {\n\t\tpreset: {\n\t\t\tsecondary: classes.secondary,\n\t\t\thextech: classes.hextech,\n\t\t\tdimmed: classes.dimmed,\n\t\t},\n\t\tisHovered: {\n\t\t\ttrue: classes.hover,\n\t\t},\n\t\tisPressed: {\n\t\t\ttrue: classes.press,\n\t\t},\n\t\tisDisabled: {\n\t\t\ttrue: classes.disabled,\n\t\t},\n\t\tisFocusVisible: {\n\t\t\ttrue: classes.focusVisible,\n\t\t},\n\t\tshape: {\n\t\t\tround: classes.round,\n\t\t\tsquare: classes.square,\n\t\t\tnormal: classes.normal,\n\t\t},\n\t\tthin: {\n\t\t\ttrue: classes.thin,\n\t\t},\n\t\tisSelected: {\n\t\t\ttrue: classes.selected,\n\t\t},\n\t},\n});\ninterface ToggleButtonProps extends AriaToggleButtonProps {\n\tpreset?: ToggleButtonPreset;\n\tthin?: boolean;\n\tshape?: ToggleButtonShape;\n}\n\nexport function ToggleButton({\n\tchildren,\n\tclassName,\n\tpreset = \"secondary\",\n\tshape = \"normal\",\n\tthin = preset === \"dimmed\",\n\t...props\n}: ToggleButtonProps) {\n\treturn (\n\t\t<AriaToggleButton\n\t\t\t{...props}\n\t\t\tclassName={(values) =>\n\t\t\t\tbutton({\n\t\t\t\t\t...values,\n\t\t\t\t\tpreset,\n\t\t\t\t\tshape,\n\t\t\t\t\tthin,\n\t\t\t\t\tclassName: resolveClassName(className, values),\n\t\t\t\t})\n\t\t\t}\n\t\t>\n\t\t\t{children}\n\t\t</AriaToggleButton>\n\t);\n}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJtYXBwaW5ncyI6IiIsIm5hbWVzIjpbXSwiaWdub3JlTGlzdCI6W10sInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W119"]}
|
|
@@ -1,46 +1,40 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "cva";
|
|
2
3
|
import { Tooltip as AriaTooltip, OverlayArrow } from "react-aria-components";
|
|
3
|
-
import { goldGradient } from "../utilities/gradient.js";
|
|
4
4
|
import { resolveClassName } from "../utilities/resolve-class-name.js";
|
|
5
|
-
import
|
|
6
|
-
const tooltipBorder =
|
|
7
|
-
base:
|
|
5
|
+
import classes from "./tooltip.module";
|
|
6
|
+
const tooltipBorder = cva({
|
|
7
|
+
base: classes.tooltip,
|
|
8
8
|
variants: {
|
|
9
|
-
isEntering: {
|
|
10
|
-
true: "animate-in fade-in data-[placement=bottom]:slide-in-from-top-1 data-[placement=top]:slide-in-from-bottom-1 fill-mode-forwards duration-200 ease-out"
|
|
11
|
-
},
|
|
12
|
-
isExiting: {
|
|
13
|
-
true: "animate-out fade-out data-[placement=bottom]:slide-out-to-top-1 data-[placement=top]:slide-out-to-bottom-1 fill-mode-forwards duration-150 ease-in"
|
|
14
|
-
},
|
|
15
9
|
placement: {
|
|
16
|
-
bottom:
|
|
17
|
-
top:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
bottom: classes.bottom,
|
|
11
|
+
top: classes.top,
|
|
12
|
+
left: classes.left,
|
|
13
|
+
right: classes.right,
|
|
14
|
+
center: ""
|
|
21
15
|
}
|
|
22
16
|
}
|
|
23
17
|
});
|
|
24
|
-
const tooltipArrowBorder =
|
|
25
|
-
base:
|
|
18
|
+
const tooltipArrowBorder = cva({
|
|
19
|
+
base: classes.arrowBorder,
|
|
26
20
|
variants: {
|
|
27
21
|
placement: {
|
|
28
|
-
top:
|
|
29
|
-
bottom:
|
|
30
|
-
left:
|
|
31
|
-
right:
|
|
22
|
+
top: classes.top,
|
|
23
|
+
bottom: classes.bottom,
|
|
24
|
+
left: classes.left,
|
|
25
|
+
right: classes.right,
|
|
32
26
|
center: ""
|
|
33
27
|
}
|
|
34
28
|
}
|
|
35
29
|
});
|
|
36
|
-
const tooltipArrow =
|
|
37
|
-
base:
|
|
30
|
+
const tooltipArrow = cva({
|
|
31
|
+
base: classes.arrow,
|
|
38
32
|
variants: {
|
|
39
33
|
placement: {
|
|
40
|
-
top:
|
|
41
|
-
bottom:
|
|
42
|
-
left:
|
|
43
|
-
right:
|
|
34
|
+
top: classes.top,
|
|
35
|
+
bottom: classes.bottom,
|
|
36
|
+
left: classes.left,
|
|
37
|
+
right: classes.right,
|
|
44
38
|
center: ""
|
|
45
39
|
}
|
|
46
40
|
}
|
|
@@ -59,7 +53,7 @@ function Tooltip({ children, ...props }) {
|
|
|
59
53
|
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", className: tooltipArrowBorder(values2), children: /* @__PURE__ */ jsx("path", { d: "M0 0,L6 6,L12 0" }) }),
|
|
60
54
|
/* @__PURE__ */ jsx("svg", { viewBox: "0 0 12 12", className: tooltipArrow(values2), children: /* @__PURE__ */ jsx("path", { d: "M0 0,L6 6,L12 0" }) })
|
|
61
55
|
] }) }),
|
|
62
|
-
|
|
56
|
+
typeof children === "function" ? children(values) : children
|
|
63
57
|
] })
|
|
64
58
|
}
|
|
65
59
|
);
|