@jobber/components-native 0.108.1 → 0.109.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/docs/AtlantisThemeContext/AtlantisThemeContext.md +40 -0
- package/dist/docs/Icon/Icon.md +60 -53
- package/dist/docs/Select/Select.md +987 -0
- package/dist/docs/index.md +1 -0
- package/dist/package.json +3 -3
- package/dist/src/Select/Select.composable.test.js +38 -0
- package/dist/src/Select/Select.js +26 -0
- package/dist/src/Select/SelectComposableTypes.js +1 -0
- package/dist/src/Select/SelectRoot.js +85 -0
- package/dist/src/Select/SelectRoot.style.js +9 -0
- package/dist/src/Select/SelectRoot.test.js +157 -0
- package/dist/src/Select/components/SelectContent.js +51 -0
- package/dist/src/Select/components/SelectContent.test.js +51 -0
- package/dist/src/Select/components/SelectFieldContext.js +10 -0
- package/dist/src/Select/components/SelectItem.js +29 -0
- package/dist/src/Select/components/SelectItem.style.js +6 -0
- package/dist/src/Select/components/SelectItem.test.js +98 -0
- package/dist/src/Select/components/SelectLabel.js +29 -0
- package/dist/src/Select/components/SelectTrigger.js +40 -0
- package/dist/src/Select/components/SelectTrigger.style.js +26 -0
- package/dist/src/Select/index.js +2 -0
- package/dist/src/primitives/Portal/index.js +3 -1
- package/dist/src/primitives/Select/SelectPrimitive.js +4 -12
- package/dist/src/primitives/Select/SelectPrimitive.style.js +14 -9
- package/dist/src/primitives/Select/SelectPrimitive.test.js +2 -2
- package/dist/src/primitives/Select/index.js +1 -1
- package/dist/src/utils/meta/meta.json +11 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/Select/Select.composable.test.d.ts +1 -0
- package/dist/types/src/Select/Select.d.ts +18 -0
- package/dist/types/src/Select/SelectComposableTypes.d.ts +50 -0
- package/dist/types/src/Select/SelectRoot.d.ts +12 -0
- package/dist/types/src/Select/SelectRoot.style.d.ts +8 -0
- package/dist/types/src/Select/SelectRoot.test.d.ts +1 -0
- package/dist/types/src/Select/components/SelectContent.d.ts +8 -0
- package/dist/types/src/Select/components/SelectContent.test.d.ts +1 -0
- package/dist/types/src/Select/components/SelectFieldContext.d.ts +27 -0
- package/dist/types/src/Select/components/SelectItem.d.ts +32 -0
- package/dist/types/src/Select/components/SelectItem.style.d.ts +5 -0
- package/dist/types/src/Select/components/SelectItem.test.d.ts +1 -0
- package/dist/types/src/Select/components/SelectLabel.d.ts +22 -0
- package/dist/types/src/Select/components/SelectTrigger.d.ts +20 -0
- package/dist/types/src/Select/components/SelectTrigger.style.d.ts +21 -0
- package/dist/types/src/Select/index.d.ts +2 -1
- package/dist/types/src/primitives/Select/SelectPrimitive.d.ts +3 -1
- package/dist/types/src/primitives/Select/SelectPrimitive.style.d.ts +6 -3
- package/dist/types/src/primitives/Select/index.d.ts +1 -1
- package/dist/types/src/primitives/Select/types.d.ts +1 -1
- package/package.json +3 -3
- package/src/Select/Select.composable.stories.tsx +93 -0
- package/src/Select/Select.composable.test.tsx +56 -0
- package/src/Select/Select.guide.md +197 -0
- package/src/Select/Select.tsx +31 -0
- package/src/Select/SelectComposableTypes.ts +57 -0
- package/src/Select/SelectRoot.style.ts +10 -0
- package/src/Select/SelectRoot.test.tsx +245 -0
- package/src/Select/SelectRoot.tsx +120 -0
- package/src/Select/components/SelectContent.test.tsx +67 -0
- package/src/Select/components/SelectContent.tsx +75 -0
- package/src/Select/components/SelectFieldContext.tsx +46 -0
- package/src/Select/components/SelectItem.style.ts +7 -0
- package/src/Select/components/SelectItem.test.tsx +166 -0
- package/src/Select/components/SelectItem.tsx +78 -0
- package/src/Select/components/SelectLabel.tsx +57 -0
- package/src/Select/components/SelectTrigger.style.ts +29 -0
- package/src/Select/components/SelectTrigger.tsx +98 -0
- package/src/Select/docs/SelectComposableBasic.tsx +18 -0
- package/src/Select/docs/SelectComposableControlledWithRef.tsx +28 -0
- package/src/Select/docs/SelectComposableCustomMarker.tsx +25 -0
- package/src/Select/docs/SelectComposableDescription.tsx +18 -0
- package/src/Select/docs/SelectComposableDisabled.tsx +18 -0
- package/src/Select/docs/SelectComposableDisabledOptions.tsx +20 -0
- package/src/Select/docs/SelectComposableGroupedOptions.tsx +29 -0
- package/src/Select/docs/SelectComposableItemPrefixSuffix.tsx +34 -0
- package/src/Select/docs/SelectComposableLabelAbove.tsx +18 -0
- package/src/Select/docs/SelectComposableLabelInside.tsx +18 -0
- package/src/Select/docs/SelectComposableProvinces.tsx +36 -0
- package/src/Select/docs/SelectComposableReadOnly.tsx +18 -0
- package/src/Select/docs/SelectComposableValidationFlow.tsx +27 -0
- package/src/Select/docs/index.ts +14 -0
- package/src/Select/index.ts +10 -1
- package/src/primitives/Portal/index.ts +3 -1
- package/src/primitives/Select/SelectPrimitive.style.ts +18 -11
- package/src/primitives/Select/SelectPrimitive.test.tsx +2 -2
- package/src/primitives/Select/SelectPrimitive.tsx +6 -18
- package/src/primitives/Select/index.ts +4 -1
- package/src/primitives/Select/types.ts +1 -1
- package/src/utils/meta/meta.json +11 -0
|
@@ -116,6 +116,46 @@ function ThemedComponent() {
|
|
|
116
116
|
}
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
+
### Cross-tab theme sync (Web Only)
|
|
120
|
+
|
|
121
|
+
The provider can keep the theme in sync across a user's open browser tabs. This
|
|
122
|
+
is opt-in: pass the `localStorage` key your app writes to as the `storageKey`
|
|
123
|
+
prop. The provider then listens for
|
|
124
|
+
[`storage` events](https://developer.mozilla.org/en-US/docs/Web/API/Window/storage_event)
|
|
125
|
+
on that key and applies theme changes from other tabs. The `storage` event fires
|
|
126
|
+
only in tabs *other* than the one that wrote the value, so there's no feedback
|
|
127
|
+
loop.
|
|
128
|
+
|
|
129
|
+
**Your app is responsible for writing to `localStorage`** when the theme changes
|
|
130
|
+
— Atlantis only handles the listen-and-react side.
|
|
131
|
+
|
|
132
|
+
```tsx
|
|
133
|
+
<AtlantisThemeContextProvider storageKey="my_app_theme">
|
|
134
|
+
<ThemedComponent />
|
|
135
|
+
</AtlantisThemeContextProvider>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
// Theme toggle — write to the same key after calling updateTheme
|
|
140
|
+
import { updateTheme } from "@jobber/components/AtlantisThemeContext";
|
|
141
|
+
|
|
142
|
+
function toggleTheme(newTheme: "light" | "dark") {
|
|
143
|
+
updateTheme(newTheme); // updates all providers in this tab immediately
|
|
144
|
+
|
|
145
|
+
try {
|
|
146
|
+
localStorage.setItem("my_app_theme", newTheme); // signals other tabs
|
|
147
|
+
} catch {
|
|
148
|
+
// localStorage unavailable (e.g. private mode) — degrades gracefully
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Omit `storageKey` and no `storage` listener is added, keeping the previous
|
|
154
|
+
within-tab-only behavior. Multiple dynamic providers on the same page all share
|
|
155
|
+
the same internal store, so a single provider with a `storageKey` is enough — a
|
|
156
|
+
cross-tab signal updates every dynamic provider at once. Providers mounted with
|
|
157
|
+
`dangerouslyOverrideTheme` are unaffected.
|
|
158
|
+
|
|
119
159
|
### Forcing a theme for an AtlantisThemeContextProvider
|
|
120
160
|
|
|
121
161
|
In some scenarios you may want to force a theme for specific components
|
package/dist/docs/Icon/Icon.md
CHANGED
|
@@ -429,59 +429,66 @@ export function IconSizesExample() {
|
|
|
429
429
|
|
|
430
430
|
### Other
|
|
431
431
|
|
|
432
|
-
| Icon | `Name`
|
|
433
|
-
| :--- |
|
|
434
|
-
| | `apps`
|
|
435
|
-
| | `at`
|
|
436
|
-
| | `camera`
|
|
437
|
-
| | `checkmark`
|
|
438
|
-
| | `checkmarkCircle`
|
|
439
|
-
| | `circle`
|
|
440
|
-
| | `cog`
|
|
441
|
-
| | `dashboard`
|
|
442
|
-
| | `desktop`
|
|
443
|
-
| | `website`
|
|
444
|
-
| | `eye`
|
|
445
|
-
| | `eyeCrossed`
|
|
446
|
-
| | `flash`
|
|
447
|
-
| | `flashAuto`
|
|
448
|
-
| | `flashOff`
|
|
449
|
-
| | `gift`
|
|
450
|
-
| | `grid`
|
|
451
|
-
| | `happyFace`
|
|
452
|
-
| | `headset`
|
|
453
|
-
| | `home`
|
|
454
|
-
| | `link`
|
|
455
|
-
| | `loadingCheck`
|
|
456
|
-
| | `lock`
|
|
457
|
-
| | `logout`
|
|
458
|
-
| | `measurement`
|
|
459
|
-
| | `menu`
|
|
460
|
-
| | `microphone`
|
|
461
|
-
| | `microphoneMuted`
|
|
462
|
-
| | `mobile`
|
|
463
|
-
| | `more`
|
|
464
|
-
| | `number`
|
|
465
|
-
| | `
|
|
466
|
-
| | `
|
|
467
|
-
| | `
|
|
468
|
-
| | `
|
|
469
|
-
| | `
|
|
470
|
-
| | `
|
|
471
|
-
| | `
|
|
472
|
-
| | `
|
|
473
|
-
| | `
|
|
474
|
-
| | `
|
|
475
|
-
| | `
|
|
476
|
-
| | `
|
|
477
|
-
| | `
|
|
478
|
-
| | `
|
|
479
|
-
| | `
|
|
480
|
-
| | `
|
|
481
|
-
| | `
|
|
482
|
-
| | `
|
|
483
|
-
| | `
|
|
484
|
-
| | `
|
|
432
|
+
| Icon | `Name` |
|
|
433
|
+
| :--- | :------------------ |
|
|
434
|
+
| | `apps` |
|
|
435
|
+
| | `at` |
|
|
436
|
+
| | `camera` |
|
|
437
|
+
| | `checkmark` |
|
|
438
|
+
| | `checkmarkCircle` |
|
|
439
|
+
| | `circle` |
|
|
440
|
+
| | `cog` |
|
|
441
|
+
| | `dashboard` |
|
|
442
|
+
| | `desktop` |
|
|
443
|
+
| | `website` |
|
|
444
|
+
| | `eye` |
|
|
445
|
+
| | `eyeCrossed` |
|
|
446
|
+
| | `flash` |
|
|
447
|
+
| | `flashAuto` |
|
|
448
|
+
| | `flashOff` |
|
|
449
|
+
| | `gift` |
|
|
450
|
+
| | `grid` |
|
|
451
|
+
| | `happyFace` |
|
|
452
|
+
| | `headset` |
|
|
453
|
+
| | `home` |
|
|
454
|
+
| | `link` |
|
|
455
|
+
| | `loadingCheck` |
|
|
456
|
+
| | `lock` |
|
|
457
|
+
| | `logout` |
|
|
458
|
+
| | `measurement` |
|
|
459
|
+
| | `menu` |
|
|
460
|
+
| | `microphone` |
|
|
461
|
+
| | `microphoneMuted` |
|
|
462
|
+
| | `mobile` |
|
|
463
|
+
| | `more` |
|
|
464
|
+
| | `number` |
|
|
465
|
+
| | `numpad` |
|
|
466
|
+
| | `offline` |
|
|
467
|
+
| | `phone` |
|
|
468
|
+
| | `phoneCall` |
|
|
469
|
+
| | `phoneDisconnected` |
|
|
470
|
+
| | `phoneEnd` |
|
|
471
|
+
| | `phoneIncoming` |
|
|
472
|
+
| | `phoneOutgoing` |
|
|
473
|
+
| | `pinned` |
|
|
474
|
+
| | `presentation` |
|
|
475
|
+
| | `priceTag` |
|
|
476
|
+
| | `quickbooks` |
|
|
477
|
+
| | `reports` |
|
|
478
|
+
| | `shape` |
|
|
479
|
+
| | `sidebar` |
|
|
480
|
+
| | `signature` |
|
|
481
|
+
| | `sneaker` |
|
|
482
|
+
| | `sparkles` |
|
|
483
|
+
| | `speaker` |
|
|
484
|
+
| | `sprout` |
|
|
485
|
+
| | `starburst` |
|
|
486
|
+
| | `sun` |
|
|
487
|
+
| | `tableColumns` |
|
|
488
|
+
| | `thumbsDown` |
|
|
489
|
+
| | `thumbsUp` |
|
|
490
|
+
| | `unPinned` |
|
|
491
|
+
| | `xero` |
|
|
485
492
|
|
|
486
493
|
### Legacy
|
|
487
494
|
|