@optimum-intelligence/opti-ui 0.3.0 → 0.5.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/README.md +28 -7
- package/dist/components/accordion/Accordion.d.ts +12 -0
- package/dist/components/accordion/Accordion.js +12 -0
- package/dist/components/accordion/Accordion.js.map +1 -1
- package/dist/components/alert/Alert.d.ts +4 -0
- package/dist/components/alert/Alert.js.map +1 -1
- package/dist/components/app-shell/AppShell.d.ts +96 -5
- package/dist/components/app-shell/AppShell.js +676 -185
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +8 -0
- package/dist/components/avatar/Avatar.js +2 -0
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/badge/Badge.d.ts +10 -3
- package/dist/components/badge/Badge.js +17 -28
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/button/Button.d.ts +8 -0
- package/dist/components/button/Button.js +6 -0
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/calendar/Calendar.d.ts +21 -7
- package/dist/components/calendar/Calendar.js +285 -212
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/calendar/DateConfig.d.ts +37 -0
- package/dist/components/calendar/DateConfig.js +75 -0
- package/dist/components/calendar/DateConfig.js.map +1 -0
- package/dist/components/calendar/date-utils.d.ts +41 -6
- package/dist/components/calendar/date-utils.js +119 -20
- package/dist/components/calendar/date-utils.js.map +1 -1
- package/dist/components/card/Card.d.ts +13 -0
- package/dist/components/card/Card.js +13 -0
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/choice/Choice.d.ts +13 -0
- package/dist/components/choice/Choice.js +10 -0
- package/dist/components/choice/Choice.js.map +1 -1
- package/dist/components/combobox/Combobox.d.ts +12 -0
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +10 -0
- package/dist/components/command-palette/CommandPalette.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +4 -0
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +1 -0
- package/dist/components/data-table/DataTableContent.js +3 -3
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +3 -0
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/types.d.ts +16 -0
- package/dist/components/date-picker/DatePicker.d.ts +33 -10
- package/dist/components/date-picker/DatePicker.js +315 -279
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/date-picker/DateRangePicker.d.ts +12 -4
- package/dist/components/date-picker/DateRangePicker.js +240 -206
- package/dist/components/date-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-picker/PickerField.d.ts +13 -0
- package/dist/components/date-picker/PickerField.js +1 -1
- package/dist/components/date-picker/PickerField.js.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +5 -0
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +10 -0
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +5 -0
- package/dist/components/empty-state/EmptyState.js.map +1 -1
- package/dist/components/file-upload/FileUpload.d.ts +21 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -1
- package/dist/components/input/Input.d.ts +7 -0
- package/dist/components/input/Input.js +3 -0
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/link/Link.d.ts +1 -0
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/menu/Menu.d.ts +6 -0
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/number-field/NumberField.d.ts +7 -0
- package/dist/components/number-field/NumberField.js.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +4 -0
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/popover/Popover.d.ts +4 -0
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/preview-card/PreviewCard.d.ts +4 -0
- package/dist/components/preview-card/PreviewCard.js.map +1 -1
- package/dist/components/progress/Progress.d.ts +8 -0
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/scroll-area/ScrollArea.d.ts +1 -0
- package/dist/components/scroll-area/ScrollArea.js.map +1 -1
- package/dist/components/search-input/SearchInput.d.ts +2 -0
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/select/Select.d.ts +11 -0
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/separator/Separator.d.ts +1 -0
- package/dist/components/separator/Separator.js +1 -0
- package/dist/components/separator/Separator.js.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +7 -0
- package/dist/components/skeleton/Skeleton.js +1 -0
- package/dist/components/skeleton/Skeleton.js.map +1 -1
- package/dist/components/slider/Slider.d.ts +1 -0
- package/dist/components/slider/Slider.js.map +1 -1
- package/dist/components/spinner/Spinner.d.ts +2 -0
- package/dist/components/spinner/Spinner.js +1 -0
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/stat-card/StatCard.d.ts +4 -0
- package/dist/components/stat-card/StatCard.js.map +1 -1
- package/dist/components/stepper/Stepper.d.ts +4 -0
- package/dist/components/stepper/Stepper.js.map +1 -1
- package/dist/components/table/Table.d.ts +24 -1
- package/dist/components/table/Table.js +19 -2
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +1 -0
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tag/Tag.d.ts +3 -0
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/toast/Toast.d.ts +2 -0
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toggle/Toggle.d.ts +7 -0
- package/dist/components/toggle/Toggle.js +1 -0
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +8 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/typography/Typography.d.ts +5 -0
- package/dist/components/typography/Typography.js +2 -0
- package/dist/components/typography/Typography.js.map +1 -1
- package/dist/components.json +5534 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -3
- package/dist/llms-full.txt +2707 -0
- package/dist/llms.txt +177 -0
- package/dist/opti-ui.css +171 -81
- package/dist/theme/ThemeProvider.d.ts +1 -0
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/utils/portal.d.ts +4 -0
- package/dist/utils/portal.js +4 -0
- package/dist/utils/portal.js.map +1 -1
- package/package.json +7 -3
package/dist/opti-ui.css
CHANGED
|
@@ -33,9 +33,18 @@
|
|
|
33
33
|
--oui-radius-md: 12px;
|
|
34
34
|
--oui-radius-card: 16px;
|
|
35
35
|
--oui-radius-pill: 999px;
|
|
36
|
-
--oui-
|
|
37
|
-
--oui-
|
|
38
|
-
--oui-
|
|
36
|
+
--oui-space-1: 0.125rem;
|
|
37
|
+
--oui-space-2: 0.25rem;
|
|
38
|
+
--oui-space-3: 0.375rem;
|
|
39
|
+
--oui-space-4: 0.5rem;
|
|
40
|
+
--oui-space-5: 0.625rem;
|
|
41
|
+
--oui-space-6: 0.75rem;
|
|
42
|
+
--oui-space-8: 1rem;
|
|
43
|
+
--oui-space-10: 1.25rem;
|
|
44
|
+
--oui-space-12: 1.5rem;
|
|
45
|
+
--oui-control-height-sm: 1.75rem;
|
|
46
|
+
--oui-control-height-md: 2.25rem;
|
|
47
|
+
--oui-control-height-lg: 2.75rem;
|
|
39
48
|
--oui-control-border-width: 2px;
|
|
40
49
|
--oui-control-disabled-opacity: 0.5;
|
|
41
50
|
--oui-duration-fast: 0.15s;
|
|
@@ -501,7 +510,7 @@
|
|
|
501
510
|
align-items: center;
|
|
502
511
|
gap: 0.7rem;
|
|
503
512
|
width: 100%;
|
|
504
|
-
padding:
|
|
513
|
+
padding: var(--oui-space-3) 0.7rem;
|
|
505
514
|
border: 0;
|
|
506
515
|
border-radius: var(--oui-radius-control);
|
|
507
516
|
background: transparent;
|
|
@@ -566,6 +575,41 @@
|
|
|
566
575
|
line-height: 1.3;
|
|
567
576
|
text-align: center;
|
|
568
577
|
}
|
|
578
|
+
.oui-navbar__item-chevron {
|
|
579
|
+
flex-shrink: 0;
|
|
580
|
+
width: 1rem;
|
|
581
|
+
height: 1rem;
|
|
582
|
+
opacity: 0.7;
|
|
583
|
+
transition: transform var(--oui-duration-normal) var(--oui-ease-out), opacity var(--oui-duration-fast) var(--oui-ease) var(--oui-duration-normal);
|
|
584
|
+
}
|
|
585
|
+
[data-open] > .oui-navbar__item-chevron {
|
|
586
|
+
transform: rotate(90deg);
|
|
587
|
+
}
|
|
588
|
+
.oui-navbar__group {
|
|
589
|
+
display: flex;
|
|
590
|
+
flex-direction: column;
|
|
591
|
+
}
|
|
592
|
+
.oui-navbar__group-panel {
|
|
593
|
+
height: var(--collapsible-panel-height);
|
|
594
|
+
overflow: hidden;
|
|
595
|
+
transition: height var(--oui-duration-normal) var(--oui-ease-out);
|
|
596
|
+
}
|
|
597
|
+
.oui-navbar__group-panel[data-starting-style], .oui-navbar__group-panel[data-ending-style] {
|
|
598
|
+
height: 0;
|
|
599
|
+
}
|
|
600
|
+
.oui-navbar__group-items {
|
|
601
|
+
display: flex;
|
|
602
|
+
flex-direction: column;
|
|
603
|
+
gap: 0.15rem;
|
|
604
|
+
margin: 0.15rem 0 0.15rem 1.625rem;
|
|
605
|
+
padding-left: var(--oui-space-3);
|
|
606
|
+
border-left: 1px solid var(--_border);
|
|
607
|
+
}
|
|
608
|
+
.oui-navbar__group-items .oui-navbar__item {
|
|
609
|
+
padding-block: var(--oui-space-2);
|
|
610
|
+
padding-left: calc(1.625rem - 1px - var(--oui-space-3));
|
|
611
|
+
font-size: var(--oui-font-size-sm);
|
|
612
|
+
}
|
|
569
613
|
.oui-navbar__footer {
|
|
570
614
|
display: flex;
|
|
571
615
|
flex-direction: column;
|
|
@@ -577,7 +621,7 @@
|
|
|
577
621
|
.oui-navbar__toggle {
|
|
578
622
|
position: absolute;
|
|
579
623
|
top: 1.625rem;
|
|
580
|
-
|
|
624
|
+
left: calc(100% - 2.75rem);
|
|
581
625
|
display: inline-flex;
|
|
582
626
|
flex-shrink: 0;
|
|
583
627
|
align-items: center;
|
|
@@ -590,7 +634,7 @@
|
|
|
590
634
|
background: transparent;
|
|
591
635
|
color: var(--_fg-muted);
|
|
592
636
|
cursor: pointer;
|
|
593
|
-
transition: top var(--_motion),
|
|
637
|
+
transition: top var(--_motion), left var(--_motion), background-color var(--oui-duration-normal) var(--oui-ease), color var(--oui-duration-normal) var(--oui-ease);
|
|
594
638
|
}
|
|
595
639
|
.oui-navbar__toggle svg {
|
|
596
640
|
flex-shrink: 0;
|
|
@@ -623,6 +667,7 @@
|
|
|
623
667
|
.oui-navbar[data-collapsed] .oui-navbar__toggle,
|
|
624
668
|
.oui-navbar[data-peek] .oui-navbar__toggle {
|
|
625
669
|
top: 1.125rem;
|
|
670
|
+
left: calc((var(--oui-navbar-collapsed-width, 4.25rem) - 2rem) / 2);
|
|
626
671
|
}
|
|
627
672
|
.oui-navbar[data-collapsed] .oui-navbar__header,
|
|
628
673
|
.oui-navbar[data-peek] .oui-navbar__header {
|
|
@@ -632,14 +677,12 @@
|
|
|
632
677
|
width: var(--oui-navbar-collapsed-width, 4.25rem);
|
|
633
678
|
padding-inline: 0.5rem;
|
|
634
679
|
}
|
|
635
|
-
.oui-navbar[data-collapsed] .oui-navbar__toggle {
|
|
636
|
-
right: calc((var(--oui-navbar-collapsed-width, 4.25rem) - 2rem) / 2);
|
|
637
|
-
}
|
|
638
680
|
.oui-navbar[data-collapsed] .oui-navbar__header {
|
|
639
681
|
padding-inline: 0;
|
|
640
682
|
}
|
|
641
683
|
.oui-navbar[data-collapsed] .oui-navbar__brand-text,
|
|
642
|
-
.oui-navbar[data-collapsed] .oui-navbar__item-label
|
|
684
|
+
.oui-navbar[data-collapsed] .oui-navbar__item-label,
|
|
685
|
+
.oui-navbar[data-collapsed] .oui-navbar__item-chevron {
|
|
643
686
|
opacity: 0;
|
|
644
687
|
transition: opacity var(--oui-duration-fast) var(--oui-ease);
|
|
645
688
|
}
|
|
@@ -649,6 +692,9 @@
|
|
|
649
692
|
color: transparent;
|
|
650
693
|
font-size: 0;
|
|
651
694
|
}
|
|
695
|
+
.oui-navbar[data-collapsed] .oui-navbar__group-panel {
|
|
696
|
+
display: none;
|
|
697
|
+
}
|
|
652
698
|
.oui-navbar[data-collapsed] .oui-navbar__item-badge {
|
|
653
699
|
position: absolute;
|
|
654
700
|
top: 0.3rem;
|
|
@@ -709,39 +755,82 @@
|
|
|
709
755
|
overflow-y: auto;
|
|
710
756
|
background: var(--oui-app-shell-bg, var(--oui-color-bg));
|
|
711
757
|
}
|
|
712
|
-
.oui-app-shell__mobile-bar
|
|
758
|
+
.oui-app-shell__mobile-bar,
|
|
759
|
+
.oui-app-shell__tabbar {
|
|
713
760
|
display: none;
|
|
714
761
|
}
|
|
715
|
-
.oui-app-
|
|
716
|
-
|
|
717
|
-
|
|
762
|
+
.oui-app-shell__tabbar {
|
|
763
|
+
gap: 0.25rem;
|
|
764
|
+
padding: 0.3rem 0.4rem calc(0.3rem + env(safe-area-inset-bottom));
|
|
765
|
+
border-top: 1px solid var(--oui-color-inverse-border);
|
|
766
|
+
background: var(--oui-navbar-bg, var(--oui-color-inverse));
|
|
767
|
+
color: var(--oui-color-on-inverse-muted);
|
|
768
|
+
}
|
|
769
|
+
.oui-app-shell__tabbar[data-position=top] {
|
|
770
|
+
padding-bottom: 0.3rem;
|
|
771
|
+
border-top: 0;
|
|
772
|
+
border-bottom: 1px solid var(--oui-color-inverse-border);
|
|
773
|
+
}
|
|
774
|
+
.oui-app-shell__tab {
|
|
775
|
+
box-sizing: border-box;
|
|
776
|
+
margin: 0;
|
|
777
|
+
font-family: var(--oui-font-body);
|
|
778
|
+
-webkit-font-smoothing: antialiased;
|
|
779
|
+
-moz-osx-font-smoothing: grayscale;
|
|
780
|
+
display: flex;
|
|
781
|
+
flex: 1 1 0;
|
|
782
|
+
flex-direction: column;
|
|
718
783
|
align-items: center;
|
|
719
784
|
justify-content: center;
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
padding: 0;
|
|
785
|
+
gap: 0.2rem;
|
|
786
|
+
min-width: 0;
|
|
787
|
+
padding: 0.3rem 0.25rem;
|
|
723
788
|
border: 0;
|
|
724
789
|
border-radius: var(--oui-radius-control);
|
|
725
790
|
background: transparent;
|
|
726
791
|
color: inherit;
|
|
792
|
+
font-size: var(--oui-font-size-2xs);
|
|
793
|
+
font-weight: var(--oui-font-weight-medium);
|
|
794
|
+
text-decoration: none;
|
|
727
795
|
cursor: pointer;
|
|
728
|
-
transition: background-color var(--oui-duration-fast) var(--oui-ease);
|
|
729
|
-
}
|
|
730
|
-
.oui-app-shell__menu-button svg,
|
|
731
|
-
.oui-app-shell__drawer-close svg {
|
|
732
|
-
flex-shrink: 0;
|
|
733
|
-
width: 1.3rem;
|
|
734
|
-
height: 1.3rem;
|
|
796
|
+
transition: background-color var(--oui-duration-fast) var(--oui-ease), color var(--oui-duration-fast) var(--oui-ease);
|
|
735
797
|
}
|
|
736
|
-
.oui-app-
|
|
737
|
-
.oui-app-shell__drawer-close:hover {
|
|
798
|
+
.oui-app-shell__tab:hover {
|
|
738
799
|
background: var(--oui-color-inverse-hover);
|
|
800
|
+
color: var(--oui-color-on-inverse);
|
|
739
801
|
}
|
|
740
|
-
.oui-app-
|
|
741
|
-
.oui-app-shell__drawer-close:focus-visible {
|
|
802
|
+
.oui-app-shell__tab:focus-visible {
|
|
742
803
|
outline: 2px solid currentColor;
|
|
743
804
|
outline-offset: -2px;
|
|
744
805
|
}
|
|
806
|
+
.oui-app-shell__tab[data-active] {
|
|
807
|
+
color: var(--oui-color-on-inverse);
|
|
808
|
+
font-weight: var(--oui-font-weight-semibold);
|
|
809
|
+
}
|
|
810
|
+
.oui-app-shell__tab[data-active] .oui-app-shell__tab-icon {
|
|
811
|
+
background: var(--oui-color-accent);
|
|
812
|
+
color: var(--oui-color-on-accent);
|
|
813
|
+
}
|
|
814
|
+
.oui-app-shell__tab-icon {
|
|
815
|
+
display: inline-flex;
|
|
816
|
+
align-items: center;
|
|
817
|
+
justify-content: center;
|
|
818
|
+
width: 2.75rem;
|
|
819
|
+
height: 1.75rem;
|
|
820
|
+
border-radius: var(--oui-radius-pill);
|
|
821
|
+
transition: background-color var(--oui-duration-fast) var(--oui-ease), color var(--oui-duration-fast) var(--oui-ease);
|
|
822
|
+
}
|
|
823
|
+
.oui-app-shell__tab-icon svg {
|
|
824
|
+
flex-shrink: 0;
|
|
825
|
+
width: 1.15rem;
|
|
826
|
+
height: 1.15rem;
|
|
827
|
+
}
|
|
828
|
+
.oui-app-shell__tab-label {
|
|
829
|
+
max-width: 100%;
|
|
830
|
+
overflow: hidden;
|
|
831
|
+
text-overflow: ellipsis;
|
|
832
|
+
white-space: nowrap;
|
|
833
|
+
}
|
|
745
834
|
.oui-app-shell__drawer {
|
|
746
835
|
position: fixed;
|
|
747
836
|
top: 0;
|
|
@@ -765,8 +854,14 @@
|
|
|
765
854
|
}
|
|
766
855
|
@media (max-width: 900px) {
|
|
767
856
|
.oui-app-shell {
|
|
768
|
-
|
|
769
|
-
|
|
857
|
+
display: flex;
|
|
858
|
+
flex-direction: column;
|
|
859
|
+
}
|
|
860
|
+
.oui-app-shell__main {
|
|
861
|
+
flex: 1;
|
|
862
|
+
}
|
|
863
|
+
.oui-app-shell__tabbar {
|
|
864
|
+
display: flex;
|
|
770
865
|
}
|
|
771
866
|
.oui-app-shell__navbar {
|
|
772
867
|
display: none;
|
|
@@ -796,15 +891,15 @@
|
|
|
796
891
|
flex-wrap: wrap;
|
|
797
892
|
align-items: flex-end;
|
|
798
893
|
justify-content: space-between;
|
|
799
|
-
gap:
|
|
894
|
+
gap: var(--oui-space-6) var(--oui-space-10);
|
|
800
895
|
}
|
|
801
896
|
.oui-page-header__text {
|
|
802
897
|
display: grid;
|
|
803
|
-
gap:
|
|
898
|
+
gap: var(--oui-space-2);
|
|
804
899
|
min-width: 0;
|
|
805
900
|
}
|
|
806
901
|
.oui-page-header__breadcrumbs {
|
|
807
|
-
margin-bottom:
|
|
902
|
+
margin-bottom: var(--oui-space-3);
|
|
808
903
|
}
|
|
809
904
|
.oui-page-header__title {
|
|
810
905
|
margin: 0;
|
|
@@ -827,12 +922,12 @@
|
|
|
827
922
|
.oui-page-header__actions {
|
|
828
923
|
display: flex;
|
|
829
924
|
flex-wrap: wrap;
|
|
830
|
-
gap:
|
|
925
|
+
gap: var(--oui-space-4);
|
|
831
926
|
}
|
|
832
927
|
.oui-grid {
|
|
833
928
|
display: grid;
|
|
834
929
|
grid-template-columns: repeat(var(--_cols, 3), minmax(0, 1fr));
|
|
835
|
-
gap: var(--_gap,
|
|
930
|
+
gap: var(--_gap, var(--oui-space-6));
|
|
836
931
|
min-width: 0;
|
|
837
932
|
}
|
|
838
933
|
.oui-grid > * {
|
|
@@ -857,10 +952,10 @@
|
|
|
857
952
|
--_cols: 6;
|
|
858
953
|
}
|
|
859
954
|
.oui-grid[data-gap=sm] {
|
|
860
|
-
--_gap:
|
|
955
|
+
--_gap: var(--oui-space-4);
|
|
861
956
|
}
|
|
862
957
|
.oui-grid[data-gap=lg] {
|
|
863
|
-
--_gap:
|
|
958
|
+
--_gap: var(--oui-space-10);
|
|
864
959
|
}
|
|
865
960
|
@media (max-width: 1200px) {
|
|
866
961
|
.oui-grid[data-columns="4"], .oui-grid[data-columns="5"], .oui-grid[data-columns="6"] {
|
|
@@ -1018,12 +1113,6 @@
|
|
|
1018
1113
|
border-color: var(--_tone-border);
|
|
1019
1114
|
background: transparent;
|
|
1020
1115
|
}
|
|
1021
|
-
.oui-badge__dot {
|
|
1022
|
-
width: 0.45rem;
|
|
1023
|
-
height: 0.45rem;
|
|
1024
|
-
border-radius: 50%;
|
|
1025
|
-
background: var(--_tone);
|
|
1026
|
-
}
|
|
1027
1116
|
}
|
|
1028
1117
|
@layer oui.components {
|
|
1029
1118
|
.oui-breadcrumbs {
|
|
@@ -1422,10 +1511,10 @@
|
|
|
1422
1511
|
font-family: var(--oui-font-body);
|
|
1423
1512
|
-webkit-font-smoothing: antialiased;
|
|
1424
1513
|
-moz-osx-font-smoothing: grayscale;
|
|
1425
|
-
--_padding:
|
|
1514
|
+
--_padding: var(--oui-space-8);
|
|
1426
1515
|
display: flex;
|
|
1427
1516
|
flex-direction: column;
|
|
1428
|
-
gap:
|
|
1517
|
+
gap: var(--oui-space-6);
|
|
1429
1518
|
min-width: 0;
|
|
1430
1519
|
padding: var(--oui-card-padding, var(--_padding));
|
|
1431
1520
|
border: 1.5px solid var(--oui-card-border, var(--oui-color-border));
|
|
@@ -1439,10 +1528,10 @@
|
|
|
1439
1528
|
--_padding: 0;
|
|
1440
1529
|
}
|
|
1441
1530
|
.oui-card[data-padding=sm] {
|
|
1442
|
-
--_padding:
|
|
1531
|
+
--_padding: var(--oui-space-6);
|
|
1443
1532
|
}
|
|
1444
1533
|
.oui-card[data-padding=lg] {
|
|
1445
|
-
--_padding:
|
|
1534
|
+
--_padding: var(--oui-space-12);
|
|
1446
1535
|
}
|
|
1447
1536
|
.oui-card[data-variant=elevated] {
|
|
1448
1537
|
border-color: transparent;
|
|
@@ -1474,7 +1563,7 @@
|
|
|
1474
1563
|
}
|
|
1475
1564
|
@media (max-width: 640px) {
|
|
1476
1565
|
.oui-card[data-padding=md], .oui-card[data-padding=lg] {
|
|
1477
|
-
--_padding:
|
|
1566
|
+
--_padding: var(--oui-space-6);
|
|
1478
1567
|
}
|
|
1479
1568
|
}
|
|
1480
1569
|
.oui-card__header {
|
|
@@ -1519,7 +1608,7 @@
|
|
|
1519
1608
|
flex-wrap: wrap;
|
|
1520
1609
|
align-items: center;
|
|
1521
1610
|
gap: 0.5rem;
|
|
1522
|
-
padding-top:
|
|
1611
|
+
padding-top: var(--oui-space-6);
|
|
1523
1612
|
border-top: 1px solid var(--oui-color-border-subtle);
|
|
1524
1613
|
}
|
|
1525
1614
|
}
|
|
@@ -1829,7 +1918,7 @@
|
|
|
1829
1918
|
--_height: var(--oui-control-height-lg);
|
|
1830
1919
|
}
|
|
1831
1920
|
.oui-combobox__group[data-multiple] {
|
|
1832
|
-
padding-block:
|
|
1921
|
+
padding-block: max(0px, (var(--oui-input-height, var(--_height)) - 2 * var(--oui-control-border-width) - 1.5rem) / 2);
|
|
1833
1922
|
padding-left: 0.35rem;
|
|
1834
1923
|
}
|
|
1835
1924
|
.oui-combobox__group[data-invalid]:focus-within, .oui-combobox__group:has([data-invalid]):focus-within {
|
|
@@ -1858,7 +1947,7 @@
|
|
|
1858
1947
|
}
|
|
1859
1948
|
.oui-combobox__chips .oui-combobox__input {
|
|
1860
1949
|
min-width: 2.5rem;
|
|
1861
|
-
height: 1.
|
|
1950
|
+
height: 1.5rem;
|
|
1862
1951
|
padding-left: 0.4rem;
|
|
1863
1952
|
}
|
|
1864
1953
|
.oui-combobox__actions {
|
|
@@ -1871,8 +1960,9 @@
|
|
|
1871
1960
|
display: inline-flex;
|
|
1872
1961
|
align-items: center;
|
|
1873
1962
|
justify-content: center;
|
|
1874
|
-
|
|
1875
|
-
|
|
1963
|
+
--_size: min(1.75rem, calc(var(--oui-input-height, var(--_height)) - 2 * var(--oui-control-border-width) - 0.25rem));
|
|
1964
|
+
width: var(--_size);
|
|
1965
|
+
height: var(--_size);
|
|
1876
1966
|
padding: 0;
|
|
1877
1967
|
border: 0;
|
|
1878
1968
|
border-radius: var(--oui-radius-sm);
|
|
@@ -1912,7 +2002,7 @@
|
|
|
1912
2002
|
display: inline-flex;
|
|
1913
2003
|
align-items: center;
|
|
1914
2004
|
gap: 0.2rem;
|
|
1915
|
-
height: 1.
|
|
2005
|
+
height: 1.5rem;
|
|
1916
2006
|
padding: 0 0.2rem 0 0.6rem;
|
|
1917
2007
|
border-radius: var(--oui-radius-sm);
|
|
1918
2008
|
background: var(--oui-color-accent-subtle);
|
|
@@ -2253,7 +2343,7 @@
|
|
|
2253
2343
|
-moz-osx-font-smoothing: grayscale;
|
|
2254
2344
|
display: flex;
|
|
2255
2345
|
flex-direction: column;
|
|
2256
|
-
gap:
|
|
2346
|
+
gap: var(--oui-space-5);
|
|
2257
2347
|
min-width: 0;
|
|
2258
2348
|
}
|
|
2259
2349
|
.oui-data-table__toolbar {
|
|
@@ -2261,7 +2351,7 @@
|
|
|
2261
2351
|
flex-wrap: wrap;
|
|
2262
2352
|
align-items: center;
|
|
2263
2353
|
justify-content: space-between;
|
|
2264
|
-
gap:
|
|
2354
|
+
gap: var(--oui-space-4) var(--oui-space-6);
|
|
2265
2355
|
}
|
|
2266
2356
|
.oui-data-table__toolbar > .oui-input-group {
|
|
2267
2357
|
flex: 1 1 14rem;
|
|
@@ -2641,13 +2731,13 @@
|
|
|
2641
2731
|
-webkit-font-smoothing: antialiased;
|
|
2642
2732
|
-moz-osx-font-smoothing: grayscale;
|
|
2643
2733
|
--_width: 32rem;
|
|
2644
|
-
--_padding:
|
|
2734
|
+
--_padding: var(--oui-space-10);
|
|
2645
2735
|
--_radius: var(--oui-dialog-radius, var(--oui-radius-card));
|
|
2646
2736
|
position: fixed;
|
|
2647
2737
|
z-index: var(--oui-z-dialog);
|
|
2648
2738
|
display: flex;
|
|
2649
2739
|
flex-direction: column;
|
|
2650
|
-
gap:
|
|
2740
|
+
gap: var(--oui-space-8);
|
|
2651
2741
|
box-sizing: border-box;
|
|
2652
2742
|
width: min(var(--oui-dialog-width, var(--_width)), 100vw - 2rem);
|
|
2653
2743
|
max-height: calc(100dvh - 2rem);
|
|
@@ -2736,7 +2826,7 @@
|
|
|
2736
2826
|
}
|
|
2737
2827
|
@media (max-width: 640px) {
|
|
2738
2828
|
.oui-dialog {
|
|
2739
|
-
--_padding:
|
|
2829
|
+
--_padding: var(--oui-space-8);
|
|
2740
2830
|
}
|
|
2741
2831
|
}
|
|
2742
2832
|
.oui-dialog__header {
|
|
@@ -2821,7 +2911,7 @@
|
|
|
2821
2911
|
-webkit-font-smoothing: antialiased;
|
|
2822
2912
|
-moz-osx-font-smoothing: grayscale;
|
|
2823
2913
|
--_width: 32rem;
|
|
2824
|
-
--_padding:
|
|
2914
|
+
--_padding: var(--oui-space-10);
|
|
2825
2915
|
position: fixed;
|
|
2826
2916
|
top: 0;
|
|
2827
2917
|
bottom: 0;
|
|
@@ -2873,7 +2963,7 @@
|
|
|
2873
2963
|
}
|
|
2874
2964
|
@media (max-width: 640px) {
|
|
2875
2965
|
.oui-drawer {
|
|
2876
|
-
--_padding:
|
|
2966
|
+
--_padding: var(--oui-space-8);
|
|
2877
2967
|
border-radius: 0 !important;
|
|
2878
2968
|
}
|
|
2879
2969
|
}
|
|
@@ -2883,7 +2973,7 @@
|
|
|
2883
2973
|
align-items: flex-start;
|
|
2884
2974
|
justify-content: space-between;
|
|
2885
2975
|
gap: 1rem;
|
|
2886
|
-
padding:
|
|
2976
|
+
padding: var(--oui-space-6) var(--oui-drawer-padding, var(--_padding));
|
|
2887
2977
|
border-bottom: 1px solid var(--oui-color-border-subtle);
|
|
2888
2978
|
}
|
|
2889
2979
|
.oui-drawer__heading {
|
|
@@ -2939,7 +3029,7 @@
|
|
|
2939
3029
|
flex-wrap: wrap;
|
|
2940
3030
|
justify-content: flex-end;
|
|
2941
3031
|
gap: 0.6rem;
|
|
2942
|
-
padding:
|
|
3032
|
+
padding: var(--oui-space-6) var(--oui-drawer-padding, var(--_padding));
|
|
2943
3033
|
border-top: 1px solid var(--oui-color-border-subtle);
|
|
2944
3034
|
}
|
|
2945
3035
|
}
|
|
@@ -3008,7 +3098,7 @@
|
|
|
3008
3098
|
-moz-osx-font-smoothing: grayscale;
|
|
3009
3099
|
display: flex;
|
|
3010
3100
|
flex-direction: column;
|
|
3011
|
-
gap:
|
|
3101
|
+
gap: var(--oui-space-3);
|
|
3012
3102
|
min-width: 0;
|
|
3013
3103
|
}
|
|
3014
3104
|
.oui-field[data-disabled] .oui-field__label {
|
|
@@ -3055,7 +3145,7 @@
|
|
|
3055
3145
|
-moz-osx-font-smoothing: grayscale;
|
|
3056
3146
|
display: flex;
|
|
3057
3147
|
flex-direction: column;
|
|
3058
|
-
gap:
|
|
3148
|
+
gap: var(--oui-space-5);
|
|
3059
3149
|
min-width: 0;
|
|
3060
3150
|
padding: 0;
|
|
3061
3151
|
border: 0;
|
|
@@ -3070,7 +3160,7 @@
|
|
|
3070
3160
|
.oui-form {
|
|
3071
3161
|
display: flex;
|
|
3072
3162
|
flex-direction: column;
|
|
3073
|
-
gap:
|
|
3163
|
+
gap: var(--oui-space-8);
|
|
3074
3164
|
}
|
|
3075
3165
|
}
|
|
3076
3166
|
@layer oui.components {
|
|
@@ -3802,10 +3892,10 @@
|
|
|
3802
3892
|
.oui-popover {
|
|
3803
3893
|
display: flex;
|
|
3804
3894
|
flex-direction: column;
|
|
3805
|
-
gap:
|
|
3895
|
+
gap: var(--oui-space-5);
|
|
3806
3896
|
max-width: min(var(--available-width), 24rem);
|
|
3807
3897
|
max-height: var(--available-height);
|
|
3808
|
-
padding: var(--oui-popover-padding,
|
|
3898
|
+
padding: var(--oui-popover-padding, var(--oui-space-6));
|
|
3809
3899
|
overflow: auto;
|
|
3810
3900
|
}
|
|
3811
3901
|
.oui-popover__title {
|
|
@@ -4418,7 +4508,7 @@
|
|
|
4418
4508
|
}
|
|
4419
4509
|
@layer oui.components {
|
|
4420
4510
|
.oui-stack {
|
|
4421
|
-
--_gap:
|
|
4511
|
+
--_gap: var(--oui-space-6);
|
|
4422
4512
|
display: flex;
|
|
4423
4513
|
flex-direction: column;
|
|
4424
4514
|
gap: var(--oui-stack-gap, var(--_gap));
|
|
@@ -4435,16 +4525,16 @@
|
|
|
4435
4525
|
--_gap: 0;
|
|
4436
4526
|
}
|
|
4437
4527
|
.oui-stack[data-gap=xs] {
|
|
4438
|
-
--_gap:
|
|
4528
|
+
--_gap: var(--oui-space-2);
|
|
4439
4529
|
}
|
|
4440
4530
|
.oui-stack[data-gap=sm] {
|
|
4441
|
-
--_gap:
|
|
4531
|
+
--_gap: var(--oui-space-4);
|
|
4442
4532
|
}
|
|
4443
4533
|
.oui-stack[data-gap=lg] {
|
|
4444
|
-
--_gap:
|
|
4534
|
+
--_gap: var(--oui-space-10);
|
|
4445
4535
|
}
|
|
4446
4536
|
.oui-stack[data-gap=xl] {
|
|
4447
|
-
--_gap:
|
|
4537
|
+
--_gap: var(--oui-space-12);
|
|
4448
4538
|
}
|
|
4449
4539
|
.oui-stack[data-align=start] {
|
|
4450
4540
|
align-items: flex-start;
|
|
@@ -4726,21 +4816,21 @@
|
|
|
4726
4816
|
font-family: var(--oui-font-body);
|
|
4727
4817
|
-webkit-font-smoothing: antialiased;
|
|
4728
4818
|
-moz-osx-font-smoothing: grayscale;
|
|
4729
|
-
--_py:
|
|
4730
|
-
--_px:
|
|
4819
|
+
--_py: var(--oui-space-3);
|
|
4820
|
+
--_px: var(--oui-space-5);
|
|
4731
4821
|
width: 100%;
|
|
4732
4822
|
border-collapse: collapse;
|
|
4733
4823
|
color: var(--oui-color-text-strong);
|
|
4734
|
-
font-size: var(--oui-font-size-
|
|
4824
|
+
font-size: var(--oui-font-size-sm);
|
|
4735
4825
|
}
|
|
4736
4826
|
.oui-table[data-density=compact] {
|
|
4737
|
-
--_py:
|
|
4738
|
-
--_px:
|
|
4739
|
-
font-size: var(--oui-font-size-sm);
|
|
4827
|
+
--_py: var(--oui-space-2);
|
|
4828
|
+
--_px: var(--oui-space-4);
|
|
4740
4829
|
}
|
|
4741
4830
|
.oui-table[data-density=comfortable] {
|
|
4742
|
-
--_py:
|
|
4743
|
-
--_px:
|
|
4831
|
+
--_py: var(--oui-space-5);
|
|
4832
|
+
--_px: var(--oui-space-6);
|
|
4833
|
+
font-size: var(--oui-font-size-md);
|
|
4744
4834
|
}
|
|
4745
4835
|
.oui-table[data-striped] .oui-table__body .oui-table__row:nth-child(even) {
|
|
4746
4836
|
background: var(--oui-color-surface-muted);
|
|
@@ -9,6 +9,7 @@ export declare function themeToStyle(theme: Theme | undefined): React.CSSPropert
|
|
|
9
9
|
/** Builds a theme from a base, applying overrides on top. */
|
|
10
10
|
export declare function createTheme(...themes: Theme[]): Theme;
|
|
11
11
|
export interface ThemeProviderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
/** Ref to the provider's root element. */
|
|
12
13
|
ref?: React.Ref<HTMLDivElement>;
|
|
13
14
|
/** Token overrides applied to this subtree. */
|
|
14
15
|
theme?: Theme;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","names":["React","PortalContainerContext","cx","ThemeTokenName","Theme","Partial","Record","ColorMode","themeToStyle","theme","CSSProperties","style","name","value","Object","entries","createTheme","themes","assign","ThemeProviderProps","HTMLAttributes","HTMLDivElement","ref","Ref","mode","ThemeProvider","t0","$","_c","children","className","props","container","setContainer","useState","t1","t2","t3","t4","t5","Symbol","for","t6","_c"],"sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PortalContainerContext } from '../utils/portal';\nimport { cx } from '../utils/cx';\n\n/** Token names without the `--oui-` prefix, e.g. `color-accent` or `radius-card`. */\nexport type ThemeTokenName =\n | `color-${string}`\n | `font-${string}`\n | `radius-${string}`\n | `shadow-${string}`\n | `control-${string}`\n | `duration-${string}`\n | `ease${string}`\n | `z-${string}`\n | `focus-${string}`\n | `${string}-radius`\n | `${string}-height`;\n\n/** A partial set of token overrides. Values are any valid CSS value. */\nexport type Theme = Partial<Record<ThemeTokenName, string>>;\n\nexport type ColorMode = 'light' | 'dark';\n\n/** Converts a theme object into CSS custom properties for a `style` prop. */\nexport function themeToStyle(theme: Theme | undefined): React.CSSProperties {\n const style: Record<string, string> = {};\n if (!theme) return style;\n for (const [name, value] of Object.entries(theme)) {\n if (value != null && value !== '') style[`--oui-${name}`] = value;\n }\n return style as React.CSSProperties;\n}\n\n/** Builds a theme from a base, applying overrides on top. */\nexport function createTheme(...themes: Theme[]): Theme {\n return Object.assign({}, ...themes);\n}\n\nexport interface ThemeProviderProps extends React.HTMLAttributes<HTMLDivElement> {\n ref?: React.Ref<HTMLDivElement>;\n /** Token overrides applied to this subtree. */\n theme?: Theme;\n /** Color mode for this subtree. */\n mode?: ColorMode;\n}\n\n/**\n * Scopes a theme to its children. Popups opened inside are portalled into the\n * provider so they pick up the same tokens.\n */\nexport function ThemeProvider({ theme, mode, className, style, children, ref, ...props }: ThemeProviderProps) {\n const [container, setContainer] = React.useState<HTMLDivElement | null>(null);\n return (\n <div\n ref={ref}\n className={cx('oui-theme', className)}\n data-oui-theme={mode}\n style={{ ...themeToStyle(theme), ...style }}\n {...props}\n >\n <PortalContainerContext value={container}>{children}</PortalContainerContext>\n <div className=\"oui-theme__portal\" ref={setContainer} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAwBA,SAAgBQ,aAAaC,OAA+C;CAC1E,MAAME,QAAgC,CAAC;CACvC,IAAI,CAACF,OAAO,OAAOE;CACnB,KAAK,MAAM,CAACC,MAAMC,UAAUC,OAAOC,QAAQN,KAAK,GAC9C,IAAII,SAAS,QAAQA,UAAU,IAAIF,MAAM,SAASC,UAAUC;CAE9D,OAAOF;AACT;;AAGA,SAAgBK,YAAY,GAAGC,QAAwB;CACrD,OAAOH,OAAOI,OAAO,CAAC,GAAG,GAAGD,MAAM;AACpC;;;;;
|
|
1
|
+
{"version":3,"file":"ThemeProvider.js","names":["React","PortalContainerContext","cx","ThemeTokenName","Theme","Partial","Record","ColorMode","themeToStyle","theme","CSSProperties","style","name","value","Object","entries","createTheme","themes","assign","ThemeProviderProps","HTMLAttributes","HTMLDivElement","ref","Ref","mode","ThemeProvider","t0","$","_c","children","className","props","container","setContainer","useState","t1","t2","t3","t4","t5","Symbol","for","t6","_c"],"sources":["../../src/theme/ThemeProvider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PortalContainerContext } from '../utils/portal';\nimport { cx } from '../utils/cx';\n\n/** Token names without the `--oui-` prefix, e.g. `color-accent` or `radius-card`. */\nexport type ThemeTokenName =\n | `color-${string}`\n | `font-${string}`\n | `radius-${string}`\n | `shadow-${string}`\n | `control-${string}`\n | `duration-${string}`\n | `ease${string}`\n | `z-${string}`\n | `focus-${string}`\n | `${string}-radius`\n | `${string}-height`;\n\n/** A partial set of token overrides. Values are any valid CSS value. */\nexport type Theme = Partial<Record<ThemeTokenName, string>>;\n\nexport type ColorMode = 'light' | 'dark';\n\n/** Converts a theme object into CSS custom properties for a `style` prop. */\nexport function themeToStyle(theme: Theme | undefined): React.CSSProperties {\n const style: Record<string, string> = {};\n if (!theme) return style;\n for (const [name, value] of Object.entries(theme)) {\n if (value != null && value !== '') style[`--oui-${name}`] = value;\n }\n return style as React.CSSProperties;\n}\n\n/** Builds a theme from a base, applying overrides on top. */\nexport function createTheme(...themes: Theme[]): Theme {\n return Object.assign({}, ...themes);\n}\n\nexport interface ThemeProviderProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Ref to the provider's root element. */\n ref?: React.Ref<HTMLDivElement>;\n /** Token overrides applied to this subtree. */\n theme?: Theme;\n /** Color mode for this subtree. */\n mode?: ColorMode;\n}\n\n/**\n * Scopes a theme to its children. Popups opened inside are portalled into the\n * provider so they pick up the same tokens.\n */\nexport function ThemeProvider({ theme, mode, className, style, children, ref, ...props }: ThemeProviderProps) {\n const [container, setContainer] = React.useState<HTMLDivElement | null>(null);\n return (\n <div\n ref={ref}\n className={cx('oui-theme', className)}\n data-oui-theme={mode}\n style={{ ...themeToStyle(theme), ...style }}\n {...props}\n >\n <PortalContainerContext value={container}>{children}</PortalContainerContext>\n <div className=\"oui-theme__portal\" ref={setContainer} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAwBA,SAAgBQ,aAAaC,OAA+C;CAC1E,MAAME,QAAgC,CAAC;CACvC,IAAI,CAACF,OAAO,OAAOE;CACnB,KAAK,MAAM,CAACC,MAAMC,UAAUC,OAAOC,QAAQN,KAAK,GAC9C,IAAII,SAAS,QAAQA,UAAU,IAAIF,MAAM,SAASC,UAAUC;CAE9D,OAAOF;AACT;;AAGA,SAAgBK,YAAY,GAAGC,QAAwB;CACrD,OAAOH,OAAOI,OAAO,CAAC,GAAG,GAAGD,MAAM;AACpC;;;;;AAeA,SAAOQ,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAN;CAAA,IAAAO;CAAA,IAAAT;CAAA,IAAAX;CAAA,IAAAF;CAAA,IAAAkB,EAAA,OAAAD,IAAA;EAAuB,CAAA,CAAAjB,OAAAe,MAAAM,WAAAnB,OAAAkB,UAAAP,KAAA,GAAAS,SAAAL;EAA8EC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAH;EAAAG,EAAA,KAAAI;EAAAJ,EAAA,KAAAL;EAAAK,EAAA,KAAAhB;EAAAgB,EAAA,KAAAlB;CAAA,OAAA;EAAAoB,WAAAF,EAAA;EAAAG,YAAAH,EAAA;EAAAH,OAAAG,EAAA;EAAAI,QAAAJ,EAAA;EAAAL,MAAAK,EAAA;EAAAhB,QAAAgB,EAAA;EAAAlB,QAAAkB,EAAA;CAAA;CAC1G,MAAA,CAAAK,WAAAC,gBAAkCjC,MAAKkC,SAAiC,IAAI;CAAE,IAAAC;CAAA,IAAAR,EAAA,OAAAG,WAAA;EAI/DK,KAAAjC,GAAG,aAAa4B,SAAS;EAACH,EAAA,KAAAG;EAAAH,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAlB,OAAA;EAEzB2B,KAAA5B,aAAaC,KAAK;EAACkB,EAAA,MAAAlB;EAAAkB,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,QAAAhB,SAAAgB,EAAA,QAAAS,IAAA;EAAxBC,KAAA;GAAA,GAAKD;GAAmB,GAAKzB;EAAM;EAACgB,EAAA,MAAAhB;EAAAgB,EAAA,MAAAS;EAAAT,EAAA,MAAAU;CAAA,OAAAA,KAAAV,EAAA;CAAA,IAAAW;CAAA,IAAAX,EAAA,QAAAE,YAAAF,EAAA,QAAAK,WAAA;EAG3CM,KAAA,oBAAC,wBAAD;GAA+BN,OAAAA;GAAYH;EAApB,CAAA;EAAsDF,EAAA,MAAAE;EAAAF,EAAA,MAAAK;EAAAL,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,QAAAa,OAAAC,IAAA,2BAAA,GAAA;EAC7EF,KAAA,oBAAA,OAAA;GAAe,WAAA;GAAyBN,KAAAA;EAAY,CAAA;EAAIN,EAAA,MAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,IAAAe;CAAA,IAAAf,EAAA,QAAAH,QAAAG,EAAA,QAAAI,SAAAJ,EAAA,QAAAL,OAAAK,EAAA,QAAAQ,MAAAR,EAAA,QAAAU,MAAAV,EAAA,QAAAW,IAAA;EAR1DI,KAAA,qBAAA,OAAA;GACOpB;GACM,WAAAa;GACKX,kBAAAA;GACT,OAAAa;GAAoC,GACvCN;GALN,UAAA,CAOEO,IACAC,EACI;;EAAAZ,EAAA,MAAAH;EAAAG,EAAA,MAAAI;EAAAJ,EAAA,MAAAL;EAAAK,EAAA,MAAAQ;EAAAR,EAAA,MAAAU;EAAAV,EAAA,MAAAW;EAAAX,EAAA,MAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,OATNe;AASM"}
|
package/dist/utils/portal.d.ts
CHANGED
|
@@ -5,4 +5,8 @@ import * as React from 'react';
|
|
|
5
5
|
* inherit its tokens — this context carries the container element.
|
|
6
6
|
*/
|
|
7
7
|
export declare const PortalContainerContext: React.Context<HTMLElement | null>;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the element popups should portal into: the nearest `ThemeProvider`, or
|
|
10
|
+
* `undefined` for the document body. Pass it as `container` when building a custom portalled popup.
|
|
11
|
+
*/
|
|
8
12
|
export declare function usePortalContainer(): HTMLElement | undefined;
|
package/dist/utils/portal.js
CHANGED
|
@@ -7,6 +7,10 @@ import * as React from "react";
|
|
|
7
7
|
* inherit its tokens — this context carries the container element.
|
|
8
8
|
*/
|
|
9
9
|
var PortalContainerContext = React.createContext(null);
|
|
10
|
+
/**
|
|
11
|
+
* Returns the element popups should portal into: the nearest `ThemeProvider`, or
|
|
12
|
+
* `undefined` for the document body. Pass it as `container` when building a custom portalled popup.
|
|
13
|
+
*/
|
|
10
14
|
function usePortalContainer() {
|
|
11
15
|
return React.useContext(PortalContainerContext) ?? void 0;
|
|
12
16
|
}
|
package/dist/utils/portal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"portal.js","names":["React","PortalContainerContext","createContext","HTMLElement","usePortalContainer","useContext","undefined"],"sources":["../../src/utils/portal.tsx"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Popups (menus, selects, dialogs…) are portalled. When a ThemeProvider scopes\n * a theme to part of the page, popups must render inside that scope so they\n * inherit its tokens — this context carries the container element.\n */\nexport const PortalContainerContext = React.createContext<HTMLElement | null>(null);\n\nexport function usePortalContainer(): HTMLElement | undefined {\n return React.useContext(PortalContainerContext) ?? undefined;\n}\n"],"mappings":";;;;;;;;AAOA,IAAaC,yBAAyBD,MAAME,cAAkC,IAAI
|
|
1
|
+
{"version":3,"file":"portal.js","names":["React","PortalContainerContext","createContext","HTMLElement","usePortalContainer","useContext","undefined"],"sources":["../../src/utils/portal.tsx"],"sourcesContent":["import * as React from 'react';\n\n/**\n * Popups (menus, selects, dialogs…) are portalled. When a ThemeProvider scopes\n * a theme to part of the page, popups must render inside that scope so they\n * inherit its tokens — this context carries the container element.\n */\nexport const PortalContainerContext = React.createContext<HTMLElement | null>(null);\n\n/**\n * Returns the element popups should portal into: the nearest `ThemeProvider`, or\n * `undefined` for the document body. Pass it as `container` when building a custom portalled popup.\n */\nexport function usePortalContainer(): HTMLElement | undefined {\n return React.useContext(PortalContainerContext) ?? undefined;\n}\n"],"mappings":";;;;;;;;AAOA,IAAaC,yBAAyBD,MAAME,cAAkC,IAAI;;;;;AAMlF,SAAOE,qBAAA;CAAA,OACEJ,MAAKK,WAAYJ,sBAAmC,KAApDK,KAAAA;AAAqD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@optimum-intelligence/opti-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Optimum's customizable React component library, built on Base UI.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Optimum Intelligence",
|
|
@@ -31,7 +31,10 @@
|
|
|
31
31
|
"import": "./dist/index.js"
|
|
32
32
|
},
|
|
33
33
|
"./styles.css": "./dist/opti-ui.css",
|
|
34
|
-
"./fonts.css": "./dist/fonts.css"
|
|
34
|
+
"./fonts.css": "./dist/fonts.css",
|
|
35
|
+
"./components.json": "./dist/components.json",
|
|
36
|
+
"./llms.txt": "./dist/llms.txt",
|
|
37
|
+
"./llms-full.txt": "./dist/llms-full.txt"
|
|
35
38
|
},
|
|
36
39
|
"sideEffects": [
|
|
37
40
|
"**/*.css"
|
|
@@ -39,7 +42,8 @@
|
|
|
39
42
|
"scripts": {
|
|
40
43
|
"dev": "vite --host 127.0.0.1",
|
|
41
44
|
"typecheck": "tsc --noEmit",
|
|
42
|
-
"build": "npm run typecheck && vite build && tsc -p tsconfig.build.json",
|
|
45
|
+
"build": "npm run typecheck && vite build && tsc -p tsconfig.build.json && npm run docs",
|
|
46
|
+
"docs": "node scripts/generate-docs.mjs",
|
|
43
47
|
"build:showcase": "vite build --mode showcase",
|
|
44
48
|
"test": "npm run build && node --test tests/",
|
|
45
49
|
"prepack": "npm run build"
|