@typlog/ui 0.12.0 → 0.12.2

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/addons.css CHANGED
@@ -150,19 +150,6 @@
150
150
  background-color: var(--gray-a4);
151
151
  }
152
152
 
153
- .ui-SpinnerIcon {
154
- color: var(--gray-10);
155
- }
156
- .ui-SpinnerIcon:where(.r-size-1) {
157
- font-size: var(--space-3);
158
- }
159
- .ui-SpinnerIcon:where(.r-size-2) {
160
- font-size: var(--space-4);
161
- }
162
- .ui-SpinnerIcon:where(.r-size-3) {
163
- font-size: calc(1.25 * var(--space-4));
164
- }
165
-
166
153
  .ui-Turnstile {
167
154
  background: var(--gray-a3);
168
155
  }
package/addons.d.ts CHANGED
@@ -52,26 +52,6 @@ export declare interface SocialButtonProps extends PrimitiveProps {
52
52
  disabled?: boolean;
53
53
  }
54
54
 
55
- export declare const SpinnerIcon: DefineComponent<SpinnerIconProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<SpinnerIconProps> & Readonly<{}>, {
56
- size: "1" | "2" | "3";
57
- icon: SpinnerIcon_2;
58
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
59
-
60
- declare type SpinnerIcon_2 = '12-dots-scale-rotate' | '180-ring' | '180-ring-with-bg' | '270-ring' | '270-ring-with-bg' | '3-dots-bounce' | '3-dots-fade' | '3-dots-move' | '3-dots-rotate' | '3-dots-scale' | '3-dots-scale-middle' | '6-dots-rotate' | '6-dots-scale' | '6-dots-scale-middle' | '8-dots-rotate' | '90-ring' | '90-ring-with-bg' | 'bars-fade' | 'bars-rotate-fade' | 'bars-scale' | 'bars-scale-fade' | 'bars-scale-middle' | 'blocks-scale' | 'blocks-shuffle-2' | 'blocks-shuffle-3' | 'blocks-wave' | 'bouncing-ball' | 'clock' | 'dot-revolve' | 'eclipse' | 'eclipse-half' | 'gooey-balls-1' | 'gooey-balls-2' | 'pulse' | 'pulse-2' | 'pulse-3' | 'pulse-multiple' | 'pulse-ring' | 'pulse-rings-2' | 'pulse-rings-3' | 'pulse-rings-multiple' | 'ring-resize' | 'tadpole' | 'wifi' | 'wifi-fade' | 'wind-toy';
61
-
62
- export declare interface SpinnerIconProps {
63
- /**
64
- * Icon name of the spinner.
65
- * @default "180-ring"
66
- */
67
- icon?: SpinnerIcon_2;
68
- /**
69
- * Control size of the spinner.
70
- * @default "2"
71
- */
72
- size?: '1' | '2' | '3';
73
- }
74
-
75
55
  export declare const Turnstile: DefineComponent<TurnstileProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
76
56
  "update:modelValue": (args_0: string) => any;
77
57
  }, string, PublicProps, Readonly<TurnstileProps> & Readonly<{
package/addons.js CHANGED
@@ -11,7 +11,7 @@ const BRAND_ICONS = {
11
11
  slack: "logos:slack-icon",
12
12
  figma: "logos:figma"
13
13
  };
14
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
14
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
15
15
  __name: "SocialButton",
16
16
  props: {
17
17
  brand: {},
@@ -54,7 +54,7 @@ const _hoisted_1$1 = {
54
54
  };
55
55
  const _hoisted_2$1 = { class: "ui-IconifySampleInfo" };
56
56
  const _hoisted_3$1 = { class: "ui-IconifySampleIcons" };
57
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
57
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
58
58
  __name: "IconifySample",
59
59
  props: {
60
60
  prefix: {},
@@ -152,7 +152,7 @@ const filterIcons = (names, query, suffix) => {
152
152
  return match;
153
153
  });
154
154
  };
155
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
155
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
156
156
  __name: "IconifyCollection",
157
157
  props: {
158
158
  prefix: {},
@@ -304,7 +304,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
304
304
  ]),
305
305
  createElementVNode("div", _hoisted_8, [
306
306
  (openBlock(true), createElementBlock(Fragment, null, renderList(collection.items, (item) => {
307
- return openBlock(), createBlock(_sfc_main$3, mergeProps({
307
+ return openBlock(), createBlock(_sfc_main$2, mergeProps({
308
308
  key: item.prefix
309
309
  }, { ref_for: true }, item, {
310
310
  onClick: withModifiers(($event) => onSelectPrefix(item.prefix), ["prevent"])
@@ -395,25 +395,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
395
395
  };
396
396
  }
397
397
  });
398
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
399
- __name: "SpinnerIcon",
400
- props: {
401
- icon: { default: "180-ring" },
402
- size: { default: "2" }
403
- },
404
- setup(__props) {
405
- const props = __props;
406
- const iconName = computed(() => {
407
- return `svg-spinners:${props.icon}`;
408
- });
409
- return (_ctx, _cache) => {
410
- return openBlock(), createBlock(unref(Icon), {
411
- class: normalizeClass(["ui-SpinnerIcon", `r-size-${_ctx.size}`]),
412
- icon: iconName.value
413
- }, null, 8, ["class", "icon"]);
414
- };
415
- }
416
- });
417
398
  const turnstileSrc = "https://challenges.cloudflare.com/turnstile/v0/api.js";
418
399
  const turnstileLoadFunction = "cfTurnstileOnLoad";
419
400
  let turnstileState = typeof window !== "undefined" ? window.turnstile !== void 0 ? "ready" : "unloaded" : "unloaded";
@@ -507,8 +488,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
507
488
  }
508
489
  });
509
490
  export {
510
- _sfc_main$2 as IconifyCollection,
511
- _sfc_main$4 as SocialButton,
512
- _sfc_main$1 as SpinnerIcon,
491
+ _sfc_main$1 as IconifyCollection,
492
+ _sfc_main$3 as SocialButton,
513
493
  _sfc_main as Turnstile
514
494
  };
@@ -39,24 +39,31 @@
39
39
  box-sizing: border-box;
40
40
  padding-top: var(--space-6);
41
41
  }
42
+ @layer components {
42
43
  .ui-DialogPopup {
43
- width: 100%;
44
- max-height: calc(100vh - var(--space-6) * 2);
45
- position: relative;
46
- box-sizing: border-box;
47
- overflow: auto;
48
- text-align: left;
49
- box-sizing: border-box;
50
- background-color: var(--color-panel-solid);
51
- outline: none;
52
- border-top-left-radius: var(--dialog-popup-radius);
53
- border-top-right-radius: var(--dialog-popup-radius);
54
- max-width: var(--dialog-popup-max-width);
55
- max-height: var(--dialog-popup-max-height);
56
- padding: var(--dialog-popup-padding);
44
+ width: 100%;
45
+ max-height: calc(100vh - var(--space-6) * 2);
46
+ position: relative;
47
+ box-sizing: border-box;
48
+ overflow: auto;
49
+ text-align: left;
50
+ box-sizing: border-box;
51
+ background-color: var(--color-panel-solid);
52
+ outline: none;
53
+ border-top-left-radius: var(--dialog-popup-radius);
54
+ border-top-right-radius: var(--dialog-popup-radius);
55
+ max-width: var(--dialog-popup-max-width);
56
+ max-height: var(--dialog-popup-max-height);
57
+ padding: var(--dialog-popup-padding);
58
+ }
59
+ :where(.ui-DialogPopup) .ui-CloseButton {
60
+ position: absolute;
61
+ top: calc(var(--dialog-popup-padding) / 2);
62
+ right: calc(var(--dialog-popup-padding) / 2);
63
+ }
57
64
  }
58
65
  .ui-DialogPopup:where(.r-size-1) {
59
- --dialog-popup-padding: var(--space-3);
66
+ --dialog-popup-padding: var(--space-4);
60
67
  --dialog-popup-radius: var(--radius-4);
61
68
  --dialog-popup-max-width: 450px;
62
69
  --dialog-popup-max-height: calc(100vh - 100px);
@@ -74,7 +81,7 @@
74
81
  --dialog-popup-max-height: calc(100vh - 100px);
75
82
  }
76
83
  .ui-DialogPopup:where(.r-size-4) {
77
- --dialog-popup-padding: var(--space-6);
84
+ --dialog-popup-padding: var(--space-5);
78
85
  --dialog-popup-radius: var(--radius-5);
79
86
  --dialog-popup-max-width: 1200px;
80
87
  --dialog-popup-max-height: calc(100vh - 100px);
@@ -85,11 +92,6 @@
85
92
  --dialog-popup-max-width: none;
86
93
  --dialog-popup-max-height: calc(100vh - 64px);
87
94
  }
88
-
89
- /* special handle for tailwindcss p-0, when css priority doesn't work */
90
- .ui-DialogPopup:where(.p-0) {
91
- --dialog-popup-padding: 0;
92
- }
93
95
  @media (min-width: 450px) {
94
96
  .ui-DialogContainer {
95
97
  justify-content: center;
@@ -97,10 +99,12 @@
97
99
  padding-left: var(--space-4);
98
100
  padding-right: var(--space-4);
99
101
  }
102
+ @layer components {
100
103
  .ui-DialogPopup {
101
- box-shadow: var(--shadow-6);
102
- border-bottom-left-radius: var(--dialog-popup-radius);
103
- border-bottom-right-radius: var(--dialog-popup-radius);
104
+ box-shadow: var(--shadow-6);
105
+ border-bottom-left-radius: var(--dialog-popup-radius);
106
+ border-bottom-right-radius: var(--dialog-popup-radius);
107
+ }
104
108
  }
105
109
  }
106
110
  @media (prefers-reduced-motion: no-preference) {
@@ -152,7 +152,6 @@
152
152
  box-sizing: border-box;
153
153
  overflow: hidden;
154
154
  border-radius: var(--menu-content-border-radius);
155
-
156
155
  box-shadow: var(--shadow-5);
157
156
  background-color: var(--color-panel-solid);
158
157
  }
@@ -34,17 +34,19 @@
34
34
  }
35
35
  }
36
36
 
37
+ @layer components {
37
38
  .ui-PopoverPopup {
38
- background-color: var(--color-panel-solid);
39
- box-shadow: var(--shadow-5);
40
- min-width: var(--reka-popover-trigger-width);
41
- max-width: var(--reka-popover-content-available-width);
42
- outline: 0;
43
- overflow: auto;
44
- position: relative;
45
- box-sizing: border-box;
46
- transform-origin: var(--reka-popover-content-transform-origin);
47
- padding: var(--popover-popup-padding);
39
+ background-color: var(--color-panel-solid);
40
+ box-shadow: var(--shadow-5);
41
+ min-width: var(--reka-popover-trigger-width);
42
+ max-width: var(--reka-popover-content-available-width);
43
+ outline: 0;
44
+ overflow: auto;
45
+ position: relative;
46
+ box-sizing: border-box;
47
+ transform-origin: var(--reka-popover-content-transform-origin);
48
+ padding: var(--popover-popup-padding);
49
+ }
48
50
  }
49
51
  .ui-PopoverPopup:where(.r-size-1) {
50
52
  border-radius: var(--radius-4);
@@ -54,6 +56,3 @@
54
56
  border-radius: var(--radius-5);
55
57
  --popover-popup-padding: var(--space-4);
56
58
  }
57
- .ui-PopoverPopup:where(.p-0) {
58
- --popover-popup-padding: 0;
59
- }
@@ -128,12 +128,14 @@
128
128
  --radio-size: calc(var(--space-4) * 1.25);
129
129
  }
130
130
 
131
+ @layer components {
131
132
  .ui-RadioGroupItem {
132
- display: inline-flex;
133
- align-items: center;
134
- gap: .5em;
135
- width: -moz-fit-content;
136
- width: fit-content;
133
+ display: inline-flex;
134
+ align-items: center;
135
+ gap: .5em;
136
+ width: -moz-fit-content;
137
+ width: fit-content;
138
+ }
137
139
  }
138
140
 
139
141
  .ui-RadioCardsRoot:where(.r-size-1) {
@@ -148,19 +150,21 @@
148
150
  --card-padding: var(--space-5);
149
151
  --card-border-radius: max(var(--radius-5), var(--radius-full));
150
152
  }
153
+ @layer components {
151
154
  .ui-BaseCard {
152
- display: block;
153
- position: relative;
154
- overflow: hidden;
155
- font-style: normal;
156
- text-align: start;
157
- box-sizing: border-box;
158
- border-radius: var(--card-border-radius);
159
- padding: var(--card-padding);
160
- border-color: var(--card-border-color, var(--gray-a5));
161
- border-width: var(--card-border-width, 1px);
162
- border-style: solid;
163
- width: 100%;
155
+ display: block;
156
+ position: relative;
157
+ overflow: hidden;
158
+ font-style: normal;
159
+ text-align: start;
160
+ box-sizing: border-box;
161
+ border-radius: var(--card-border-radius);
162
+ padding: var(--card-padding);
163
+ border-color: var(--card-border-color, var(--gray-a5));
164
+ border-width: var(--card-border-width, 1px);
165
+ border-style: solid;
166
+ width: 100%;
167
+ }
164
168
  }
165
169
  .ui-BaseCard:where(:-moz-any-link, button, label):where(:hover) {
166
170
  --card-border-color: var(--gray-a7);
@@ -177,11 +181,6 @@
177
181
  box-shadow: 0 0 0 2px var(--accent-4), 0 1px 2px 0 rgb(0 0 0 / 0.05);
178
182
  }
179
183
 
180
- /** special enhancement for tailwindcss */
181
- .ui-BaseCard:where(.p-0) {
182
- --card-padding: 0;
183
- }
184
-
185
184
  .ui-RadioCardsItem {
186
185
  height: 100%;
187
186
  }
@@ -190,15 +189,17 @@
190
189
  box-shadow: 0 0 0 1px var(--accent-10);
191
190
  }
192
191
 
192
+ @layer components {
193
193
  .ui-RadioTabsRoot {
194
- display: inline-flex;
195
- width: -moz-fit-content;
196
- width: fit-content;
197
- align-items: center;
198
- box-sizing: border-box;
199
- padding: var(--radio-tabs-list-padding);
200
- border-radius: var(--radio-tabs-list-radius);
201
- font-size: var(--radio-tabs-font-size);
194
+ display: inline-flex;
195
+ width: -moz-fit-content;
196
+ width: fit-content;
197
+ align-items: center;
198
+ box-sizing: border-box;
199
+ padding: var(--radio-tabs-list-padding);
200
+ border-radius: var(--radio-tabs-list-radius);
201
+ font-size: var(--radio-tabs-font-size);
202
+ }
202
203
  }
203
204
  .ui-RadioTabsRoot:where(.r-size-1) {
204
205
  --radio-tabs-font-size: var(--font-size-1);
@@ -1,66 +1,85 @@
1
1
 
2
- .ui-TabList {
3
- justify-content: flex-start;
4
- position: relative;
5
- overflow-x: auto;
6
- white-space: nowrap;
7
- font-style: normal;
8
- scrollbar-width: none;
9
- }
10
2
  .ui-TabList::-webkit-scrollbar {
11
3
  display: none;
12
4
  }
13
5
  .ui-TabList:where(.r-size-1) {
14
- font-size: var(--font-size-1);
15
- line-height: var(--line-height-1);
16
- letter-spacing: var(--letter-spacing-1);
6
+ --tab-font-size: var(--font-size-1);
7
+ --tab-line-height: var(--line-height-1);
8
+ --tab-letter-spacing: var(--letter-spacing-1);
17
9
  --tab-height: var(--space-6);
18
10
  --tab-padding-x: var(--space-1);
19
11
  --tab-radius: max(var(--radius-2), var(--radius-full));
20
- --tab-item-radius: var(--radius-1);
12
+ --tab-item-radius: max(var(--radius-1), var(--radius-full));
21
13
  --tab-inner-padding-x: var(--space-1);
22
14
  --tab-inner-height: var(--space-5);
23
15
  }
24
16
  .ui-TabList:where(.r-size-2) {
25
- font-size: var(--font-size-2);
26
- line-height: var(--line-height-2);
27
- letter-spacing: var(--letter-spacing-2);
17
+ --tab-font-size: var(--font-size-2);
18
+ --tab-line-height: var(--line-height-2);
19
+ --tab-letter-spacing: var(--letter-spacing-2);
28
20
  --tab-height: var(--space-7);
29
21
  --tab-padding-x: var(--space-2);
30
22
  --tab-radius: max(var(--radius-3), var(--radius-full));
31
- --tab-item-radius: var(--radius-2);
23
+ --tab-item-radius: max(var(--radius-2), var(--radius-full));
32
24
  --tab-inner-padding-x: var(--space-2);
33
25
  --tab-inner-height: calc(var(--space-6) - var(--space-1));
34
26
  }
35
- .ui-TabsIndicator {
36
- position: absolute;
37
- left: 0;
38
- transition-property: width, transform;
39
- transform: translateX(var(--reka-tabs-indicator-position));
40
- width: var(--reka-tabs-indicator-size);
27
+ .ui-TabList:where(.r-variant-surface.r-size-1),
28
+ .ui-TabList:where(.r-variant-soft.r-size-1) {
29
+ --tab-inner-padding-x: calc(var(--space-2) / 4 * 3);
30
+ }
31
+ @layer components {
32
+ .ui-TabList {
33
+ justify-content: flex-start;
34
+ position: relative;
35
+ overflow-x: auto;
36
+ white-space: nowrap;
37
+ font-style: normal;
38
+ scrollbar-width: none;
39
+ font-size: var(--tab-font-size);
40
+ line-height: var(--tab-line-height);
41
+ letter-spacing: var(--tab-letter-spacing);
41
42
  }
42
43
 
43
- /** classic & surface */
44
+ /** classic & surface */
44
45
  .ui-TabList:where(.r-variant-surface, .r-variant-classic) {
45
- position: relative;
46
- display: inline-flex;
47
- width: -moz-fit-content;
48
- width: fit-content;
49
- align-items: center;
50
- justify-content: center;
51
- vertical-align: top;
52
- flex-shrink: 0;
53
- border-radius: var(--tab-radius);
46
+ position: relative;
47
+ display: inline-flex;
48
+ width: -moz-fit-content;
49
+ width: fit-content;
50
+ align-items: center;
51
+ justify-content: center;
52
+ vertical-align: top;
53
+ flex-shrink: 0;
54
+ border-radius: var(--tab-radius);
54
55
  }
55
56
  .ui-TabList:where(.r-variant-classic) {
56
- background-color: var(--accent-a3);
57
- padding-left: var(--tab-padding-x);
58
- padding-right: var(--tab-padding-x);
57
+ background-color: var(--accent-a3);
58
+ padding-left: var(--tab-padding-x);
59
+ padding-right: var(--tab-padding-x);
59
60
  }
60
61
  .ui-TabList:where(.r-variant-surface) {
61
- --tab-item-radius: 0;
62
- --tab-inner-height: var(--tab-height);
63
- box-shadow: inset 0 0 0 1px var(--gray-a6);
62
+ --tab-item-radius: 0;
63
+ --tab-inner-height: var(--tab-height);
64
+ box-shadow: inset 0 0 0 1px var(--gray-a6);
65
+ }
66
+
67
+ /** soft & outline */
68
+ .ui-TabList:where(.r-variant-outline, .r-variant-soft) {
69
+ display: flex;
70
+ box-shadow: inset 0 -1px 0 0 var(--gray-a5);
71
+ }
72
+ .ui-TabList:where(.r-variant-soft) {
73
+ padding-left: var(--tab-padding-x);
74
+ padding-right: var(--tab-padding-x);
75
+ }
76
+ }
77
+ .ui-TabsIndicator {
78
+ position: absolute;
79
+ left: 0;
80
+ transition-property: width, transform;
81
+ transform: translateX(var(--reka-tabs-indicator-position));
82
+ width: var(--reka-tabs-indicator-size);
64
83
  }
65
84
  .ui-TabList:where(.r-variant-surface) :where(.ui-TabsIndicator) {
66
85
  top: 0;
@@ -80,20 +99,6 @@
80
99
  border-radius: var(--tab-item-radius);
81
100
  transition-duration: 100ms;
82
101
  }
83
- .ui-TabList:where(.r-variant-surface.r-size-1),
84
- .ui-TabList:where(.r-variant-soft.r-size-1) {
85
- --tab-inner-padding-x: calc(var(--space-2) / 4 * 3);
86
- }
87
-
88
- /** soft & outline */
89
- .ui-TabList:where(.r-variant-outline, .r-variant-soft) {
90
- display: flex;
91
- box-shadow: inset 0 -1px 0 0 var(--gray-a5);
92
- }
93
- .ui-TabList:where(.r-variant-soft) {
94
- padding-left: var(--tab-padding-x);
95
- padding-right: var(--tab-padding-x);
96
- }
97
102
  .ui-TabList:where(.r-variant-soft) :where(.ui-TabsIndicator) {
98
103
  top: calc((var(--tab-height) - var(--tab-inner-height)) / 2);
99
104
  height: var(--tab-inner-height);